diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ef76a1033ad3..56227fdea67d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -31,6 +31,7 @@ I have... * [ ] 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 +* [ ] run `make lint` and `make test` * [ ] confirmed all CI checks have passed ### Reviewers Checklist diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5cafca7c3b88..c29e3542ca59 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -123,15 +123,6 @@ updates: labels: - "A:automerge" - dependencies - - package-ecosystem: gomod - directory: "/tools/rosetta" - schedule: - interval: weekly - day: monday - time: "02:05" - labels: - - "A:automerge" - - dependencies - package-ecosystem: gomod directory: "/tools/confix" schedule: @@ -242,3 +233,22 @@ updates: dependency-type: "all" - dependency-name: "cosmossdk.io/*" dependency-type: "all" + + # Dependencies should be up to date on release branch + - package-ecosystem: gomod + directory: "/" + target-branch: "release/v0.50.x" + schedule: + interval: daily + time: "03:00" + labels: + - "A:automerge" + - dependencies + - "testing-required" + allow: + - dependency-name: "github.com/cosmos/cosmos-sdk/*" + dependency-type: "all" + - dependency-name: "github.com/cosmos/*" + dependency-type: "all" + - dependency-name: "cosmossdk.io/*" + dependency-type: "all" diff --git a/.github/pr_labeler.yml b/.github/pr_labeler.yml index f196ff46d060..66b539d6e2bf 100644 --- a/.github/pr_labeler.yml +++ b/.github/pr_labeler.yml @@ -43,9 +43,6 @@ - collections/**/* "C:Cosmovisor": - tools/cosmovisor/**/* -"C:Rosetta": - - contrib/rosetta/**/* - - tools/rosetta/**/* "C:Confix": - tools/confix/**/* "C:Hubl": diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 60e734bb7560..fc7f84c7a097 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - uses: technote-space/get-diff-action@v6.1.2 id: git_diff @@ -52,9 +52,6 @@ jobs: - name: Build Cosmovisor if: env.GIT_DIFF run: GOARCH=${{ matrix.go-arch }} make cosmovisor - - name: Build Rosetta - if: env.GIT_DIFF - run: GOARCH=${{ matrix.go-arch }} make rosetta - name: Build Confix if: env.GIT_DIFF run: GOARCH=${{ matrix.go-arch }} make confix diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 4c008d3ac016..109423d8cf27 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -25,7 +25,7 @@ jobs: uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/dependabot-update-all.yml b/.github/workflows/dependabot-update-all.yml index 5f6342a76fd5..1dc5ddc7cc61 100644 --- a/.github/workflows/dependabot-update-all.yml +++ b/.github/workflows/dependabot-update-all.yml @@ -17,7 +17,7 @@ jobs: token: ${{ secrets.PRBOT_PAT }} - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - name: Extract updated dependency id: deps diff --git a/.github/workflows/dependencies-review.yml b/.github/workflows/dependencies-review.yml index 931424adca4f..5e834f7e171b 100644 --- a/.github/workflows/dependencies-review.yml +++ b/.github/workflows/dependencies-review.yml @@ -14,14 +14,14 @@ jobs: uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - name: "Dependency Review" uses: actions/dependency-review-action@v3 with: base-ref: ${{ github.event.pull_request.base.sha || 'main' }} head-ref: ${{ github.event.pull_request.head.sha || github.ref }} - fail-on-severity: moderate # otherwise we fail on ourselves due to https://github.com/advisories/GHSA-qfc5-6r3j-jj22 + fail-on-severity: high # otherwise we fail on ourselves due to https://github.com/advisories/GHSA-qfc5-6r3j-jj22, https://github.com/advisories/GHSA-w44m-8mv2-v78h TODO(@julienrbrt) submit a PR to the action to ignore packages - name: "Dependency audit" run: ./scripts/dep-assert.sh - name: "Go vulnerability check" diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml deleted file mode 100644 index 703d55004bd5..000000000000 --- a/.github/workflows/deploy-docs.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Deploy docs -# This job builds and deploys documenation to github pages. -# It runs on every push to main with a change in the docs folder. -on: - workflow_dispatch: - push: - branches: - - main - - "release/**" - paths: - - "docs/**" - - "x/**/*.md" - - .github/workflows/deploy-docs.yml - -permissions: - contents: read - -jobs: - build-and-deploy: - permissions: - contents: write # for JamesIves/github-pages-deploy-action to push changes in repo - runs-on: ubuntu-latest - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v3 - with: - persist-credentials: false - fetch-depth: 0 - path: "." - - - name: Setup Node.js 🔧 - uses: actions/setup-node@v3 - with: - node-version: "16.x" - - # npm install npm should be removed when https://github.com/npm/cli/issues/4942 is fixed - - name: Build 🔧 - run: | - npm install -g npm@8.5.5 - make build-docs - - - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@v4.4.2 - with: - branch: gh-pages - folder: ~/output - single-commit: true diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c035bdb2937e..93247f7a1b9b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,10 +16,23 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - uses: technote-space/get-diff-action@v6.1.2 id: git_diff + with: + PATTERNS: | + Makefile + **/Makefile + .golangci.yml + - name: run linting (long) + if: env.GIT_DIFF + id: lint_long + run: | + make lint + - uses: technote-space/get-diff-action@v6.1.2 + if: steps.lint_long.outcome == 'skipped' + id: git_diff_all with: PATTERNS: | **/*.go @@ -27,7 +40,10 @@ jobs: go.sum **/go.mod **/go.sum - - name: run linting - if: env.GIT_DIFF + - name: run linting (short) + if: steps.lint_long.outcome == 'skipped' && env.GIT_DIFF run: | make lint + env: + GIT_DIFF: ${{ env.GIT_DIFF }} + LINT_DIFF: 1 diff --git a/.github/workflows/many.yml b/.github/workflows/many.yml new file mode 100644 index 000000000000..21f8a3cb2e7f --- /dev/null +++ b/.github/workflows/many.yml @@ -0,0 +1,38 @@ +# runs tests in a plain environment, many times +on: + push: + branches: + - main + pull_request: + name: Test + jobs: + test-nocache: + continue-on-error: true + strategy: + matrix: + go-version: [1.23.x] + os: [ubuntu-latest, macos-latest] + repeat: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-version }} + cache: false + - run: go test ./... + + test-cache: + continue-on-error: true + strategy: + matrix: + go-version: [1.23.x] + os: [ubuntu-latest, macos-latest] + repeat: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-version }} + - run: go test ./... \ No newline at end of file diff --git a/.github/workflows/md-link-checker.yml b/.github/workflows/md-link-checker.yml index 23749b51c0a0..38560ea8c80c 100644 --- a/.github/workflows/md-link-checker.yml +++ b/.github/workflows/md-link-checker.yml @@ -1,12 +1,15 @@ name: Check Markdown links on: - schedule: - - cron: '* */24 * * *' + pull_request: + paths: + - "docs/**" jobs: markdown-link-check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - run: cd docs && sh ./pre.sh - uses: gaurav-nelson/github-action-markdown-link-check@1.0.15 with: folder-path: "docs" + - run: cd docs && sh ./post.sh diff --git a/.github/workflows/pr-reviews.yml b/.github/workflows/pr-reviews.yml deleted file mode 100644 index 4ed750ee1a4c..000000000000 --- a/.github/workflows/pr-reviews.yml +++ /dev/null @@ -1,26 +0,0 @@ -# Request review on PRs without changing our codeowners file (which is stricter than review team) -name: Request review on PRs - -on: - pull_request_target: - types: - - opened - - reopened - - ready_for_review - branches: - - "main" - - "release/**" - -jobs: - request: - permissions: - pull-requests: write - name: Request reviews on opened PRs - runs-on: ubuntu-latest - steps: - - name: Create PR review request - if: ${{ !github.event.pull_request.draft }} - run: gh pr edit $PR_URL --add-reviewer @cosmos/sdk-core-review - env: - GH_TOKEN: ${{ secrets.PRBOT_PAT }} - PR_URL: ${{ github.event.pull_request.html_url }} diff --git a/.github/workflows/pr_labeler.yml b/.github/workflows/pr_labeler.yml index 885d8b47dbf6..b038490da237 100644 --- a/.github/workflows/pr_labeler.yml +++ b/.github/workflows/pr_labeler.yml @@ -12,7 +12,7 @@ jobs: pull-requests: write # for actions/labeler to add labels to PRs runs-on: ubuntu-latest steps: - - uses: actions/labeler@main + - uses: actions/labeler@v4 # v5 is broken, ref https://github.com/actions/labeler/issues/712. Do not bump. with: configuration-path: .github/pr_labeler.yml repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/release-confix.yml b/.github/workflows/release-confix.yml index 9cf6a9ae548d..2831f1aab19f 100644 --- a/.github/workflows/release-confix.yml +++ b/.github/workflows/release-confix.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true # get 'v*.*.*' part from 'confix/v*.*.*' and save to $GITHUB_ENV - name: Set env diff --git a/.github/workflows/release-cosmovisor.yml b/.github/workflows/release-cosmovisor.yml index ba55871311d9..76c31e08e7b7 100644 --- a/.github/workflows/release-cosmovisor.yml +++ b/.github/workflows/release-cosmovisor.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true # get 'v*.*.*' part from 'cosmovisor/v*.*.*' and save to $GITHUB_ENV - name: Set env diff --git a/.github/workflows/release-rosetta.yml b/.github/workflows/release-rosetta.yml deleted file mode 100644 index 002976f3324e..000000000000 --- a/.github/workflows/release-rosetta.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Release Rosetta - -on: - push: - tags: - - "tools/rosetta/v*.*.*" -permissions: - contents: read - -jobs: - goreleaser: - permissions: - contents: write # for goreleaser/goreleaser-action to create a GitHub release - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: "1.20" - check-latest: true - # get 'v*.*.*' part from 'rosetta/v*.*.*' and save to $GITHUB_ENV - - name: Set env - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/rosetta/}" >> $GITHUB_ENV - # remove the possible pre-existing same tag for cosmos-sdk related tags instead of rosetta tags - # Because goreleaser enforces semantic versioning and will error on non compliant tags.(https://goreleaser.com/limitations/semver/) - - name: Tag without prefix locally to avoid error in goreleaser - run: |- - git tag -d ${{ env.RELEASE_VERSION }} || echo "No such a tag exists before" - git tag ${{ env.RELEASE_VERSION }} HEAD - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v3 - 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 --release-notes ./RELEASE_NOTES.md - workdir: tools/rosetta - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GORELEASER_CURRENT_TAG: rosetta/${{ env.RELEASE_VERSION }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 10619caa7043..24e54b10dc26 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,18 +16,18 @@ jobs: contents: write # for goreleaser/goreleaser-action to create a GitHub release runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Go uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - name: Unshallow run: git fetch --prune --unshallow - name: Create release uses: goreleaser/goreleaser-action@v3 with: - args: release --rm-dist --release-notes ./RELEASE_NOTES.md + args: release --clean --release-notes ./RELEASE_NOTES.md env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Notify Slack on success - uses: rtCamp/action-slack-notify@v2.2.0 + uses: rtCamp/action-slack-notify@v2.2.1 env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} SLACK_CHANNEL: cosmos-tech diff --git a/.github/workflows/sims-045.yml b/.github/workflows/sims-045.yml index f1638c67f6ff..c0761e3a46c7 100644 --- a/.github/workflows/sims-045.yml +++ b/.github/workflows/sims-045.yml @@ -21,7 +21,7 @@ jobs: ref: "release/v0.45.x" - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - run: make build @@ -33,7 +33,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - name: Install runsim run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0 @@ -51,7 +51,7 @@ jobs: ref: "release/v0.45.x" - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - uses: actions/cache@v3 with: @@ -70,7 +70,7 @@ jobs: ref: "release/v0.45.x" - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - uses: actions/cache@v3 with: @@ -90,7 +90,7 @@ jobs: ref: "release/v0.45.x" - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - uses: actions/cache@v3 with: diff --git a/.github/workflows/sims-046.yml b/.github/workflows/sims-046.yml index cbc0fead882d..d344fe31dabb 100644 --- a/.github/workflows/sims-046.yml +++ b/.github/workflows/sims-046.yml @@ -21,7 +21,7 @@ jobs: ref: "release/v0.46.x" - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - run: make build @@ -33,7 +33,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - name: Install runsim run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0 @@ -52,7 +52,7 @@ jobs: ref: "release/v0.46.x" - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - uses: actions/cache@v3 with: @@ -71,7 +71,7 @@ jobs: ref: "release/v0.46.x" - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - uses: actions/cache@v3 with: @@ -90,7 +90,7 @@ jobs: ref: "release/v0.46.x" - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - uses: actions/cache@v3 with: diff --git a/.github/workflows/sims-047.yml b/.github/workflows/sims-047.yml index cc19982df934..c1798be36857 100644 --- a/.github/workflows/sims-047.yml +++ b/.github/workflows/sims-047.yml @@ -21,7 +21,7 @@ jobs: ref: "release/v0.47.x" - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - run: make build @@ -33,7 +33,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - name: Install runsim run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0 @@ -52,7 +52,7 @@ jobs: ref: "release/v0.47.x" - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - uses: actions/cache@v3 with: @@ -71,7 +71,7 @@ jobs: ref: "release/v0.47.x" - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - uses: actions/cache@v3 with: @@ -90,7 +90,7 @@ jobs: ref: "release/v0.47.x" - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - uses: actions/cache@v3 with: diff --git a/.github/workflows/sims-nightly.yml b/.github/workflows/sims-nightly.yml index 0a88662da665..5241516d2c2a 100644 --- a/.github/workflows/sims-nightly.yml +++ b/.github/workflows/sims-nightly.yml @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - name: Install runsim run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0 @@ -37,7 +37,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - uses: actions/cache@v3 with: diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 1c4bb1cb3a3c..972241bd0819 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - run: make build - name: Install runsim @@ -39,7 +39,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - uses: actions/cache@v3 with: @@ -56,7 +56,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - uses: actions/cache@v3 with: @@ -74,7 +74,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - uses: actions/cache@v3 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 92b0dc9b1d79..cf2fea549b2a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,7 @@ on: merge_group: push: branches: - - main + - release/v0.50.x permissions: contents: read @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - name: Create a file with all core Cosmos SDK pkgs run: go list ./... > pkgs.txt @@ -54,7 +54,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true cache: true cache-dependency-path: go.sum @@ -88,7 +88,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true cache: true cache-dependency-path: go.sum @@ -119,7 +119,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true cache: true cache-dependency-path: go.sum @@ -197,7 +197,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true cache: true cache-dependency-path: go.sum @@ -227,7 +227,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true cache: true cache-dependency-path: go.sum @@ -260,7 +260,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true cache: true cache-dependency-path: client/v2/go.sum @@ -413,7 +413,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true cache: true cache-dependency-path: simapp/go.sum @@ -434,50 +434,6 @@ jobs: run: | cd simapp go test -mod=readonly -timeout 30m -tags='app_v1 norace ledger test_ledger_mock rocksdb_build' ./... - - name: sonarcloud - if: ${{ env.GIT_DIFF && !github.event.pull_request.draft && env.SONAR_TOKEN != null }} - uses: SonarSource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - with: - projectBaseDir: simapp/ - - test-rosetta: - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: "1.20" - check-latest: true - cache: true - cache-dependency-path: tools/rosetta/go.sum - - uses: technote-space/get-diff-action@v6.1.2 - id: git_diff - with: - PATTERNS: | - contrib/rosetta/* - tools/rosetta/**/*.go - tools/rosetta/go.mod - tools/rosetta/go.sum - tools/rosetta/Makefile - Makefile - - name: tests - if: env.GIT_DIFF - run: | - make test-rosetta - cd tools/rosetta - go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./... - - name: sonarcloud - if: ${{ env.GIT_DIFF && !github.event.pull_request.draft && env.SONAR_TOKEN != null }} - uses: SonarSource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - with: - projectBaseDir: tools/rosetta/ test-collections: runs-on: ubuntu-latest @@ -485,7 +441,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true cache: true cache-dependency-path: collections/go.sum @@ -547,7 +503,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true cache: true cache-dependency-path: tools/cosmovisor/go.sum @@ -578,7 +534,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true cache: true cache-dependency-path: tools/confix/go.sum @@ -609,7 +565,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true cache: true cache-dependency-path: tools/hubl/go.sum @@ -709,7 +665,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true cache: true cache-dependency-path: x/tx/go.sum @@ -740,7 +696,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true cache: true cache-dependency-path: x/nft/go.sum @@ -771,7 +727,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true cache: true cache-dependency-path: x/circuit/go.sum @@ -802,7 +758,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true cache: true cache-dependency-path: x/feegrant/go.sum @@ -833,7 +789,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true cache: true cache-dependency-path: x/evidence/go.sum @@ -863,7 +819,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" check-latest: true cache: true cache-dependency-path: x/upgrade/go.sum @@ -887,3 +843,15 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} with: projectBaseDir: x/upgrade/ + + test-system: # no system tests in v0.50, set to match required job + runs-on: ubuntu-latest + steps: + - name: do nothing + run: echo "no system tests in v0.50" + + test-system-v2: # no system tests in v0.50, set to match required job + runs-on: ubuntu-latest + steps: + - name: do nothing + run: echo "no system tests in v0.50" diff --git a/.golangci.yml b/.golangci.yml index 7d7fca0fd8f1..3f61e47a961e 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,11 +1,16 @@ run: tests: true - timeout: 10m + timeout: 15m sort-results: true allow-parallel-runners: true exclude-dir: testutil/testdata skip-files: - server/grpc/gogoreflection/fix_registration.go + - "fix_registration.go" + - "x/bank/migrations/v4/gen_state_test.go" + - ".*\\.pb\\.go$" + - ".*\\.pb\\.gw\\.go$" + - ".*\\.pulsar\\.go$" linters: disable-all: true @@ -15,6 +20,7 @@ linters: - exportloopref - goconst - gocritic + - gci - gofumpt - gosec - gosimple @@ -53,11 +59,18 @@ issues: - text: "leading space" linters: - nolintlint - max-issues-per-linter: 10000 max-same-issues: 10000 linters-settings: + gci: + custom-order: true + sections: + - standard # Standard section: captures all standard packages. + - default # Default section: contains all imports that could not be matched to another section type. + - prefix(cosmossdk.io) + - prefix(github.com/cosmos/cosmos-sdk) + gosec: # To select a subset of rules to run. # Available rules: https://github.com/securego/gosec#available-rules @@ -102,7 +115,7 @@ linters-settings: gofumpt: extra-rules: true dogsled: - max-blank-identifiers: 5 + max-blank-identifiers: 6 maligned: suggest-new: true nolintlint: @@ -112,7 +125,6 @@ linters-settings: require-specific: false gosimple: checks: ["all"] - gocritic: disabled-checks: - regexpMust diff --git a/.goreleaser.yml b/.goreleaser.yml index 3cfcce33acde..69e368660846 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -24,4 +24,4 @@ snapshot: name_template: SNAPSHOT-{{ .Commit }} changelog: - skip: false + disable: false diff --git a/CHANGELOG.md b/CHANGELOG.md index b4be0b093e01..dab576bda071 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,2306 +40,547 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Features -* [#15970](https://github.com/cosmos/cosmos-sdk/pull/15970) Enable SIGN_MODE_TEXTUAL. -* (types) [#15958](https://github.com/cosmos/cosmos-sdk/pull/15958) Add `module.NewBasicManagerFromManager` for creating a basic module manager from a module manager. -* (runtime) [#15818](https://github.com/cosmos/cosmos-sdk/pull/15818) Provide logger through `depinject` instead of appBuilder. -* (client) [#15597](https://github.com/cosmos/cosmos-sdk/pull/15597) Add status endpoint for clients. -* (testutil/integration) [#15556](https://github.com/cosmos/cosmos-sdk/pull/15556) Introduce `testutil/integration` package for module integration testing. -* (types) [#15735](https://github.com/cosmos/cosmos-sdk/pull/15735) Make `ValidateBasic() error` method of `Msg` interface optional. Modules should validate messages directly in their message handlers ([RFC 001](https://docs.cosmos.network/main/rfc/rfc-001-tx-validation)). -* (x/genutil) [#15679](https://github.com/cosmos/cosmos-sdk/pull/15679) Allow applications to specify a custom genesis migration function for the `genesis migrate` command. -* (client) [#15458](https://github.com/cosmos/cosmos-sdk/pull/15458) Add a `CmdContext` field to client.Context initialized to cobra command's context. -* (core) [#15133](https://github.com/cosmos/cosmos-sdk/pull/15133) Implement RegisterServices in the module manager. -* (x/gov) [#14373](https://github.com/cosmos/cosmos-sdk/pull/14373) Add new proto field `constitution` of type `string` to gov module genesis state, which allows chain builders to lay a strong foundation by specifying purpose. -* (x/genutil) [#15301](https://github.com/cosmos/cosmos-sdk/pull/15031) Add application genesis. The genesis is now entirely managed by the application and passed to CometBFT at note instantiation. Functions that were taking a `cmttypes.GenesisDoc{}` now takes a `genutiltypes.AppGenesis{}`. -* (cli) [#14659](https://github.com/cosmos/cosmos-sdk/pull/14659) Added ability to query blocks by events with queries directly passed to Tendermint, which will allow for full query operator support, e.g. `>`. -* (x/gov) [#14720](https://github.com/cosmos/cosmos-sdk/pull/14720) Upstream expedited proposals from Osmosis. -* (x/auth) [#14650](https://github.com/cosmos/cosmos-sdk/pull/14650) Add Textual SignModeHandler. It is however **NOT** enabled by default, and should only be used for **TESTING** purposes until `SIGN_MODE_TEXTUAL` is fully released. -* (x/crisis) [#14588](https://github.com/cosmos/cosmos-sdk/pull/14588) Use CacheContext() in AssertInvariants() -* (client) [#14342](https://github.com/cosmos/cosmos-sdk/pull/14342) Add ` config` command is now a sub-command, for setting, getting and migrating Cosmos SDK configuration files. -* (query) [#14468](https://github.com/cosmos/cosmos-sdk/pull/14468) Implement pagination for collections. -* (x/distribution) [#14322](https://github.com/cosmos/cosmos-sdk/pull/14322) Introduce a new gRPC message handler, `DepositValidatorRewardsPool`, that allows explicit funding of a validator's reward pool. -* [#13473](https://github.com/cosmos/cosmos-sdk/pull/13473) ADR-038: Go plugin system proposal -* (mempool) [#14484](https://github.com/cosmos/cosmos-sdk/pull/14484) Add priority nonce mempool option for transaction replacement. -* (x/bank) [#14894](https://github.com/cosmos/cosmos-sdk/pull/14894) Return a human readable denomination for IBC vouchers when querying bank balances. Added a `ResolveDenom` parameter to `types.QueryAllBalancesRequest` and `--resolve-denom` flag to `GetBalancesCmd()`. -* (runtime) [#15547](https://github.com/cosmos/cosmos-sdk/pull/15547) Allow runtime to pass event core api service to modules -* (telemetry) [#15657](https://github.com/cosmos/cosmos-sdk/pull/15657) Emit more data (go version, sdk version, upgrade height) in prom metrics -* (types/module) [#15829](https://github.com/cosmos/cosmos-sdk/pull/15829) Add new endblocker interface to handle valset updates. -* (core) [#14860](https://github.com/cosmos/cosmos-sdk/pull/14860) Add `Precommit` and `PrepareCheckState` AppModule callbacks. -* (tx) [#15992](https://github.com/cosmos/cosmos-sdk/pull/15992) Add `WithExtensionOptions` in tx Factory to allow `SetExtensionOptions` with given extension options. -* (types/simulation) [#16074](https://github.com/cosmos/cosmos-sdk/pull/16074) Add generic SimulationStoreDecoder for modules using collections. -* (cli) [#16209](https://github.com/cosmos/cosmos-sdk/pull/16209) Make `StartCmd` more customizable. -* (types) [#16257](https://github.com/cosmos/cosmos-sdk/pull/16257) Allow setting the base denom in the denom registry. -* (x/group) [#16191](https://github.com/cosmos/cosmos-sdk/pull/16191) Add EventProposalPruned event to group module whenever a proposal is pruned. -* (genutil) [#16046](https://github.com/cosmos/cosmos-sdk/pull/16046) Add "module-name" flag to genutil add-genesis-account to enable intializing module accounts at genesis. - -### Improvements - -* (server) [#16395](https://github.com/cosmos/cosmos-sdk/pull/16395) Do not override some Comet config is purposely set differently in `InterceptConfigsPreRunHandler`. -* (types) [#16076](https://github.com/cosmos/cosmos-sdk/pull/16076) Optimize `ChainAnteDecorators`/`ChainPostDecorators` to instantiate the functions once instead of on every invocation of the returned `AnteHandler`/`PostHandler`. -* (client) [#16075](https://github.com/cosmos/cosmos-sdk/pull/16075) Partly revert [#15953](https://github.com/cosmos/cosmos-sdk/issues/15953) and `factory.Prepare` does nothing in offline mode. -* (server) [#16071](https://github.com/cosmos/cosmos-sdk/pull/16071) When `mempool.max-txs` is set to a negative value, use a no-op mempool (effectively disable the app mempool). -* (simapp) [#15958](https://github.com/cosmos/cosmos-sdk/pull/15958) Refactor SimApp for removing the global basic manager. -* (gov) [#15979](https://github.com/cosmos/cosmos-sdk/pull/15979) Improve gov error message when failing to convert v1 proposal to v1beta1. -* (crypto) [#3129](https://github.com/cosmos/cosmos-sdk/pull/3129) New armor and keyring key derivation uses aead and encryption uses chacha20poly -* (x/slashing) [#15580](https://github.com/cosmos/cosmos-sdk/pull/15580) Refactor the validator's missed block signing window to be a chunked bitmap instead of a "logical" bitmap, significantly reducing the storage footprint. -* (x/gov) [#15554](https://github.com/cosmos/cosmos-sdk/pull/15554) Add proposal result log in `active_proposal` event. When a proposal passes but fails to execute, the proposal result is logged in the `active_proposal` event. -* (mempool) [#15328](https://github.com/cosmos/cosmos-sdk/pull/15328) Improve the `PriorityNonceMempool` - * Support generic transaction prioritization, instead of `ctx.Priority()` - * Improve construction through the use of a single `PriorityNonceMempoolConfig` instead of option functions -* (x/authz) [#15164](https://github.com/cosmos/cosmos-sdk/pull/15164) Add `MsgCancelUnbondingDelegation` to staking authorization -* (server) [#15358](https://github.com/cosmos/cosmos-sdk/pull/15358) Add `server.InterceptConfigsAndCreateContext` as alternative to `server.InterceptConfigsPreRunHandler` which does not set the server context and the default SDK logger. -* [#15011](https://github.com/cosmos/cosmos-sdk/pull/15011) Introduce `cosmossdk.io/log` package to provide a consistent logging interface through the SDK. CometBFT logger is now replaced by `cosmossdk.io/log.Logger`. -* (x/auth) [#14758](https://github.com/cosmos/cosmos-sdk/pull/14758) Allow transaction event queries to directly passed to Tendermint, which will allow for full query operator support, e.g. `>`. -* (server) [#15041](https://github.com/cosmos/cosmos-sdk/pull/15041) Remove unnecessary sleeps from gRPC and API server initiation. The servers will start and accept requests as soon as they're ready. -* (x/staking) [#14864](https://github.com/cosmos/cosmos-sdk/pull/14864) `create-validator` CLI command now takes a json file as an arg instead of having a bunch of required flags to it. -* (cli) [#14659](https://github.com/cosmos/cosmos-sdk/pull/14659) Added ability to query blocks by either height/hash ` q block --type=height|hash `. -* (store) [#14410](https://github.com/cosmos/cosmos-sdk/pull/14410) `rootmulti.Store.loadVersion` has validation to check if all the module stores' height is correct, it will error if any module store has incorrect height. -* (x/evidence) [#14757](https://github.com/cosmos/cosmos-sdk/pull/14757) Evidence messages do not need to implement a `.Type()` anymore. -* (x/auth/tx) [#14751](https://github.com/cosmos/cosmos-sdk/pull/14751) Remove `.Type()` and `Route()` methods from all msgs and `legacytx.LegacyMsg` interface. -* [#14529](https://github.com/cosmos/cosmos-sdk/pull/14529) Add new property `BondDenom` to `SimulationState` struct. -* (module) [#14415](https://github.com/cosmos/cosmos-sdk/pull/14415) Loosen assertions in SetOrderBeginBlockers() and SetOrderEndBlockers() -* (context)[#14384](https://github.com/cosmos/cosmos-sdk/pull/14384) Refactor(context): Pass EventManager to the context as an interface. -* (types) [#14354](https://github.com/cosmos/cosmos-sdk/pull/14354) Improve performance on Context.KVStore and Context.TransientStore by 40%. -* (crypto/keyring) [#14151](https://github.com/cosmos/cosmos-sdk/pull/14151) Move keys presentation from `crypto/keyring` to `client/keys` -* (signing) [#14087](https://github.com/cosmos/cosmos-sdk/pull/14087) Add SignModeHandlerWithContext interface with a new `GetSignBytesWithContext` to get the sign bytes using `context.Context` as an argument to access state. -* (server) [#14062](https://github.com/cosmos/cosmos-sdk/pull/14062) Remove rosetta from server start. -* (baseapp) [#14417](https://github.com/cosmos/cosmos-sdk/pull/14417) `SetStreamingService` accepts appOptions, AppCodec and Storekeys needed to set streamers. - * Store pacakge no longer has a dependency on baseapp. -* (store) [#14438](https://github.com/cosmos/cosmos-sdk/pull/14438) Pass logger from baseapp to store. -* (store) [#14439](https://github.com/cosmos/cosmos-sdk/pull/14439) Remove global metric gatherer from store. - * By default store has a no op metric gatherer, the application developer must set another metric gatherer or us the provided one in `store/metrics`. -* [#14406](https://github.com/cosmos/cosmos-sdk/issues/14406) Migrate usage of types/store.go to store/types/.. -* (x/staking) [#14590](https://github.com/cosmos/cosmos-sdk/pull/14590) Return undelegate amount in MsgUndelegateResponse. -* (baseapp) [#15023](https://github.com/cosmos/cosmos-sdk/pull/15023) & [#15213](https://github.com/cosmos/cosmos-sdk/pull/15213) Add `MessageRouter` interface to baseapp and pass it to authz, gov and groups instead of concrete type. -* (x/consensus) [#15553](https://github.com/cosmos/cosmos-sdk/pull/15553) Migrate consensus module to use collections -* (store/cachekv) [#15767](https://github.com/cosmos/cosmos-sdk/pull/15767) Reduce peak RAM usage during and after InitGenesis -* (x/bank) [#15764](https://github.com/cosmos/cosmos-sdk/pull/15764) Speedup x/bank InitGenesis -* (x/auth) [#15867](https://github.com/cosmos/cosmos-sdk/pull/15867) Support better logging for signature verification failure. -* (types/query) [#16041](https://github.com/cosmos/cosmos-sdk/pull/16041) change pagination max limit to a variable in order to be modifed by application devs -* (server) [#16061](https://github.com/cosmos/cosmos-sdk/pull/16061) Add Comet bootstrap command. -* (x/staking) [#16068](https://github.com/cosmos/cosmos-sdk/pull/16068) Update simulation to allow non-EOA accounts to stake. -* (store) [#16067](https://github.com/cosmos/cosmos-sdk/pull/16067) Add local snapshots management commands. -* (server) [#16142](https://github.com/cosmos/cosmos-sdk/pull/16142) Remove JSON Indentation from the GRPC to REST gateway's responses. (Saving bandwidth) -* (baseapp) [#16193](https://github.com/cosmos/cosmos-sdk/pull/16193) Add `Close` method to `BaseApp` for custom app to cleanup resource in graceful shutdown. -* (server) [#16238](https://github.com/cosmos/cosmos-sdk/pull/16238) Don't setup p2p node keys if starting a node in GRPC only mode. - -### State Machine Breaking - -* (x/group,x/gov) [#16235](https://github.com/cosmos/cosmos-sdk/pull/16235) A group and gov proposal is rejected if the proposal metadata title and summary do not match the proposal title and summary. -* (x/staking) [#15701](https://github.com/cosmos/cosmos-sdk/pull/15701) The `HistoricalInfoKey` has been updated to use a binary format. -* (x/slashing) [#15580](https://github.com/cosmos/cosmos-sdk/pull/15580) The validator slashing window now stores "chunked" bitmap entries for each validator's signing window instead of a single boolean entry per signing window index. -* (x/feegrant) [#14294](https://github.com/cosmos/cosmos-sdk/pull/14294) Moved the logic of rejecting duplicate grant from `msg_server` to `keeper` method. -* (x/staking) [#14590](https://github.com/cosmos/cosmos-sdk/pull/14590) `MsgUndelegateResponse` now includes undelegated amount. `x/staking` module's `keeper.Undelegate` now returns 3 values (completionTime,undelegateAmount,error) instead of 2. -* (x/staking) (#15731) (https://github.com/cosmos/cosmos-sdk/pull/15731) Introducing a new index to retrieve the delegations by validator efficiently. -* (baseapp) [#15930](https://github.com/cosmos/cosmos-sdk/pull/15930) change vote info provided by prepare and process proposal to the one in the block - -### API Breaking Changes - -* (baseapp) [#15568](https://github.com/cosmos/cosmos-sdk/pull/15568) `SetIAVLLazyLoading` is removed from baseapp. -* (x/slashing) [#16246](https://github.com/cosmos/cosmos-sdk/issues/16246) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey`, and methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context` and return an `error`. `GetValidatorSigningInfo` now returns an error instead of a `found bool`, the error can be `nil` (found), `ErrNoSigningInfoFound` (not found) and any other error. -* (module) [#16227](https://github.com/cosmos/cosmos-sdk/issues/16227) `manager.RunMigrations()` now take a `context.Context` instead of a `sdk.Context`. -* (x/mint) [#16179](https://github.com/cosmos/cosmos-sdk/issues/16179) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey`, and methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context` and return an `error`. -* (x/crisis) [#16216](https://github.com/cosmos/cosmos-sdk/issues/16216) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey`, methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context` and return an `error` instead of panicking. -* (x/gov) [#15988](https://github.com/cosmos/cosmos-sdk/issues/15988) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey`, methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context` and return an `error` (instead of panicking or returning a `found bool`). Iterators callback functions now return an error instead of a `bool`. -* (x/auth) [#15985](https://github.com/cosmos/cosmos-sdk/pull/15985) The `AccountKeeper` does not expose the `QueryServer` and `MsgServer` APIs anymore. -* (x/authz) [#15962](https://github.com/cosmos/cosmos-sdk/issues/15962) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey`, methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context`. The `Authorization` interface's `Accept` method now takes a `context.Context` instead of a `sdk.Context`. -* (x/distribution) [#15948](https://github.com/cosmos/cosmos-sdk/issues/15948) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey` and methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context`. Keeper methods also now return an `error`. -* (x/bank) [#15891](https://github.com/cosmos/cosmos-sdk/issues/15891) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey` and methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context`. Also `FundAccount` and `FundModuleAccount` from the `testutil` package accept a `context.Context` instead of a `sdk.Context`, and it's position was moved to the first place. -* (x/bank) [#15818](https://github.com/cosmos/cosmos-sdk/issues/15818) `BaseViewKeeper`'s `Logger` method now doesn't require a context. `NewBaseKeeper`, `NewBaseSendKeeper` and `NewBaseViewKeeper` now also require a `log.Logger` to be passed in. -* (client) [#15597](https://github.com/cosmos/cosmos-sdk/pull/15597) `RegisterNodeService` now requires a config parameter. -* (x/*all*) [#15648](https://github.com/cosmos/cosmos-sdk/issues/15648) Make `SetParams` consistent across all modules and validate the params at the message handling instead of `SetParams` method. -* (x/genutil) [#15679](https://github.com/cosmos/cosmos-sdk/pull/15679) `MigrateGenesisCmd` now takes a `MigrationMap` instead of having the SDK genesis migration hardcoded. -* (client) [#15673](https://github.com/cosmos/cosmos-sdk/pull/15673) Move `client/keys.OutputFormatJSON` and `client/keys.OutputFormatText` to `client/flags` package. -* (x/nft) [#15588](https://github.com/cosmos/cosmos-sdk/pull/15588) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey` and methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context`. -* (x/auth) [#15520](https://github.com/cosmos/cosmos-sdk/pull/15520) `NewAccountKeeper` now takes a `KVStoreService` instead of a `StoreKey` and methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context`. -* (x/consensus) [#15517](https://github.com/cosmos/cosmos-sdk/pull/15517) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey`. -* (x/bank) [#15477](https://github.com/cosmos/cosmos-sdk/pull/15477) `banktypes.NewMsgMultiSend` and `keeper.InputOutputCoins` only accept one input. -* (mempool) [#15328](https://github.com/cosmos/cosmos-sdk/pull/15328) The `PriorityNonceMempool` is now generic over type `C comparable` and takes a single `PriorityNonceMempoolConfig[C]` argument. See `DefaultPriorityNonceMempoolConfig` for how to construct the configuration and a `TxPriority` type. -* (server) [#15358](https://github.com/cosmos/cosmos-sdk/pull/15358) Remove `server.ErrorCode` that was not used anywhere. -* [#15211](https://github.com/cosmos/cosmos-sdk/pull/15211) Remove usage of `github.com/cometbft/cometbft/libs/bytes.HexBytes` in favor of `[]byte` thorough the SDK. -* [#15011](https://github.com/cosmos/cosmos-sdk/pull/15011) All functions that were taking a CometBFT logger, now take `cosmossdk.io/log.Logger` instead. -* (x/auth) [#14758](https://github.com/cosmos/cosmos-sdk/pull/14758) Refactor transaction searching: - * Refactor `QueryTxsByEvents` to accept a `query` of type `string` instead of `events` of type `[]string` - * Pass `prove=false` to Tendermint's `TxSearch` RPC method - * Refactor CLI methods to accept `--query` flag instead of `--events` -* (server) [#15041](https://github.com/cosmos/cosmos-sdk/pull/15041) Refactor how gRPC and API servers are started to remove unnecessary sleeps: - * Remove `ServerStartTime` constant. - * Rename `WaitForQuitSignals` to `ListenForQuitSignals`. Note, this function is no longer blocking. Thus the caller is expected to provide a `context.CancelFunc` which indicates that when a signal is caught, that any spawned processes can gracefully exit. - * `api.Server#Start` now accepts a `context.Context`. The caller is responsible for ensuring that the context is canceled such that the API server can gracefully exit. The caller does not need to stop the server. - * To start the gRPC server you must first create the server via `NewGRPCServer`, after which you can start the gRPC server via `StartGRPCServer` which accepts a `context.Context`. The caller is responsible for ensuring that the context is canceled such that the gRPC server can gracefully exit. The caller does not need to stop the server. -* (types) [#15067](https://github.com/cosmos/cosmos-sdk/pull/15067) Remove deprecated alias from `types/errors`. Use `cosmossdk.io/errors` instead. -* (testutil) [#14991](https://github.com/cosmos/cosmos-sdk/pull/14991) The `testutil/testdata_pulsar` package has moved to `testutil/testdata/testpb`. -* (simapp) [#14977](https://github.com/cosmos/cosmos-sdk/pull/14977) Move simulation helpers functions (`AppStateFn` and `AppStateRandomizedFn`) to `testutil/sims`. These takes an extra genesisState argument which is the default state of the app. -* (x/gov) [#14720](https://github.com/cosmos/cosmos-sdk/pull/14720) Add an expedited field in the gov v1 proposal and `MsgNewMsgProposal`. -* [#14847](https://github.com/cosmos/cosmos-sdk/pull/14847) App and ModuleManager methods `InitGenesis`, `ExportGenesis`, `BeginBlock` and `EndBlock` now also return an error. -* (x/upgrade) [#14764](https://github.com/cosmos/cosmos-sdk/pull/14764) The `x/upgrade` module is extracted to have a separate go.mod file which allows it to be a standalone module. -* (store) [#14746](https://github.com/cosmos/cosmos-sdk/pull/14746) Extract Store in its own go.mod and rename the package to `cosmossdk.io/store`. -* (simulation) [#14751](https://github.com/cosmos/cosmos-sdk/pull/14751) Remove the `MsgType` field from `simulation.OperationInput` struct. -* (crypto/keyring) [#13734](https://github.com/cosmos/cosmos-sdk/pull/13834) The keyring's `Sign` method now takes a new `signMode` argument. It is only used if the signing key is a Ledger hardware device. You can set it to 0 in all other cases. -* (x/evidence) [14724](https://github.com/cosmos/cosmos-sdk/pull/14724) Extract Evidence in its own go.mod and rename the package to `cosmossdk.io/x/evidence`. -* (x/nft) [#14725](https://github.com/cosmos/cosmos-sdk/pull/14725) Extract NFT in its own go.mod and rename the package to `cosmossdk.io/x/nft`. -* (tx) [#14634](https://github.com/cosmos/cosmos-sdk/pull/14634) Move the `tx` go module to `x/tx`. -* (snapshots) [#14597](https://github.com/cosmos/cosmos-sdk/pull/14597) Move `snapshots` to `store/snapshots`, rename and bump proto package to v1. -* (crypto/keyring) [#14151](https://github.com/cosmos/cosmos-sdk/pull/14151) Move keys presentation from `crypto/keyring` to `client/keys` -* (modules) [#13850](https://github.com/cosmos/cosmos-sdk/pull/13850) and [#14046](https://github.com/cosmos/cosmos-sdk/pull/14046) Remove gogoproto stringer annotations. This removes the custom `String()` methods on all types that were using the annotations. -* (x/auth) [#13850](https://github.com/cosmos/cosmos-sdk/pull/13850/) Remove `MarshalYAML` methods from module (`x/...`) types. -* (store) [#11825](https://github.com/cosmos/cosmos-sdk/pull/11825) Make extension snapshotter interface safer to use, renamed the util function `WriteExtensionItem` to `WriteExtensionPayload`. -* (signing) [#13701](https://github.com/cosmos/cosmos-sdk/pull/) Add `context.Context` as an argument `x/auth/signing.VerifySignature`. -* (snapshots) [14048](https://github.com/cosmos/cosmos-sdk/pull/14048) Move the Snapshot package to the store package. This is done in an effort group all storage related logic under one package. -* (baseapp) [#14050](https://github.com/cosmos/cosmos-sdk/pull/14050) Refactor `ABCIListener` interface to accept Go contexts. -* (store/streaming)[#14603](https://github.com/cosmos/cosmos-sdk/pull/14603) `StoreDecoderRegistry` moved from store to `types/simulations` this breaks the `AppModuleSimulation` interface. -* (x/staking) [#14590](https://github.com/cosmos/cosmos-sdk/pull/14590) `MsgUndelegateResponse` now includes undelegated amount. `x/staking` module's `keeper.Undelegate` now returns 3 values (completionTime,undelegateAmount,error) instead of 2. -* (x/feegrant) [#14649](https://github.com/cosmos/cosmos-sdk/pull/14649) Extract Feegrant in its own go.mod and rename the package to `cosmossdk.io/x/feegrant`. -* (x/bank) [#14894](https://github.com/cosmos/cosmos-sdk/pull/14894) Allow a human readable denomination for coins when querying bank balances. Added a `ResolveDenom` parameter to `types.QueryAllBalancesRequest`. -* (crypto) [#15070](https://github.com/cosmos/cosmos-sdk/pull/15070) `GenerateFromPassword` and `Cost` from `bcrypt.go` now take a `uint32` instead of a `int` type. -* (x/capability) [#15344](https://github.com/cosmos/cosmos-sdk/pull/15344) Capability module was removed and is now housed in [IBC-GO](https://github.com/cosmos/ibc-go). -* [#15299](https://github.com/cosmos/cosmos-sdk/pull/15299) Remove `StdTx` transaction and signing APIs. No SDK version has actually supported `StdTx` since before Stargate. -* (codec) [#15600](https://github.com/cosmos/cosmos-sdk/pull/15600) [#15873](https://github.com/cosmos/cosmos-sdk/pull/15873) add support for getting signers to `codec.Codec` and `InterfaceRegistry`: - * `Codec` has new methods `InterfaceRegistry`, `GetMsgAnySigners`, `GetMsgV1Signers`, and `GetMsgV2Signers` as well as unexported methods. All implementations of `Codec` by other users must now embed an official implementation from the `codec` package. - * `InterfaceRegistry` is has unexported methods and implements `protodesc.Resolver` plus the `RangeFiles` and `SigningContext` methods. All implementations of `InterfaceRegistry` by other users must now embed the official implementation. - * `AminoCodec` is marked as deprecated and no longer implements `Codec. -* (x/crisis) [#15852](https://github.com/cosmos/cosmos-sdk/pull/15852) Crisis keeper now takes a instance of the address codec to be able to decode user addresses -* (x/slashing) [#15875](https://github.com/cosmos/cosmos-sdk/pull/15875) `x/slashing.NewAppModule` now requires an `InterfaceRegistry` parameter. -* (client) [#15822](https://github.com/cosmos/cosmos-sdk/pull/15822) The return type of the interface method `TxConfig.SignModeHandler` has been changed to `x/tx/signing.HandlerMap`. -* (x/auth) [#15822](https://github.com/cosmos/cosmos-sdk/pull/15822) The type of struct field `ante.HandlerOptions.SignModeHandler` has been changed to `x/tx/signing.HandlerMap`. - * The signature of `NewSigVerificationDecorator` has been changed to accept a `x/tx/signing.HandlerMap`. - * The signature of `VerifySignature` has been changed to accept a `x/tx/signing.HandlerMap` and other structs from `x/tx` as arguments. - * The signature of `NewTxConfigWithTextual` has been deprecated and its signature changed to accept a `SignModeOptions`. -* (x/bank) [#15567](https://github.com/cosmos/cosmos-sdk/pull/15567) `GenesisBalance.GetAddress` now returns a string instead of `sdk.AccAddress` - * `MsgSendExec` test helper function now takes a address.Codec -* (x/genutil) [#15567](https://github.com/cosmos/cosmos-sdk/pull/15567) `CollectGenTxsCmd` & `GenTxCmd` takes a address.Codec to be able to decode addresses -* (x/genutil) [#15999](https://github.com/cosmos/cosmos-sdk/pull/15999) Genutil now takes the `GenesisTxHanlder` interface instead of deliverTx. The interface is implemented on baseapp -* (types/math) [#16040](https://github.com/cosmos/cosmos-sdk/pull/16040) Remove unused aliases in math.go -* (x/gov) [#16106](https://github.com/cosmos/cosmos-sdk/pull/16106) Remove gRPC query methods from Keeper -* (x/gov) [#16118](https://github.com/cosmos/cosmos-sdk/pull/16118/) Use collections for constituion and params state management. -* (x/gov) [#16127](https://github.com/cosmos/cosmos-sdk/pull/16127) Use collections for deposit state management: - * The following methods are removed from the gov keeper: `GetDeposit`, `GetAllDeposits`, `IterateAllDeposits`. - * The following functions are removed from the gov types: `DepositKey`, `DepositsKey`. -* (x/gov) [#16164](https://github.com/cosmos/cosmos-sdk/pull/16164) Use collections for vote state management: - * Removed: types `VoteKey`, `VoteKeys` - * Removed: keeper `IterateVotes`, `IterateAllVotes`, `GetVotes`, `GetVote`, `SetVote` -* (x/gov) [#16171](https://github.com/cosmos/cosmos-sdk/pull/16171) Use collections for proposal state management (part 1): - * Removed: keeper: `GetProposal`, `UnmarshalProposal`, `MarshalProposal`, `IterateProposal`, `GetProposal`, `GetProposalFiltered`, `GetProposals`, `GetProposalID`, `SetProposalID` - * Remove: errors unused errors -* (sims) [#16155](https://github.com/cosmos/cosmos-sdk/pull/16155) - * `simulation.NewOperationMsg` now marshals the operation msg as proto bytes instead of legacy amino JSON bytes. - * `simulation.NewOperationMsg` is now 2-arity instead of 3-arity with the obsolete argument `codec.ProtoCodec` removed. - * The field `OperationMsg.Msg` is now of type `[]byte` instead of `json.RawMessage`. -* (cli) [#16209](https://github.com/cosmos/cosmos-sdk/pull/16209) Add API `StartCmdWithOptions` to create customized start command. -* (x/auth) [#16016](https://github.com/cosmos/cosmos-sdk/pull/16016) Use collections for accounts state management: - * removed: keeper `HasAccountByID`, `AccountAddressByID`, `SetParams -* (x/distribution) [#16211](https://github.com/cosmos/cosmos-sdk/pull/16211) Use collections for params state management. -* [#15284](https://github.com/cosmos/cosmos-sdk/pull/15284) - * `sdk.Msg.GetSigners` was deprecated and is no longer supported. Use the `cosmos.msg.v1.signer` protobuf annotation instead. - * `sdk.Tx` now requires a new method `GetMsgsV2()`. - * `types/tx.Tx` no longer implements `sdk.Tx`. - * `TxConfig` has a new method `SigningContext() *signing.Context`. - * `AccountKeeper` now has an `AddressCodec() address.Codec` method and the expected `AccountKeeper` for `x/auth/ante` expects this method. - * `SigVerifiableTx.GetSigners()` now returns `([][]byte, error)` instead of `[]sdk.AccAddress`. -* (x/authx) [#15284](https://github.com/cosmos/cosmos-sdk/pull/15284) `NewKeeper` now requires `codec.Codec`. -* (x/gov) [#15284](https://github.com/cosmos/cosmos-sdk/pull/15284) `NewKeeper` now requires `codec.Codec`. -* (x/distribution) [#16302](https://github.com/cosmos/cosmos-sdk/pull/16302) Use collections for FeePool state management. - * removed: keeper `GetFeePool`, `SetFeePool`, `GetFeePoolCommunityCoins` - -* (x/gov) [#16268](https://github.com/cosmos/cosmos-sdk/pull/16268) Use collections for proposal state management (part 2): - * this finalizes the gov collections migration - * Removed: keeper `InsertActiveProposalsQueue`, `RemoveActiveProposalsQueue`, `InsertInactiveProposalsQueue`, `RemoveInactiveProposalsQueue`, `IterateInactiveProposalsQueue`, `IterateActiveProposalsQueue`, `ActiveProposalsQueueIterator`, `InactiveProposalsQueueIterator` - * Remove: types all the key related functions -* (x/crisis) [#16328](https://github.com/cosmos/cosmos-sdk/pull/16328) Use collections for state management: - * Removed: keeper `GetConstantFee`, `SetConstantFee` -* (x/mint) [#16329](https://github.com/cosmos/cosmos-sdk/pull/16329) Use collections for state management: - * Removed: keeper `GetParams`, `SetParams`, `GetMinter`, `SetMinter`. -* (x/*all*) [#16052](https://github.com/cosmos/cosmos-sdk/pull/16062) `GetSignBytes` implementations on messages and global legacy amino codec definitions have been removed from all modules. -* (sims) [#16052](https://github.com/cosmos/cosmos-sdk/pull/16062) `GetOrGenerate` no longer requires a codec argument is now 4-arity instead of 5-arity. -* (baseapp) [#16342](https://github.com/cosmos/cosmos-sdk/pull/16342) NewContext was renamed to NewContextLegacy. The replacement (NewContext) now does not take a header, instead you should set the header via `WithHeaderInfo` or `WithBlockHeight`. Note that `WithBlockHeight` will soon be depreacted and its recommneded to use `WithHeaderInfo` -* (x/auth) [#16112](https://github.com/cosmos/cosmos-sdk/issues/16112) `helpers.AddGenesisAccount` has been moved to `x/genutil` to remove the cyclic dependency between `x/auth` and `x/genutil`. - -### Client Breaking Changes - -* (x/staking) [#15701](https://github.com/cosmos/cosmos-sdk/pull/15701) `HistoricalInfoKey` now has a binary format. -* (grpc-web) [#14652](https://github.com/cosmos/cosmos-sdk/pull/14652) Use same port for gRPC-Web and the API server. -* (abci) [#15845](https://github.com/cosmos/cosmos-sdk/pull/15845) Add `msg_index` to all event attributes to associate events and messages -* (abci) [#15845](https://github.com/cosmos/cosmos-sdk/pull/15845) Remove duplicating events in `logs` - -### CLI Breaking Changes - -* (cli) [#15826](https://github.com/cosmos/cosmos-sdk/pull/15826) Remove ` q account` command. Use ` q auth account` instead. -* (x/staking) [#14864](https://github.com/cosmos/cosmos-sdk/pull/14864) `create-validator` CLI command now takes a json file as an arg instead of having a bunch of required flags to it. -* (cli) [#14659](https://github.com/cosmos/cosmos-sdk/pull/14659) ` q block ` is removed as it just output json. The new command allows either height/hash and is ` q block --type=height|hash `. -* (x/gov) [#14880](https://github.com/cosmos/cosmos-sdk/pull/14880) Remove ` tx gov submit-legacy-proposal cancel-software-upgrade` and `software-upgrade` commands. These commands are now in the `x/upgrade` module and using gov v1. Use `tx upgrade software-upgrade` instead. -* (grpc-web) [#14652](https://github.com/cosmos/cosmos-sdk/pull/14652) Remove `grpc-web.address` flag. -* (client) [#14342](https://github.com/cosmos/cosmos-sdk/pull/14342) ` config` command is now a sub-command. Use ` config --help` to learn more. -* (cli) [#15299](https://github.com/cosmos/cosmos-sdk/pull/15299) Remove `--amino` flag from `sign` and `multi-sign` commands. Amino `StdTx` has been deprecated for a while. Amino JSON signing still works as expected. - -### Bug Fixes - -* (cli) [#16312](https://github.com/cosmos/cosmos-sdk/pull/16312) Allow any addresses in `client.ValidatePromptAddress`. -* (baseapp) [#16259](https://github.com/cosmos/cosmos-sdk/pull/16259) Ensure the `Context` block height is correct after `InitChain` and prior to the second block. -* (x/staking) [#16043](https://github.com/cosmos/cosmos-sdk/pull/16043) Call `AfterUnbondingInitiated` hook for new unbonding entries only and fix `UnbondingDelegation` entries handling -* (types) [#16010](https://github.com/cosmos/cosmos-sdk/pull/16010) Let `module.CoreAppModuleBasicAdaptor` fallback to legacy genesis handling. -* (x/group) [#16017](https://github.com/cosmos/cosmos-sdk/pull/16017) Correctly apply account number in group v2 migration. -* (types) [#15691](https://github.com/cosmos/cosmos-sdk/pull/15691) Make `Coin.Validate()` check that `.Amount` is not nil. -* (x/auth) [#15059](https://github.com/cosmos/cosmos-sdk/pull/15059) `ante.CountSubKeys` returns 0 when passing a nil `Pubkey`. -* (x/capability) [#15030](https://github.com/cosmos/cosmos-sdk/pull/15030) Prevent `x/capability` from consuming `GasMeter` gas during `InitMemStore` -* (types/coin) [#14739](https://github.com/cosmos/cosmos-sdk/pull/14739) Deprecate the method `Coin.IsEqual` in favour of `Coin.Equal`. The difference between the two methods is that the first one results in a panic when denoms are not equal. This panic lead to unexpected behavior -* (x/crypto) [#15258](https://github.com/cosmos/cosmos-sdk/pull/15258) Write keyhash file with permissions 0600 instead of 0555. -* (cli) [#16138](https://github.com/cosmos/cosmos-sdk/pull/16138) Fix snapshot commands panic if snapshot don't exists. -* (types) [#16145](https://github.com/cosmos/cosmos-sdk/pull/16145) Rename interface `ExtensionOptionI` back to `TxExtensionOptionI` to avoid breaking change. -* (x/gov) [#16230](https://github.com/cosmos/cosmos-sdk/pull/16231) Fix: rawlog JSON formatting of proposal_vote option field - -### Deprecated - -* (x/staking) [#14567](https://github.com/cosmos/cosmos-sdk/pull/14567) The `delegator_address` field of `MsgCreateValidator` has been deprecated. - The validator address bytes and delegator address bytes refer to the same account while creating validator (defer only in bech32 notation). - -## [v0.47.2](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.2) - 2023-04-27 - -### Improvements - -* (x/evidence) [#15908](https://github.com/cosmos/cosmos-sdk/pull/15908) Update the equivocation handler to work with ICS by removing a pubkey check that was performing a no-op for consumer chains. -* (x/slashing) [#15908](https://github.com/cosmos/cosmos-sdk/pull/15908) Remove the validators' pubkey check in the signature handler in order to work with ICS. -* (deps) [#15957](https://github.com/cosmos/cosmos-sdk/pull/15957) Bump CometBFT to [v0.37.1](https://github.com/cometbft/cometbft/blob/v0.37.1/CHANGELOG.md#v0371). -* (store) [#15683](https://github.com/cosmos/cosmos-sdk/pull/15683) `rootmulti.Store.CacheMultiStoreWithVersion` now can handle loading archival states that don't persist any of the module stores the current state has. -* [#15448](https://github.com/cosmos/cosmos-sdk/pull/15448) Automatically populate the block timestamp for historical queries. In contexts where the block timestamp is needed for previous states, the timestamp will now be set. Note, when querying against a node it must be re-synced in order to be able to automatically populate the block timestamp. Otherwise, the block timestamp will be populated for heights going forward once upgraded. -* [#14019](https://github.com/cosmos/cosmos-sdk/issues/14019) Remove the interface casting to allow other implementations of a `CommitMultiStore`. -* (simtestutil) [#15903](https://github.com/cosmos/cosmos-sdk/pull/15903) Add `AppStateFnWithExtendedCbs` with moduleStateCb callback function to allow access moduleState. - -### Bug Fixes - -* (baseapp) [#15789](https://github.com/cosmos/cosmos-sdk/pull/15789) Ensure `PrepareProposal` and `ProcessProposal` respect `InitialHeight` set by CometBFT when set to a value greater than 1. -* (types) [#15433](https://github.com/cosmos/cosmos-sdk/pull/15433) Allow disabling of account address caches (for printing bech32 account addresses). -* (client/keys) [#15876](https://github.com/cosmos/cosmos-sdk/pull/15876) Fix the JSON output ` keys list --output json` when there are no keys. - -## [v0.47.1](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.1) - 2023-03-23 - -### Features - -* (x/bank) [#15265](https://github.com/cosmos/cosmos-sdk/pull/15265) Update keeper interface to include `GetAllDenomMetaData`. -* (x/groups) [#14879](https://github.com/cosmos/cosmos-sdk/pull/14879) Add `Query/Groups` query to get all the groups. -* (x/gov,cli) [#14718](https://github.com/cosmos/cosmos-sdk/pull/14718) Added `AddGovPropFlagsToCmd` and `ReadGovPropFlags` functions. -* (cli) [#14655](https://github.com/cosmos/cosmos-sdk/pull/14655) Add a new command to list supported algos. -* (x/genutil,cli) [#15147](https://github.com/cosmos/cosmos-sdk/pull/15147) Add `--initial-height` flag to cli init cmd to provide `genesis.json` with user-defined initial block height. - -### Improvements - -* (x/distribution) [#15462](https://github.com/cosmos/cosmos-sdk/pull/15462) Add delegator address to the event for withdrawing delegation rewards. -* [#14609](https://github.com/cosmos/cosmos-sdk/pull/14609) Add `RetryForBlocks` method to use in tests that require waiting for a transaction to be included in a block. - -### Bug Fixes - -* (baseapp) [#15487](https://github.com/cosmos/cosmos-sdk/pull/15487) Reset state before calling PrepareProposal and ProcessProposal. -* (cli) [#15123](https://github.com/cosmos/cosmos-sdk/pull/15123) Fix the CLI `offline` mode behavior to be really offline. The API of `clienttx.NewFactoryCLI` is updated to return an error. - -### Deprecated - -* (x/genutil) [#15316](https://github.com/cosmos/cosmos-sdk/pull/15316) Remove requirement on node & IP being included in a gentx. - -## [v0.47.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.0) - 2023-03-14 - -### Features - -* (x/gov) [#15151](https://github.com/cosmos/cosmos-sdk/pull/15151) Add `burn_vote_quorum`, `burn_proposal_deposit_prevote` and `burn_vote_veto` params to allow applications to decide if they would like to burn deposits -* (client) [#14509](https://github.com/cosmos/cosmos-sdk/pull/#14509) Added `AddKeyringFlags` function. -* (x/bank) [#14045](https://github.com/cosmos/cosmos-sdk/pull/14045) Add CLI command `spendable-balances`, which also accepts the flag `--denom`. -* (x/slashing, x/staking) [#14363](https://github.com/cosmos/cosmos-sdk/pull/14363) Add the infraction a validator commited type as an argument to a `SlashWithInfractionReason` keeper method. -* (client) [#14051](https://github.com/cosmos/cosmos-sdk/pull/14051) Add `--grpc` client option. -* (x/genutil) [#14149](https://github.com/cosmos/cosmos-sdk/pull/14149) Add `genutilcli.GenesisCoreCommand` command, which contains all genesis-related sub-commands. -* (x/evidence) [#13740](https://github.com/cosmos/cosmos-sdk/pull/13740) Add new proto field `hash` of type `string` to `QueryEvidenceRequest` which helps to decode the hash properly while using query API. -* (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. -* (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. -* [#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. -* (testutil) [#12973](https://github.com/cosmos/cosmos-sdk/pull/12973) Add generic `testutil.RandSliceElem` function which selects a random element from the list. -* (client) [#12936](https://github.com/cosmos/cosmos-sdk/pull/12936) Add capability to preprocess transactions before broadcasting from a higher level chain. -* (cli) [#13064](https://github.com/cosmos/cosmos-sdk/pull/13064) Add `debug prefixes` to list supported HRP prefixes via . -* (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. -* (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. -* (client/tx) [#13670](https://github.com/cosmos/cosmos-sdk/pull/13670) Add validation in `BuildUnsignedTx` to prevent simple inclusion of valid mnemonics - -### Improvements - -* [#14995](https://github.com/cosmos/cosmos-sdk/pull/14995) Allow unknown fields in `ParseTypedEvent`. -* (store) [#14931](https://github.com/cosmos/cosmos-sdk/pull/14931) Exclude in-memory KVStores, i.e. `StoreTypeMemory`, from CommitInfo commitments. -* (cli) [#14919](https://github.com/cosmos/cosmos-sdk/pull/14919) Fix never assigned error when write validators. -* (x/group) [#14923](https://github.com/cosmos/cosmos-sdk/pull/14923) Fix error while using pagination in `x/group` from CLI. -* (types/coin) [#14715](https://github.com/cosmos/cosmos-sdk/pull/14715) `sdk.Coins.Add` now returns an empty set of coins `sdk.Coins{}` if both coins set are empty. - * This is a behavior change, as previously `sdk.Coins.Add` would return `nil` in this case. -* (reflection) [#14838](https://github.com/cosmos/cosmos-sdk/pull/14838) We now require that all proto files' import path (i.e. the OS path) matches their fully-qualified package name. For example, proto files with package name `cosmos.my.pkg.v1` should live in the folder `cosmos/my/pkg/v1/*.proto` relatively to the protoc import root folder (usually the root `proto/` folder). -* (baseapp) [#14505](https://github.com/cosmos/cosmos-sdk/pull/14505) PrepareProposal and ProcessProposal now use deliverState for the first block in order to access changes made in InitChain. -* (x/group) [#14527](https://github.com/cosmos/cosmos-sdk/pull/14527) Fix wrong address set in `EventUpdateGroupPolicy`. -* (cli) [#14509](https://github.com/cosmos/cosmos-sdk/pull/14509) Added missing options to keyring-backend flag usage. -* (server) [#14441](https://github.com/cosmos/cosmos-sdk/pull/14441) Fix `--log_format` flag not working. -* (ante) [#14448](https://github.com/cosmos/cosmos-sdk/pull/14448) Return anteEvents when postHandler fail. -* (baseapp) [#13983](https://github.com/cosmos/cosmos-sdk/pull/13983) Don't emit duplicate ante-handler events when a post-handler is defined. -* (x/staking) [#14064](https://github.com/cosmos/cosmos-sdk/pull/14064) Set all fields in `redelegation.String()`. -* (x/upgrade) [#13936](https://github.com/cosmos/cosmos-sdk/pull/13936) Make downgrade verification work again. -* (x/group) [#13742](https://github.com/cosmos/cosmos-sdk/pull/13742) Fix `validate-genesis` when group policy accounts exist. -* (store) [#13516](https://github.com/cosmos/cosmos-sdk/pull/13516) Fix state listener that was observing writes at wrong time. -* (simstestutil) [#15305](https://github.com/cosmos/cosmos-sdk/pull/15305) Add `AppStateFnWithExtendedCb` with callback function to extend rawState. -* (simapp) [#14977](https://github.com/cosmos/cosmos-sdk/pull/14977) Move simulation helpers functions (`AppStateFn` and `AppStateRandomizedFn`) to `testutil/sims`. These takes an extra genesisState argument which is the default state of the app. -* (cli) [#14953](https://github.com/cosmos/cosmos-sdk/pull/14953) Enable profiling block replay during abci handshake with `--cpu-profile`. -* (store) [#14410](https://github.com/cosmos/cosmos-sdk/pull/14410) `rootmulti.Store.loadVersion` has validation to check if all the module stores' height is correct, it will error if any module store has incorrect height. -* (store) [#14189](https://github.com/cosmos/cosmos-sdk/pull/14189) Add config `iavl-lazy-loading` to enable lazy loading of iavl store, to improve start up time of archive nodes, add method `SetLazyLoading` to `CommitMultiStore` interface. -* (deps) [#14830](https://github.com/cosmos/cosmos-sdk/pull/14830) Bump to IAVL `v0.19.5-rc.1`. -* (tools) [#14793](https://github.com/cosmos/cosmos-sdk/pull/14793) Dockerfile optimization. -* (x/gov) [#13010](https://github.com/cosmos/cosmos-sdk/pull/13010) Partial cherry-pick of this issue for adding proposer migration. -* [#14691](https://github.com/cosmos/cosmos-sdk/pull/14691) Change behavior of `sdk.StringifyEvents` to not flatten events attributes by events type. - * This change only affects ABCI message logs, and not the events field. -* [#14692](https://github.com/cosmos/cosmos-sdk/pull/14692) Improve RPC queries error message when app is at height 0. -* [#14017](https://github.com/cosmos/cosmos-sdk/pull/14017) Simplify ADR-028 and `address.Module`. - * This updates the [ADR-028](https://docs.cosmos.network/main/architecture/adr-028-public-key-addresses) and enhance the `address.Module` API to support module addresses and sub-module addresses in a backward compatible way. -* (snapshots) [#14608](https://github.com/cosmos/cosmos-sdk/pull/14608/) Deprecate unused structs `SnapshotKVItem` and `SnapshotSchema`. -* [#15243](https://github.com/cosmos/cosmos-sdk/pull/15243) `LatestBlockResponse` & `BlockByHeightResponse` types' field `sdk_block` was incorrectly cast `proposer_address` bytes to validator operator address, now to consensus address -* (x/group, x/gov) [#14483](https://github.com/cosmos/cosmos-sdk/pull/14483) Add support for `[]string` and `[]int` in `draft-proposal` prompt. -* (protobuf) [#14476](https://github.com/cosmos/cosmos-sdk/pull/14476) Clean up protobuf annotations `{accepts,implements}_interface`. -* (x/gov, x/group) [#14472](https://github.com/cosmos/cosmos-sdk/pull/14472) The recommended metadata format for x/gov and x/group proposals now uses an array of strings (instead of a single string) for the `authors` field. -* (crypto) [#14460](https://github.com/cosmos/cosmos-sdk/pull/14460) Check the signature returned by a ledger device against the public key in the keyring. -* [#14356](https://github.com/cosmos/cosmos-sdk/pull/14356) Add `events.GetAttributes` and `event.GetAttribute` methods to simplify the retrieval of an attribute from event(s). -* (types) [#14332](https://github.com/cosmos/cosmos-sdk/issues/14332) Reduce state export time by 50%. -* (types) [#14163](https://github.com/cosmos/cosmos-sdk/pull/14163) Refactor `(coins Coins) Validate()` to avoid unnecessary map. -* [#13881](https://github.com/cosmos/cosmos-sdk/pull/13881) Optimize iteration on nested cached KV stores and other operations in general. -* (x/gov) [#14347](https://github.com/cosmos/cosmos-sdk/pull/14347) Support `v1.Proposal` message in `v1beta1.Proposal.Content`. -* [#13882](https://github.com/cosmos/cosmos-sdk/pull/13882) Add tx `encode` and `decode` endpoints to amino tx service. - > Note: These endpoints encodes and decodes only amino txs. -* (config) [#13894](https://github.com/cosmos/cosmos-sdk/pull/13894) Support state streaming configuration in `app.toml` template and default configuration. -* (x/nft) [#13836](https://github.com/cosmos/cosmos-sdk/pull/13836) Remove the validation for `classID` and `nftID` from the NFT module. -* [#13789](https://github.com/cosmos/cosmos-sdk/pull/13789) Add tx `encode` and `decode` endpoints to tx service. - > Note: These endpoints will only encode and decode proto messages, Amino encoding and decoding is not supported. -* [#13619](https://github.com/cosmos/cosmos-sdk/pull/13619) Add new function called LogDeferred to report errors in defers. Use the function in x/bank files. -* (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. -* [#12952](https://github.com/cosmos/cosmos-sdk/pull/12952) Replace keyring module to Cosmos fork. -* [#12352](https://github.com/cosmos/cosmos-sdk/pull/12352) Move the `RegisterSwaggerAPI` logic into a separate helper function in the server package. -* [#12876](https://github.com/cosmos/cosmos-sdk/pull/12876) Remove proposer-based rewards. -* [#12846](https://github.com/cosmos/cosmos-sdk/pull/12846) Remove `RandomizedParams` from the `AppModuleSimulation` interface which is no longer needed. -* (ci) [#12854](https://github.com/cosmos/cosmos-sdk/pull/12854) Use ghcr.io to host the proto builder image. Update proto builder image to go 1.19 -* (x/bank) [#12706](https://github.com/cosmos/cosmos-sdk/pull/12706) Added the `chain-id` flag to the `AddTxFlagsToCmd` API. There is no longer a need to explicitly register this flag on commands whens `AddTxFlagsToCmd` is already called. -* [#12717](https://github.com/cosmos/cosmos-sdk/pull/12717) Use injected encoding params in simapp. -* [#12634](https://github.com/cosmos/cosmos-sdk/pull/12634) Move `sdk.Dec` to math package. -* [#12187](https://github.com/cosmos/cosmos-sdk/pull/12187) Add batch operation for x/nft module. -* [#12455](https://github.com/cosmos/cosmos-sdk/pull/12455) Show attempts count in error for signing. -* [#13101](https://github.com/cosmos/cosmos-sdk/pull/13101) Remove weights from `simapp/params` and `testutil/sims`. They are now in their respective modules. -* [#12398](https://github.com/cosmos/cosmos-sdk/issues/12398) Refactor all `x` modules to unit-test via mocks and decouple `simapp`. -* [#13144](https://github.com/cosmos/cosmos-sdk/pull/13144) Add validator distribution info grpc gateway get endpoint. -* [#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 -* [#13528](https://github.com/cosmos/cosmos-sdk/pull/13528) Update `ValidateMemoDecorator` to only check memo against `MaxMemoCharacters` param when a memo is present. -* [#13651](https://github.com/cosmos/cosmos-sdk/pull/13651) Update `server/config/config.GetConfig` function. -* [#13781](https://github.com/cosmos/cosmos-sdk/pull/13781) Remove `client/keys.KeysCdc`. -* [#13802](https://github.com/cosmos/cosmos-sdk/pull/13802) Add --output-document flag to the export CLI command to allow writing genesis state to a file. -* [#13794](https://github.com/cosmos/cosmos-sdk/pull/13794) `types/module.Manager` now supports the -`cosmossdk.io/core/appmodule.AppModule` API via the new `NewManagerFromMap` constructor. -* [#14175](https://github.com/cosmos/cosmos-sdk/pull/14175) Add `server.DefaultBaseappOptions(appopts)` function to reduce boiler plate in root.go. - -### State Machine Breaking - -* (baseapp, x/auth/posthandler) [#13940](https://github.com/cosmos/cosmos-sdk/pull/13940) Update `PostHandler` to receive the `runTx` success boolean. -* (store) [#14378](https://github.com/cosmos/cosmos-sdk/pull/14378) The `CacheKV` store is thread-safe again, which includes improved iteration and deletion logic. Iteration is on a strictly isolated view now, which is breaking from previous behavior. -* (x/bank) [#14538](https://github.com/cosmos/cosmos-sdk/pull/14538) Validate denom in bank balances GRPC queries. -* (x/group) [#14465](https://github.com/cosmos/cosmos-sdk/pull/14465) Add title and summary to proposal struct. -* (x/gov) [#14390](https://github.com/cosmos/cosmos-sdk/pull/14390) Add title, proposer and summary to proposal struct. -* (x/group) [#14071](https://github.com/cosmos/cosmos-sdk/pull/14071) Don't re-tally proposal after voting period end if they have been marked as ACCEPTED or REJECTED. -* (x/group) [#13742](https://github.com/cosmos/cosmos-sdk/pull/13742) Migrate group policy account from module accounts to base account. -* (x/auth)[#13780](https://github.com/cosmos/cosmos-sdk/pull/13780) `id` (type of int64) in `AccountAddressByID` grpc query is now deprecated, update to account-id(type of uint64) to use `AccountAddressByID`. -* (codec) [#13307](https://github.com/cosmos/cosmos-sdk/pull/13307) Register all modules' `Msg`s with group's ModuleCdc so that Amino sign bytes are correctly generated.* (x/gov) -* (codec) [#13196](https://github.com/cosmos/cosmos-sdk/pull/13196) Register all modules' `Msg`s with gov's ModuleCdc so that Amino sign bytes are correctly generated. -* (group) [#13592](https://github.com/cosmos/cosmos-sdk/pull/13592) Fix group types registration with Amino. -* (x/distribution) [#12852](https://github.com/cosmos/cosmos-sdk/pull/12852) Deprecate `CommunityPoolSpendProposal`. Please execute a `MsgCommunityPoolSpend` message via the new v1 `x/gov` module instead. This message can be used to directly fund the `x/gov` module account. -* (x/bank) [#12610](https://github.com/cosmos/cosmos-sdk/pull/12610) `MsgMultiSend` now allows only a single input. -* (x/bank) [#12630](https://github.com/cosmos/cosmos-sdk/pull/12630) Migrate `x/bank` to self-managed parameters and deprecate its usage of `x/params`. -* (x/auth) [#12475](https://github.com/cosmos/cosmos-sdk/pull/12475) Migrate `x/auth` to self-managed parameters and deprecate its usage of `x/params`. -* (x/slashing) [#12399](https://github.com/cosmos/cosmos-sdk/pull/12399) Migrate `x/slashing` to self-managed parameters and deprecate its usage of `x/params`. -* (x/mint) [#12363](https://github.com/cosmos/cosmos-sdk/pull/12363) Migrate `x/mint` to self-managed parameters and deprecate it's usage of `x/params`. -* (x/distribution) [#12434](https://github.com/cosmos/cosmos-sdk/pull/12434) Migrate `x/distribution` to self-managed parameters and deprecate it's usage of `x/params`. -* (x/crisis) [#12445](https://github.com/cosmos/cosmos-sdk/pull/12445) Migrate `x/crisis` to self-managed parameters and deprecate it's usage of `x/params`. -* (x/gov) [#12631](https://github.com/cosmos/cosmos-sdk/pull/12631) Migrate `x/gov` to self-managed parameters and deprecate it's usage of `x/params`. -* (x/staking) [#12409](https://github.com/cosmos/cosmos-sdk/pull/12409) Migrate `x/staking` to self-managed parameters and deprecate it's usage of `x/params`. -* (x/bank) [#11859](https://github.com/cosmos/cosmos-sdk/pull/11859) Move the SendEnabled information out of the Params and into the state store directly. -* (x/gov) [#12771](https://github.com/cosmos/cosmos-sdk/pull/12771) Initial deposit requirement for proposals at submission time. -* (x/staking) [#12967](https://github.com/cosmos/cosmos-sdk/pull/12967) `unbond` now creates only one unbonding delegation entry when multiple unbondings exist at a single height (e.g. through multiple messages in a transaction). -* (x/auth/vesting) [#13502](https://github.com/cosmos/cosmos-sdk/pull/13502) Add Amino Msg registration for `MsgCreatePeriodicVestingAccount`. - -### API Breaking Changes - -* Migrate to CometBFT. Follow the migration instructions in the [upgrade guide](./UPGRADING.md#migration-to-cometbft-part-1). -* (simulation) [#14728](https://github.com/cosmos/cosmos-sdk/pull/14728) Rename the `ParamChanges` field to `LegacyParamChange` and `Contents` to `LegacyProposalContents` in `simulation.SimulationState`. Additionally it adds a `ProposalMsgs` field to `simulation.SimulationState`. -* (x/gov) [#14782](https://github.com/cosmos/cosmos-sdk/pull/14782) Move the `metadata` argument in `govv1.NewProposal` alongside `title` and `summary`. -* (x/upgrade) [#14216](https://github.com/cosmos/cosmos-sdk/pull/14216) Change upgrade keeper receiver to upgrade keeper pointers. -* (x/auth) [#13780](https://github.com/cosmos/cosmos-sdk/pull/13780) Querying with `id` (type of int64) in `AccountAddressByID` grpc query now throws error, use account-id(type of uint64) instead. -* (store) [#13516](https://github.com/cosmos/cosmos-sdk/pull/13516) Update State Streaming APIs: - * Add method `ListenCommit` to `ABCIListener` - * Move `ListeningEnabled` and `AddListener` methods to `CommitMultiStore` - * Remove `CacheWrapWithListeners` from `CacheWrap` and `CacheWrapper` interfaces - * Remove listening APIs from the caching layer (it should only listen to the `rootmulti.Store`) - * Add three new options to file streaming service constructor. - * Modify `ABCIListener` such that any error from any method will always halt the app via `panic` -* (x/auth) [#13877](https://github.com/cosmos/cosmos-sdk/pull/13877) Rename `AccountKeeper`'s `GetNextAccountNumber` to `NextAccountNumber`. -* (x/evidence) [#13740](https://github.com/cosmos/cosmos-sdk/pull/13740) The `NewQueryEvidenceRequest` function now takes `hash` as a HEX encoded `string`. -* (server) [#13485](https://github.com/cosmos/cosmos-sdk/pull/13485) The `Application` service now requires the `RegisterNodeService` method to be implemented. -* [#13437](https://github.com/cosmos/cosmos-sdk/pull/13437) Add a list of modules to export argument in `ExportAppStateAndValidators`. -* (simapp) [#13402](https://github.com/cosmos/cosmos-sdk/pull/13402) Move simulation flags to `x/simulation/client/cli`. -* (simapp) [#13402](https://github.com/cosmos/cosmos-sdk/pull/13402) Move simulation helpers functions (`SetupSimulation`, `SimulationOperations`, `CheckExportSimulation`, `PrintStats`, `GetSimulationLog`) to `testutil/sims`. -* (simapp) [#13402](https://github.com/cosmos/cosmos-sdk/pull/13402) Move `testutil/rest` package to `testutil`. -* (types) [#13380](https://github.com/cosmos/cosmos-sdk/pull/13380) Remove deprecated `sdk.NewLevelDB`. -* (simapp) [#13378](https://github.com/cosmos/cosmos-sdk/pull/13378) Move `simapp.App` to `runtime.AppI`. -* (tx) [#12659](https://github.com/cosmos/cosmos-sdk/pull/12659) Remove broadcast mode `block`. -* (simapp) [#12747](https://github.com/cosmos/cosmos-sdk/pull/12747) Remove `simapp.MakeTestEncodingConfig`. Please use `moduletestutil.MakeTestEncodingConfig` (`types/module/testutil`) in tests instead. -* (x/bank) [#12648](https://github.com/cosmos/cosmos-sdk/pull/12648) `NewSendAuthorization` takes a new argument of an optional list of addresses allowed to receive bank assests via authz MsgSend grant. You can pass `nil` for the same behavior as before, i.e. any recipient is allowed. -* (x/bank) [#12593](https://github.com/cosmos/cosmos-sdk/pull/12593) Add `SpendableCoin` method to `BaseViewKeeper` -* (x/slashing) [#12581](https://github.com/cosmos/cosmos-sdk/pull/12581) Remove `x/slashing` legacy querier. -* (types) [#12355](https://github.com/cosmos/cosmos-sdk/pull/12355) Remove the compile-time `types.DBbackend` variable. Removes usage of the same in server/util.go -* (x/gov) [#12368](https://github.com/cosmos/cosmos-sdk/pull/12369) Gov keeper is now passed by reference instead of copy to make post-construction mutation of Hooks and Proposal Handlers possible at a framework level. -* (simapp) [#12270](https://github.com/cosmos/cosmos-sdk/pull/12270) Remove `invCheckPeriod uint` attribute from `SimApp` struct as per migration of `x/crisis` to app wiring -* (simapp) [#12334](https://github.com/cosmos/cosmos-sdk/pull/12334) Move `simapp.ConvertAddrsToValAddrs` and `simapp.CreateTestPubKeys ` to respectively `simtestutil.ConvertAddrsToValAddrs` and `simtestutil.CreateTestPubKeys` (`testutil/sims`) -* (simapp) [#12312](https://github.com/cosmos/cosmos-sdk/pull/12312) Move `simapp.EmptyAppOptions` to `simtestutil.EmptyAppOptions` (`testutil/sims`) -* (simapp) [#12312](https://github.com/cosmos/cosmos-sdk/pull/12312) Remove `skipUpgradeHeights map[int64]bool` and `homePath string` from `NewSimApp` constructor as per migration of `x/upgrade` to app-wiring. -* (testutil) [#12278](https://github.com/cosmos/cosmos-sdk/pull/12278) Move all functions from `simapp/helpers` to `testutil/sims` -* (testutil) [#12233](https://github.com/cosmos/cosmos-sdk/pull/12233) Move `simapp.TestAddr` to `simtestutil.TestAddr` (`testutil/sims`) -* (x/staking) [#12102](https://github.com/cosmos/cosmos-sdk/pull/12102) Staking keeper now is passed by reference instead of copy. Keeper's SetHooks no longer returns keeper. It updates the keeper in place instead. -* (linting) [#12141](https://github.com/cosmos/cosmos-sdk/pull/12141) Fix usability related linting for database. This means removing the infix Prefix from `prefix.NewPrefixWriter` and such so that it is `prefix.NewWriter` and making `db.DBConnection` and such into `db.Connection` -* (x/distribution) [#12434](https://github.com/cosmos/cosmos-sdk/pull/12434) `x/distribution` module `SetParams` keeper method definition is now updated to return `error`. -* (x/staking) [#12409](https://github.com/cosmos/cosmos-sdk/pull/12409) `x/staking` module `SetParams` keeper method definition is now updated to return `error`. -* (x/crisis) [#12445](https://github.com/cosmos/cosmos-sdk/pull/12445) `x/crisis` module `SetConstantFee` keeper method definition is now updated to return `error`. -* (x/gov) [#12631](https://github.com/cosmos/cosmos-sdk/pull/12631) `x/gov` module refactored to use `Params` as single struct instead of `DepositParams`, `TallyParams` & `VotingParams`. -* (x/gov) [#12631](https://github.com/cosmos/cosmos-sdk/pull/12631) Migrate `x/gov` to self-managed parameters and deprecate it's usage of `x/params`. -* (x/bank) [#12630](https://github.com/cosmos/cosmos-sdk/pull/12630) `x/bank` module `SetParams` keeper method definition is now updated to return `error`. -* (x/bank) [#11859](https://github.com/cosmos/cosmos-sdk/pull/11859) Move the SendEnabled information out of the Params and into the state store directly. - The information can now be accessed using the BankKeeper. - Setting can be done using MsgSetSendEnabled as a governance proposal. - A SendEnabled query has been added to both GRPC and CLI. -* (appModule) Remove `Route`, `QuerierRoute` and `LegacyQuerierHandler` from AppModule Interface. -* (x/modules) Remove all LegacyQueries and related code from modules -* (store) [#11825](https://github.com/cosmos/cosmos-sdk/pull/11825) Make extension snapshotter interface safer to use, renamed the util function `WriteExtensionItem` to `WriteExtensionPayload`. -* (x/genutil)[#12956](https://github.com/cosmos/cosmos-sdk/pull/12956) `genutil.AppModuleBasic` has a new attribute: genesis transaction validation function. The existing validation logic is implemented in `genutiltypes.DefaultMessageValidator`. Use `genutil.NewAppModuleBasic` to create a new genutil Module Basic. -* (codec) [#12964](https://github.com/cosmos/cosmos-sdk/pull/12964) `ProtoCodec.MarshalInterface` now returns an error when serializing unregistered types and a subsequent `ProtoCodec.UnmarshalInterface` would fail. -* (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` -* (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 package to be under store package -* [#13794](https://github.com/cosmos/cosmos-sdk/pull/13794) Most methods on `types/module.AppModule` have been moved to -extension interfaces. `module.Manager.Modules` is now of type `map[string]interface{}` to support in parallel the new -`cosmossdk.io/core/appmodule.AppModule` API. - -### CLI Breaking Changes - -* (genesis) [#14149](https://github.com/cosmos/cosmos-sdk/pull/14149) Add `simd genesis` command, which contains all genesis-related sub-commands. -* (x/genutil) [#13535](https://github.com/cosmos/cosmos-sdk/pull/13535) Replace in `simd init`, the `--staking-bond-denom` flag with `--default-denom` which is used for all default denomination in the genesis, instead of only staking. - -### Bug Fixes - -* (x/auth/vesting) [#15373](https://github.com/cosmos/cosmos-sdk/pull/15373) Add extra checks when creating a periodic vesting account. -* (x/auth) [#13838](https://github.com/cosmos/cosmos-sdk/pull/13838) Fix calling `String()` and `MarshalYAML` panics when pubkey is set on a `BaseAccount``. -* (x/evidence) [#13740](https://github.com/cosmos/cosmos-sdk/pull/13740) Fix evidence query API to decode the hash properly. -* (bank) [#13691](https://github.com/cosmos/cosmos-sdk/issues/13691) Fix unhandled error for vesting account transfers, when total vesting amount exceeds total balance. -* [#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. -* (types) [#12154](https://github.com/cosmos/cosmos-sdk/pull/12154) Add `baseAccountGetter` to avoid invalid account error when create vesting account. -* (x/staking) [#12303](https://github.com/cosmos/cosmos-sdk/pull/12303) Use bytes instead of string comparison in delete validator queue -* (store/rootmulti) [#12487](https://github.com/cosmos/cosmos-sdk/pull/12487) Fix non-deterministic map iteration. -* (sdk/dec_coins) [#12903](https://github.com/cosmos/cosmos-sdk/pull/12903) Fix nil `DecCoin` creation when converting `Coins` to `DecCoins` -* (store) [#12945](https://github.com/cosmos/cosmos-sdk/pull/12945) Fix nil end semantics in store/cachekv/iterator when iterating a dirty cache. -* (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). -* (snapshot) [#13400](https://github.com/cosmos/cosmos-sdk/pull/13400) Fix snapshot checksum issue in golang 1.19. -* (server) [#13778](https://github.com/cosmos/cosmos-sdk/pull/13778) Set Cosmos SDK default endpoints to localhost to avoid unknown exposure of endpoints. -* (x/auth) [#13877](https://github.com/cosmos/cosmos-sdk/pull/13877) Handle missing account numbers during `InitGenesis`. -* (x/gov) [#13918](https://github.com/cosmos/cosmos-sdk/pull/13918) Propagate message errors when executing a proposal. - -### Deprecated - -* (x/evidence) [#13740](https://github.com/cosmos/cosmos-sdk/pull/13740) The `evidence_hash` field of `QueryEvidenceRequest` has been deprecated and now contains a new field `hash` with type `string`. -* (x/bank) [#11859](https://github.com/cosmos/cosmos-sdk/pull/11859) The Params.SendEnabled field is deprecated and unusable. - The information can now be accessed using the BankKeeper. - Setting can be done using MsgSetSendEnabled as a governance proposal. - A SendEnabled query has been added to both GRPC and CLI. - -## [v0.46.12](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.12) - 2023-04-04 - -### Features - -* (x/groups) [#14879](https://github.com/cosmos/cosmos-sdk/pull/14879) Add `Query/Groups` query to get all the groups. - -### Improvements - -* (simapp) [#15305](https://github.com/cosmos/cosmos-sdk/pull/15305) Add `AppStateFnWithExtendedCb` with callback function to extend rawState and `AppStateRandomizedFnWithState` with extra genesisState argument which is the genesis state of the app. -* (x/distribution) [#15462](https://github.com/cosmos/cosmos-sdk/pull/15462) Add delegator address to the event for withdrawing delegation rewards. -* [#14019](https://github.com/cosmos/cosmos-sdk/issues/14019) Remove the interface casting to allow other implementations of a `CommitMultiStore`. - -## [v0.46.11](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.11) - 2023-03-03 - -### Improvements - -* (deps) Migrate to [CometBFT](https://github.com/cometbft/cometbft). Follow the instructions in the [release notes](./RELEASE_NOTES.md). -* (store) [#15152](https://github.com/cosmos/cosmos-sdk/pull/15152) Remove unmaintained and experimental `store/v2alpha1`. -* (store) [#14410](https://github.com/cosmos/cosmos-sdk/pull/14410) `rootmulti.Store.loadVersion` has validation to check if all the module stores' height is correct, it will error if any module store has incorrect height. - -### Bug Fixes - -* [#15243](https://github.com/cosmos/cosmos-sdk/pull/15243) `LatestBlockResponse` & `BlockByHeightResponse` types' field `sdk_block` was incorrectly cast `proposer_address` bytes to validator operator address, now to consensus address. - -## [v0.46.10](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.10) - 2023-02-16 - -### Improvements - -* (cli) [#14953](https://github.com/cosmos/cosmos-sdk/pull/14953) Enable profiling block replay during abci handshake with `--cpu-profile`. - -## [v0.46.9](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.9) - 2023-02-07 - -### Improvements - -* (store/cache) [#13881](https://github.com/cosmos/cosmos-sdk/pull/13881) Optimize iteration on nested cached KV stores and other operations in general. -* (deps) [#14846](https://github.com/cosmos/cosmos-sdk/pull/14846) Bump btcd. -* (deps) Bump Tendermint version to [v0.34.26](https://github.com/informalsystems/tendermint/releases/tag/v0.34.26). -* (store/cache) [#14189](https://github.com/cosmos/cosmos-sdk/pull/14189) Add config `iavl-lazy-loading` to enable lazy loading of iavl store, to improve start up time of archive nodes, add method `SetLazyLoading` to `CommitMultiStore` interface. - * A new field has been added to the app.toml. This alllows nodes with larger databases to startup quicker - - ```toml - # IAVLLazyLoading enable/disable the lazy loading of iavl store. - # Default is false. - iavl-lazy-loading = "" - ``` - -### Bug Fixes - -* (cli) [#14919](https://github.com/cosmos/cosmos-sdk/pull/#14919) Fix never assigned error when write validators. -* (store) [#14798](https://github.com/cosmos/cosmos-sdk/pull/14798) Copy btree to avoid the problem of modify while iteration. -* (cli) [#14799](https://github.com/cosmos/cosmos-sdk/pull/14799) Fix Evidence CLI query flag parsing (backport #13458) - -## [v0.46.8](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.8) - 2023-01-23 - -### Improvements - -* (store/cache) [#13881](https://github.com/cosmos/cosmos-sdk/pull/13881) Optimize iteration on nested cached KV stores and other operations in general. -* (x/gov) [#14347](https://github.com/cosmos/cosmos-sdk/pull/14347) Support `v1.Proposal` message in `v1beta1.Proposal.Content`. -* (deps) Use Informal System fork of Tendermint version to [v0.34.24](https://github.com/informalsystems/tendermint/releases/tag/v0.34.24). - -### Bug Fixes - -* (x/group) [#14526](https://github.com/cosmos/cosmos-sdk/pull/14526) Fix wrong address set in `EventUpdateGroupPolicy`. -* (ante) [#14448](https://github.com/cosmos/cosmos-sdk/pull/14448) Return anteEvents when postHandler fail. - -### API Breaking Changes - -* (x/gov) [#14422](https://github.com/cosmos/cosmos-sdk/pull/14422) Remove `Migrate_V046_6_To_V046_7` function which shouldn't be used for chains which already migrated to 0.46. - -## [v0.46.7](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.7) - 2022-12-13 - -### Features - -* (client) [#14051](https://github.com/cosmos/cosmos-sdk/pull/14051) Add `--grpc` client option. - -### Improvements - -* (deps) Bump Tendermint version to [v0.34.24](https://github.com/tendermint/tendermint/releases/tag/v0.34.24). -* [#13651](https://github.com/cosmos/cosmos-sdk/pull/13651) Update `server/config/config.GetConfig` function. -* [#14175](https://github.com/cosmos/cosmos-sdk/pull/14175) Add `server.DefaultBaseappOptions(appopts)` function to reduce boiler plate in root.go. - -### State Machine Breaking - -* (x/gov) [#14214](https://github.com/cosmos/cosmos-sdk/pull/14214) Fix gov v0.46 migration to v1 votes. - * Also provide a helper function `govv046.Migrate_V0466_To_V0467` for migrating a chain already on v0.46 with versions <=v0.46.6 to the latest v0.46.7 correct state. -* (x/group) [#14071](https://github.com/cosmos/cosmos-sdk/pull/14071) Don't re-tally proposal after voting period end if they have been marked as ACCEPTED or REJECTED. - -### API Breaking Changes - -* (store) [#13516](https://github.com/cosmos/cosmos-sdk/pull/13516) Update State Streaming APIs: - * Add method `ListenCommit` to `ABCIListener` - * Move `ListeningEnabled` and `AddListener` methods to `CommitMultiStore` - * Remove `CacheWrapWithListeners` from `CacheWrap` and `CacheWrapper` interfaces - * Remove listening APIs from the caching layer (it should only listen to the `rootmulti.Store`) - * Add three new options to file streaming service constructor. - * Modify `ABCIListener` such that any error from any method will always halt the app via `panic` -* (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. - -### Bug Fixes - -* (baseapp) [#13983](https://github.com/cosmos/cosmos-sdk/pull/13983) Don't emit duplicate ante-handler events when a post-handler is defined. -* (baseapp) [#14049](https://github.com/cosmos/cosmos-sdk/pull/14049) Fix state sync when interval is zero. -* (store) [#13516](https://github.com/cosmos/cosmos-sdk/pull/13516) Fix state listener that was observing writes at wrong time. - -## [v0.46.6](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.6) - 2022-11-18 - -### Improvements - -* (config) [#13894](https://github.com/cosmos/cosmos-sdk/pull/13894) Support state streaming configuration in `app.toml` template and default configuration. - -### Bug Fixes - -* (x/gov) [#13918](https://github.com/cosmos/cosmos-sdk/pull/13918) Fix propagation of message errors when executing a proposal. - -## [v0.46.5](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.5) - 2022-11-17 - -### Features - -* (x/bank) [#13891](https://github.com/cosmos/cosmos-sdk/pull/13891) Provide a helper function `Migrate_V0464_To_V0465` for migrating a chain **already on v0.46 with versions <=v0.46.4** to the latest v0.46.5 correct state. - -### Improvements - -* [#13826](https://github.com/cosmos/cosmos-sdk/pull/13826) Support custom `GasConfig` configuration for applications. -* (deps) Bump Tendermint version to [v0.34.23](https://github.com/tendermint/tendermint/releases/tag/v0.34.23). - -### State Machine Breaking - -* (x/group) [#13876](https://github.com/cosmos/cosmos-sdk/pull/13876) Fix group MinExecutionPeriod that is checked on execution now, instead of voting period end. - -### API Breaking Changes - -* (x/group) [#13876](https://github.com/cosmos/cosmos-sdk/pull/13876) Add `GetMinExecutionPeriod` method on DecisionPolicy interface. - -### Bug Fixes - -* (x/group) [#13869](https://github.com/cosmos/cosmos-sdk/pull/13869) Group members weight must be positive and a finite number. -* (x/bank) [#13821](https://github.com/cosmos/cosmos-sdk/pull/13821) Fix bank store migration of coin metadata. -* (x/group) [#13808](https://github.com/cosmos/cosmos-sdk/pull/13808) Fix propagation of message events to the current context in `EndBlocker`. -* (x/gov) [#13728](https://github.com/cosmos/cosmos-sdk/pull/13728) Fix propagation of message events to the current context in `EndBlocker`. -* (store) [#13803](https://github.com/cosmos/cosmos-sdk/pull/13803) Add an error log if IAVL set operation failed. -* [#13861](https://github.com/cosmos/cosmos-sdk/pull/13861) Allow `_` characters in tx event queries, i.e. `GetTxsEvent`. - -## [v0.46.4](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.4) - 2022-11-01 - -### Features - -* (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 - -* (deps) Bump IAVL version to [v0.19.4](https://github.com/cosmos/iavl/releases/tag/v0.19.4). - -### Bug Fixes - -* (x/auth/tx) [#12474](https://github.com/cosmos/cosmos-sdk/pull/12474) Remove condition in GetTxsEvent that disallowed multiple equal signs, which would break event queries with base64 strings (i.e. query by signature). -* (store) [#13530](https://github.com/cosmos/cosmos-sdk/pull/13530) Fix app-hash mismatch if upgrade migration commit is interrupted. - -### CLI Breaking Changes - -* [#13656](https://github.com/cosmos/cosmos-sdk/pull/13659) Rename `server.FlagIAVLFastNode` to `server.FlagDisableIAVLFastNode` for clarity. - -### API Breaking Changes - -* (context) [#13063](https://github.com/cosmos/cosmos-sdk/pull/13063) Update `Context#CacheContext` to automatically emit all events on the parent context's `EventManager`. - -## [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 v0.8.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 - -* (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. -* (cli) [#13089](https://github.com/cosmos/cosmos-sdk/pull/13089) `NewRollbackCmd` now takes an `appCreator types.AppCreator`. - -### Features - -* (cli) [#13207](https://github.com/cosmos/cosmos-sdk/pull/13207) Reduce user's password prompts when calling keyring `List()` function. -* (cli) [#13353](https://github.com/cosmos/cosmos-sdk/pull/13353) Add `tx group draft-proposal` command for generating group proposal JSONs (skeleton). -* (cli) [#13304](https://github.com/cosmos/cosmos-sdk/pull/13304) Add `tx gov draft-proposal` command for generating proposal JSONs (skeleton). -* (x/authz) [#13047](https://github.com/cosmos/cosmos-sdk/pull/13047) Add a GetAuthorization function to the keeper. -* (cli) [#12742](https://github.com/cosmos/cosmos-sdk/pull/12742) Add the `prune` CLI cmd to manually prune app store history versions based on the pruning options. - -### Improvements - -* [#13323](https://github.com/cosmos/cosmos-sdk/pull/13323) Ensure `withdraw_rewards` rewards are emitted from all actions that result in rewards being withdrawn. -* [#13233](https://github.com/cosmos/cosmos-sdk/pull/13233) Add `--append` to `add-genesis-account` sub-command to append new tokens after an account is already created. -* (x/group) [#13214](https://github.com/cosmos/cosmos-sdk/pull/13214) Add `withdraw-proposal` command to group module's CLI transaction commands. -* (x/auth) [#13048](https://github.com/cosmos/cosmos-sdk/pull/13048) Add handling of AccountNumberStoreKeyPrefix to the simulation decoder. -* (simapp) [#13107](https://github.com/cosmos/cosmos-sdk/pull/13107) Call `SetIAVLCacheSize` with the configured value in simapp. -* [#13301](https://github.com/cosmos/cosmos-sdk/pull/13301) Keep the balance query endpoint compatible with legacy blocks -* [#13321](https://github.com/cosmos/cosmos-sdk/pull/13321) Add flag to disable fast node migration and usage. - -### Bug Fixes - -* (types) [#13265](https://github.com/cosmos/cosmos-sdk/pull/13265) Correctly coalesce coins even with repeated denominations & simplify logic. -* (x/auth) [#13200](https://github.com/cosmos/cosmos-sdk/pull/13200) Fix wrong sequences in `sign-batch`. -* (export) [#13029](https://github.com/cosmos/cosmos-sdk/pull/13029) Fix exporting the blockParams regression. -* [#13046](https://github.com/cosmos/cosmos-sdk/pull/13046) Fix missing return statement in BaseApp.Query. -* (store) [#13336](https://github.com/cosmos/cosmos-sdk/pull/13334) Call streaming listeners for deliver tx event, it was removed accidentally. -* (grpc) [#13417](https://github.com/cosmos/cosmos-sdk/pull/13417) fix grpc query panic that could crash the node (backport #13352). -* (grpc) [#13418](https://github.com/cosmos/cosmos-sdk/pull/13418) Add close for grpc only mode. - -## [v0.46.1](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.1) - 2022-08-24 - -### Improvements - -* [#12953](https://github.com/cosmos/cosmos-sdk/pull/12953) Change the default priority mechanism to be based on gas price. -* [#12981](https://github.com/cosmos/cosmos-sdk/pull/12981) Return proper error when parsing telemetry configuration. -* [#12969](https://github.com/cosmos/cosmos-sdk/pull/12969) Bump Tendermint to `v0.34.21` and IAVL to `v0.19.1`. -* [#12885](https://github.com/cosmos/cosmos-sdk/pull/12885) Amortize cost of processing cache KV store. -* (events) [#12850](https://github.com/cosmos/cosmos-sdk/pull/12850) Add a new `fee_payer` attribute to the `tx` event that is emitted from the `DeductFeeDecorator` AnteHandler decorator. -* (x/params) [#12615](https://github.com/cosmos/cosmos-sdk/pull/12615) Add `GetParamSetIfExists` function to params `Subspace` to prevent panics on breaking changes. -* (x/bank) [#12674](https://github.com/cosmos/cosmos-sdk/pull/12674) Add convenience function `CreatePrefixedAccountStoreKey()` to construct key to access account's balance for a given denom. -* [#12877](https://github.com/cosmos/cosmos-sdk/pull/12877) Bumped cosmossdk.io/math to v1.0.0-beta.3 -* [#12693](https://github.com/cosmos/cosmos-sdk/pull/12693) Make sure the order of each node is consistent when emitting proto events. - -### Bug Fixes - -* (x/group) [#12888](https://github.com/cosmos/cosmos-sdk/pull/12888) Fix event propagation to the current context of `x/group` message execution `[]sdk.Result`. -* (x/upgrade) [#12906](https://github.com/cosmos/cosmos-sdk/pull/12906) Fix upgrade failure by moving downgrade verification logic after store migration. - -## [v0.46.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.0) - 2022-07-26 - -### Features - -* (types) [#11985](https://github.com/cosmos/cosmos-sdk/pull/11985) Add a `Priority` field on `sdk.Context`, which represents the CheckTx priority field. It is only used during CheckTx. -* (gRPC) [#11889](https://github.com/cosmos/cosmos-sdk/pull/11889) Support custom read and write gRPC options in `app.toml`. See `max-recv-msg-size` and `max-send-msg-size` respectively. -* (cli) [#11738](https://github.com/cosmos/cosmos-sdk/pull/11738) Add `tx auth multi-sign` as alias of `tx auth multisign` for consistency with `multi-send`. -* (cli) [#11738](https://github.com/cosmos/cosmos-sdk/pull/11738) Add `tx bank multi-send` command for bulk send of coins to multiple accounts. -* (grpc) [#11642](https://github.com/cosmos/cosmos-sdk/pull/11642) Implement `ABCIQuery` in the Tendermint gRPC service, which proxies ABCI `Query` requests directly to the application. -* (x/upgrade) [#11551](https://github.com/cosmos/cosmos-sdk/pull/11551) Update `ScheduleUpgrade` for chains to schedule an automated upgrade on `BeginBlock` without having to go though governance. -* (tx) [#11533](https://github.com/cosmos/cosmos-sdk/pull/11533) Register [`EIP191`](https://eips.ethereum.org/EIPS/eip-191) as an available `SignMode` for chains to use. -* (x/genutil) [#11500](https://github.com/cosmos/cosmos-sdk/pull/11500) Fix GenTx validation and adjust error messages -* [#11430](https://github.com/cosmos/cosmos-sdk/pull/11430) Introduce a new `grpc-only` flag, such that when enabled, will start the node in a query-only mode. Note, gRPC MUST be enabled with this flag. -* (x/bank) [#11417](https://github.com/cosmos/cosmos-sdk/pull/11417) Introduce a new `SpendableBalances` gRPC query that retrieves an account's total (paginated) spendable balances. -* [#11441](https://github.com/cosmos/cosmos-sdk/pull/11441) Added a new method, `IsLTE`, for `types.Coin`. This method is used to check if a `types.Coin` is less than or equal to another `types.Coin`. -* (x/upgrade) [#11116](https://github.com/cosmos/cosmos-sdk/pull/11116) `MsgSoftwareUpgrade` and `MsgCancelUpgrade` have been added to support v1beta2 msgs-based gov proposals. -* [#10977](https://github.com/cosmos/cosmos-sdk/pull/10977) Now every cosmos message protobuf definition must be extended with a `cosmos.msg.v1.signer` option to signal the signer fields in a language agnostic way. -* [#10710](https://github.com/cosmos/cosmos-sdk/pull/10710) Chain-id shouldn't be required for creating a transaction with both --generate-only and --offline flags. -* [#10703](https://github.com/cosmos/cosmos-sdk/pull/10703) Create a new grantee account, if the grantee of an authorization does not exist. -* [#10592](https://github.com/cosmos/cosmos-sdk/pull/10592) Add a `DecApproxEq` function that checks to see if `|d1 - d2| < tol` for some Dec `d1, d2, tol`. -* [#9933](https://github.com/cosmos/cosmos-sdk/pull/9933) Introduces the notion of a Cosmos "Scalar" type, which would just be simple aliases that give human-understandable meaning to the underlying type, both in Go code and in Proto definitions. -* [#9884](https://github.com/cosmos/cosmos-sdk/pull/9884) Provide a new gRPC query handler, `/cosmos/params/v1beta1/subspaces`, that allows the ability to query for all registered subspaces and their respective keys. -* [#9776](https://github.com/cosmos/cosmos-sdk/pull/9776) Add flag `staking-bond-denom` to specify the staking bond denomination value when initializing a new chain. -* [#9533](https://github.com/cosmos/cosmos-sdk/pull/9533) Added a new gRPC method, `DenomOwners`, in `x/bank` to query for all account holders of a specific denomination. -* (bank) [#9618](https://github.com/cosmos/cosmos-sdk/pull/9618) Update bank.Metadata: add URI and URIHash attributes. -* (store) [#8664](https://github.com/cosmos/cosmos-sdk/pull/8664) Implementation of ADR-038 file StreamingService -* [#9837](https://github.com/cosmos/cosmos-sdk/issues/9837) `--generate-only` flag can be used with a keyname from the keyring. -* [#10326](https://github.com/cosmos/cosmos-sdk/pull/10326) `x/authz` add all grants by granter query. -* [#10944](https://github.com/cosmos/cosmos-sdk/pull/10944) `x/authz` add all grants by grantee query -* [#10348](https://github.com/cosmos/cosmos-sdk/pull/10348) Add `fee.{payer,granter}` and `tip` fields to StdSignDoc for signing tipped transactions. -* [#10208](https://github.com/cosmos/cosmos-sdk/pull/10208) Add `TipsTxMiddleware` for transferring tips. -* [#10379](https://github.com/cosmos/cosmos-sdk/pull/10379) Add validation to `x/upgrade` CLI `software-upgrade` command `--plan-info` value. -* [#10507](https://github.com/cosmos/cosmos-sdk/pull/10507) Add antehandler for tx priority. -* [#10311](https://github.com/cosmos/cosmos-sdk/pull/10311) Adds cli to use tips transactions. It adds an `--aux` flag to all CLI tx commands to generate the aux signer data (with optional tip), and a new `tx aux-to-fee` subcommand to let the fee payer gather aux signer data and broadcast the tx -* [#11019](https://github.com/cosmos/cosmos-sdk/pull/11019) Add `MsgCreatePermanentLockedAccount` and CLI method for creating permanent locked account -* [#10947](https://github.com/cosmos/cosmos-sdk/pull/10947) Add `AllowancesByGranter` query to the feegrant module -* [#10407](https://github.com/cosmos/cosmos-sdk/pull/10407) Add validation to `x/upgrade` module's `BeginBlock` to check accidental binary downgrades -* (gov) [#11036](https://github.com/cosmos/cosmos-sdk/pull/11036) Add in-place migrations for 0.43->0.46. Add a `migrate v0.46` CLI command for v0.43->0.46 JSON genesis migration. -* [#11006](https://github.com/cosmos/cosmos-sdk/pull/11006) Add `debug pubkey-raw` command to allow inspecting of pubkeys in legacy bech32 format -* (x/authz) [#10714](https://github.com/cosmos/cosmos-sdk/pull/10714) Add support for pruning expired authorizations -* [#11179](https://github.com/cosmos/cosmos-sdk/pull/11179) Add state rollback command. -* [#11234](https://github.com/cosmos/cosmos-sdk/pull/11234) Add `GRPCClient` field to Client Context. If `GRPCClient` field is set to nil, the `Invoke` method would use ABCI query, otherwise use gprc. -* (authz)[#11060](https://github.com/cosmos/cosmos-sdk/pull/11060) Support grant with no expire time. -* (rosetta) [#11590](https://github.com/cosmos/cosmos-sdk/pull/11590) Add fee suggestion for rosetta and enable offline mode. Also force set events about Fees to Success to pass reconciliation test. -* (types) [#11959](https://github.com/cosmos/cosmos-sdk/pull/11959) Added `sdk.Coins.Find` helper method to find a coin by denom. -* (upgrade) [#12603](https://github.com/cosmos/cosmos-sdk/pull/12603) feat: Move AppModule.BeginBlock and AppModule.EndBlock to extension interfaces -* (telemetry) [#12405](https://github.com/cosmos/cosmos-sdk/pull/12405) Add *query* calls metric to telemetry. -* (query) [#12253](https://github.com/cosmos/cosmos-sdk/pull/12253) Add `GenericFilteredPaginate` to the `query` package to improve UX. - -### API Breaking Changes - -* (x/auth/ante) [#11985](https://github.com/cosmos/cosmos-sdk/pull/11985) The `MempoolFeeDecorator` has been removed. Instead, the `DeductFeeDecorator` takes a new argument of type `TxFeeChecker`, to define custom fee models. If `nil` is passed to this `TxFeeChecker` argument, then it will default to `checkTxFeeWithValidatorMinGasPrices`, which is the exact same behavior as the old `MempoolFeeDecorator` (i.e. checking fees against validator's own min gas price). -* (x/auth/ante) [#11985](https://github.com/cosmos/cosmos-sdk/pull/11985) The `ExtensionOptionsDecorator` takes an argument of type `ExtensionOptionChecker`. For backwards-compatibility, you can pass `nil`, which defaults to the old behavior of rejecting all tx extensions. -* (crypto/keyring) [#11932](https://github.com/cosmos/cosmos-sdk/pull/11932) Remove `Unsafe*` interfaces from keyring package. Please use interface casting if you wish to access those unsafe functions. -* (types) [#11881](https://github.com/cosmos/cosmos-sdk/issues/11881) Rename `AccAddressFromHex` to `AccAddressFromHexUnsafe`. -* (types) [#11788](https://github.com/cosmos/cosmos-sdk/pull/11788) The `Int` and `Uint` types have been moved to their own dedicated module, `math`. Aliases are kept in the SDK's root `types` package, however, it is encouraged to utilize the new `math` module. As a result, the `Int#ToDec` API has been removed. -* (grpc) [#11642](https://github.com/cosmos/cosmos-sdk/pull/11642) The `RegisterTendermintService` method in the `tmservice` package now requires a `abciQueryFn` query function parameter. -* [#11496](https://github.com/cosmos/cosmos-sdk/pull/11496) Refactor abstractions for snapshot and pruning; snapshot intervals eventually pruned; unit tests. -* (types) [#11689](https://github.com/cosmos/cosmos-sdk/pull/11689) Make `Coins#Sub` and `Coins#SafeSub` consistent with `Coins#Add`. -* (store)[#11152](https://github.com/cosmos/cosmos-sdk/pull/11152) Remove `keep-every` from pruning options. -* [#10950](https://github.com/cosmos/cosmos-sdk/pull/10950) Add `envPrefix` parameter to `cmd.Execute`. -* (x/mint) [#10441](https://github.com/cosmos/cosmos-sdk/pull/10441) The `NewAppModule` function now accepts an inflation calculation function as an argument. -* [#9695](https://github.com/cosmos/cosmos-sdk/pull/9695) Migrate keys from `Info` (serialized as amino) -> `Record` (serialized as proto) - * Add new `codec.Codec` argument in: - * `keyring.NewInMemory` - * `keyring.New` - * Rename: - * `SavePubKey` to `SaveOfflineKey`. - * `NewMultiInfo`, `NewLedgerInfo` to `NewLegacyMultiInfo`, `newLegacyLedgerInfo` respectively. Move them into `legacy_info.go`. - * `NewOfflineInfo` to `newLegacyOfflineInfo` and move it to `migration_test.go`. - * Return: - _`keyring.Record, error` in `SaveOfflineKey`, `SaveLedgerKey`, `SaveMultiSig`, `Key` and `KeyByAddress`. - _`keyring.Record` instead of `Info` in `NewMnemonic` and `List`. - * Remove `algo` argument from : - * `SaveOfflineKey` - * Take `keyring.Record` instead of `Info` as first argument in: - * `MkConsKeyOutput` - * `MkValKeyOutput` - * `MkAccKeyOutput` -* [#10022](https://github.com/cosmos/cosmos-sdk/pull/10022) `AuthKeeper` interface in `x/auth` now includes a function `HasAccount`. -* [#9759](https://github.com/cosmos/cosmos-sdk/pull/9759) `NewAccountKeeeper` in `x/auth` now takes an additional `bech32Prefix` argument that represents `sdk.Bech32MainPrefix`. -* [#9628](https://github.com/cosmos/cosmos-sdk/pull/9628) Rename `x/{mod}/legacy` to `x/{mod}/migrations`. -* [#9571](https://github.com/cosmos/cosmos-sdk/pull/9571) Implemented error handling for staking hooks, which now return an error on failure. -* [#9427](https://github.com/cosmos/cosmos-sdk/pull/9427) Move simapp `FundAccount` and `FundModuleAccount` to `x/bank/testutil` -* (client/tx) [#9421](https://github.com/cosmos/cosmos-sdk/pull/9421/) `BuildUnsignedTx`, `BuildSimTx`, `PrintUnsignedStdTx` functions are moved to - the Tx Factory as methods. -* (client/keys) [#9601](https://github.com/cosmos/cosmos-sdk/pull/9601) Added `keys rename` CLI command and `Keyring.Rename` interface method to rename a key in the keyring. -* (x/slashing) [#9458](https://github.com/cosmos/cosmos-sdk/pull/9458) Coins burned from slashing is now returned from Slash function and included in Slash event. -* [#9246](https://github.com/cosmos/cosmos-sdk/pull/9246) The `New` method for the network package now returns an error. -* [#9519](https://github.com/cosmos/cosmos-sdk/pull/9519) `DeleteDeposits` renamed to `DeleteAndBurnDeposits`, `RefundDeposits` renamed to `RefundAndDeleteDeposits` -* (codec) [#9521](https://github.com/cosmos/cosmos-sdk/pull/9521) Removed deprecated `clientCtx.JSONCodec` from `client.Context`. -* (codec) [#9521](https://github.com/cosmos/cosmos-sdk/pull/9521) Rename `EncodingConfig.Marshaler` to `Codec`. -* [#9594](https://github.com/cosmos/cosmos-sdk/pull/9594) `RESTHandlerFn` argument is removed from the `gov/NewProposalHandler`. -* [#9594](https://github.com/cosmos/cosmos-sdk/pull/9594) `types/rest` package moved to `testutil/rest`. -* [#9432](https://github.com/cosmos/cosmos-sdk/pull/9432) `ConsensusParamsKeyTable` moved from `params/keeper` to `params/types` -* [#9576](https://github.com/cosmos/cosmos-sdk/pull/9576) Add debug error message to `sdkerrors.QueryResult` when enabled -* [#9650](https://github.com/cosmos/cosmos-sdk/pull/9650) Removed deprecated message handler implementation from the SDK modules. -* [#10248](https://github.com/cosmos/cosmos-sdk/pull/10248) Remove unused `KeyPowerReduction` variable from x/staking types. -* (x/bank) [#9832](https://github.com/cosmos/cosmos-sdk/pull/9832) `AddressFromBalancesStore` renamed to `AddressAndDenomFromBalancesStore`. -* (tests) [#9938](https://github.com/cosmos/cosmos-sdk/pull/9938) `simapp.Setup` accepts additional `testing.T` argument. -* (baseapp) [#11979](https://github.com/cosmos/cosmos-sdk/pull/11979) Rename baseapp simulation helper methods `baseapp.{Check,Deliver}` to `baseapp.Sim{Check,Deliver}`. -* (x/gov) [#10373](https://github.com/cosmos/cosmos-sdk/pull/10373) Removed gov `keeper.{MustMarshal, MustUnmarshal}`. -* [#10348](https://github.com/cosmos/cosmos-sdk/pull/10348) StdSignBytes takes a new argument of type `*tx.Tip` for signing over tips using LEGACY_AMINO_JSON. -* [#10208](https://github.com/cosmos/cosmos-sdk/pull/10208) The `x/auth/signing.Tx` interface now also includes a new `GetTip() *tx.Tip` method for verifying tipped transactions. The `x/auth/types` expected BankKeeper interface now expects the `SendCoins` method too. -* [#10612](https://github.com/cosmos/cosmos-sdk/pull/10612) `baseapp.NewBaseApp` constructor function doesn't take the `sdk.TxDecoder` anymore. This logic has been moved into the TxDecoderMiddleware. -* [#10692](https://github.com/cosmos/cosmos-sdk/pull/10612) `SignerData` takes 2 new fields, `Address` and `PubKey`, which need to get populated when using SIGN_MODE_DIRECT_AUX. -* [#10748](https://github.com/cosmos/cosmos-sdk/pull/10748) Move legacy `x/gov` api to `v1beta1` directory. -* [#10816](https://github.com/cosmos/cosmos-sdk/pull/10816) Reuse blocked addresses from the bank module. No need to pass them to distribution. -* [#10852](https://github.com/cosmos/cosmos-sdk/pull/10852) Move `x/gov/types` to `x/gov/types/v1beta2`. -* [#10922](https://github.com/cosmos/cosmos-sdk/pull/10922), [/#10957](https://github.com/cosmos/cosmos-sdk/pull/10957) Move key `server.Generate*` functions to testutil and support custom mnemonics in in-process testing network. Moved `TestMnemonic` from `testutil` package to `testdata`. -* (x/bank) [#10771](https://github.com/cosmos/cosmos-sdk/pull/10771) Add safety check on bank module perms to allow module-specific mint restrictions (e.g. only minting a certain denom). -* (x/bank) [#10771](https://github.com/cosmos/cosmos-sdk/pull/10771) Add `bank.BaseKeeper.WithMintCoinsRestriction` function to restrict use of bank `MintCoins` usage. -* [#10868](https://github.com/cosmos/cosmos-sdk/pull/10868), [#10989](https://github.com/cosmos/cosmos-sdk/pull/10989) The Gov keeper accepts now 2 more mandatory arguments, the ServiceMsgRouter and a maximum proposal metadata length. -* [#10868](https://github.com/cosmos/cosmos-sdk/pull/10868), [#10989](https://github.com/cosmos/cosmos-sdk/pull/10989), [#11093](https://github.com/cosmos/cosmos-sdk/pull/11093) The Gov keeper accepts now 2 more mandatory arguments, the ServiceMsgRouter and a gov Config including the max metadata length. -* [#11124](https://github.com/cosmos/cosmos-sdk/pull/11124) Add `GetAllVersions` to application store -* (x/authz) [#10447](https://github.com/cosmos/cosmos-sdk/pull/10447) authz `NewGrant` takes a new argument: block time, to correctly validate expire time. -* [#10961](https://github.com/cosmos/cosmos-sdk/pull/10961) Support third-party modules to add extension snapshots to state-sync. -* [#11274](https://github.com/cosmos/cosmos-sdk/pull/11274) `types/errors.New` now is an alias for `types/errors.Register` and should only be used in initialization code. -* (authz)[#11060](https://github.com/cosmos/cosmos-sdk/pull/11060) `authz.NewMsgGrant` `expiration` is now a pointer. When `nil` is used then no expiration will be set (grant won't expire). -* (x/distribution)[#11457](https://github.com/cosmos/cosmos-sdk/pull/11457) Add amount field to `distr.MsgWithdrawDelegatorRewardResponse` and `distr.MsgWithdrawValidatorCommissionResponse`. -* [#11334](https://github.com/cosmos/cosmos-sdk/pull/11334) Move `x/gov/types/v1beta2` to `x/gov/types/v1`. -* (x/auth/middleware) [#11413](https://github.com/cosmos/cosmos-sdk/pull/11413) Refactor tx middleware to be extensible on tx fee logic. Merged `MempoolFeeMiddleware` and `TxPriorityMiddleware` functionalities into `DeductFeeMiddleware`, make the logic extensible using the `TxFeeChecker` option, the current fee logic is preserved by the default `checkTxFeeWithValidatorMinGasPrices` implementation. Change `RejectExtensionOptionsMiddleware` to `NewExtensionOptionsMiddleware` which is extensible with the `ExtensionOptionChecker` option. Unpack the tx extension options `Any`s to interface `TxExtensionOptionI`. -* (migrations) [#11556](https://github.com/cosmos/cosmos-sdk/pull/11556#issuecomment-1091385011) Remove migration code from 0.42 and below. To use previous migrations, checkout previous versions of the cosmos-sdk. - -### Client Breaking Changes - -* [#11797](https://github.com/cosmos/cosmos-sdk/pull/11797) Remove all RegisterRESTRoutes (previously deprecated) -* [#11089](https://github.com/cosmos/cosmos-sdk/pull/11089) interacting with the node through `grpc.Dial` requires clients to pass a codec refer to [doc](docs/docs/run-node/02-interact-node.md). -* [#9594](https://github.com/cosmos/cosmos-sdk/pull/9594) Remove legacy REST API. Please see the [REST Endpoints Migration guide](https://docs.cosmos.network/v0.45/migrations/rest.html) to migrate to the new REST endpoints. -* [#9995](https://github.com/cosmos/cosmos-sdk/pull/9995) Increased gas cost for creating proposals. -* [#11029](https://github.com/cosmos/cosmos-sdk/pull/11029) The deprecated Vote Option field is removed in gov v1beta2 and nil in v1beta1. Use Options instead. -* [#11013](https://github.com/cosmos/cosmos-sdk/pull/11013) The `tx gov submit-proposal` command has changed syntax to support the new Msg-based gov proposals. To access the old CLI command, please use `tx gov submit-legacy-proposal`. -* [#11170](https://github.com/cosmos/cosmos-sdk/issues/11170) Fixes issue related to grpc-gateway of supply by ibc-denom. - -### CLI Breaking Changes - -* (cli) [#11818](https://github.com/cosmos/cosmos-sdk/pull/11818) CLI transactions preview now respect the chosen `--output` flag format (json or text). -* [#9695](https://github.com/cosmos/cosmos-sdk/pull/9695) ` keys migrate` CLI command now takes no arguments. -* [#9246](https://github.com/cosmos/cosmos-sdk/pull/9246) Removed the CLI flag `--setup-config-only` from the `testnet` command and added the subcommand `init-files`. -* [#9780](https://github.com/cosmos/cosmos-sdk/pull/9780) Use sigs.k8s.io for yaml, which might lead to minor YAML output changes -* [#10625](https://github.com/cosmos/cosmos-sdk/pull/10625) Rename `--fee-account` CLI flag to `--fee-granter` -* [#10684](https://github.com/cosmos/cosmos-sdk/pull/10684) Rename `edit-validator` command's `--moniker` flag to `--new-moniker` -* (authz)[#11060](https://github.com/cosmos/cosmos-sdk/pull/11060) Changed the default value of the `--expiration` `tx grant` CLI Flag: was now + 1year, update: null (no expire date). - -### Improvements - -* (types) [#12201](https://github.com/cosmos/cosmos-sdk/pull/12201) Add `MustAccAddressFromBech32` util function -* [#11696](https://github.com/cosmos/cosmos-sdk/pull/11696) Rename `helpers.GenTx` to `GenSignedMockTx` to avoid confusion with genutil's `GenTxCmd`. -* (x/auth/vesting) [#11652](https://github.com/cosmos/cosmos-sdk/pull/11652) Add util functions for `Period(s)` -* [#11630](https://github.com/cosmos/cosmos-sdk/pull/11630) Add SafeSub method to sdk.Coin. -* [#11511](https://github.com/cosmos/cosmos-sdk/pull/11511) Add api server flags to start command. -* [#11484](https://github.com/cosmos/cosmos-sdk/pull/11484) Implement getter for keyring backend option. -* [#11449](https://github.com/cosmos/cosmos-sdk/pull/11449) Improved error messages when node isn't synced. -* [#11349](https://github.com/cosmos/cosmos-sdk/pull/11349) Add `RegisterAminoMsg` function that checks that a msg name is <40 chars (else this would break ledger nano signing) then registers the concrete msg type with amino, it should be used for registering `sdk.Msg`s with amino instead of `cdc.RegisterConcrete`. -* [#11089](https://github.com/cosmos/cosmos-sdk/pull/11089]) Now cosmos-sdk consumers can upgrade gRPC to its newest versions. -* [#10439](https://github.com/cosmos/cosmos-sdk/pull/10439) Check error for `RegisterQueryHandlerClient` in all modules `RegisterGRPCGatewayRoutes`. -* [#9780](https://github.com/cosmos/cosmos-sdk/pull/9780) Remove gogoproto `moretags` YAML annotations and add `sigs.k8s.io/yaml` for YAML marshalling. -* (x/bank) [#10134](https://github.com/cosmos/cosmos-sdk/pull/10134) Add `HasDenomMetadata` function to bank `Keeper` to check if a client coin denom metadata exists in state. -* (x/bank) [#10022](https://github.com/cosmos/cosmos-sdk/pull/10022) `BankKeeper.SendCoins` now takes less execution time. -* (deps) [#9987](https://github.com/cosmos/cosmos-sdk/pull/9987) Bump Go version minimum requirement to `1.17` -* (cli) [#9856](https://github.com/cosmos/cosmos-sdk/pull/9856) Overwrite `--sequence` and `--account-number` flags with default flag values when used with `offline=false` in `sign-batch` command. -* (rosetta) [#10001](https://github.com/cosmos/cosmos-sdk/issues/10001) Add documentation for rosetta-cli dockerfile and rename folder for the rosetta-ci dockerfile -* [#9699](https://github.com/cosmos/cosmos-sdk/pull/9699) Add `:`, `.`, `-`, and `_` as allowed characters in the default denom regular expression. -* (genesis) [#9697](https://github.com/cosmos/cosmos-sdk/pull/9697) Ensure `InitGenesis` returns with non-empty validator set. -* [#10468](https://github.com/cosmos/cosmos-sdk/pull/10468) Allow futureOps to queue additional operations in simulations -* [#10625](https://github.com/cosmos/cosmos-sdk/pull/10625) Add `--fee-payer` CLI flag -* (cli) [#10683](https://github.com/cosmos/cosmos-sdk/pull/10683) In CLI, allow 1 SIGN_MODE_DIRECT signer in transactions with multiple signers. -* (deps) [#10706](https://github.com/cosmos/cosmos-sdk/issues/10706) Bump rosetta-sdk-go to v0.7.2 and rosetta-cli to v0.7.3 -* (types/errors) [#10779](https://github.com/cosmos/cosmos-sdk/pull/10779) Move most functionality in `types/errors` to a standalone `errors` go module, except the `RootCodespace` errors and ABCI response helpers. All functions and types that used to live in `types/errors` are now aliased so this is not a breaking change. -* (gov) [#10854](https://github.com/cosmos/cosmos-sdk/pull/10854) v1beta2's vote doesn't include the deprecate `option VoteOption` anymore. Instead, it only uses `WeightedVoteOption`. -* (types) [#11004](https://github.com/cosmos/cosmos-sdk/pull/11004) Added mutable versions of many of the sdk.Dec types operations. This improves performance when used by avoiding reallocating a new bigint for each operation. -* (x/auth) [#10880](https://github.com/cosmos/cosmos-sdk/pull/10880) Added a new query to the tx query service that returns a block with transactions fully decoded. -* (types) [#11200](https://github.com/cosmos/cosmos-sdk/pull/11200) Added `Min()` and `Max()` operations on sdk.Coins. -* (gov) [#11287](https://github.com/cosmos/cosmos-sdk/pull/11287) Fix error message when no flags are provided while executing `submit-legacy-proposal` transaction. -* (x/auth) [#11482](https://github.com/cosmos/cosmos-sdk/pull/11482) Improve panic message when attempting to register a method handler for a message that does not implement sdk.Msg -* (x/staking) [#11596](https://github.com/cosmos/cosmos-sdk/pull/11596) Add (re)delegation getters -* (errors) [#11960](https://github.com/cosmos/cosmos-sdk/pull/11960) Removed 'redacted' error message from defaultErrEncoder -* (ante) [#12013](https://github.com/cosmos/cosmos-sdk/pull/12013) Index ante events for failed tx. -* [#12668](https://github.com/cosmos/cosmos-sdk/pull/12668) Add `authz_msg_index` event attribute to message events emitted when executing via `MsgExec` through `x/authz`. -* [#12626](https://github.com/cosmos/cosmos-sdk/pull/12626) Upgrade IAVL to v0.19.0 with fast index and error propagation. NOTE: first start will take a while to propagate into new model. -* [#12576](https://github.com/cosmos/cosmos-sdk/pull/12576) Remove dependency on cosmos/keyring and upgrade to 99designs/keyring v1.2.1 -* [#12590](https://github.com/cosmos/cosmos-sdk/pull/12590) Allow zero gas in simulation mode. -* [#12453](https://github.com/cosmos/cosmos-sdk/pull/12453) Add `NewInMemoryWithKeyring` function which allows the creation of in memory `keystore` instances with a specified set of existing items. -* [#11390](https://github.com/cosmos/cosmos-sdk/pull/11390) `LatestBlockResponse` & `BlockByHeightResponse` types' `Block` filed has been deprecated and they now contains new field `sdk_block` with `proposer_address` as `string` -* [#12089](https://github.com/cosmos/cosmos-sdk/pull/12089) Mark the `TipDecorator` as beta, don't include it in simapp by default. -* [#12153](https://github.com/cosmos/cosmos-sdk/pull/12153) Add a new `NewSimulationManagerFromAppModules` constructor, to simplify simulation wiring. - -### Bug Fixes - -* [#11969](https://github.com/cosmos/cosmos-sdk/pull/11969) Fix the panic error in `x/upgrade` when `AppVersion` is not set. -* (tests) [#11940](https://github.com/cosmos/cosmos-sdk/pull/11940) Fix some client tests in the `x/gov` module -* [#11772](https://github.com/cosmos/cosmos-sdk/pull/11772) Limit types.Dec length to avoid overflow. -* [#11724](https://github.com/cosmos/cosmos-sdk/pull/11724) Fix data race issues with api.Server -* [#11693](https://github.com/cosmos/cosmos-sdk/pull/11693) Add validation for gentx cmd. -* [#11645](https://github.com/cosmos/cosmos-sdk/pull/11645) Fix `--home` flag ignored when running help. -* [#11558](https://github.com/cosmos/cosmos-sdk/pull/11558) Fix `--dry-run` not working when using tx command. -* [#11354](https://github.com/cosmos/cosmos-sdk/pull/11355) Added missing pagination flag for `bank q total` query. -* [#11197](https://github.com/cosmos/cosmos-sdk/pull/11197) Signing with multisig now works with multisig address which is not in the keyring. -* (makefile) [#11285](https://github.com/cosmos/cosmos-sdk/pull/11285) Fix lint-fix make target. -* (client) [#11283](https://github.com/cosmos/cosmos-sdk/issues/11283) Support multiple keys for tx simulation and setting automatic gas for txs. -* (store) [#11177](https://github.com/cosmos/cosmos-sdk/pull/11177) Update the prune `everything` strategy to store the last two heights. -* [#10844](https://github.com/cosmos/cosmos-sdk/pull/10844) Automatic recovering non-consistent keyring storage during public key import. -* (store) [#11117](https://github.com/cosmos/cosmos-sdk/pull/11117) Fix data race in store trace component -* (cli) [#11065](https://github.com/cosmos/cosmos-sdk/pull/11065) Ensure the `tendermint-validator-set` query command respects the `-o` output flag. -* (grpc) [#10985](https://github.com/cosmos/cosmos-sdk/pull/10992) The `/cosmos/tx/v1beta1/txs/{hash}` endpoint returns a 404 when a tx does not exist. -* (rosetta) [#10340](https://github.com/cosmos/cosmos-sdk/pull/10340) Use `GenesisChunked(ctx)` instead `Genesis(ctx)` to get genesis block height -* [#9651](https://github.com/cosmos/cosmos-sdk/pull/9651) Change inconsistent limit of `0` to `MaxUint64` on InfiniteGasMeter and add GasRemaining func to GasMeter. -* [#9639](https://github.com/cosmos/cosmos-sdk/pull/9639) Check store keys length before accessing them by making sure that `key` is of length `m+1` (for `key[n:m]`) -* (types) [#9627](https://github.com/cosmos/cosmos-sdk/pull/9627) Fix nil pointer panic on `NewBigIntFromInt` -* (x/genutil) [#9574](https://github.com/cosmos/cosmos-sdk/pull/9575) Actually use the `gentx` client tx flags (like `--keyring-dir`) -* (x/distribution) [#9599](https://github.com/cosmos/cosmos-sdk/pull/9599) Withdraw rewards event now includes a value attribute even if there are 0 rewards (due to situations like 100% commission). -* (x/genutil) [#9638](https://github.com/cosmos/cosmos-sdk/pull/9638) Added missing validator key save when recovering from mnemonic -* [#9762](https://github.com/cosmos/cosmos-sdk/pull/9762) The init command uses the chain-id from the client config if --chain-id is not provided -* [#9980](https://github.com/cosmos/cosmos-sdk/pull/9980) Returning the error when the invalid argument is passed to bank query total supply cli. -* (server) [#10016](https://github.com/cosmos/cosmos-sdk/issues/10016) Fix marshaling of index-events into server config file. -* [#10184](https://github.com/cosmos/cosmos-sdk/pull/10184) Fixed CLI tx commands to no longer explicitly require the chain-id flag as this value can come from a user config. -* (x/upgrade) [#10189](https://github.com/cosmos/cosmos-sdk/issues/10189) Removed potential sources of non-determinism in upgrades -* [#10258](https://github.com/cosmos/cosmos-sdk/issues/10258) Fixes issue related to segmentation fault on mac m1 arm64 -* [#10466](https://github.com/cosmos/cosmos-sdk/issues/10466) Fixes error with simulation tests when genesis start time is randomly created after the year 2262 -* [#10394](https://github.com/cosmos/cosmos-sdk/issues/10394) Fixes issue related to grpc-gateway of account balance by - ibc-denom. -* [#10842](https://github.com/cosmos/cosmos-sdk/pull/10842) Fix error when `--generate-only`, `--max-msgs` fags set while executing `WithdrawAllRewards` command. -* [#10897](https://github.com/cosmos/cosmos-sdk/pull/10897) Fix: set a non-zero value on gas overflow. -* [#9790](https://github.com/cosmos/cosmos-sdk/pull/10687) Fix behavior of `DecCoins.MulDecTruncate`. -* [#10990](https://github.com/cosmos/cosmos-sdk/pull/10990) Fixes missing `iavl-cache-size` config parsing in `GetConfig` method. -* (x/authz) [#10447](https://github.com/cosmos/cosmos-sdk/pull/10447) Fix authz `NewGrant` expiration check. -* (x/authz) [#10633](https://github.com/cosmos/cosmos-sdk/pull/10633) Fixed authorization not found error when executing message. -* [#11222](https://github.com/cosmos/cosmos-sdk/pull/11222) reject query with block height in the future -* [#11229](https://github.com/cosmos/cosmos-sdk/pull/11229) Handled the error message of `transaction encountered error` from tendermint. -* (x/authz) [#11252](https://github.com/cosmos/cosmos-sdk/pull/11252) Allow insufficient funds error for authz simulation -* (cli) [#11313](https://github.com/cosmos/cosmos-sdk/pull/11313) Fixes `--gas auto` when executing CLI transactions in `--generate-only` mode -* (cli) [#11337](https://github.com/cosmos/cosmos-sdk/pull/11337) Fixes `show-adress` cli cmd -* (crypto) [#11298](https://github.com/cosmos/cosmos-sdk/pull/11298) Fix cgo secp signature verification and update libscep256k1 library. -* (x/authz) [#11512](https://github.com/cosmos/cosmos-sdk/pull/11512) Fix response of a panic to error, when subtracting balances. -* (rosetta) [#11590](https://github.com/cosmos/cosmos-sdk/pull/11590) `/block` returns an error with nil pointer when a request has both of index and hash and increase timeout for huge genesis. -* (x/feegrant) [#11813](https://github.com/cosmos/cosmos-sdk/pull/11813) Fix pagination total count in `AllowancesByGranter` query. -* (simapp) [#11855](https://github.com/cosmos/cosmos-sdk/pull/11855) Use `sdkmath.Int` instead of `int64` for `SimulationState.InitialStake`. -* (x/capability) [#11737](https://github.com/cosmos/cosmos-sdk/pull/11737) Use a fixed length encoding of `Capability` pointer for `FwdCapabilityKey` -* [#11983](https://github.com/cosmos/cosmos-sdk/pull/11983) (x/feegrant, x/authz) rename grants query commands to `grants-by-grantee`, `grants-by-granter` cmds. -* (testutil/sims) [#12374](https://github.com/cosmos/cosmos-sdk/pull/12374) fix the non-determinstic behavior in simulations caused by `GenSignedMockTx` and check empty coins slice before it is used to create `banktype.MsgSend`. -* [#12448](https://github.com/cosmos/cosmos-sdk/pull/12448) Start telemetry independently from the API server. -* [#12509](https://github.com/cosmos/cosmos-sdk/pull/12509) Fix `Register{Tx,Tendermint}Service` not being called, resulting in some endpoints like the Simulate endpoint not working. -* [#12416](https://github.com/cosmos/cosmos-sdk/pull/12416) Prevent zero gas transactions in the `DeductFeeDecorator` AnteHandler decorator. -* (x/mint) [#12384](https://github.com/cosmos/cosmos-sdk/pull/12384) Ensure `GoalBonded` must be positive when performing `x/mint` parameter validation. -* (x/auth) [#12261](https://github.com/cosmos/cosmos-sdk/pull/12261) Deprecate pagination in GetTxsEventRequest/Response in favor of page and limit to align with tendermint `SignClient.TxSearch` -* (vesting) [#12190](https://github.com/cosmos/cosmos-sdk/pull/12190) Replace https://github.com/cosmos/cosmos-sdk/pull/12190 to use `NewBaseAccountWithAddress` in all vesting account message handlers. -* (linting) [#12132](https://github.com/cosmos/cosmos-sdk/pull/12132) Change sdk.Int to math.Int -* (cli) [#12127](https://github.com/cosmos/cosmos-sdk/pull/12127) Fix the CLI not always taking into account `--fee-payer` and `--fee-granter` flags. -* (migrations) [#12028](https://github.com/cosmos/cosmos-sdk/pull/12028) Fix v0.45->v0.46 in-place store migrations. -* (baseapp) [#12089](https://github.com/cosmos/cosmos-sdk/pull/12089) Include antehandler and runMsgs events in SimulateTx. -* (cli) [#12095](https://github.com/cosmos/cosmos-sdk/pull/12095) Fix running a tx with --dry-run returns an error -* (x/auth) [#12108](https://github.com/cosmos/cosmos-sdk/pull/12108) Fix GetBlockWithTxs error when querying block with 0 tx -* (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/crisis) [#12208](https://github.com/cosmos/cosmos-sdk/pull/12208) Fix progress index of crisis invariant assertion logs. -* (types) [#12229](https://github.com/cosmos/cosmos-sdk/pull/12229) Increase sdk.Dec maxApproxRootIterations to 300 - -### State Machine Breaking - -* (x/gov) [#13576](https://github.com/cosmos/cosmos-sdk/pull/13576) Proposals in voting period are tracked in a separate store. -* (baseapp) [#11985](https://github.com/cosmos/cosmos-sdk/pull/11985) Add a `postHandler` to baseapp. This `postHandler` is like antehandler, but is run *after* the `runMsgs` execution. It is in the same store branch that `runMsgs`, meaning that both `runMsgs` and `postHandler` -* (x/gov) [#11998](https://github.com/cosmos/cosmos-sdk/pull/11998) Tweak the `x/gov` `ModuleAccountInvariant` invariant to ensure deposits are `<=` total module account balance instead of strictly equal. -* (x/upgrade) [#11800](https://github.com/cosmos/cosmos-sdk/pull/11800) Fix `GetLastCompleteUpgrade` to properly return the latest upgrade. -* [#10564](https://github.com/cosmos/cosmos-sdk/pull/10564) Fix bug when updating allowance inside AllowedMsgAllowance -* (x/auth)[#9596](https://github.com/cosmos/cosmos-sdk/pull/9596) Enable creating periodic vesting accounts with a transactions instead of requiring them to be created in genesis. -* (x/bank) [#9611](https://github.com/cosmos/cosmos-sdk/pull/9611) Introduce a new index to act as a reverse index between a denomination and address allowing to query for token holders of a specific denomination. `DenomOwners` is updated to use the new reverse index. -* (x/bank) [#9832](https://github.com/cosmos/cosmos-sdk/pull/9832) Account balance is stored as `sdk.Int` rather than `sdk.Coin`. -* (x/bank) [#9890](https://github.com/cosmos/cosmos-sdk/pull/9890) Remove duplicate denom from denom metadata key. -* (x/upgrade) [#10189](https://github.com/cosmos/cosmos-sdk/issues/10189) Removed potential sources of non-determinism in upgrades -* [#10422](https://github.com/cosmos/cosmos-sdk/pull/10422) and [#10529](https://github.com/cosmos/cosmos-sdk/pull/10529) Add `MinCommissionRate` param to `x/staking` module. -* (x/gov) [#10763](https://github.com/cosmos/cosmos-sdk/pull/10763) modify the fields in `TallyParams` to use `string` instead of `bytes` -* [#10770](https://github.com/cosmos/cosmos-sdk/pull/10770) revert tx when block gas limit exceeded -* (x/gov) [#10868](https://github.com/cosmos/cosmos-sdk/pull/10868) Bump gov to v1. Both v1beta1 and v1beta2 queries and Msgs are accepted. -* [#11011](https://github.com/cosmos/cosmos-sdk/pull/11011) Remove burning of deposits when qourum is not reached on a governance proposal and when the deposit is not fully met. -* [#11019](https://github.com/cosmos/cosmos-sdk/pull/11019) Add `MsgCreatePermanentLockedAccount` and CLI method for creating permanent locked account -* (x/staking) [#10885] (https://github.com/cosmos/cosmos-sdk/pull/10885) Add new `CancelUnbondingDelegation` - transaction to `x/staking` module. Delegators can now cancel unbonding delegation entry and delegate back to validator. -* (x/feegrant) [#10830](https://github.com/cosmos/cosmos-sdk/pull/10830) Expired allowances will be pruned from state. -* (x/authz,x/feegrant) [#11214](https://github.com/cosmos/cosmos-sdk/pull/11214) Fix Amino JSON encoding of authz and feegrant Msgs to be consistent with other modules. -* (authz)[#11060](https://github.com/cosmos/cosmos-sdk/pull/11060) Support grant with no expire time. - -### Deprecated - -* (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.16](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.16) - 2023-05-11 - -### Security Bug Fixes - -* (x/feegrant) [#16097](https://github.com/cosmos/cosmos-sdk/pull/16097) Fix infinite feegrant allowance bug. - -## [v0.45.15](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.15) - 2023-03-22 - -### Improvements - -* (deps) Migrate to [CometBFT](https://github.com/cometbft/cometbft). Follow the instructions in the [release notes](./RELEASE_NOTES.md). -* (deps) [#15127](https://github.com/cosmos/cosmos-sdk/pull/15127) Bump btcd. -* (store) [#14410](https://github.com/cosmos/cosmos-sdk/pull/14410) `rootmulti.Store.loadVersion` has validation to check if all the module stores' height is correct, it will error if any module store has incorrect height. - -## [v0.45.14](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.14) - 2023-02-16 - -### Features - -* [#14583](https://github.com/cosmos/cosmos-sdk/pull/14583) Add support for Core API. - -## v0.45.13 - 2023-02-08 - -### Improvements - -* (deps) Bump Tendermint version to [v0.34.26](https://github.com/informalsystems/tendermint/releases/tag/v0.34.26). - -### Bug Fixes - -* (store) [#14798](https://github.com/cosmos/cosmos-sdk/pull/14798) Copy btree to avoid the problem of modify while iteration. - -## v0.45.12 - 2023-01-23 - -### Improvements - -* [#13881](https://github.com/cosmos/cosmos-sdk/pull/13881) Optimize iteration on nested cached KV stores and other operations in general. -* (store) [#11646](https://github.com/cosmos/cosmos-sdk/pull/11646) Add store name in tracekv-emitted store traces -* (deps) Bump Tendermint version to [v0.34.24](https://github.com/tendermint/tendermint/releases/tag/v0.34.24) and use Informal Systems fork. - -### API Breaking Changes - -* (store) [#13516](https://github.com/cosmos/cosmos-sdk/pull/13516) Update State Streaming APIs: - * Add method `ListenCommit` to `ABCIListener` - * Move `ListeningEnabled` and `AddListener` methods to `CommitMultiStore` - * Remove `CacheWrapWithListeners` from `CacheWrap` and `CacheWrapper` interfaces - * Remove listening APIs from the caching layer (it should only listen to the `rootmulti.Store`) - * Add three new options to file streaming service constructor. - * Modify `ABCIListener` such that any error from any method will always halt the app via `panic` - -### Bug Fixes - -* (store) [#12945](https://github.com/cosmos/cosmos-sdk/pull/12945) Fix nil end semantics in store/cachekv/iterator when iterating a dirty cache. -* (store) [#13516](https://github.com/cosmos/cosmos-sdk/pull/13516) Fix state listener that was observing writes at wrong time. - -## v0.45.11 - 2022-11-09 - -### Improvements - -* [#13896](https://github.com/cosmos/cosmos-sdk/pull/13896) Queries on pruned height returns error instead of empty values. -* (deps) Bump Tendermint version to [v0.34.23](https://github.com/tendermint/tendermint/releases/tag/v0.34.23). -* (deps) Bump IAVL version to [v0.19.4](https://github.com/cosmos/iavl/releases/tag/v0.19.4). - -### Bug Fixes - -* [#13673](https://github.com/cosmos/cosmos-sdk/pull/13673) Fix `--dry-run` flag not working when using tx command. - -### CLI Breaking Changes - -* [#13656](https://github.com/cosmos/cosmos-sdk/pull/13660) Rename `server.FlagIAVLFastNode` to `server.FlagDisableIAVLFastNode` for clarity. - -### API Breaking Changes - -* [#13673](https://github.com/cosmos/cosmos-sdk/pull/13673) The `GetFromFields` function now takes `Context` as an argument and removes `genOnly`. - -## [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: - -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 -``` - -### 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 - -* [#12981](https://github.com/cosmos/cosmos-sdk/pull/12981) Return proper error when parsing telemetry configuration. -* [#12885](https://github.com/cosmos/cosmos-sdk/pull/12885) Amortize cost of processing cache KV store. -* [#12970](https://github.com/cosmos/cosmos-sdk/pull/12970) Bump Tendermint to `v0.34.21` and IAVL to `v0.19.1`. -* [#12693](https://github.com/cosmos/cosmos-sdk/pull/12693) Make sure the order of each node is consistent when emitting proto events. - -### Bug Fixes - -* [#13046](https://github.com/cosmos/cosmos-sdk/pull/13046) Fix missing return statement in BaseApp.Query. - -## [v0.45.7](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.7) - 2022-08-04 - -### Features - -* (upgrade) [#12603](https://github.com/cosmos/cosmos-sdk/pull/12603) feat: Move AppModule.BeginBlock and AppModule.EndBlock to extension interfaces - -### Improvements - -* (events) [#12850](https://github.com/cosmos/cosmos-sdk/pull/12850) Add a new `fee_payer` attribute to the `tx` event that is emitted from the `DeductFeeDecorator` AnteHandler decorator. -* (x/params) [#12724](https://github.com/cosmos/cosmos-sdk/pull/12724) Add `GetParamSetIfExists` function to params `Subspace` to prevent panics on breaking changes. -* [#12668](https://github.com/cosmos/cosmos-sdk/pull/12668) Add `authz_msg_index` event attribute to message events emitted when executing via `MsgExec` through `x/authz`. -* [#12697](https://github.com/cosmos/cosmos-sdk/pull/12697) Upgrade IAVL to v0.19.0 with fast index and error propagation. NOTE: first start will take a while to propagate into new model. - * Note: after upgrading to this version it may take up to 15 minutes to migrate from 0.17 to 0.19. This time is used to create the fast cache introduced into IAVL for performance -* [#12784](https://github.com/cosmos/cosmos-sdk/pull/12784) Upgrade Tendermint to 0.34.20. -* (x/bank) [#12674](https://github.com/cosmos/cosmos-sdk/pull/12674) Add convenience function `CreatePrefixedAccountStoreKey()` to construct key to access account's balance for a given denom. - -### Bug Fixes - -* (x/mint) [#12384](https://github.com/cosmos/cosmos-sdk/pull/12384) Ensure `GoalBonded` must be positive when performing `x/mint` parameter validation. -* (simapp) [#12437](https://github.com/cosmos/cosmos-sdk/pull/12437) fix the non-determinstic behavior in simulations caused by `GenTx` and check -empty coins slice before it is used to create `banktype.MsgSend`. -* (x/capability) [12818](https://github.com/cosmos/cosmos-sdk/pull/12818) Use fixed length hex for pointer at FwdCapabilityKey. - -## [v0.45.6](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.6) - 2022-06-28 - -### Improvements - -* (simapp) [#12314](https://github.com/cosmos/cosmos-sdk/pull/12314) Increase `DefaultGenTxGas` from `1000000` to `10000000` -* [#12371](https://github.com/cosmos/cosmos-sdk/pull/12371) Update min required Golang version to 1.18. - -### Bug Fixes - -* [#12317](https://github.com/cosmos/cosmos-sdk/pull/12317) Rename `edit-validator` command's `--moniker` flag to `--new-moniker` -* (x/upgrade) [#12264](https://github.com/cosmos/cosmos-sdk/pull/12264) Fix `GetLastCompleteUpgrade` to properly return the latest upgrade. -* (x/crisis) [#12208](https://github.com/cosmos/cosmos-sdk/pull/12208) Fix progress index of crisis invariant assertion logs. - -### Features - -* (query) [#12253](https://github.com/cosmos/cosmos-sdk/pull/12253) Add `GenericFilteredPaginate` to the `query` package to improve UX. - -## [v0.45.5](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.5) - 2022-06-09 - -### Improvements - -* (x/feegrant) [#11813](https://github.com/cosmos/cosmos-sdk/pull/11813) Fix pagination total count in `AllowancesByGranter` query. -* (errors) [#12002](https://github.com/cosmos/cosmos-sdk/pull/12002) Removed 'redacted' error message from defaultErrEncoder. -* (ante) [#12017](https://github.com/cosmos/cosmos-sdk/pull/12017) Index ante events for failed tx (backport #12013). -* [#12153](https://github.com/cosmos/cosmos-sdk/pull/12153) Add a new `NewSimulationManagerFromAppModules` constructor, to simplify simulation wiring. - -### Bug Fixes - -* [#11796](https://github.com/cosmos/cosmos-sdk/pull/11796) Handle EOF error case in `readLineFromBuf`, which allows successful reading of passphrases from STDIN. -* [#11772](https://github.com/cosmos/cosmos-sdk/pull/11772) Limit types.Dec length to avoid overflow. -* [#10947](https://github.com/cosmos/cosmos-sdk/pull/10947) Add `AllowancesByGranter` query to the feegrant module -* [#9639](https://github.com/cosmos/cosmos-sdk/pull/9639) Check store keys length before accessing them by making sure that `key` is of length `m+1` (for `key[n:m]`) -* [#11983](https://github.com/cosmos/cosmos-sdk/pull/11983) (x/feegrant, x/authz) rename grants query commands to `grants-by-grantee`, `grants-by-granter` cmds. - -## Improvements - -* [#11886](https://github.com/cosmos/cosmos-sdk/pull/11886) Improve error messages - -## [v0.45.4](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.4) - 2022-04-25 - -### Bug Fixes - -* [#11624](https://github.com/cosmos/cosmos-sdk/pull/11624) Handle the error returned from `NewNode` in the `server` package. -* [#11724](https://github.com/cosmos/cosmos-sdk/pull/11724) Fix data race issues with `api.Server`. - -### Improvements - -* (types) [#12201](https://github.com/cosmos/cosmos-sdk/pull/12201) Add `MustAccAddressFromBech32` util function -* [#11693](https://github.com/cosmos/cosmos-sdk/pull/11693) Add validation for gentx cmd. -* [#11686](https://github.com/cosmos/cosmos-sdk/pull/11686) Update the min required Golang version to `1.17`. -* (x/auth/vesting) [#11652](https://github.com/cosmos/cosmos-sdk/pull/11652) Add util functions for `Period(s)` - -## [v0.45.3](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.3) - 2022-04-12 - -### Improvements - -* [#11562](https://github.com/cosmos/cosmos-sdk/pull/11562) Updated Tendermint to v0.34.19; `unsafe-reset-all` command has been moved to the `tendermint` sub-command. - -### Features - -* (x/upgrade) [#11551](https://github.com/cosmos/cosmos-sdk/pull/11551) Update `ScheduleUpgrade` for chains to schedule an automated upgrade on `BeginBlock` without having to go though governance. - -## [v0.45.2](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.2) - 2022-04-05 - -### Features - -* (tx) [#11533](https://github.com/cosmos/cosmos-sdk/pull/11533) Register [`EIP191`](https://eips.ethereum.org/EIPS/eip-191) as an available `SignMode` for chains to use. -* [#11430](https://github.com/cosmos/cosmos-sdk/pull/11430) Introduce a new `grpc-only` flag, such that when enabled, will start the node in a query-only mode. Note, gRPC MUST be enabled with this flag. -* (x/bank) [#11417](https://github.com/cosmos/cosmos-sdk/pull/11417) Introduce a new `SpendableBalances` gRPC query that retrieves an account's total (paginated) spendable balances. -* (x/bank) [#10771](https://github.com/cosmos/cosmos-sdk/pull/10771) Add safety check on bank module perms to allow module-specific mint restrictions (e.g. only minting a certain denom). -* (x/bank) [#10771](https://github.com/cosmos/cosmos-sdk/pull/10771) Add `bank.BankKeeper.WithMintCoinsRestriction` function to restrict use of bank `MintCoins` usage. This function is not on the bank `Keeper` interface, so it's not API-breaking, but only additive on the keeper implementation. -* [#10944](https://github.com/cosmos/cosmos-sdk/pull/10944) `x/authz` add all grants by grantee query -* [#11124](https://github.com/cosmos/cosmos-sdk/pull/11124) Add `GetAllVersions` to application store -* (x/auth) [#10880](https://github.com/cosmos/cosmos-sdk/pull/10880) Added a new query to the tx query service that returns a block with transactions fully decoded. -* [#11314](https://github.com/cosmos/cosmos-sdk/pull/11314) Add state rollback command. - -### Bug Fixes - -* [#11354](https://github.com/cosmos/cosmos-sdk/pull/11355) Added missing pagination flag for `bank q total` query. -* [#11197](https://github.com/cosmos/cosmos-sdk/pull/11197) Signing with multisig now works with multisig address which is not in the keyring. -* (client) [#11283](https://github.com/cosmos/cosmos-sdk/issues/11283) Support multiple keys for tx simulation and setting automatic gas for txs. -* (store) [#11177](https://github.com/cosmos/cosmos-sdk/pull/11177) Update the prune `everything` strategy to store the last two heights. -* (store) [#11117](https://github.com/cosmos/cosmos-sdk/pull/11117) Fix data race in store trace component -* (x/authz) [#11252](https://github.com/cosmos/cosmos-sdk/pull/11252) Allow insufficient funds error for authz simulation -* (crypto) [#11298](https://github.com/cosmos/cosmos-sdk/pull/11298) Fix cgo secp signature verification and update libscep256k1 library. -* (crypto) [#12122](https://github.com/cosmos/cosmos-sdk/pull/12122) Fix keyring migration issue. - -### Improvements - -* [#9576](https://github.com/cosmos/cosmos-sdk/pull/9576) Add debug error message to query result when enabled -* (types) [#11200](https://github.com/cosmos/cosmos-sdk/pull/11200) Added `Min()` and `Max()` operations on sdk.Coins. -* [#11267](https://github.com/cosmos/cosmos-sdk/pull/11267) Add hooks to allow app modules to add things to state-sync (backport #10961). - -## [v0.45.1](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.1) - 2022-02-03 - -### Bug Fixes - -* (grpc) [#10985](https://github.com/cosmos/cosmos-sdk/pull/10992) The `/cosmos/tx/v1beta1/txs/{hash}` endpoint returns a 404 when a tx does not exist. -* [#10990](https://github.com/cosmos/cosmos-sdk/pull/10990) Fixes missing `iavl-cache-size` config parsing in `GetConfig` method. -* [#11222](https://github.com/cosmos/cosmos-sdk/pull/11222) reject query with block height in the future - -### Improvements - -* [#10407](https://github.com/cosmos/cosmos-sdk/pull/10407) Added validation to `x/upgrade` module's `BeginBlock` to check accidental binary downgrades -* [#10768](https://github.com/cosmos/cosmos-sdk/pull/10768) Extra logging in in-place store migrations. - -## [v0.45.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.0) - 2022-01-18 - -### State Machine Breaking - -* [#10833](https://github.com/cosmos/cosmos-sdk/pull/10833) fix reported tx gas used when block gas limit exceeded. -* (auth) [#10536](https://github.com/cosmos/cosmos-sdk/pull/10536]) Enable `SetSequence` for `ModuleAccount`. -* (store) [#10218](https://github.com/cosmos/cosmos-sdk/pull/10218) Charge gas even when there are no entries while seeking. -* (store) [#10247](https://github.com/cosmos/cosmos-sdk/pull/10247) Charge gas for the key length in gas meter. -* (x/gov) [#10740](https://github.com/cosmos/cosmos-sdk/pull/10740) Increase maximum proposal description size from 5k characters to 10k characters. -* [#10814](https://github.com/cosmos/cosmos-sdk/pull/10814) revert tx when block gas limit exceeded. - -### API Breaking Changes - -* [#10561](https://github.com/cosmos/cosmos-sdk/pull/10561) The `CommitMultiStore` interface contains a new `SetIAVLCacheSize` method -* [#10922](https://github.com/cosmos/cosmos-sdk/pull/10922), [/#10956](https://github.com/cosmos/cosmos-sdk/pull/10956) Deprecate key `server.Generate*` functions and move them to `testutil` and support custom mnemonics in in-process testing network. Moved `TestMnemonic` from `testutil` package to `testdata`. -* [#11049](https://github.com/cosmos/cosmos-sdk/pull/11049) Add custom tendermint config variables into root command. Allows App developers to set config.toml variables. - -### Features - -* [#10614](https://github.com/cosmos/cosmos-sdk/pull/10614) Support in-place migration ordering - -### Improvements - -* [#10486](https://github.com/cosmos/cosmos-sdk/pull/10486) store/cachekv's `Store.Write` conservatively - looks up keys, but also uses the [map clearing idiom](https://bencher.orijtech.com/perfclinic/mapclearing/) - to reduce the RAM usage, CPU time usage, and garbage collection pressure from clearing maps, - instead of allocating new maps. -* (module) [#10711](https://github.com/cosmos/cosmos-sdk/pull/10711) Panic at startup if the app developer forgot to add modules in the `SetOrder{BeginBlocker, EndBlocker, InitGenesis, ExportGenesis}` functions. This means that all modules, even those who have empty implementations for those methods, need to be added to `SetOrder*`. -* (types) [#10076](https://github.com/cosmos/cosmos-sdk/pull/10076) Significantly speedup and lower allocations for `Coins.String()`. -* (auth) [#10022](https://github.com/cosmos/cosmos-sdk/pull/10022) `AuthKeeper` interface in `x/auth` now includes a function `HasAccount`. -* [#10393](https://github.com/cosmos/cosmos-sdk/pull/10393) Add `HasSupply` method to bank keeper to ensure that input denom actually exists on chain. - -### Bug Fixes - -* (std/codec) [/#10595](https://github.com/cosmos/cosmos-sdk/pull/10595) Add evidence to std/codec to be able to decode evidence in client interactions. -* (types) [#9627](https://github.com/cosmos/cosmos-sdk/pull/9627) Fix nil pointer panic on `NewBigIntFromInt`. -* [#10725](https://github.com/cosmos/cosmos-sdk/pull/10725) populate `ctx.ConsensusParams` for begin/end blockers. -* [#9829](https://github.com/cosmos/cosmos-sdk/pull/9829) Fixed Coin denom sorting not being checked during `Balance.Validate` check. Refactored the Validation logic to use `Coins.Validate` for `Balance.Coins` -* [#10061](https://github.com/cosmos/cosmos-sdk/pull/10061) and [#10515](https://github.com/cosmos/cosmos-sdk/pull/10515) Ensure that `LegacyAminoPubKey` struct correctly unmarshals from JSON - -## [v0.44.8](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.44.8) - 2022-04-12 - -### Improvements - -* [#11563](https://github.com/cosmos/cosmos-sdk/pull/11563) Updated Tendermint to v0.34.19; `unsafe-reset-all` command has been moved to the `tendermint` sub-command. - -## [v0.44.7](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.44.7) - 2022-04-04 - -### Features - -* (x/bank) [#10771](https://github.com/cosmos/cosmos-sdk/pull/10771) Add safety check on bank module perms to allow module-specific mint restrictions (e.g. only minting a certain denom). -* (x/bank) [#10771](https://github.com/cosmos/cosmos-sdk/pull/10771) Add `bank.BankKeeper.WithMintCoinsRestriction` function to restrict use of bank `MintCoins` usage. This function is not on the bank `Keeper` interface, so it's not API-breaking, but only additive on the keeper implementation. - -### Bug Fixes - -* [#11354](https://github.com/cosmos/cosmos-sdk/pull/11355) Added missing pagination flag for `bank q total` query. -* (store) [#11177](https://github.com/cosmos/cosmos-sdk/pull/11177) Update the prune `everything` strategy to store the last two heights. -* (store) [#11117](https://github.com/cosmos/cosmos-sdk/pull/11117) Fix data race in store trace component -* (x/authz) [#11252](https://github.com/cosmos/cosmos-sdk/pull/11252) Allow insufficient funds error for authz simulation - -### Improvements - -* [#9576](https://github.com/cosmos/cosmos-sdk/pull/9576) Add debug error message to query result when enabled - -## [v0.44.6](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.44.6) - 2022-02-02 - -### Features - -* [#11124](https://github.com/cosmos/cosmos-sdk/pull/11124) Add `GetAllVersions` to application store - -### Bug Fixes - -* (grpc) [#10985](https://github.com/cosmos/cosmos-sdk/pull/10992) The `/cosmos/tx/v1beta1/txs/{hash}` endpoint returns a 404 when a tx does not exist. -* (std/codec) [/#10595](https://github.com/cosmos/cosmos-sdk/pull/10595) Add evidence to std/codec to be able to decode evidence in client interactions. -* [#10725](https://github.com/cosmos/cosmos-sdk/pull/10725) populate `ctx.ConsensusParams` for begin/end blockers. -* [#10061](https://github.com/cosmos/cosmos-sdk/pull/10061) and [#10515](https://github.com/cosmos/cosmos-sdk/pull/10515) Ensure that `LegacyAminoPubKey` struct correctly unmarshals from JSON - -### Improvements - -* [#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 - -* (baseapp) [#10631](https://github.com/cosmos/cosmos-sdk/pull/10631) Emit ante events even for the failed txs. -* (store) [#10741](https://github.com/cosmos/cosmos-sdk/pull/10741) Significantly speedup iterator creation after delete heavy workloads. Significantly improves IBC migration times. - -### Bug Fixes - -* [#10648](https://github.com/cosmos/cosmos-sdk/pull/10648) Upgrade IAVL to 0.17.3 to solve race condition bug in IAVL. - -## [v0.44.4](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.44.4) - 2021-11-25 - -### Improvements - -* (types) [#10630](https://github.com/cosmos/cosmos-sdk/pull/10630) Add an `Events` field to the `TxResponse` type that captures *all* events emitted by a transaction, unlike `Logs` which only contains events emitted during message execution. -* (x/upgrade) [#10532](https://github.com/cosmos/cosmos-sdk/pull/10532) Add `keeper.DumpUpgradeInfoWithInfoToDisk` to include `Plan.Info` in the upgrade-info file. -* (store) [#10544](https://github.com/cosmos/cosmos-sdk/pull/10544) Use the new IAVL iterator structure which significantly improves iterator performance. - -### Bug Fixes - -* [#10827](https://github.com/cosmos/cosmos-sdk/pull/10827) Create query `Context` with requested block height -* [#10414](https://github.com/cosmos/cosmos-sdk/pull/10414) Use `sdk.GetConfig().GetFullBIP44Path()` instead `sdk.FullFundraiserPath` to generate key -* (bank) [#10394](https://github.com/cosmos/cosmos-sdk/pull/10394) Fix: query account balance by ibc denom. -* [\10608](https://github.com/cosmos/cosmos-sdk/pull/10608) Change the order of module migration by pushing x/auth to the end. Auth module depends on other modules and should be run last. We have updated the documentation to provide more details how to change module migration order. This is technically a breaking change, but only impacts updates between the upgrades with version change, hence migrating from the previous patch release doesn't cause new migration and doesn't break the state. -* [#10674](https://github.com/cosmos/cosmos-sdk/pull/10674) Fix issue with `Error.Wrap` and `Error.Wrapf` usage with `errors.Is`. - -## [v0.44.3](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.44.3) - 2021-10-21 - -### Improvements - -* [#10768](https://github.com/cosmos/cosmos-sdk/pull/10768) Added extra logging for tracking in-place store migrations -* [#10262](https://github.com/cosmos/cosmos-sdk/pull/10262) Remove unnecessary logging in `x/feegrant` simulation. -* [#10327](https://github.com/cosmos/cosmos-sdk/pull/10327) Add null guard for possible nil `Amount` in tx fee `Coins` -* [#10339](https://github.com/cosmos/cosmos-sdk/pull/10339) Improve performance of `removeZeroCoins` by only allocating memory when necessary -* [#10045](https://github.com/cosmos/cosmos-sdk/pull/10045) Revert [#8549](https://github.com/cosmos/cosmos-sdk/pull/8549). Do not route grpc queries through Tendermint. -* (deps) [#10375](https://github.com/cosmos/cosmos-sdk/pull/10375) Bump Tendermint to [v0.34.14](https://github.com/tendermint/tendermint/releases/tag/v0.34.14). -* [#10024](https://github.com/cosmos/cosmos-sdk/pull/10024) `store/cachekv` performance improvement by reduced growth factor for iterator ranging by using binary searches to find dirty items when unsorted key count >= 1024. - -### Bug Fixes - -* (client) [#10226](https://github.com/cosmos/cosmos-sdk/pull/10226) Fix --home flag parsing. -* (rosetta) [#10340](https://github.com/cosmos/cosmos-sdk/pull/10340) Use `GenesisChunked(ctx)` instead `Genesis(ctx)` to get genesis block height - -## [v0.44.2](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.44.2) - 2021-10-12 - -Security Release. No breaking changes related to 0.44.x. - -## [v0.44.1](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.44.1) - 2021-09-29 - -### Improvements - -* (store) [#10040](https://github.com/cosmos/cosmos-sdk/pull/10040) Bump IAVL to v0.17.1 which includes performance improvements on a batch load. -* (types) [#10021](https://github.com/cosmos/cosmos-sdk/pull/10021) Speedup coins.AmountOf(), by removing many intermittent regex calls. -* [#10077](https://github.com/cosmos/cosmos-sdk/pull/10077) Remove telemetry on `GasKV` and `CacheKV` store Get/Set operations, significantly improving their performance. -* (store) [#10026](https://github.com/cosmos/cosmos-sdk/pull/10026) Improve CacheKVStore datastructures / algorithms, to no longer take O(N^2) time when interleaving iterators and insertions. - -### Bug Fixes - -* [#9969](https://github.com/cosmos/cosmos-sdk/pull/9969) fix: use keyring in config for add-genesis-account cmd. -* (x/genutil) [#10104](https://github.com/cosmos/cosmos-sdk/pull/10104) Ensure the `init` command reads the `--home` flag value correctly. -* (x/feegrant) [#10049](https://github.com/cosmos/cosmos-sdk/issues/10049) Fixed the error message when `period` or `period-limit` flag is not set on a feegrant grant transaction. - -### Client Breaking Changes - -* [#9879](https://github.com/cosmos/cosmos-sdk/pull/9879) Modify ABCI Queries to use `abci.QueryRequest` Height field if it is non-zero, otherwise continue using context height. - -## [v0.44.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.44.0) - 2021-09-01 - -### Features - -* [#9860](https://github.com/cosmos/cosmos-sdk/pull/9860) Emit transaction fee in ante handler fee decorator. The event type is `tx` and the attribute is `fee`. - -### Improvements - -* (deps) [#9956](https://github.com/cosmos/cosmos-sdk/pull/9956) Bump Tendermint to [v0.34.12](https://github.com/tendermint/tendermint/releases/tag/v0.34.12). - -### Deprecated - -* (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) - -### Bug Fixes - -* [#9965](https://github.com/cosmos/cosmos-sdk/pull/9965) Fixed `simd version` command output to report the right release tag. -* (x/upgrade) [#10189](https://github.com/cosmos/cosmos-sdk/issues/10189) Removed potential sources of non-determinism in upgrades. - -### Client Breaking Changes - -* [#10041](https://github.com/cosmos/cosmos-sdk/pull/10041) Remove broadcast & encode legacy REST endpoints. Please see the [REST Endpoints Migration guide](https://docs.cosmos.network/v0.45/migrations/rest.html) to migrate to the new REST endpoints. - -## [v0.43.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.43.0) - 2021-08-10 - -### Features - -* [#6711](https://github.com/cosmos/cosmos-sdk/pull/6711) Make integration test suites reusable by apps, tests are exported in each module's `client/testutil` package. -* [#8077](https://github.com/cosmos/cosmos-sdk/pull/8077) Added support for grpc-web, enabling browsers to communicate with a chain's gRPC server -* [#8965](https://github.com/cosmos/cosmos-sdk/pull/8965) cosmos reflection now provides more information on the application such as: deliverable msgs, sdk.Config info etc (still in alpha stage). -* [#8520](https://github.com/cosmos/cosmos-sdk/pull/8520) Add support for permanently locked vesting accounts. -* [#8559](https://github.com/cosmos/cosmos-sdk/pull/8559) Added Protobuf compatible secp256r1 ECDSA signatures. -* [#8786](https://github.com/cosmos/cosmos-sdk/pull/8786) Enabled secp256r1 in x/auth. -* (rosetta) [#8729](https://github.com/cosmos/cosmos-sdk/pull/8729) Data API fully supports balance tracking. Construction API can now construct any message supported by the application. -* [#8754](https://github.com/cosmos/cosmos-sdk/pull/8875) Added support for reverse iteration to pagination. -* (types) [#9079](https://github.com/cosmos/cosmos-sdk/issues/9079) Add `AddAmount`/`SubAmount` methods to `sdk.Coin`. -* [#9088](https://github.com/cosmos/cosmos-sdk/pull/9088) Added implementation to ADR-28 Derived Addresses. -* [#9133](https://github.com/cosmos/cosmos-sdk/pull/9133) Added hooks for governance actions. -* (x/staking) [#9214](https://github.com/cosmos/cosmos-sdk/pull/9214) Added `new_shares` attribute inside `EventTypeDelegate` event. -* [#9382](https://github.com/cosmos/cosmos-sdk/pull/9382) feat: add Dec.Float64() function. -* [#9457](https://github.com/cosmos/cosmos-sdk/pull/9457) Add amino support for x/authz and x/feegrant Msgs. -* [#9498](https://github.com/cosmos/cosmos-sdk/pull/9498) Added `Codec: codec.Codec` attribute to `client/Context` structure. -* [#9540](https://github.com/cosmos/cosmos-sdk/pull/9540) Add output flag for query txs command. -* (errors) [#8845](https://github.com/cosmos/cosmos-sdk/pull/8845) Add `Error.Wrap` handy method -* [#8518](https://github.com/cosmos/cosmos-sdk/pull/8518) Help users of multisig wallets debug signature issues. -* [#9573](https://github.com/cosmos/cosmos-sdk/pull/9573) ADR 040 implementation: New DB interface -* [#9952](https://github.com/cosmos/cosmos-sdk/pull/9952) ADR 040: Implement in-memory DB backend -* [#9848](https://github.com/cosmos/cosmos-sdk/pull/9848) ADR-040: Implement BadgerDB backend -* [#9851](https://github.com/cosmos/cosmos-sdk/pull/9851) ADR-040: Implement RocksDB backend -* [#10308](https://github.com/cosmos/cosmos-sdk/pull/10308) ADR-040: Implement DBConnection.Revert -* [#9892](https://github.com/cosmos/cosmos-sdk/pull/9892) ADR-040: KV Store with decoupled storage and state commitment - -### Client Breaking Changes - -* [#8363](https://github.com/cosmos/cosmos-sdk/pull/8363) Addresses no longer have a fixed 20-byte length. From the SDK modules' point of view, any 1-255 bytes-long byte array is a valid address. -* (crypto/ed25519) [#8690] Adopt zip1215 ed2559 verification rules. -* [#8849](https://github.com/cosmos/cosmos-sdk/pull/8849) Upgrade module no longer supports time based upgrades. -* [#7477](https://github.com/cosmos/cosmos-sdk/pull/7477) Changed Bech32 Public Key serialization in the client facing functionality (CLI, MsgServer, QueryServer): - * updated the keyring display structure (it uses protobuf JSON serialization) - the output is more verbose. - * Renamed `MarshalAny` and `UnmarshalAny` to `MarshalInterface` and `UnmarshalInterface` respectively. These functions must take an interface as parameter (not a concrete type nor `Any` object). Underneath they use `Any` wrapping for correct protobuf serialization. - * CLI: removed `--text` flag from `show-node-id` command; the text format for public keys is not used any more - instead we use ProtoJSON. -* (store) [#8790](https://github.com/cosmos/cosmos-sdk/pull/8790) Reduce gas costs by 10x for transient store operations. -* [#9139](https://github.com/cosmos/cosmos-sdk/pull/9139) Querying events: - * via `ServiceMsg` TypeURLs (e.g. `message.action='/cosmos.bank.v1beta1.Msg/Send'`) does not work anymore, - * via legacy `msg.Type()` (e.g. `message.action='send'`) is being deprecated, new `Msg`s won't emit these events. - * Please use concrete `Msg` TypeURLs instead (e.g. `message.action='/cosmos.bank.v1beta1.MsgSend'`). -* [#9859](https://github.com/cosmos/cosmos-sdk/pull/9859) The `default` pruning strategy now keeps the last 362880 blocks instead of 100. 362880 equates to roughly enough blocks to cover the entire unbonding period assuming a 21 day unbonding period and 5s block time. -* [#9785](https://github.com/cosmos/cosmos-sdk/issues/9785) Missing coin denomination in logs - -### API Breaking Changes - -* (keyring) [#8662](https://github.com/cosmos/cosmos-sdk/pull/8662) `NewMnemonic` now receives an additional `passphrase` argument to secure the key generated by the bip39 mnemonic. -* (x/bank) [#8473](https://github.com/cosmos/cosmos-sdk/pull/8473) Bank keeper does not expose unsafe balance changing methods such as `SetBalance`, `SetSupply` etc. -* (x/staking) [#8473](https://github.com/cosmos/cosmos-sdk/pull/8473) On genesis init, if non bonded pool and bonded pool balance, coming from the bank module, does not match what is saved in the staking state, the initialization will panic. -* (x/gov) [#8473](https://github.com/cosmos/cosmos-sdk/pull/8473) On genesis init, if the gov module account balance, coming from bank module state, does not match the one in gov module state, the initialization will panic. -* (x/distribution) [#8473](https://github.com/cosmos/cosmos-sdk/pull/8473) On genesis init, if the distribution module account balance, coming from bank module state, does not match the one in distribution module state, the initialization will panic. -* (client/keys) [#8500](https://github.com/cosmos/cosmos-sdk/pull/8500) `InfoImporter` interface is removed from legacy keybase. -* (x/staking) [#8505](https://github.com/cosmos/cosmos-sdk/pull/8505) `sdk.PowerReduction` has been renamed to `sdk.DefaultPowerReduction`, and most staking functions relying on power reduction take a new function argument, instead of relying on that global variable. -* [#8629](https://github.com/cosmos/cosmos-sdk/pull/8629) Deprecated `SetFullFundraiserPath` from `Config` in favor of `SetPurpose` and `SetCoinType`. -* (x/upgrade) [#8673](https://github.com/cosmos/cosmos-sdk/pull/8673) Remove IBC logic from x/upgrade. Deprecates IBC fields in an Upgrade Plan, an error will be thrown if they are set. IBC upgrade logic moved to 02-client and an IBC UpgradeProposal is added. -* (x/bank) [#8517](https://github.com/cosmos/cosmos-sdk/pull/8517) `SupplyI` interface and `Supply` are removed and uses `sdk.Coins` for supply tracking -* (x/upgrade) [#8743](https://github.com/cosmos/cosmos-sdk/pull/8743) `UpgradeHandler` includes a new argument `VersionMap` which helps facilitate in-place migrations. -* (x/auth) [#8129](https://github.com/cosmos/cosmos-sdk/pull/8828) Updated `SigVerifiableTx.GetPubKeys` method signature to return error. -* (x/upgrade) [\7487](https://github.com/cosmos/cosmos-sdk/pull/8897) Upgrade `Keeper` takes new argument `ProtocolVersionSetter` which implements setting a protocol version on baseapp. -* (baseapp) [\7487](https://github.com/cosmos/cosmos-sdk/pull/8897) BaseApp's fields appVersion and version were swapped to match Tendermint's fields. -* [#8682](https://github.com/cosmos/cosmos-sdk/pull/8682) `ante.NewAnteHandler` updated to receive all positional params as `ante.HandlerOptions` struct. If required fields aren't set, throws error accordingly. -* (x/staking/types) [#7447](https://github.com/cosmos/cosmos-sdk/issues/7447) Remove bech32 PubKey support: - * `ValidatorI` interface update: `GetConsPubKey` renamed to `TmConsPubKey` (this is to clarify the return type: consensus public key must be a tendermint key); `TmConsPubKey`, `GetConsAddr` methods return error. - * `Validator` updated according to the `ValidatorI` changes described above. - * `ToTmValidator` function: added `error` to return values. - * `Validator.ConsensusPubkey` type changed from `string` to `codectypes.Any`. - * `MsgCreateValidator.Pubkey` type changed from `string` to `codectypes.Any`. -* (client) [#8926](https://github.com/cosmos/cosmos-sdk/pull/8926) `client/tx.PrepareFactory` has been converted to a private function, as it's only used internally. -* (auth/tx) [#8926](https://github.com/cosmos/cosmos-sdk/pull/8926) The `ProtoTxProvider` interface used as a workaround for transaction simulation has been removed. -* (x/bank) [#8798](https://github.com/cosmos/cosmos-sdk/pull/8798) `GetTotalSupply` is removed in favour of `GetPaginatedTotalSupply` -* (keyring) [#8739](https://github.com/cosmos/cosmos-sdk/pull/8739) Rename InfoImporter -> LegacyInfoImporter. -* (x/bank/types) [#9061](https://github.com/cosmos/cosmos-sdk/pull/9061) `AddressFromBalancesStore` now returns an error for invalid key instead of panic. -* (x/auth) [#9144](https://github.com/cosmos/cosmos-sdk/pull/9144) The `NewTxTimeoutHeightDecorator` antehandler has been converted from a struct to a function. -* (codec) [#9226](https://github.com/cosmos/cosmos-sdk/pull/9226) Rename codec interfaces and methods, to follow a general Go interfaces: - * `codec.Marshaler` → `codec.Codec` (this defines objects which serialize other objects) - * `codec.BinaryMarshaler` → `codec.BinaryCodec` - * `codec.JSONMarshaler` → `codec.JSONCodec` - * Removed `BinaryBare` suffix from `BinaryCodec` methods (`MarshalBinaryBare`, `UnmarshalBinaryBare`, ...) - * Removed `Binary` infix from `BinaryCodec` methods (`MarshalBinaryLengthPrefixed`, `UnmarshalBinaryLengthPrefixed`, ...) -* [#9139](https://github.com/cosmos/cosmos-sdk/pull/9139) `ServiceMsg` TypeURLs (e.g. `/cosmos.bank.v1beta1.Msg/Send`) have been removed, as they don't comply to the Probobuf `Any` spec. Please use `Msg` type TypeURLs (e.g. `/cosmos.bank.v1beta1.MsgSend`). This has multiple consequences: - * The `sdk.ServiceMsg` struct has been removed. - * `sdk.Msg` now only contains `ValidateBasic` and `GetSigners` methods. The remaining methods `GetSignBytes`, `Route` and `Type` are moved to `legacytx.LegacyMsg`. - * The `RegisterCustomTypeURL` function and the `cosmos.base.v1beta1.ServiceMsg` interface have been removed from the interface registry. -* (codec) [#9251](https://github.com/cosmos/cosmos-sdk/pull/9251) Rename `clientCtx.JSONMarshaler` to `clientCtx.JSONCodec` as per #9226. -* (x/bank) [#9271](https://github.com/cosmos/cosmos-sdk/pull/9271) SendEnabledCoin(s) renamed to IsSendEnabledCoin(s) to better reflect its functionality. -* (x/bank) [#9550](https://github.com/cosmos/cosmos-sdk/pull/9550) `server.InterceptConfigsPreRunHandler` now takes 2 additional arguments: customAppConfigTemplate and customAppConfig. If you don't need to customize these, simply put `""` and `nil`. -* [#8245](https://github.com/cosmos/cosmos-sdk/pull/8245) Removed `simapp.MakeCodecs` and use `simapp.MakeTestEncodingConfig` instead. -* (x/capability) [#9836](https://github.com/cosmos/cosmos-sdk/pull/9836) Removed `InitializeAndSeal(ctx sdk.Context)` and replaced with `Seal()`. App must add x/capability module to the begin blockers which will assure that the x/capability keeper is properly initialized. The x/capability begin blocker must be run before any other module which uses x/capability. - -### State Machine Breaking - -* (x/{bank,distrib,gov,slashing,staking}) [#8363](https://github.com/cosmos/cosmos-sdk/issues/8363) Store keys have been modified to allow for variable-length addresses. -* (x/evidence) [#8502](https://github.com/cosmos/cosmos-sdk/pull/8502) `HandleEquivocationEvidence` persists the evidence to state. -* (x/gov) [#7733](https://github.com/cosmos/cosmos-sdk/pull/7733) ADR 037 Implementation: Governance Split Votes, use `MsgWeightedVote` to send a split vote. Sending a regular `MsgVote` will convert the underlying vote option into a weighted vote with weight 1. -* (x/bank) [#8656](https://github.com/cosmos/cosmos-sdk/pull/8656) balance and supply are now correctly tracked via `coin_spent`, `coin_received`, `coinbase` and `burn` events. -* (x/bank) [#8517](https://github.com/cosmos/cosmos-sdk/pull/8517) Supply is now stored and tracked as `sdk.Coins` -* (x/bank) [#9051](https://github.com/cosmos/cosmos-sdk/pull/9051) Supply value is stored as `sdk.Int` rather than `string`. - -### CLI Breaking Changes - -* [#8880](https://github.com/cosmos/cosmos-sdk/pull/8880) The CLI `simd migrate v0.40 ...` command has been renamed to `simd migrate v0.42`. -* [#8628](https://github.com/cosmos/cosmos-sdk/issues/8628) Commands no longer print outputs using `stderr` by default -* [#9134](https://github.com/cosmos/cosmos-sdk/pull/9134) Renamed the CLI flag `--memo` to `--note`. -* [#9291](https://github.com/cosmos/cosmos-sdk/pull/9291) Migration scripts prior to v0.38 have been removed from the CLI `migrate` command. The oldest supported migration is v0.39->v0.42. -* [#9371](https://github.com/cosmos/cosmos-sdk/pull/9371) Non-zero default fees/Server will error if there's an empty value for min-gas-price in app.toml -* [#9827](https://github.com/cosmos/cosmos-sdk/pull/9827) Ensure input parity of validator public key input between `tx staking create-validator` and `gentx`. -* [#9621](https://github.com/cosmos/cosmos-sdk/pull/9621) Rollback [#9371](https://github.com/cosmos/cosmos-sdk/pull/9371) and log warning if there's an empty value for min-gas-price in app.toml +* (crypto/keyring) [#21653](https://github.com/cosmos/cosmos-sdk/pull/21653) New Linux-only backend that adds Linux kernel's `keyctl` support. ### Improvements -* (store) [#8012](https://github.com/cosmos/cosmos-sdk/pull/8012) Implementation of ADR-038 WriteListener and listen.KVStore -* (x/bank) [#8614](https://github.com/cosmos/cosmos-sdk/issues/8614) Add `Name` and `Symbol` fields to denom metadata -* (x/auth) [#8522](https://github.com/cosmos/cosmos-sdk/pull/8522) Allow to query all stored accounts -* (crypto/types) [#8600](https://github.com/cosmos/cosmos-sdk/pull/8600) `CompactBitArray`: optimize the `NumTrueBitsBefore` method and add an `Equal` method. -* (x/upgrade) [#8743](https://github.com/cosmos/cosmos-sdk/pull/8743) Add tracking module versions as per ADR-041 -* (types) [#8962](https://github.com/cosmos/cosmos-sdk/issues/8962) Add `Abs()` method to `sdk.Int`. -* (x/bank) [#8950](https://github.com/cosmos/cosmos-sdk/pull/8950) Improve efficiency on supply updates. -* (store) [#8811](https://github.com/cosmos/cosmos-sdk/pull/8811) store/cachekv: use typed `types/kv.List` instead of `container/list.List`. The change brings time spent on the time assertion cummulatively to 580ms down from 6.88s. -* (keyring) [#8826](https://github.com/cosmos/cosmos-sdk/pull/8826) add trust to macOS Keychain for calling apps by default, avoiding repeating keychain popups that appears when dealing with keyring (key add, list, ...) operations. -* (makefile) [#7933](https://github.com/cosmos/cosmos-sdk/issues/7933) Use Docker to generate swagger files. -* (crypto/types) [#9196](https://github.com/cosmos/cosmos-sdk/pull/9196) Fix negative index accesses in CompactUnmarshal,GetIndex,SetIndex -* (makefile) [#9192](https://github.com/cosmos/cosmos-sdk/pull/9192) Reuse proto containers in proto related jobs. -* [#9205](https://github.com/cosmos/cosmos-sdk/pull/9205) Improve readability in `abci` handleQueryP2P -* [#9231](https://github.com/cosmos/cosmos-sdk/pull/9231) Remove redundant staking errors. -* [#9314](https://github.com/cosmos/cosmos-sdk/pull/9314) Update Rosetta SDK to upstream's latest release. -* (gRPC-Web) [#9493](https://github.com/cosmos/cosmos-sdk/pull/9493) Add `EnableUnsafeCORS` flag to grpc-web config. -* (x/params) [#9481](https://github.com/cosmos/cosmos-sdk/issues/9481) Speedup simulator for parameter change proposals. -* (x/staking) [#9423](https://github.com/cosmos/cosmos-sdk/pull/9423) Staking delegations now returns empty list instead of rpc error when no records found. -* (x/auth) [#9553](https://github.com/cosmos/cosmos-sdk/pull/9553) The `--multisig` flag now accepts both a name and address. -* [#8549](https://github.com/cosmos/cosmos-sdk/pull/8549) Make gRPC requests go through tendermint Query -* [#8093](https://github.com/cosmos/cosmos-sdk/pull/8093) Limit usage of context.background. -* [#8460](https://github.com/cosmos/cosmos-sdk/pull/8460) Ensure b.ReportAllocs() in all the benchmarks -* [#8461](https://github.com/cosmos/cosmos-sdk/pull/8461) Fix upgrade tx commands not showing up in CLI +* (server) [#21941](https://github.com/cosmos/cosmos-sdk/pull/21941) Regenerate addrbook.json for in place testnet. ### Bug Fixes -* (gRPC) [#8945](https://github.com/cosmos/cosmos-sdk/pull/8945) gRPC reflection now works correctly. -* (keyring) [#8635](https://github.com/cosmos/cosmos-sdk/issues/8635) Remove hardcoded default passphrase value on `NewMnemonic` -* (x/bank) [#8434](https://github.com/cosmos/cosmos-sdk/pull/8434) Fix legacy REST API `GET /bank/total` and `GET /bank/total/{denom}` in swagger -* (x/slashing) [#8427](https://github.com/cosmos/cosmos-sdk/pull/8427) Fix query signing infos command -* (x/bank/types) [#9112](https://github.com/cosmos/cosmos-sdk/pull/9112) fix AddressFromBalancesStore address length overflow -* (x/bank) [#9229](https://github.com/cosmos/cosmos-sdk/pull/9229) Now zero coin balances cannot be added to balances & supply stores. If any denom becomes zero corresponding key gets deleted from store. State migration: [#9664](https://github.com/cosmos/cosmos-sdk/pull/9664). -* [#9363](https://github.com/cosmos/cosmos-sdk/pull/9363) Check store key uniqueness in app wiring. -* [#9460](https://github.com/cosmos/cosmos-sdk/pull/9460) Fix lint error in `MigratePrefixAddress`. -* [#9480](https://github.com/cosmos/cosmos-sdk/pull/9480) Fix added keys when using `--dry-run`. -* (types) [#9511](https://github.com/cosmos/cosmos-sdk/pull/9511) Change `maxBitLen` of `sdk.Int` and `sdk.Dec` to handle max ERC20 value. -* [#9454](https://github.com/cosmos/cosmos-sdk/pull/9454) Fix testnet command with --node-dir-prefix accepts `-` and change `node-dir-prefix token` to `testtoken`. -* (keyring) [#9562](https://github.com/cosmos/cosmos-sdk/pull/9563) fix keyring kwallet backend when using with empty wallet. -* (keyring) [#9583](https://github.com/cosmos/cosmos-sdk/pull/9583) Fix correct population of legacy `Vote.Option` field for votes with 1 VoteOption of weight 1. -* (x/distinction) [#8918](https://github.com/cosmos/cosmos-sdk/pull/8918) Fix module's parameters validation. -* (x/gov/types) [#8586](https://github.com/cosmos/cosmos-sdk/pull/8586) Fix bug caused by NewProposal that unnecessarily creates a Proposal object that’s discarded on any error. -* [#8580](https://github.com/cosmos/cosmos-sdk/pull/8580) Use more cheaper method from the math/big package that provides a way to trivially check if a value is zero with .BitLen() == 0 -* [#8567](https://github.com/cosmos/cosmos-sdk/pull/8567) Fix bug by introducing pagination to GetValidatorSetByHeight response -* (x/bank) [#8531](https://github.com/cosmos/cosmos-sdk/pull/8531) Fix bug caused by ignoring errors returned by Balance.GetAddress() -* (server) [#8399](https://github.com/cosmos/cosmos-sdk/pull/8399) fix gRPC-web flag default value -* [#8282](https://github.com/cosmos/cosmos-sdk/pull/8282) fix zero time checks -* (cli) [#9593](https://github.com/cosmos/cosmos-sdk/pull/9593) Check if chain-id is blank before verifying signatures in multisign and error. -* [#9720](https://github.com/cosmos/cosmos-sdk/pull/9720) Feegrant grant cli granter now accepts key name as well as address in general and accepts only address in --generate-only mode -* [#9793](https://github.com/cosmos/cosmos-sdk/pull/9793) Fixed ECDSA/secp256r1 transaction malleability. -* (server) [#9704](https://github.com/cosmos/cosmos-sdk/pull/9704) Start GRPCWebServer in goroutine, avoid blocking other services from starting. -* (bank) [#9687](https://github.com/cosmos/cosmos-sdk/issues/9687) fixes [#9159](https://github.com/cosmos/cosmos-sdk/issues/9159). Added migration to prune balances with zero coins. +* (x/group) [#22425](https://github.com/cosmos/cosmos-sdk/pull/22425) Proper address rendering in error +* (sims) [#21906](https://github.com/cosmos/cosmos-sdk/pull/21906) Skip sims test when running dry on validators +* (cli) [#21919](https://github.com/cosmos/cosmos-sdk/pull/21919) Query address-by-acc-num by account_id instead of id. +* (x/group) [#22229](https://github.com/cosmos/cosmos-sdk/pull/22229) Accept `1` and `try` in CLI for group proposal exec. -### Deprecated +## [v0.50.10](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.10) - 2024-09-20 -* (grpc) [#8926](https://github.com/cosmos/cosmos-sdk/pull/8926) The `tx` field in `SimulateRequest` has been deprecated, prefer to pass `tx_bytes` instead. -* (sdk types) [#9498](https://github.com/cosmos/cosmos-sdk/pull/9498) `clientContext.JSONCodec` will be removed in the next version. use `clientContext.Codec` instead. +### Features -## [v0.42.10](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.42.10) - 2021-09-28 +* (cli) [#20779](https://github.com/cosmos/cosmos-sdk/pull/20779) Added `module-hash-by-height` command to query and retrieve module hashes at a specified blockchain height, enhancing debugging capabilities. +* (cli) [#21372](https://github.com/cosmos/cosmos-sdk/pull/21372) Added a `bulk-add-genesis-account` genesis command to add many genesis accounts at once. +* (types/collections) [#21724](https://github.com/cosmos/cosmos-sdk/pull/21724) Added `LegacyDec` collection value. ### Improvements -* (store) [#10026](https://github.com/cosmos/cosmos-sdk/pull/10026) Improve CacheKVStore datastructures / algorithms, to no longer take O(N^2) time when interleaving iterators and insertions. -* (store) [#10040](https://github.com/cosmos/cosmos-sdk/pull/10040) Bump IAVL to v0.17.1 which includes performance improvements on a batch load. -* [#10211](https://github.com/cosmos/cosmos-sdk/pull/10211) Backport of the mechanism to reject redundant IBC transactions from [ibc-go \#235](https://github.com/cosmos/ibc-go/pull/235). +* (x/bank) [#21460](https://github.com/cosmos/cosmos-sdk/pull/21460) Added `Sender` attribute in `MsgMultiSend` event. +* (genutil) [#21701](https://github.com/cosmos/cosmos-sdk/pull/21701) Improved error messages for genesis validation. +* (testutil/integration) [#21816](https://github.com/cosmos/cosmos-sdk/pull/21816) Allow to pass baseapp options in `NewIntegrationApp`. ### Bug Fixes -* [#9969](https://github.com/cosmos/cosmos-sdk/pull/9969) fix: use keyring in config for add-genesis-account cmd. +* (runtime) [#21769](https://github.com/cosmos/cosmos-sdk/pull/21769) Fix baseapp options ordering to avoid overwriting options set by modules. +* (x/consensus) [#21493](https://github.com/cosmos/cosmos-sdk/pull/21493) Fix regression that prevented to upgrade to > v0.50.7 without consensus version params. +* (baseapp) [#21256](https://github.com/cosmos/cosmos-sdk/pull/21256) Halt height will not commit the block indicated, meaning that if halt-height is set to 10, only blocks until 9 (included) will be committed. This is to go back to the original behavior before a change was introduced in v0.50.0. +* (baseapp) [#21444](https://github.com/cosmos/cosmos-sdk/pull/21444) Follow-up, Return PreBlocker events in FinalizeBlockResponse. +* (baseapp) [#21413](https://github.com/cosmos/cosmos-sdk/pull/21413) Fix data race in sdk mempool. -### Client Breaking Changes - -* [#9879](https://github.com/cosmos/cosmos-sdk/pull/9879) Modify ABCI Queries to use `abci.QueryRequest` Height field if it is non-zero, otherwise continue using context height. - -### API Breaking Changes +## [v0.50.9](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.9) - 2024-08-07 -* [#10077](https://github.com/cosmos/cosmos-sdk/pull/10077) Remove telemetry on `GasKV` and `CacheKV` store Get/Set operations, significantly improving their performance. +## Bug Fixes -## [v0.42.9](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.42.9) - 2021-08-04 +* (baseapp) [#21159](https://github.com/cosmos/cosmos-sdk/pull/21159) Return PreBlocker events in FinalizeBlockResponse. +* [#20939](https://github.com/cosmos/cosmos-sdk/pull/20939) Fix collection reverse iterator to include `pagination.key` in the result. +* (client/grpc) [#20969](https://github.com/cosmos/cosmos-sdk/pull/20969) Fix `node.NewQueryServer` method not setting `cfg`. +* (testutil/integration) [#21006](https://github.com/cosmos/cosmos-sdk/pull/21006) Fix `NewIntegrationApp` method not writing default genesis to state. +* (runtime) [#21080](https://github.com/cosmos/cosmos-sdk/pull/21080) Fix `app.yaml` / `app.json` incompatibility with `depinject v1.0.0`. -### Bug Fixes - -* [#9835](https://github.com/cosmos/cosmos-sdk/pull/9835) Moved capability initialization logic to BeginBlocker to fix nondeterminsim issue mentioned in [#9800](https://github.com/cosmos/cosmos-sdk/issues/9800). Applications must now include the capability module in their BeginBlocker order before any module that uses capabilities gets run. -* [#9201](https://github.com/cosmos/cosmos-sdk/pull/9201) Fixed ` init --recover` flag. +## [v0.50.8](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.8) - 2024-07-15 -### API Breaking Changes +## Features -* [#9835](https://github.com/cosmos/cosmos-sdk/pull/9835) The `InitializeAndSeal` API has not changed, however it no longer initializes the in-memory state. `InitMemStore` has been introduced to serve this function, which will be called either in `InitChain` or `BeginBlock` (whichever is first after app start). Nodes may run this version on a network running 0.42.x, however, they must update their app.go files to include the capability module in their begin blockers. +* (client) [#20690](https://github.com/cosmos/cosmos-sdk/pull/20690) Import mnemonic from file -### Client Breaking Changes +## Improvements -* [#9781](https://github.com/cosmos/cosmos-sdk/pull/9781) Improve`withdraw-all-rewards` UX when broadcast mode `async` or `async` is used. +* (x/authz,x/feegrant) [#20590](https://github.com/cosmos/cosmos-sdk/pull/20590) Provide updated keeper in depinject for authz and feegrant modules. +* [#20631](https://github.com/cosmos/cosmos-sdk/pull/20631) Fix json parsing in the wait-tx command. +* (x/auth) [#20438](https://github.com/cosmos/cosmos-sdk/pull/20438) Add `--skip-signature-verification` flag to multisign command to allow nested multisigs. -## [v0.42.8](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.42.8) - 2021-07-30 +## Bug Fixes -### Features +* (simulation) [#17911](https://github.com/cosmos/cosmos-sdk/pull/17911) Fix all problems with executing command `make test-sim-custom-genesis-fast` for simulation test. +* (simulation) [#18196](https://github.com/cosmos/cosmos-sdk/pull/18196) Fix the problem of `validator set is empty after InitGenesis` in simulation test. -* [#9750](https://github.com/cosmos/cosmos-sdk/pull/9750) Emit events for tx signature and sequence, so clients can now query txs by signature (`tx.signature=''`) or by address and sequence combo (`tx.acc_seq='/'`). +## [v0.50.7](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.7) - 2024-06-04 ### Improvements -* (cli) [#9717](https://github.com/cosmos/cosmos-sdk/pull/9717) Added CLI flag `--output json/text` to `tx` cli commands. +* (debug) [#20328](https://github.com/cosmos/cosmos-sdk/pull/20328) Add consensus address for debug cmd. +* (runtime) [#20264](https://github.com/cosmos/cosmos-sdk/pull/20264) Expose grpc query router via depinject. +* (x/consensus) [#20381](https://github.com/cosmos/cosmos-sdk/pull/20381) Use Comet utility for consensus module consensus param updates. +* (client) [#20356](https://github.com/cosmos/cosmos-sdk/pull/20356) Overwrite client context when available in `SetCmdClientContext`. ### Bug Fixes -* [#9766](https://github.com/cosmos/cosmos-sdk/pull/9766) Fix hardcoded ledger signing algorithm on `keys add` command. - -## [v0.42.7](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.42.7) - 2021-07-09 - -### Improvements - -* (baseapp) [#9578](https://github.com/cosmos/cosmos-sdk/pull/9578) Return `Baseapp`'s `trace` value for logging error stack traces. +* (baseapp) [#20346](https://github.com/cosmos/cosmos-sdk/pull/20346) Correctly assign `execModeSimulate` to context for `simulateTx`. +* (baseapp) [#20144](https://github.com/cosmos/cosmos-sdk/pull/20144) Remove txs from mempool when AnteHandler fails in recheck. +* (baseapp) [#20107](https://github.com/cosmos/cosmos-sdk/pull/20107) Avoid header height overwrite block height. +* (cli) [#20020](https://github.com/cosmos/cosmos-sdk/pull/20020) Make bootstrap-state command support both new and legacy genesis format. +* (testutil/sims) [#20151](https://github.com/cosmos/cosmos-sdk/pull/20151) Set all signatures and don't overwrite the previous one in `GenSignedMockTx`. -### Bug Fixes +## [v0.50.6](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.6) - 2024-04-22 -* (x/ibc) [#9640](https://github.com/cosmos/cosmos-sdk/pull/9640) Fix IBC Transfer Ack Success event as it was initially emitting opposite value. -* [#9645](https://github.com/cosmos/cosmos-sdk/pull/9645) Use correct Prometheus format for metric labels. -* [#9299](https://github.com/cosmos/cosmos-sdk/pull/9299) Fix `[appd] keys parse cosmos1...` freezing. -* (keyring) [#9563](https://github.com/cosmos/cosmos-sdk/pull/9563) fix keyring kwallet backend when using with empty wallet. -* (x/capability) [#9392](https://github.com/cosmos/cosmos-sdk/pull/9392) initialization fix, which fixes the consensus error when using statesync. +### Features -## [v0.42.6](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.42.6) - 2021-06-18 +* (types) [#19759](https://github.com/cosmos/cosmos-sdk/pull/19759) Align SignerExtractionAdapter in PriorityNonceMempool Remove. +* (client) [#19870](https://github.com/cosmos/cosmos-sdk/pull/19870) Add new query command `wait-tx`. Alias `event-query-tx-for` to `wait-tx` for backward compatibility. ### Improvements -* [#9428](https://github.com/cosmos/cosmos-sdk/pull/9428) Optimize bank InitGenesis. Added `k.initBalances`. -* [#9429](https://github.com/cosmos/cosmos-sdk/pull/9429) Add `cosmos_sdk_version` to node_info -* [#9541](https://github.com/cosmos/cosmos-sdk/pull/9541) Bump tendermint dependency to v0.34.11. +* (telemetry) [#19903](https://github.com/cosmos/cosmos-sdk/pull/19903) Conditionally emit metrics based on enablement. + * **Introduction of `Now` Function**: Added a new function called `Now` to the telemetry package. It returns the current system time if telemetry is enabled, or a zero time if telemetry is not enabled. + * **Atomic Global Variable**: Implemented an atomic global variable to manage the state of telemetry's enablement. This ensures thread safety for the telemetry state. + * **Conditional Telemetry Emission**: All telemetry functions have been updated to emit metrics only when telemetry is enabled. They perform a check with `isTelemetryEnabled()` and return early if telemetry is disabled, minimizing unnecessary operations and overhead. +* (deps) [#19810](https://github.com/cosmos/cosmos-sdk/pull/19810) Upgrade prometheus version and fix API breaking change due to prometheus bump. +* (deps) [#19810](https://github.com/cosmos/cosmos-sdk/pull/19810) Bump `cosmossdk.io/store` to v1.1.0. +* (server) [#19884](https://github.com/cosmos/cosmos-sdk/pull/19884) Add start customizability to start command options. +* (x/gov) [#19853](https://github.com/cosmos/cosmos-sdk/pull/19853) Emit `depositor` in `EventTypeProposalDeposit`. +* (x/gov) [#19844](https://github.com/cosmos/cosmos-sdk/pull/19844) Emit the proposer of governance proposals. +* (baseapp) [#19616](https://github.com/cosmos/cosmos-sdk/pull/19616) Don't share gas meter in tx execution. -### Bug Fixes - -* [#9385](https://github.com/cosmos/cosmos-sdk/pull/9385) Fix IBC `query ibc client header` cli command. Support historical queries for query header/node-state commands. -* [#9401](https://github.com/cosmos/cosmos-sdk/pull/9401) Fixes incorrect export of IBC identifier sequences. Previously, the next identifier sequence for clients/connections/channels was not set during genesis export. This resulted in the next identifiers being generated on the new chain to reuse old identifiers (the sequences began again from 0). -* [#9408](https://github.com/cosmos/cosmos-sdk/pull/9408) Update simapp to use correct default broadcast mode. -* [#9513](https://github.com/cosmos/cosmos-sdk/pull/9513) Fixes testnet CLI command. Testnet now updates the supply in genesis. Previously, when using add-genesis-account and testnet together, inconsistent genesis files would be produced, as only add-genesis-account was updating the supply. -* (x/gov) [#8813](https://github.com/cosmos/cosmos-sdk/pull/8813) fix `GET /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits` to include initial deposit - -### Features +## Bug Fixes -* [#9383](https://github.com/cosmos/cosmos-sdk/pull/9383) New CLI command `query ibc-transfer escrow-address ` to get the escrow address for a channel; can be used to then query balance of escrowed tokens -* (baseapp, types) [#9390](https://github.com/cosmos/cosmos-sdk/pull/9390) Add current block header hash to `Context` -* (store) [#9403](https://github.com/cosmos/cosmos-sdk/pull/9403) Add `RefundGas` function to `GasMeter` interface +* (x/authz) [#20114](https://github.com/cosmos/cosmos-sdk/pull/20114) Follow up of [GHSA-4j93-fm92-rp4m](https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-4j93-fm92-rp4m) for `x/authz`. +* (crypto) [#19691](https://github.com/cosmos/cosmos-sdk/pull/19745) Fix tx sign doesn't throw an error when incorrect Ledger is used. +* (baseapp) [#19970](https://github.com/cosmos/cosmos-sdk/pull/19970) Fix default config values to use no-op mempool as default. +* (crypto) [#20027](https://github.com/cosmos/cosmos-sdk/pull/20027) secp256r1 keys now implement gogoproto's customtype interface. +* (x/bank) [#20028](https://github.com/cosmos/cosmos-sdk/pull/20028) Align query with multi denoms for send-enabled. -## [v0.42.5](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.42.5) - 2021-05-18 - -### Bug Fixes - -* [#9514](https://github.com/cosmos/cosmos-sdk/issues/9514) Fix panic when retrieving the `BlockGasMeter` on `(Re)CheckTx` mode. -* [#9235](https://github.com/cosmos/cosmos-sdk/pull/9235) CreateMembershipProof/CreateNonMembershipProof now returns an error - if input key is empty, or input data contains empty key. -* [#9108](https://github.com/cosmos/cosmos-sdk/pull/9108) Fixed the bug with querying multisig account, which is not showing threshold and public_keys. -* [#9345](https://github.com/cosmos/cosmos-sdk/pull/9345) Fix ARM support. -* [#9040](https://github.com/cosmos/cosmos-sdk/pull/9040) Fix ENV variables binding to CLI flags for client config. +## [v0.50.5](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.5) - 2024-03-12 ### Features -* [#8953](https://github.com/cosmos/cosmos-sdk/pull/8953) Add the `config` CLI subcommand back to the SDK, which saves client-side configuration in a `client.toml` file. - -## [v0.42.4](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.42.4) - 2021-04-08 - -### Client Breaking Changes - -* [#9026](https://github.com/cosmos/cosmos-sdk/pull/9026) By default, the `tx sign` and `tx sign-batch` CLI commands use SIGN_MODE_DIRECT to sign transactions for local pubkeys. For multisigs and ledger keys, the default LEGACY_AMINO_JSON is used. - -### Bug Fixes - -* (gRPC) [#9015](https://github.com/cosmos/cosmos-sdk/pull/9015) Fix invalid status code when accessing gRPC endpoints. -* [#9026](https://github.com/cosmos/cosmos-sdk/pull/9026) Fixed the bug that caused the `gentx` command to fail for Ledger keys. - -### Improvements - -* [#9081](https://github.com/cosmos/cosmos-sdk/pull/9081) Upgrade Tendermint to v0.34.9 that includes a security issue fix for Tendermint light clients. - -## [v0.42.3](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.42.3) - 2021-03-24 - -This release fixes a security vulnerability identified in x/bank. - -## [v0.42.2](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.42.2) - 2021-03-19 +* (baseapp) [#19626](https://github.com/cosmos/cosmos-sdk/pull/19626) Add `DisableBlockGasMeter` option to `BaseApp`, which removes the block gas meter during transaction execution. ### Improvements -* (grpc) [#8815](https://github.com/cosmos/cosmos-sdk/pull/8815) Add orderBy parameter to `TxsByEvents` endpoint. -* (cli) [#8826](https://github.com/cosmos/cosmos-sdk/pull/8826) Add trust to macOS Keychain for caller app by default. -* (store) [#8811](https://github.com/cosmos/cosmos-sdk/pull/8811) store/cachekv: use typed types/kv.List instead of container/list.List +* (x/distribution) [#19707](https://github.com/cosmos/cosmos-sdk/pull/19707) Add autocli config for `DelegationTotalRewards` for CLI consistency with `q rewards` commands in previous versions. +* (x/auth) [#19651](https://github.com/cosmos/cosmos-sdk/pull/19651) Allow empty public keys in `GetSignBytesAdapter`. ### Bug Fixes -* (crypto) [#8841](https://github.com/cosmos/cosmos-sdk/pull/8841) Fix legacy multisig amino marshaling, allowing migrations to work between v0.39 and v0.40+. -* (cli tx) [\8873](https://github.com/cosmos/cosmos-sdk/pull/8873) add missing `--output-document` option to `app tx multisign-batch`. +* (x/gov) [#19725](https://github.com/cosmos/cosmos-sdk/pull/19725) Fetch a failed proposal tally from proposal.FinalTallyResult in the gprc query. +* (types) [#19709](https://github.com/cosmos/cosmos-sdk/pull/19709) Fix skip staking genesis export when using `CoreAppModuleAdaptor` / `CoreAppModuleBasicAdaptor` for it. +* (x/auth) [#19549](https://github.com/cosmos/cosmos-sdk/pull/19549) Accept custom get signers when injecting `x/auth/tx`. +* (x/staking) Fix a possible bypass of delegator slashing: [GHSA-86h5-xcpx-cfqc](https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-86h5-xcpx-cfqc) +* (baseapp) Fix a bug in `baseapp.ValidateVoteExtensions` helper ([GHSA-95rx-m9m5-m94v](https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-95rx-m9m5-m94v)). The helper has been fixed and for avoiding API breaking changes `currentHeight` and `chainID` arguments are ignored. Those arguments are removed from the helper in v0.51+. -## [v0.42.1](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.42.1) - 2021-03-10 +## [v0.50.4](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.4) - 2024-02-19 -This release fixes security vulnerability identified in the simapp. - -## [v0.42.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.42.0) - 2021-03-08 +### Features -**IMPORTANT**: This release contains an important security fix for all non Cosmos Hub chains running Stargate version of the Cosmos SDK (>0.40). Non-hub chains should not be using any version of the SDK in the v0.40.x or v0.41.x release series. See [#8461](https://github.com/cosmos/cosmos-sdk/pull/8461) for more details. +* (server) [#19280](https://github.com/cosmos/cosmos-sdk/pull/19280) Adds in-place testnet CLI command. ### Improvements -* (x/ibc) [#8624](https://github.com/cosmos/cosmos-sdk/pull/8624) Emit full header in IBC UpdateClient message. -* (x/crisis) [#8621](https://github.com/cosmos/cosmos-sdk/issues/8621) crisis invariants names now print to loggers. +* (client) [#19393](https://github.com/cosmos/cosmos-sdk/pull/19393/) Add `ReadDefaultValuesFromDefaultClientConfig` to populate the default values from the default client config in client.Context without creating a app folder. -### Bug fixes - -* (x/evidence) [#8461](https://github.com/cosmos/cosmos-sdk/pull/8461) Fix bech32 prefix in evidence validator address conversion -* (x/gov) [#8806](https://github.com/cosmos/cosmos-sdk/issues/8806) Fix q gov proposals command's mishandling of the --status parameter's values. +### Bug Fixes -## [v0.41.4](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.41.3) - 2021-03-02 +* (x/auth/vesting) [GHSA-4j93-fm92-rp4m](#bug-fixes) Add `BlockedAddr` check in `CreatePeriodicVestingAccount`. +* (baseapp) [#19338](https://github.com/cosmos/cosmos-sdk/pull/19338) Set HeaderInfo in context when calling `setState`. +* (baseapp): [#19200](https://github.com/cosmos/cosmos-sdk/pull/19200) Ensure that sdk side ve math matches cometbft. +* [#19106](https://github.com/cosmos/cosmos-sdk/pull/19106) Allow empty public keys when setting signatures. Public keys aren't needed for every transaction. +* (baseapp) [#19198](https://github.com/cosmos/cosmos-sdk/pull/19198) Remove usage of pointers in logs in all optimistic execution goroutines. +* (baseapp) [#19177](https://github.com/cosmos/cosmos-sdk/pull/19177) Fix baseapp `DefaultProposalHandler` same-sender non-sequential sequence. +* (crypto) [#19371](https://github.com/cosmos/cosmos-sdk/pull/19371) Avoid CLI redundant log in stdout, log to stderr instead. -**IMPORTANT**: Due to a bug in the v0.41.x series with how evidence handles validator consensus addresses #8461, SDK based chains that are not using the default bech32 prefix (cosmos, aka all chains except for t -he Cosmos Hub) should not use this release or any release in the v0.41.x series. Please see #8668 for tracking & timeline for the v0.42.0 release, which will include a fix for this issue. +## [v0.50.3](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.3) - 2024-01-15 ### Features -* [#7787](https://github.com/cosmos/cosmos-sdk/pull/7787) Add multisign-batch command. - -### Bug fixes - -* [#8730](https://github.com/cosmos/cosmos-sdk/pull/8730) Allow REST endpoint to query txs with multisig addresses. -* [#8680](https://github.com/cosmos/cosmos-sdk/issues/8680) Fix missing timestamp in GetTxsEvent response [#8732](https://github.com/cosmos/cosmos-sdk/pull/8732). -* [#8681](https://github.com/cosmos/cosmos-sdk/issues/8681) Fix missing error message when calling GetTxsEvent [#8732](https://github.com/cosmos/cosmos-sdk/pull/8732) -* (server) [#8641](https://github.com/cosmos/cosmos-sdk/pull/8641) Fix Tendermint and application configuration reading from file -* (client/keys) [#8639](https://github.com/cosmos/cosmos-sdk/pull/8639) Fix keys migrate for mulitisig, offline, and ledger keys. The migrate command now takes a positional old_home_dir argument. +* (types) [#18991](https://github.com/cosmos/cosmos-sdk/pull/18991) Add SignerExtractionAdapter to PriorityNonceMempool/Config and provide Default implementation matching existing behavior. +* (gRPC) [#19043](https://github.com/cosmos/cosmos-sdk/pull/19043) Add `halt_height` to the gRPC `/cosmos/base/node/v1beta1/config` request. ### Improvements -* (store/cachekv), (x/bank/types) [#8719](https://github.com/cosmos/cosmos-sdk/pull/8719) algorithmically fix pathologically slow code -* [#8701](https://github.com/cosmos/cosmos-sdk/pull/8701) Upgrade tendermint v0.34.8. -* [#8714](https://github.com/cosmos/cosmos-sdk/pull/8714) Allow accounts to have a balance of 0 at genesis. - -## [v0.41.3](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.41.3) - 2021-02-18 +* (x/bank) [#18956](https://github.com/cosmos/cosmos-sdk/pull/18956) Introduced a new `DenomOwnersByQuery` query method for `DenomOwners`, which accepts the denom value as a query string parameter, resolving issues with denoms containing slashes. +* (x/gov) [#18707](https://github.com/cosmos/cosmos-sdk/pull/18707) Improve genesis validation. +* (x/auth/tx) [#18772](https://github.com/cosmos/cosmos-sdk/pull/18772) Remove misleading gas wanted from tx simulation failure log. +* (client/tx) [#18852](https://github.com/cosmos/cosmos-sdk/pull/18852) Add `WithFromName` to tx factory. +* (types) [#18888](https://github.com/cosmos/cosmos-sdk/pull/18888) Speedup DecCoin.Sort() if len(coins) <= 1 +* (types) [#18875](https://github.com/cosmos/cosmos-sdk/pull/18875) Speedup coins.Sort() if len(coins) <= 1 +* (baseapp) [#18915](https://github.com/cosmos/cosmos-sdk/pull/18915) Add a new `ExecModeVerifyVoteExtension` exec mode and ensure it's populated in the `Context` during `VerifyVoteExtension` execution. +* (testutil) [#18930](https://github.com/cosmos/cosmos-sdk/pull/18930) Add NodeURI for clientCtx. ### Bug Fixes -* [#8617](https://github.com/cosmos/cosmos-sdk/pull/8617) Fix build failures caused by a small API breakage introduced in tendermint v0.34.7. - -## [v0.41.2](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.41.2) - 2021-02-18 +* (baseapp) [#19058](https://github.com/cosmos/cosmos-sdk/pull/19058) Fix baseapp posthandler branch would fail if the `runMsgs` had returned an error. +* (baseapp) [#18609](https://github.com/cosmos/cosmos-sdk/issues/18609) Fixed accounting in the block gas meter after module's beginBlock and before DeliverTx, ensuring transaction processing always starts with the expected zeroed out block gas meter. +* (baseapp) [#18895](https://github.com/cosmos/cosmos-sdk/pull/18895) Fix de-duplicating vote extensions during validation in ValidateVoteExtensions. -### Improvements - -* Bump tendermint dependency to v0.34.7. +## [v0.50.2](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.2) - 2023-12-11 -## [v0.41.1](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.41.1) - 2021-02-17 - -### Bug Fixes +### Features -* (grpc) [#8549](https://github.com/cosmos/cosmos-sdk/pull/8549) Make gRPC requests go through ABCI and disallow concurrency. -* (x/staking) [#8546](https://github.com/cosmos/cosmos-sdk/pull/8546) Fix caching bug where concurrent calls to GetValidator could cause a node to crash -* (server) [#8481](https://github.com/cosmos/cosmos-sdk/pull/8481) Don't create files when running `{appd} tendermint show-*` subcommands. -* (client/keys) [#8436](https://github.com/cosmos/cosmos-sdk/pull/8436) Fix keybase->keyring keys migration. -* (crypto/hd) [#8607](https://github.com/cosmos/cosmos-sdk/pull/8607) Make DerivePrivateKeyForPath error and not panic on trailing slashes. +* (debug) [#18219](https://github.com/cosmos/cosmos-sdk/pull/18219) Add debug commands for application codec types. +* (client/keys) [#17639](https://github.com/cosmos/cosmos-sdk/pull/17639) Allows using and saving public keys encoded as base64. +* (server) [#17094](https://github.com/cosmos/cosmos-sdk/pull/17094) Add a `shutdown-grace` flag for waiting a given time before exit. ### Improvements -* (x/ibc) [#8458](https://github.com/cosmos/cosmos-sdk/pull/8458) Add `packet_connection` attribute to ibc events to enable relayer filtering -* [#8396](https://github.com/cosmos/cosmos-sdk/pull/8396) Add support for ARM platform -* (x/bank) [#8479](https://github.com/cosmos/cosmos-sdk/pull/8479) Aditional client denom metadata validation for `base` and `display` denoms. -* (codec/types) [#8605](https://github.com/cosmos/cosmos-sdk/pull/8605) Avoid unnecessary allocations for NewAnyWithCustomTypeURL on error. - -## [v0.41.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.41.0) - 2021-01-26 - -### State Machine Breaking - -* (x/ibc) [#8266](https://github.com/cosmos/cosmos-sdk/issues/8266) Add amino JSON support for IBC MsgTransfer in order to support Ledger text signing transfer transactions. -* (x/ibc) [#8404](https://github.com/cosmos/cosmos-sdk/pull/8404) Reorder IBC `ChanOpenAck` and `ChanOpenConfirm` handler execution to perform core handler first, followed by application callbacks. +* (telemetry) [#18646] (https://github.com/cosmos/cosmos-sdk/pull/18646) Enable statsd and dogstatsd telemetry sinks. +* (server) [#18478](https://github.com/cosmos/cosmos-sdk/pull/18478) Add command flag to disable colored logs. +* (x/gov) [#18025](https://github.com/cosmos/cosmos-sdk/pull/18025) Improve ` q gov proposer` by querying directly a proposal instead of tx events. It is an alias of `q gov proposal` as the proposer is a field of the proposal. +* (version) [#18063](https://github.com/cosmos/cosmos-sdk/pull/18063) Allow to define extra info to be displayed in ` version --long` command. +* (codec/unknownproto)[#18541](https://github.com/cosmos/cosmos-sdk/pull/18541) Remove the use of "protoc-gen-gogo/descriptor" in favour of using the official protobuf descriptorpb types inside unknownproto. ### Bug Fixes -* (simapp) [#8418](https://github.com/cosmos/cosmos-sdk/pull/8418) Add balance coin to supply when adding a new genesis account -* (x/bank) [#8417](https://github.com/cosmos/cosmos-sdk/pull/8417) Validate balances and coin denom metadata on genesis - -## [v0.40.1](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.40.1) - 2021-01-19 - -### Improvements - -* (x/bank) [#8302](https://github.com/cosmos/cosmos-sdk/issues/8302) Add gRPC and CLI queries for client denomination metadata. -* (tendermint) Bump Tendermint version to [v0.34.3](https://github.com/tendermint/tendermint/releases/tag/v0.34.3). +* (x/auth) [#18564](https://github.com/cosmos/cosmos-sdk/pull/18564) Fix total fees calculation when batch signing. +* (server) [#18537](https://github.com/cosmos/cosmos-sdk/pull/18537) Fix panic when defining minimum gas config as `100stake;100uatom`. Use a `,` delimiter instead of `;`. Fixes the server config getter to use the correct delimiter. +* [#18531](https://github.com/cosmos/cosmos-sdk/pull/18531) Baseapp's `GetConsensusParams` returns an empty struct instead of panicking if no params are found. +* (client/tx) [#18472](https://github.com/cosmos/cosmos-sdk/pull/18472) Utilizes the correct Pubkey when simulating a transaction. +* (baseapp) [#18486](https://github.com/cosmos/cosmos-sdk/pull/18486) Fixed FinalizeBlock calls not being passed to ABCIListeners. +* (baseapp) [#18627](https://github.com/cosmos/cosmos-sdk/pull/18627) Post handlers are run on non successful transaction executions too. +* (baseapp) [#18654](https://github.com/cosmos/cosmos-sdk/pull/18654) Fixes an issue in which `gogoproto.Merge` does not work with gogoproto messages with custom types. -### Bug Fixes +## [v0.50.1](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.1) - 2023-11-07 -* [#8085](https://github.com/cosmos/cosmos-sdk/pull/8058) fix zero time checks -* [#8280](https://github.com/cosmos/cosmos-sdk/pull/8280) fix GET /upgrade/current query -* (x/auth) [#8287](https://github.com/cosmos/cosmos-sdk/pull/8287) Fix `tx sign --signature-only` to return correct sequence value in signature. -* (build) [\8300](https://github.com/cosmos/cosmos-sdk/pull/8300), [\8301](https://github.com/cosmos/cosmos-sdk/pull/8301) Fix reproducible builds -* (types/errors) [#8355](https://github.com/cosmos/cosmos-sdk/pull/8355) Fix errorWrap `Is` method. -* (x/ibc) [#8341](https://github.com/cosmos/cosmos-sdk/pull/8341) Fix query latest consensus state. -* (proto) [#8350](https://github.com/cosmos/cosmos-sdk/pull/8350), [#8361](https://github.com/cosmos/cosmos-sdk/pull/8361) Update gogo proto deps with v1.3.2 security fixes -* (x/ibc) [#8359](https://github.com/cosmos/cosmos-sdk/pull/8359) Add missing UnpackInterfaces functions to IBC Query Responses. Fixes 'cannot unpack Any' error for IBC types. -* (x/bank) [#8317](https://github.com/cosmos/cosmos-sdk/pull/8317) Fix panic when querying for a not found client denomination metadata. +> v0.50.0 has been retracted due to a mistake in tagging the release. Please use v0.50.1 instead. -## [v0.40.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.40.0) - 2021-01-08 +### Features -v0.40.0, known as the Stargate release of the Cosmos SDK, is one of the largest releases -of the Cosmos SDK since launch. Please read through this changelog and [release notes](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/RELEASE_NOTES.md) to make -sure you are aware of any relevant breaking changes. +* (baseapp) [#18071](https://github.com/cosmos/cosmos-sdk/pull/18071) Add hybrid handlers to `MsgServiceRouter`. +* (server) [#18162](https://github.com/cosmos/cosmos-sdk/pull/18162) Start gRPC & API server in standalone mode. +* (baseapp & types) [#17712](https://github.com/cosmos/cosmos-sdk/pull/17712) Introduce `PreBlock`, which runs before begin blocker other modules, and allows to modify consensus parameters, and the changes are visible to the following state machine logics. Additionally it can be used for vote extensions. +* (genutil) [#17571](https://github.com/cosmos/cosmos-sdk/pull/17571) Allow creation of `AppGenesis` without a file lookup. +* (codec) [#17042](https://github.com/cosmos/cosmos-sdk/pull/17042) Add `CollValueV2` which supports encoding of protov2 messages in collections. +* (x/gov) [#16976](https://github.com/cosmos/cosmos-sdk/pull/16976) Add `failed_reason` field to `Proposal` under `x/gov` to indicate the reason for a failed proposal. Referenced from [#238](https://github.com/bnb-chain/greenfield-cosmos-sdk/pull/238) under `bnb-chain/greenfield-cosmos-sdk`. +* (baseapp) [#16898](https://github.com/cosmos/cosmos-sdk/pull/16898) Add `preFinalizeBlockHook` to allow vote extensions persistence. +* (cli) [#16887](https://github.com/cosmos/cosmos-sdk/pull/16887) Add two new CLI commands: ` tx simulate` for simulating a transaction; ` query block-results` for querying CometBFT RPC for block results. +* (x/bank) [#16852](https://github.com/cosmos/cosmos-sdk/pull/16852) Add `DenomMetadataByQueryString` query in bank module to support metadata query by query string. +* (baseapp) [#16581](https://github.com/cosmos/cosmos-sdk/pull/16581) Implement Optimistic Execution as an experimental feature (not enabled by default). +* (types) [#16257](https://github.com/cosmos/cosmos-sdk/pull/16257) Allow setting the base denom in the denom registry. +* (baseapp) [#16239](https://github.com/cosmos/cosmos-sdk/pull/16239) Add Gas Limits to allow node operators to resource bound queries. +* (cli) [#16209](https://github.com/cosmos/cosmos-sdk/pull/16209) Make `StartCmd` more customizable. +* (types/simulation) [#16074](https://github.com/cosmos/cosmos-sdk/pull/16074) Add generic SimulationStoreDecoder for modules using collections. +* (genutil) [#16046](https://github.com/cosmos/cosmos-sdk/pull/16046) Add "module-name" flag to genutil `add-genesis-account` to enable intializing module accounts at genesis.* [#15970](https://github.com/cosmos/cosmos-sdk/pull/15970) Enable SIGN_MODE_TEXTUAL. +* (types) [#15958](https://github.com/cosmos/cosmos-sdk/pull/15958) Add `module.NewBasicManagerFromManager` for creating a basic module manager from a module manager. +* (types/module) [#15829](https://github.com/cosmos/cosmos-sdk/pull/15829) Add new endblocker interface to handle valset updates. +* (runtime) [#15818](https://github.com/cosmos/cosmos-sdk/pull/15818) Provide logger through `depinject` instead of appBuilder. +* (types) [#15735](https://github.com/cosmos/cosmos-sdk/pull/15735) Make `ValidateBasic() error` method of `Msg` interface optional. Modules should validate messages directly in their message handlers ([RFC 001](https://docs.cosmos.network/main/rfc/rfc-001-tx-validation)). +* (x/genutil) [#15679](https://github.com/cosmos/cosmos-sdk/pull/15679) Allow applications to specify a custom genesis migration function for the `genesis migrate` command. +* (telemetry) [#15657](https://github.com/cosmos/cosmos-sdk/pull/15657) Emit more data (go version, sdk version, upgrade height) in prom metrics. +* (client) [#15597](https://github.com/cosmos/cosmos-sdk/pull/15597) Add status endpoint for clients. +* (testutil/integration) [#15556](https://github.com/cosmos/cosmos-sdk/pull/15556) Introduce `testutil/integration` package for module integration testing. +* (runtime) [#15547](https://github.com/cosmos/cosmos-sdk/pull/15547) Allow runtime to pass event core api service to modules. +* (client) [#15458](https://github.com/cosmos/cosmos-sdk/pull/15458) Add a `CmdContext` field to client.Context initialized to cobra command's context. +* (x/genutil) [#15301](https://github.com/cosmos/cosmos-sdk/pull/15031) Add application genesis. The genesis is now entirely managed by the application and passed to CometBFT at note instantiation. Functions that were taking a `cmttypes.GenesisDoc{}` now takes a `genutiltypes.AppGenesis{}`. +* (core) [#15133](https://github.com/cosmos/cosmos-sdk/pull/15133) Implement RegisterServices in the module manager. +* (x/bank) [#14894](https://github.com/cosmos/cosmos-sdk/pull/14894) Return a human readable denomination for IBC vouchers when querying bank balances. Added a `ResolveDenom` parameter to `types.QueryAllBalancesRequest` and `--resolve-denom` flag to `GetBalancesCmd()`. +* (core) [#14860](https://github.com/cosmos/cosmos-sdk/pull/14860) Add `Precommit` and `PrepareCheckState` AppModule callbacks. +* (x/gov) [#14720](https://github.com/cosmos/cosmos-sdk/pull/14720) Upstream expedited proposals from Osmosis. +* (cli) [#14659](https://github.com/cosmos/cosmos-sdk/pull/14659) Added ability to query blocks by events with queries directly passed to Tendermint, which will allow for full query operator support, e.g. `>`. +* (x/auth) [#14650](https://github.com/cosmos/cosmos-sdk/pull/14650) Add Textual SignModeHandler. Enable `SIGN_MODE_TEXTUAL` by following the [UPGRADING.md](./UPGRADING.md) instructions. +* (x/crisis) [#14588](https://github.com/cosmos/cosmos-sdk/pull/14588) Use CacheContext() in AssertInvariants(). +* (mempool) [#14484](https://github.com/cosmos/cosmos-sdk/pull/14484) Add priority nonce mempool option for transaction replacement. +* (query) [#14468](https://github.com/cosmos/cosmos-sdk/pull/14468) Implement pagination for collections. +* (x/gov) [#14373](https://github.com/cosmos/cosmos-sdk/pull/14373) Add new proto field `constitution` of type `string` to gov module genesis state, which allows chain builders to lay a strong foundation by specifying purpose. +* (client) [#14342](https://github.com/cosmos/cosmos-sdk/pull/14342) Add ` config` command is now a sub-command, for setting, getting and migrating Cosmos SDK configuration files. +* (x/distribution) [#14322](https://github.com/cosmos/cosmos-sdk/pull/14322) Introduce a new gRPC message handler, `DepositValidatorRewardsPool`, that allows explicit funding of a validator's reward pool. +* (x/bank) [#14224](https://github.com/cosmos/cosmos-sdk/pull/14224) Allow injection of restrictions on transfers using `AppendSendRestriction` or `PrependSendRestriction`. + +### Improvements + +* (x/gov) [#18189](https://github.com/cosmos/cosmos-sdk/pull/18189) Limit the accepted deposit coins for a proposal to the minimum proposal deposit denoms. +* (x/staking) [#18049](https://github.com/cosmos/cosmos-sdk/pull/18049) Return early if Slash encounters zero tokens to burn. +* (x/staking) [#18035](https://github.com/cosmos/cosmos-sdk/pull/18035) Hoisted out of the redelegation loop, the non-changing validator and delegator addresses parsing. +* (keyring) [#17913](https://github.com/cosmos/cosmos-sdk/pull/17913) Add `NewAutoCLIKeyring` for creating an AutoCLI keyring from a SDK keyring. +* (x/consensus) [#18041](https://github.com/cosmos/cosmos-sdk/pull/18041) Let `ToProtoConsensusParams()` return an error. +* (x/gov) [#17780](https://github.com/cosmos/cosmos-sdk/pull/17780) Recover panics and turn them into errors when executing x/gov proposals. +* (baseapp) [#17667](https://github.com/cosmos/cosmos-sdk/pull/17667) Close databases opened by SDK in `baseApp.Close()`. +* (types/module) [#17554](https://github.com/cosmos/cosmos-sdk/pull/17554) Introduce `HasABCIGenesis` which is implemented by a module only when a validatorset update needs to be returned. +* (cli) [#17389](https://github.com/cosmos/cosmos-sdk/pull/17389) gRPC CometBFT commands have been added under ` q consensus comet`. CometBFT commands placement in the SDK has been simplified. See the exhaustive list below. + * `client/rpc.StatusCommand()` is now at `server.StatusCommand()` +* (testutil) [#17216](https://github.com/cosmos/cosmos-sdk/issues/17216) Add `DefaultContextWithKeys` to `testutil` package. +* (cli) [#17187](https://github.com/cosmos/cosmos-sdk/pull/17187) Do not use `ctx.PrintObjectLegacy` in commands anymore. + * ` q gov proposer [proposal-id]` now returns a proposal id as int instead of string. +* (x/staking) [#17164](https://github.com/cosmos/cosmos-sdk/pull/17164) Add `BondedTokensAndPubKeyByConsAddr` to the keeper to enable vote extension verification. +* (x/group, x/gov) [#17109](https://github.com/cosmos/cosmos-sdk/pull/17109) Let proposal summary be 40x longer than metadata limit. +* (version) [#17096](https://github.com/cosmos/cosmos-sdk/pull/17096) Improve `getSDKVersion()` to handle module replacements. +* (types) [#16890](https://github.com/cosmos/cosmos-sdk/pull/16890) Remove `GetTxCmd() *cobra.Command` and `GetQueryCmd() *cobra.Command` from `module.AppModuleBasic` interface. +* (x/authz) [#16869](https://github.com/cosmos/cosmos-sdk/pull/16869) Improve error message when grant not found. +* (all) [#16497](https://github.com/cosmos/cosmos-sdk/pull/16497) Removed all exported vestiges of `sdk.MustSortJSON` and `sdk.SortJSON`. +* (server) [#16238](https://github.com/cosmos/cosmos-sdk/pull/16238) Don't setup p2p node keys if starting a node in GRPC only mode. +* (cli) [#16206](https://github.com/cosmos/cosmos-sdk/pull/16206) Make ABCI handshake profileable. +* (types) [#16076](https://github.com/cosmos/cosmos-sdk/pull/16076) Optimize `ChainAnteDecorators`/`ChainPostDecorators` to instantiate the functions once instead of on every invocation of the returned `AnteHandler`/`PostHandler`. +* (server) [#16071](https://github.com/cosmos/cosmos-sdk/pull/16071) When `mempool.max-txs` is set to a negative value, use a no-op mempool (effectively disable the app mempool). +* (types/query) [#16041](https://github.com/cosmos/cosmos-sdk/pull/16041) Change pagination max limit to a variable in order to be modifed by application devs. +* (simapp) [#15958](https://github.com/cosmos/cosmos-sdk/pull/15958) Refactor SimApp for removing the global basic manager. +* (all modules) [#15901](https://github.com/cosmos/cosmos-sdk/issues/15901) All core Cosmos SDK modules query commands have migrated to [AutoCLI](https://docs.cosmos.network/main/core/autocli), ensuring parity between gRPC and CLI queries. +* (x/auth) [#15867](https://github.com/cosmos/cosmos-sdk/pull/15867) Support better logging for signature verification failure. +* (store/cachekv) [#15767](https://github.com/cosmos/cosmos-sdk/pull/15767) Reduce peak RAM usage during and after `InitGenesis`. +* (x/bank) [#15764](https://github.com/cosmos/cosmos-sdk/pull/15764) Speedup x/bank `InitGenesis`. +* (x/slashing) [#15580](https://github.com/cosmos/cosmos-sdk/pull/15580) Refactor the validator's missed block signing window to be a chunked bitmap instead of a "logical" bitmap, significantly reducing the storage footprint. +* (x/gov) [#15554](https://github.com/cosmos/cosmos-sdk/pull/15554) Add proposal result log in `active_proposal` event. When a proposal passes but fails to execute, the proposal result is logged in the `active_proposal` event. +* (x/consensus) [#15553](https://github.com/cosmos/cosmos-sdk/pull/15553) Migrate consensus module to use collections. +* (server) [#15358](https://github.com/cosmos/cosmos-sdk/pull/15358) Add `server.InterceptConfigsAndCreateContext` as alternative to `server.InterceptConfigsPreRunHandler` which does not set the server context and the default SDK logger. +* (mempool) [#15328](https://github.com/cosmos/cosmos-sdk/pull/15328) Improve the `PriorityNonceMempool`: + * Support generic transaction prioritization, instead of `ctx.Priority()` + * Improve construction through the use of a single `PriorityNonceMempoolConfig` instead of option functions +* (x/authz) [#15164](https://github.com/cosmos/cosmos-sdk/pull/15164) Add `MsgCancelUnbondingDelegation` to staking authorization. +* (server) [#15041](https://github.com/cosmos/cosmos-sdk/pull/15041) Remove unnecessary sleeps from gRPC and API server initiation. The servers will start and accept requests as soon as they're ready. +* (baseapp) [#15023](https://github.com/cosmos/cosmos-sdk/pull/15023) & [#15213](https://github.com/cosmos/cosmos-sdk/pull/15213) Add `MessageRouter` interface to baseapp and pass it to authz, gov and groups instead of concrete type. +* [#15011](https://github.com/cosmos/cosmos-sdk/pull/15011) Introduce `cosmossdk.io/log` package to provide a consistent logging interface through the SDK. CometBFT logger is now replaced by `cosmossdk.io/log.Logger`. +* (x/staking) [#14864](https://github.com/cosmos/cosmos-sdk/pull/14864) ` tx staking create-validator` CLI command now takes a json file as an arg instead of using required flags. +* (x/auth) [#14758](https://github.com/cosmos/cosmos-sdk/pull/14758) Allow transaction event queries to directly passed to Tendermint, which will allow for full query operator support, e.g. `>`. +* (x/evidence) [#14757](https://github.com/cosmos/cosmos-sdk/pull/14757) Evidence messages do not need to implement a `.Type()` anymore. +* (x/auth/tx) [#14751](https://github.com/cosmos/cosmos-sdk/pull/14751) Remove `.Type()` and `Route()` methods from all msgs and `legacytx.LegacyMsg` interface. +* (cli) [#14659](https://github.com/cosmos/cosmos-sdk/pull/14659) Added ability to query blocks by either height/hash ` q block --type=height|hash `. +* (x/staking) [#14590](https://github.com/cosmos/cosmos-sdk/pull/14590) Return undelegate amount in MsgUndelegateResponse. +* [#14529](https://github.com/cosmos/cosmos-sdk/pull/14529) Add new property `BondDenom` to `SimulationState` struct. +* (store) [#14439](https://github.com/cosmos/cosmos-sdk/pull/14439) Remove global metric gatherer from store. + * By default store has a no op metric gatherer, the application developer must set another metric gatherer or us the provided one in `store/metrics`. +* (store) [#14438](https://github.com/cosmos/cosmos-sdk/pull/14438) Pass logger from baseapp to store. +* (baseapp) [#14417](https://github.com/cosmos/cosmos-sdk/pull/14417) The store package no longer has a dependency on baseapp. +* (module) [#14415](https://github.com/cosmos/cosmos-sdk/pull/14415) Loosen assertions in SetOrderBeginBlockers() and SetOrderEndBlockers(). +* (store) [#14410](https://github.com/cosmos/cosmos-sdk/pull/14410) `rootmulti.Store.loadVersion` has validation to check if all the module stores' height is correct, it will error if any module store has incorrect height. +* [#14406](https://github.com/cosmos/cosmos-sdk/issues/14406) Migrate usage of `types/store.go` to `store/types/..`. +* (context)[#14384](https://github.com/cosmos/cosmos-sdk/pull/14384) Refactor(context): Pass EventManager to the context as an interface. +* (types) [#14354](https://github.com/cosmos/cosmos-sdk/pull/14354) Improve performance on Context.KVStore and Context.TransientStore by 40%. +* (crypto/keyring) [#14151](https://github.com/cosmos/cosmos-sdk/pull/14151) Move keys presentation from `crypto/keyring` to `client/keys` +* (signing) [#14087](https://github.com/cosmos/cosmos-sdk/pull/14087) Add SignModeHandlerWithContext interface with a new `GetSignBytesWithContext` to get the sign bytes using `context.Context` as an argument to access state. +* (server) [#14062](https://github.com/cosmos/cosmos-sdk/pull/14062) Remove rosetta from server start. +* (crypto) [#3129](https://github.com/cosmos/cosmos-sdk/pull/3129) New armor and keyring key derivation uses aead and encryption uses chacha20poly. -### Client Breaking Changes +### State Machine Breaking -* **CLI** - * (client/keys) [#5889](https://github.com/cosmos/cosmos-sdk/pull/5889) remove `keys update` command. - * (x/auth) [#5844](https://github.com/cosmos/cosmos-sdk/pull/5844) `tx sign` command now returns an error when signing is attempted with offline/multisig keys. - * (x/auth) [#6108](https://github.com/cosmos/cosmos-sdk/pull/6108) `tx sign` command's `--validate-signatures` flag is migrated into a `tx validate-signatures` standalone command. - * (x/auth) [#7788](https://github.com/cosmos/cosmos-sdk/pull/7788) Remove `tx auth` subcommands, all auth subcommands exist as `tx ` - * (x/genutil) [#6651](https://github.com/cosmos/cosmos-sdk/pull/6651) The `gentx` command has been improved. No longer are `--from` and `--name` flags required. Instead, a single argument, `name`, is required which refers to the key pair in the Keyring. In addition, an optional - `--moniker` flag can be provided to override the moniker found in `config.toml`. - * (x/upgrade) [#7697](https://github.com/cosmos/cosmos-sdk/pull/7697) Rename flag name "--time" to "--upgrade-time", "--info" to "--upgrade-info", to keep it consistent with help message. -* **REST / Queriers** - * (api) [#6426](https://github.com/cosmos/cosmos-sdk/pull/6426) The ability to start an out-of-process API REST server has now been removed. Instead, the API server is now started in-process along with the application and Tendermint. Configuration options have been added to `app.toml` to enable/disable the API server along with additional HTTP server options. - * (client) [#7246](https://github.com/cosmos/cosmos-sdk/pull/7246) The rest server endpoint `/swagger-ui/` is replaced by `/swagger/`, and contains swagger documentation for gRPC Gateway routes in addition to legacy REST routes. Swagger API is exposed only if set in `app.toml`. - * (x/auth) [#5702](https://github.com/cosmos/cosmos-sdk/pull/5702) The `x/auth` querier route has changed from `"acc"` to `"auth"`. - * (x/bank) [#5572](https://github.com/cosmos/cosmos-sdk/pull/5572) The `/bank/balances/{address}` endpoint now returns all account balances or a single balance by denom when the `denom` query parameter is present. - * (x/evidence) [#5952](https://github.com/cosmos/cosmos-sdk/pull/5952) Remove CLI and REST handlers for querying `x/evidence` parameters. - * (x/gov) [#6295](https://github.com/cosmos/cosmos-sdk/pull/6295) Fix typo in querying governance params. -* **General** - * (baseapp) [#6384](https://github.com/cosmos/cosmos-sdk/pull/6384) The `Result.Data` is now a Protocol Buffer encoded binary blob of type `TxData`. The `TxData` contains `Data` which contains a list of Protocol Buffer encoded message data and the corresponding message type. - * (client) [#5783](https://github.com/cosmos/cosmos-sdk/issues/5783) Unify all coins representations on JSON client requests for governance proposals. - * (crypto) [#7419](https://github.com/cosmos/cosmos-sdk/pull/7419) The SDK doesn't use Tendermint's `crypto.PubKey` - interface anymore, and uses instead it's own `PubKey` interface, defined in `crypto/types`. Replace all instances of - `crypto.PubKey` by `cryptotypes.Pubkey`. - * (store/rootmulti) [#6390](https://github.com/cosmos/cosmos-sdk/pull/6390) Proofs of empty stores are no longer supported. - * (store/types) [#5730](https://github.com/cosmos/cosmos-sdk/pull/5730) store.types.Cp() is removed in favour of types.CopyBytes(). - * (x/auth) [#6054](https://github.com/cosmos/cosmos-sdk/pull/6054) Remove custom JSON marshaling for base accounts as multsigs cannot be bech32 decoded. - * (x/auth/vesting) [#6859](https://github.com/cosmos/cosmos-sdk/pull/6859) Custom JSON marshaling of vesting accounts was removed. Vesting accounts are now marshaled using their default proto or amino JSON representation. - * (x/bank) [#5785](https://github.com/cosmos/cosmos-sdk/issues/5785) In x/bank errors, JSON strings coerced to valid UTF-8 bytes at JSON marshalling time - are now replaced by human-readable expressions. This change can potentially break compatibility with all those client side tools - that parse log messages. - * (x/evidence) [#7538](https://github.com/cosmos/cosmos-sdk/pull/7538) The ABCI's `Result.Data` field for - `MsgSubmitEvidence` responses does not contain the raw evidence's hash, but the protobuf encoded - `MsgSubmitEvidenceResponse` struct. - * (x/gov) [#7533](https://github.com/cosmos/cosmos-sdk/pull/7533) The ABCI's `Result.Data` field for - `MsgSubmitProposal` responses does not contain a raw binary encoding of the `proposalID`, but the protobuf encoded - `MsgSubmitSubmitProposalResponse` struct. - * (x/gov) [#6859](https://github.com/cosmos/cosmos-sdk/pull/6859) `ProposalStatus` and `VoteOption` are now JSON serialized using its protobuf name, so expect names like `PROPOSAL_STATUS_DEPOSIT_PERIOD` as opposed to `DepositPeriod`. - * (x/staking) [#7499](https://github.com/cosmos/cosmos-sdk/pull/7499) `BondStatus` is now a protobuf `enum` instead - of an `int32`, and JSON serialized using its protobuf name, so expect names like `BOND_STATUS_UNBONDING` as opposed - to `Unbonding`. - * (x/staking) [#7556](https://github.com/cosmos/cosmos-sdk/pull/7556) The ABCI's `Result.Data` field for - `MsgBeginRedelegate` and `MsgUndelegate` responses does not contain custom binary marshaled `completionTime`, but the - protobuf encoded `MsgBeginRedelegateResponse` and `MsgUndelegateResponse` structs respectively +* (x/gov) [#18146](https://github.com/cosmos/cosmos-sdk/pull/18146) Add denom check to reject denoms outside of those listed in `MinDeposit`. A new `MinDepositRatio` param is added (with a default value of `0.001`) and now deposits are required to be at least `MinDepositRatio*MinDeposit` to be accepted. +* (x/group,x/gov) [#16235](https://github.com/cosmos/cosmos-sdk/pull/16235) A group and gov proposal is rejected if the proposal metadata title and summary do not match the proposal title and summary. +* (baseapp) [#15930](https://github.com/cosmos/cosmos-sdk/pull/15930) change vote info provided by prepare and process proposal to the one in the block. +* (x/staking) [#15731](https://github.com/cosmos/cosmos-sdk/pull/15731) Introducing a new index to retrieve the delegations by validator efficiently. +* (x/staking) [#15701](https://github.com/cosmos/cosmos-sdk/pull/15701) The `HistoricalInfoKey` has been updated to use a binary format. +* (x/slashing) [#15580](https://github.com/cosmos/cosmos-sdk/pull/15580) The validator slashing window now stores "chunked" bitmap entries for each validator's signing window instead of a single boolean entry per signing window index. +* (x/staking) [#14590](https://github.com/cosmos/cosmos-sdk/pull/14590) `MsgUndelegateResponse` now includes undelegated amount. `x/staking` module's `keeper.Undelegate` now returns 3 values (completionTime,undelegateAmount,error) instead of 2. +* (x/feegrant) [#14294](https://github.com/cosmos/cosmos-sdk/pull/14294) Moved the logic of rejecting duplicate grant from `msg_server` to `keeper` method. ### API Breaking Changes -* **Baseapp / Client** - * (AppModule) [#7518](https://github.com/cosmos/cosmos-sdk/pull/7518) [#7584](https://github.com/cosmos/cosmos-sdk/pull/7584) Rename `AppModule.RegisterQueryServices` to `AppModule.RegisterServices`, as this method now registers multiple services (the gRPC query service and the protobuf Msg service). A `Configurator` struct is used to hold the different services. - * (baseapp) [#5865](https://github.com/cosmos/cosmos-sdk/pull/5865) The `SimulationResponse` returned from tx simulation is now JSON encoded instead of Amino binary. - * (client) [#6290](https://github.com/cosmos/cosmos-sdk/pull/6290) `CLIContext` is renamed to `Context`. `Context` and all related methods have been moved from package context to client. - * (client) [#6525](https://github.com/cosmos/cosmos-sdk/pull/6525) Removed support for `indent` in JSON responses. Clients should consider piping to an external tool such as `jq`. - * (client) [#8107](https://github.com/cosmos/cosmos-sdk/pull/8107) Renamed `PrintOutput` and `PrintOutputLegacy` - methods of the `context.Client` object to `PrintProto` and `PrintObjectLegacy`. - * (client/flags) [#6632](https://github.com/cosmos/cosmos-sdk/pull/6632) Remove NewCompletionCmd(), the function is now available in tendermint. - * (client/input) [#5904](https://github.com/cosmos/cosmos-sdk/pull/5904) Removal of unnecessary `GetCheckPassword`, `PrintPrefixed` functions. - * (client/keys) [#5889](https://github.com/cosmos/cosmos-sdk/pull/5889) Rename `NewKeyBaseFromDir()` -> `NewLegacyKeyBaseFromDir()`. - * (client/keys) [#5820](https://github.com/cosmos/cosmos-sdk/pull/5820/) Removed method CloseDB from Keybase interface. - * (client/rpc) [#6290](https://github.com/cosmos/cosmos-sdk/pull/6290) `client` package and subdirs reorganization. - * (client/lcd) [#6290](https://github.com/cosmos/cosmos-sdk/pull/6290) `CliCtx` of struct `RestServer` in package client/lcd has been renamed to `ClientCtx`. - * (codec) [#6330](https://github.com/cosmos/cosmos-sdk/pull/6330) `codec.RegisterCrypto` has been moved to the `crypto/codec` package and the global `codec.Cdc` Amino instance has been deprecated and moved to the `codec/legacy_global` package. - * (codec) [#8080](https://github.com/cosmos/cosmos-sdk/pull/8080) Updated the `codec.Marshaler` interface - * Moved `MarshalAny` and `UnmarshalAny` helper functions to `codec.Marshaler` and renamed to `MarshalInterface` and - `UnmarshalInterface` respectively. These functions must take interface as a parameter (not a concrete type nor `Any` - object). Underneath they use `Any` wrapping for correct protobuf serialization. - * (crypto) [#6780](https://github.com/cosmos/cosmos-sdk/issues/6780) Move ledger code to its own package. - * (crypto/types/multisig) [#6373](https://github.com/cosmos/cosmos-sdk/pull/6373) `multisig.Multisignature` has been renamed to `AminoMultisignature` - * (codec) `*codec.LegacyAmino` is now a wrapper around Amino which provides backwards compatibility with protobuf `Any`. ALL legacy code should use `*codec.LegacyAmino` instead of `*amino.Codec` directly - * (crypto) [#5880](https://github.com/cosmos/cosmos-sdk/pull/5880) Merge `crypto/keys/mintkey` into `crypto`. - * (crypto/hd) [#5904](https://github.com/cosmos/cosmos-sdk/pull/5904) `crypto/keys/hd` moved to `crypto/hd`. - * (crypto/keyring): - _ [#5866](https://github.com/cosmos/cosmos-sdk/pull/5866) Rename `crypto/keys/` to `crypto/keyring/`. - _ [#5904](https://github.com/cosmos/cosmos-sdk/pull/5904) `Keybase` -> `Keyring` interfaces migration. `LegacyKeybase` interface is added in order - to guarantee limited backward compatibility with the old Keybase interface for the sole purpose of migrating keys across the new keyring backends. `NewLegacy` - constructor is provided [#5889](https://github.com/cosmos/cosmos-sdk/pull/5889) to allow for smooth migration of keys from the legacy LevelDB based implementation - to new keyring backends. Plus, the package and the new keyring no longer depends on the sdk.Config singleton. Please consult the [package documentation](https://github.com/cosmos/cosmos-sdk/tree/master/crypto/keyring/doc.go) for more - information on how to implement the new `Keyring` interface. \* [#5858](https://github.com/cosmos/cosmos-sdk/pull/5858) Make Keyring store keys by name and address's hexbytes representation. - * (export) [#5952](https://github.com/cosmos/cosmos-sdk/pull/5952) `AppExporter` now returns ABCI consensus parameters to be included in marshaled exported state. These parameters must be returned from the application via the `BaseApp`. - * (simapp) Deprecating and renaming `MakeEncodingConfig` to `MakeTestEncodingConfig` (both in `simapp` and `simapp/params` packages). - * (store) [#5803](https://github.com/cosmos/cosmos-sdk/pull/5803) The `store.CommitMultiStore` interface now includes the new `snapshots.Snapshotter` interface as well. - * (types) [#5579](https://github.com/cosmos/cosmos-sdk/pull/5579) The `keepRecent` field has been removed from the `PruningOptions` type. - The `PruningOptions` type now only includes fields `KeepEvery` and `SnapshotEvery`, where `KeepEvery` - determines which committed heights are flushed to disk and `SnapshotEvery` determines which of these - heights are kept after pruning. The `IsValid` method should be called whenever using these options. Methods - `SnapshotVersion` and `FlushVersion` accept a version arugment and determine if the version should be - flushed to disk or kept as a snapshot. Note, `KeepRecent` is automatically inferred from the options - and provided directly the IAVL store. - * (types) [#5533](https://github.com/cosmos/cosmos-sdk/pull/5533) Refactored `AppModuleBasic` and `AppModuleGenesis` - to now accept a `codec.JSONMarshaler` for modular serialization of genesis state. - * (types/rest) [#5779](https://github.com/cosmos/cosmos-sdk/pull/5779) Drop unused Parse{Int64OrReturnBadRequest,QueryParamBool}() functions. -* **Modules** - * (modules) [#7243](https://github.com/cosmos/cosmos-sdk/pull/7243) Rename `RegisterCodec` to `RegisterLegacyAminoCodec` and `codec.New()` is now renamed to `codec.NewLegacyAmino()` - * (modules) [#6564](https://github.com/cosmos/cosmos-sdk/pull/6564) Constant `DefaultParamspace` is removed from all modules, use ModuleName instead. - * (modules) [#5989](https://github.com/cosmos/cosmos-sdk/pull/5989) `AppModuleBasic.GetTxCmd` now takes a single `CLIContext` parameter. - * (modules) [#5664](https://github.com/cosmos/cosmos-sdk/pull/5664) Remove amino `Codec` from simulation `StoreDecoder`, which now returns a function closure in order to unmarshal the key-value pairs. - * (modules) [#5555](https://github.com/cosmos/cosmos-sdk/pull/5555) Move `x/auth/client/utils/` types and functions to `x/auth/client/`. - * (modules) [#5572](https://github.com/cosmos/cosmos-sdk/pull/5572) Move account balance logic and APIs from `x/auth` to `x/bank`. - * (modules) [#6326](https://github.com/cosmos/cosmos-sdk/pull/6326) `AppModuleBasic.GetQueryCmd` now takes a single `client.Context` parameter. - * (modules) [#6336](https://github.com/cosmos/cosmos-sdk/pull/6336) `AppModuleBasic.RegisterQueryService` method was added to support gRPC queries, and `QuerierRoute` and `NewQuerierHandler` were deprecated. - * (modules) [#6311](https://github.com/cosmos/cosmos-sdk/issues/6311) Remove `alias.go` usage - * (modules) [#6447](https://github.com/cosmos/cosmos-sdk/issues/6447) Rename `blacklistedAddrs` to `blockedAddrs`. - * (modules) [#6834](https://github.com/cosmos/cosmos-sdk/issues/6834) Add `RegisterInterfaces` method to `AppModuleBasic` to support registration of protobuf interface types. - * (modules) [#6734](https://github.com/cosmos/cosmos-sdk/issues/6834) Add `TxEncodingConfig` parameter to `AppModuleBasic.ValidateGenesis` command to support JSON tx decoding in `genutil`. - * (modules) [#7764](https://github.com/cosmos/cosmos-sdk/pull/7764) Added module initialization options: - * `server/types.AppExporter` requires extra argument: `AppOptions`. - * `server.AddCommands` requires extra argument: `addStartFlags types.ModuleInitFlags` - * `x/crisis.NewAppModule` has a new attribute: `skipGenesisInvariants`. [PR](https://github.com/cosmos/cosmos-sdk/pull/7764) - * (types) [#6327](https://github.com/cosmos/cosmos-sdk/pull/6327) `sdk.Msg` now inherits `proto.Message`, as a result all `sdk.Msg` types now use pointer semantics. - * (types) [#7032](https://github.com/cosmos/cosmos-sdk/pull/7032) All types ending with `ID` (e.g. `ProposalID`) now end with `Id` (e.g. `ProposalId`), to match default Protobuf generated format. Also see [#7033](https://github.com/cosmos/cosmos-sdk/pull/7033) for more details. - * (x/auth) [#6029](https://github.com/cosmos/cosmos-sdk/pull/6029) Module accounts have been moved from `x/supply` to `x/auth`. - * (x/auth) [#6443](https://github.com/cosmos/cosmos-sdk/issues/6443) Move `FeeTx` and `TxWithMemo` interfaces from `x/auth/ante` to `types`. - * (x/auth) [#7006](https://github.com/cosmos/cosmos-sdk/pull/7006) All `AccountRetriever` methods now take `client.Context` as a parameter instead of as a struct member. - * (x/auth) [#6270](https://github.com/cosmos/cosmos-sdk/pull/6270) The passphrase argument has been removed from the signature of the following functions and methods: `BuildAndSign`, ` MakeSignature`, ` SignStdTx`, `TxBuilder.BuildAndSign`, `TxBuilder.Sign`, `TxBuilder.SignStdTx` - * (x/auth) [#6428](https://github.com/cosmos/cosmos-sdk/issues/6428): - * `NewAnteHandler` and `NewSigVerificationDecorator` both now take a `SignModeHandler` parameter. - * `SignatureVerificationGasConsumer` now has the signature: `func(meter sdk.GasMeter, sig signing.SignatureV2, params types.Params) error`. - * The `SigVerifiableTx` interface now has a `GetSignaturesV2() ([]signing.SignatureV2, error)` method and no longer has the `GetSignBytes` method. - * (x/auth/tx) [#8106](https://github.com/cosmos/cosmos-sdk/pull/8106) change related to missing append functionality in - client transaction signing - * added `overwriteSig` argument to `x/auth/client.SignTx` and `client/tx.Sign` functions. - * removed `x/auth/tx.go:wrapper.GetSignatures`. The `wrapper` provides `TxBuilder` functionality, and it's a private - structure. That function was not used at all and it's not exposed through the `TxBuilder` interface. - * (x/bank) [#7327](https://github.com/cosmos/cosmos-sdk/pull/7327) AddCoins and SubtractCoins no longer return a resultingValue and will only return an error. - * (x/capability) [#7918](https://github.com/cosmos/cosmos-sdk/pull/7918) Add x/capability safety checks: - * All outward facing APIs will now check that capability is not nil and name is not empty before performing any state-machine changes - * `SetIndex` has been renamed to `InitializeIndex` - * (x/evidence) [#7251](https://github.com/cosmos/cosmos-sdk/pull/7251) New evidence types and light client evidence handling. The module function names changed. - * (x/evidence) [#5952](https://github.com/cosmos/cosmos-sdk/pull/5952) Remove APIs for getting and setting `x/evidence` parameters. `BaseApp` now uses a `ParamStore` to manage Tendermint consensus parameters which is managed via the `x/params` `Substore` type. - * (x/gov) [#6147](https://github.com/cosmos/cosmos-sdk/pull/6147) The `Content` field on `Proposal` and `MsgSubmitProposal` - is now `Any` in concordance with [ADR 019](docs/architecture/adr-019-protobuf-state-encoding.md) and `GetContent` should now - be used to retrieve the actual proposal `Content`. Also the `NewMsgSubmitProposal` constructor now may return an `error` - * (x/ibc) [#6374](https://github.com/cosmos/cosmos-sdk/pull/6374) `VerifyMembership` and `VerifyNonMembership` now take a `specs []string` argument to specify the proof format used for verification. Most SDK chains can simply use `commitmenttypes.GetSDKSpecs()` for this argument. - * (x/params) [#5619](https://github.com/cosmos/cosmos-sdk/pull/5619) The `x/params` keeper now accepts a `codec.Marshaller` instead of - a reference to an amino codec. Amino is still used for JSON serialization. - * (x/staking) [#6451](https://github.com/cosmos/cosmos-sdk/pull/6451) `DefaultParamspace` and `ParamKeyTable` in staking module are moved from keeper to types to enforce consistency. - * (x/staking) [#7419](https://github.com/cosmos/cosmos-sdk/pull/7419) The `TmConsPubKey` method on ValidatorI has been - removed and replaced instead by `ConsPubKey` (which returns a SDK `cryptotypes.PubKey`) and `TmConsPublicKey` (which - returns a Tendermint proto PublicKey). - * (x/staking/types) [#7447](https://github.com/cosmos/cosmos-sdk/issues/7447) Remove bech32 PubKey support: - * `ValidatorI` interface update. `GetConsPubKey` renamed to `TmConsPubKey` (consensus public key must be a tendermint key). `TmConsPubKey`, `GetConsAddr` methods return error. - * `Validator` update. Methods changed in `ValidatorI` (as described above) and `ToTmValidator` return error. - * `Validator.ConsensusPubkey` type changed from `string` to `codectypes.Any`. - * `MsgCreateValidator.Pubkey` type changed from `string` to `codectypes.Any`. - * (x/supply) [#6010](https://github.com/cosmos/cosmos-sdk/pull/6010) All `x/supply` types and APIs have been moved to `x/bank`. - * [#6409](https://github.com/cosmos/cosmos-sdk/pull/6409) Rename all IsEmpty methods to Empty across the codebase and enforce consistency. - * [#6231](https://github.com/cosmos/cosmos-sdk/pull/6231) Simplify `AppModule` interface, `Route` and `NewHandler` methods become only `Route` - and returns a new `Route` type. - * (x/slashing) [#6212](https://github.com/cosmos/cosmos-sdk/pull/6212) Remove `Get*` prefixes from key construction functions - * (server) [#6079](https://github.com/cosmos/cosmos-sdk/pull/6079) Remove `UpgradeOldPrivValFile` (deprecated in Tendermint Core v0.28). - * [#5719](https://github.com/cosmos/cosmos-sdk/pull/5719) Bump Go requirement to 1.14+ +* (x/auth) [#17787](https://github.com/cosmos/cosmos-sdk/pull/17787) Remove Tip functionality. +* (types) `module.EndBlockAppModule` has been replaced by Core API `appmodule.HasEndBlocker` or `module.HasABCIEndBlock` when needing validator updates. +* (types) `module.BeginBlockAppModule` has been replaced by Core API `appmodule.HasBeginBlocker`. +* (types) [#17358](https://github.com/cosmos/cosmos-sdk/pull/17358) Remove deprecated `sdk.Handler`, use `baseapp.MsgServiceHandler` instead. +* (client) [#17197](https://github.com/cosmos/cosmos-sdk/pull/17197) `keys.Commands` does not take a home directory anymore. It is inferred from the root command. +* (x/staking) [#17157](https://github.com/cosmos/cosmos-sdk/pull/17157) `GetValidatorsByPowerIndexKey` and `ValidateBasic` for historical info takes a validator address codec in order to be able to decode/encode addresses. + * `GetOperator()` now returns the address as it is represented in state, by default this is an encoded address + * `GetConsAddr() ([]byte, error)` returns `[]byte` instead of sdk.ConsAddres. + * `FromABCIEvidence` & `GetConsensusAddress(consAc address.Codec)` now take a consensus address codec to be able to decode the incoming address. + * (x/distribution) `Delegate` & `SlashValidator` helper function added the mock staking keeper as a parameter passed to the function +* (x/staking) [#17098](https://github.com/cosmos/cosmos-sdk/pull/17098) `NewMsgCreateValidator`, `NewValidator`, `NewMsgCancelUnbondingDelegation`, `NewMsgUndelegate`, `NewMsgBeginRedelegate`, `NewMsgDelegate` and `NewMsgEditValidator` takes a string instead of `sdk.ValAddress` or `sdk.AccAddress`: + * `NewRedelegation` and `NewUnbondingDelegation` takes a validatorAddressCodec and a delegatorAddressCodec in order to decode the addresses. + * `NewRedelegationResponse` takes a string instead of `sdk.ValAddress` or `sdk.AccAddress`. + * `NewMsgCreateValidator.Validate()` takes an address codec in order to decode the address. + * `BuildCreateValidatorMsg` takes a ValidatorAddressCodec in order to decode addresses. +* (x/slashing) [#17098](https://github.com/cosmos/cosmos-sdk/pull/17098) `NewMsgUnjail` takes a string instead of `sdk.ValAddress` +* (x/genutil) [#17098](https://github.com/cosmos/cosmos-sdk/pull/17098) `GenAppStateFromConfig`, AddGenesisAccountCmd and `GenTxCmd` takes an addresscodec to decode addresses. +* (x/distribution) [#17098](https://github.com/cosmos/cosmos-sdk/pull/17098) `NewMsgDepositValidatorRewardsPool`, `NewMsgFundCommunityPool`, `NewMsgWithdrawValidatorCommission` and `NewMsgWithdrawDelegatorReward` takes a string instead of `sdk.ValAddress` or `sdk.AccAddress`. +* (x/staking) [#16959](https://github.com/cosmos/cosmos-sdk/pull/16959) Add validator and consensus address codec as staking keeper arguments. +* (x/staking) [#16958](https://github.com/cosmos/cosmos-sdk/pull/16958) DelegationI interface `GetDelegatorAddr` & `GetValidatorAddr` have been migrated to return string instead of sdk.AccAddress and sdk.ValAddress respectively. stakingtypes.NewDelegation takes a string instead of sdk.AccAddress and sdk.ValAddress. +* (testutil) [#16899](https://github.com/cosmos/cosmos-sdk/pull/16899) The *cli testutil* `QueryBalancesExec` has been removed. Use the gRPC or REST query instead. +* (x/staking) [#16795](https://github.com/cosmos/cosmos-sdk/pull/16795) `DelegationToDelegationResponse`, `DelegationsToDelegationResponses`, `RedelegationsToRedelegationResponses` are no longer exported. +* (x/auth/vesting) [#16741](https://github.com/cosmos/cosmos-sdk/pull/16741) Vesting account constructor now return an error with the result of their validate function. +* (x/auth) [#16650](https://github.com/cosmos/cosmos-sdk/pull/16650) The *cli testutil* `QueryAccountExec` has been removed. Use the gRPC or REST query instead. +* (x/auth) [#16621](https://github.com/cosmos/cosmos-sdk/pull/16621) Pass address codec to auth new keeper constructor. +* (x/auth) [#16423](https://github.com/cosmos/cosmos-sdk/pull/16423) `helpers.AddGenesisAccount` has been moved to `x/genutil` to remove the cyclic dependency between `x/auth` and `x/genutil`. +* (baseapp) [#16342](https://github.com/cosmos/cosmos-sdk/pull/16342) NewContext was renamed to NewContextLegacy. The replacement (NewContext) now does not take a header, instead you should set the header via `WithHeaderInfo` or `WithBlockHeight`. Note that `WithBlockHeight` will soon be depreacted and its recommneded to use `WithHeaderInfo`. +* (x/mint) [#16329](https://github.com/cosmos/cosmos-sdk/pull/16329) Use collections for state management: + * Removed: keeper `GetParams`, `SetParams`, `GetMinter`, `SetMinter`. +* (x/crisis) [#16328](https://github.com/cosmos/cosmos-sdk/pull/16328) Use collections for state management: + * Removed: keeper `GetConstantFee`, `SetConstantFee` +* (x/staking) [#16324](https://github.com/cosmos/cosmos-sdk/pull/16324) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey`, and methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context` and return an `error`. Notable changes: + * `Validator` method now returns `types.ErrNoValidatorFound` instead of `nil` when not found. +* (x/distribution) [#16302](https://github.com/cosmos/cosmos-sdk/pull/16302) Use collections for FeePool state management. + * Removed: keeper `GetFeePool`, `SetFeePool`, `GetFeePoolCommunityCoins` +* (types) [#16272](https://github.com/cosmos/cosmos-sdk/pull/16272) `FeeGranter` in the `FeeTx` interface returns `[]byte` instead of `string`. +* (x/gov) [#16268](https://github.com/cosmos/cosmos-sdk/pull/16268) Use collections for proposal state management (part 2): + * this finalizes the gov collections migration + * Removed: types all the key related functions + * Removed: keeper `InsertActiveProposalsQueue`, `RemoveActiveProposalsQueue`, `InsertInactiveProposalsQueue`, `RemoveInactiveProposalsQueue`, `IterateInactiveProposalsQueue`, `IterateActiveProposalsQueue`, `ActiveProposalsQueueIterator`, `InactiveProposalsQueueIterator` +* (x/slashing) [#16246](https://github.com/cosmos/cosmos-sdk/issues/16246) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey`, and methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context` and return an `error`. `GetValidatorSigningInfo` now returns an error instead of a `found bool`, the error can be `nil` (found), `ErrNoSigningInfoFound` (not found) and any other error. +* (module) [#16227](https://github.com/cosmos/cosmos-sdk/issues/16227) `manager.RunMigrations()` now take a `context.Context` instead of a `sdk.Context`. +* (x/crisis) [#16216](https://github.com/cosmos/cosmos-sdk/issues/16216) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey`, methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context` and return an `error` instead of panicking. +* (x/distribution) [#16211](https://github.com/cosmos/cosmos-sdk/pull/16211) Use collections for params state management. +* (cli) [#16209](https://github.com/cosmos/cosmos-sdk/pull/16209) Add API `StartCmdWithOptions` to create customized start command. +* (x/mint) [#16179](https://github.com/cosmos/cosmos-sdk/issues/16179) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey`, and methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context` and return an `error`. +* (x/gov) [#16171](https://github.com/cosmos/cosmos-sdk/pull/16171) Use collections for proposal state management (part 1): + * Removed: keeper: `GetProposal`, `UnmarshalProposal`, `MarshalProposal`, `IterateProposal`, `GetProposal`, `GetProposalFiltered`, `GetProposals`, `GetProposalID`, `SetProposalID` + * Removed: errors unused errors +* (x/gov) [#16164](https://github.com/cosmos/cosmos-sdk/pull/16164) Use collections for vote state management: + * Removed: types `VoteKey`, `VoteKeys` + * Removed: keeper `IterateVotes`, `IterateAllVotes`, `GetVotes`, `GetVote`, `SetVote` +* (sims) [#16155](https://github.com/cosmos/cosmos-sdk/pull/16155) + * `simulation.NewOperationMsg` now marshals the operation msg as proto bytes instead of legacy amino JSON bytes. + * `simulation.NewOperationMsg` is now 2-arity instead of 3-arity with the obsolete argument `codec.ProtoCodec` removed. + * The field `OperationMsg.Msg` is now of type `[]byte` instead of `json.RawMessage`. +* (x/gov) [#16127](https://github.com/cosmos/cosmos-sdk/pull/16127) Use collections for deposit state management: + * The following methods are removed from the gov keeper: `GetDeposit`, `GetAllDeposits`, `IterateAllDeposits`. + * The following functions are removed from the gov types: `DepositKey`, `DepositsKey`. +* (x/gov) [#16118](https://github.com/cosmos/cosmos-sdk/pull/16118/) Use collections for constituion and params state management. +* (x/gov) [#16106](https://github.com/cosmos/cosmos-sdk/pull/16106) Remove gRPC query methods from gov keeper. +* (x/*all*) [#16052](https://github.com/cosmos/cosmos-sdk/pull/16062) `GetSignBytes` implementations on messages and global legacy amino codec definitions have been removed from all modules. +* (sims) [#16052](https://github.com/cosmos/cosmos-sdk/pull/16062) `GetOrGenerate` no longer requires a codec argument is now 4-arity instead of 5-arity. +* (types/math) [#16040](https://github.com/cosmos/cosmos-sdk/pull/16798) Remove aliases in `types/math.go` (part 2). +* (types/math) [#16040](https://github.com/cosmos/cosmos-sdk/pull/16040) Remove aliases in `types/math.go` (part 1). +* (x/auth) [#16016](https://github.com/cosmos/cosmos-sdk/pull/16016) Use collections for accounts state management: + * removed: keeper `HasAccountByID`, `AccountAddressByID`, `SetParams +* (x/genutil) [#15999](https://github.com/cosmos/cosmos-sdk/pull/15999) Genutil now takes the `GenesisTxHanlder` interface instead of deliverTx. The interface is implemented on baseapp +* (x/gov) [#15988](https://github.com/cosmos/cosmos-sdk/issues/15988) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey`, methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context` and return an `error` (instead of panicking or returning a `found bool`). Iterators callback functions now return an error instead of a `bool`. +* (x/auth) [#15985](https://github.com/cosmos/cosmos-sdk/pull/15985) The `AccountKeeper` does not expose the `QueryServer` and `MsgServer` APIs anymore. +* (x/authz) [#15962](https://github.com/cosmos/cosmos-sdk/issues/15962) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey`, methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context`. The `Authorization` interface's `Accept` method now takes a `context.Context` instead of a `sdk.Context`. +* (x/distribution) [#15948](https://github.com/cosmos/cosmos-sdk/issues/15948) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey` and methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context`. Keeper methods also now return an `error`. +* (x/bank) [#15891](https://github.com/cosmos/cosmos-sdk/issues/15891) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey` and methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context`. Also `FundAccount` and `FundModuleAccount` from the `testutil` package accept a `context.Context` instead of a `sdk.Context`, and it's position was moved to the first place. +* (x/slashing) [#15875](https://github.com/cosmos/cosmos-sdk/pull/15875) `x/slashing.NewAppModule` now requires an `InterfaceRegistry` parameter. +* (x/crisis) [#15852](https://github.com/cosmos/cosmos-sdk/pull/15852) Crisis keeper now takes a instance of the address codec to be able to decode user addresses +* (x/auth) [#15822](https://github.com/cosmos/cosmos-sdk/pull/15822) The type of struct field `ante.HandlerOptions.SignModeHandler` has been changed to `x/tx/signing.HandlerMap`. +* (client) [#15822](https://github.com/cosmos/cosmos-sdk/pull/15822) The return type of the interface method `TxConfig.SignModeHandler` has been changed to `x/tx/signing.HandlerMap`. + * The signature of `VerifySignature` has been changed to accept a `x/tx/signing.HandlerMap` and other structs from `x/tx` as arguments. + * The signature of `NewTxConfigWithTextual` has been deprecated and its signature changed to accept a `SignModeOptions`. + * The signature of `NewSigVerificationDecorator` has been changed to accept a `x/tx/signing.HandlerMap`. +* (x/bank) [#15818](https://github.com/cosmos/cosmos-sdk/issues/15818) `BaseViewKeeper`'s `Logger` method now doesn't require a context. `NewBaseKeeper`, `NewBaseSendKeeper` and `NewBaseViewKeeper` now also require a `log.Logger` to be passed in. +* (x/genutil) [#15679](https://github.com/cosmos/cosmos-sdk/pull/15679) `MigrateGenesisCmd` now takes a `MigrationMap` instead of having the SDK genesis migration hardcoded. +* (client) [#15673](https://github.com/cosmos/cosmos-sdk/pull/15673) Move `client/keys.OutputFormatJSON` and `client/keys.OutputFormatText` to `client/flags` package. +* (x/*all*) [#15648](https://github.com/cosmos/cosmos-sdk/issues/15648) Make `SetParams` consistent across all modules and validate the params at the message handling instead of `SetParams` method. +* (codec) [#15600](https://github.com/cosmos/cosmos-sdk/pull/15600) [#15873](https://github.com/cosmos/cosmos-sdk/pull/15873) add support for getting signers to `codec.Codec` and `InterfaceRegistry`: + * `InterfaceRegistry` is has unexported methods and implements `protodesc.Resolver` plus the `RangeFiles` and `SigningContext` methods. All implementations of `InterfaceRegistry` by other users must now embed the official implementation. + * `Codec` has new methods `InterfaceRegistry`, `GetMsgAnySigners`, `GetMsgV1Signers`, and `GetMsgV2Signers` as well as unexported methods. All implementations of `Codec` by other users must now embed an official implementation from the `codec` package. + * `AminoCodec` is marked as deprecated and no longer implements `Codec. +* (client) [#15597](https://github.com/cosmos/cosmos-sdk/pull/15597) `RegisterNodeService` now requires a config parameter. +* (x/nft) [#15588](https://github.com/cosmos/cosmos-sdk/pull/15588) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey` and methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context`. +* (baseapp) [#15568](https://github.com/cosmos/cosmos-sdk/pull/15568) `SetIAVLLazyLoading` is removed from baseapp. +* (x/genutil) [#15567](https://github.com/cosmos/cosmos-sdk/pull/15567) `CollectGenTxsCmd` & `GenTxCmd` takes a address.Codec to be able to decode addresses. +* (x/bank) [#15567](https://github.com/cosmos/cosmos-sdk/pull/15567) `GenesisBalance.GetAddress` now returns a string instead of `sdk.AccAddress` + * `MsgSendExec` test helper function now takes a address.Codec +* (x/auth) [#15520](https://github.com/cosmos/cosmos-sdk/pull/15520) `NewAccountKeeper` now takes a `KVStoreService` instead of a `StoreKey` and methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context`. +* (baseapp) [#15519](https://github.com/cosmos/cosmos-sdk/pull/15519/files) `runTxMode`s were renamed to `execMode`. `ModeDeliver` as changed to `ModeFinalize` and a new `ModeVoteExtension` was added for vote extensions. +* (baseapp) [#15519](https://github.com/cosmos/cosmos-sdk/pull/15519/files) Writing of state to the multistore was moved to `FinalizeBlock`. `Commit` still handles the committing values to disk. +* (baseapp) [#15519](https://github.com/cosmos/cosmos-sdk/pull/15519/files) Calls to BeginBlock and EndBlock have been replaced with core api beginblock & endblock. +* (baseapp) [#15519](https://github.com/cosmos/cosmos-sdk/pull/15519/files) BeginBlock and EndBlock are now internal to baseapp. For testing, user must call `FinalizeBlock`. BeginBlock and EndBlock calls are internal to Baseapp. +* (baseapp) [#15519](https://github.com/cosmos/cosmos-sdk/pull/15519/files) All calls to ABCI methods now accept a pointer of the abci request and response types +* (x/consensus) [#15517](https://github.com/cosmos/cosmos-sdk/pull/15517) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey`. +* (x/bank) [#15477](https://github.com/cosmos/cosmos-sdk/pull/15477) `banktypes.NewMsgMultiSend` and `keeper.InputOutputCoins` only accept one input. +* (server) [#15358](https://github.com/cosmos/cosmos-sdk/pull/15358) Remove `server.ErrorCode` that was not used anywhere. +* (x/capability) [#15344](https://github.com/cosmos/cosmos-sdk/pull/15344) Capability module was removed and is now housed in [IBC-GO](https://github.com/cosmos/ibc-go). +* (mempool) [#15328](https://github.com/cosmos/cosmos-sdk/pull/15328) The `PriorityNonceMempool` is now generic over type `C comparable` and takes a single `PriorityNonceMempoolConfig[C]` argument. See `DefaultPriorityNonceMempoolConfig` for how to construct the configuration and a `TxPriority` type. +* [#15299](https://github.com/cosmos/cosmos-sdk/pull/15299) Remove `StdTx` transaction and signing APIs. No SDK version has actually supported `StdTx` since before Stargate. +* [#15284](https://github.com/cosmos/cosmos-sdk/pull/15284) +* (x/gov) [#15284](https://github.com/cosmos/cosmos-sdk/pull/15284) `NewKeeper` now requires `codec.Codec`. +* (x/authx) [#15284](https://github.com/cosmos/cosmos-sdk/pull/15284) `NewKeeper` now requires `codec.Codec`. + * `types/tx.Tx` no longer implements `sdk.Tx`. + * `sdk.Tx` now requires a new method `GetMsgsV2()`. + * `sdk.Msg.GetSigners` was deprecated and is no longer supported. Use the `cosmos.msg.v1.signer` protobuf annotation instead. + * `TxConfig` has a new method `SigningContext() *signing.Context`. + * `SigVerifiableTx.GetSigners()` now returns `([][]byte, error)` instead of `[]sdk.AccAddress`. + * `AccountKeeper` now has an `AddressCodec() address.Codec` method and the expected `AccountKeeper` for `x/auth/ante` expects this method. +* [#15211](https://github.com/cosmos/cosmos-sdk/pull/15211) Remove usage of `github.com/cometbft/cometbft/libs/bytes.HexBytes` in favor of `[]byte` thorough the SDK. +* (crypto) [#15070](https://github.com/cosmos/cosmos-sdk/pull/15070) `GenerateFromPassword` and `Cost` from `bcrypt.go` now take a `uint32` instead of a `int` type. +* (types) [#15067](https://github.com/cosmos/cosmos-sdk/pull/15067) Remove deprecated alias from `types/errors`. Use `cosmossdk.io/errors` instead. +* (server) [#15041](https://github.com/cosmos/cosmos-sdk/pull/15041) Refactor how gRPC and API servers are started to remove unnecessary sleeps: + * `api.Server#Start` now accepts a `context.Context`. The caller is responsible for ensuring that the context is canceled such that the API server can gracefully exit. The caller does not need to stop the server. + * To start the gRPC server you must first create the server via `NewGRPCServer`, after which you can start the gRPC server via `StartGRPCServer` which accepts a `context.Context`. The caller is responsible for ensuring that the context is canceled such that the gRPC server can gracefully exit. The caller does not need to stop the server. + * Rename `WaitForQuitSignals` to `ListenForQuitSignals`. Note, this function is no longer blocking. Thus the caller is expected to provide a `context.CancelFunc` which indicates that when a signal is caught, that any spawned processes can gracefully exit. + * Remove `ServerStartTime` constant. +* [#15011](https://github.com/cosmos/cosmos-sdk/pull/15011) All functions that were taking a CometBFT logger, now take `cosmossdk.io/log.Logger` instead. +* (simapp) [#14977](https://github.com/cosmos/cosmos-sdk/pull/14977) Move simulation helpers functions (`AppStateFn` and `AppStateRandomizedFn`) to `testutil/sims`. These takes an extra genesisState argument which is the default state of the app. +* (x/bank) [#14894](https://github.com/cosmos/cosmos-sdk/pull/14894) Allow a human readable denomination for coins when querying bank balances. Added a `ResolveDenom` parameter to `types.QueryAllBalancesRequest`. +* [#14847](https://github.com/cosmos/cosmos-sdk/pull/14847) App and ModuleManager methods `InitGenesis`, `ExportGenesis`, `BeginBlock` and `EndBlock` now also return an error. +* (x/upgrade) [#14764](https://github.com/cosmos/cosmos-sdk/pull/14764) The `x/upgrade` module is extracted to have a separate go.mod file which allows it to be a standalone module. +* (x/auth) [#14758](https://github.com/cosmos/cosmos-sdk/pull/14758) Refactor transaction searching: + * Refactor `QueryTxsByEvents` to accept a `query` of type `string` instead of `events` of type `[]string` + * Refactor CLI methods to accept `--query` flag instead of `--events` + * Pass `prove=false` to Tendermint's `TxSearch` RPC method +* (simulation) [#14751](https://github.com/cosmos/cosmos-sdk/pull/14751) Remove the `MsgType` field from `simulation.OperationInput` struct. +* (store) [#14746](https://github.com/cosmos/cosmos-sdk/pull/14746) Extract Store in its own go.mod and rename the package to `cosmossdk.io/store`. +* (x/nft) [#14725](https://github.com/cosmos/cosmos-sdk/pull/14725) Extract NFT in its own go.mod and rename the package to `cosmossdk.io/x/nft`. +* (x/gov) [#14720](https://github.com/cosmos/cosmos-sdk/pull/14720) Add an expedited field in the gov v1 proposal and `MsgNewMsgProposal`. +* (x/feegrant) [#14649](https://github.com/cosmos/cosmos-sdk/pull/14649) Extract Feegrant in its own go.mod and rename the package to `cosmossdk.io/x/feegrant`. +* (tx) [#14634](https://github.com/cosmos/cosmos-sdk/pull/14634) Move the `tx` go module to `x/tx`. +* (store/streaming)[#14603](https://github.com/cosmos/cosmos-sdk/pull/14603) `StoreDecoderRegistry` moved from store to `types/simulations` this breaks the `AppModuleSimulation` interface. +* (snapshots) [#14597](https://github.com/cosmos/cosmos-sdk/pull/14597) Move `snapshots` to `store/snapshots`, rename and bump proto package to v1. +* (x/staking) [#14590](https://github.com/cosmos/cosmos-sdk/pull/14590) `MsgUndelegateResponse` now includes undelegated amount. `x/staking` module's `keeper.Undelegate` now returns 3 values (completionTime,undelegateAmount,error) instead of 2. +* (crypto/keyring) [#14151](https://github.com/cosmos/cosmos-sdk/pull/14151) Move keys presentation from `crypto/keyring` to `client/keys` +* (baseapp) [#14050](https://github.com/cosmos/cosmos-sdk/pull/14050) Refactor `ABCIListener` interface to accept Go contexts. +* (x/auth) [#13850](https://github.com/cosmos/cosmos-sdk/pull/13850/) Remove `MarshalYAML` methods from module (`x/...`) types. +* (modules) [#13850](https://github.com/cosmos/cosmos-sdk/pull/13850) and [#14046](https://github.com/cosmos/cosmos-sdk/pull/14046) Remove gogoproto stringer annotations. This removes the custom `String()` methods on all types that were using the annotations. +* (x/evidence) [14724](https://github.com/cosmos/cosmos-sdk/pull/14724) Extract Evidence in its own go.mod and rename the package to `cosmossdk.io/x/evidence`. +* (crypto/keyring) [#13734](https://github.com/cosmos/cosmos-sdk/pull/13834) The keyring's `Sign` method now takes a new `signMode` argument. It is only used if the signing key is a Ledger hardware device. You can set it to 0 in all other cases. +* (snapshots) [14048](https://github.com/cosmos/cosmos-sdk/pull/14048) Move the Snapshot package to the store package. This is done in an effort group all storage related logic under one package. +* (signing) [#13701](https://github.com/cosmos/cosmos-sdk/pull/) Add `context.Context` as an argument `x/auth/signing.VerifySignature`. +* (store) [#11825](https://github.com/cosmos/cosmos-sdk/pull/11825) Make extension snapshotter interface safer to use, renamed the util function `WriteExtensionItem` to `WriteExtensionPayload`. -### State Machine Breaking +### Client Breaking Changes -* **General** - - * (client) [#7268](https://github.com/cosmos/cosmos-sdk/pull/7268) / [#7147](https://github.com/cosmos/cosmos-sdk/pull/7147) Introduce new protobuf based PubKeys, and migrate PubKey in BaseAccount to use this new protobuf based PubKey format - -* **Modules** - * (modules) [#5572](https://github.com/cosmos/cosmos-sdk/pull/5572) Separate balance from accounts per ADR 004. - _ Account balances are now persisted and retrieved via the `x/bank` module. - _ Vesting account interface has been modified to account for changes. - _ Callers to `NewBaseVestingAccount` are responsible for verifying account balance in relation to - the original vesting amount. - _ The `SendKeeper` and `ViewKeeper` interfaces in `x/bank` have been modified to account for changes. - * (x/auth) [#5533](https://github.com/cosmos/cosmos-sdk/pull/5533) Migrate the `x/auth` module to use Protocol Buffers for state - serialization instead of Amino. - _ The `BaseAccount.PubKey` field is now represented as a Bech32 string instead of a `crypto.Pubkey`. - _ `NewBaseAccountWithAddress` now returns a reference to a `BaseAccount`. - _ The `x/auth` module now accepts a `Codec` interface which extends the `codec.Marshaler` interface by - requiring a concrete codec to know how to serialize accounts. - _ The `AccountRetriever` type now accepts a `Codec` in its constructor in order to know how to - serialize accounts. - * (x/bank) [#6518](https://github.com/cosmos/cosmos-sdk/pull/6518) Support for global and per-denomination send enabled flags. - * Existing send_enabled global flag has been moved into a Params structure as `default_send_enabled`. - * An array of: `{denom: string, enabled: bool}` is added to bank Params to support per-denomination override of global default value. - * (x/distribution) [#5610](https://github.com/cosmos/cosmos-sdk/pull/5610) Migrate the `x/distribution` module to use Protocol Buffers for state - serialization instead of Amino. The exact codec used is `codec.HybridCodec` which utilizes Protobuf for binary encoding and Amino - for JSON encoding. - _ `ValidatorHistoricalRewards.ReferenceCount` is now of types `uint32` instead of `uint16`. - _ `ValidatorSlashEvents` is now a struct with `slashevents`. - _ `ValidatorOutstandingRewards` is now a struct with `rewards`. - _ `ValidatorAccumulatedCommission` is now a struct with `commission`. \* The `Keeper` constructor now takes a `codec.Marshaler` instead of a concrete Amino codec. This exact type - provided is specified by `ModuleCdc`. - * (x/evidence) [#5634](https://github.com/cosmos/cosmos-sdk/pull/5634) Migrate the `x/evidence` module to use Protocol Buffers for state - serialization instead of Amino. - _ The `internal` sub-package has been removed in order to expose the types proto file. - _ The module now accepts a `Codec` interface which extends the `codec.Marshaler` interface by - requiring a concrete codec to know how to serialize `Evidence` types. \* The `MsgSubmitEvidence` message has been removed in favor of `MsgSubmitEvidenceBase`. The application-level - codec must now define the concrete `MsgSubmitEvidence` type which must implement the module's `MsgSubmitEvidence` - interface. - * (x/evidence) [#5952](https://github.com/cosmos/cosmos-sdk/pull/5952) Remove parameters from `x/evidence` genesis and module state. The `x/evidence` module now solely uses Tendermint consensus parameters to determine of evidence is valid or not. - * (x/gov) [#5737](https://github.com/cosmos/cosmos-sdk/pull/5737) Migrate the `x/gov` module to use Protocol - Buffers for state serialization instead of Amino. - _ `MsgSubmitProposal` will be removed in favor of the application-level proto-defined `MsgSubmitProposal` which - implements the `MsgSubmitProposalI` interface. Applications should extend the `NewMsgSubmitProposalBase` type - to define their own concrete `MsgSubmitProposal` types. - _ The module now accepts a `Codec` interface which extends the `codec.Marshaler` interface by - requiring a concrete codec to know how to serialize `Proposal` types. - * (x/mint) [#5634](https://github.com/cosmos/cosmos-sdk/pull/5634) Migrate the `x/mint` module to use Protocol Buffers for state - serialization instead of Amino. \* The `internal` sub-package has been removed in order to expose the types proto file. - * (x/slashing) [#5627](https://github.com/cosmos/cosmos-sdk/pull/5627) Migrate the `x/slashing` module to use Protocol Buffers for state - serialization instead of Amino. The exact codec used is `codec.HybridCodec` which utilizes Protobuf for binary encoding and Amino - for JSON encoding. \* The `Keeper` constructor now takes a `codec.Marshaler` instead of a concrete Amino codec. This exact type - provided is specified by `ModuleCdc`. - * (x/staking) [#6844](https://github.com/cosmos/cosmos-sdk/pull/6844) Validators are now inserted into the unbonding queue based on their unbonding time and height. The relevant keeper APIs are modified to reflect these changes by now also requiring a height. - * (x/staking) [#6061](https://github.com/cosmos/cosmos-sdk/pull/6061) Allow a validator to immediately unjail when no signing info is present due to - falling below their minimum self-delegation and never having been bonded. The validator may immediately unjail once they've met their minimum self-delegation. - * (x/staking) [#5600](https://github.com/cosmos/cosmos-sdk/pull/5600) Migrate the `x/staking` module to use Protocol Buffers for state - serialization instead of Amino. The exact codec used is `codec.HybridCodec` which utilizes Protobuf for binary encoding and Amino - for JSON encoding. - _ `BondStatus` is now of type `int32` instead of `byte`. - _ Types of `int16` in the `Params` type are now of type `int32`. - _ Every reference of `crypto.Pubkey` in context of a `Validator` is now of type string. `GetPubKeyFromBech32` must be used to get the `crypto.Pubkey`. - _ The `Keeper` constructor now takes a `codec.Marshaler` instead of a concrete Amino codec. This exact type - provided is specified by `ModuleCdc`. - * (x/staking) [#7979](https://github.com/cosmos/cosmos-sdk/pull/7979) keeper pubkey storage serialization migration - from bech32 to protobuf. - * (x/supply) [#6010](https://github.com/cosmos/cosmos-sdk/pull/6010) Removed the `x/supply` module by merging the existing types and APIs into the `x/bank` module. - * (x/supply) [#5533](https://github.com/cosmos/cosmos-sdk/pull/5533) Migrate the `x/supply` module to use Protocol Buffers for state - serialization instead of Amino. - _ The `internal` sub-package has been removed in order to expose the types proto file. - _ The `x/supply` module now accepts a `Codec` interface which extends the `codec.Marshaler` interface by - requiring a concrete codec to know how to serialize `SupplyI` types. \* The `SupplyI` interface has been modified to no longer return `SupplyI` on methods. Instead the - concrete type's receiver should modify the type. - * (x/upgrade) [#5659](https://github.com/cosmos/cosmos-sdk/pull/5659) Migrate the `x/upgrade` module to use Protocol - Buffers for state serialization instead of Amino. - _ The `internal` sub-package has been removed in order to expose the types proto file. - _ The `x/upgrade` module now accepts a `codec.Marshaler` interface. +* (x/gov) [#17910](https://github.com/cosmos/cosmos-sdk/pull/17910) Remove telemetry for counting votes and proposals. It was incorrectly counting votes. Use alternatives, such as state streaming. +* (abci) [#15845](https://github.com/cosmos/cosmos-sdk/pull/15845) Remove duplicating events in `logs`. +* (abci) [#15845](https://github.com/cosmos/cosmos-sdk/pull/15845) Add `msg_index` to all event attributes to associate events and messages. +* (x/staking) [#15701](https://github.com/cosmos/cosmos-sdk/pull/15701) `HistoricalInfoKey` now has a binary format. +* (store/streaming) [#15519](https://github.com/cosmos/cosmos-sdk/pull/15519/files) State Streaming removed emitting of beginblock, endblock and delivertx in favour of emitting FinalizeBlock. +* (baseapp) [#15519](https://github.com/cosmos/cosmos-sdk/pull/15519/files) BeginBlock & EndBlock events have begin or endblock in the events in order to identify which stage they are emitted from since they are returned to comet as FinalizeBlock events. +* (grpc-web) [#14652](https://github.com/cosmos/cosmos-sdk/pull/14652) Use same port for gRPC-Web and the API server. -### Features +### CLI Breaking Changes -* **Baseapp / Client / REST** - * (x/auth) [#6213](https://github.com/cosmos/cosmos-sdk/issues/6213) Introduce new protobuf based path for transaction signing, see [ADR020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md) for more details - * (x/auth) [#6350](https://github.com/cosmos/cosmos-sdk/pull/6350) New sign-batch command to sign StdTx batch files. - * (baseapp) [#5803](https://github.com/cosmos/cosmos-sdk/pull/5803) Added support for taking state snapshots at regular height intervals, via options `snapshot-interval` and `snapshot-keep-recent`. - * (baseapp) [#7519](https://github.com/cosmos/cosmos-sdk/pull/7519) Add `ServiceMsgRouter` to BaseApp to handle routing of protobuf service `Msg`s. The two new types defined in ADR 031, `sdk.ServiceMsg` and `sdk.MsgRequest` are introduced with this router. - * (client) [#5921](https://github.com/cosmos/cosmos-sdk/issues/5921) Introduce new gRPC and gRPC Gateway based APIs for querying app & module data. See [ADR021](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-021-protobuf-query-encoding.md) for more details - * (cli) [#7485](https://github.com/cosmos/cosmos-sdk/pull/7485) Introduce a new optional `--keyring-dir` flag that allows clients to specify a Keyring directory if it does not reside in the directory specified by `--home`. - * (cli) [#7221](https://github.com/cosmos/cosmos-sdk/pull/7221) Add the option of emitting amino encoded json from the CLI - * (codec) [#7519](https://github.com/cosmos/cosmos-sdk/pull/7519) `InterfaceRegistry` now inherits `jsonpb.AnyResolver`, and has a `RegisterCustomTypeURL` method to support ADR 031 packing of `Any`s. `AnyResolver` is now a required parameter to `RejectUnknownFields`. - * (coin) [#6755](https://github.com/cosmos/cosmos-sdk/pull/6755) Add custom regex validation for `Coin` denom by overwriting `CoinDenomRegex` when using `/types/coin.go`. - * (config) [#7265](https://github.com/cosmos/cosmos-sdk/pull/7265) Support Tendermint block pruning through a new `min-retain-blocks` configuration that can be set in either `app.toml` or via the CLI. This parameter is used in conjunction with other criteria to determine the height at which Tendermint should prune blocks. - * (events) [#7121](https://github.com/cosmos/cosmos-sdk/pull/7121) The application now derives what events are indexed by Tendermint via the `index-events` configuration in `app.toml`, which is a list of events taking the form `{eventType}.{attributeKey}`. - * (tx) [#6089](https://github.com/cosmos/cosmos-sdk/pull/6089) Transactions can now have a `TimeoutHeight` set which allows the transaction to be rejected if it's committed at a height greater than the timeout. - * (rest) [#6167](https://github.com/cosmos/cosmos-sdk/pull/6167) Support `max-body-bytes` CLI flag for the REST service. - * (genesis) [#7089](https://github.com/cosmos/cosmos-sdk/pull/7089) The `export` command now adds a `initial_height` field in the exported JSON. Baseapp's `CommitMultiStore` now also has a `SetInitialVersion` setter, so it can set the initial store version inside `InitChain` and start a new chain from a given height. -* **General** - * (crypto/multisig) [#6241](https://github.com/cosmos/cosmos-sdk/pull/6241) Add Multisig type directly to the repo. Previously this was in tendermint. - * (codec/types) [#8106](https://github.com/cosmos/cosmos-sdk/pull/8106) Adding `NewAnyWithCustomTypeURL` to correctly - marshal Messages in TxBuilder. - * (tests) [#6489](https://github.com/cosmos/cosmos-sdk/pull/6489) Introduce package `testutil`, new in-process testing network framework for use in integration and unit tests. - * (tx) Add new auth/tx gRPC & gRPC-Gateway endpoints for basic querying & broadcasting support - * [#7842](https://github.com/cosmos/cosmos-sdk/pull/7842) Add TxsByEvent gRPC endpoint - * [#7852](https://github.com/cosmos/cosmos-sdk/pull/7852) Add tx broadcast gRPC endpoint - * (tx) [#7688](https://github.com/cosmos/cosmos-sdk/pull/7688) Add a new Tx gRPC service with methods `Simulate` and `GetTx` (by hash). - * (store) [#5803](https://github.com/cosmos/cosmos-sdk/pull/5803) Added `rootmulti.Store` methods for taking and restoring snapshots, based on `iavl.Store` export/import. - * (store) [#6324](https://github.com/cosmos/cosmos-sdk/pull/6324) IAVL store query proofs now return CommitmentOp which wraps an ics23 CommitmentProof - * (store) [#6390](https://github.com/cosmos/cosmos-sdk/pull/6390) `RootMulti` store query proofs now return `CommitmentOp` which wraps `CommitmentProofs` - * `store.Query` now only returns chained `ics23.CommitmentProof` wrapped in `merkle.Proof` - * `ProofRuntime` only decodes and verifies `ics23.CommitmentProof` -* **Modules** - * (modules) [#5921](https://github.com/cosmos/cosmos-sdk/issues/5921) Introduction of Query gRPC service definitions along with REST annotations for gRPC Gateway for each module - * (modules) [#7540](https://github.com/cosmos/cosmos-sdk/issues/7540) Protobuf service definitions can now be used for - packing `Msg`s in transactions as defined in [ADR 031](./docs/architecture/adr-031-msg-service.md). All modules now - define a `Msg` protobuf service. - * (x/auth/vesting) [#7209](https://github.com/cosmos/cosmos-sdk/pull/7209) Create new `MsgCreateVestingAccount` message type along with CLI handler that allows for the creation of delayed and continuous vesting types. - * (x/capability) [#5828](https://github.com/cosmos/cosmos-sdk/pull/5828) Capability module integration as outlined in [ADR 3 - Dynamic Capability Store](https://github.com/cosmos/tree/master/docs/architecture/adr-003-dynamic-capability-store.md). - * (x/crisis) `x/crisis` has a new function: `AddModuleInitFlags`, which will register optional crisis module flags for the start command. - * (x/ibc) [#5277](https://github.com/cosmos/cosmos-sdk/pull/5277) `x/ibc` changes from IBC alpha. For more details check the [`x/ibc/core/spec`](https://github.com/cosmos/cosmos-sdk/tree/master/x/ibc/core/spec) directory, or the ICS specs below: - * [ICS 002 - Client Semantics](https://github.com/cosmos/ics/tree/master/spec/ics-002-client-semantics) subpackage - * [ICS 003 - Connection Semantics](https://github.com/cosmos/ics/blob/master/spec/ics-003-connection-semantics) subpackage - * [ICS 004 - Channel and Packet Semantics](https://github.com/cosmos/ics/blob/master/spec/ics-004-channel-and-packet-semantics) subpackage - * [ICS 005 - Port Allocation](https://github.com/cosmos/ics/blob/master/spec/ics-005-port-allocation) subpackage - * [ICS 006 - Solo Machine Client](https://github.com/cosmos/ics/tree/master/spec/ics-006-solo-machine-client) subpackage - * [ICS 007 - Tendermint Client](https://github.com/cosmos/ics/blob/master/spec/ics-007-tendermint-client) subpackage - * [ICS 009 - Loopback Client](https://github.com/cosmos/ics/tree/master/spec/ics-009-loopback-client) subpackage - * [ICS 020 - Fungible Token Transfer](https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer) subpackage - * [ICS 023 - Vector Commitments](https://github.com/cosmos/ics/tree/master/spec/ics-023-vector-commitments) subpackage - * [ICS 024 - Host State Machine Requirements](https://github.com/cosmos/ics/tree/master/spec/ics-024-host-requirements) subpackage - * (x/ibc) [#6374](https://github.com/cosmos/cosmos-sdk/pull/6374) ICS-23 Verify functions will now accept and verify ics23 CommitmentProofs exclusively - * (x/params) [#6005](https://github.com/cosmos/cosmos-sdk/pull/6005) Add new CLI command for querying raw x/params parameters by subspace and key. +* (all) The migration of modules to [AutoCLI](https://docs.cosmos.network/main/core/autocli) led to no changes in UX but a [small change in CLI outputs](https://github.com/cosmos/cosmos-sdk/issues/16651) where results can be nested. +* (all) Query pagination flags have been renamed with the migration to AutoCLI: + * `--reverse` -> `--page-reverse` + * `--offset` -> `--page-offset` + * `--limit` -> `--page-limit` + * `--count-total` -> `--page-count-total` +* (cli) [#17184](https://github.com/cosmos/cosmos-sdk/pull/17184) All json keys returned by the `status` command are now snake case instead of pascal case. +* (server) [#17177](https://github.com/cosmos/cosmos-sdk/pull/17177) Remove `iavl-lazy-loading` configuration. +* (x/gov) [#16987](https://github.com/cosmos/cosmos-sdk/pull/16987) In ` query gov proposals` the proposal status flag have renamed from `--status` to `--proposal-status`. Additionally, that flags now uses the ENUM values: `PROPOSAL_STATUS_DEPOSIT_PERIOD`, `PROPOSAL_STATUS_VOTING_PERIOD`, `PROPOSAL_STATUS_PASSED`, `PROPOSAL_STATUS_REJECTED`, `PROPOSAL_STATUS_FAILED`. +* (x/bank) [#16899](https://github.com/cosmos/cosmos-sdk/pull/16899) With the migration to AutoCLI some bank commands have been split in two: + * Use `total-supply` (or `total`) for querying the total supply and `total-supply-of` for querying the supply of a specific denom. + * Use `denoms-metadata` for querying all denom metadata and `denom-metadata` for querying a specific denom metadata. +* (rosetta) [#16276](https://github.com/cosmos/cosmos-sdk/issues/16276) Rosetta migration to standalone repo. +* (cli) [#15826](https://github.com/cosmos/cosmos-sdk/pull/15826) Remove ` q account` command. Use ` q auth account` instead. +* (cli) [#15299](https://github.com/cosmos/cosmos-sdk/pull/15299) Remove `--amino` flag from `sign` and `multi-sign` commands. Amino `StdTx` has been deprecated for a while. Amino JSON signing still works as expected. +* (x/gov) [#14880](https://github.com/cosmos/cosmos-sdk/pull/14880) Remove ` tx gov submit-legacy-proposal cancel-software-upgrade` and `software-upgrade` commands. These commands are now in the `x/upgrade` module and using gov v1. Use `tx upgrade software-upgrade` instead. +* (x/staking) [#14864](https://github.com/cosmos/cosmos-sdk/pull/14864) ` tx staking create-validator` CLI command now takes a json file as an arg instead of using required flags. +* (cli) [#14659](https://github.com/cosmos/cosmos-sdk/pull/14659) ` q block ` is removed as it just output json. The new command allows either height/hash and is ` q block --type=height|hash `. +* (grpc-web) [#14652](https://github.com/cosmos/cosmos-sdk/pull/14652) Remove `grpc-web.address` flag. +* (client) [#14342](https://github.com/cosmos/cosmos-sdk/pull/14342) ` config` command is now a sub-command using Confix. Use ` config --help` to learn more. + +### Bug Fixes + +* (server) [#18254](https://github.com/cosmos/cosmos-sdk/pull/18254) Don't hardcode gRPC address to localhost. +* (x/gov) [#18173](https://github.com/cosmos/cosmos-sdk/pull/18173) Gov hooks now return an error and are *blocking* when they fail. Expect for `AfterProposalFailedMinDeposit` and `AfterProposalVotingPeriodEnded` which log the error and continue. +* (x/gov) [#17873](https://github.com/cosmos/cosmos-sdk/pull/17873) Fail any inactive and active proposals that cannot be decoded. +* (x/slashing) [#18016](https://github.com/cosmos/cosmos-sdk/pull/18016) Fixed builder function for missed blocks key (`validatorMissedBlockBitArrayPrefixKey`) in slashing/migration/v4. +* (x/bank) [#18107](https://github.com/cosmos/cosmos-sdk/pull/18107) Add missing keypair of SendEnabled to restore legacy param set before migration. +* (baseapp) [#17769](https://github.com/cosmos/cosmos-sdk/pull/17769) Ensure we respect block size constraints in the `DefaultProposalHandler`'s `PrepareProposal` handler when a nil or no-op mempool is used. We provide a `TxSelector` type to assist in making transaction selection generalized. We also fix a comparison bug in tx selection when `req.maxTxBytes` is reached. +* (mempool) [#17668](https://github.com/cosmos/cosmos-sdk/pull/17668) Fix `PriorityNonceIterator.Next()` nil pointer ref for min priority at the end of iteration. +* (config) [#17649](https://github.com/cosmos/cosmos-sdk/pull/17649) Fix `mempool.max-txs` configuration is invalid in `app.config`. +* (baseapp) [#17518](https://github.com/cosmos/cosmos-sdk/pull/17518) Utilizing voting power from vote extensions (CometBFT) instead of the current bonded tokens (x/staking) to determine if a set of vote extensions are valid. +* (baseapp) [#17251](https://github.com/cosmos/cosmos-sdk/pull/17251) VerifyVoteExtensions and ExtendVote initialize their own contexts/states, allowing VerifyVoteExtensions being called without ExtendVote. +* (x/distribution) [#17236](https://github.com/cosmos/cosmos-sdk/pull/17236) Using "validateCommunityTax" in "Params.ValidateBasic", preventing panic when field "CommunityTax" is nil. +* (x/bank) [#17170](https://github.com/cosmos/cosmos-sdk/pull/17170) Avoid empty spendable error message on send coins. +* (x/group) [#17146](https://github.com/cosmos/cosmos-sdk/pull/17146) Rename x/group legacy ORM package's error codespace from "orm" to "legacy_orm", preventing collisions with ORM's error codespace "orm". +* (types/query) [#16905](https://github.com/cosmos/cosmos-sdk/pull/16905) Collections Pagination now applies proper count when filtering results. +* (x/bank) [#16841](https://github.com/cosmos/cosmos-sdk/pull/16841) Correctly process legacy `DenomAddressIndex` values. +* (x/auth/vesting) [#16733](https://github.com/cosmos/cosmos-sdk/pull/16733) Panic on overflowing and negative EndTimes when creating a PeriodicVestingAccount. +* (x/consensus) [#16713](https://github.com/cosmos/cosmos-sdk/pull/16713) Add missing ABCI param in `MsgUpdateParams`. +* (baseapp) [#16700](https://github.com/cosmos/cosmos-sdk/pull/16700) Fix consensus failure in returning no response to malformed transactions. +* [#16639](https://github.com/cosmos/cosmos-sdk/pull/16639) Make sure we don't execute blocks beyond the halt height. +* (baseapp) [#16613](https://github.com/cosmos/cosmos-sdk/pull/16613) Ensure each message in a transaction has a registered handler, otherwise `CheckTx` will fail. +* (baseapp) [#16596](https://github.com/cosmos/cosmos-sdk/pull/16596) Return error during `ExtendVote` and `VerifyVoteExtension` if the request height is earlier than `VoteExtensionsEnableHeight`. +* (baseapp) [#16259](https://github.com/cosmos/cosmos-sdk/pull/16259) Ensure the `Context` block height is correct after `InitChain` and prior to the second block. +* (x/gov) [#16231](https://github.com/cosmos/cosmos-sdk/pull/16231) Fix Rawlog JSON formatting of proposal_vote option field.* (cli) [#16138](https://github.com/cosmos/cosmos-sdk/pull/16138) Fix snapshot commands panic if snapshot don't exists. +* (x/staking) [#16043](https://github.com/cosmos/cosmos-sdk/pull/16043) Call `AfterUnbondingInitiated` hook for new unbonding entries only and fix `UnbondingDelegation` entries handling. This is a behavior change compared to Cosmos SDK v0.47.x, now the hook is called only for new unbonding entries. +* (types) [#16010](https://github.com/cosmos/cosmos-sdk/pull/16010) Let `module.CoreAppModuleBasicAdaptor` fallback to legacy genesis handling. +* (types) [#15691](https://github.com/cosmos/cosmos-sdk/pull/15691) Make `Coin.Validate()` check that `.Amount` is not nil. +* (x/crypto) [#15258](https://github.com/cosmos/cosmos-sdk/pull/15258) Write keyhash file with permissions 0600 instead of 0555. +* (x/auth) [#15059](https://github.com/cosmos/cosmos-sdk/pull/15059) `ante.CountSubKeys` returns 0 when passing a nil `Pubkey`. +* (x/capability) [#15030](https://github.com/cosmos/cosmos-sdk/pull/15030) Prevent `x/capability` from consuming `GasMeter` gas during `InitMemStore` +* (types/coin) [#14739](https://github.com/cosmos/cosmos-sdk/pull/14739) Deprecate the method `Coin.IsEqual` in favour of `Coin.Equal`. The difference between the two methods is that the first one results in a panic when denoms are not equal. This panic lead to unexpected behavior. -### Bug Fixes +### Deprecated -* **Baseapp / Client / REST** - * (client) [#5964](https://github.com/cosmos/cosmos-sdk/issues/5964) `--trust-node` is now false by default - for real. Users must ensure it is set to true if they don't want to enable the verifier. - * (client) [#6402](https://github.com/cosmos/cosmos-sdk/issues/6402) Fix `keys add` `--algo` flag which only worked for Tendermint's `secp256k1` default key signing algorithm. - * (client) [#7699](https://github.com/cosmos/cosmos-sdk/pull/7699) Fix panic in context when setting invalid nodeURI. `WithNodeURI` does not set the `Client` in the context. - * (export) [#6510](https://github.com/cosmos/cosmos-sdk/pull/6510/) Field TimeIotaMs now is included in genesis file while exporting. - * (rest) [#5906](https://github.com/cosmos/cosmos-sdk/pull/5906) Fix an issue that make some REST calls panic when sending invalid or incomplete requests. - * (crypto) [#7966](https://github.com/cosmos/cosmos-sdk/issues/7966) `Bip44Params` `String()` function now correctly - returns the absolute HD path by adding the `m/` prefix. - * (crypto/keyring) [#5844](https://github.com/cosmos/cosmos-sdk/pull/5844) `Keyring.Sign()` methods no longer decode amino signatures when method receivers - are offline/multisig keys. - * (store) [#7415](https://github.com/cosmos/cosmos-sdk/pull/7415) Allow new stores to be registered during on-chain upgrades. -* **Modules** - _ (modules) [#5569](https://github.com/cosmos/cosmos-sdk/issues/5569) `InitGenesis`, for the relevant modules, now ensures module accounts exist. - _ (x/auth) [#5892](https://github.com/cosmos/cosmos-sdk/pull/5892) Add `RegisterKeyTypeCodec` to register new - types (eg. keys) to the `auth` module internal amino codec. - _ (x/bank) [#6536](https://github.com/cosmos/cosmos-sdk/pull/6536) Fix bug in `WriteGeneratedTxResponse` function used by multiple - REST endpoints. Now it writes a Tx in StdTx format. - _ (x/genutil) [#5938](https://github.com/cosmos/cosmos-sdk/pull/5938) Fix `InitializeNodeValidatorFiles` error handling. - _ (x/gentx) [#8183](https://github.com/cosmos/cosmos-sdk/pull/8183) change gentx cmd amount to arg from flag - _ (x/gov) [#7641](https://github.com/cosmos/cosmos-sdk/pull/7641) Fix tally calculation precision error. - _ (x/staking) [#6529](https://github.com/cosmos/cosmos-sdk/pull/6529) Export validator addresses (previously was empty). - _ (x/staking) [#5949](https://github.com/cosmos/cosmos-sdk/pull/5949) Skip staking `HistoricalInfoKey` in simulations as headers are not exported. \* (x/staking) [#6061](https://github.com/cosmos/cosmos-sdk/pull/6061) Allow a validator to immediately unjail when no signing info is present due to - falling below their minimum self-delegation and never having been bonded. The validator may immediately unjail once they've met their minimum self-delegation. -* **General** - * (types) [#7038](https://github.com/cosmos/cosmos-sdk/issues/7038) Fix infinite looping of `ApproxRoot` by including a hard-coded maximum iterations limit of 100. - * (types) [#7084](https://github.com/cosmos/cosmos-sdk/pull/7084) Fix panic when calling `BigInt()` on an uninitialized `Int`. - * (simulation) [#7129](https://github.com/cosmos/cosmos-sdk/issues/7129) Fix support for custom `Account` and key types on auth's simulation. +* (types) [#16980](https://github.com/cosmos/cosmos-sdk/pull/16980) Deprecate `IntProto` and `DecProto`. Instead, `math.Int` and `math.LegacyDec` should be used respectively. Both types support `Marshal` and `Unmarshal` for binary serialization. +* (x/staking) [#14567](https://github.com/cosmos/cosmos-sdk/pull/14567) The `delegator_address` field of `MsgCreateValidator` has been deprecated. + The validator address bytes and delegator address bytes refer to the same account while creating validator (defer only in bech32 notation). -### Improvements +## Previous Versions -* **Baseapp / Client / REST** - * (baseapp) [#6186](https://github.com/cosmos/cosmos-sdk/issues/6186) Support emitting events during `AnteHandler` execution. - * (baseapp) [#6053](https://github.com/cosmos/cosmos-sdk/pull/6053) Customizable panic recovery handling added for `app.runTx()` method (as proposed in the [ADR 22](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-022-custom-panic-handling.md)). Adds ability for developers to register custom panic handlers extending standard ones. - * (client) [#5810](https://github.com/cosmos/cosmos-sdk/pull/5810) Added a new `--offline` flag that allows commands to be executed without an - internet connection. Previously, `--generate-only` served this purpose in addition to only allowing txs to be generated. Now, `--generate-only` solely - allows txs to be generated without being broadcasted and disallows Keybase use and `--offline` allows the use of Keybase but does not allow any - functionality that requires an online connection. - * (cli) [#7764](https://github.com/cosmos/cosmos-sdk/pull/7764) Update x/banking and x/crisis InitChain to improve node startup time - * (client) [#5856](https://github.com/cosmos/cosmos-sdk/pull/5856) Added the possibility to set `--offline` flag with config command. - * (client) [#5895](https://github.com/cosmos/cosmos-sdk/issues/5895) show config options in the config command's help screen. - * (client/keys) [#8043](https://github.com/cosmos/cosmos-sdk/pull/8043) Add support for export of unarmored private key - * (client/tx) [#7801](https://github.com/cosmos/cosmos-sdk/pull/7801) Update sign-batch multisig to work online - * (x/genutil) [#8099](https://github.com/cosmos/cosmos-sdk/pull/8099) `init` now supports a `--recover` flag to recover - the private validator key from a given mnemonic -* **Modules** - * (x/auth) [#5702](https://github.com/cosmos/cosmos-sdk/pull/5702) Add parameter querying support for `x/auth`. - * (x/auth/ante) [#6040](https://github.com/cosmos/cosmos-sdk/pull/6040) `AccountKeeper` interface used for `NewAnteHandler` and handler's decorators to add support of using custom `AccountKeeper` implementations. - * (x/evidence) [#5952](https://github.com/cosmos/cosmos-sdk/pull/5952) Tendermint Consensus parameters can now be changed via parameter change proposals through `x/gov`. - * (x/evidence) [#5961](https://github.com/cosmos/cosmos-sdk/issues/5961) Add `StoreDecoder` simulation for evidence module. - * (x/ibc) [#5948](https://github.com/cosmos/cosmos-sdk/issues/5948) Add `InitGenesis` and `ExportGenesis` functions for `ibc` module. - * (x/ibc-transfer) [#6871](https://github.com/cosmos/cosmos-sdk/pull/6871) Implement [ADR 001 - Coin Source Tracing](./docs/architecture/adr-001-coin-source-tracing.md). - * (x/staking) [#6059](https://github.com/cosmos/cosmos-sdk/pull/6059) Updated `HistoricalEntries` parameter default to 100. - * (x/staking) [#5584](https://github.com/cosmos/cosmos-sdk/pull/5584) Add util function `ToTmValidator` that converts a `staking.Validator` type to `*tmtypes.Validator`. - * (x/staking) [#6163](https://github.com/cosmos/cosmos-sdk/pull/6163) CLI and REST call to unbonding delegations and delegations now accept - pagination. - * (x/staking) [#8178](https://github.com/cosmos/cosmos-sdk/pull/8178) Update default historical header number for stargate -* **General** - * (crypto) [#7987](https://github.com/cosmos/cosmos-sdk/pull/7987) Fix the inconsistency of CryptoCdc, only use - `codec/legacy.Cdc`. - * (logging) [#8072](https://github.com/cosmos/cosmos-sdk/pull/8072) Refactor logging: - _ Use [zerolog](https://github.com/rs/zerolog) over Tendermint's go-kit logging wrapper. - _ Introduce Tendermint's `--log_format=plain|json` flag. Using format `json` allows for emitting structured JSON - logs which can be consumed by an external logging facility (e.g. Loggly). Both formats log to STDERR. \* The existing `--log_level` flag and it's default value now solely relates to the global logging - level (e.g. `info`, `debug`, etc...) instead of `:`. - * (rest) [#7649](https://github.com/cosmos/cosmos-sdk/pull/7649) Return an unsigned tx in legacy GET /tx endpoint when signature conversion fails - * (simulation) [#6002](https://github.com/cosmos/cosmos-sdk/pull/6002) Add randomized consensus params into simulation. - * (store) [#6481](https://github.com/cosmos/cosmos-sdk/pull/6481) Move `SimpleProofsFromMap` from Tendermint into the SDK. - * (store) [#6719](https://github.com/cosmos/cosmos-sdk/6754) Add validity checks to stores for nil and empty keys. - * (SDK) Updated dependencies - * Updated iavl dependency to v0.15.3 - * Update tendermint to v0.34.1 - * (types) [#7027](https://github.com/cosmos/cosmos-sdk/pull/7027) `Coin(s)` and `DecCoin(s)` updates: - * Bump denomination max length to 128 - * Allow uppercase letters and numbers in denominations to support [ADR 001](./docs/architecture/adr-001-coin-source-tracing.md) - * Added `Validate` function that returns a descriptive error - * (types) [#5581](https://github.com/cosmos/cosmos-sdk/pull/5581) Add convenience functions {,Must}Bech32ifyAddressBytes. - * (types/module) [#5724](https://github.com/cosmos/cosmos-sdk/issues/5724) The `types/module` package does no longer depend on `x/simulation`. - * (types) [#5585](https://github.com/cosmos/cosmos-sdk/pull/5585) IBC additions: - * `Coin` denomination max lenght has been increased to 32. - * Added `CapabilityKey` alias for `StoreKey` to match IBC spec. - * (types/rest) [#5900](https://github.com/cosmos/cosmos-sdk/pull/5900) Add Check\*Error function family to spare developers from replicating tons of boilerplate code. - * (types) [#6128](https://github.com/cosmos/cosmos-sdk/pull/6137) Add `String()` method to `GasMeter`. - * (types) [#6195](https://github.com/cosmos/cosmos-sdk/pull/6195) Add codespace to broadcast(sync/async) response. - * (types) [#6897](https://github.com/cosmos/cosmos-sdk/issues/6897) Add KV type from tendermint to `types` directory. - * (version) [#7848](https://github.com/cosmos/cosmos-sdk/pull/7848) [#7941](https://github.com/cosmos/cosmos-sdk/pull/7941) - `version --long` output now shows the list of build dependencies and replaced build dependencies. - -## Previous Releases - -[CHANGELOG of previous versions](https://github.com/cosmos/cosmos-sdk/blob/c17c3caab86a1426a1eef4541e8203f5f54a1a54/CHANGELOG.md#v0391---2020-08-11) (pre Stargate). +[CHANGELOG of previous versions](https://github.com/cosmos/cosmos-sdk/blob/main/CHANGELOG.md#v0470---2023-03-14). diff --git a/Dockerfile b/Dockerfile index 2af186b6ecc5..94dec57605de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ # # This image is pushed to the GHCR as https://ghcr.io/cosmos/simapp -FROM golang:1.20-alpine AS build-env +FROM golang:1.21-alpine AS build-env # Install minimum necessary dependencies ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev @@ -48,5 +48,8 @@ CMD ["simd"] STOPSIGNAL SIGTERM WORKDIR /root +# Install minimum necessary dependencies +RUN apk add --no-cache curl make bash jq sed + # Copy over binaries from the build-env COPY --from=build-env /go/src/github.com/cosmos/cosmos-sdk/build/simd /usr/bin/simd diff --git a/Makefile b/Makefile index cbbbcebbe7dc..181de584d26e 100644 --- a/Makefile +++ b/Makefile @@ -126,16 +126,13 @@ $(BUILDDIR)/: cosmovisor: $(MAKE) -C tools/cosmovisor cosmovisor -rosetta: - $(MAKE) -C tools/rosetta rosetta - confix: $(MAKE) -C tools/confix confix hubl: $(MAKE) -C tools/hubl hubl -.PHONY: build build-linux-amd64 build-linux-arm64 cosmovisor rosetta confix +.PHONY: build build-linux-amd64 build-linux-arm64 cosmovisor confix mocks: $(MOCKS_DIR) @@ -280,9 +277,9 @@ test-sim-nondeterminism-streaming: test-sim-custom-genesis-fast: @echo "Running custom genesis simulation..." - @echo "By default, ${HOME}/.gaiad/config/genesis.json will be used." - @cd ${CURRENT_DIR}/simapp && go test -mod=readonly -run TestFullAppSimulation -Genesis=${HOME}/.gaiad/config/genesis.json \ - -Enabled=true -NumBlocks=100 -BlockSize=200 -Commit=true -Seed=99 -Period=5 -v -timeout 24h + @echo "By default, ${HOME}/.simapp/config/genesis.json will be used." + @cd ${CURRENT_DIR}/simapp && go test -mod=readonly -run TestFullAppSimulation -Genesis=${HOME}/.simapp/config/genesis.json \ + -Enabled=true -NumBlocks=100 -BlockSize=200 -Commit=true -Seed=99 -Period=5 -SigverifyTx=false -v -timeout 24h test-sim-import-export: runsim @echo "Running application import/export simulation. This may take several minutes..." @@ -294,8 +291,8 @@ test-sim-after-import: runsim test-sim-custom-genesis-multi-seed: runsim @echo "Running multi-seed custom genesis simulation..." - @echo "By default, ${HOME}/.gaiad/config/genesis.json will be used." - @cd ${CURRENT_DIR}/simapp && $(BINDIR)/runsim -Genesis=${HOME}/.gaiad/config/genesis.json -SimAppPkg=. -ExitOnFail 400 5 TestFullAppSimulation + @echo "By default, ${HOME}/.simapp/config/genesis.json will be used." + @cd ${CURRENT_DIR}/simapp && $(BINDIR)/runsim -Genesis=${HOME}/.simapp/config/genesis.json -SigverifyTx=false -SimAppPkg=. -ExitOnFail 400 5 TestFullAppSimulation test-sim-multi-seed-long: runsim @echo "Running long multi-seed application simulation. This may take awhile!" @@ -366,11 +363,6 @@ test-sim-profile-streaming: .PHONY: test-sim-profile test-sim-benchmark -test-rosetta: - docker build -t rosetta-ci:latest -f contrib/rosetta/rosetta-ci/Dockerfile . - docker-compose -f contrib/rosetta/docker-compose.yaml up --abort-on-container-exit --exit-code-from test_rosetta --build -.PHONY: test-rosetta - benchmark: @go test -mod=readonly -bench=. $(PACKAGES_NOSIMULATION) .PHONY: benchmark @@ -379,17 +371,20 @@ benchmark: ### Linting ### ############################################################################### -golangci_lint_cmd=golangci-lint golangci_version=v1.51.2 +lint-install: + @echo "--> Installing golangci-lint $(golangci_version)" + @go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version) + lint: @echo "--> Running linter" - @go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version) + $(MAKE) lint-install @./scripts/go-lint-all.bash --timeout=15m lint-fix: @echo "--> Running linter" - @go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version) + $(MAKE) lint-install @./scripts/go-lint-all.bash --fix .PHONY: lint lint-fix @@ -398,7 +393,7 @@ lint-fix: ### Protobuf ### ############################################################################### -protoVer=0.13.2 +protoVer=0.14.0 protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer) protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) @@ -421,7 +416,7 @@ proto-lint: proto-check-breaking: @$(protoImage) buf breaking --against $(HTTPS_GIT)#branch=main -CMT_URL = https://raw.githubusercontent.com/cometbft/cometbft/v0.38.0-alpha.2/proto/tendermint +CMT_URL = https://raw.githubusercontent.com/cometbft/cometbft/v0.38.0/proto/tendermint CMT_CRYPTO_TYPES = proto/tendermint/crypto CMT_ABCI_TYPES = proto/tendermint/abci @@ -472,10 +467,10 @@ localnet-build-dlv: localnet-build-nodes: $(DOCKER) run --rm -v $(CURDIR)/.testnets:/data cosmossdk/simd \ testnet init-files --v 4 -o /data --starting-ip-address 192.168.10.2 --keyring-backend=test - docker-compose up -d + docker compose up -d localnet-stop: - docker-compose down + docker compose down # localnet-start will run a 4-node testnet locally. The nodes are # based off the docker images in: ./contrib/images/simd-env @@ -486,15 +481,3 @@ localnet-start: localnet-stop localnet-build-env localnet-build-nodes localnet-debug: localnet-stop localnet-build-dlv localnet-build-nodes .PHONY: localnet-start localnet-stop localnet-debug localnet-build-env localnet-build-dlv localnet-build-nodes - -############################################################################### -### rosetta ### -############################################################################### -# builds rosetta test data dir -rosetta-data: - -docker container rm data_dir_build - docker build -t rosetta-ci:latest -f contrib/rosetta/rosetta-ci/Dockerfile . - docker run --name data_dir_build -t rosetta-ci:latest sh /rosetta/data.sh - docker cp data_dir_build:/tmp/data.tar.gz "$(CURDIR)/contrib/rosetta/rosetta-ci/data.tar.gz" - docker container rm data_dir_build -.PHONY: rosetta-data diff --git a/README.md b/README.md index 3f1b4f5842c9..ff4a109a369d 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ The Cosmos SDK is a framework for building blockchain applications. [CometBFT (B **WARNING**: The Cosmos SDK has mostly stabilized, but we are still making some breaking changes. -**Note**: Requires [Go 1.20+](https://go.dev/dl) +**Note**: We advise to always use the latest maintained [Go](https://go.dev/dl) version for building Cosmos SDK applications. ## Quick Start diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md new file mode 100644 index 000000000000..4d559594ccba --- /dev/null +++ b/RELEASE_NOTES.md @@ -0,0 +1,20 @@ +# Cosmos SDK v0.50.10 Release Notes + +💬 [**Release Discussion**](https://github.com/orgs/cosmos/discussions/58) + +## 🚀 Highlights + +For this month patch release of the v0.50.x line, some bugs were fixed. + +Notably, we fixed the following: + +* Add the root command `module-hash-by-height` to query and retrieve module hashes at a specific height +* `PreBlock` events (mainly `x/upgrade`) are now emitted (this time, for real) +* A fix in runtime baseapp option ordering, giving issue when other modules were having options + +## 📝 Changelog + +Check out the [changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.50.10/CHANGELOG.md) for an exhaustive list of changes, or [compare changes](https://github.com/cosmos/cosmos-sdk/compare/v0.50.9...v0.50.10) from the last release. + +Refer to the [upgrading guide](https://github.com/cosmos/cosmos-sdk/blob/release/v0.50.x/UPGRADING.md) when migrating from `v0.47.x` to `v0.50.1`. +Note, that the next SDK release, v0.52, will not include `x/params` migration, when migrating from < v0.47, v0.50.x **or** v0.47.x, is a mandatory migration. diff --git a/RELEASE_PROCESS.md b/RELEASE_PROCESS.md index 2d7920408610..44ae30a180d2 100644 --- a/RELEASE_PROCESS.md +++ b/RELEASE_PROCESS.md @@ -215,3 +215,34 @@ Currently residing Stable Release Managers: * @tac0turtle - Marko Baricevic * @julienrbrt - Julien Robert + +## Cosmos SDK Modules + +The Cosmos SDK repository is a mono-repo where its Go modules have a different release process and cadence than the Cosmos SDK itself. +There are two types of modules: + +1. Modules that import the Cosmos SDK and depend on a specific version of it. + * Modules to be imported in an app (e.g `x/` modules). + * Modules that are not imported into an app and are a standalone module (e.g. `cosmovisor`). +2. Modules that do not depend on the Cosmos SDK. + +The same changelog procedure applies to all modules in the Cosmos SDK repository, and must be up-to-date with the latest changes before tagging a module version. +Note: The Cosmos SDK team is in an active process of limiting Go modules that depend on the Cosmos SDK. + +### Modules that depend on the Cosmos SDK + +The Cosmos SDK team should strive to release modules that depend on the Cosmos SDK at the same time or soon after a major version Cosmos SDK itself. +Those modules can be considered as part of the Cosmos SDK, but features and improvements are released at a different cadence. + +* When a module is supposed to be used in an app (e.g `x/` modules), due to the dependency on the SDK, tagging a new version of a module must be done from a Cosmos SDK release branch. A compability matrix must be provided in the `README.md` of that module with the corresponding versions. +* Modules that import the SDK but do not need to be imported in an app (`e.g. cosmovisor`) must be released from the `main` branch and follow the process defined below. + +### Modules that do not depend on the Cosmos SDK + +Modules that do not depend on the Cosmos SDK can be released at any time from the `main` branch of the Cosmos SDK repository. + +#### Branches For Go Modules + +Branches that go modules are released from: + +* Store v1 is released from `release/v0.50.x` branch. diff --git a/UPGRADING.md b/UPGRADING.md index 07711026ad39..f44270ea666c 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -3,7 +3,7 @@ This guide provides instructions for upgrading to specific versions of Cosmos SDK. Note, always read the **SimApp** section for more information on application wiring updates. -## [Unreleased] +## [v0.50.x](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.0) ### Migration to CometBFT (Part 2) @@ -18,46 +18,135 @@ Following an exhaustive list: * Package `client/grpc/tmservice` -> `client/grpc/cmtservice` Additionally, the commands and flags mentioning `tendermint` have been renamed to `comet`. -However, these commands and flags is still supported for backward compatibility. +These commands and flags are still supported for backward compatibility. For backward compatibility, the `**/tendermint/**` gRPC services are still supported. -Additionally, the SDK is starting its abstraction from CometBFT Go types thorought the codebase: +Additionally, the SDK is starting its abstraction from CometBFT Go types through the codebase: -* The usage of CometBFT have been replaced to use the Cosmos SDK logger interface (`cosmossdk.io/log.Logger`). -* The usage of `github.com/cometbft/cometbft/libs/bytes.HexByte` have been replaced by `[]byte`. +* The usage of the CometBFT logger has been replaced by the Cosmos SDK logger interface (`cosmossdk.io/log.Logger`). +* The usage of `github.com/cometbft/cometbft/libs/bytes.HexByte` has been replaced by `[]byte`. +* Usage of an application genesis (see [genutil](#xgenutil)). -### Configuration +#### Enable Vote Extensions -A new tool have been created for migrating configuration of the SDK. Use the following command to migrate your configuration: +:::tip +This is an optional feature that is disabled by default. +::: -```bash -simd config migrate v0.50 +Once all the code changes required to implement Vote Extensions are in place, +they can be enabled by setting the consensus param `Abci.VoteExtensionsEnableHeight` +to a value greater than zero. + +In a new chain, this can be done in the `genesis.json` file. + +For existing chains this can be done in two ways: + +* During an upgrade the value is set in an upgrade handler. +* A governance proposal that changes the consensus param **after a coordinated upgrade has taken place**. + +### BaseApp + +All ABCI methods now accept a pointer to the request and response types defined +by CometBFT. In addition, they also return errors. An ABCI method should only +return errors in cases where a catastrophic failure has occurred and the application +should halt. However, this is abstracted away from the application developer. Any +handler that an application can define or set that returns an error, will gracefully +by handled by `BaseApp` on behalf of the application. + +BaseApp calls of `BeginBlock` & `Endblock` are now private but are still exposed +to the application to define via the `Manager` type. `FinalizeBlock` is public +and should be used in order to test and run operations. This means that although +`BeginBlock` & `Endblock` no longer exist in the ABCI interface, they are automatically +called by `BaseApp` during `FinalizeBlock`. Specifically, the order of operations +is `BeginBlock` -> `DeliverTx` (for all txs) -> `EndBlock`. + +ABCI++ 2.0 also brings `ExtendVote` and `VerifyVoteExtension` ABCI methods. These +methods allow applications to extend and verify pre-commit votes. The Cosmos SDK +allows an application to define handlers for these methods via `ExtendVoteHandler` +and `VerifyVoteExtensionHandler` respectively. Please see [here](https://docs.cosmos.network/v0.50/build/building-apps/vote-extensions) +for more info. + +#### Set PreBlocker + +A `SetPreBlocker` method has been added to BaseApp. This is essential for BaseApp to run `PreBlock` which runs before begin blocker other modules, and allows to modify consensus parameters, and the changes are visible to the following state machine logics. +Read more about other use cases [here](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-068-preblock.md). + +`depinject` / app di users need to add `x/upgrade` in their `app_config.go` / `app.yml`: + +```diff ++ PreBlockers: []string{ ++ upgradetypes.ModuleName, ++ }, +BeginBlockers: []string{ +- upgradetypes.ModuleName, + minttypes.ModuleName, +} ``` -More information about [confix](https://docs.cosmos.network/main/tooling/confix). +When using (legacy) application wiring, the following must be added to `app.go`: + +```diff ++app.ModuleManager.SetOrderPreBlockers( ++ upgradetypes.ModuleName, ++) + +app.ModuleManager.SetOrderBeginBlockers( +- upgradetypes.ModuleName, +) + ++ app.SetPreBlocker(app.PreBlocker) + +// ... // + ++func (app *SimApp) PreBlocker(ctx sdk.Context, req *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) { ++ return app.ModuleManager.PreBlock(ctx, req) ++} +``` #### Events -The log section of abci.TxResult is not populated in the case of successful msg(s) execution. Instead a new attribute is added to all messages indicating the `msg_index` which identifies which events and attributes relate the same transaction +The log section of `abci.TxResult` is not populated in the case of successful +msg(s) execution. Instead a new attribute is added to all messages indicating +the `msg_index` which identifies which events and attributes relate the same +transaction. + +`BeginBlock` & `EndBlock` Events are now emitted through `FinalizeBlock` but have +an added attribute, `mode=BeginBlock|EndBlock`, to identify if the event belongs +to `BeginBlock` or `EndBlock`. + +### Config files + +Confix is a new SDK tool for modifying and migrating configuration of the SDK. +It is the replacement of the `config.Cmd` command from the `client/config` package. + +Use the following command to migrate your configuration: + +```bash +simd config migrate v0.50 +``` + +If you were using ` config [key]` or ` config [key] [value]` to set and get values from the `client.toml`, replace it with ` config get client [key]` and ` config set client [key] [value]`. The extra verbosity is due to the extra functionalities added in config. + +More information about [confix](https://docs.cosmos.network/main/tooling/confix) and how to add it in your application binary in the [documentation](https://docs.cosmos.network/main/tooling/confix). #### gRPC-Web -gRPC-Web is now listening to the same address as the gRPC Gateway API server (default: `localhost:1317`). +gRPC-Web is now listening to the same address and port as the gRPC Gateway API server (default: `localhost:1317`). The possibility to listen to a different address has been removed, as well as its settings. Use `confix` to clean-up your `app.toml`. A nginx (or alike) reverse-proxy can be set to keep the previous behavior. #### Database Support -ClevelDB, BoltDB and BadgerDB are not supported anymore. To migrate from a unsupported database to a supported database please use the database migration tool. +ClevelDB, BoltDB and BadgerDB are not supported anymore. To migrate from a unsupported database to a supported database please use a database migration tool. ### Protobuf -With the deprecation of the amino JSON codec defined in [cosmos/gogoproto](https://github.com/cosmos/gogoproto) in favor of the protoreflect powered x/tx/aminojson codec, module developers are encouraged verify that their messages have the correct protobuf annotations to deterministically produce identical output from both codecs. +With the deprecation of the Amino JSON codec defined in [cosmos/gogoproto](https://github.com/cosmos/gogoproto) in favor of the protoreflect powered x/tx/aminojson codec, module developers are encouraged verify that their messages have the correct protobuf annotations to deterministically produce identical output from both codecs. -For core SDK types equivalence is asserted by generative testing of [SignableTypes](https://github.com/cosmos/cosmos-sdk/blob/76f0d101530ed78befc95506ab473c771d0d8a8c/tests/integration/rapidgen/rapidgen.go#L106) in [TestAminoJSON_Equivalence](https://github.com/cosmos/cosmos-sdk/blob/76f0d101530ed78befc95506ab473c771d0d8a8c/tests/integration/aminojson/aminojson_test.go#L90). +For core SDK types equivalence is asserted by generative testing of [SignableTypes](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-beta.0/tests/integration/rapidgen/rapidgen.go#L102) in [TestAminoJSON_Equivalence](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-beta.0/tests/integration/tx/aminojson/aminojson_test.go#L94). -TODO: summarize proto annotation requirements. +**TODO: summarize proto annotation requirements.** #### Stringer @@ -66,14 +155,14 @@ The `gogoproto.goproto_stringer = false` annotation has been removed from most p ### SimApp - +In this section we describe the changes made in Cosmos SDK' SimApp. +**These changes are directly applicable to your application wiring.** #### Module Assertions -Previously, all modules were required to be set in `OrderBeginBlockers`, `OrderEndBlockers` and `OrderInitGenesis / OrderExportGenesis` in `app.go` / `app_config.go`. -This is no longer the case, the assertion has been loosened to only require modules implementing, respectively, the `module.BeginBlockAppModule`, `module.EndBlockAppModule` and `module.HasGenesis` interfaces. +Previously, all modules were required to be set in `OrderBeginBlockers`, `OrderEndBlockers` and `OrderInitGenesis / OrderExportGenesis` in `app.go` / `app_config.go`. This is no longer the case, the assertion has been loosened to only require modules implementing, respectively, the `appmodule.HasBeginBlocker`, `appmodule.HasEndBlocker` and `appmodule.HasGenesis` / `module.HasGenesis` interfaces. -#### Modules Keepers +#### Module wiring The following modules `NewKeeper` function now take a `KVStoreService` instead of a `StoreKey`: @@ -91,6 +180,8 @@ The following modules `NewKeeper` function now take a `KVStoreService` instead o * `x/slashing` * `x/upgrade` +**Users using `depinject` / app di do not need any changes, this is abstracted for them.** + Users manually wiring their chain need to use the `runtime.NewKVStoreService` method to create a `KVStoreService` from a `StoreKey`: ```diff @@ -102,27 +193,11 @@ app.ConsensusParamsKeeper = consensusparamkeeper.NewKeeper( ) ``` -The following modules' `Keeper` methods now take in a `context.Context` instead of `sdk.Context`. Any module that has an interfaces for them (like "expected keepers") will need to update and re-generate mocks if needed: - -* `x/authz` -* `x/bank` -* `x/mint` -* `x/crisis` -* `x/distribution` -* `x/evidence` -* `x/gov` -* `x/slashing` -* `x/upgrade` - -**Users using depinject do not need any changes, this is automatically done for them.** - #### Logger -The following modules `NewKeeper` function now take a `log.Logger`: +Replace all your CometBFT logger imports by `cosmossdk.io/log`. -* `x/bank` - -`depinject` users must now supply the logger through the main `depinject.Supply` function instead of passing it to `appBuilder.Build`. +Additionally, `depinject` / app di users must now supply a logger through the main `depinject.Supply` function instead of passing it to `appBuilder.Build`. ```diff appConfig = depinject.Configs( @@ -139,14 +214,14 @@ appConfig = depinject.Configs( + app.App = appBuilder.Build(db, traceStore, baseAppOptions...) ``` -User manually wiring their chain need to add the logger argument when creating the keeper. +User manually wiring their chain need to add the logger argument when creating the `x/bank` keeper. #### Module Basics -Previously, the `ModuleBasics` was a global variable that was used to register all modules's `AppModuleBasic` implementation. +Previously, the `ModuleBasics` was a global variable that was used to register all modules' `AppModuleBasic` implementation. The global variable has been removed and the basic module manager can be now created from the module manager. -This is automatically done for depinject users, however for supplying different app module implementation, pass them via `depinject.Supply` in the main `AppConfig` (`app_config.go`): +This is automatically done for `depinject` / app di users, however for supplying different app module implementation, pass them via `depinject.Supply` in the main `AppConfig` (`app_config.go`): ```go depinject.Supply( @@ -162,492 +237,268 @@ depinject.Supply( ) ``` -Users manually wiring their chain need to use the new `module.NewBasicManagerFromManager` function, after the module manager creation, and pass a `map[string]module.AppModuleBasic` as argument for optionally overridding some module's `AppModuleBasic`. - -### Packages - -#### Store +Users manually wiring their chain need to use the new `module.NewBasicManagerFromManager` function, after the module manager creation, and pass a `map[string]module.AppModuleBasic` as argument for optionally overriding some module's `AppModuleBasic`. -References to `types/store.go` which contained aliases for store types have been remapped to point to appropriate store/types, hence the `types/store.go` file is no longer needed and has been removed. +#### AutoCLI -##### Extract Store to a standalone module +[`AutoCLI`](https://docs.cosmos.network/main/core/autocli) has been implemented by the SDK for all its module CLI queries. This means chains must add the following in their `root.go` to enable `AutoCLI` in their application: -The `store` module is extracted to have a separate go.mod file which allows it be a standalone module. -All the store imports are now renamed to use `cosmossdk.io/store` instead of `github.com/cosmos/cosmos-sdk/store` across the SDK. - -#### Client - -The return type of the interface method `TxConfig.SignModeHandler()` has been changed from `x/auth/signing.SignModeHandler` to `x/tx/signing.HandlerMap`. This change is transparent to most users as the `TxConfig` interface is typically implemented by private `x/auth/tx.config` struct (as returned by `auth.NewTxConfig`) which has been updated to return the new type. If users have implemented their own `TxConfig` interface, they will need to update their implementation to return the new type. - -### Modules - -#### `**all**` - -[RFC 001](https://docs.cosmos.network/main/rfc/rfc-001-tx-validation) has defined a simplification of the message validation process for modules. -The `sdk.Msg` interface has been updated to not require the implementation of the `ValidateBasic` method. -It is now recommended to validate message directly in the message server. When the validation is performed in the message server, the `ValidateBasic` method on a message is no longer required and can be removed. - -Messages no longer need to implement the `LegacyMsg` interface and implementations of `GetSignBytes` can be deleted. Because of this change, global legacy Amino codec definitions and their registration in `init()` can safely be removed as well. - -#### `x/auth` - -For ante handler construction via `ante.NewAnteHandler`, the field `ante.HandlerOptions.SignModeHandler` has been updated to `x/tx/signing/HandlerMap` from `x/auth/signing/SignModeHandler`. Callers typically fetch this value from `client.TxConfig.SignModeHandler()` (which is also changed) so this change should be transparent to most users. - -#### `x/capability` - -Capability was moved to [IBC-GO](https://github.com/cosmos/ibc-go). IBC V8 will contain the necessary changes to incorporate the new module location - -#### `x/gov` - -##### Expedited Proposals - -The `gov` v1 module has been updated to support the ability to expedite governance proposals. When a proposal is expedited, the voting period will be shortened to `ExpeditedVotingPeriod` parameter. An expedited proposal must have an higher voting threshold than a classic proposal, that threshold is defined with the `ExpeditedThreshold` parameter. - -##### Cancelling Proposals - -The `gov` module has been updated to support the ability to cancel governance proposals. When a proposal is canceled, all the deposits of the proposal are either burnt or sent to `ProposalCancelDest` address. The deposits burn rate will be determined by a new parameter called `ProposalCancelRatio` parameter. - -```text - 1. deposits * proposal_cancel_ratio will be burned or sent to `ProposalCancelDest` address , if `ProposalCancelDest` is empty then deposits will be burned. - 2. deposits * (1 - proposal_cancel_ratio) will be sent to depositors. +```go +if err := autoCliOpts.EnhanceRootCommand(rootCmd); err != nil { + panic(err) +} ``` -By default, the new `ProposalCancelRatio` parameter is set to 0.5 during migration and `ProposalCancelDest` is set to empty string (i.e. burnt). - -#### `x/evidence` - -##### Extract evidence to a standalone module - -The `x/evidence` module is extracted to have a separate go.mod file which allows it be a standalone module. -All the evidence imports are now renamed to use `cosmossdk.io/x/evidence` instead of `github.com/cosmos/cosmos-sdk/x/evidence` across the SDK. - -#### `x/nft` - -##### Extract nft to a standalone module - -The `x/nft` module is extracted to have a separate go.mod file which allows it to be a standalone module. - -#### x/feegrant - -##### Extract feegrant to a standalone module - -The `x/feegrant` module is extracted to have a separate go.mod file which allows it to be a standalone module. -All the feegrant imports are now renamed to use `cosmossdk.io/x/feegrant` instead of `github.com/cosmos/cosmos-sdk/x/feegrant` across the SDK. - -#### `x/upgrade` - -##### Extract upgrade to a standalone module - -The `x/upgrade` module is extracted to have a separate go.mod file which allows it to be a standalone module. -All the upgrade imports are now renamed to use `cosmossdk.io/x/upgrade` instead of `github.com/cosmos/cosmos-sdk/x/upgrade` across the SDK. - -## [v0.47.x](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.0) - -### Migration to CometBFT (Part 1) - -The Cosmos SDK has migrated to CometBFT, as its default consensus engine. -CometBFT is an implementation of the Tendermint consensus algorithm, and the successor of Tendermint Core. -Due to the import changes, this is a breaking change. Chains need to remove **entirely** their imports of Tendermint Core in their codebase, from direct and indirects imports in their `go.mod`. - -* Replace `github.com/tendermint/tendermint` by `github.com/cometbft/cometbft` -* Replace `github.com/tendermint/tm-db` by `github.com/cometbft/cometbft-db` -* Verify `github.com/tendermint/tendermint` is not an indirect or direct dependency -* Run `make proto-gen` - -Other than that, the migration should be seamless. -On the SDK side, clean-up of variables, functions to reflect the new name will only happen from v0.50 (part 2). - -Note: It is possible that these steps must first be performed by your dependencies before you can perform them on your own codebase. +Where `autoCliOpts` is the autocli options of the app, containing all modules and codecs. +That value can injected by depinject ([see root_v2.go](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-beta.0/simapp/simd/cmd/root_v2.go#L49-L67)) or manually provided by the app ([see legacy app.go](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-beta.0/simapp/app.go#L636-L655)). -### Simulation +:::warning +Not doing this will result in all core SDK modules queries not to be included in the binary. +::: -Remove `RandomizedParams` from `AppModuleSimulation` interface. Previously, it used to generate random parameter changes during simulations, however, it does so through ParamChangeProposal which is now legacy. Since all modules were migrated, we can now safely remove this from `AppModuleSimulation` interface. +Additionally `AutoCLI` automatically adds the custom modules commands to the root command for all modules implementing the [`appmodule.AppModule`](https://pkg.go.dev/cosmossdk.io/core/appmodule#AppModule) interface. +This means, after ensuring all the used modules implement this interface, the following can be removed from your `root.go`: -Moreover, to support the `MsgUpdateParams` governance proposals for each modules, `AppModuleSimulation` now defines a `AppModule.ProposalMsgs` method in addition to `AppModule.ProposalContents`. That method defines the messages that can be used to submit a proposal and that should be tested in simulation. +```diff +func txCommand() *cobra.Command { + .... +- appd.ModuleBasics.AddTxCommands(cmd) +} +``` -When a module has no proposal messages or proposal content to be tested by simulation, the `AppModule.ProposalMsgs` and `AppModule.ProposalContents` methods can be deleted. +```diff +func queryCommand() *cobra.Command { + .... +- appd.ModuleBasics.AddQueryCommands(cmd) +} +``` -### gRPC +### Packages -A new gRPC service, `proto/cosmos/base/node/v1beta1/query.proto`, has been introduced -which exposes various operator configuration. App developers should be sure to -register the service with the gRPC-gateway service via -`nodeservice.RegisterGRPCGatewayRoutes` in their application construction, which -is typically found in `RegisterAPIRoutes`. +#### Math -### AppModule Interface +References to `types/math.go` which contained aliases for math types aliasing the `cosmossdk.io/math` package have been removed. +Import directly the `cosmossdk.io/math` package instead. -Support for the `AppModule` `Querier`, `Route` and `LegacyQuerier` methods has been entirely removed from the `AppModule` -interface. This removes and fully deprecates all legacy queriers. All modules no longer support the REST API previously -known as the LCD, and the `sdk.Msg#Route` method won't be used anymore. +#### Store -Most other existing `AppModule` methods have been moved to extension interfaces in preparation for the migration -to the `cosmossdk.io/core/appmodule` API in the next release. Most `AppModule` implementations should not be broken -by this change. +References to `types/store.go` which contained aliases for store types have been remapped to point to appropriate `store/types`, hence the `types/store.go` file is no longer needed and has been removed. -### SimApp +##### Extract Store to a standalone module -The `simapp` package **should not be imported in your own app**. Instead, you should import the `runtime.AppI` interface, that defines an `App`, and use the [`simtestutil` package](https://pkg.go.dev/github.com/cosmos/cosmos-sdk/testutil/sims) for application testing. +The `store` module is extracted to have a separate go.mod file which allows it be a standalone module. +All the store imports are now renamed to use `cosmossdk.io/store` instead of `github.com/cosmos/cosmos-sdk/store` across the SDK. -#### App Wiring +##### Streaming -SimApp's `app_v2.go` is using [App Wiring](https://docs.cosmos.network/main/building-apps/app-go-v2), the dependency injection framework of the Cosmos SDK. -This means that modules are injected directly into SimApp thanks to a [configuration file](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/app_config.go). -The previous behavior, without the dependency injection framework, is still present in [`app.go`](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/app.go) and is not going anywhere. +[ADR-38](https://docs.cosmos.network/main/architecture/adr-038-state-listening) has been implemented in the SDK. -If you are using a `app.go` without dependency injection, add the following lines to your `app.go` in order to provide newer gRPC services: +To continue using state streaming, replace `streaming.LoadStreamingServices` by the following in your `app.go`: ```go -autocliv1.RegisterQueryServer(app.GRPCQueryRouter(), runtimeservices.NewAutoCLIQueryService(app.ModuleManager.Modules)) - -reflectionSvc, err := runtimeservices.NewReflectionService() -if err != nil { - panic(err) +if err := app.RegisterStreamingServices(appOpts, app.kvStoreKeys()); err != nil { + panic(err) } -reflectionv1.RegisterReflectionServiceServer(app.GRPCQueryRouter(), reflectionSvc) ``` -#### Constructor - -The constructor, `NewSimApp` has been simplified: - -* `NewSimApp` does not take encoding parameters (`encodingConfig`) as input, instead the encoding parameters are injected (when using app wiring), or directly created in the constructor. Instead, we can instantiate `SimApp` for getting the encoding configuration. -* `NewSimApp` now uses `AppOptions` for getting the home path (`homePath`) and the invariant checks period (`invCheckPeriod`). These were unnecessary given as arguments as they were already present in the `AppOptions`. +#### Client -#### Encoding +The return type of the interface method `TxConfig.SignModeHandler()` has been changed from `x/auth/signing.SignModeHandler` to `x/tx/signing.HandlerMap`. This change is transparent to most users as the `TxConfig` interface is typically implemented by private `x/auth/tx.config` struct (as returned by `auth.NewTxConfig`) which has been updated to return the new type. If users have implemented their own `TxConfig` interface, they will need to update their implementation to return the new type. -`simapp.MakeTestEncodingConfig()` was deprecated and has been removed. Instead you can use the `TestEncodingConfig` from the `types/module/testutil` package. -This means you can replace your usage of `simapp.MakeTestEncodingConfig` in tests to `moduletestutil.MakeTestEncodingConfig`, which takes a series of relevant `AppModuleBasic` as input (the module being tested and any potential dependencies). +##### Textual sign mode -#### Export +A new sign mode is available in the SDK that produces more human readable output, currently only available on Ledger +devices but soon to be implemented in other UIs. -`ExportAppStateAndValidators` takes an extra argument, `modulesToExport`, which is a list of module names to export. -That argument should be passed to the module maanager `ExportGenesisFromModules` method. +:::tip +This sign mode does not allow offline signing +::: -#### Replaces +When using (legacy) application wiring, the following must be added to `app.go` after setting the app's bank keeper: -The `GoLevelDB` version must pinned to `v1.0.1-0.20210819022825-2ae1ddf74ef7` in the application, following versions might cause unexpected behavior. -This can be done adding `replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7` to the `go.mod` file. +```go + enabledSignModes := append(tx.DefaultSignModes, sigtypes.SignMode_SIGN_MODE_TEXTUAL) + txConfigOpts := tx.ConfigOptions{ + EnabledSignModes: enabledSignModes, + TextualCoinMetadataQueryFn: txmodule.NewBankKeeperCoinMetadataQueryFn(app.BankKeeper), + } + txConfig, err := tx.NewTxConfigWithOptions( + appCodec, + txConfigOpts, + ) + if err != nil { + log.Fatalf("Failed to create new TxConfig with options: %v", err) + } + app.txConfig = txConfig +``` -* [issue #14949 on cosmos-sdk](https://github.com/cosmos/cosmos-sdk/issues/14949) -* [issue #25413 on go-ethereum](https://github.com/ethereum/go-ethereum/pull/25413) +When using `depinject` / `app di`, **it's enabled by default** if there's a bank keeper present. -### Protobuf +And in the application client (usually `root.go`): -The SDK has migrated from `gogo/protobuf` (which is currently unmaintained), to our own maintained fork, [`cosmos/gogoproto`](https://github.com/cosmos/gogoproto). - -This means you should replace all imports of `github.com/gogo/protobuf` to `github.com/cosmos/gogoproto`. -This allows you to remove the replace directive `replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1` from your `go.mod` file. +```go + if !clientCtx.Offline { + txConfigOpts.EnabledSignModes = append(txConfigOpts.EnabledSignModes, signing.SignMode_SIGN_MODE_TEXTUAL) + txConfigOpts.TextualCoinMetadataQueryFn = txmodule.NewGRPCCoinMetadataQueryFn(clientCtx) + txConfigWithTextual, err := tx.NewTxConfigWithOptions( + codec.NewProtoCodec(clientCtx.InterfaceRegistry), + txConfigOpts, + ) + if err != nil { + return err + } + clientCtx = clientCtx.WithTxConfig(txConfigWithTextual) + } +``` -Please use the `ghcr.io/cosmos/proto-builder` image (version >= `0.11.5`) for generating protobuf files. +When using `depinject` / `app di`, the a tx config should be recreated from the `txConfigOpts` to use `NewGRPCCoinMetadataQueryFn` instead of depending on the bank keeper (that is used in the server). -See which buf commit for `cosmos/cosmos-sdk` to pin in your `buf.yaml` file [here](./proto/README.md). +To learn more see the [docs](https://docs.cosmos.network/main/learn/advanced/transactions#sign_mode_textual) and the [ADR-050](https://docs.cosmos.network/main/build/architecture/adr-050-sign-mode-textual). -#### Gogoproto Import Paths +### Modules -The SDK made a [patch fix](https://github.com/cosmos/gogoproto/pull/32) on its gogoproto repository to require that each proto file's package name matches its OS import path (relatively to a protobuf root import path, usually the root `proto/` folder, set by the `protoc -I` flag). +#### `**all**` -For example, assuming you put all your proto files in subfolders inside your root `proto/` folder, then a proto file with package name `myapp.mymodule.v1` should be found in the `proto/myapp/mymodule/v1/` folder. If it is in another folder, the proto generation command will throw an error. +* [RFC 001](https://docs.cosmos.network/main/rfc/rfc-001-tx-validation) has defined a simplification of the message validation process for modules. + The `sdk.Msg` interface has been updated to not require the implementation of the `ValidateBasic` method. + It is now recommended to validate message directly in the message server. When the validation is performed in the message server, the `ValidateBasic` method on a message is no longer required and can be removed. -If you are using a custom folder structure for your proto files, please reorganize them so that their OS path matches their proto package name. +* Messages no longer need to implement the `LegacyMsg` interface and implementations of `GetSignBytes` can be deleted. Because of this change, global legacy Amino codec definitions and their registration in `init()` can safely be removed as well. -This is to allow the proto FileDescriptSets to be correctly registered, and this standardized OS import paths allows [Hubl](https://github.com/cosmos/cosmos-sdk/tree/main/tools/hubl) to reflectively talk to any chain. +* The `AppModuleBasic` interface has been simplified. Defining `GetTxCmd() *cobra.Command` and `GetQueryCmd() *cobra.Command` is no longer required. The module manager detects when module commands are defined. If AutoCLI is enabled, `EnhanceRootCommand()` will add the auto-generated commands to the root command, unless a custom module command is defined and register that one instead. -#### `{accepts,implements}_interface` proto annotations +* The following modules' `Keeper` methods now take in a `context.Context` instead of `sdk.Context`. Any module that has an interfaces for them (like "expected keepers") will need to update and re-generate mocks if needed: -The SDK is normalizing the strings inside the Protobuf `accepts_interface` and `implements_interface` annotations. We require them to be fully-scoped names. They will soon be used by code generators like Pulsar and Telescope to match which messages can or cannot be packed inside `Any`s. + * `x/authz` + * `x/bank` + * `x/mint` + * `x/crisis` + * `x/distribution` + * `x/evidence` + * `x/gov` + * `x/slashing` + * `x/upgrade` -Here are the following replacements that you need to perform on your proto files: +* `BeginBlock` and `EndBlock` have changed their signature, so it is important that any module implementing them are updated accordingly. ```diff -- "Content" -+ "cosmos.gov.v1beta1.Content" -- "Authorization" -+ "cosmos.authz.v1beta1.Authorization" -- "sdk.Msg" -+ "cosmos.base.v1beta1.Msg" -- "AccountI" -+ "cosmos.auth.v1beta1.AccountI" -- "ModuleAccountI" -+ "cosmos.auth.v1beta1.ModuleAccountI" -- "FeeAllowanceI" -+ "cosmos.feegrant.v1beta1.FeeAllowanceI" +- BeginBlock(sdk.Context, abci.RequestBeginBlock) ++ BeginBlock(context.Context) error ``` -Please also check that in your own app's proto files that there are no single-word names for those two proto annotations. If so, then replace them with fully-qualified names, even though those names don't actually resolve to an actual protobuf entity. - -For more information, see the [encoding guide](./docs/docs/core/05-encoding.md). - -### Transactions - -#### Broadcast Mode - -Broadcast mode `block` was deprecated and has been removed. Please use `sync` mode -instead. When upgrading your tests from `block` to `sync` and checking for a -transaction code, you need to query the transaction first (with its hash) to get -the correct code. +```diff +- EndBlock(sdk.Context, abci.RequestEndBlock) []abci.ValidatorUpdate ++ EndBlock(context.Context) error +``` -### Modules +In case a module requires to return `abci.ValidatorUpdate` from `EndBlock`, it can use the `HasABCIEndBlock` interface instead. -#### `**all**` +```diff +- EndBlock(sdk.Context, abci.RequestEndBlock) []abci.ValidatorUpdate ++ EndBlock(context.Context) ([]abci.ValidatorUpdate, error) +``` -`EventTypeMessage` events, with `sdk.AttributeKeyModule` and `sdk.AttributeKeySender` are now emitted directly at message excecution (in `baseapp`). -This means that the following boilerplate should be removed from all your custom modules: +:::tip +It is possible to ensure that a module implements the correct interfaces by using compiler assertions in your `x/{moduleName}/module.go`: ```go -ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - sdk.NewAttribute(sdk.AttributeKeySender, `signer/sender`), - ), +var ( + _ module.AppModuleBasic = (*AppModule)(nil) + _ module.AppModuleSimulation = (*AppModule)(nil) + _ module.HasGenesis = (*AppModule)(nil) + + _ appmodule.AppModule = (*AppModule)(nil) + _ appmodule.HasBeginBlocker = (*AppModule)(nil) + _ appmodule.HasEndBlocker = (*AppModule)(nil) + ... ) ``` -The module name is assumed by `baseapp` to be the second element of the message route: `"cosmos.bank.v1beta1.MsgSend" -> "bank"`. -In case a module does not follow the standard message path, (e.g. IBC), it is advised to keep emitting the module name event. -`Baseapp` only emits that event if the module has not already done so. +Read more on those interfaces [here](https://docs.cosmos.network/v0.50/building-modules/module-manager#application-module-interfaces). -#### `x/params` +::: -The `params` module was deprecated since v0.46. The Cosmos SDK has migrated away from `x/params` for its own modules. -Cosmos SDK modules now store their parameters directly in its repective modules. -The `params` module will be removed in `v0.50`, as mentioned [in v0.46 release](https://github.com/cosmos/cosmos-sdk/blob/v0.46.1/UPGRADING.md#xparams). It is strongly encouraged to migrate away from `x/params` before `v0.50`. +* `GetSigners()` is no longer required to be implemented on `Msg` types. The SDK will automatically infer the signers from the `Signer` field on the message. The signer field is required on all messages unless using a custom signer function. -When performing a chain migration, the params table must be initizalied manually. This was done in the modules keepers in previous versions. -Have a look at `simapp.RegisterUpgradeHandlers()` for an example. +To find out more please read the [signer field](../../build/building-modules/05-protobuf-annotations.md#signer) & [here](https://github.com/cosmos/cosmos-sdk/blob/7352d0bce8e72121e824297df453eb1059c28da8/docs/docs/build/building-modules/02-messages-and-queries.md#L40) documentation. + -#### `x/crisis` +#### `x/auth` -With the migrations of all modules away from `x/params`, the crisis module now has a store. -The store must be created during a chain upgrade to v0.47.x. +For ante handler construction via `ante.NewAnteHandler`, the field `ante.HandlerOptions.SignModeHandler` has been updated to `x/tx/signing/HandlerMap` from `x/auth/signing/SignModeHandler`. Callers typically fetch this value from `client.TxConfig.SignModeHandler()` (which is also changed) so this change should be transparent to most users. -```go -storetypes.StoreUpgrades{ - Added: []string{ - crisistypes.ModuleName, - }, -} -``` - -#### `x/gov` +#### `x/capability` -##### Minimum Proposal Deposit At Time of Submission +Capability has been moved to [IBC Go](https://github.com/cosmos/ibc-go). IBC v8 will contain the necessary changes to incorporate the new module location. -The `gov` module has been updated to support a minimum proposal deposit at submission time. It is determined by a new -parameter called `MinInitialDepositRatio`. When multiplied by the existing `MinDeposit` parameter, it produces -the necessary proportion of coins needed at the proposal submission time. The motivation for this change is to prevent proposal spamming. +#### `x/genutil` -By default, the new `MinInitialDepositRatio` parameter is set to zero during migration. The value of zero signifies that this -feature is disabled. If chains wish to utilize the minimum proposal deposits at time of submission, the migration logic needs to be -modified to set the new parameter to the desired value. +The Cosmos SDK has migrated from a CometBFT genesis to a application managed genesis file. +The genesis is now fully handled by `x/genutil`. This has no consequences for running chains: -##### New `Proposal.Proposer` field +* Importing a CometBFT genesis is still supported. +* Exporting a genesis now exports the genesis as an application genesis. -The `Proposal` proto has been updated with proposer field. For proposal state migraton developers can call `v4.AddProposerAddressToProposal` in their upgrade handler to update all existing proposal and make them compatible and **this migration is optional**. +When needing to read an application genesis, use the following helpers from the `x/genutil/types` package: ```go -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - v4 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v4" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" -) - -func (app SimApp) RegisterUpgradeHandlers() { - app.UpgradeKeeper.SetUpgradeHandler(UpgradeName, - func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { - // this migration is optional - // add proposal ids with proposers which are active (deposit or voting period) - proposals := make(map[uint64]string) - proposals[1] = "cosmos1luyncewxk4lm24k6gqy8y5dxkj0klr4tu0lmnj" ... - v4.AddProposerAddressToProposal(ctx, sdk.NewKVStoreKey(v4.ModuleName), app.appCodec, proposals) - return app.ModuleManager.RunMigrations(ctx, app.Configurator(), fromVM) - }) -} +// AppGenesisFromReader reads the AppGenesis from the reader. +func AppGenesisFromReader(reader io.Reader) (*AppGenesis, error) +// AppGenesisFromFile reads the AppGenesis from the provided file. +func AppGenesisFromFile(genFile string) (*AppGenesis, error) ``` -#### `x/consensus` - -Introducing a new `x/consensus` module to handle managing Tendermint consensus -parameters. For migration it is required to call a specific migration to migrate -existing parameters from the deprecated `x/params` to `x/consensus` module. App -developers should ensure to call `baseapp.MigrateParams` in their upgrade handler. - -Example: - -```go -func (app SimApp) RegisterUpgradeHandlers() { - ----> baseAppLegacySS := app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramstypes.ConsensusParamsKeyTable()) <---- - - app.UpgradeKeeper.SetUpgradeHandler( - UpgradeName, - func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { - // Migrate Tendermint consensus parameters from x/params module to a - // dedicated x/consensus module. - ----> baseapp.MigrateParams(ctx, baseAppLegacySS, &app.ConsensusParamsKeeper) <---- - - // ... +#### `x/gov` - return app.ModuleManager.RunMigrations(ctx, app.Configurator(), fromVM) - }, - ) +##### Expedited Proposals - // ... -} -``` +The `gov` v1 module now supports expedited governance proposals. When a proposal is expedited, the voting period will be shortened to `ExpeditedVotingPeriod` parameter. An expedited proposal must have an higher voting threshold than a classic proposal, that threshold is defined with the `ExpeditedThreshold` parameter. -The `x/params` module should still be imported in your app.go in order to handle this migration. +##### Cancelling Proposals -Because the `x/consensus` module is a new module, its store must be added while upgrading to v0.47.x: +The `gov` module now supports cancelling governance proposals. When a proposal is canceled, all the deposits of the proposal are either burnt or sent to `ProposalCancelDest` address. The deposits burn rate will be determined by a new parameter called `ProposalCancelRatio` parameter. -```go -storetypes.StoreUpgrades{ - Added: []string{ - consensustypes.ModuleName, - }, -} +```text +1. deposits * proposal_cancel_ratio will be burned or sent to `ProposalCancelDest` address , if `ProposalCancelDest` is empty then deposits will be burned. +2. deposits * (1 - proposal_cancel_ratio) will be sent to depositors. ``` -##### `app.go` changes +By default, the new `ProposalCancelRatio` parameter is set to `0.5` during migration and `ProposalCancelDest` is set to empty string (i.e. burnt). -When using an `app.go` without App Wiring, the following changes are required: +#### `x/evidence` -```diff -- bApp.SetParamStore(app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramstypes.ConsensusParamsKeyTable())) -+ app.ConsensusParamsKeeper = consensusparamkeeper.NewKeeper(appCodec, keys[consensusparamstypes.StoreKey], authtypes.NewModuleAddress(govtypes.ModuleName).String()) -+ bApp.SetParamStore(&app.ConsensusParamsKeeper) -``` +##### Extract evidence to a standalone module -When using App Wiring, the paramater store is automatically set for you. +The `x/evidence` module is extracted to have a separate go.mod file which allows it be a standalone module. +All the evidence imports are now renamed to use `cosmossdk.io/x/evidence` instead of `github.com/cosmos/cosmos-sdk/x/evidence` across the SDK. #### `x/nft` -The SDK does not validate anymore the `classID` and `nftID` of an NFT, for extra flexibility in your NFT implementation. -This means chain developers need to validate the `classID` and `nftID` of an NFT. - -### Ledger - -Ledger support has been generalized to enable use of different apps and keytypes that use `secp256k1`. The Ledger interface remains the same, but it can now be provided through the Keyring `Options`, allowing higher-level chains to connect to different Ledger apps or use custom implementations. In addition, higher-level chains can provide custom key implementations around the Ledger public key, to enable greater flexibility with address generation and signing. - -This is not a breaking change, as all values will default to use the standard Cosmos app implementation unless specified otherwise. - -## [v0.46.x](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.0) - -### Go API Changes - -The `replace google.golang.org/grpc` directive can be removed from the `go.mod`, it is no more required to block the version. - -A few packages that were deprecated in the previous version are now removed. - -For instance, the REST API, deprecated in v0.45, is now removed. If you have not migrated yet, please follow the [instructions](https://docs.cosmos.network/v0.45/migrations/rest.html). - -To improve clarity of the API, some renaming and improvements has been done: - -| Package | Previous | Current | -| --------- | ---------------------------------- | ------------------------------------ | -| `simapp` | `encodingConfig.Marshaler` | `encodingConfig.Codec` | -| `simapp` | `FundAccount`, `FundModuleAccount` | Functions moved to `x/bank/testutil` | -| `types` | `AccAddressFromHex` | `AccAddressFromHexUnsafe` | -| `x/auth` | `MempoolFeeDecorator` | Use `DeductFeeDecorator` instead | -| `x/bank` | `AddressFromBalancesStore` | `AddressAndDenomFromBalancesStore` | -| `x/gov` | `keeper.DeleteDeposits` | `keeper.DeleteAndBurnDeposits` | -| `x/gov` | `keeper.RefundDeposits` | `keeper.RefundAndDeleteDeposits` | -| `x/{mod}` | package `legacy` | package `migrations` | - -For the exhaustive list of API renaming, please refer to the [CHANGELOG](https://github.com/cosmos/cosmos-sdk/blob/main/CHANGELOG.md). - -#### new packages - -Additionally, new packages have been introduced in order to further split the codebase. Aliases are available for a new API breaking migration, but it is encouraged to migrate to this new packages: - -* `errors` should replace `types/errors` when registering errors or wrapping SDK errors. -* `math` contains the `Int` or `Uint` types that are used in the SDK. -* `x/nft` an NFT base module. -* `x/group` a group module allowing to create DAOs, multisig and policies. Greatly composes with `x/authz`. - -#### `x/authz` - -* `authz.NewMsgGrant` `expiration` is now a pointer. When `nil` is used, then no expiration will be set (grant won't expire). -* `authz.NewGrant` takes a new argument: block time, to correctly validate expire time. - -### Keyring - -The keyring has been refactored in v0.46. - -* The `Unsafe*` interfaces have been removed from the keyring package. Please use interface casting if you wish to access those unsafe functions. -* The keys' implementation has been refactored to be serialized as proto. -* `keyring.NewInMemory` and `keyring.New` takes now a `codec.Codec`. -* Take `keyring.Record` instead of `Info` as first argument in: - * `MkConsKeyOutput` - * `MkValKeyOutput` - * `MkAccKeyOutput` -* Rename: - * `SavePubKey` to `SaveOfflineKey` and remove the `algo` argument. - * `NewMultiInfo`, `NewLedgerInfo` to `NewLegacyMultiInfo`, `newLegacyLedgerInfo` respectively. - * `NewOfflineInfo` to `newLegacyOfflineInfo` and move it to `migration_test.go`. - -### PostHandler - -A `postHandler` is like an `antehandler`, but is run _after_ the `runMsgs` execution. It is in the same store branch that `runMsgs`, meaning that both `runMsgs` and `postHandler`. This allows to run a custom logic after the execution of the messages. - -### IAVL - -v0.19.0 IAVL introduces a new "fast" index. This index represents the latest state of the -IAVL laid out in a format that preserves data locality by key. As a result, it allows for faster queries and iterations -since data can now be read in lexicographical order that is frequent for Cosmos-SDK chains. - -The first time the chain is started after the upgrade, the aforementioned index is created. The creation process -might take time and depends on the size of the latest state of the chain. For example, Osmosis takes around 15 minutes to rebuild the index. - -While the index is being created, node operators can observe the following in the logs: -"Upgrading IAVL storage for faster queries + execution on the live state. This may take a while". The store -key is appended to the message. The message is printed for every module that has a non-transient store. -As a result, it gives a good indication of the progress of the upgrade. - -There is also downgrade and re-upgrade protection. If a node operator chooses to downgrade to IAVL pre-fast index, and then upgrade again, the index is rebuilt from scratch. This implementation detail should not be relevant in most cases. It was added as a safeguard against operator -mistakes. - -### Modules - -#### `x/params` - -* The `x/params` module has been depreacted in favour of each module housing and providing way to modify their parameters. Each module that has parameters that are changable during runtime have an authority, the authority can be a module or user account. The Cosmos SDK team recommends migrating modules away from using the param module. An example of how this could look like can be found [here](https://github.com/cosmos/cosmos-sdk/pull/12363). -* The Param module will be maintained until April 18, 2023. At this point the module will reach end of life and be removed from the Cosmos SDK. - -#### `x/gov` - -The `gov` module has been greatly improved. The previous API has been moved to `v1beta1` while the new implementation is called `v1`. - -In order to submit a proposal with `submit-proposal` you now need to pass a `proposal.json` file. -You can still use the old way by using `submit-legacy-proposal`. This is not recommended. -More information can be found in the gov module [client documentation](https://docs.cosmos.network/v0.46/modules/gov/07_client.html). +##### Extract nft to a standalone module -#### `x/staking` +The `x/nft` module is extracted to have a separate go.mod file which allows it to be a standalone module. +All the evidence imports are now renamed to use `cosmossdk.io/x/nft` instead of `github.com/cosmos/cosmos-sdk/x/nft` across the SDK. -The `staking module` added a new message type to cancel unbonding delegations. Users that have unbonded by accident or wish to cancel a undelegation can now specify the amount and valdiator they would like to cancel the unbond from +#### x/feegrant -### Protobuf +##### Extract feegrant to a standalone module -The `third_party/proto` folder that existed in [previous version](https://github.com/cosmos/cosmos-sdk/tree/v0.45.3/third_party/proto) now does not contains directly the [proto files](https://github.com/cosmos/cosmos-sdk/tree/release/v0.46.x/third_party/proto). +The `x/feegrant` module is extracted to have a separate go.mod file which allows it to be a standalone module. +All the feegrant imports are now renamed to use `cosmossdk.io/x/feegrant` instead of `github.com/cosmos/cosmos-sdk/x/feegrant` across the SDK. -Instead, the SDK uses [`buf`](https://buf.build). Clients should have their own [`buf.yaml`](https://docs.buf.build/configuration/v1/buf-yaml) with `buf.build/cosmos/cosmos-sdk` as dependency, in order to avoid having to copy paste these files. +#### `x/upgrade` -The protos can as well be downloaded using `buf export buf.build/cosmos/cosmos-sdk:8cb30a2c4de74dc9bd8d260b1e75e176 --output `. +##### Extract upgrade to a standalone module -Cosmos message protobufs should be extended with `cosmos.msg.v1.signer`: +The `x/upgrade` module is extracted to have a separate go.mod file which allows it to be a standalone module. +All the upgrade imports are now renamed to use `cosmossdk.io/x/upgrade` instead of `github.com/cosmos/cosmos-sdk/x/upgrade` across the SDK. -```protobuf -message MsgSetWithdrawAddress { - option (cosmos.msg.v1.signer) = "delegator_address"; ++ +### Tooling - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; +#### Rosetta - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string withdraw_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} -``` +Rosetta has moved to it's own [repo](https://github.com/cosmos/rosetta) and not imported by the Cosmos SDK SimApp by default. +Any user who is interested on using the tool can connect it standalone to any node without the need to add it as part of the node binary. -When clients interract with a node they are required to set a codec in in the grpc.Dial. More information can be found in this [doc](https://docs.cosmos.network/v0.46/run-node/interact-node.html#programmatically-via-go). +The rosetta tool also allows multi chain connections. diff --git a/api/cosmos/authz/v1beta1/query.pulsar.go b/api/cosmos/authz/v1beta1/query.pulsar.go index 0f776d3cde17..221c7841860a 100644 --- a/api/cosmos/authz/v1beta1/query.pulsar.go +++ b/api/cosmos/authz/v1beta1/query.pulsar.go @@ -3573,7 +3573,7 @@ func (x *QueryGranterGrantsResponse) GetPagination() *v1beta1.PageResponse { return nil } -// QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. +// QueryGranteeGrantsRequest is the request type for the Query/GranteeGrants RPC method. type QueryGranteeGrantsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/api/cosmos/authz/v1beta1/tx.pulsar.go b/api/cosmos/authz/v1beta1/tx.pulsar.go index d2773d136383..9b2af65e42cc 100644 --- a/api/cosmos/authz/v1beta1/tx.pulsar.go +++ b/api/cosmos/authz/v1beta1/tx.pulsar.go @@ -580,72 +580,24 @@ func (x *fastReflection_MsgGrant) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.List = (*_MsgExecResponse_1_list)(nil) - -type _MsgExecResponse_1_list struct { - list *[][]byte -} - -func (x *_MsgExecResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgExecResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) -} - -func (x *_MsgExecResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_MsgExecResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgExecResponse_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MsgExecResponse at list field Results as it is not of Message kind")) -} - -func (x *_MsgExecResponse_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_MsgExecResponse_1_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_MsgExecResponse_1_list) IsValid() bool { - return x.list != nil -} - var ( - md_MsgExecResponse protoreflect.MessageDescriptor - fd_MsgExecResponse_results protoreflect.FieldDescriptor + md_MsgGrantResponse protoreflect.MessageDescriptor ) func init() { file_cosmos_authz_v1beta1_tx_proto_init() - md_MsgExecResponse = File_cosmos_authz_v1beta1_tx_proto.Messages().ByName("MsgExecResponse") - fd_MsgExecResponse_results = md_MsgExecResponse.Fields().ByName("results") + md_MsgGrantResponse = File_cosmos_authz_v1beta1_tx_proto.Messages().ByName("MsgGrantResponse") } -var _ protoreflect.Message = (*fastReflection_MsgExecResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgGrantResponse)(nil) -type fastReflection_MsgExecResponse MsgExecResponse +type fastReflection_MsgGrantResponse MsgGrantResponse -func (x *MsgExecResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgExecResponse)(x) +func (x *MsgGrantResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgGrantResponse)(x) } -func (x *MsgExecResponse) slowProtoReflect() protoreflect.Message { +func (x *MsgGrantResponse) slowProtoReflect() protoreflect.Message { mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -657,43 +609,43 @@ func (x *MsgExecResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgExecResponse_messageType fastReflection_MsgExecResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgExecResponse_messageType{} +var _fastReflection_MsgGrantResponse_messageType fastReflection_MsgGrantResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgGrantResponse_messageType{} -type fastReflection_MsgExecResponse_messageType struct{} +type fastReflection_MsgGrantResponse_messageType struct{} -func (x fastReflection_MsgExecResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgExecResponse)(nil) +func (x fastReflection_MsgGrantResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgGrantResponse)(nil) } -func (x fastReflection_MsgExecResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgExecResponse) +func (x fastReflection_MsgGrantResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgGrantResponse) } -func (x fastReflection_MsgExecResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExecResponse +func (x fastReflection_MsgGrantResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgGrantResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgExecResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExecResponse +func (x *fastReflection_MsgGrantResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgGrantResponse } // 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_MsgExecResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgExecResponse_messageType +func (x *fastReflection_MsgGrantResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgGrantResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgExecResponse) New() protoreflect.Message { - return new(fastReflection_MsgExecResponse) +func (x *fastReflection_MsgGrantResponse) New() protoreflect.Message { + return new(fastReflection_MsgGrantResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgExecResponse) Interface() protoreflect.ProtoMessage { - return (*MsgExecResponse)(x) +func (x *fastReflection_MsgGrantResponse) Interface() protoreflect.ProtoMessage { + return (*MsgGrantResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -701,13 +653,7 @@ func (x *fastReflection_MsgExecResponse) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgExecResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Results) != 0 { - value := protoreflect.ValueOfList(&_MsgExecResponse_1_list{list: &x.Results}) - if !f(fd_MsgExecResponse_results, value) { - return - } - } +func (x *fastReflection_MsgGrantResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -721,15 +667,13 @@ func (x *fastReflection_MsgExecResponse) Range(f func(protoreflect.FieldDescript // 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_MsgExecResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgGrantResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgExecResponse.results": - return len(x.Results) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgGrantResponse")) } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgGrantResponse does not contain field %s", fd.FullName())) } } @@ -739,15 +683,13 @@ func (x *fastReflection_MsgExecResponse) Has(fd protoreflect.FieldDescriptor) bo // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgExecResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgGrantResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgExecResponse.results": - x.Results = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgGrantResponse")) } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgGrantResponse does not contain field %s", fd.FullName())) } } @@ -757,19 +699,13 @@ func (x *fastReflection_MsgExecResponse) Clear(fd protoreflect.FieldDescriptor) // 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_MsgExecResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgGrantResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.authz.v1beta1.MsgExecResponse.results": - if len(x.Results) == 0 { - return protoreflect.ValueOfList(&_MsgExecResponse_1_list{}) - } - listValue := &_MsgExecResponse_1_list{list: &x.Results} - return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgGrantResponse")) } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgGrantResponse does not contain field %s", descriptor.FullName())) } } @@ -783,17 +719,13 @@ func (x *fastReflection_MsgExecResponse) Get(descriptor protoreflect.FieldDescri // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgExecResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgGrantResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgExecResponse.results": - lv := value.List() - clv := lv.(*_MsgExecResponse_1_list) - x.Results = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgGrantResponse")) } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgGrantResponse does not contain field %s", fd.FullName())) } } @@ -807,45 +739,36 @@ func (x *fastReflection_MsgExecResponse) Set(fd protoreflect.FieldDescriptor, va // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgExecResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgGrantResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgExecResponse.results": - if x.Results == nil { - x.Results = [][]byte{} - } - value := &_MsgExecResponse_1_list{list: &x.Results} - return protoreflect.ValueOfList(value) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgGrantResponse")) } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgGrantResponse 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_MsgExecResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgGrantResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgExecResponse.results": - list := [][]byte{} - return protoreflect.ValueOfList(&_MsgExecResponse_1_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgGrantResponse")) } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgGrantResponse 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_MsgExecResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgGrantResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.MsgExecResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.MsgGrantResponse", d.FullName())) } panic("unreachable") } @@ -853,7 +776,7 @@ func (x *fastReflection_MsgExecResponse) WhichOneof(d protoreflect.OneofDescript // 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_MsgExecResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgGrantResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -864,7 +787,7 @@ func (x *fastReflection_MsgExecResponse) 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_MsgExecResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgGrantResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -876,7 +799,7 @@ func (x *fastReflection_MsgExecResponse) SetUnknown(fields protoreflect.RawField // 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_MsgExecResponse) IsValid() bool { +func (x *fastReflection_MsgGrantResponse) IsValid() bool { return x != nil } @@ -886,9 +809,9 @@ func (x *fastReflection_MsgExecResponse) 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_MsgExecResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgGrantResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgExecResponse) + x := input.Message.Interface().(*MsgGrantResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -900,12 +823,6 @@ func (x *fastReflection_MsgExecResponse) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if len(x.Results) > 0 { - for _, b := range x.Results { - l = len(b) - n += 1 + l + runtime.Sov(uint64(l)) - } - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -916,7 +833,7 @@ func (x *fastReflection_MsgExecResponse) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgExecResponse) + x := input.Message.Interface().(*MsgGrantResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -935,15 +852,6 @@ func (x *fastReflection_MsgExecResponse) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Results) > 0 { - for iNdEx := len(x.Results) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Results[iNdEx]) - copy(dAtA[i:], x.Results[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Results[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -955,7 +863,7 @@ func (x *fastReflection_MsgExecResponse) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgExecResponse) + x := input.Message.Interface().(*MsgGrantResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -987,44 +895,12 @@ func (x *fastReflection_MsgExecResponse) 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: MsgExecResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGrantResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGrantResponse: 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 Results", 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.Results = append(x.Results, make([]byte, postIndex-iNdEx)) - copy(x.Results[len(x.Results)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1602,40 +1478,88 @@ func (x *fastReflection_MsgExec) ProtoMethods() *protoiface.Methods { } } - 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, - } + 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 = (*_MsgExecResponse_1_list)(nil) + +type _MsgExecResponse_1_list struct { + list *[][]byte +} + +func (x *_MsgExecResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgExecResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfBytes((*x.list)[i]) +} + +func (x *_MsgExecResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgExecResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgExecResponse_1_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgExecResponse at list field Results as it is not of Message kind")) +} + +func (x *_MsgExecResponse_1_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgExecResponse_1_list) NewElement() protoreflect.Value { + var v []byte + return protoreflect.ValueOfBytes(v) +} + +func (x *_MsgExecResponse_1_list) IsValid() bool { + return x.list != nil } var ( - md_MsgGrantResponse protoreflect.MessageDescriptor + md_MsgExecResponse protoreflect.MessageDescriptor + fd_MsgExecResponse_results protoreflect.FieldDescriptor ) func init() { file_cosmos_authz_v1beta1_tx_proto_init() - md_MsgGrantResponse = File_cosmos_authz_v1beta1_tx_proto.Messages().ByName("MsgGrantResponse") + md_MsgExecResponse = File_cosmos_authz_v1beta1_tx_proto.Messages().ByName("MsgExecResponse") + fd_MsgExecResponse_results = md_MsgExecResponse.Fields().ByName("results") } -var _ protoreflect.Message = (*fastReflection_MsgGrantResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgExecResponse)(nil) -type fastReflection_MsgGrantResponse MsgGrantResponse +type fastReflection_MsgExecResponse MsgExecResponse -func (x *MsgGrantResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgGrantResponse)(x) +func (x *MsgExecResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgExecResponse)(x) } -func (x *MsgGrantResponse) slowProtoReflect() protoreflect.Message { +func (x *MsgExecResponse) slowProtoReflect() protoreflect.Message { mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1647,43 +1571,43 @@ func (x *MsgGrantResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgGrantResponse_messageType fastReflection_MsgGrantResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgGrantResponse_messageType{} +var _fastReflection_MsgExecResponse_messageType fastReflection_MsgExecResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgExecResponse_messageType{} -type fastReflection_MsgGrantResponse_messageType struct{} +type fastReflection_MsgExecResponse_messageType struct{} -func (x fastReflection_MsgGrantResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgGrantResponse)(nil) +func (x fastReflection_MsgExecResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgExecResponse)(nil) } -func (x fastReflection_MsgGrantResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgGrantResponse) +func (x fastReflection_MsgExecResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgExecResponse) } -func (x fastReflection_MsgGrantResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgGrantResponse +func (x fastReflection_MsgExecResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgExecResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgGrantResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgGrantResponse +func (x *fastReflection_MsgExecResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgExecResponse } // 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_MsgGrantResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgGrantResponse_messageType +func (x *fastReflection_MsgExecResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgExecResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgGrantResponse) New() protoreflect.Message { - return new(fastReflection_MsgGrantResponse) +func (x *fastReflection_MsgExecResponse) New() protoreflect.Message { + return new(fastReflection_MsgExecResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgGrantResponse) Interface() protoreflect.ProtoMessage { - return (*MsgGrantResponse)(x) +func (x *fastReflection_MsgExecResponse) Interface() protoreflect.ProtoMessage { + return (*MsgExecResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -1691,7 +1615,13 @@ func (x *fastReflection_MsgGrantResponse) Interface() protoreflect.ProtoMessage // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgGrantResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgExecResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Results) != 0 { + value := protoreflect.ValueOfList(&_MsgExecResponse_1_list{list: &x.Results}) + if !f(fd_MsgExecResponse_results, value) { + return + } + } } // Has reports whether a field is populated. @@ -1705,13 +1635,15 @@ func (x *fastReflection_MsgGrantResponse) Range(f func(protoreflect.FieldDescrip // 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_MsgGrantResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgExecResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "cosmos.authz.v1beta1.MsgExecResponse.results": + return len(x.Results) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgGrantResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecResponse")) } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgGrantResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecResponse does not contain field %s", fd.FullName())) } } @@ -1721,13 +1653,15 @@ func (x *fastReflection_MsgGrantResponse) Has(fd protoreflect.FieldDescriptor) b // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgGrantResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgExecResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "cosmos.authz.v1beta1.MsgExecResponse.results": + x.Results = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgGrantResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecResponse")) } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgGrantResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecResponse does not contain field %s", fd.FullName())) } } @@ -1737,13 +1671,19 @@ func (x *fastReflection_MsgGrantResponse) Clear(fd protoreflect.FieldDescriptor) // 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_MsgGrantResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgExecResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "cosmos.authz.v1beta1.MsgExecResponse.results": + if len(x.Results) == 0 { + return protoreflect.ValueOfList(&_MsgExecResponse_1_list{}) + } + listValue := &_MsgExecResponse_1_list{list: &x.Results} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgGrantResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecResponse")) } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgGrantResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecResponse does not contain field %s", descriptor.FullName())) } } @@ -1757,13 +1697,17 @@ func (x *fastReflection_MsgGrantResponse) Get(descriptor protoreflect.FieldDescr // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgGrantResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgExecResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "cosmos.authz.v1beta1.MsgExecResponse.results": + lv := value.List() + clv := lv.(*_MsgExecResponse_1_list) + x.Results = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgGrantResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecResponse")) } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgGrantResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecResponse does not contain field %s", fd.FullName())) } } @@ -1777,36 +1721,45 @@ func (x *fastReflection_MsgGrantResponse) Set(fd protoreflect.FieldDescriptor, v // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgGrantResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgExecResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "cosmos.authz.v1beta1.MsgExecResponse.results": + if x.Results == nil { + x.Results = [][]byte{} + } + value := &_MsgExecResponse_1_list{list: &x.Results} + return protoreflect.ValueOfList(value) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgGrantResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecResponse")) } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgGrantResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecResponse 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_MsgGrantResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgExecResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "cosmos.authz.v1beta1.MsgExecResponse.results": + list := [][]byte{} + return protoreflect.ValueOfList(&_MsgExecResponse_1_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgGrantResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecResponse")) } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgGrantResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecResponse 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_MsgGrantResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgExecResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.MsgGrantResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.MsgExecResponse", d.FullName())) } panic("unreachable") } @@ -1814,7 +1767,7 @@ func (x *fastReflection_MsgGrantResponse) WhichOneof(d protoreflect.OneofDescrip // 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_MsgGrantResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgExecResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1825,7 +1778,7 @@ func (x *fastReflection_MsgGrantResponse) 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_MsgGrantResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgExecResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1837,7 +1790,7 @@ func (x *fastReflection_MsgGrantResponse) SetUnknown(fields protoreflect.RawFiel // 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_MsgGrantResponse) IsValid() bool { +func (x *fastReflection_MsgExecResponse) IsValid() bool { return x != nil } @@ -1847,9 +1800,9 @@ func (x *fastReflection_MsgGrantResponse) 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_MsgGrantResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgExecResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgGrantResponse) + x := input.Message.Interface().(*MsgExecResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1861,6 +1814,12 @@ func (x *fastReflection_MsgGrantResponse) ProtoMethods() *protoiface.Methods { var n int var l int _ = l + if len(x.Results) > 0 { + for _, b := range x.Results { + l = len(b) + n += 1 + l + runtime.Sov(uint64(l)) + } + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1871,7 +1830,7 @@ func (x *fastReflection_MsgGrantResponse) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgGrantResponse) + x := input.Message.Interface().(*MsgExecResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1890,6 +1849,15 @@ func (x *fastReflection_MsgGrantResponse) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.Results) > 0 { + for iNdEx := len(x.Results) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Results[iNdEx]) + copy(dAtA[i:], x.Results[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Results[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -1901,7 +1869,7 @@ func (x *fastReflection_MsgGrantResponse) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgGrantResponse) + x := input.Message.Interface().(*MsgExecResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1933,12 +1901,44 @@ func (x *fastReflection_MsgGrantResponse) 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: MsgGrantResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGrantResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecResponse: 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 Results", 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.Results = append(x.Results, make([]byte, postIndex-iNdEx)) + copy(x.Results[len(x.Results)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2946,17 +2946,15 @@ func (x *MsgGrant) GetGrant() *Grant { return nil } -// MsgExecResponse defines the Msg/MsgExecResponse response type. -type MsgExecResponse struct { +// MsgGrantResponse defines the Msg/MsgGrant response type. +type MsgGrantResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Results [][]byte `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` } -func (x *MsgExecResponse) Reset() { - *x = MsgExecResponse{} +func (x *MsgGrantResponse) Reset() { + *x = MsgGrantResponse{} if protoimpl.UnsafeEnabled { mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2964,24 +2962,17 @@ func (x *MsgExecResponse) Reset() { } } -func (x *MsgExecResponse) String() string { +func (x *MsgGrantResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgExecResponse) ProtoMessage() {} +func (*MsgGrantResponse) ProtoMessage() {} -// Deprecated: Use MsgExecResponse.ProtoReflect.Descriptor instead. -func (*MsgExecResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgGrantResponse.ProtoReflect.Descriptor instead. +func (*MsgGrantResponse) Descriptor() ([]byte, []int) { return file_cosmos_authz_v1beta1_tx_proto_rawDescGZIP(), []int{1} } -func (x *MsgExecResponse) GetResults() [][]byte { - if x != nil { - return x.Results - } - return nil -} - // MsgExec attempts to execute the provided messages using // authorizations granted to the grantee. Each message should have only // one signer corresponding to the granter of the authorization. @@ -3031,15 +3022,17 @@ func (x *MsgExec) GetMsgs() []*anypb.Any { return nil } -// MsgGrantResponse defines the Msg/MsgGrant response type. -type MsgGrantResponse struct { +// MsgExecResponse defines the Msg/MsgExecResponse response type. +type MsgExecResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Results [][]byte `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` } -func (x *MsgGrantResponse) Reset() { - *x = MsgGrantResponse{} +func (x *MsgExecResponse) Reset() { + *x = MsgExecResponse{} if protoimpl.UnsafeEnabled { mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3047,17 +3040,24 @@ func (x *MsgGrantResponse) Reset() { } } -func (x *MsgGrantResponse) String() string { +func (x *MsgExecResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgGrantResponse) ProtoMessage() {} +func (*MsgExecResponse) ProtoMessage() {} -// Deprecated: Use MsgGrantResponse.ProtoReflect.Descriptor instead. -func (*MsgGrantResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgExecResponse.ProtoReflect.Descriptor instead. +func (*MsgExecResponse) Descriptor() ([]byte, []int) { return file_cosmos_authz_v1beta1_tx_proto_rawDescGZIP(), []int{3} } +func (x *MsgExecResponse) GetResults() [][]byte { + if x != nil { + return x.Results + } + return nil +} + // MsgRevoke revokes any authorization with the provided sdk.Msg type on the // granter's account with that has been granted to the grantee. type MsgRevoke struct { @@ -3167,22 +3167,22 @@ var file_cosmos_authz_v1beta1_tx_proto_rawDesc = []byte{ 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x24, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, - 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x22, 0x2b, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x45, + 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x22, 0x12, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x47, + 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa9, 0x01, 0x0a, + 0x07, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, + 0x74, 0x65, 0x65, 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, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x12, 0x45, 0x0a, 0x04, + 0x6d, 0x73, 0x67, 0x73, 0x18, 0x02, 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, 0x1b, 0xca, 0xb4, 0x2d, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x04, 0x6d, + 0x73, 0x67, 0x73, 0x3a, 0x23, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, + 0x65, 0x8a, 0xe7, 0xb0, 0x2a, 0x12, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, + 0x2f, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x22, 0x2b, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0xa9, 0x01, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, - 0x63, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 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, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x65, 0x65, 0x12, 0x45, 0x0a, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x18, 0x02, 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, 0x1b, 0xca, 0xb4, 0x2d, 0x17, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x23, 0x82, 0xe7, - 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x8a, 0xe7, 0xb0, 0x2a, 0x12, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, - 0x63, 0x22, 0x12, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbc, 0x01, 0x0a, 0x09, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0xbc, 0x01, 0x0a, 0x09, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 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, @@ -3243,9 +3243,9 @@ func file_cosmos_authz_v1beta1_tx_proto_rawDescGZIP() []byte { var file_cosmos_authz_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_cosmos_authz_v1beta1_tx_proto_goTypes = []interface{}{ (*MsgGrant)(nil), // 0: cosmos.authz.v1beta1.MsgGrant - (*MsgExecResponse)(nil), // 1: cosmos.authz.v1beta1.MsgExecResponse + (*MsgGrantResponse)(nil), // 1: cosmos.authz.v1beta1.MsgGrantResponse (*MsgExec)(nil), // 2: cosmos.authz.v1beta1.MsgExec - (*MsgGrantResponse)(nil), // 3: cosmos.authz.v1beta1.MsgGrantResponse + (*MsgExecResponse)(nil), // 3: cosmos.authz.v1beta1.MsgExecResponse (*MsgRevoke)(nil), // 4: cosmos.authz.v1beta1.MsgRevoke (*MsgRevokeResponse)(nil), // 5: cosmos.authz.v1beta1.MsgRevokeResponse (*Grant)(nil), // 6: cosmos.authz.v1beta1.Grant @@ -3257,8 +3257,8 @@ var file_cosmos_authz_v1beta1_tx_proto_depIdxs = []int32{ 0, // 2: cosmos.authz.v1beta1.Msg.Grant:input_type -> cosmos.authz.v1beta1.MsgGrant 2, // 3: cosmos.authz.v1beta1.Msg.Exec:input_type -> cosmos.authz.v1beta1.MsgExec 4, // 4: cosmos.authz.v1beta1.Msg.Revoke:input_type -> cosmos.authz.v1beta1.MsgRevoke - 3, // 5: cosmos.authz.v1beta1.Msg.Grant:output_type -> cosmos.authz.v1beta1.MsgGrantResponse - 1, // 6: cosmos.authz.v1beta1.Msg.Exec:output_type -> cosmos.authz.v1beta1.MsgExecResponse + 1, // 5: cosmos.authz.v1beta1.Msg.Grant:output_type -> cosmos.authz.v1beta1.MsgGrantResponse + 3, // 6: cosmos.authz.v1beta1.Msg.Exec:output_type -> cosmos.authz.v1beta1.MsgExecResponse 5, // 7: cosmos.authz.v1beta1.Msg.Revoke:output_type -> cosmos.authz.v1beta1.MsgRevokeResponse 5, // [5:8] is the sub-list for method output_type 2, // [2:5] is the sub-list for method input_type @@ -3287,7 +3287,7 @@ func file_cosmos_authz_v1beta1_tx_proto_init() { } } file_cosmos_authz_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgExecResponse); i { + switch v := v.(*MsgGrantResponse); i { case 0: return &v.state case 1: @@ -3311,7 +3311,7 @@ func file_cosmos_authz_v1beta1_tx_proto_init() { } } file_cosmos_authz_v1beta1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgGrantResponse); i { + switch v := v.(*MsgExecResponse); i { case 0: return &v.state case 1: diff --git a/api/cosmos/bank/module/v1/module.pulsar.go b/api/cosmos/bank/module/v1/module.pulsar.go index 64e252a4af23..89966594fde7 100644 --- a/api/cosmos/bank/module/v1/module.pulsar.go +++ b/api/cosmos/bank/module/v1/module.pulsar.go @@ -59,10 +59,57 @@ func (x *_Module_1_list) IsValid() bool { return x.list != nil } +var _ protoreflect.List = (*_Module_3_list)(nil) + +type _Module_3_list struct { + list *[]string +} + +func (x *_Module_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Module_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_Module_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_Module_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_Module_3_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Module at list field RestrictionsOrder as it is not of Message kind")) +} + +func (x *_Module_3_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Module_3_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Module_3_list) IsValid() bool { + return x.list != nil +} + var ( md_Module protoreflect.MessageDescriptor fd_Module_blocked_module_accounts_override protoreflect.FieldDescriptor fd_Module_authority protoreflect.FieldDescriptor + fd_Module_restrictions_order protoreflect.FieldDescriptor ) func init() { @@ -70,6 +117,7 @@ func init() { md_Module = File_cosmos_bank_module_v1_module_proto.Messages().ByName("Module") fd_Module_blocked_module_accounts_override = md_Module.Fields().ByName("blocked_module_accounts_override") fd_Module_authority = md_Module.Fields().ByName("authority") + fd_Module_restrictions_order = md_Module.Fields().ByName("restrictions_order") } var _ protoreflect.Message = (*fastReflection_Module)(nil) @@ -149,6 +197,12 @@ func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, proto return } } + if len(x.RestrictionsOrder) != 0 { + value := protoreflect.ValueOfList(&_Module_3_list{list: &x.RestrictionsOrder}) + if !f(fd_Module_restrictions_order, value) { + return + } + } } // Has reports whether a field is populated. @@ -168,6 +222,8 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { return len(x.BlockedModuleAccountsOverride) != 0 case "cosmos.bank.module.v1.Module.authority": return x.Authority != "" + case "cosmos.bank.module.v1.Module.restrictions_order": + return len(x.RestrictionsOrder) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.module.v1.Module")) @@ -188,6 +244,8 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { x.BlockedModuleAccountsOverride = nil case "cosmos.bank.module.v1.Module.authority": x.Authority = "" + case "cosmos.bank.module.v1.Module.restrictions_order": + x.RestrictionsOrder = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.module.v1.Module")) @@ -213,6 +271,12 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro case "cosmos.bank.module.v1.Module.authority": value := x.Authority return protoreflect.ValueOfString(value) + case "cosmos.bank.module.v1.Module.restrictions_order": + if len(x.RestrictionsOrder) == 0 { + return protoreflect.ValueOfList(&_Module_3_list{}) + } + listValue := &_Module_3_list{list: &x.RestrictionsOrder} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.module.v1.Module")) @@ -239,6 +303,10 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto x.BlockedModuleAccountsOverride = *clv.list case "cosmos.bank.module.v1.Module.authority": x.Authority = value.Interface().(string) + case "cosmos.bank.module.v1.Module.restrictions_order": + lv := value.List() + clv := lv.(*_Module_3_list) + x.RestrictionsOrder = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.module.v1.Module")) @@ -265,6 +333,12 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore } value := &_Module_1_list{list: &x.BlockedModuleAccountsOverride} return protoreflect.ValueOfList(value) + case "cosmos.bank.module.v1.Module.restrictions_order": + if x.RestrictionsOrder == nil { + x.RestrictionsOrder = []string{} + } + value := &_Module_3_list{list: &x.RestrictionsOrder} + return protoreflect.ValueOfList(value) case "cosmos.bank.module.v1.Module.authority": panic(fmt.Errorf("field authority of message cosmos.bank.module.v1.Module is not mutable")) default: @@ -285,6 +359,9 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor return protoreflect.ValueOfList(&_Module_1_list{list: &list}) case "cosmos.bank.module.v1.Module.authority": return protoreflect.ValueOfString("") + case "cosmos.bank.module.v1.Module.restrictions_order": + list := []string{} + return protoreflect.ValueOfList(&_Module_3_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.module.v1.Module")) @@ -364,6 +441,12 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + if len(x.RestrictionsOrder) > 0 { + for _, s := range x.RestrictionsOrder { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -393,6 +476,15 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.RestrictionsOrder) > 0 { + for iNdEx := len(x.RestrictionsOrder) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.RestrictionsOrder[iNdEx]) + copy(dAtA[i:], x.RestrictionsOrder[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RestrictionsOrder[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } if len(x.Authority) > 0 { i -= len(x.Authority) copy(dAtA[i:], x.Authority) @@ -522,6 +614,38 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { } x.Authority = 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 RestrictionsOrder", 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.RestrictionsOrder = append(x.RestrictionsOrder, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -576,12 +700,17 @@ type Module struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // blocked_module_accounts configures exceptional module accounts which should be blocked from receiving funds. - // If left empty it defaults to the list of account names supplied in the auth module configuration as + // blocked_module_accounts_override configures exceptional module accounts which should be blocked from receiving + // funds. If left empty it defaults to the list of account names supplied in the auth module configuration as // module_account_permissions BlockedModuleAccountsOverride []string `protobuf:"bytes,1,rep,name=blocked_module_accounts_override,json=blockedModuleAccountsOverride,proto3" json:"blocked_module_accounts_override,omitempty"` // authority defines the custom module authority. If not set, defaults to the governance module. Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` + // restrictions_order specifies the order of send restrictions and should be + // a list of module names which provide a send restriction instance. If no + // order is provided, then restrictions will be applied in alphabetical order + // of module names. + RestrictionsOrder []string `protobuf:"bytes,3,rep,name=restrictions_order,json=restrictionsOrder,proto3" json:"restrictions_order,omitempty"` } func (x *Module) Reset() { @@ -618,6 +747,13 @@ func (x *Module) GetAuthority() string { return "" } +func (x *Module) GetRestrictionsOrder() []string { + if x != nil { + return x.RestrictionsOrder + } + return nil +} + var File_cosmos_bank_module_v1_module_proto protoreflect.FileDescriptor var file_cosmos_bank_module_v1_module_proto_rawDesc = []byte{ @@ -626,31 +762,34 @@ var file_cosmos_bank_module_v1_module_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, 0x01, + 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcb, 0x01, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x47, 0x0a, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, - 0x2b, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x25, 0x0a, 0x23, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x42, 0xd0, 0x01, 0x0a, - 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, - 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, - 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, - 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x42, 0x4d, - 0xaa, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x6e, 0x6b, 0x2e, 0x4d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x42, 0x61, 0x6e, 0x6b, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x21, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x6e, 0x6b, 0x5c, 0x4d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x42, - 0x61, 0x6e, 0x6b, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, + 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x72, 0x65, 0x73, + 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x3a, 0x2b, + 0xba, 0xc0, 0x96, 0xda, 0x01, 0x25, 0x0a, 0x23, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x42, 0xd0, 0x01, 0x0a, 0x19, + 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, + 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x42, 0x4d, 0xaa, + 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x6e, 0x6b, 0x2e, 0x4d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5c, 0x42, 0x61, 0x6e, 0x6b, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x21, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x6e, 0x6b, 0x5c, 0x4d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x42, 0x61, + 0x6e, 0x6b, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/cosmos/bank/v1beta1/query.pulsar.go b/api/cosmos/bank/v1beta1/query.pulsar.go index 0442d8bc49c0..ff7c91b7aff5 100644 --- a/api/cosmos/bank/v1beta1/query.pulsar.go +++ b/api/cosmos/bank/v1beta1/query.pulsar.go @@ -8572,6 +8572,861 @@ func (x *fastReflection_QueryDenomMetadataResponse) ProtoMethods() *protoiface.M } } +var ( + md_QueryDenomMetadataByQueryStringRequest protoreflect.MessageDescriptor + fd_QueryDenomMetadataByQueryStringRequest_denom protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_bank_v1beta1_query_proto_init() + md_QueryDenomMetadataByQueryStringRequest = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QueryDenomMetadataByQueryStringRequest") + fd_QueryDenomMetadataByQueryStringRequest_denom = md_QueryDenomMetadataByQueryStringRequest.Fields().ByName("denom") +} + +var _ protoreflect.Message = (*fastReflection_QueryDenomMetadataByQueryStringRequest)(nil) + +type fastReflection_QueryDenomMetadataByQueryStringRequest QueryDenomMetadataByQueryStringRequest + +func (x *QueryDenomMetadataByQueryStringRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDenomMetadataByQueryStringRequest)(x) +} + +func (x *QueryDenomMetadataByQueryStringRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryDenomMetadataByQueryStringRequest_messageType fastReflection_QueryDenomMetadataByQueryStringRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryDenomMetadataByQueryStringRequest_messageType{} + +type fastReflection_QueryDenomMetadataByQueryStringRequest_messageType struct{} + +func (x fastReflection_QueryDenomMetadataByQueryStringRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDenomMetadataByQueryStringRequest)(nil) +} +func (x fastReflection_QueryDenomMetadataByQueryStringRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDenomMetadataByQueryStringRequest) +} +func (x fastReflection_QueryDenomMetadataByQueryStringRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDenomMetadataByQueryStringRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryDenomMetadataByQueryStringRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDenomMetadataByQueryStringRequest +} + +// 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_QueryDenomMetadataByQueryStringRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryDenomMetadataByQueryStringRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryDenomMetadataByQueryStringRequest) New() protoreflect.Message { + return new(fastReflection_QueryDenomMetadataByQueryStringRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryDenomMetadataByQueryStringRequest) Interface() protoreflect.ProtoMessage { + return (*QueryDenomMetadataByQueryStringRequest)(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_QueryDenomMetadataByQueryStringRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Denom != "" { + value := protoreflect.ValueOfString(x.Denom) + if !f(fd_QueryDenomMetadataByQueryStringRequest_denom, 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_QueryDenomMetadataByQueryStringRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest.denom": + return x.Denom != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest 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_QueryDenomMetadataByQueryStringRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest.denom": + x.Denom = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest 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_QueryDenomMetadataByQueryStringRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest.denom": + value := x.Denom + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest 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_QueryDenomMetadataByQueryStringRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest.denom": + x.Denom = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest 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_QueryDenomMetadataByQueryStringRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest.denom": + panic(fmt.Errorf("field denom of message cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest 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_QueryDenomMetadataByQueryStringRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest.denom": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest 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_QueryDenomMetadataByQueryStringRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest", 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_QueryDenomMetadataByQueryStringRequest) 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_QueryDenomMetadataByQueryStringRequest) 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_QueryDenomMetadataByQueryStringRequest) 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_QueryDenomMetadataByQueryStringRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryDenomMetadataByQueryStringRequest) + 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.Denom) + 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().(*QueryDenomMetadataByQueryStringRequest) + 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.Denom) > 0 { + i -= len(x.Denom) + copy(dAtA[i:], x.Denom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) + 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().(*QueryDenomMetadataByQueryStringRequest) + 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: QueryDenomMetadataByQueryStringRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDenomMetadataByQueryStringRequest: 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 Denom", 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.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryDenomMetadataByQueryStringResponse protoreflect.MessageDescriptor + fd_QueryDenomMetadataByQueryStringResponse_metadata protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_bank_v1beta1_query_proto_init() + md_QueryDenomMetadataByQueryStringResponse = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QueryDenomMetadataByQueryStringResponse") + fd_QueryDenomMetadataByQueryStringResponse_metadata = md_QueryDenomMetadataByQueryStringResponse.Fields().ByName("metadata") +} + +var _ protoreflect.Message = (*fastReflection_QueryDenomMetadataByQueryStringResponse)(nil) + +type fastReflection_QueryDenomMetadataByQueryStringResponse QueryDenomMetadataByQueryStringResponse + +func (x *QueryDenomMetadataByQueryStringResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDenomMetadataByQueryStringResponse)(x) +} + +func (x *QueryDenomMetadataByQueryStringResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[19] + 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_QueryDenomMetadataByQueryStringResponse_messageType fastReflection_QueryDenomMetadataByQueryStringResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryDenomMetadataByQueryStringResponse_messageType{} + +type fastReflection_QueryDenomMetadataByQueryStringResponse_messageType struct{} + +func (x fastReflection_QueryDenomMetadataByQueryStringResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDenomMetadataByQueryStringResponse)(nil) +} +func (x fastReflection_QueryDenomMetadataByQueryStringResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDenomMetadataByQueryStringResponse) +} +func (x fastReflection_QueryDenomMetadataByQueryStringResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDenomMetadataByQueryStringResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryDenomMetadataByQueryStringResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDenomMetadataByQueryStringResponse +} + +// 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_QueryDenomMetadataByQueryStringResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryDenomMetadataByQueryStringResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryDenomMetadataByQueryStringResponse) New() protoreflect.Message { + return new(fastReflection_QueryDenomMetadataByQueryStringResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryDenomMetadataByQueryStringResponse) Interface() protoreflect.ProtoMessage { + return (*QueryDenomMetadataByQueryStringResponse)(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_QueryDenomMetadataByQueryStringResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Metadata != nil { + value := protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) + if !f(fd_QueryDenomMetadataByQueryStringResponse_metadata, 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_QueryDenomMetadataByQueryStringResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse.metadata": + return x.Metadata != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse 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_QueryDenomMetadataByQueryStringResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse.metadata": + x.Metadata = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse 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_QueryDenomMetadataByQueryStringResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse.metadata": + value := x.Metadata + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse 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_QueryDenomMetadataByQueryStringResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse.metadata": + x.Metadata = value.Message().Interface().(*Metadata) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse 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_QueryDenomMetadataByQueryStringResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse.metadata": + if x.Metadata == nil { + x.Metadata = new(Metadata) + } + return protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse 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_QueryDenomMetadataByQueryStringResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse.metadata": + m := new(Metadata) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse 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_QueryDenomMetadataByQueryStringResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse", 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_QueryDenomMetadataByQueryStringResponse) 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_QueryDenomMetadataByQueryStringResponse) 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_QueryDenomMetadataByQueryStringResponse) 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_QueryDenomMetadataByQueryStringResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryDenomMetadataByQueryStringResponse) + 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.Metadata != nil { + l = options.Size(x.Metadata) + 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().(*QueryDenomMetadataByQueryStringResponse) + 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.Metadata != nil { + encoded, err := options.Marshal(x.Metadata) + 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().(*QueryDenomMetadataByQueryStringResponse) + 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: QueryDenomMetadataByQueryStringResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDenomMetadataByQueryStringResponse: 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 Metadata", 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.Metadata == nil { + x.Metadata = &Metadata{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Metadata); 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_QueryDenomOwnersRequest protoreflect.MessageDescriptor fd_QueryDenomOwnersRequest_denom protoreflect.FieldDescriptor @@ -8580,21 +9435,1070 @@ var ( func init() { file_cosmos_bank_v1beta1_query_proto_init() - md_QueryDenomOwnersRequest = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QueryDenomOwnersRequest") - fd_QueryDenomOwnersRequest_denom = md_QueryDenomOwnersRequest.Fields().ByName("denom") - fd_QueryDenomOwnersRequest_pagination = md_QueryDenomOwnersRequest.Fields().ByName("pagination") + md_QueryDenomOwnersRequest = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QueryDenomOwnersRequest") + fd_QueryDenomOwnersRequest_denom = md_QueryDenomOwnersRequest.Fields().ByName("denom") + fd_QueryDenomOwnersRequest_pagination = md_QueryDenomOwnersRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryDenomOwnersRequest)(nil) + +type fastReflection_QueryDenomOwnersRequest QueryDenomOwnersRequest + +func (x *QueryDenomOwnersRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDenomOwnersRequest)(x) +} + +func (x *QueryDenomOwnersRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[20] + 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_QueryDenomOwnersRequest_messageType fastReflection_QueryDenomOwnersRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryDenomOwnersRequest_messageType{} + +type fastReflection_QueryDenomOwnersRequest_messageType struct{} + +func (x fastReflection_QueryDenomOwnersRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDenomOwnersRequest)(nil) +} +func (x fastReflection_QueryDenomOwnersRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDenomOwnersRequest) +} +func (x fastReflection_QueryDenomOwnersRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDenomOwnersRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryDenomOwnersRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDenomOwnersRequest +} + +// 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_QueryDenomOwnersRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryDenomOwnersRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryDenomOwnersRequest) New() protoreflect.Message { + return new(fastReflection_QueryDenomOwnersRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryDenomOwnersRequest) Interface() protoreflect.ProtoMessage { + return (*QueryDenomOwnersRequest)(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_QueryDenomOwnersRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Denom != "" { + value := protoreflect.ValueOfString(x.Denom) + if !f(fd_QueryDenomOwnersRequest_denom, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryDenomOwnersRequest_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_QueryDenomOwnersRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.denom": + return x.Denom != "" + case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersRequest")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersRequest 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_QueryDenomOwnersRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.denom": + x.Denom = "" + case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersRequest")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersRequest 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_QueryDenomOwnersRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.denom": + value := x.Denom + return protoreflect.ValueOfString(value) + case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersRequest")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersRequest 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_QueryDenomOwnersRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.denom": + x.Denom = value.Interface().(string) + case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta11.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersRequest")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersRequest 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_QueryDenomOwnersRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta11.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.denom": + panic(fmt.Errorf("field denom of message cosmos.bank.v1beta1.QueryDenomOwnersRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersRequest")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersRequest 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_QueryDenomOwnersRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.denom": + return protoreflect.ValueOfString("") + case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.pagination": + m := new(v1beta11.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersRequest")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersRequest 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_QueryDenomOwnersRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.QueryDenomOwnersRequest", 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_QueryDenomOwnersRequest) 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_QueryDenomOwnersRequest) 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_QueryDenomOwnersRequest) 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_QueryDenomOwnersRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryDenomOwnersRequest) + 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.Denom) + if l > 0 { + 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().(*QueryDenomOwnersRequest) + 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.Denom) > 0 { + i -= len(x.Denom) + copy(dAtA[i:], x.Denom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) + 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().(*QueryDenomOwnersRequest) + 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: QueryDenomOwnersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDenomOwnersRequest: 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 Denom", 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.Denom = 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 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 = &v1beta11.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 ( + md_DenomOwner protoreflect.MessageDescriptor + fd_DenomOwner_address protoreflect.FieldDescriptor + fd_DenomOwner_balance protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_bank_v1beta1_query_proto_init() + md_DenomOwner = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("DenomOwner") + fd_DenomOwner_address = md_DenomOwner.Fields().ByName("address") + fd_DenomOwner_balance = md_DenomOwner.Fields().ByName("balance") +} + +var _ protoreflect.Message = (*fastReflection_DenomOwner)(nil) + +type fastReflection_DenomOwner DenomOwner + +func (x *DenomOwner) ProtoReflect() protoreflect.Message { + return (*fastReflection_DenomOwner)(x) +} + +func (x *DenomOwner) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[21] + 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_DenomOwner_messageType fastReflection_DenomOwner_messageType +var _ protoreflect.MessageType = fastReflection_DenomOwner_messageType{} + +type fastReflection_DenomOwner_messageType struct{} + +func (x fastReflection_DenomOwner_messageType) Zero() protoreflect.Message { + return (*fastReflection_DenomOwner)(nil) +} +func (x fastReflection_DenomOwner_messageType) New() protoreflect.Message { + return new(fastReflection_DenomOwner) +} +func (x fastReflection_DenomOwner_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_DenomOwner +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_DenomOwner) Descriptor() protoreflect.MessageDescriptor { + return md_DenomOwner +} + +// 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_DenomOwner) Type() protoreflect.MessageType { + return _fastReflection_DenomOwner_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_DenomOwner) New() protoreflect.Message { + return new(fastReflection_DenomOwner) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_DenomOwner) Interface() protoreflect.ProtoMessage { + return (*DenomOwner)(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_DenomOwner) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Address != "" { + value := protoreflect.ValueOfString(x.Address) + if !f(fd_DenomOwner_address, value) { + return + } + } + if x.Balance != nil { + value := protoreflect.ValueOfMessage(x.Balance.ProtoReflect()) + if !f(fd_DenomOwner_balance, 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_DenomOwner) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.bank.v1beta1.DenomOwner.address": + return x.Address != "" + case "cosmos.bank.v1beta1.DenomOwner.balance": + return x.Balance != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.DenomOwner")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.DenomOwner 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_DenomOwner) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.bank.v1beta1.DenomOwner.address": + x.Address = "" + case "cosmos.bank.v1beta1.DenomOwner.balance": + x.Balance = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.DenomOwner")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.DenomOwner 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_DenomOwner) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.bank.v1beta1.DenomOwner.address": + value := x.Address + return protoreflect.ValueOfString(value) + case "cosmos.bank.v1beta1.DenomOwner.balance": + value := x.Balance + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.DenomOwner")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.DenomOwner 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_DenomOwner) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.bank.v1beta1.DenomOwner.address": + x.Address = value.Interface().(string) + case "cosmos.bank.v1beta1.DenomOwner.balance": + x.Balance = value.Message().Interface().(*v1beta1.Coin) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.DenomOwner")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.DenomOwner 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_DenomOwner) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.bank.v1beta1.DenomOwner.balance": + if x.Balance == nil { + x.Balance = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.Balance.ProtoReflect()) + case "cosmos.bank.v1beta1.DenomOwner.address": + panic(fmt.Errorf("field address of message cosmos.bank.v1beta1.DenomOwner is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.DenomOwner")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.DenomOwner 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_DenomOwner) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.bank.v1beta1.DenomOwner.address": + return protoreflect.ValueOfString("") + case "cosmos.bank.v1beta1.DenomOwner.balance": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.DenomOwner")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.DenomOwner 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_DenomOwner) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.DenomOwner", 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_DenomOwner) 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_DenomOwner) 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_DenomOwner) 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_DenomOwner) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*DenomOwner) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Address) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Balance != nil { + l = options.Size(x.Balance) + 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().(*DenomOwner) + 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.Balance != nil { + encoded, err := options.Marshal(x.Balance) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Address) > 0 { + i -= len(x.Address) + copy(dAtA[i:], x.Address) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*DenomOwner) + 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: DenomOwner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DenomOwner: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Balance", 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.Balance == nil { + x.Balance = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Balance); 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 = (*_QueryDenomOwnersResponse_1_list)(nil) + +type _QueryDenomOwnersResponse_1_list struct { + list *[]*DenomOwner +} + +func (x *_QueryDenomOwnersResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryDenomOwnersResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryDenomOwnersResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*DenomOwner) + (*x.list)[i] = concreteValue +} + +func (x *_QueryDenomOwnersResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*DenomOwner) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryDenomOwnersResponse_1_list) AppendMutable() protoreflect.Value { + v := new(DenomOwner) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryDenomOwnersResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryDenomOwnersResponse_1_list) NewElement() protoreflect.Value { + v := new(DenomOwner) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryDenomOwnersResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryDenomOwnersResponse protoreflect.MessageDescriptor + fd_QueryDenomOwnersResponse_denom_owners protoreflect.FieldDescriptor + fd_QueryDenomOwnersResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_bank_v1beta1_query_proto_init() + md_QueryDenomOwnersResponse = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QueryDenomOwnersResponse") + fd_QueryDenomOwnersResponse_denom_owners = md_QueryDenomOwnersResponse.Fields().ByName("denom_owners") + fd_QueryDenomOwnersResponse_pagination = md_QueryDenomOwnersResponse.Fields().ByName("pagination") } -var _ protoreflect.Message = (*fastReflection_QueryDenomOwnersRequest)(nil) +var _ protoreflect.Message = (*fastReflection_QueryDenomOwnersResponse)(nil) -type fastReflection_QueryDenomOwnersRequest QueryDenomOwnersRequest +type fastReflection_QueryDenomOwnersResponse QueryDenomOwnersResponse -func (x *QueryDenomOwnersRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDenomOwnersRequest)(x) +func (x *QueryDenomOwnersResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDenomOwnersResponse)(x) } -func (x *QueryDenomOwnersRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[18] +func (x *QueryDenomOwnersResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8605,43 +10509,43 @@ func (x *QueryDenomOwnersRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryDenomOwnersRequest_messageType fastReflection_QueryDenomOwnersRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryDenomOwnersRequest_messageType{} +var _fastReflection_QueryDenomOwnersResponse_messageType fastReflection_QueryDenomOwnersResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryDenomOwnersResponse_messageType{} -type fastReflection_QueryDenomOwnersRequest_messageType struct{} +type fastReflection_QueryDenomOwnersResponse_messageType struct{} -func (x fastReflection_QueryDenomOwnersRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDenomOwnersRequest)(nil) +func (x fastReflection_QueryDenomOwnersResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDenomOwnersResponse)(nil) } -func (x fastReflection_QueryDenomOwnersRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDenomOwnersRequest) +func (x fastReflection_QueryDenomOwnersResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDenomOwnersResponse) } -func (x fastReflection_QueryDenomOwnersRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDenomOwnersRequest +func (x fastReflection_QueryDenomOwnersResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDenomOwnersResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryDenomOwnersRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDenomOwnersRequest +func (x *fastReflection_QueryDenomOwnersResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDenomOwnersResponse } // 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_QueryDenomOwnersRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryDenomOwnersRequest_messageType +func (x *fastReflection_QueryDenomOwnersResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryDenomOwnersResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDenomOwnersRequest) New() protoreflect.Message { - return new(fastReflection_QueryDenomOwnersRequest) +func (x *fastReflection_QueryDenomOwnersResponse) New() protoreflect.Message { + return new(fastReflection_QueryDenomOwnersResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDenomOwnersRequest) Interface() protoreflect.ProtoMessage { - return (*QueryDenomOwnersRequest)(x) +func (x *fastReflection_QueryDenomOwnersResponse) Interface() protoreflect.ProtoMessage { + return (*QueryDenomOwnersResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -8649,16 +10553,16 @@ func (x *fastReflection_QueryDenomOwnersRequest) Interface() protoreflect.ProtoM // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryDenomOwnersRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Denom != "" { - value := protoreflect.ValueOfString(x.Denom) - if !f(fd_QueryDenomOwnersRequest_denom, value) { +func (x *fastReflection_QueryDenomOwnersResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.DenomOwners) != 0 { + value := protoreflect.ValueOfList(&_QueryDenomOwnersResponse_1_list{list: &x.DenomOwners}) + if !f(fd_QueryDenomOwnersResponse_denom_owners, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryDenomOwnersRequest_pagination, value) { + if !f(fd_QueryDenomOwnersResponse_pagination, value) { return } } @@ -8675,17 +10579,17 @@ func (x *fastReflection_QueryDenomOwnersRequest) Range(f func(protoreflect.Field // 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_QueryDenomOwnersRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryDenomOwnersResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.denom": - return x.Denom != "" - case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.pagination": + case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.denom_owners": + return len(x.DenomOwners) != 0 + case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.pagination": return x.Pagination != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersResponse")) } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersResponse does not contain field %s", fd.FullName())) } } @@ -8695,17 +10599,17 @@ func (x *fastReflection_QueryDenomOwnersRequest) Has(fd protoreflect.FieldDescri // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDenomOwnersRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryDenomOwnersResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.denom": - x.Denom = "" - case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.pagination": + case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.denom_owners": + x.DenomOwners = nil + case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.pagination": x.Pagination = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersResponse")) } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersResponse does not contain field %s", fd.FullName())) } } @@ -8715,19 +10619,22 @@ func (x *fastReflection_QueryDenomOwnersRequest) Clear(fd protoreflect.FieldDesc // 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_QueryDenomOwnersRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryDenomOwnersResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.denom": - value := x.Denom - return protoreflect.ValueOfString(value) - case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.pagination": + case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.denom_owners": + if len(x.DenomOwners) == 0 { + return protoreflect.ValueOfList(&_QueryDenomOwnersResponse_1_list{}) + } + listValue := &_QueryDenomOwnersResponse_1_list{list: &x.DenomOwners} + return protoreflect.ValueOfList(listValue) + case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersResponse")) } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersResponse does not contain field %s", descriptor.FullName())) } } @@ -8741,17 +10648,19 @@ func (x *fastReflection_QueryDenomOwnersRequest) Get(descriptor protoreflect.Fie // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDenomOwnersRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryDenomOwnersResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.denom": - x.Denom = value.Interface().(string) - case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta11.PageRequest) + case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.denom_owners": + lv := value.List() + clv := lv.(*_QueryDenomOwnersResponse_1_list) + x.DenomOwners = *clv.list + case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta11.PageResponse) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersResponse")) } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersResponse does not contain field %s", fd.FullName())) } } @@ -8765,48 +10674,53 @@ func (x *fastReflection_QueryDenomOwnersRequest) Set(fd protoreflect.FieldDescri // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDenomOwnersRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryDenomOwnersResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.pagination": + case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.denom_owners": + if x.DenomOwners == nil { + x.DenomOwners = []*DenomOwner{} + } + value := &_QueryDenomOwnersResponse_1_list{list: &x.DenomOwners} + return protoreflect.ValueOfList(value) + case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.pagination": if x.Pagination == nil { - x.Pagination = new(v1beta11.PageRequest) + x.Pagination = new(v1beta11.PageResponse) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.denom": - panic(fmt.Errorf("field denom of message cosmos.bank.v1beta1.QueryDenomOwnersRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersResponse")) } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersResponse 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_QueryDenomOwnersRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryDenomOwnersResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.denom": - return protoreflect.ValueOfString("") - case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.pagination": - m := new(v1beta11.PageRequest) + case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.denom_owners": + list := []*DenomOwner{} + return protoreflect.ValueOfList(&_QueryDenomOwnersResponse_1_list{list: &list}) + case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.pagination": + m := new(v1beta11.PageResponse) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersResponse")) } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersResponse 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_QueryDenomOwnersRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryDenomOwnersResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.QueryDenomOwnersRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.QueryDenomOwnersResponse", d.FullName())) } panic("unreachable") } @@ -8814,7 +10728,7 @@ func (x *fastReflection_QueryDenomOwnersRequest) WhichOneof(d protoreflect.Oneof // 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_QueryDenomOwnersRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryDenomOwnersResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -8825,7 +10739,7 @@ func (x *fastReflection_QueryDenomOwnersRequest) GetUnknown() protoreflect.RawFi // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDenomOwnersRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryDenomOwnersResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -8837,7 +10751,7 @@ func (x *fastReflection_QueryDenomOwnersRequest) SetUnknown(fields protoreflect. // 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_QueryDenomOwnersRequest) IsValid() bool { +func (x *fastReflection_QueryDenomOwnersResponse) IsValid() bool { return x != nil } @@ -8847,9 +10761,9 @@ func (x *fastReflection_QueryDenomOwnersRequest) 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_QueryDenomOwnersRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryDenomOwnersResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDenomOwnersRequest) + x := input.Message.Interface().(*QueryDenomOwnersResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -8861,9 +10775,11 @@ func (x *fastReflection_QueryDenomOwnersRequest) ProtoMethods() *protoiface.Meth var n int var l int _ = l - l = len(x.Denom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if len(x.DenomOwners) > 0 { + for _, e := range x.DenomOwners { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } } if x.Pagination != nil { l = options.Size(x.Pagination) @@ -8879,7 +10795,7 @@ func (x *fastReflection_QueryDenomOwnersRequest) ProtoMethods() *protoiface.Meth } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryDenomOwnersRequest) + x := input.Message.Interface().(*QueryDenomOwnersResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -8912,12 +10828,21 @@ func (x *fastReflection_QueryDenomOwnersRequest) ProtoMethods() *protoiface.Meth i-- dAtA[i] = 0x12 } - if len(x.Denom) > 0 { - i -= len(x.Denom) - copy(dAtA[i:], x.Denom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) - i-- - dAtA[i] = 0xa + if len(x.DenomOwners) > 0 { + for iNdEx := len(x.DenomOwners) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.DenomOwners[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...) @@ -8930,7 +10855,7 @@ func (x *fastReflection_QueryDenomOwnersRequest) ProtoMethods() *protoiface.Meth }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryDenomOwnersRequest) + x := input.Message.Interface().(*QueryDenomOwnersResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -8962,17 +10887,17 @@ func (x *fastReflection_QueryDenomOwnersRequest) ProtoMethods() *protoiface.Meth fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDenomOwnersRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDenomOwnersResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDenomOwnersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDenomOwnersResponse: 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 Denom", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DenomOwners", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -8982,23 +10907,25 @@ func (x *fastReflection_QueryDenomOwnersRequest) ProtoMethods() *protoiface.Meth } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.Denom = string(dAtA[iNdEx:postIndex]) + x.DenomOwners = append(x.DenomOwners, &DenomOwner{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DenomOwners[len(x.DenomOwners)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } iNdEx = postIndex case 2: if wireType != 2 { @@ -9030,7 +10957,7 @@ func (x *fastReflection_QueryDenomOwnersRequest) ProtoMethods() *protoiface.Meth return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { - x.Pagination = &v1beta11.PageRequest{} + x.Pagination = &v1beta11.PageResponse{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err @@ -9072,28 +10999,28 @@ func (x *fastReflection_QueryDenomOwnersRequest) ProtoMethods() *protoiface.Meth } var ( - md_DenomOwner protoreflect.MessageDescriptor - fd_DenomOwner_address protoreflect.FieldDescriptor - fd_DenomOwner_balance protoreflect.FieldDescriptor + md_QueryDenomOwnersByQueryRequest protoreflect.MessageDescriptor + fd_QueryDenomOwnersByQueryRequest_denom protoreflect.FieldDescriptor + fd_QueryDenomOwnersByQueryRequest_pagination protoreflect.FieldDescriptor ) func init() { file_cosmos_bank_v1beta1_query_proto_init() - md_DenomOwner = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("DenomOwner") - fd_DenomOwner_address = md_DenomOwner.Fields().ByName("address") - fd_DenomOwner_balance = md_DenomOwner.Fields().ByName("balance") + md_QueryDenomOwnersByQueryRequest = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QueryDenomOwnersByQueryRequest") + fd_QueryDenomOwnersByQueryRequest_denom = md_QueryDenomOwnersByQueryRequest.Fields().ByName("denom") + fd_QueryDenomOwnersByQueryRequest_pagination = md_QueryDenomOwnersByQueryRequest.Fields().ByName("pagination") } -var _ protoreflect.Message = (*fastReflection_DenomOwner)(nil) +var _ protoreflect.Message = (*fastReflection_QueryDenomOwnersByQueryRequest)(nil) -type fastReflection_DenomOwner DenomOwner +type fastReflection_QueryDenomOwnersByQueryRequest QueryDenomOwnersByQueryRequest -func (x *DenomOwner) ProtoReflect() protoreflect.Message { - return (*fastReflection_DenomOwner)(x) +func (x *QueryDenomOwnersByQueryRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDenomOwnersByQueryRequest)(x) } -func (x *DenomOwner) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[19] +func (x *QueryDenomOwnersByQueryRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9104,43 +11031,43 @@ func (x *DenomOwner) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_DenomOwner_messageType fastReflection_DenomOwner_messageType -var _ protoreflect.MessageType = fastReflection_DenomOwner_messageType{} +var _fastReflection_QueryDenomOwnersByQueryRequest_messageType fastReflection_QueryDenomOwnersByQueryRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryDenomOwnersByQueryRequest_messageType{} -type fastReflection_DenomOwner_messageType struct{} +type fastReflection_QueryDenomOwnersByQueryRequest_messageType struct{} -func (x fastReflection_DenomOwner_messageType) Zero() protoreflect.Message { - return (*fastReflection_DenomOwner)(nil) +func (x fastReflection_QueryDenomOwnersByQueryRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDenomOwnersByQueryRequest)(nil) } -func (x fastReflection_DenomOwner_messageType) New() protoreflect.Message { - return new(fastReflection_DenomOwner) +func (x fastReflection_QueryDenomOwnersByQueryRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDenomOwnersByQueryRequest) } -func (x fastReflection_DenomOwner_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DenomOwner +func (x fastReflection_QueryDenomOwnersByQueryRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDenomOwnersByQueryRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_DenomOwner) Descriptor() protoreflect.MessageDescriptor { - return md_DenomOwner +func (x *fastReflection_QueryDenomOwnersByQueryRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDenomOwnersByQueryRequest } // 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_DenomOwner) Type() protoreflect.MessageType { - return _fastReflection_DenomOwner_messageType +func (x *fastReflection_QueryDenomOwnersByQueryRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryDenomOwnersByQueryRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_DenomOwner) New() protoreflect.Message { - return new(fastReflection_DenomOwner) +func (x *fastReflection_QueryDenomOwnersByQueryRequest) New() protoreflect.Message { + return new(fastReflection_QueryDenomOwnersByQueryRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_DenomOwner) Interface() protoreflect.ProtoMessage { - return (*DenomOwner)(x) +func (x *fastReflection_QueryDenomOwnersByQueryRequest) Interface() protoreflect.ProtoMessage { + return (*QueryDenomOwnersByQueryRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -9148,16 +11075,16 @@ func (x *fastReflection_DenomOwner) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_DenomOwner) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_DenomOwner_address, value) { +func (x *fastReflection_QueryDenomOwnersByQueryRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Denom != "" { + value := protoreflect.ValueOfString(x.Denom) + if !f(fd_QueryDenomOwnersByQueryRequest_denom, value) { return } } - if x.Balance != nil { - value := protoreflect.ValueOfMessage(x.Balance.ProtoReflect()) - if !f(fd_DenomOwner_balance, value) { + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryDenomOwnersByQueryRequest_pagination, value) { return } } @@ -9174,17 +11101,17 @@ func (x *fastReflection_DenomOwner) Range(f func(protoreflect.FieldDescriptor, p // 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_DenomOwner) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryDenomOwnersByQueryRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "cosmos.bank.v1beta1.DenomOwner.address": - return x.Address != "" - case "cosmos.bank.v1beta1.DenomOwner.balance": - return x.Balance != nil + case "cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.denom": + return x.Denom != "" + case "cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.pagination": + return x.Pagination != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.DenomOwner")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest")) } - panic(fmt.Errorf("message cosmos.bank.v1beta1.DenomOwner does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest does not contain field %s", fd.FullName())) } } @@ -9194,17 +11121,17 @@ func (x *fastReflection_DenomOwner) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DenomOwner) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryDenomOwnersByQueryRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.bank.v1beta1.DenomOwner.address": - x.Address = "" - case "cosmos.bank.v1beta1.DenomOwner.balance": - x.Balance = nil + case "cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.denom": + x.Denom = "" + case "cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.pagination": + x.Pagination = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.DenomOwner")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest")) } - panic(fmt.Errorf("message cosmos.bank.v1beta1.DenomOwner does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest does not contain field %s", fd.FullName())) } } @@ -9214,19 +11141,19 @@ func (x *fastReflection_DenomOwner) Clear(fd protoreflect.FieldDescriptor) { // 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_DenomOwner) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryDenomOwnersByQueryRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.bank.v1beta1.DenomOwner.address": - value := x.Address + case "cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.denom": + value := x.Denom return protoreflect.ValueOfString(value) - case "cosmos.bank.v1beta1.DenomOwner.balance": - value := x.Balance + case "cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.pagination": + value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.DenomOwner")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest")) } - panic(fmt.Errorf("message cosmos.bank.v1beta1.DenomOwner does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest does not contain field %s", descriptor.FullName())) } } @@ -9240,17 +11167,17 @@ func (x *fastReflection_DenomOwner) Get(descriptor protoreflect.FieldDescriptor) // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DenomOwner) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryDenomOwnersByQueryRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.bank.v1beta1.DenomOwner.address": - x.Address = value.Interface().(string) - case "cosmos.bank.v1beta1.DenomOwner.balance": - x.Balance = value.Message().Interface().(*v1beta1.Coin) + case "cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.denom": + x.Denom = value.Interface().(string) + case "cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta11.PageRequest) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.DenomOwner")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest")) } - panic(fmt.Errorf("message cosmos.bank.v1beta1.DenomOwner does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest does not contain field %s", fd.FullName())) } } @@ -9264,48 +11191,48 @@ func (x *fastReflection_DenomOwner) Set(fd protoreflect.FieldDescriptor, value p // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DenomOwner) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryDenomOwnersByQueryRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.bank.v1beta1.DenomOwner.balance": - if x.Balance == nil { - x.Balance = new(v1beta1.Coin) + case "cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta11.PageRequest) } - return protoreflect.ValueOfMessage(x.Balance.ProtoReflect()) - case "cosmos.bank.v1beta1.DenomOwner.address": - panic(fmt.Errorf("field address of message cosmos.bank.v1beta1.DenomOwner is not mutable")) + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + case "cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.denom": + panic(fmt.Errorf("field denom of message cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.DenomOwner")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest")) } - panic(fmt.Errorf("message cosmos.bank.v1beta1.DenomOwner does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest 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_DenomOwner) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryDenomOwnersByQueryRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.bank.v1beta1.DenomOwner.address": + case "cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.denom": return protoreflect.ValueOfString("") - case "cosmos.bank.v1beta1.DenomOwner.balance": - m := new(v1beta1.Coin) + case "cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.pagination": + m := new(v1beta11.PageRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.DenomOwner")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest")) } - panic(fmt.Errorf("message cosmos.bank.v1beta1.DenomOwner does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest 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_DenomOwner) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryDenomOwnersByQueryRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.DenomOwner", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest", d.FullName())) } panic("unreachable") } @@ -9313,7 +11240,7 @@ func (x *fastReflection_DenomOwner) WhichOneof(d protoreflect.OneofDescriptor) p // 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_DenomOwner) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryDenomOwnersByQueryRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -9324,7 +11251,7 @@ func (x *fastReflection_DenomOwner) 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_DenomOwner) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryDenomOwnersByQueryRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -9336,7 +11263,7 @@ func (x *fastReflection_DenomOwner) SetUnknown(fields protoreflect.RawFields) { // 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_DenomOwner) IsValid() bool { +func (x *fastReflection_QueryDenomOwnersByQueryRequest) IsValid() bool { return x != nil } @@ -9346,9 +11273,9 @@ func (x *fastReflection_DenomOwner) 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_DenomOwner) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryDenomOwnersByQueryRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DenomOwner) + x := input.Message.Interface().(*QueryDenomOwnersByQueryRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -9360,12 +11287,12 @@ func (x *fastReflection_DenomOwner) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Address) + l = len(x.Denom) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.Balance != nil { - l = options.Size(x.Balance) + if x.Pagination != nil { + l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { @@ -9378,7 +11305,7 @@ func (x *fastReflection_DenomOwner) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*DenomOwner) + x := input.Message.Interface().(*QueryDenomOwnersByQueryRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -9397,8 +11324,8 @@ func (x *fastReflection_DenomOwner) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Balance != nil { - encoded, err := options.Marshal(x.Balance) + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -9411,10 +11338,10 @@ func (x *fastReflection_DenomOwner) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x12 } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + if len(x.Denom) > 0 { + i -= len(x.Denom) + copy(dAtA[i:], x.Denom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) i-- dAtA[i] = 0xa } @@ -9429,7 +11356,7 @@ func (x *fastReflection_DenomOwner) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*DenomOwner) + x := input.Message.Interface().(*QueryDenomOwnersByQueryRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -9461,15 +11388,15 @@ func (x *fastReflection_DenomOwner) 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: DenomOwner: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDenomOwnersByQueryRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DenomOwner: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDenomOwnersByQueryRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9497,11 +11424,11 @@ func (x *fastReflection_DenomOwner) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Address = string(dAtA[iNdEx:postIndex]) + x.Denom = 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 Balance", wireType) + 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 { @@ -9528,10 +11455,10 @@ func (x *fastReflection_DenomOwner) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Balance == nil { - x.Balance = &v1beta1.Coin{} + if x.Pagination == nil { + x.Pagination = &v1beta11.PageRequest{} } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Balance); err != nil { + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -9570,80 +11497,80 @@ func (x *fastReflection_DenomOwner) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.List = (*_QueryDenomOwnersResponse_1_list)(nil) +var _ protoreflect.List = (*_QueryDenomOwnersByQueryResponse_1_list)(nil) -type _QueryDenomOwnersResponse_1_list struct { +type _QueryDenomOwnersByQueryResponse_1_list struct { list *[]*DenomOwner } -func (x *_QueryDenomOwnersResponse_1_list) Len() int { +func (x *_QueryDenomOwnersByQueryResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_QueryDenomOwnersResponse_1_list) Get(i int) protoreflect.Value { +func (x *_QueryDenomOwnersByQueryResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_QueryDenomOwnersResponse_1_list) Set(i int, value protoreflect.Value) { +func (x *_QueryDenomOwnersByQueryResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*DenomOwner) (*x.list)[i] = concreteValue } -func (x *_QueryDenomOwnersResponse_1_list) Append(value protoreflect.Value) { +func (x *_QueryDenomOwnersByQueryResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*DenomOwner) *x.list = append(*x.list, concreteValue) } -func (x *_QueryDenomOwnersResponse_1_list) AppendMutable() protoreflect.Value { +func (x *_QueryDenomOwnersByQueryResponse_1_list) AppendMutable() protoreflect.Value { v := new(DenomOwner) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_QueryDenomOwnersResponse_1_list) Truncate(n int) { +func (x *_QueryDenomOwnersByQueryResponse_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_QueryDenomOwnersResponse_1_list) NewElement() protoreflect.Value { +func (x *_QueryDenomOwnersByQueryResponse_1_list) NewElement() protoreflect.Value { v := new(DenomOwner) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_QueryDenomOwnersResponse_1_list) IsValid() bool { +func (x *_QueryDenomOwnersByQueryResponse_1_list) IsValid() bool { return x.list != nil } var ( - md_QueryDenomOwnersResponse protoreflect.MessageDescriptor - fd_QueryDenomOwnersResponse_denom_owners protoreflect.FieldDescriptor - fd_QueryDenomOwnersResponse_pagination protoreflect.FieldDescriptor + md_QueryDenomOwnersByQueryResponse protoreflect.MessageDescriptor + fd_QueryDenomOwnersByQueryResponse_denom_owners protoreflect.FieldDescriptor + fd_QueryDenomOwnersByQueryResponse_pagination protoreflect.FieldDescriptor ) func init() { file_cosmos_bank_v1beta1_query_proto_init() - md_QueryDenomOwnersResponse = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QueryDenomOwnersResponse") - fd_QueryDenomOwnersResponse_denom_owners = md_QueryDenomOwnersResponse.Fields().ByName("denom_owners") - fd_QueryDenomOwnersResponse_pagination = md_QueryDenomOwnersResponse.Fields().ByName("pagination") + md_QueryDenomOwnersByQueryResponse = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QueryDenomOwnersByQueryResponse") + fd_QueryDenomOwnersByQueryResponse_denom_owners = md_QueryDenomOwnersByQueryResponse.Fields().ByName("denom_owners") + fd_QueryDenomOwnersByQueryResponse_pagination = md_QueryDenomOwnersByQueryResponse.Fields().ByName("pagination") } -var _ protoreflect.Message = (*fastReflection_QueryDenomOwnersResponse)(nil) +var _ protoreflect.Message = (*fastReflection_QueryDenomOwnersByQueryResponse)(nil) -type fastReflection_QueryDenomOwnersResponse QueryDenomOwnersResponse +type fastReflection_QueryDenomOwnersByQueryResponse QueryDenomOwnersByQueryResponse -func (x *QueryDenomOwnersResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDenomOwnersResponse)(x) +func (x *QueryDenomOwnersByQueryResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDenomOwnersByQueryResponse)(x) } -func (x *QueryDenomOwnersResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[20] +func (x *QueryDenomOwnersByQueryResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9654,43 +11581,43 @@ func (x *QueryDenomOwnersResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryDenomOwnersResponse_messageType fastReflection_QueryDenomOwnersResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryDenomOwnersResponse_messageType{} +var _fastReflection_QueryDenomOwnersByQueryResponse_messageType fastReflection_QueryDenomOwnersByQueryResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryDenomOwnersByQueryResponse_messageType{} -type fastReflection_QueryDenomOwnersResponse_messageType struct{} +type fastReflection_QueryDenomOwnersByQueryResponse_messageType struct{} -func (x fastReflection_QueryDenomOwnersResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDenomOwnersResponse)(nil) +func (x fastReflection_QueryDenomOwnersByQueryResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDenomOwnersByQueryResponse)(nil) } -func (x fastReflection_QueryDenomOwnersResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDenomOwnersResponse) +func (x fastReflection_QueryDenomOwnersByQueryResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDenomOwnersByQueryResponse) } -func (x fastReflection_QueryDenomOwnersResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDenomOwnersResponse +func (x fastReflection_QueryDenomOwnersByQueryResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDenomOwnersByQueryResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryDenomOwnersResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDenomOwnersResponse +func (x *fastReflection_QueryDenomOwnersByQueryResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDenomOwnersByQueryResponse } // 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_QueryDenomOwnersResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryDenomOwnersResponse_messageType +func (x *fastReflection_QueryDenomOwnersByQueryResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryDenomOwnersByQueryResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDenomOwnersResponse) New() protoreflect.Message { - return new(fastReflection_QueryDenomOwnersResponse) +func (x *fastReflection_QueryDenomOwnersByQueryResponse) New() protoreflect.Message { + return new(fastReflection_QueryDenomOwnersByQueryResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDenomOwnersResponse) Interface() protoreflect.ProtoMessage { - return (*QueryDenomOwnersResponse)(x) +func (x *fastReflection_QueryDenomOwnersByQueryResponse) Interface() protoreflect.ProtoMessage { + return (*QueryDenomOwnersByQueryResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -9698,16 +11625,16 @@ func (x *fastReflection_QueryDenomOwnersResponse) Interface() protoreflect.Proto // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryDenomOwnersResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_QueryDenomOwnersByQueryResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.DenomOwners) != 0 { - value := protoreflect.ValueOfList(&_QueryDenomOwnersResponse_1_list{list: &x.DenomOwners}) - if !f(fd_QueryDenomOwnersResponse_denom_owners, value) { + value := protoreflect.ValueOfList(&_QueryDenomOwnersByQueryResponse_1_list{list: &x.DenomOwners}) + if !f(fd_QueryDenomOwnersByQueryResponse_denom_owners, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryDenomOwnersResponse_pagination, value) { + if !f(fd_QueryDenomOwnersByQueryResponse_pagination, value) { return } } @@ -9724,17 +11651,17 @@ func (x *fastReflection_QueryDenomOwnersResponse) Range(f func(protoreflect.Fiel // 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_QueryDenomOwnersResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryDenomOwnersByQueryResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.denom_owners": + case "cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.denom_owners": return len(x.DenomOwners) != 0 - case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.pagination": + case "cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.pagination": return x.Pagination != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse")) } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse does not contain field %s", fd.FullName())) } } @@ -9744,17 +11671,17 @@ func (x *fastReflection_QueryDenomOwnersResponse) Has(fd protoreflect.FieldDescr // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDenomOwnersResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryDenomOwnersByQueryResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.denom_owners": + case "cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.denom_owners": x.DenomOwners = nil - case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.pagination": + case "cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.pagination": x.Pagination = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse")) } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse does not contain field %s", fd.FullName())) } } @@ -9764,22 +11691,22 @@ func (x *fastReflection_QueryDenomOwnersResponse) Clear(fd protoreflect.FieldDes // 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_QueryDenomOwnersResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryDenomOwnersByQueryResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.denom_owners": + case "cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.denom_owners": if len(x.DenomOwners) == 0 { - return protoreflect.ValueOfList(&_QueryDenomOwnersResponse_1_list{}) + return protoreflect.ValueOfList(&_QueryDenomOwnersByQueryResponse_1_list{}) } - listValue := &_QueryDenomOwnersResponse_1_list{list: &x.DenomOwners} + listValue := &_QueryDenomOwnersByQueryResponse_1_list{list: &x.DenomOwners} return protoreflect.ValueOfList(listValue) - case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.pagination": + case "cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse")) } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse does not contain field %s", descriptor.FullName())) } } @@ -9793,19 +11720,19 @@ func (x *fastReflection_QueryDenomOwnersResponse) Get(descriptor protoreflect.Fi // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDenomOwnersResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryDenomOwnersByQueryResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.denom_owners": + case "cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.denom_owners": lv := value.List() - clv := lv.(*_QueryDenomOwnersResponse_1_list) + clv := lv.(*_QueryDenomOwnersByQueryResponse_1_list) x.DenomOwners = *clv.list - case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.pagination": + case "cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.pagination": x.Pagination = value.Message().Interface().(*v1beta11.PageResponse) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse")) } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse does not contain field %s", fd.FullName())) } } @@ -9819,53 +11746,53 @@ func (x *fastReflection_QueryDenomOwnersResponse) Set(fd protoreflect.FieldDescr // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDenomOwnersResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryDenomOwnersByQueryResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.denom_owners": + case "cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.denom_owners": if x.DenomOwners == nil { x.DenomOwners = []*DenomOwner{} } - value := &_QueryDenomOwnersResponse_1_list{list: &x.DenomOwners} + value := &_QueryDenomOwnersByQueryResponse_1_list{list: &x.DenomOwners} return protoreflect.ValueOfList(value) - case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.pagination": + case "cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.pagination": if x.Pagination == nil { x.Pagination = new(v1beta11.PageResponse) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse")) } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse 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_QueryDenomOwnersResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryDenomOwnersByQueryResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.denom_owners": + case "cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.denom_owners": list := []*DenomOwner{} - return protoreflect.ValueOfList(&_QueryDenomOwnersResponse_1_list{list: &list}) - case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.pagination": + return protoreflect.ValueOfList(&_QueryDenomOwnersByQueryResponse_1_list{list: &list}) + case "cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.pagination": m := new(v1beta11.PageResponse) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse")) } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse 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_QueryDenomOwnersResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryDenomOwnersByQueryResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.QueryDenomOwnersResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse", d.FullName())) } panic("unreachable") } @@ -9873,7 +11800,7 @@ func (x *fastReflection_QueryDenomOwnersResponse) WhichOneof(d protoreflect.Oneo // 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_QueryDenomOwnersResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryDenomOwnersByQueryResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -9884,7 +11811,7 @@ func (x *fastReflection_QueryDenomOwnersResponse) GetUnknown() protoreflect.RawF // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDenomOwnersResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryDenomOwnersByQueryResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -9896,7 +11823,7 @@ func (x *fastReflection_QueryDenomOwnersResponse) SetUnknown(fields protoreflect // 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_QueryDenomOwnersResponse) IsValid() bool { +func (x *fastReflection_QueryDenomOwnersByQueryResponse) IsValid() bool { return x != nil } @@ -9906,9 +11833,9 @@ func (x *fastReflection_QueryDenomOwnersResponse) 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_QueryDenomOwnersResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryDenomOwnersByQueryResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDenomOwnersResponse) + x := input.Message.Interface().(*QueryDenomOwnersByQueryResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -9940,7 +11867,7 @@ func (x *fastReflection_QueryDenomOwnersResponse) ProtoMethods() *protoiface.Met } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryDenomOwnersResponse) + x := input.Message.Interface().(*QueryDenomOwnersByQueryResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -10000,7 +11927,7 @@ func (x *fastReflection_QueryDenomOwnersResponse) ProtoMethods() *protoiface.Met }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryDenomOwnersResponse) + x := input.Message.Interface().(*QueryDenomOwnersByQueryResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -10032,10 +11959,10 @@ func (x *fastReflection_QueryDenomOwnersResponse) ProtoMethods() *protoiface.Met fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDenomOwnersResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDenomOwnersByQueryResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDenomOwnersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDenomOwnersByQueryResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -10211,7 +12138,7 @@ func (x *QuerySendEnabledRequest) ProtoReflect() protoreflect.Message { } func (x *QuerySendEnabledRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[21] + mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10777,7 +12704,7 @@ func (x *QuerySendEnabledResponse) ProtoReflect() protoreflect.Message { } func (x *QuerySendEnabledResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[22] + mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11862,6 +13789,7 @@ type QueryParamsResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // params provides the parameters of the bank module. Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` } @@ -12051,6 +13979,82 @@ func (x *QueryDenomMetadataResponse) GetMetadata() *Metadata { return nil } +// QueryDenomMetadataByQueryStringRequest is the request type for the Query/DenomMetadata RPC method. +// Identical with QueryDenomMetadataRequest but receives denom as query string. +type QueryDenomMetadataByQueryStringRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // denom is the coin denom to query the metadata for. + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (x *QueryDenomMetadataByQueryStringRequest) Reset() { + *x = QueryDenomMetadataByQueryStringRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryDenomMetadataByQueryStringRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDenomMetadataByQueryStringRequest) ProtoMessage() {} + +// Deprecated: Use QueryDenomMetadataByQueryStringRequest.ProtoReflect.Descriptor instead. +func (*QueryDenomMetadataByQueryStringRequest) Descriptor() ([]byte, []int) { + return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{18} +} + +func (x *QueryDenomMetadataByQueryStringRequest) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +// QueryDenomMetadataByQueryStringResponse is the response type for the Query/DenomMetadata RPC +// method. Identical with QueryDenomMetadataResponse but receives denom as query string in request. +type QueryDenomMetadataByQueryStringResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // metadata describes and provides all the client information for the requested token. + Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` +} + +func (x *QueryDenomMetadataByQueryStringResponse) Reset() { + *x = QueryDenomMetadataByQueryStringResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryDenomMetadataByQueryStringResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDenomMetadataByQueryStringResponse) ProtoMessage() {} + +// Deprecated: Use QueryDenomMetadataByQueryStringResponse.ProtoReflect.Descriptor instead. +func (*QueryDenomMetadataByQueryStringResponse) Descriptor() ([]byte, []int) { + return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{19} +} + +func (x *QueryDenomMetadataByQueryStringResponse) GetMetadata() *Metadata { + if x != nil { + return x.Metadata + } + return nil +} + // QueryDenomOwnersRequest defines the request type for the DenomOwners RPC query, // which queries for a paginated set of all account holders of a particular // denomination. @@ -12068,7 +14072,7 @@ type QueryDenomOwnersRequest struct { func (x *QueryDenomOwnersRequest) Reset() { *x = QueryDenomOwnersRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[18] + mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12082,7 +14086,7 @@ func (*QueryDenomOwnersRequest) ProtoMessage() {} // Deprecated: Use QueryDenomOwnersRequest.ProtoReflect.Descriptor instead. func (*QueryDenomOwnersRequest) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{18} + return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{20} } func (x *QueryDenomOwnersRequest) GetDenom() string { @@ -12118,7 +14122,7 @@ type DenomOwner struct { func (x *DenomOwner) Reset() { *x = DenomOwner{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[19] + mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12132,7 +14136,7 @@ func (*DenomOwner) ProtoMessage() {} // Deprecated: Use DenomOwner.ProtoReflect.Descriptor instead. func (*DenomOwner) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{19} + return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{21} } func (x *DenomOwner) GetAddress() string { @@ -12165,7 +14169,7 @@ type QueryDenomOwnersResponse struct { func (x *QueryDenomOwnersResponse) Reset() { *x = QueryDenomOwnersResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[20] + mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12179,7 +14183,7 @@ func (*QueryDenomOwnersResponse) ProtoMessage() {} // Deprecated: Use QueryDenomOwnersResponse.ProtoReflect.Descriptor instead. func (*QueryDenomOwnersResponse) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{20} + return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{22} } func (x *QueryDenomOwnersResponse) GetDenomOwners() []*DenomOwner { @@ -12196,6 +14200,103 @@ func (x *QueryDenomOwnersResponse) GetPagination() *v1beta11.PageResponse { return nil } +// QueryDenomOwnersByQueryRequest defines the request type for the DenomOwnersByQuery RPC query, +// which queries for a paginated set of all account holders of a particular +// denomination. +// +// Since: cosmos-sdk 0.50.3 +type QueryDenomOwnersByQueryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // denom defines the coin denomination to query all account holders for. + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *v1beta11.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryDenomOwnersByQueryRequest) Reset() { + *x = QueryDenomOwnersByQueryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryDenomOwnersByQueryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDenomOwnersByQueryRequest) ProtoMessage() {} + +// Deprecated: Use QueryDenomOwnersByQueryRequest.ProtoReflect.Descriptor instead. +func (*QueryDenomOwnersByQueryRequest) Descriptor() ([]byte, []int) { + return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{23} +} + +func (x *QueryDenomOwnersByQueryRequest) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +func (x *QueryDenomOwnersByQueryRequest) GetPagination() *v1beta11.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryDenomOwnersByQueryResponse defines the RPC response of a DenomOwnersByQuery RPC query. +// +// Since: cosmos-sdk 0.50.3 +type QueryDenomOwnersByQueryResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DenomOwners []*DenomOwner `protobuf:"bytes,1,rep,name=denom_owners,json=denomOwners,proto3" json:"denom_owners,omitempty"` + // pagination defines the pagination in the response. + Pagination *v1beta11.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryDenomOwnersByQueryResponse) Reset() { + *x = QueryDenomOwnersByQueryResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryDenomOwnersByQueryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDenomOwnersByQueryResponse) ProtoMessage() {} + +// Deprecated: Use QueryDenomOwnersByQueryResponse.ProtoReflect.Descriptor instead. +func (*QueryDenomOwnersByQueryResponse) Descriptor() ([]byte, []int) { + return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{24} +} + +func (x *QueryDenomOwnersByQueryResponse) GetDenomOwners() []*DenomOwner { + if x != nil { + return x.DenomOwners + } + return nil +} + +func (x *QueryDenomOwnersByQueryResponse) GetPagination() *v1beta11.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + // QuerySendEnabledRequest defines the RPC request for looking up SendEnabled entries. // // Since: cosmos-sdk 0.47 @@ -12214,7 +14315,7 @@ type QuerySendEnabledRequest struct { func (x *QuerySendEnabledRequest) Reset() { *x = QuerySendEnabledRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[21] + mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12228,7 +14329,7 @@ func (*QuerySendEnabledRequest) ProtoMessage() {} // Deprecated: Use QuerySendEnabledRequest.ProtoReflect.Descriptor instead. func (*QuerySendEnabledRequest) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{21} + return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{25} } func (x *QuerySendEnabledRequest) GetDenoms() []string { @@ -12262,7 +14363,7 @@ type QuerySendEnabledResponse struct { func (x *QuerySendEnabledResponse) Reset() { *x = QuerySendEnabledResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[22] + mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12276,7 +14377,7 @@ func (*QuerySendEnabledResponse) ProtoMessage() {} // Deprecated: Use QuerySendEnabledResponse.ProtoReflect.Descriptor instead. func (*QuerySendEnabledResponse) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{22} + return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{26} } func (x *QuerySendEnabledResponse) GetSendEnabled() []*SendEnabled { @@ -12453,180 +14554,236 @@ var file_cosmos_bank_v1beta1_query_proto_rawDesc = []byte{ 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, - 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x77, - 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, 0x65, - 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, - 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, - 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x80, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6e, 0x6f, - 0x6d, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3e, 0x0a, 0x07, 0x62, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, - 0x01, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0xa7, 0x01, 0x0a, 0x18, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0c, 0x64, 0x65, 0x6e, 0x6f, 0x6d, - 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x0b, - 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x79, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x6e, - 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x06, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x63, 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, - 0xa8, 0x01, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x6e, 0x64, 0x45, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x0c, - 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x45, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x52, 0x0b, 0x73, 0x65, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x63, 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, 0xb2, 0x0e, 0x0a, 0x05, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x12, 0x9d, 0x01, 0x0a, 0x07, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x61, - 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x32, 0x12, 0x30, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x6e, 0x6b, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x73, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x62, 0x79, 0x5f, 0x64, - 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0xa0, 0x01, 0x0a, 0x0b, 0x41, 0x6c, 0x6c, 0x42, 0x61, 0x6c, 0x61, - 0x6e, 0x63, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x41, 0x6c, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, - 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 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, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xbc, 0x01, 0x0a, 0x11, 0x53, 0x70, 0x65, 0x6e, - 0x64, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x32, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, - 0x6c, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x70, 0x65, - 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x6e, - 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xd7, 0x01, 0x0a, 0x17, 0x53, 0x70, 0x65, 0x6e, 0x64, - 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x79, 0x44, 0x65, 0x6e, - 0x6f, 0x6d, 0x12, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x70, - 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x79, - 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x63, + 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3e, + 0x0a, 0x26, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x42, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, + 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x6f, + 0x0a, 0x27, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x42, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, + 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, + 0x77, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, + 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, + 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x80, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6e, + 0x6f, 0x6d, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3e, 0x0a, 0x07, 0x62, + 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0xa7, 0x01, 0x0a, 0x18, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0c, 0x64, 0x65, 0x6e, 0x6f, + 0x6d, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, + 0x0b, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x47, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7e, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, + 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x42, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x46, 0x0a, + 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xae, 0x01, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, + 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x42, 0x79, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0c, 0x64, 0x65, 0x6e, + 0x6f, 0x6d, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, 0x65, 0x72, + 0x52, 0x0b, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x47, 0x0a, + 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x79, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, + 0x65, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x06, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x63, 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, 0xa8, 0x01, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x6e, 0x64, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, + 0x0a, 0x0c, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, + 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x0b, 0x73, 0x65, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x63, 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, 0xca, 0x11, 0x0a, + 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x9d, 0x01, 0x0a, 0x07, 0x42, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, - 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x47, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x3c, 0x12, 0x3a, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, - 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x70, 0x65, 0x6e, 0x64, - 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x62, 0x79, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, - 0x12, 0x94, 0x01, 0x0a, 0x0b, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, - 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x6f, 0x74, 0x61, - 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, + 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x62, 0x79, + 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0xa0, 0x01, 0x0a, 0x0b, 0x41, 0x6c, 0x6c, 0x42, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, + 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x41, 0x6c, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 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, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, + 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xbc, 0x01, 0x0a, 0x11, 0x53, 0x70, + 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, + 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x70, 0x65, 0x6e, 0x64, + 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, + 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, + 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, + 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x70, 0x65, 0x6e, + 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x7b, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xd7, 0x01, 0x0a, 0x17, 0x53, 0x70, 0x65, + 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x79, 0x44, + 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, + 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x53, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x42, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, - 0x75, 0x70, 0x70, 0x6c, 0x79, 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, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x61, + 0x62, 0x6c, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x79, 0x44, 0x65, 0x6e, 0x6f, + 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x47, 0x88, 0xe7, 0xb0, 0x2a, 0x01, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x12, 0x3a, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x70, 0x65, + 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, + 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x62, 0x79, 0x5f, 0x64, 0x65, 0x6e, + 0x6f, 0x6d, 0x12, 0x94, 0x01, 0x0a, 0x0b, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, + 0x6c, 0x79, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x6f, + 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x6f, 0x74, 0x61, + 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 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, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x94, 0x01, 0x0a, 0x08, 0x53, 0x75, + 0x70, 0x70, 0x6c, 0x79, 0x4f, 0x66, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x4f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x75, 0x70, + 0x70, 0x6c, 0x79, 0x4f, 0x66, 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, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x94, 0x01, 0x0a, 0x08, 0x53, 0x75, 0x70, 0x70, - 0x6c, 0x79, 0x4f, 0x66, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, + 0x2f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x2f, 0x62, 0x79, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, + 0x12, 0x85, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x27, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 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, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x4f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x75, 0x70, 0x70, 0x6c, - 0x79, 0x4f, 0x66, 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, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, - 0x75, 0x70, 0x70, 0x6c, 0x79, 0x2f, 0x62, 0x79, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x85, - 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 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, 0x62, 0x61, 0x6e, 0x6b, - 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, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0xab, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6e, 0x6f, 0x6d, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 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, - 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x6e, - 0x6f, 0x6d, 0x73, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x7b, 0x64, 0x65, - 0x6e, 0x6f, 0x6d, 0x7d, 0x12, 0xa6, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 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, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0xab, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6e, + 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 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, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, + 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x7b, + 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x7d, 0x12, 0xda, 0x01, 0x0a, 0x1a, 0x44, 0x65, 0x6e, 0x6f, 0x6d, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x3b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, + 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x79, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, + 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x79, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x41, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x5f, 0x62, 0x79, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x12, 0xa6, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x61, 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, + 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x6e, + 0x6f, 0x6d, 0x73, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xa2, 0x01, 0x0a, + 0x0b, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x2c, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, 0x65, 0x72, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x88, 0xe7, 0xb0, 0x2a, 0x01, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x6e, + 0x6f, 0x6d, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x6e, 0x6f, 0x6d, + 0x7d, 0x12, 0xb8, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, 0x65, 0x72, + 0x73, 0x42, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 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, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, - 0x6e, 0x6f, 0x6d, 0x73, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xa2, 0x01, - 0x0a, 0x0b, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x2c, 0x2e, + 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x42, + 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, - 0x6e, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, 0x65, - 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x88, 0xe7, 0xb0, 0x2a, - 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, - 0x6e, 0x6f, 0x6d, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x6e, 0x6f, - 0x6d, 0x7d, 0x12, 0x9a, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, - 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x6e, 0x64, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2e, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, - 0xc5, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x6e, 0x6b, 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, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, - 0x62, 0x61, 0x6e, 0x6b, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x42, - 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x6e, 0x6b, 0x2e, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x42, 0x61, 0x6e, 0x6b, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x6e, 0x6b, 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, 0x42, 0x61, 0x6e, 0x6b, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x65, 0x72, 0x73, 0x42, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x37, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, + 0x12, 0x2a, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x5f, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x9a, 0x01, 0x0a, + 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x2c, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x88, 0xe7, 0xb0, 0x2a, 0x01, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x6e, + 0x64, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, 0xc5, 0x01, 0x0a, 0x17, 0x63, 0x6f, + 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 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, 0x62, 0x61, 0x6e, + 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x62, 0x61, 0x6e, 0x6b, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x42, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x6e, 0x6b, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x6e, 0x6b, 0x5c, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5c, 0x42, 0x61, 0x6e, 0x6b, 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, 0x42, 0x61, 0x6e, 0x6b, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -12641,90 +14798,102 @@ func file_cosmos_bank_v1beta1_query_proto_rawDescGZIP() []byte { return file_cosmos_bank_v1beta1_query_proto_rawDescData } -var file_cosmos_bank_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 23) +var file_cosmos_bank_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 27) var file_cosmos_bank_v1beta1_query_proto_goTypes = []interface{}{ - (*QueryBalanceRequest)(nil), // 0: cosmos.bank.v1beta1.QueryBalanceRequest - (*QueryBalanceResponse)(nil), // 1: cosmos.bank.v1beta1.QueryBalanceResponse - (*QueryAllBalancesRequest)(nil), // 2: cosmos.bank.v1beta1.QueryAllBalancesRequest - (*QueryAllBalancesResponse)(nil), // 3: cosmos.bank.v1beta1.QueryAllBalancesResponse - (*QuerySpendableBalancesRequest)(nil), // 4: cosmos.bank.v1beta1.QuerySpendableBalancesRequest - (*QuerySpendableBalancesResponse)(nil), // 5: cosmos.bank.v1beta1.QuerySpendableBalancesResponse - (*QuerySpendableBalanceByDenomRequest)(nil), // 6: cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest - (*QuerySpendableBalanceByDenomResponse)(nil), // 7: cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse - (*QueryTotalSupplyRequest)(nil), // 8: cosmos.bank.v1beta1.QueryTotalSupplyRequest - (*QueryTotalSupplyResponse)(nil), // 9: cosmos.bank.v1beta1.QueryTotalSupplyResponse - (*QuerySupplyOfRequest)(nil), // 10: cosmos.bank.v1beta1.QuerySupplyOfRequest - (*QuerySupplyOfResponse)(nil), // 11: cosmos.bank.v1beta1.QuerySupplyOfResponse - (*QueryParamsRequest)(nil), // 12: cosmos.bank.v1beta1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 13: cosmos.bank.v1beta1.QueryParamsResponse - (*QueryDenomsMetadataRequest)(nil), // 14: cosmos.bank.v1beta1.QueryDenomsMetadataRequest - (*QueryDenomsMetadataResponse)(nil), // 15: cosmos.bank.v1beta1.QueryDenomsMetadataResponse - (*QueryDenomMetadataRequest)(nil), // 16: cosmos.bank.v1beta1.QueryDenomMetadataRequest - (*QueryDenomMetadataResponse)(nil), // 17: cosmos.bank.v1beta1.QueryDenomMetadataResponse - (*QueryDenomOwnersRequest)(nil), // 18: cosmos.bank.v1beta1.QueryDenomOwnersRequest - (*DenomOwner)(nil), // 19: cosmos.bank.v1beta1.DenomOwner - (*QueryDenomOwnersResponse)(nil), // 20: cosmos.bank.v1beta1.QueryDenomOwnersResponse - (*QuerySendEnabledRequest)(nil), // 21: cosmos.bank.v1beta1.QuerySendEnabledRequest - (*QuerySendEnabledResponse)(nil), // 22: cosmos.bank.v1beta1.QuerySendEnabledResponse - (*v1beta1.Coin)(nil), // 23: cosmos.base.v1beta1.Coin - (*v1beta11.PageRequest)(nil), // 24: cosmos.base.query.v1beta1.PageRequest - (*v1beta11.PageResponse)(nil), // 25: cosmos.base.query.v1beta1.PageResponse - (*Params)(nil), // 26: cosmos.bank.v1beta1.Params - (*Metadata)(nil), // 27: cosmos.bank.v1beta1.Metadata - (*SendEnabled)(nil), // 28: cosmos.bank.v1beta1.SendEnabled + (*QueryBalanceRequest)(nil), // 0: cosmos.bank.v1beta1.QueryBalanceRequest + (*QueryBalanceResponse)(nil), // 1: cosmos.bank.v1beta1.QueryBalanceResponse + (*QueryAllBalancesRequest)(nil), // 2: cosmos.bank.v1beta1.QueryAllBalancesRequest + (*QueryAllBalancesResponse)(nil), // 3: cosmos.bank.v1beta1.QueryAllBalancesResponse + (*QuerySpendableBalancesRequest)(nil), // 4: cosmos.bank.v1beta1.QuerySpendableBalancesRequest + (*QuerySpendableBalancesResponse)(nil), // 5: cosmos.bank.v1beta1.QuerySpendableBalancesResponse + (*QuerySpendableBalanceByDenomRequest)(nil), // 6: cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest + (*QuerySpendableBalanceByDenomResponse)(nil), // 7: cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse + (*QueryTotalSupplyRequest)(nil), // 8: cosmos.bank.v1beta1.QueryTotalSupplyRequest + (*QueryTotalSupplyResponse)(nil), // 9: cosmos.bank.v1beta1.QueryTotalSupplyResponse + (*QuerySupplyOfRequest)(nil), // 10: cosmos.bank.v1beta1.QuerySupplyOfRequest + (*QuerySupplyOfResponse)(nil), // 11: cosmos.bank.v1beta1.QuerySupplyOfResponse + (*QueryParamsRequest)(nil), // 12: cosmos.bank.v1beta1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 13: cosmos.bank.v1beta1.QueryParamsResponse + (*QueryDenomsMetadataRequest)(nil), // 14: cosmos.bank.v1beta1.QueryDenomsMetadataRequest + (*QueryDenomsMetadataResponse)(nil), // 15: cosmos.bank.v1beta1.QueryDenomsMetadataResponse + (*QueryDenomMetadataRequest)(nil), // 16: cosmos.bank.v1beta1.QueryDenomMetadataRequest + (*QueryDenomMetadataResponse)(nil), // 17: cosmos.bank.v1beta1.QueryDenomMetadataResponse + (*QueryDenomMetadataByQueryStringRequest)(nil), // 18: cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest + (*QueryDenomMetadataByQueryStringResponse)(nil), // 19: cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse + (*QueryDenomOwnersRequest)(nil), // 20: cosmos.bank.v1beta1.QueryDenomOwnersRequest + (*DenomOwner)(nil), // 21: cosmos.bank.v1beta1.DenomOwner + (*QueryDenomOwnersResponse)(nil), // 22: cosmos.bank.v1beta1.QueryDenomOwnersResponse + (*QueryDenomOwnersByQueryRequest)(nil), // 23: cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest + (*QueryDenomOwnersByQueryResponse)(nil), // 24: cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse + (*QuerySendEnabledRequest)(nil), // 25: cosmos.bank.v1beta1.QuerySendEnabledRequest + (*QuerySendEnabledResponse)(nil), // 26: cosmos.bank.v1beta1.QuerySendEnabledResponse + (*v1beta1.Coin)(nil), // 27: cosmos.base.v1beta1.Coin + (*v1beta11.PageRequest)(nil), // 28: cosmos.base.query.v1beta1.PageRequest + (*v1beta11.PageResponse)(nil), // 29: cosmos.base.query.v1beta1.PageResponse + (*Params)(nil), // 30: cosmos.bank.v1beta1.Params + (*Metadata)(nil), // 31: cosmos.bank.v1beta1.Metadata + (*SendEnabled)(nil), // 32: cosmos.bank.v1beta1.SendEnabled } var file_cosmos_bank_v1beta1_query_proto_depIdxs = []int32{ - 23, // 0: cosmos.bank.v1beta1.QueryBalanceResponse.balance:type_name -> cosmos.base.v1beta1.Coin - 24, // 1: cosmos.bank.v1beta1.QueryAllBalancesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 23, // 2: cosmos.bank.v1beta1.QueryAllBalancesResponse.balances:type_name -> cosmos.base.v1beta1.Coin - 25, // 3: cosmos.bank.v1beta1.QueryAllBalancesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 24, // 4: cosmos.bank.v1beta1.QuerySpendableBalancesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 23, // 5: cosmos.bank.v1beta1.QuerySpendableBalancesResponse.balances:type_name -> cosmos.base.v1beta1.Coin - 25, // 6: cosmos.bank.v1beta1.QuerySpendableBalancesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 23, // 7: cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse.balance:type_name -> cosmos.base.v1beta1.Coin - 24, // 8: cosmos.bank.v1beta1.QueryTotalSupplyRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 23, // 9: cosmos.bank.v1beta1.QueryTotalSupplyResponse.supply:type_name -> cosmos.base.v1beta1.Coin - 25, // 10: cosmos.bank.v1beta1.QueryTotalSupplyResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 23, // 11: cosmos.bank.v1beta1.QuerySupplyOfResponse.amount:type_name -> cosmos.base.v1beta1.Coin - 26, // 12: cosmos.bank.v1beta1.QueryParamsResponse.params:type_name -> cosmos.bank.v1beta1.Params - 24, // 13: cosmos.bank.v1beta1.QueryDenomsMetadataRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 27, // 14: cosmos.bank.v1beta1.QueryDenomsMetadataResponse.metadatas:type_name -> cosmos.bank.v1beta1.Metadata - 25, // 15: cosmos.bank.v1beta1.QueryDenomsMetadataResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 27, // 16: cosmos.bank.v1beta1.QueryDenomMetadataResponse.metadata:type_name -> cosmos.bank.v1beta1.Metadata - 24, // 17: cosmos.bank.v1beta1.QueryDenomOwnersRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 23, // 18: cosmos.bank.v1beta1.DenomOwner.balance:type_name -> cosmos.base.v1beta1.Coin - 19, // 19: cosmos.bank.v1beta1.QueryDenomOwnersResponse.denom_owners:type_name -> cosmos.bank.v1beta1.DenomOwner - 25, // 20: cosmos.bank.v1beta1.QueryDenomOwnersResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 24, // 21: cosmos.bank.v1beta1.QuerySendEnabledRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 28, // 22: cosmos.bank.v1beta1.QuerySendEnabledResponse.send_enabled:type_name -> cosmos.bank.v1beta1.SendEnabled - 25, // 23: cosmos.bank.v1beta1.QuerySendEnabledResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 0, // 24: cosmos.bank.v1beta1.Query.Balance:input_type -> cosmos.bank.v1beta1.QueryBalanceRequest - 2, // 25: cosmos.bank.v1beta1.Query.AllBalances:input_type -> cosmos.bank.v1beta1.QueryAllBalancesRequest - 4, // 26: cosmos.bank.v1beta1.Query.SpendableBalances:input_type -> cosmos.bank.v1beta1.QuerySpendableBalancesRequest - 6, // 27: cosmos.bank.v1beta1.Query.SpendableBalanceByDenom:input_type -> cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest - 8, // 28: cosmos.bank.v1beta1.Query.TotalSupply:input_type -> cosmos.bank.v1beta1.QueryTotalSupplyRequest - 10, // 29: cosmos.bank.v1beta1.Query.SupplyOf:input_type -> cosmos.bank.v1beta1.QuerySupplyOfRequest - 12, // 30: cosmos.bank.v1beta1.Query.Params:input_type -> cosmos.bank.v1beta1.QueryParamsRequest - 16, // 31: cosmos.bank.v1beta1.Query.DenomMetadata:input_type -> cosmos.bank.v1beta1.QueryDenomMetadataRequest - 14, // 32: cosmos.bank.v1beta1.Query.DenomsMetadata:input_type -> cosmos.bank.v1beta1.QueryDenomsMetadataRequest - 18, // 33: cosmos.bank.v1beta1.Query.DenomOwners:input_type -> cosmos.bank.v1beta1.QueryDenomOwnersRequest - 21, // 34: cosmos.bank.v1beta1.Query.SendEnabled:input_type -> cosmos.bank.v1beta1.QuerySendEnabledRequest - 1, // 35: cosmos.bank.v1beta1.Query.Balance:output_type -> cosmos.bank.v1beta1.QueryBalanceResponse - 3, // 36: cosmos.bank.v1beta1.Query.AllBalances:output_type -> cosmos.bank.v1beta1.QueryAllBalancesResponse - 5, // 37: cosmos.bank.v1beta1.Query.SpendableBalances:output_type -> cosmos.bank.v1beta1.QuerySpendableBalancesResponse - 7, // 38: cosmos.bank.v1beta1.Query.SpendableBalanceByDenom:output_type -> cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse - 9, // 39: cosmos.bank.v1beta1.Query.TotalSupply:output_type -> cosmos.bank.v1beta1.QueryTotalSupplyResponse - 11, // 40: cosmos.bank.v1beta1.Query.SupplyOf:output_type -> cosmos.bank.v1beta1.QuerySupplyOfResponse - 13, // 41: cosmos.bank.v1beta1.Query.Params:output_type -> cosmos.bank.v1beta1.QueryParamsResponse - 17, // 42: cosmos.bank.v1beta1.Query.DenomMetadata:output_type -> cosmos.bank.v1beta1.QueryDenomMetadataResponse - 15, // 43: cosmos.bank.v1beta1.Query.DenomsMetadata:output_type -> cosmos.bank.v1beta1.QueryDenomsMetadataResponse - 20, // 44: cosmos.bank.v1beta1.Query.DenomOwners:output_type -> cosmos.bank.v1beta1.QueryDenomOwnersResponse - 22, // 45: cosmos.bank.v1beta1.Query.SendEnabled:output_type -> cosmos.bank.v1beta1.QuerySendEnabledResponse - 35, // [35:46] is the sub-list for method output_type - 24, // [24:35] is the sub-list for method input_type - 24, // [24:24] is the sub-list for extension type_name - 24, // [24:24] is the sub-list for extension extendee - 0, // [0:24] is the sub-list for field type_name + 27, // 0: cosmos.bank.v1beta1.QueryBalanceResponse.balance:type_name -> cosmos.base.v1beta1.Coin + 28, // 1: cosmos.bank.v1beta1.QueryAllBalancesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 27, // 2: cosmos.bank.v1beta1.QueryAllBalancesResponse.balances:type_name -> cosmos.base.v1beta1.Coin + 29, // 3: cosmos.bank.v1beta1.QueryAllBalancesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 28, // 4: cosmos.bank.v1beta1.QuerySpendableBalancesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 27, // 5: cosmos.bank.v1beta1.QuerySpendableBalancesResponse.balances:type_name -> cosmos.base.v1beta1.Coin + 29, // 6: cosmos.bank.v1beta1.QuerySpendableBalancesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 27, // 7: cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse.balance:type_name -> cosmos.base.v1beta1.Coin + 28, // 8: cosmos.bank.v1beta1.QueryTotalSupplyRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 27, // 9: cosmos.bank.v1beta1.QueryTotalSupplyResponse.supply:type_name -> cosmos.base.v1beta1.Coin + 29, // 10: cosmos.bank.v1beta1.QueryTotalSupplyResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 27, // 11: cosmos.bank.v1beta1.QuerySupplyOfResponse.amount:type_name -> cosmos.base.v1beta1.Coin + 30, // 12: cosmos.bank.v1beta1.QueryParamsResponse.params:type_name -> cosmos.bank.v1beta1.Params + 28, // 13: cosmos.bank.v1beta1.QueryDenomsMetadataRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 31, // 14: cosmos.bank.v1beta1.QueryDenomsMetadataResponse.metadatas:type_name -> cosmos.bank.v1beta1.Metadata + 29, // 15: cosmos.bank.v1beta1.QueryDenomsMetadataResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 31, // 16: cosmos.bank.v1beta1.QueryDenomMetadataResponse.metadata:type_name -> cosmos.bank.v1beta1.Metadata + 31, // 17: cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse.metadata:type_name -> cosmos.bank.v1beta1.Metadata + 28, // 18: cosmos.bank.v1beta1.QueryDenomOwnersRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 27, // 19: cosmos.bank.v1beta1.DenomOwner.balance:type_name -> cosmos.base.v1beta1.Coin + 21, // 20: cosmos.bank.v1beta1.QueryDenomOwnersResponse.denom_owners:type_name -> cosmos.bank.v1beta1.DenomOwner + 29, // 21: cosmos.bank.v1beta1.QueryDenomOwnersResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 28, // 22: cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 21, // 23: cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.denom_owners:type_name -> cosmos.bank.v1beta1.DenomOwner + 29, // 24: cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 28, // 25: cosmos.bank.v1beta1.QuerySendEnabledRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 32, // 26: cosmos.bank.v1beta1.QuerySendEnabledResponse.send_enabled:type_name -> cosmos.bank.v1beta1.SendEnabled + 29, // 27: cosmos.bank.v1beta1.QuerySendEnabledResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 0, // 28: cosmos.bank.v1beta1.Query.Balance:input_type -> cosmos.bank.v1beta1.QueryBalanceRequest + 2, // 29: cosmos.bank.v1beta1.Query.AllBalances:input_type -> cosmos.bank.v1beta1.QueryAllBalancesRequest + 4, // 30: cosmos.bank.v1beta1.Query.SpendableBalances:input_type -> cosmos.bank.v1beta1.QuerySpendableBalancesRequest + 6, // 31: cosmos.bank.v1beta1.Query.SpendableBalanceByDenom:input_type -> cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest + 8, // 32: cosmos.bank.v1beta1.Query.TotalSupply:input_type -> cosmos.bank.v1beta1.QueryTotalSupplyRequest + 10, // 33: cosmos.bank.v1beta1.Query.SupplyOf:input_type -> cosmos.bank.v1beta1.QuerySupplyOfRequest + 12, // 34: cosmos.bank.v1beta1.Query.Params:input_type -> cosmos.bank.v1beta1.QueryParamsRequest + 16, // 35: cosmos.bank.v1beta1.Query.DenomMetadata:input_type -> cosmos.bank.v1beta1.QueryDenomMetadataRequest + 18, // 36: cosmos.bank.v1beta1.Query.DenomMetadataByQueryString:input_type -> cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest + 14, // 37: cosmos.bank.v1beta1.Query.DenomsMetadata:input_type -> cosmos.bank.v1beta1.QueryDenomsMetadataRequest + 20, // 38: cosmos.bank.v1beta1.Query.DenomOwners:input_type -> cosmos.bank.v1beta1.QueryDenomOwnersRequest + 23, // 39: cosmos.bank.v1beta1.Query.DenomOwnersByQuery:input_type -> cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest + 25, // 40: cosmos.bank.v1beta1.Query.SendEnabled:input_type -> cosmos.bank.v1beta1.QuerySendEnabledRequest + 1, // 41: cosmos.bank.v1beta1.Query.Balance:output_type -> cosmos.bank.v1beta1.QueryBalanceResponse + 3, // 42: cosmos.bank.v1beta1.Query.AllBalances:output_type -> cosmos.bank.v1beta1.QueryAllBalancesResponse + 5, // 43: cosmos.bank.v1beta1.Query.SpendableBalances:output_type -> cosmos.bank.v1beta1.QuerySpendableBalancesResponse + 7, // 44: cosmos.bank.v1beta1.Query.SpendableBalanceByDenom:output_type -> cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse + 9, // 45: cosmos.bank.v1beta1.Query.TotalSupply:output_type -> cosmos.bank.v1beta1.QueryTotalSupplyResponse + 11, // 46: cosmos.bank.v1beta1.Query.SupplyOf:output_type -> cosmos.bank.v1beta1.QuerySupplyOfResponse + 13, // 47: cosmos.bank.v1beta1.Query.Params:output_type -> cosmos.bank.v1beta1.QueryParamsResponse + 17, // 48: cosmos.bank.v1beta1.Query.DenomMetadata:output_type -> cosmos.bank.v1beta1.QueryDenomMetadataResponse + 19, // 49: cosmos.bank.v1beta1.Query.DenomMetadataByQueryString:output_type -> cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse + 15, // 50: cosmos.bank.v1beta1.Query.DenomsMetadata:output_type -> cosmos.bank.v1beta1.QueryDenomsMetadataResponse + 22, // 51: cosmos.bank.v1beta1.Query.DenomOwners:output_type -> cosmos.bank.v1beta1.QueryDenomOwnersResponse + 24, // 52: cosmos.bank.v1beta1.Query.DenomOwnersByQuery:output_type -> cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse + 26, // 53: cosmos.bank.v1beta1.Query.SendEnabled:output_type -> cosmos.bank.v1beta1.QuerySendEnabledResponse + 41, // [41:54] is the sub-list for method output_type + 28, // [28:41] is the sub-list for method input_type + 28, // [28:28] is the sub-list for extension type_name + 28, // [28:28] is the sub-list for extension extendee + 0, // [0:28] is the sub-list for field type_name } func init() { file_cosmos_bank_v1beta1_query_proto_init() } @@ -12951,7 +15120,7 @@ func file_cosmos_bank_v1beta1_query_proto_init() { } } file_cosmos_bank_v1beta1_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDenomOwnersRequest); i { + switch v := v.(*QueryDenomMetadataByQueryStringRequest); i { case 0: return &v.state case 1: @@ -12963,7 +15132,7 @@ func file_cosmos_bank_v1beta1_query_proto_init() { } } file_cosmos_bank_v1beta1_query_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DenomOwner); i { + switch v := v.(*QueryDenomMetadataByQueryStringResponse); i { case 0: return &v.state case 1: @@ -12975,7 +15144,7 @@ func file_cosmos_bank_v1beta1_query_proto_init() { } } file_cosmos_bank_v1beta1_query_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDenomOwnersResponse); i { + switch v := v.(*QueryDenomOwnersRequest); i { case 0: return &v.state case 1: @@ -12987,7 +15156,7 @@ func file_cosmos_bank_v1beta1_query_proto_init() { } } file_cosmos_bank_v1beta1_query_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuerySendEnabledRequest); i { + switch v := v.(*DenomOwner); i { case 0: return &v.state case 1: @@ -12999,6 +15168,54 @@ func file_cosmos_bank_v1beta1_query_proto_init() { } } file_cosmos_bank_v1beta1_query_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDenomOwnersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_bank_v1beta1_query_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDenomOwnersByQueryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_bank_v1beta1_query_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDenomOwnersByQueryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_bank_v1beta1_query_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuerySendEnabledRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_bank_v1beta1_query_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QuerySendEnabledResponse); i { case 0: return &v.state @@ -13017,7 +15234,7 @@ func file_cosmos_bank_v1beta1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_bank_v1beta1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 23, + NumMessages: 27, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/bank/v1beta1/query_grpc.pb.go b/api/cosmos/bank/v1beta1/query_grpc.pb.go index b2ed57bcf205..d22562e99fd9 100644 --- a/api/cosmos/bank/v1beta1/query_grpc.pb.go +++ b/api/cosmos/bank/v1beta1/query_grpc.pb.go @@ -19,17 +19,19 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Query_Balance_FullMethodName = "/cosmos.bank.v1beta1.Query/Balance" - Query_AllBalances_FullMethodName = "/cosmos.bank.v1beta1.Query/AllBalances" - Query_SpendableBalances_FullMethodName = "/cosmos.bank.v1beta1.Query/SpendableBalances" - Query_SpendableBalanceByDenom_FullMethodName = "/cosmos.bank.v1beta1.Query/SpendableBalanceByDenom" - Query_TotalSupply_FullMethodName = "/cosmos.bank.v1beta1.Query/TotalSupply" - Query_SupplyOf_FullMethodName = "/cosmos.bank.v1beta1.Query/SupplyOf" - Query_Params_FullMethodName = "/cosmos.bank.v1beta1.Query/Params" - Query_DenomMetadata_FullMethodName = "/cosmos.bank.v1beta1.Query/DenomMetadata" - Query_DenomsMetadata_FullMethodName = "/cosmos.bank.v1beta1.Query/DenomsMetadata" - Query_DenomOwners_FullMethodName = "/cosmos.bank.v1beta1.Query/DenomOwners" - Query_SendEnabled_FullMethodName = "/cosmos.bank.v1beta1.Query/SendEnabled" + Query_Balance_FullMethodName = "/cosmos.bank.v1beta1.Query/Balance" + Query_AllBalances_FullMethodName = "/cosmos.bank.v1beta1.Query/AllBalances" + Query_SpendableBalances_FullMethodName = "/cosmos.bank.v1beta1.Query/SpendableBalances" + Query_SpendableBalanceByDenom_FullMethodName = "/cosmos.bank.v1beta1.Query/SpendableBalanceByDenom" + Query_TotalSupply_FullMethodName = "/cosmos.bank.v1beta1.Query/TotalSupply" + Query_SupplyOf_FullMethodName = "/cosmos.bank.v1beta1.Query/SupplyOf" + Query_Params_FullMethodName = "/cosmos.bank.v1beta1.Query/Params" + Query_DenomMetadata_FullMethodName = "/cosmos.bank.v1beta1.Query/DenomMetadata" + Query_DenomMetadataByQueryString_FullMethodName = "/cosmos.bank.v1beta1.Query/DenomMetadataByQueryString" + Query_DenomsMetadata_FullMethodName = "/cosmos.bank.v1beta1.Query/DenomsMetadata" + Query_DenomOwners_FullMethodName = "/cosmos.bank.v1beta1.Query/DenomOwners" + Query_DenomOwnersByQuery_FullMethodName = "/cosmos.bank.v1beta1.Query/DenomOwnersByQuery" + Query_SendEnabled_FullMethodName = "/cosmos.bank.v1beta1.Query/SendEnabled" ) // QueryClient is the client API for Query service. @@ -71,8 +73,10 @@ type QueryClient interface { SupplyOf(ctx context.Context, in *QuerySupplyOfRequest, opts ...grpc.CallOption) (*QuerySupplyOfResponse, error) // Params queries the parameters of x/bank module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // DenomsMetadata queries the client metadata of a given coin denomination. + // DenomMetadata queries the client metadata of a given coin denomination. DenomMetadata(ctx context.Context, in *QueryDenomMetadataRequest, opts ...grpc.CallOption) (*QueryDenomMetadataResponse, error) + // DenomMetadataByQueryString queries the client metadata of a given coin denomination. + DenomMetadataByQueryString(ctx context.Context, in *QueryDenomMetadataByQueryStringRequest, opts ...grpc.CallOption) (*QueryDenomMetadataByQueryStringResponse, error) // DenomsMetadata queries the client metadata for all registered coin // denominations. DenomsMetadata(ctx context.Context, in *QueryDenomsMetadataRequest, opts ...grpc.CallOption) (*QueryDenomsMetadataResponse, error) @@ -84,6 +88,11 @@ type QueryClient interface { // // Since: cosmos-sdk 0.46 DenomOwners(ctx context.Context, in *QueryDenomOwnersRequest, opts ...grpc.CallOption) (*QueryDenomOwnersResponse, error) + // DenomOwnersByQuery queries for all account addresses that own a particular token + // denomination. + // + // Since: cosmos-sdk 0.50.3 + DenomOwnersByQuery(ctx context.Context, in *QueryDenomOwnersByQueryRequest, opts ...grpc.CallOption) (*QueryDenomOwnersByQueryResponse, error) // SendEnabled queries for SendEnabled entries. // // This query only returns denominations that have specific SendEnabled settings. @@ -174,6 +183,15 @@ func (c *queryClient) DenomMetadata(ctx context.Context, in *QueryDenomMetadataR return out, nil } +func (c *queryClient) DenomMetadataByQueryString(ctx context.Context, in *QueryDenomMetadataByQueryStringRequest, opts ...grpc.CallOption) (*QueryDenomMetadataByQueryStringResponse, error) { + out := new(QueryDenomMetadataByQueryStringResponse) + err := c.cc.Invoke(ctx, Query_DenomMetadataByQueryString_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) DenomsMetadata(ctx context.Context, in *QueryDenomsMetadataRequest, opts ...grpc.CallOption) (*QueryDenomsMetadataResponse, error) { out := new(QueryDenomsMetadataResponse) err := c.cc.Invoke(ctx, Query_DenomsMetadata_FullMethodName, in, out, opts...) @@ -192,6 +210,15 @@ func (c *queryClient) DenomOwners(ctx context.Context, in *QueryDenomOwnersReque return out, nil } +func (c *queryClient) DenomOwnersByQuery(ctx context.Context, in *QueryDenomOwnersByQueryRequest, opts ...grpc.CallOption) (*QueryDenomOwnersByQueryResponse, error) { + out := new(QueryDenomOwnersByQueryResponse) + err := c.cc.Invoke(ctx, Query_DenomOwnersByQuery_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) SendEnabled(ctx context.Context, in *QuerySendEnabledRequest, opts ...grpc.CallOption) (*QuerySendEnabledResponse, error) { out := new(QuerySendEnabledResponse) err := c.cc.Invoke(ctx, Query_SendEnabled_FullMethodName, in, out, opts...) @@ -240,8 +267,10 @@ type QueryServer interface { SupplyOf(context.Context, *QuerySupplyOfRequest) (*QuerySupplyOfResponse, error) // Params queries the parameters of x/bank module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // DenomsMetadata queries the client metadata of a given coin denomination. + // DenomMetadata queries the client metadata of a given coin denomination. DenomMetadata(context.Context, *QueryDenomMetadataRequest) (*QueryDenomMetadataResponse, error) + // DenomMetadataByQueryString queries the client metadata of a given coin denomination. + DenomMetadataByQueryString(context.Context, *QueryDenomMetadataByQueryStringRequest) (*QueryDenomMetadataByQueryStringResponse, error) // DenomsMetadata queries the client metadata for all registered coin // denominations. DenomsMetadata(context.Context, *QueryDenomsMetadataRequest) (*QueryDenomsMetadataResponse, error) @@ -253,6 +282,11 @@ type QueryServer interface { // // Since: cosmos-sdk 0.46 DenomOwners(context.Context, *QueryDenomOwnersRequest) (*QueryDenomOwnersResponse, error) + // DenomOwnersByQuery queries for all account addresses that own a particular token + // denomination. + // + // Since: cosmos-sdk 0.50.3 + DenomOwnersByQuery(context.Context, *QueryDenomOwnersByQueryRequest) (*QueryDenomOwnersByQueryResponse, error) // SendEnabled queries for SendEnabled entries. // // This query only returns denominations that have specific SendEnabled settings. @@ -292,12 +326,18 @@ func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*Q func (UnimplementedQueryServer) DenomMetadata(context.Context, *QueryDenomMetadataRequest) (*QueryDenomMetadataResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DenomMetadata not implemented") } +func (UnimplementedQueryServer) DenomMetadataByQueryString(context.Context, *QueryDenomMetadataByQueryStringRequest) (*QueryDenomMetadataByQueryStringResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DenomMetadataByQueryString not implemented") +} func (UnimplementedQueryServer) DenomsMetadata(context.Context, *QueryDenomsMetadataRequest) (*QueryDenomsMetadataResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DenomsMetadata not implemented") } func (UnimplementedQueryServer) DenomOwners(context.Context, *QueryDenomOwnersRequest) (*QueryDenomOwnersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DenomOwners not implemented") } +func (UnimplementedQueryServer) DenomOwnersByQuery(context.Context, *QueryDenomOwnersByQueryRequest) (*QueryDenomOwnersByQueryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DenomOwnersByQuery not implemented") +} func (UnimplementedQueryServer) SendEnabled(context.Context, *QuerySendEnabledRequest) (*QuerySendEnabledResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SendEnabled not implemented") } @@ -458,6 +498,24 @@ func _Query_DenomMetadata_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Query_DenomMetadataByQueryString_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDenomMetadataByQueryStringRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DenomMetadataByQueryString(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_DenomMetadataByQueryString_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DenomMetadataByQueryString(ctx, req.(*QueryDenomMetadataByQueryStringRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_DenomsMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryDenomsMetadataRequest) if err := dec(in); err != nil { @@ -494,6 +552,24 @@ func _Query_DenomOwners_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } +func _Query_DenomOwnersByQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDenomOwnersByQueryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DenomOwnersByQuery(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_DenomOwnersByQuery_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DenomOwnersByQuery(ctx, req.(*QueryDenomOwnersByQueryRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_SendEnabled_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QuerySendEnabledRequest) if err := dec(in); err != nil { @@ -551,6 +627,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "DenomMetadata", Handler: _Query_DenomMetadata_Handler, }, + { + MethodName: "DenomMetadataByQueryString", + Handler: _Query_DenomMetadataByQueryString_Handler, + }, { MethodName: "DenomsMetadata", Handler: _Query_DenomsMetadata_Handler, @@ -559,6 +639,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "DenomOwners", Handler: _Query_DenomOwners_Handler, }, + { + MethodName: "DenomOwnersByQuery", + Handler: _Query_DenomOwnersByQuery_Handler, + }, { MethodName: "SendEnabled", Handler: _Query_SendEnabled_Handler, diff --git a/api/cosmos/bank/v1beta1/tx.pulsar.go b/api/cosmos/bank/v1beta1/tx.pulsar.go index 952e29e2d0ea..64c6508750b6 100644 --- a/api/cosmos/bank/v1beta1/tx.pulsar.go +++ b/api/cosmos/bank/v1beta1/tx.pulsar.go @@ -4133,6 +4133,7 @@ type MsgSetSendEnabled struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // authority is the address that controls the module. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // send_enabled is the list of entries to add or update. SendEnabled []*SendEnabled `protobuf:"bytes,2,rep,name=send_enabled,json=sendEnabled,proto3" json:"send_enabled,omitempty"` diff --git a/api/cosmos/base/node/v1beta1/query.pulsar.go b/api/cosmos/base/node/v1beta1/query.pulsar.go index ff8148beebbb..f79e565e180b 100644 --- a/api/cosmos/base/node/v1beta1/query.pulsar.go +++ b/api/cosmos/base/node/v1beta1/query.pulsar.go @@ -376,6 +376,7 @@ var ( fd_ConfigResponse_minimum_gas_price protoreflect.FieldDescriptor fd_ConfigResponse_pruning_keep_recent protoreflect.FieldDescriptor fd_ConfigResponse_pruning_interval protoreflect.FieldDescriptor + fd_ConfigResponse_halt_height protoreflect.FieldDescriptor ) func init() { @@ -384,6 +385,7 @@ func init() { fd_ConfigResponse_minimum_gas_price = md_ConfigResponse.Fields().ByName("minimum_gas_price") fd_ConfigResponse_pruning_keep_recent = md_ConfigResponse.Fields().ByName("pruning_keep_recent") fd_ConfigResponse_pruning_interval = md_ConfigResponse.Fields().ByName("pruning_interval") + fd_ConfigResponse_halt_height = md_ConfigResponse.Fields().ByName("halt_height") } var _ protoreflect.Message = (*fastReflection_ConfigResponse)(nil) @@ -469,6 +471,12 @@ func (x *fastReflection_ConfigResponse) Range(f func(protoreflect.FieldDescripto return } } + if x.HaltHeight != uint64(0) { + value := protoreflect.ValueOfUint64(x.HaltHeight) + if !f(fd_ConfigResponse_halt_height, value) { + return + } + } } // Has reports whether a field is populated. @@ -490,6 +498,8 @@ func (x *fastReflection_ConfigResponse) Has(fd protoreflect.FieldDescriptor) boo return x.PruningKeepRecent != "" case "cosmos.base.node.v1beta1.ConfigResponse.pruning_interval": return x.PruningInterval != "" + case "cosmos.base.node.v1beta1.ConfigResponse.halt_height": + return x.HaltHeight != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.node.v1beta1.ConfigResponse")) @@ -512,6 +522,8 @@ func (x *fastReflection_ConfigResponse) Clear(fd protoreflect.FieldDescriptor) { x.PruningKeepRecent = "" case "cosmos.base.node.v1beta1.ConfigResponse.pruning_interval": x.PruningInterval = "" + case "cosmos.base.node.v1beta1.ConfigResponse.halt_height": + x.HaltHeight = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.node.v1beta1.ConfigResponse")) @@ -537,6 +549,9 @@ func (x *fastReflection_ConfigResponse) Get(descriptor protoreflect.FieldDescrip case "cosmos.base.node.v1beta1.ConfigResponse.pruning_interval": value := x.PruningInterval return protoreflect.ValueOfString(value) + case "cosmos.base.node.v1beta1.ConfigResponse.halt_height": + value := x.HaltHeight + return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.node.v1beta1.ConfigResponse")) @@ -563,6 +578,8 @@ func (x *fastReflection_ConfigResponse) Set(fd protoreflect.FieldDescriptor, val x.PruningKeepRecent = value.Interface().(string) case "cosmos.base.node.v1beta1.ConfigResponse.pruning_interval": x.PruningInterval = value.Interface().(string) + case "cosmos.base.node.v1beta1.ConfigResponse.halt_height": + x.HaltHeight = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.node.v1beta1.ConfigResponse")) @@ -589,6 +606,8 @@ func (x *fastReflection_ConfigResponse) Mutable(fd protoreflect.FieldDescriptor) panic(fmt.Errorf("field pruning_keep_recent of message cosmos.base.node.v1beta1.ConfigResponse is not mutable")) case "cosmos.base.node.v1beta1.ConfigResponse.pruning_interval": panic(fmt.Errorf("field pruning_interval of message cosmos.base.node.v1beta1.ConfigResponse is not mutable")) + case "cosmos.base.node.v1beta1.ConfigResponse.halt_height": + panic(fmt.Errorf("field halt_height of message cosmos.base.node.v1beta1.ConfigResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.node.v1beta1.ConfigResponse")) @@ -608,6 +627,8 @@ func (x *fastReflection_ConfigResponse) NewField(fd protoreflect.FieldDescriptor return protoreflect.ValueOfString("") case "cosmos.base.node.v1beta1.ConfigResponse.pruning_interval": return protoreflect.ValueOfString("") + case "cosmos.base.node.v1beta1.ConfigResponse.halt_height": + return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.node.v1beta1.ConfigResponse")) @@ -689,6 +710,9 @@ func (x *fastReflection_ConfigResponse) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + if x.HaltHeight != 0 { + n += 1 + runtime.Sov(uint64(x.HaltHeight)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -718,6 +742,11 @@ func (x *fastReflection_ConfigResponse) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.HaltHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.HaltHeight)) + i-- + dAtA[i] = 0x20 + } if len(x.PruningInterval) > 0 { i -= len(x.PruningInterval) copy(dAtA[i:], x.PruningInterval) @@ -884,6 +913,25 @@ func (x *fastReflection_ConfigResponse) ProtoMethods() *protoiface.Methods { } x.PruningInterval = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HaltHeight", wireType) + } + x.HaltHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.HaltHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1984,10 +2032,10 @@ type ConfigResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - MinimumGasPrice string `protobuf:"bytes,1,opt,name=minimum_gas_price,json=minimumGasPrice,proto3" json:"minimum_gas_price,omitempty"` - // pruning settings + MinimumGasPrice string `protobuf:"bytes,1,opt,name=minimum_gas_price,json=minimumGasPrice,proto3" json:"minimum_gas_price,omitempty"` PruningKeepRecent string `protobuf:"bytes,2,opt,name=pruning_keep_recent,json=pruningKeepRecent,proto3" json:"pruning_keep_recent,omitempty"` PruningInterval string `protobuf:"bytes,3,opt,name=pruning_interval,json=pruningInterval,proto3" json:"pruning_interval,omitempty"` + HaltHeight uint64 `protobuf:"varint,4,opt,name=halt_height,json=haltHeight,proto3" json:"halt_height,omitempty"` } func (x *ConfigResponse) Reset() { @@ -2031,6 +2079,13 @@ func (x *ConfigResponse) GetPruningInterval() string { return "" } +func (x *ConfigResponse) GetHaltHeight() uint64 { + if x != nil { + return x.HaltHeight + } + return 0 +} + // StateRequest defines the request structure for the status of a node. type StatusRequest struct { state protoimpl.MessageState @@ -2139,7 +2194,7 @@ var file_cosmos_base_node_v1beta1_query_proto_rawDesc = []byte{ 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0f, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x97, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xb8, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x47, 0x61, 0x73, @@ -2149,54 +2204,56 @@ var file_cosmos_base_node_v1beta1_query_proto_rawDesc = []byte{ 0x65, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x22, 0x0f, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0xde, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, - 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x13, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x53, 0x74, 0x6f, - 0x72, 0x65, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x12, 0x3e, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 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, 0x42, - 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x07, 0x61, 0x70, 0x70, 0x48, 0x61, 0x73, 0x68, 0x12, 0x25, 0x0a, 0x0e, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x61, - 0x73, 0x68, 0x32, 0x99, 0x02, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x85, - 0x01, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, - 0x73, 0x65, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x85, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, + 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x61, 0x6c, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x68, 0x61, 0x6c, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x22, 0x0f, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0xde, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, + 0x74, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x53, 0x74, + 0x6f, 0x72, 0x65, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x12, 0x3e, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 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, + 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x70, 0x70, 0x48, 0x61, 0x73, 0x68, 0x12, 0x25, 0x0a, 0x0e, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x48, + 0x61, 0x73, 0x68, 0x32, 0x99, 0x02, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x85, 0x01, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0xe4, - 0x01, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, - 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, + 0x61, 0x73, 0x65, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x85, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x6e, 0x6f, 0x64, 0x65, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x6e, 0x6f, 0x64, 0x65, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x42, 0x4e, 0xaa, 0x02, 0x18, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, - 0x61, 0x73, 0x65, 0x5c, 0x4e, 0x6f, 0x64, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xe2, 0x02, 0x24, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, 0x5c, 0x4e, - 0x6f, 0x64, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x3a, 0x3a, 0x42, 0x61, 0x73, 0x65, 0x3a, 0x3a, 0x4e, 0x6f, 0x64, 0x65, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, + 0xe4, 0x01, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x6e, 0x6f, 0x64, + 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x6e, 0x6f, 0x64, 0x65, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x42, 0x4e, 0xaa, 0x02, 0x18, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, + 0x42, 0x61, 0x73, 0x65, 0x5c, 0x4e, 0x6f, 0x64, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0xe2, 0x02, 0x24, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, 0x5c, + 0x4e, 0x6f, 0x64, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x3a, 0x3a, 0x42, 0x61, 0x73, 0x65, 0x3a, 0x3a, 0x4e, 0x6f, 0x64, 0x65, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/cosmos/base/v1beta1/coin.pulsar.go b/api/cosmos/base/v1beta1/coin.pulsar.go index 26b79e11737d..16bd41151f98 100644 --- a/api/cosmos/base/v1beta1/coin.pulsar.go +++ b/api/cosmos/base/v1beta1/coin.pulsar.go @@ -1931,6 +1931,7 @@ func (x *DecCoin) GetAmount() string { } // IntProto defines a Protobuf wrapper around an Int object. +// Deprecated: Prefer to use math.Int directly. It supports binary Marshal and Unmarshal. type IntProto struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1967,6 +1968,7 @@ func (x *IntProto) GetInt() string { } // DecProto defines a Protobuf wrapper around a Dec object. +// Deprecated: Prefer to use math.LegacyDec directly. It supports binary Marshal and Unmarshal. type DecProto struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2012,39 +2014,44 @@ var file_cosmos_base_v1beta1_coin_proto_rawDesc = []byte{ 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, - 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5a, 0x0a, 0x04, 0x43, 0x6f, 0x69, + 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6c, 0x0a, 0x04, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x36, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1e, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, - 0x03, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, - 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, - 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x58, 0x0a, 0x07, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, - 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x31, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x03, - 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, - 0x63, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, - 0x37, 0x0a, 0x08, 0x49, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x0a, 0x03, 0x69, - 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, - 0x1f, 0x03, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x49, 0x6e, 0x74, 0x52, 0x03, 0x69, 0x6e, 0x74, 0x22, 0x37, 0x0a, 0x08, 0x44, 0x65, 0x63, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x0a, 0x03, 0x64, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x19, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x03, 0x44, 0x65, 0x63, 0xd2, 0xb4, - 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x03, 0x64, 0x65, - 0x63, 0x42, 0xcc, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x09, 0x43, - 0x6f, 0x69, 0x6e, 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, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x3b, 0x62, 0x61, 0x73, 0x65, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, - 0x42, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x73, 0x65, - 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, - 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, 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, 0x42, 0x61, 0x73, 0x65, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xd8, 0xe1, 0x1e, 0x00, 0x80, 0xe2, 0x1e, 0x00, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x48, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, + 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, + 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x70, 0x0a, 0x07, 0x44, 0x65, 0x63, 0x43, 0x6f, + 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x49, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, + 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, + 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, + 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x49, 0x0a, 0x08, 0x49, 0x6e, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3d, 0x0a, 0x03, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, + 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, + 0x03, 0x69, 0x6e, 0x74, 0x22, 0x4f, 0x0a, 0x08, 0x44, 0x65, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x43, 0x0a, 0x03, 0x64, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, + 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, + 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, + 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, + 0x52, 0x03, 0x64, 0x65, 0x63, 0x42, 0xcc, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x42, 0x09, 0x43, 0x6f, 0x69, 0x6e, 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, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x3b, 0x62, 0x61, 0x73, 0x65, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xa2, 0x02, 0x03, 0x43, 0x42, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x42, 0x61, 0x73, 0x65, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, + 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, 0x42, + 0x61, 0x73, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xd8, 0xe1, 0x1e, 0x00, + 0x80, 0xe2, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/cosmos/circuit/v1/tx.pulsar.go b/api/cosmos/circuit/v1/tx.pulsar.go index ca2f3e5012e4..a6a43bb1e716 100644 --- a/api/cosmos/circuit/v1/tx.pulsar.go +++ b/api/cosmos/circuit/v1/tx.pulsar.go @@ -2965,7 +2965,7 @@ func (x *MsgAuthorizeCircuitBreaker) GetPermissions() *Permissions { return nil } -// MsgAuthorizeCircuitBreaker defines the Msg/AuthorizeCircuitBreaker response type. +// MsgAuthorizeCircuitBreakerResponse defines the Msg/AuthorizeCircuitBreaker response type. type MsgAuthorizeCircuitBreakerResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3051,7 +3051,7 @@ func (x *MsgTripCircuitBreaker) GetMsgTypeUrls() []string { return nil } -// MsgTripCircuitBreaker defines the Msg/TripCircuitBreaker response type. +// MsgTripCircuitBreakerResponse defines the Msg/TripCircuitBreaker response type. type MsgTripCircuitBreakerResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/api/cosmos/consensus/v1/query_grpc.pb.go b/api/cosmos/consensus/v1/query_grpc.pb.go index add845baa4a5..03694d673fe9 100644 --- a/api/cosmos/consensus/v1/query_grpc.pb.go +++ b/api/cosmos/consensus/v1/query_grpc.pb.go @@ -28,7 +28,7 @@ const ( // // 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 { - // Params queries the parameters of x/consensus_param module. + // Params queries the parameters of x/consensus module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) } @@ -53,7 +53,7 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . // All implementations must embed UnimplementedQueryServer // for forward compatibility type QueryServer interface { - // Params queries the parameters of x/consensus_param module. + // Params queries the parameters of x/consensus module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) mustEmbedUnimplementedQueryServer() } diff --git a/api/cosmos/consensus/v1/tx.pulsar.go b/api/cosmos/consensus/v1/tx.pulsar.go index ec2ba1c0bf52..c355aa8f271e 100644 --- a/api/cosmos/consensus/v1/tx.pulsar.go +++ b/api/cosmos/consensus/v1/tx.pulsar.go @@ -22,6 +22,7 @@ var ( fd_MsgUpdateParams_block protoreflect.FieldDescriptor fd_MsgUpdateParams_evidence protoreflect.FieldDescriptor fd_MsgUpdateParams_validator protoreflect.FieldDescriptor + fd_MsgUpdateParams_abci protoreflect.FieldDescriptor ) func init() { @@ -31,6 +32,7 @@ func init() { fd_MsgUpdateParams_block = md_MsgUpdateParams.Fields().ByName("block") fd_MsgUpdateParams_evidence = md_MsgUpdateParams.Fields().ByName("evidence") fd_MsgUpdateParams_validator = md_MsgUpdateParams.Fields().ByName("validator") + fd_MsgUpdateParams_abci = md_MsgUpdateParams.Fields().ByName("abci") } var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) @@ -122,6 +124,12 @@ func (x *fastReflection_MsgUpdateParams) Range(f func(protoreflect.FieldDescript return } } + if x.Abci != nil { + value := protoreflect.ValueOfMessage(x.Abci.ProtoReflect()) + if !f(fd_MsgUpdateParams_abci, value) { + return + } + } } // Has reports whether a field is populated. @@ -145,6 +153,8 @@ func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bo return x.Evidence != nil case "cosmos.consensus.v1.MsgUpdateParams.validator": return x.Validator != nil + case "cosmos.consensus.v1.MsgUpdateParams.abci": + return x.Abci != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgUpdateParams")) @@ -169,6 +179,8 @@ func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) x.Evidence = nil case "cosmos.consensus.v1.MsgUpdateParams.validator": x.Validator = nil + case "cosmos.consensus.v1.MsgUpdateParams.abci": + x.Abci = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgUpdateParams")) @@ -197,6 +209,9 @@ func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescri case "cosmos.consensus.v1.MsgUpdateParams.validator": value := x.Validator return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.consensus.v1.MsgUpdateParams.abci": + value := x.Abci + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgUpdateParams")) @@ -225,6 +240,8 @@ func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, va x.Evidence = value.Message().Interface().(*types.EvidenceParams) case "cosmos.consensus.v1.MsgUpdateParams.validator": x.Validator = value.Message().Interface().(*types.ValidatorParams) + case "cosmos.consensus.v1.MsgUpdateParams.abci": + x.Abci = value.Message().Interface().(*types.ABCIParams) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgUpdateParams")) @@ -260,6 +277,11 @@ func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor x.Validator = new(types.ValidatorParams) } return protoreflect.ValueOfMessage(x.Validator.ProtoReflect()) + case "cosmos.consensus.v1.MsgUpdateParams.abci": + if x.Abci == nil { + x.Abci = new(types.ABCIParams) + } + return protoreflect.ValueOfMessage(x.Abci.ProtoReflect()) case "cosmos.consensus.v1.MsgUpdateParams.authority": panic(fmt.Errorf("field authority of message cosmos.consensus.v1.MsgUpdateParams is not mutable")) default: @@ -286,6 +308,9 @@ func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescripto case "cosmos.consensus.v1.MsgUpdateParams.validator": m := new(types.ValidatorParams) return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.consensus.v1.MsgUpdateParams.abci": + m := new(types.ABCIParams) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgUpdateParams")) @@ -371,6 +396,10 @@ func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { l = options.Size(x.Validator) n += 1 + l + runtime.Sov(uint64(l)) } + if x.Abci != nil { + l = options.Size(x.Abci) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -400,6 +429,20 @@ func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.Abci != nil { + encoded, err := options.Marshal(x.Abci) + 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.Validator != nil { encoded, err := options.Marshal(x.Validator) if err != nil { @@ -638,6 +681,42 @@ func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { 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 Abci", 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.Abci == nil { + x.Abci = &types.ABCIParams{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Abci); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1060,6 +1139,8 @@ type MsgUpdateParams struct { Block *types.BlockParams `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` Evidence *types.EvidenceParams `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence,omitempty"` Validator *types.ValidatorParams `protobuf:"bytes,4,opt,name=validator,proto3" json:"validator,omitempty"` + // Since: cosmos-sdk 0.50 + Abci *types.ABCIParams `protobuf:"bytes,5,opt,name=abci,proto3" json:"abci,omitempty"` } func (x *MsgUpdateParams) Reset() { @@ -1110,6 +1191,13 @@ func (x *MsgUpdateParams) GetValidator() *types.ValidatorParams { return nil } +func (x *MsgUpdateParams) GetAbci() *types.ABCIParams { + if x != nil { + return x.Abci + } + return nil +} + // MsgUpdateParamsResponse defines the response structure for executing a // MsgUpdateParams message. type MsgUpdateParamsResponse struct { @@ -1150,7 +1238,7 @@ var file_cosmos_consensus_v1_tx_proto_rawDesc = []byte{ 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb8, 0x02, 0x0a, 0x0f, 0x4d, 0x73, + 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xea, 0x02, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, @@ -1166,32 +1254,35 @@ var file_cosmos_consensus_v1_tx_proto_rawDesc = []byte{ 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x09, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x39, 0x82, 0xe7, 0xb0, 0x2a, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x26, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, - 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, - 0x70, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x62, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2c, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, - 0x01, 0x42, 0xc2, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, - 0x78, 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, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, - 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x58, - 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, - 0x73, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5c, - 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, - 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x04, 0x61, 0x62, 0x63, + 0x69, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x41, 0x42, 0x43, 0x49, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x04, 0x61, 0x62, 0x63, 0x69, 0x3a, 0x39, 0x82, 0xe7, 0xb0, + 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x26, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x63, 0x6f, 0x6e, + 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x32, 0x70, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x62, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2c, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, + 0xb0, 0x2a, 0x01, 0x42, 0xc2, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, + 0x07, 0x54, 0x78, 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, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x76, 0x31, + 0x3b, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, + 0x43, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, + 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, + 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x65, + 0x6e, 0x73, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1213,18 +1304,20 @@ var file_cosmos_consensus_v1_tx_proto_goTypes = []interface{}{ (*types.BlockParams)(nil), // 2: tendermint.types.BlockParams (*types.EvidenceParams)(nil), // 3: tendermint.types.EvidenceParams (*types.ValidatorParams)(nil), // 4: tendermint.types.ValidatorParams + (*types.ABCIParams)(nil), // 5: tendermint.types.ABCIParams } var file_cosmos_consensus_v1_tx_proto_depIdxs = []int32{ 2, // 0: cosmos.consensus.v1.MsgUpdateParams.block:type_name -> tendermint.types.BlockParams 3, // 1: cosmos.consensus.v1.MsgUpdateParams.evidence:type_name -> tendermint.types.EvidenceParams 4, // 2: cosmos.consensus.v1.MsgUpdateParams.validator:type_name -> tendermint.types.ValidatorParams - 0, // 3: cosmos.consensus.v1.Msg.UpdateParams:input_type -> cosmos.consensus.v1.MsgUpdateParams - 1, // 4: cosmos.consensus.v1.Msg.UpdateParams:output_type -> cosmos.consensus.v1.MsgUpdateParamsResponse - 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 + 5, // 3: cosmos.consensus.v1.MsgUpdateParams.abci:type_name -> tendermint.types.ABCIParams + 0, // 4: cosmos.consensus.v1.Msg.UpdateParams:input_type -> cosmos.consensus.v1.MsgUpdateParams + 1, // 5: cosmos.consensus.v1.Msg.UpdateParams:output_type -> cosmos.consensus.v1.MsgUpdateParamsResponse + 5, // [5:6] is the sub-list for method output_type + 4, // [4:5] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_cosmos_consensus_v1_tx_proto_init() } diff --git a/api/cosmos/consensus/v1/tx_grpc.pb.go b/api/cosmos/consensus/v1/tx_grpc.pb.go index c7429525bc96..5a16e66ef5e6 100644 --- a/api/cosmos/consensus/v1/tx_grpc.pb.go +++ b/api/cosmos/consensus/v1/tx_grpc.pb.go @@ -28,7 +28,7 @@ const ( // // 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 MsgClient interface { - // UpdateParams defines a governance operation for updating the x/consensus_param module parameters. + // UpdateParams defines a governance operation for updating the x/consensus module parameters. // The authority is defined in the keeper. // // Since: cosmos-sdk 0.47 @@ -56,7 +56,7 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts // All implementations must embed UnimplementedMsgServer // for forward compatibility type MsgServer interface { - // UpdateParams defines a governance operation for updating the x/consensus_param module parameters. + // UpdateParams defines a governance operation for updating the x/consensus module parameters. // The authority is defined in the keeper. // // Since: cosmos-sdk 0.47 diff --git a/api/cosmos/distribution/v1beta1/distribution.pulsar.go b/api/cosmos/distribution/v1beta1/distribution.pulsar.go index b28523058ae7..9248ffdf2e64 100644 --- a/api/cosmos/distribution/v1beta1/distribution.pulsar.go +++ b/api/cosmos/distribution/v1beta1/distribution.pulsar.go @@ -7214,181 +7214,178 @@ var file_cosmos_distribution_v1beta1_distribution_proto_rawDesc = []byte{ 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xbb, 0x03, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x66, 0x0a, 0x0d, + 0x6f, 0x22, 0x9a, 0x03, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x5b, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x61, 0x78, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x41, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, - 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, - 0x79, 0x54, 0x61, 0x78, 0x12, 0x75, 0x0a, 0x14, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x43, 0x18, 0x01, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, - 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x12, 0x62, 0x61, 0x73, 0x65, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x65, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x77, 0x0a, 0x15, 0x62, - 0x6f, 0x6e, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x72, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x43, 0x18, 0x01, 0xc8, 0xde, - 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, - 0x13, 0x62, 0x6f, 0x6e, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x52, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x13, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x41, 0x64, 0x64, - 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x25, 0x8a, 0xe7, 0xb0, 0x2a, 0x20, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x64, 0x69, 0x73, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, - 0xd6, 0x01, 0x0a, 0x1a, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x8e, - 0x01, 0x0a, 0x17, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x72, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x38, - 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, - 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x15, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, - 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, - 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa3, 0x01, 0x0a, 0x17, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x73, 0x12, 0x70, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, - 0x6f, 0x69, 0x6e, 0x42, 0x38, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x72, - 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x98, - 0x01, 0x0a, 0x1e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x75, - 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x76, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, - 0x6f, 0x69, 0x6e, 0x42, 0x38, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x63, - 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x8f, 0x01, 0x0a, 0x1b, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4f, 0x75, 0x74, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x70, 0x0a, 0x07, 0x72, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x38, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, - 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, - 0x2a, 0x01, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x22, 0x9a, 0x01, 0x0a, 0x13, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x58, - 0x0a, 0x08, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, - 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x08, - 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x89, 0x01, 0x0a, 0x14, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x12, 0x71, 0x0a, 0x16, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, - 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x14, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x07, 0x46, 0x65, 0x65, 0x50, 0x6f, 0x6f, 0x6c, - 0x12, 0x7d, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x6f, - 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, - 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x38, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, - 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x22, - 0x97, 0x02, 0x0a, 0x1a, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, - 0x6c, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x14, - 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, - 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, - 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, - 0x69, 0x65, 0x6e, 0x74, 0x12, 0x79, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, - 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, - 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, - 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, - 0x28, 0x18, 0x01, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0xca, 0xb4, 0x2d, 0x1a, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0xdf, 0x01, 0x0a, 0x15, 0x44, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, - 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x70, 0x72, - 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x57, 0x0a, 0x05, - 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x41, 0xc8, 0xde, 0x1f, - 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, - 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x44, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0xea, 0xde, 0x1f, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0xa2, 0xe7, 0xb0, 0x2a, 0x0f, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0xa8, 0xe7, - 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xe1, 0x01, 0x0a, 0x19, - 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x6e, 0x0a, 0x06, 0x72, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x01, 0x28, 0x09, 0x42, 0x36, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, + 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6d, + 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x61, 0x78, 0x12, 0x6a, 0x0a, 0x14, 0x62, 0x61, 0x73, + 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x38, 0x18, 0x01, 0xc8, 0xde, 0x1f, 0x00, 0xda, + 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, + 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, + 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, + 0x01, 0x52, 0x12, 0x62, 0x61, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x6c, 0x0a, 0x15, 0x62, 0x6f, 0x6e, 0x75, 0x73, 0x5f, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x38, 0x18, 0x01, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, + 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x13, + 0x62, 0x6f, 0x6e, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x52, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x13, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x41, 0x64, 0x64, 0x72, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x25, 0x8a, 0xe7, 0xb0, 0x2a, 0x20, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xd6, + 0x01, 0x0a, 0x1a, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x69, 0x73, 0x74, + 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x8e, 0x01, + 0x0a, 0x17, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x72, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x38, 0xc8, + 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, + 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, + 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x15, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, + 0x69, 0x76, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x27, + 0x0a, 0x0f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa3, 0x01, 0x0a, 0x17, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x73, 0x12, 0x70, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, + 0x69, 0x6e, 0x42, 0x38, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, + 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x72, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x98, 0x01, + 0x0a, 0x1e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x75, 0x6d, + 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x76, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, + 0x69, 0x6e, 0x42, 0x38, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, + 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x8f, 0x01, 0x0a, 0x1b, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4f, 0x75, 0x74, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x70, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x38, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, - 0x01, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x3a, 0x04, 0x88, 0xa0, 0x1f, 0x00, 0x22, - 0xd3, 0x01, 0x0a, 0x25, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, - 0x6c, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x57, 0x69, - 0x74, 0x68, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, - 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x3a, 0x22, 0x88, 0xa0, 0x1f, 0x00, 0xca, 0xb4, 0x2d, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x88, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x11, 0x44, 0x69, 0x73, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x64, 0x69, 0x73, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xa2, 0x02, 0x03, 0x43, 0x44, 0x58, 0xaa, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x44, 0x69, - 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xe2, 0x02, 0x27, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x44, 0x69, 0x73, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1d, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x01, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x22, 0x8f, 0x01, 0x0a, 0x13, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, + 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x4d, 0x0a, + 0x08, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, + 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, + 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, + 0x65, 0x63, 0x52, 0x08, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x89, 0x01, 0x0a, + 0x14, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x71, 0x0a, 0x16, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, + 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, + 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x14, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, + 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x07, 0x46, 0x65, 0x65, + 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x7d, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, + 0x79, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x38, 0xc8, 0xde, 0x1f, 0x00, + 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, + 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, + 0x6f, 0x6f, 0x6c, 0x22, 0x97, 0x02, 0x0a, 0x1a, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, + 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, + 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, + 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x79, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, + 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, + 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x3a, 0x28, 0x18, 0x01, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0xca, + 0xb4, 0x2d, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0xd4, 0x01, + 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x76, 0x69, + 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, + 0x12, 0x4c, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x36, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, + 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, + 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, + 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x44, + 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, + 0xea, 0xde, 0x1f, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, + 0x67, 0x68, 0x74, 0xa2, 0xe7, 0xb0, 0x2a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x22, 0xe1, 0x01, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, + 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x6e, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, + 0x42, 0x38, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, + 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x3a, 0x04, 0x88, 0xa0, 0x1f, 0x00, 0x22, 0xd3, 0x01, 0x0a, 0x25, 0x43, 0x6f, 0x6d, + 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x50, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x44, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, + 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, + 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x3a, 0x22, 0x88, 0xa0, 0x1f, 0x00, + 0xca, 0xb4, 0x2d, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x88, + 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, + 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x42, 0x11, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, + 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x44, 0x58, 0xaa, + 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x1b, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, + 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/api/cosmos/feegrant/v1beta1/query_grpc.pb.go b/api/cosmos/feegrant/v1beta1/query_grpc.pb.go index c323c42841ce..52eb181462f8 100644 --- a/api/cosmos/feegrant/v1beta1/query_grpc.pb.go +++ b/api/cosmos/feegrant/v1beta1/query_grpc.pb.go @@ -30,9 +30,9 @@ const ( // // 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 { - // Allowance returns fee granted to the grantee by the granter. + // Allowance returns granted allwance to the grantee by the granter. Allowance(ctx context.Context, in *QueryAllowanceRequest, opts ...grpc.CallOption) (*QueryAllowanceResponse, error) - // Allowances returns all the grants for address. + // Allowances returns all the grants for the given grantee address. Allowances(ctx context.Context, in *QueryAllowancesRequest, opts ...grpc.CallOption) (*QueryAllowancesResponse, error) // AllowancesByGranter returns all the grants given by an address // @@ -79,9 +79,9 @@ func (c *queryClient) AllowancesByGranter(ctx context.Context, in *QueryAllowanc // All implementations must embed UnimplementedQueryServer // for forward compatibility type QueryServer interface { - // Allowance returns fee granted to the grantee by the granter. + // Allowance returns granted allwance to the grantee by the granter. Allowance(context.Context, *QueryAllowanceRequest) (*QueryAllowanceResponse, error) - // Allowances returns all the grants for address. + // Allowances returns all the grants for the given grantee address. Allowances(context.Context, *QueryAllowancesRequest) (*QueryAllowancesResponse, error) // AllowancesByGranter returns all the grants given by an address // diff --git a/api/cosmos/feegrant/v1beta1/tx.pulsar.go b/api/cosmos/feegrant/v1beta1/tx.pulsar.go index 07dbc09fafe6..70056e9cbde3 100644 --- a/api/cosmos/feegrant/v1beta1/tx.pulsar.go +++ b/api/cosmos/feegrant/v1beta1/tx.pulsar.go @@ -1775,6 +1775,782 @@ func (x *fastReflection_MsgRevokeAllowanceResponse) ProtoMethods() *protoiface.M } } +var ( + md_MsgPruneAllowances protoreflect.MessageDescriptor + fd_MsgPruneAllowances_pruner protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_feegrant_v1beta1_tx_proto_init() + md_MsgPruneAllowances = File_cosmos_feegrant_v1beta1_tx_proto.Messages().ByName("MsgPruneAllowances") + fd_MsgPruneAllowances_pruner = md_MsgPruneAllowances.Fields().ByName("pruner") +} + +var _ protoreflect.Message = (*fastReflection_MsgPruneAllowances)(nil) + +type fastReflection_MsgPruneAllowances MsgPruneAllowances + +func (x *MsgPruneAllowances) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgPruneAllowances)(x) +} + +func (x *MsgPruneAllowances) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgPruneAllowances_messageType fastReflection_MsgPruneAllowances_messageType +var _ protoreflect.MessageType = fastReflection_MsgPruneAllowances_messageType{} + +type fastReflection_MsgPruneAllowances_messageType struct{} + +func (x fastReflection_MsgPruneAllowances_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgPruneAllowances)(nil) +} +func (x fastReflection_MsgPruneAllowances_messageType) New() protoreflect.Message { + return new(fastReflection_MsgPruneAllowances) +} +func (x fastReflection_MsgPruneAllowances_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgPruneAllowances +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgPruneAllowances) Descriptor() protoreflect.MessageDescriptor { + return md_MsgPruneAllowances +} + +// 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_MsgPruneAllowances) Type() protoreflect.MessageType { + return _fastReflection_MsgPruneAllowances_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgPruneAllowances) New() protoreflect.Message { + return new(fastReflection_MsgPruneAllowances) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgPruneAllowances) Interface() protoreflect.ProtoMessage { + return (*MsgPruneAllowances)(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_MsgPruneAllowances) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Pruner != "" { + value := protoreflect.ValueOfString(x.Pruner) + if !f(fd_MsgPruneAllowances_pruner, 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_MsgPruneAllowances) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.MsgPruneAllowances.pruner": + return x.Pruner != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgPruneAllowances")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgPruneAllowances 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_MsgPruneAllowances) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.MsgPruneAllowances.pruner": + x.Pruner = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgPruneAllowances")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgPruneAllowances 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_MsgPruneAllowances) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.feegrant.v1beta1.MsgPruneAllowances.pruner": + value := x.Pruner + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgPruneAllowances")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgPruneAllowances 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_MsgPruneAllowances) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.MsgPruneAllowances.pruner": + x.Pruner = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgPruneAllowances")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgPruneAllowances 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_MsgPruneAllowances) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.MsgPruneAllowances.pruner": + panic(fmt.Errorf("field pruner of message cosmos.feegrant.v1beta1.MsgPruneAllowances is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgPruneAllowances")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgPruneAllowances 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_MsgPruneAllowances) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.feegrant.v1beta1.MsgPruneAllowances.pruner": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgPruneAllowances")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgPruneAllowances 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_MsgPruneAllowances) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.MsgPruneAllowances", 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_MsgPruneAllowances) 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_MsgPruneAllowances) 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_MsgPruneAllowances) 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_MsgPruneAllowances) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgPruneAllowances) + 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.Pruner) + 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().(*MsgPruneAllowances) + 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.Pruner) > 0 { + i -= len(x.Pruner) + copy(dAtA[i:], x.Pruner) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Pruner))) + 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().(*MsgPruneAllowances) + 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: MsgPruneAllowances: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgPruneAllowances: 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 Pruner", 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.Pruner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgPruneAllowancesResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_feegrant_v1beta1_tx_proto_init() + md_MsgPruneAllowancesResponse = File_cosmos_feegrant_v1beta1_tx_proto.Messages().ByName("MsgPruneAllowancesResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgPruneAllowancesResponse)(nil) + +type fastReflection_MsgPruneAllowancesResponse MsgPruneAllowancesResponse + +func (x *MsgPruneAllowancesResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgPruneAllowancesResponse)(x) +} + +func (x *MsgPruneAllowancesResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_feegrant_v1beta1_tx_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_MsgPruneAllowancesResponse_messageType fastReflection_MsgPruneAllowancesResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgPruneAllowancesResponse_messageType{} + +type fastReflection_MsgPruneAllowancesResponse_messageType struct{} + +func (x fastReflection_MsgPruneAllowancesResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgPruneAllowancesResponse)(nil) +} +func (x fastReflection_MsgPruneAllowancesResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgPruneAllowancesResponse) +} +func (x fastReflection_MsgPruneAllowancesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgPruneAllowancesResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgPruneAllowancesResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgPruneAllowancesResponse +} + +// 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_MsgPruneAllowancesResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgPruneAllowancesResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgPruneAllowancesResponse) New() protoreflect.Message { + return new(fastReflection_MsgPruneAllowancesResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgPruneAllowancesResponse) Interface() protoreflect.ProtoMessage { + return (*MsgPruneAllowancesResponse)(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_MsgPruneAllowancesResponse) 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_MsgPruneAllowancesResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse 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_MsgPruneAllowancesResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse 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_MsgPruneAllowancesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse 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_MsgPruneAllowancesResponse) 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.feegrant.v1beta1.MsgPruneAllowancesResponse")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse 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_MsgPruneAllowancesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse 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_MsgPruneAllowancesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse")) + } + panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse 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_MsgPruneAllowancesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse", 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_MsgPruneAllowancesResponse) 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_MsgPruneAllowancesResponse) 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_MsgPruneAllowancesResponse) 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_MsgPruneAllowancesResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgPruneAllowancesResponse) + 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().(*MsgPruneAllowancesResponse) + 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().(*MsgPruneAllowancesResponse) + 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: MsgPruneAllowancesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgPruneAllowancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Since: cosmos-sdk 0.43 // Code generated by protoc-gen-go. DO NOT EDIT. @@ -1946,6 +2722,74 @@ func (*MsgRevokeAllowanceResponse) Descriptor() ([]byte, []int) { return file_cosmos_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{3} } +// MsgPruneAllowances prunes expired fee allowances. +// +// Since cosmos-sdk 0.50 +type MsgPruneAllowances struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // pruner is the address of the user pruning expired allowances. + Pruner string `protobuf:"bytes,1,opt,name=pruner,proto3" json:"pruner,omitempty"` +} + +func (x *MsgPruneAllowances) Reset() { + *x = MsgPruneAllowances{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgPruneAllowances) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgPruneAllowances) ProtoMessage() {} + +// Deprecated: Use MsgPruneAllowances.ProtoReflect.Descriptor instead. +func (*MsgPruneAllowances) Descriptor() ([]byte, []int) { + return file_cosmos_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgPruneAllowances) GetPruner() string { + if x != nil { + return x.Pruner + } + return "" +} + +// MsgPruneAllowancesResponse defines the Msg/PruneAllowancesResponse response type. +// +// Since cosmos-sdk 0.50 +type MsgPruneAllowancesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgPruneAllowancesResponse) Reset() { + *x = MsgPruneAllowancesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgPruneAllowancesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgPruneAllowancesResponse) ProtoMessage() {} + +// Deprecated: Use MsgPruneAllowancesResponse.ProtoReflect.Descriptor instead. +func (*MsgPruneAllowancesResponse) Descriptor() ([]byte, []int) { + return file_cosmos_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{5} +} + var File_cosmos_feegrant_v1beta1_tx_proto protoreflect.FileDescriptor var file_cosmos_feegrant_v1beta1_tx_proto_rawDesc = []byte{ @@ -1990,37 +2834,51 @@ var file_cosmos_feegrant_v1beta1_tx_proto_rawDesc = []byte{ 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x32, 0xf3, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x70, 0x0a, 0x0e, 0x47, - 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2a, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, - 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, - 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, - 0x0f, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, - 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, + 0x6e, 0x73, 0x65, 0x22, 0x53, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, + 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x70, 0x72, 0x75, + 0x6e, 0x65, 0x72, 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, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, + 0x2a, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x50, + 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xe8, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x70, + 0x0a, 0x0e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, + 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, + 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x32, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, + 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x73, 0x0a, 0x0f, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, + 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, + 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, + 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x33, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, - 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xde, 0x01, 0x0a, 0x1b, 0x63, 0x6f, - 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, - 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, - 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, - 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, - 0x03, 0x43, 0x46, 0x58, 0xaa, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, - 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, - 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x0f, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, + 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, + 0x61, 0x6e, 0x63, 0x65, 0x73, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, + 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, + 0x01, 0x42, 0xde, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x46, 0x58, 0xaa, 0x02, 0x17, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, + 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, + 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, + 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2035,22 +2893,26 @@ func file_cosmos_feegrant_v1beta1_tx_proto_rawDescGZIP() []byte { return file_cosmos_feegrant_v1beta1_tx_proto_rawDescData } -var file_cosmos_feegrant_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_cosmos_feegrant_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_cosmos_feegrant_v1beta1_tx_proto_goTypes = []interface{}{ (*MsgGrantAllowance)(nil), // 0: cosmos.feegrant.v1beta1.MsgGrantAllowance (*MsgGrantAllowanceResponse)(nil), // 1: cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse (*MsgRevokeAllowance)(nil), // 2: cosmos.feegrant.v1beta1.MsgRevokeAllowance (*MsgRevokeAllowanceResponse)(nil), // 3: cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse - (*anypb.Any)(nil), // 4: google.protobuf.Any + (*MsgPruneAllowances)(nil), // 4: cosmos.feegrant.v1beta1.MsgPruneAllowances + (*MsgPruneAllowancesResponse)(nil), // 5: cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse + (*anypb.Any)(nil), // 6: google.protobuf.Any } var file_cosmos_feegrant_v1beta1_tx_proto_depIdxs = []int32{ - 4, // 0: cosmos.feegrant.v1beta1.MsgGrantAllowance.allowance:type_name -> google.protobuf.Any + 6, // 0: cosmos.feegrant.v1beta1.MsgGrantAllowance.allowance:type_name -> google.protobuf.Any 0, // 1: cosmos.feegrant.v1beta1.Msg.GrantAllowance:input_type -> cosmos.feegrant.v1beta1.MsgGrantAllowance 2, // 2: cosmos.feegrant.v1beta1.Msg.RevokeAllowance:input_type -> cosmos.feegrant.v1beta1.MsgRevokeAllowance - 1, // 3: cosmos.feegrant.v1beta1.Msg.GrantAllowance:output_type -> cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse - 3, // 4: cosmos.feegrant.v1beta1.Msg.RevokeAllowance:output_type -> cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse - 3, // [3:5] is the sub-list for method output_type - 1, // [1:3] is the sub-list for method input_type + 4, // 3: cosmos.feegrant.v1beta1.Msg.PruneAllowances:input_type -> cosmos.feegrant.v1beta1.MsgPruneAllowances + 1, // 4: cosmos.feegrant.v1beta1.Msg.GrantAllowance:output_type -> cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse + 3, // 5: cosmos.feegrant.v1beta1.Msg.RevokeAllowance:output_type -> cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse + 5, // 6: cosmos.feegrant.v1beta1.Msg.PruneAllowances:output_type -> cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name @@ -2110,6 +2972,30 @@ func file_cosmos_feegrant_v1beta1_tx_proto_init() { return nil } } + file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgPruneAllowances); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgPruneAllowancesResponse); 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{ @@ -2117,7 +3003,7 @@ func file_cosmos_feegrant_v1beta1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_feegrant_v1beta1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/feegrant/v1beta1/tx_grpc.pb.go b/api/cosmos/feegrant/v1beta1/tx_grpc.pb.go index 47ddb7a8329b..76637c5e0777 100644 --- a/api/cosmos/feegrant/v1beta1/tx_grpc.pb.go +++ b/api/cosmos/feegrant/v1beta1/tx_grpc.pb.go @@ -23,6 +23,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( Msg_GrantAllowance_FullMethodName = "/cosmos.feegrant.v1beta1.Msg/GrantAllowance" Msg_RevokeAllowance_FullMethodName = "/cosmos.feegrant.v1beta1.Msg/RevokeAllowance" + Msg_PruneAllowances_FullMethodName = "/cosmos.feegrant.v1beta1.Msg/PruneAllowances" ) // MsgClient is the client API for Msg service. @@ -35,6 +36,10 @@ type MsgClient interface { // RevokeAllowance revokes any fee allowance of granter's account that // has been granted to the grantee. RevokeAllowance(ctx context.Context, in *MsgRevokeAllowance, opts ...grpc.CallOption) (*MsgRevokeAllowanceResponse, error) + // PruneAllowances prunes expired fee allowances, currently up to 75 at a time. + // + // Since cosmos-sdk 0.50 + PruneAllowances(ctx context.Context, in *MsgPruneAllowances, opts ...grpc.CallOption) (*MsgPruneAllowancesResponse, error) } type msgClient struct { @@ -63,6 +68,15 @@ func (c *msgClient) RevokeAllowance(ctx context.Context, in *MsgRevokeAllowance, return out, nil } +func (c *msgClient) PruneAllowances(ctx context.Context, in *MsgPruneAllowances, opts ...grpc.CallOption) (*MsgPruneAllowancesResponse, error) { + out := new(MsgPruneAllowancesResponse) + err := c.cc.Invoke(ctx, Msg_PruneAllowances_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility @@ -73,6 +87,10 @@ type MsgServer interface { // RevokeAllowance revokes any fee allowance of granter's account that // has been granted to the grantee. RevokeAllowance(context.Context, *MsgRevokeAllowance) (*MsgRevokeAllowanceResponse, error) + // PruneAllowances prunes expired fee allowances, currently up to 75 at a time. + // + // Since cosmos-sdk 0.50 + PruneAllowances(context.Context, *MsgPruneAllowances) (*MsgPruneAllowancesResponse, error) mustEmbedUnimplementedMsgServer() } @@ -86,6 +104,9 @@ func (UnimplementedMsgServer) GrantAllowance(context.Context, *MsgGrantAllowance func (UnimplementedMsgServer) RevokeAllowance(context.Context, *MsgRevokeAllowance) (*MsgRevokeAllowanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RevokeAllowance not implemented") } +func (UnimplementedMsgServer) PruneAllowances(context.Context, *MsgPruneAllowances) (*MsgPruneAllowancesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PruneAllowances not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -135,6 +156,24 @@ func _Msg_RevokeAllowance_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Msg_PruneAllowances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgPruneAllowances) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).PruneAllowances(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_PruneAllowances_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).PruneAllowances(ctx, req.(*MsgPruneAllowances)) + } + return interceptor(ctx, in, info, handler) +} + // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -150,6 +189,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "RevokeAllowance", Handler: _Msg_RevokeAllowance_Handler, }, + { + MethodName: "PruneAllowances", + Handler: _Msg_PruneAllowances_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/feegrant/v1beta1/tx.proto", diff --git a/api/cosmos/gov/v1/gov.pulsar.go b/api/cosmos/gov/v1/gov.pulsar.go index 840096573832..1200fbc1e4aa 100644 --- a/api/cosmos/gov/v1/gov.pulsar.go +++ b/api/cosmos/gov/v1/gov.pulsar.go @@ -1211,6 +1211,7 @@ var ( fd_Proposal_summary protoreflect.FieldDescriptor fd_Proposal_proposer protoreflect.FieldDescriptor fd_Proposal_expedited protoreflect.FieldDescriptor + fd_Proposal_failed_reason protoreflect.FieldDescriptor ) func init() { @@ -1230,6 +1231,7 @@ func init() { fd_Proposal_summary = md_Proposal.Fields().ByName("summary") fd_Proposal_proposer = md_Proposal.Fields().ByName("proposer") fd_Proposal_expedited = md_Proposal.Fields().ByName("expedited") + fd_Proposal_failed_reason = md_Proposal.Fields().ByName("failed_reason") } var _ protoreflect.Message = (*fastReflection_Proposal)(nil) @@ -1381,6 +1383,12 @@ func (x *fastReflection_Proposal) Range(f func(protoreflect.FieldDescriptor, pro return } } + if x.FailedReason != "" { + value := protoreflect.ValueOfString(x.FailedReason) + if !f(fd_Proposal_failed_reason, value) { + return + } + } } // Has reports whether a field is populated. @@ -1424,6 +1432,8 @@ func (x *fastReflection_Proposal) Has(fd protoreflect.FieldDescriptor) bool { return x.Proposer != "" case "cosmos.gov.v1.Proposal.expedited": return x.Expedited != false + case "cosmos.gov.v1.Proposal.failed_reason": + return x.FailedReason != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Proposal")) @@ -1468,6 +1478,8 @@ func (x *fastReflection_Proposal) Clear(fd protoreflect.FieldDescriptor) { x.Proposer = "" case "cosmos.gov.v1.Proposal.expedited": x.Expedited = false + case "cosmos.gov.v1.Proposal.failed_reason": + x.FailedReason = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Proposal")) @@ -1532,6 +1544,9 @@ func (x *fastReflection_Proposal) Get(descriptor protoreflect.FieldDescriptor) p case "cosmos.gov.v1.Proposal.expedited": value := x.Expedited return protoreflect.ValueOfBool(value) + case "cosmos.gov.v1.Proposal.failed_reason": + value := x.FailedReason + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Proposal")) @@ -1584,6 +1599,8 @@ func (x *fastReflection_Proposal) Set(fd protoreflect.FieldDescriptor, value pro x.Proposer = value.Interface().(string) case "cosmos.gov.v1.Proposal.expedited": x.Expedited = value.Bool() + case "cosmos.gov.v1.Proposal.failed_reason": + x.FailedReason = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Proposal")) @@ -1655,6 +1672,8 @@ func (x *fastReflection_Proposal) Mutable(fd protoreflect.FieldDescriptor) proto panic(fmt.Errorf("field proposer of message cosmos.gov.v1.Proposal is not mutable")) case "cosmos.gov.v1.Proposal.expedited": panic(fmt.Errorf("field expedited of message cosmos.gov.v1.Proposal is not mutable")) + case "cosmos.gov.v1.Proposal.failed_reason": + panic(fmt.Errorf("field failed_reason of message cosmos.gov.v1.Proposal is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Proposal")) @@ -1703,6 +1722,8 @@ func (x *fastReflection_Proposal) NewField(fd protoreflect.FieldDescriptor) prot return protoreflect.ValueOfString("") case "cosmos.gov.v1.Proposal.expedited": return protoreflect.ValueOfBool(false) + case "cosmos.gov.v1.Proposal.failed_reason": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Proposal")) @@ -1829,6 +1850,10 @@ func (x *fastReflection_Proposal) ProtoMethods() *protoiface.Methods { if x.Expedited { n += 2 } + l = len(x.FailedReason) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1858,6 +1883,13 @@ func (x *fastReflection_Proposal) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.FailedReason) > 0 { + i -= len(x.FailedReason) + copy(dAtA[i:], x.FailedReason) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FailedReason))) + i-- + dAtA[i] = 0x7a + } if x.Expedited { i-- if x.Expedited { @@ -2491,6 +2523,38 @@ func (x *fastReflection_Proposal) ProtoMethods() *protoiface.Methods { } } x.Expedited = bool(v != 0) + case 15: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FailedReason", 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.FailedReason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -5483,6 +5547,7 @@ var ( fd_Params_burn_vote_quorum protoreflect.FieldDescriptor fd_Params_burn_proposal_deposit_prevote protoreflect.FieldDescriptor fd_Params_burn_vote_veto protoreflect.FieldDescriptor + fd_Params_min_deposit_ratio protoreflect.FieldDescriptor ) func init() { @@ -5503,6 +5568,7 @@ func init() { fd_Params_burn_vote_quorum = md_Params.Fields().ByName("burn_vote_quorum") fd_Params_burn_proposal_deposit_prevote = md_Params.Fields().ByName("burn_proposal_deposit_prevote") fd_Params_burn_vote_veto = md_Params.Fields().ByName("burn_vote_veto") + fd_Params_min_deposit_ratio = md_Params.Fields().ByName("min_deposit_ratio") } var _ protoreflect.Message = (*fastReflection_Params)(nil) @@ -5660,6 +5726,12 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto return } } + if x.MinDepositRatio != "" { + value := protoreflect.ValueOfString(x.MinDepositRatio) + if !f(fd_Params_min_deposit_ratio, value) { + return + } + } } // Has reports whether a field is populated. @@ -5705,6 +5777,8 @@ func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { return x.BurnProposalDepositPrevote != false case "cosmos.gov.v1.Params.burn_vote_veto": return x.BurnVoteVeto != false + case "cosmos.gov.v1.Params.min_deposit_ratio": + return x.MinDepositRatio != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) @@ -5751,6 +5825,8 @@ func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { x.BurnProposalDepositPrevote = false case "cosmos.gov.v1.Params.burn_vote_veto": x.BurnVoteVeto = false + case "cosmos.gov.v1.Params.min_deposit_ratio": + x.MinDepositRatio = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) @@ -5818,6 +5894,9 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro case "cosmos.gov.v1.Params.burn_vote_veto": value := x.BurnVoteVeto return protoreflect.ValueOfBool(value) + case "cosmos.gov.v1.Params.min_deposit_ratio": + value := x.MinDepositRatio + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) @@ -5872,6 +5951,8 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto x.BurnProposalDepositPrevote = value.Bool() case "cosmos.gov.v1.Params.burn_vote_veto": x.BurnVoteVeto = value.Bool() + case "cosmos.gov.v1.Params.min_deposit_ratio": + x.MinDepositRatio = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) @@ -5939,6 +6020,8 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore panic(fmt.Errorf("field burn_proposal_deposit_prevote of message cosmos.gov.v1.Params is not mutable")) case "cosmos.gov.v1.Params.burn_vote_veto": panic(fmt.Errorf("field burn_vote_veto of message cosmos.gov.v1.Params is not mutable")) + case "cosmos.gov.v1.Params.min_deposit_ratio": + panic(fmt.Errorf("field min_deposit_ratio of message cosmos.gov.v1.Params is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) @@ -5987,6 +6070,8 @@ func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protor return protoreflect.ValueOfBool(false) case "cosmos.gov.v1.Params.burn_vote_veto": return protoreflect.ValueOfBool(false) + case "cosmos.gov.v1.Params.min_deposit_ratio": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) @@ -6117,6 +6202,10 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { if x.BurnVoteVeto { n += 2 } + l = len(x.MinDepositRatio) + if l > 0 { + n += 2 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -6146,6 +6235,15 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.MinDepositRatio) > 0 { + i -= len(x.MinDepositRatio) + copy(dAtA[i:], x.MinDepositRatio) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MinDepositRatio))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } if x.BurnVoteVeto { i-- if x.BurnVoteVeto { @@ -6808,6 +6906,38 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } } x.BurnVoteVeto = bool(v != 0) + case 16: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinDepositRatio", 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.MinDepositRatio = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -7118,7 +7248,8 @@ type Proposal struct { // voting_end_time is the end time of voting on a proposal. VotingEndTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=voting_end_time,json=votingEndTime,proto3" json:"voting_end_time,omitempty"` // metadata is any arbitrary metadata attached to the proposal. - // the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#proposal-3 + // the recommended format of the metadata is to be found here: + // https://docs.cosmos.network/v0.47/modules/gov#proposal-3 Metadata string `protobuf:"bytes,10,opt,name=metadata,proto3" json:"metadata,omitempty"` // title is the title of the proposal // @@ -7136,6 +7267,10 @@ type Proposal struct { // // Since: cosmos-sdk 0.50 Expedited bool `protobuf:"varint,14,opt,name=expedited,proto3" json:"expedited,omitempty"` + // failed_reason defines the reason why the proposal failed + // + // Since: cosmos-sdk 0.50 + FailedReason string `protobuf:"bytes,15,opt,name=failed_reason,json=failedReason,proto3" json:"failed_reason,omitempty"` } func (x *Proposal) Reset() { @@ -7256,6 +7391,13 @@ func (x *Proposal) GetExpedited() bool { return false } +func (x *Proposal) GetFailedReason() string { + if x != nil { + return x.FailedReason + } + return "" +} + // TallyResult defines a standard tally for a governance proposal. type TallyResult struct { state protoimpl.MessageState @@ -7333,7 +7475,7 @@ type Vote struct { Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` // options is the weighted vote options. Options []*WeightedVoteOption `protobuf:"bytes,4,rep,name=options,proto3" json:"options,omitempty"` - // metadata is any arbitrary metadata to attached to the vote. + // metadata is any arbitrary metadata attached to the vote. // the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#vote-5 Metadata string `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"` } @@ -7583,6 +7725,12 @@ type Params struct { BurnProposalDepositPrevote bool `protobuf:"varint,14,opt,name=burn_proposal_deposit_prevote,json=burnProposalDepositPrevote,proto3" json:"burn_proposal_deposit_prevote,omitempty"` // burn deposits if quorum with vote type no_veto is met BurnVoteVeto bool `protobuf:"varint,15,opt,name=burn_vote_veto,json=burnVoteVeto,proto3" json:"burn_vote_veto,omitempty"` + // The ratio representing the proportion of the deposit value minimum that must be met when making a deposit. + // Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be + // required. + // + // Since: cosmos-sdk 0.50 + MinDepositRatio string `protobuf:"bytes,16,opt,name=min_deposit_ratio,json=minDepositRatio,proto3" json:"min_deposit_ratio,omitempty"` } func (x *Params) Reset() { @@ -7710,6 +7858,13 @@ func (x *Params) GetBurnVoteVeto() bool { return false } +func (x *Params) GetMinDepositRatio() string { + if x != nil { + return x.MinDepositRatio + } + return "" +} + var File_cosmos_gov_v1_gov_proto protoreflect.FileDescriptor var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{ @@ -7744,7 +7899,7 @@ var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{ 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, - 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xdf, 0x05, 0x0a, + 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x84, 0x06, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, @@ -7790,156 +7945,162 @@ var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{ 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x18, 0x0e, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x22, 0xd7, - 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2b, - 0x0a, 0x09, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, - 0x74, 0x52, 0x08, 0x79, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x0d, 0x61, - 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, - 0x6e, 0x74, 0x52, 0x0c, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x29, 0x0a, 0x08, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, - 0x6e, 0x74, 0x52, 0x07, 0x6e, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x12, 0x6e, - 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0f, 0x6e, 0x6f, 0x57, 0x69, 0x74, 0x68, 0x56, - 0x65, 0x74, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xb6, 0x01, 0x0a, 0x04, 0x56, 0x6f, 0x74, - 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x76, 0x6f, 0x74, - 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, - 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x56, 0x6f, 0x74, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4a, 0x04, 0x08, 0x03, 0x10, - 0x04, 0x22, 0xdd, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x59, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, - 0x6f, 0x69, 0x6e, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x15, 0x6d, 0x69, 0x6e, - 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, - 0x74, 0x79, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x6d, - 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x65, - 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x24, 0xea, 0xde, 0x1f, 0x1c, 0x6d, 0x61, 0x78, 0x5f, 0x64, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x2c, 0x6f, 0x6d, - 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x10, 0x6d, 0x61, 0x78, - 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x3a, 0x02, 0x18, - 0x01, 0x22, 0x58, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x44, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, - 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, - 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x9e, 0x01, 0x0a, 0x0b, - 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x06, 0x71, - 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, - 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, 0x71, 0x75, 0x6f, - 0x72, 0x75, 0x6d, 0x12, 0x2c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, - 0x64, 0x12, 0x35, 0x0a, 0x0e, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54, - 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0xd3, 0x07, 0x0a, - 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, - 0x2a, 0x01, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x4d, - 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x65, - 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x10, 0x6d, 0x61, 0x78, - 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x44, 0x0a, - 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, - 0x69, 0x6f, 0x64, 0x12, 0x26, 0x0a, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x44, 0x65, 0x63, 0x52, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x2c, 0x0a, 0x09, 0x74, - 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, - 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, - 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x35, 0x0a, 0x0e, 0x76, 0x65, 0x74, - 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, - 0x63, 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, - 0x12, 0x49, 0x0a, 0x19, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, - 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x12, 0x23, + 0x0a, 0x0d, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, + 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x22, 0xd7, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x12, 0x2b, 0x0a, 0x09, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x08, 0x79, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x33, 0x0a, 0x0d, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0c, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x08, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x07, 0x6e, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x3b, 0x0a, 0x12, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, + 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0f, 0x6e, 0x6f, + 0x57, 0x69, 0x74, 0x68, 0x56, 0x65, 0x74, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xb6, 0x01, + 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, + 0x64, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0xdd, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x59, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, + 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, + 0x1f, 0x15, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x2c, 0x6f, 0x6d, + 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x12, 0x6d, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x24, 0xea, 0xde, 0x1f, 0x1c, + 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x98, 0xdf, 0x1f, 0x01, + 0x52, 0x10, 0x6d, 0x61, 0x78, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x58, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x44, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, + 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0c, + 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x3a, 0x02, 0x18, 0x01, + 0x22, 0x9e, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x26, 0x0a, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, + 0x52, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x2c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, + 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, + 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x74, 0x68, 0x72, + 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x35, 0x0a, 0x0e, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, + 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, + 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, + 0x76, 0x65, 0x74, 0x6f, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x3a, 0x02, 0x18, + 0x01, 0x22, 0x8f, 0x08, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x45, 0x0a, 0x0b, + 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, + 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x12, 0x4d, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, + 0x52, 0x10, 0x6d, 0x61, 0x78, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x12, 0x44, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, + 0x69, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, + 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x26, 0x0a, 0x06, 0x71, 0x75, 0x6f, 0x72, + 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, + 0x12, 0x2c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x44, 0x65, 0x63, 0x52, 0x16, 0x6d, 0x69, 0x6e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x42, 0x0a, 0x15, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x13, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, - 0x4a, 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x63, 0x61, 0x6e, 0x63, - 0x65, 0x6c, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x18, 0x09, 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, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x12, 0x57, 0x0a, 0x17, 0x65, - 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, - 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x15, 0x65, - 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, - 0x72, 0x69, 0x6f, 0x64, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, - 0x64, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, - 0x63, 0x52, 0x12, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x54, 0x68, 0x72, 0x65, - 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x58, 0x0a, 0x15, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, - 0x65, 0x64, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x0c, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, - 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x13, 0x65, 0x78, 0x70, 0x65, - 0x64, 0x69, 0x74, 0x65, 0x64, 0x4d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, - 0x28, 0x0a, 0x10, 0x62, 0x75, 0x72, 0x6e, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x71, 0x75, 0x6f, - 0x72, 0x75, 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x62, 0x75, 0x72, 0x6e, 0x56, - 0x6f, 0x74, 0x65, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x41, 0x0a, 0x1d, 0x62, 0x75, 0x72, - 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x1a, 0x62, 0x75, 0x72, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0e, - 0x62, 0x75, 0x72, 0x6e, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x18, 0x0f, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x62, 0x75, 0x72, 0x6e, 0x56, 0x6f, 0x74, 0x65, 0x56, 0x65, - 0x74, 0x6f, 0x2a, 0x89, 0x01, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, - 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, - 0x53, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x53, 0x54, 0x41, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, - 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x10, 0x03, - 0x12, 0x1c, 0x0a, 0x18, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x4e, 0x4f, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x56, 0x45, 0x54, 0x4f, 0x10, 0x04, 0x2a, 0xce, - 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x5f, 0x50, 0x45, - 0x52, 0x49, 0x4f, 0x44, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, - 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x4f, 0x54, 0x49, 0x4e, 0x47, - 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, - 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x41, 0x53, - 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, - 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, - 0x44, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x42, - 0x99, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x47, 0x6f, 0x76, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, - 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x44, 0x65, 0x63, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x35, + 0x0a, 0x0e, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54, 0x68, 0x72, 0x65, + 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x49, 0x0a, 0x19, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x16, 0x6d, 0x69, 0x6e, 0x49, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x61, 0x74, 0x69, 0x6f, + 0x12, 0x42, 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x63, 0x61, 0x6e, + 0x63, 0x65, 0x6c, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, + 0x13, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, + 0x61, 0x74, 0x69, 0x6f, 0x12, 0x4a, 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x18, 0x09, 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, 0x12, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, + 0x12, 0x57, 0x0a, 0x17, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x6f, + 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, + 0x1f, 0x01, 0x52, 0x15, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x56, 0x6f, 0x74, + 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x78, 0x70, + 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x12, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, + 0x64, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x58, 0x0a, 0x15, 0x65, 0x78, + 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, + 0x13, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x4d, 0x69, 0x6e, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x62, 0x75, 0x72, 0x6e, 0x5f, 0x76, 0x6f, 0x74, + 0x65, 0x5f, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, + 0x62, 0x75, 0x72, 0x6e, 0x56, 0x6f, 0x74, 0x65, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x41, + 0x0a, 0x1d, 0x62, 0x75, 0x72, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, + 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x62, 0x75, 0x72, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x72, 0x65, 0x76, 0x6f, 0x74, + 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x62, 0x75, 0x72, 0x6e, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x76, + 0x65, 0x74, 0x6f, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x62, 0x75, 0x72, 0x6e, 0x56, + 0x6f, 0x74, 0x65, 0x56, 0x65, 0x74, 0x6f, 0x12, 0x3a, 0x0a, 0x11, 0x6d, 0x69, 0x6e, 0x5f, 0x64, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x10, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, + 0x65, 0x63, 0x52, 0x0f, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x61, + 0x74, 0x69, 0x6f, 0x2a, 0x89, 0x01, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, + 0x45, 0x53, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x53, 0x54, 0x41, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x12, 0x0a, + 0x0e, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x10, + 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x4e, 0x4f, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x56, 0x45, 0x54, 0x4f, 0x10, 0x04, 0x2a, + 0xce, 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x5f, 0x50, + 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x50, 0x4f, + 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x4f, 0x54, 0x49, 0x4e, + 0x47, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, + 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x41, + 0x53, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, + 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, + 0x45, 0x44, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x05, + 0x42, 0x99, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x47, 0x6f, 0x76, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, + 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, + 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, + 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/cosmos/gov/v1/query_grpc.pb.go b/api/cosmos/gov/v1/query_grpc.pb.go index 95e53b86a111..9ca690fcf0ed 100644 --- a/api/cosmos/gov/v1/query_grpc.pb.go +++ b/api/cosmos/gov/v1/query_grpc.pb.go @@ -48,7 +48,7 @@ type QueryClient interface { Votes(ctx context.Context, in *QueryVotesRequest, opts ...grpc.CallOption) (*QueryVotesResponse, error) // Params queries all parameters of the gov module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // Deposit queries single deposit information based proposalID, depositAddr. + // Deposit queries single deposit information based on proposalID, depositAddr. Deposit(ctx context.Context, in *QueryDepositRequest, opts ...grpc.CallOption) (*QueryDepositResponse, error) // Deposits queries all deposits of a single proposal. Deposits(ctx context.Context, in *QueryDepositsRequest, opts ...grpc.CallOption) (*QueryDepositsResponse, error) @@ -161,7 +161,7 @@ type QueryServer interface { Votes(context.Context, *QueryVotesRequest) (*QueryVotesResponse, error) // Params queries all parameters of the gov module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // Deposit queries single deposit information based proposalID, depositAddr. + // Deposit queries single deposit information based on proposalID, depositAddr. Deposit(context.Context, *QueryDepositRequest) (*QueryDepositResponse, error) // Deposits queries all deposits of a single proposal. Deposits(context.Context, *QueryDepositsRequest) (*QueryDepositsResponse, error) diff --git a/api/cosmos/gov/v1/tx.pulsar.go b/api/cosmos/gov/v1/tx.pulsar.go index 89edabdeb450..1f4fd832f946 100644 --- a/api/cosmos/gov/v1/tx.pulsar.go +++ b/api/cosmos/gov/v1/tx.pulsar.go @@ -7036,7 +7036,7 @@ type MsgSubmitProposal struct { // // Since: cosmos-sdk 0.47 Summary string `protobuf:"bytes,6,opt,name=summary,proto3" json:"summary,omitempty"` - // expedided defines if the proposal is expedited or not + // expedited defines if the proposal is expedited or not // // Since: cosmos-sdk 0.50 Expedited bool `protobuf:"varint,7,opt,name=expedited,proto3" json:"expedited,omitempty"` @@ -7574,8 +7574,10 @@ type MsgCancelProposal struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // proposal_id defines the unique id of the proposal. ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - Proposer string `protobuf:"bytes,2,opt,name=proposer,proto3" json:"proposer,omitempty"` + // proposer is the account address of the proposer. + Proposer string `protobuf:"bytes,2,opt,name=proposer,proto3" json:"proposer,omitempty"` } func (x *MsgCancelProposal) Reset() { @@ -7621,6 +7623,7 @@ type MsgCancelProposalResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // proposal_id defines the unique id of the proposal. ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` // canceled_time is the time when proposal is canceled. CanceledTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=canceled_time,json=canceledTime,proto3" json:"canceled_time,omitempty"` diff --git a/api/cosmos/gov/v1beta1/genesis.pulsar.go b/api/cosmos/gov/v1beta1/genesis.pulsar.go index b66ffd18f9da..73e35955d303 100644 --- a/api/cosmos/gov/v1beta1/genesis.pulsar.go +++ b/api/cosmos/gov/v1beta1/genesis.pulsar.go @@ -1096,11 +1096,11 @@ type GenesisState struct { Votes []*Vote `protobuf:"bytes,3,rep,name=votes,proto3" json:"votes,omitempty"` // proposals defines all the proposals present at genesis. Proposals []*Proposal `protobuf:"bytes,4,rep,name=proposals,proto3" json:"proposals,omitempty"` - // params defines all the parameters of related to deposit. + // deposit_params defines all the parameters related to deposit. DepositParams *DepositParams `protobuf:"bytes,5,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params,omitempty"` - // params defines all the parameters of related to voting. + // voting_params defines all the parameters related to voting. VotingParams *VotingParams `protobuf:"bytes,6,opt,name=voting_params,json=votingParams,proto3" json:"voting_params,omitempty"` - // params defines all the parameters of related to tally. + // tally_params defines all the parameters related to tally. TallyParams *TallyParams `protobuf:"bytes,7,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` } diff --git a/api/cosmos/gov/v1beta1/gov.pulsar.go b/api/cosmos/gov/v1beta1/gov.pulsar.go index 980e0000eb55..c4bec7b440db 100644 --- a/api/cosmos/gov/v1beta1/gov.pulsar.go +++ b/api/cosmos/gov/v1beta1/gov.pulsar.go @@ -6170,216 +6170,212 @@ var file_cosmos_gov_v1beta1_gov_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xa7, 0x01, 0x0a, 0x12, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x56, + 0x74, 0x6f, 0x22, 0x9c, 0x01, 0x0a, 0x12, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x59, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x41, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, - 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, - 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x86, 0x01, 0x0a, - 0x0c, 0x54, 0x65, 0x78, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x14, 0x0a, - 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, - 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3e, 0xe8, 0xa0, 0x1f, 0x01, 0xca, 0xb4, 0x2d, 0x1a, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x54, 0x65, 0x78, 0x74, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x22, 0xd6, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x49, 0x64, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xd9, - 0x05, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x4e, 0x0a, 0x07, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x6e, 0x12, 0x4e, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x36, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, + 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x22, 0x86, 0x01, 0x0a, 0x0c, 0x54, 0x65, 0x78, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3e, 0xe8, 0xa0, 0x1f, 0x01, + 0xca, 0xb4, 0x2d, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x8a, 0xe7, + 0xb0, 0x2a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x54, 0x65, + 0x78, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x22, 0xd6, 0x01, 0x0a, 0x07, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x12, + 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x35, 0xc8, 0xde, 0x1f, 0x00, + 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, + 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, + 0xa0, 0x1f, 0x00, 0x22, 0xd9, 0x05, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, + 0x64, 0x12, 0x4e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x1e, 0xca, 0xb4, 0x2d, 0x1a, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x12, 0x3a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x58, 0x0a, + 0x12, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, + 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, + 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x10, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x54, 0x61, 0x6c, 0x6c, + 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x4a, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6d, 0x69, + 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 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, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, + 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x53, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x65, + 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x41, 0x6e, 0x79, 0x42, 0x1e, 0xca, 0xb4, 0x2d, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x58, 0x0a, 0x12, 0x66, 0x69, 0x6e, 0x61, - 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, - 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, - 0x52, 0x10, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x12, 0x4a, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x05, 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, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, - 0x2a, 0x01, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x53, - 0x0a, 0x10, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x18, 0x06, 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, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, - 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x45, 0x6e, 0x64, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x75, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0c, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x55, 0x0a, 0x11, 0x76, 0x6f, - 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x08, 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, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, - 0x52, 0x0f, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x51, 0x0a, 0x0f, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x64, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, + 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x75, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x35, 0xc8, 0xde, 0x1f, 0x00, + 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, + 0x01, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, + 0x55, 0x0a, 0x11, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 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, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, - 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x64, - 0x54, 0x69, 0x6d, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xe9, 0x02, 0x0a, 0x0b, 0x54, - 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x4e, 0x0a, 0x03, 0x79, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, - 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x03, 0x79, 0x65, 0x73, 0x12, 0x56, 0x0a, 0x07, 0x61, 0x62, - 0x73, 0x74, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, - 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x62, 0x73, 0x74, 0x61, - 0x69, 0x6e, 0x12, 0x4c, 0x0a, 0x02, 0x6e, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, - 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, - 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x02, 0x6e, 0x6f, - 0x12, 0x5e, 0x0a, 0x0c, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0a, 0x6e, 0x6f, 0x57, 0x69, 0x74, 0x68, 0x56, 0x65, 0x74, 0x6f, - 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xfa, 0x01, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, - 0x33, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x42, 0x12, 0xea, 0xde, 0x1f, 0x02, 0x69, 0x64, 0xa2, 0xe7, 0xb0, 0x2a, - 0x02, 0x69, 0x64, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x76, - 0x6f, 0x74, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, - 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x4b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x56, - 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, - 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x04, 0xe8, - 0xa0, 0x1f, 0x00, 0x22, 0x8a, 0x02, 0x0a, 0x0d, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x49, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x15, - 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x2c, 0x6f, 0x6d, 0x69, 0x74, - 0x65, 0x6d, 0x70, 0x74, 0x79, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, - 0x73, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x71, 0x0a, - 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, - 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x28, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x1c, 0x6d, 0x61, - 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, - 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x10, - 0x6d, 0x61, 0x78, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, - 0x22, 0x73, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x63, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x23, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x17, 0x76, 0x6f, 0x74, 0x69, - 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, - 0x70, 0x74, 0x79, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, - 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0xc1, 0x02, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x5a, 0x0a, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x42, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x44, 0x65, 0x63, 0xea, 0xde, 0x1f, 0x10, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2c, - 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, - 0x6d, 0x12, 0x63, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x42, 0x45, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x44, 0x65, 0x63, 0xea, 0xde, 0x1f, 0x13, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, - 0x64, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x09, 0x74, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x71, 0x0a, 0x0e, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, - 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x4a, - 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xea, 0xde, - 0x1f, 0x18, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, - 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, - 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x2a, 0xe6, 0x01, 0x0a, 0x0a, 0x56, 0x6f, - 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x17, 0x56, 0x4f, 0x54, 0x45, - 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x0f, 0x8a, 0x9d, 0x20, 0x0b, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x22, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, - 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x10, 0x01, 0x1a, 0x0d, 0x8a, 0x9d, 0x20, - 0x09, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x59, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x13, 0x56, 0x4f, - 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x53, 0x54, 0x41, 0x49, - 0x4e, 0x10, 0x02, 0x1a, 0x11, 0x8a, 0x9d, 0x20, 0x0d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x41, - 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0e, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, - 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x10, 0x03, 0x1a, 0x0c, 0x8a, 0x9d, 0x20, 0x08, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x12, 0x32, 0x0a, 0x18, 0x56, 0x4f, 0x54, 0x45, - 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, - 0x56, 0x45, 0x54, 0x4f, 0x10, 0x04, 0x1a, 0x14, 0x8a, 0x9d, 0x20, 0x10, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x4e, 0x6f, 0x57, 0x69, 0x74, 0x68, 0x56, 0x65, 0x74, 0x6f, 0x1a, 0x04, 0x88, 0xa3, - 0x1e, 0x00, 0x2a, 0xcc, 0x02, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2e, 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, - 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x0d, 0x8a, 0x9d, 0x20, 0x09, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x4e, 0x69, 0x6c, 0x12, 0x3b, 0x0a, 0x1e, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, - 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, - 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x01, 0x1a, 0x17, 0x8a, 0x9d, 0x20, 0x13, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, - 0x6f, 0x64, 0x12, 0x39, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x4f, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x45, 0x52, - 0x49, 0x4f, 0x44, 0x10, 0x02, 0x1a, 0x16, 0x8a, 0x9d, 0x20, 0x12, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x2c, 0x0a, - 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x50, 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, 0x03, 0x1a, 0x10, 0x8a, 0x9d, 0x20, 0x0c, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x61, 0x73, 0x73, 0x65, 0x64, 0x12, 0x30, 0x0a, 0x18, 0x50, - 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, - 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x04, 0x1a, 0x12, 0x8a, 0x9d, 0x20, 0x0e, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x2c, 0x0a, - 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x1a, 0x10, 0x8a, 0x9d, 0x20, 0x0c, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x1a, 0x04, 0x88, 0xa3, 0x1e, - 0x00, 0x42, 0xc0, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x08, 0x47, 0x6f, - 0x76, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, 0x6f, - 0x76, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, - 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xca, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, - 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0f, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x51, 0x0a, 0x0f, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, + 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 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, 0x42, 0x0d, 0xc8, 0xde, 0x1f, + 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0d, 0x76, 0x6f, 0x74, 0x69, + 0x6e, 0x67, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, + 0xa5, 0x02, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x3d, 0x0a, 0x03, 0x79, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, + 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, + 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x03, 0x79, 0x65, 0x73, 0x12, 0x45, + 0x0a, 0x07, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, + 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, + 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x62, + 0x73, 0x74, 0x61, 0x69, 0x6e, 0x12, 0x3b, 0x0a, 0x02, 0x6e, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, + 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x02, + 0x6e, 0x6f, 0x12, 0x4d, 0x0a, 0x0c, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, + 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, + 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, + 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0a, 0x6e, 0x6f, 0x57, 0x69, 0x74, 0x68, 0x56, 0x65, 0x74, + 0x6f, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xfa, 0x01, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, + 0x12, 0x33, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x12, 0xea, 0xde, 0x1f, 0x02, 0x69, 0x64, 0xa2, 0xe7, 0xb0, + 0x2a, 0x02, 0x69, 0x64, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, + 0x76, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x4b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, + 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, + 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x04, + 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x8a, 0x02, 0x0a, 0x0d, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x49, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, + 0x15, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x2c, 0x6f, 0x6d, 0x69, + 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, + 0x6e, 0x73, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x71, + 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x65, + 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x28, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x1c, 0x6d, + 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, + 0x64, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x98, 0xdf, 0x1f, 0x01, 0x52, + 0x10, 0x6d, 0x61, 0x78, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, + 0x64, 0x22, 0x73, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x63, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x23, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x17, 0x76, 0x6f, 0x74, + 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, + 0x6d, 0x70, 0x74, 0x79, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, + 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0xca, 0x02, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x5d, 0x0a, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x45, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, + 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xea, 0xde, 0x1f, 0x10, 0x71, + 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xd2, + 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, 0x71, + 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x66, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, + 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x48, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, + 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, + 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xea, 0xde, 0x1f, + 0x13, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, + 0x6d, 0x70, 0x74, 0x79, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, + 0x65, 0x63, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x74, 0x0a, + 0x0e, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x4d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, + 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xea, 0xde, 0x1f, 0x18, 0x76, 0x65, + 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x2c, 0x6f, 0x6d, 0x69, + 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, + 0x6f, 0x6c, 0x64, 0x2a, 0xe6, 0x01, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x17, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, + 0x0f, 0x8a, 0x9d, 0x20, 0x0b, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x12, 0x22, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x59, 0x45, 0x53, 0x10, 0x01, 0x1a, 0x0d, 0x8a, 0x9d, 0x20, 0x09, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x59, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x53, 0x54, 0x41, 0x49, 0x4e, 0x10, 0x02, 0x1a, 0x11, 0x8a, + 0x9d, 0x20, 0x0d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, + 0x12, 0x20, 0x0a, 0x0e, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x4e, 0x4f, 0x10, 0x03, 0x1a, 0x0c, 0x8a, 0x9d, 0x20, 0x08, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x4e, 0x6f, 0x12, 0x32, 0x0a, 0x18, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x56, 0x45, 0x54, 0x4f, 0x10, 0x04, + 0x1a, 0x14, 0x8a, 0x9d, 0x20, 0x10, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x57, 0x69, + 0x74, 0x68, 0x56, 0x65, 0x74, 0x6f, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x2a, 0xcc, 0x02, 0x0a, + 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x2e, 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x1a, 0x0d, 0x8a, 0x9d, 0x20, 0x09, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4e, 0x69, 0x6c, 0x12, + 0x3b, 0x0a, 0x1e, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, + 0x44, 0x10, 0x01, 0x1a, 0x17, 0x8a, 0x9d, 0x20, 0x13, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x39, 0x0a, 0x1d, + 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x56, 0x4f, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x02, 0x1a, + 0x16, 0x8a, 0x9d, 0x20, 0x12, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x56, 0x6f, 0x74, 0x69, 0x6e, + 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x2c, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, + 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x45, + 0x44, 0x10, 0x03, 0x1a, 0x10, 0x8a, 0x9d, 0x20, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, + 0x61, 0x73, 0x73, 0x65, 0x64, 0x12, 0x30, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, + 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, + 0x44, 0x10, 0x04, 0x1a, 0x12, 0x8a, 0x9d, 0x20, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, + 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, + 0x44, 0x10, 0x05, 0x1a, 0x10, 0x8a, 0x9d, 0x20, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, + 0x61, 0x69, 0x6c, 0x65, 0x64, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xc0, 0x01, 0x0a, 0x16, + 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x08, 0x47, 0x6f, 0x76, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x12, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xe2, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, + 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/cosmos/gov/v1beta1/query_grpc.pb.go b/api/cosmos/gov/v1beta1/query_grpc.pb.go index 807c4893cf6c..7d6753ce069f 100644 --- a/api/cosmos/gov/v1beta1/query_grpc.pb.go +++ b/api/cosmos/gov/v1beta1/query_grpc.pb.go @@ -43,7 +43,7 @@ type QueryClient interface { Votes(ctx context.Context, in *QueryVotesRequest, opts ...grpc.CallOption) (*QueryVotesResponse, error) // Params queries all parameters of the gov module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // Deposit queries single deposit information based proposalID, depositAddr. + // Deposit queries single deposit information based on proposalID, depositor address. Deposit(ctx context.Context, in *QueryDepositRequest, opts ...grpc.CallOption) (*QueryDepositResponse, error) // Deposits queries all deposits of a single proposal. Deposits(ctx context.Context, in *QueryDepositsRequest, opts ...grpc.CallOption) (*QueryDepositsResponse, error) @@ -145,7 +145,7 @@ type QueryServer interface { Votes(context.Context, *QueryVotesRequest) (*QueryVotesResponse, error) // Params queries all parameters of the gov module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // Deposit queries single deposit information based proposalID, depositAddr. + // Deposit queries single deposit information based on proposalID, depositor address. Deposit(context.Context, *QueryDepositRequest) (*QueryDepositResponse, error) // Deposits queries all deposits of a single proposal. Deposits(context.Context, *QueryDepositsRequest) (*QueryDepositsResponse, error) diff --git a/api/cosmos/mint/v1beta1/mint.pulsar.go b/api/cosmos/mint/v1beta1/mint.pulsar.go index 25e3dac62039..8007c79c9630 100644 --- a/api/cosmos/mint/v1beta1/mint.pulsar.go +++ b/api/cosmos/mint/v1beta1/mint.pulsar.go @@ -1374,67 +1374,63 @@ var file_cosmos_mint_v1beta1_mint_proto_rawDesc = []byte{ 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, - 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcf, 0x01, 0x0a, 0x06, 0x4d, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x12, 0x5a, 0x0a, 0x09, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, - 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x69, 0x0a, 0x11, 0x61, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, - 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x10, 0x61, 0x6e, 0x6e, 0x75, 0x61, - 0x6c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x99, 0x04, 0x0a, 0x06, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x74, 0x5f, 0x64, - 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x74, - 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x75, 0x0a, 0x15, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x41, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, - 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x13, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x66, 0x0a, 0x0d, - 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x41, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb9, 0x01, 0x0a, 0x06, 0x4d, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x09, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, + 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, + 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x69, 0x6e, 0x66, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5e, 0x0a, 0x11, 0x61, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x5f, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, + 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x44, 0x65, 0x63, 0x52, 0x10, 0x61, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xed, 0x03, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x74, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, + 0x6a, 0x0a, 0x15, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, + 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36, + 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, + 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, - 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0c, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4d, 0x61, 0x78, 0x12, 0x66, 0x0a, 0x0d, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6d, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x41, 0xc8, 0xde, 0x1f, - 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0c, - 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x69, 0x6e, 0x12, 0x62, 0x0a, 0x0b, - 0x67, 0x6f, 0x61, 0x6c, 0x5f, 0x62, 0x6f, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x41, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, - 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, - 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x67, 0x6f, 0x61, 0x6c, 0x42, 0x6f, 0x6e, 0x64, 0x65, 0x64, - 0x12, 0x26, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x79, - 0x65, 0x61, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x73, 0x50, 0x65, 0x72, 0x59, 0x65, 0x61, 0x72, 0x3a, 0x1d, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x6d, 0x69, 0x6e, 0x74, - 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xc4, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x42, 0x09, 0x4d, 0x69, 0x6e, 0x74, 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, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x6d, 0x69, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4d, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x4d, 0x69, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, - 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4d, 0x69, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4d, 0x69, - 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, - 0x3a, 0x4d, 0x69, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x13, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x5b, 0x0a, 0x0d, 0x69, + 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x36, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, + 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0c, 0x69, 0x6e, 0x66, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x12, 0x5b, 0x0a, 0x0d, 0x69, 0x6e, 0x66, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x36, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, + 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, + 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, + 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0c, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x69, 0x6e, 0x12, 0x57, 0x0a, 0x0b, 0x67, 0x6f, 0x61, 0x6c, 0x5f, 0x62, 0x6f, + 0x6e, 0x64, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36, 0xc8, 0xde, 0x1f, 0x00, + 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, + 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, + 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x0a, 0x67, 0x6f, 0x61, 0x6c, 0x42, 0x6f, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x26, + 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x79, 0x65, 0x61, + 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x50, + 0x65, 0x72, 0x59, 0x65, 0x61, 0x72, 0x3a, 0x1d, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xc4, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x42, 0x09, 0x4d, 0x69, 0x6e, 0x74, 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, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x3b, 0x6d, 0x69, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xa2, 0x02, 0x03, 0x43, 0x4d, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x4d, 0x69, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4d, 0x69, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4d, 0x69, 0x6e, 0x74, + 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x4d, + 0x69, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/cosmos/mint/v1beta1/query.pulsar.go b/api/cosmos/mint/v1beta1/query.pulsar.go index 6d58cbccadb4..4bb399d4a01d 100644 --- a/api/cosmos/mint/v1beta1/query.pulsar.go +++ b/api/cosmos/mint/v1beta1/query.pulsar.go @@ -4,6 +4,7 @@ package mintv1beta1 import ( _ "cosmossdk.io/api/amino" fmt "fmt" + _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" _ "google.golang.org/genproto/googleapis/api/annotations" @@ -2582,74 +2583,76 @@ var file_cosmos_mint_v1beta1_query_proto_rawDesc = []byte{ 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, - 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, - 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0x55, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, + 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x55, + 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6d, + 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x17, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, + 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x6e, + 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x09, 0x69, 0x6e, 0x66, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x36, 0xc8, 0xde, 0x1f, + 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, + 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, + 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, + 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x1e, + 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x84, + 0x01, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x50, 0x72, + 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x63, 0x0a, 0x11, 0x61, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x36, 0xc8, 0xde, 0x1f, + 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, + 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, + 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, + 0xb0, 0x2a, 0x01, 0x52, 0x10, 0x61, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0xc5, 0x03, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, + 0x80, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, - 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x17, 0x0a, 0x15, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0x6b, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, - 0x09, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x42, 0x33, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, - 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x1e, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x50, - 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0x81, 0x01, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x60, 0x0a, 0x11, 0x61, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x33, 0xc8, - 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, - 0x2a, 0x01, 0x52, 0x10, 0x61, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x32, 0xc5, 0x03, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x80, - 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 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, 0x6d, 0x69, 0x6e, + 0x74, 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, 0x23, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, + 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x8c, 0x01, 0x0a, 0x09, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x20, 0x12, 0x1e, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x69, 0x6e, 0x74, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0xa9, 0x01, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 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, 0x6d, 0x69, 0x6e, 0x74, - 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, 0x23, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x69, - 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x8c, 0x01, 0x0a, 0x09, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, - 0x12, 0x1e, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0xa9, 0x01, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x76, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x69, - 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x75, 0x61, - 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0xc5, 0x01, 0x0a, - 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x74, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 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, - 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x6d, 0x69, 0x6e, - 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4d, 0x58, 0xaa, 0x02, - 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4d, 0x69, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4d, 0x69, - 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x4d, 0x69, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x4d, 0x69, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, + 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x75, + 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0xc5, 0x01, + 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6d, 0x69, 0x6e, + 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 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, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x6d, 0x69, + 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4d, 0x58, 0xaa, + 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4d, 0x69, 0x6e, 0x74, 0x2e, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4d, + 0x69, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4d, 0x69, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x4d, 0x69, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/cosmos/slashing/v1beta1/query.pulsar.go b/api/cosmos/slashing/v1beta1/query.pulsar.go index b28562b40da5..8e8c60e51e36 100644 --- a/api/cosmos/slashing/v1beta1/query.pulsar.go +++ b/api/cosmos/slashing/v1beta1/query.pulsar.go @@ -2931,84 +2931,84 @@ var file_cosmos_slashing_v1beta1_query_proto_rawDesc = []byte{ 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x56, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x5f, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x3b, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x73, 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, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x7e, 0x0a, - 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x10, 0x76, 0x61, 0x6c, - 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, - 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, - 0x66, 0x6f, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x76, - 0x61, 0x6c, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x62, 0x0a, - 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, - 0x6f, 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, 0xb2, 0x01, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, - 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x4c, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x09, 0xc8, 0xde, - 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 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, 0xf2, 0x03, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x12, 0x8c, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 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, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 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, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0xb1, 0x01, 0x0a, 0x0b, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, - 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, - 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, + 0x12, 0x44, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x7e, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, + 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x62, 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, + 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x09, 0xc8, 0xde, 0x1f, + 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x53, 0x69, 0x67, 0x6e, 0x69, + 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x62, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, + 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 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, 0xb2, 0x01, 0x0a, 0x19, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, + 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 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, + 0xf2, 0x03, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x8c, 0x01, 0x0a, 0x06, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, + 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 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, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, 0x2f, 0x63, + 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0xb1, 0x01, 0x0a, 0x0b, 0x53, 0x69, 0x67, + 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, + 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, + 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x2f, 0x7b, 0x63, + 0x6f, 0x6e, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xa5, 0x01, 0x0a, + 0x0c, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x31, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, + 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x7d, 0x12, 0xa5, 0x01, 0x0a, 0x0c, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, - 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, - 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, - 0x66, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x6c, 0x61, - 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x69, - 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x42, 0xe1, 0x01, 0x0a, 0x1b, - 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x3b, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x58, 0xaa, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x6c, 0x61, - 0x73, 0x68, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x23, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x5c, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x6c, - 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x66, 0x6f, 0x73, 0x42, 0xe1, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x38, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x6c, 0x61, 0x73, + 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x73, 0x6c, 0x61, + 0x73, 0x68, 0x69, 0x6e, 0x67, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, + 0x53, 0x58, 0xaa, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x53, 0x6c, 0x61, 0x73, + 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x5c, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, + 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/cosmos/slashing/v1beta1/slashing.pulsar.go b/api/cosmos/slashing/v1beta1/slashing.pulsar.go index 2eb889010244..9174c7d15828 100644 --- a/api/cosmos/slashing/v1beta1/slashing.pulsar.go +++ b/api/cosmos/slashing/v1beta1/slashing.pulsar.go @@ -1598,59 +1598,55 @@ var file_cosmos_slashing_v1beta1_slashing_proto_rawDesc = []byte{ 0x12, 0x32, 0x0a, 0x15, 0x6d, 0x69, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x6d, 0x69, 0x73, 0x73, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xc5, 0x04, 0x0a, 0x06, 0x50, + 0x6e, 0x74, 0x65, 0x72, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x8d, 0x04, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x73, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x7b, 0x0a, 0x15, 0x6d, 0x69, 0x6e, 0x5f, 0x73, + 0x73, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x69, 0x0a, 0x15, 0x6d, 0x69, 0x6e, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x48, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x9a, 0xe7, 0xb0, 0x2a, 0x10, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5f, 0x64, 0x65, 0x63, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, - 0x52, 0x12, 0x6d, 0x69, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x65, 0x72, 0x57, 0x69, - 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x5e, 0x0a, 0x16, 0x64, 0x6f, 0x77, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x5f, 0x6a, 0x61, 0x69, 0x6c, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x98, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x14, - 0x64, 0x6f, 0x77, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4a, 0x61, 0x69, 0x6c, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x85, 0x01, 0x0a, 0x1a, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x66, - 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x73, - 0x69, 0x67, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x48, 0xc8, 0xde, 0x1f, 0x00, 0xda, - 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x9a, 0xe7, 0xb0, 0x2a, 0x10, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x64, 0x65, 0x63, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0xa8, 0xe7, - 0xb0, 0x2a, 0x01, 0x52, 0x17, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x80, 0x01, 0x0a, - 0x17, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x64, 0x6f, 0x77, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x48, - 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x9a, 0xe7, - 0xb0, 0x2a, 0x10, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x64, 0x65, 0x63, 0x5f, 0x62, 0x79, - 0x74, 0x65, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x15, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x46, - 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x6f, 0x77, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x3a, - 0x21, 0x8a, 0xe7, 0xb0, 0x2a, 0x1c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, - 0x2f, 0x78, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x42, 0xe8, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x42, 0x0d, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, - 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x6c, 0x61, - 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x73, 0x6c, - 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, - 0x43, 0x53, 0x58, 0xaa, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x53, 0x6c, 0x61, - 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x5c, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x36, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, + 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x12, + 0x6d, 0x69, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x65, 0x72, 0x57, 0x69, 0x6e, 0x64, + 0x6f, 0x77, 0x12, 0x5e, 0x0a, 0x16, 0x64, 0x6f, 0x77, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6a, + 0x61, 0x69, 0x6c, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0xc8, + 0xde, 0x1f, 0x00, 0x98, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x14, 0x64, 0x6f, + 0x77, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4a, 0x61, 0x69, 0x6c, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x73, 0x0a, 0x1a, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x66, 0x72, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x36, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, + 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x17, + 0x73, 0x6c, 0x61, 0x73, 0x68, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x6f, 0x75, + 0x62, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x6e, 0x0a, 0x17, 0x73, 0x6c, 0x61, 0x73, 0x68, + 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x36, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, + 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, + 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, + 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x15, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, + 0x6f, 0x77, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x3a, 0x21, 0x8a, 0xe7, 0xb0, 0x2a, 0x1c, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, + 0x69, 0x6e, 0x67, 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xe8, 0x01, 0x0a, 0x1b, 0x63, + 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0d, 0x53, 0x6c, 0x61, 0x73, + 0x68, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x58, 0xaa, 0x02, 0x17, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, + 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, + 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, + 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, + 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/cosmos/staking/module/v1/module.pulsar.go b/api/cosmos/staking/module/v1/module.pulsar.go index dcb309d625ae..cf1f8206e072 100644 --- a/api/cosmos/staking/module/v1/module.pulsar.go +++ b/api/cosmos/staking/module/v1/module.pulsar.go @@ -60,9 +60,11 @@ func (x *_Module_1_list) IsValid() bool { } var ( - md_Module protoreflect.MessageDescriptor - fd_Module_hooks_order protoreflect.FieldDescriptor - fd_Module_authority protoreflect.FieldDescriptor + md_Module protoreflect.MessageDescriptor + fd_Module_hooks_order protoreflect.FieldDescriptor + fd_Module_authority protoreflect.FieldDescriptor + fd_Module_bech32_prefix_validator protoreflect.FieldDescriptor + fd_Module_bech32_prefix_consensus protoreflect.FieldDescriptor ) func init() { @@ -70,6 +72,8 @@ func init() { md_Module = File_cosmos_staking_module_v1_module_proto.Messages().ByName("Module") fd_Module_hooks_order = md_Module.Fields().ByName("hooks_order") fd_Module_authority = md_Module.Fields().ByName("authority") + fd_Module_bech32_prefix_validator = md_Module.Fields().ByName("bech32_prefix_validator") + fd_Module_bech32_prefix_consensus = md_Module.Fields().ByName("bech32_prefix_consensus") } var _ protoreflect.Message = (*fastReflection_Module)(nil) @@ -149,6 +153,18 @@ func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, proto return } } + if x.Bech32PrefixValidator != "" { + value := protoreflect.ValueOfString(x.Bech32PrefixValidator) + if !f(fd_Module_bech32_prefix_validator, value) { + return + } + } + if x.Bech32PrefixConsensus != "" { + value := protoreflect.ValueOfString(x.Bech32PrefixConsensus) + if !f(fd_Module_bech32_prefix_consensus, value) { + return + } + } } // Has reports whether a field is populated. @@ -168,6 +184,10 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { return len(x.HooksOrder) != 0 case "cosmos.staking.module.v1.Module.authority": return x.Authority != "" + case "cosmos.staking.module.v1.Module.bech32_prefix_validator": + return x.Bech32PrefixValidator != "" + case "cosmos.staking.module.v1.Module.bech32_prefix_consensus": + return x.Bech32PrefixConsensus != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.module.v1.Module")) @@ -188,6 +208,10 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { x.HooksOrder = nil case "cosmos.staking.module.v1.Module.authority": x.Authority = "" + case "cosmos.staking.module.v1.Module.bech32_prefix_validator": + x.Bech32PrefixValidator = "" + case "cosmos.staking.module.v1.Module.bech32_prefix_consensus": + x.Bech32PrefixConsensus = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.module.v1.Module")) @@ -213,6 +237,12 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro case "cosmos.staking.module.v1.Module.authority": value := x.Authority return protoreflect.ValueOfString(value) + case "cosmos.staking.module.v1.Module.bech32_prefix_validator": + value := x.Bech32PrefixValidator + return protoreflect.ValueOfString(value) + case "cosmos.staking.module.v1.Module.bech32_prefix_consensus": + value := x.Bech32PrefixConsensus + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.module.v1.Module")) @@ -239,6 +269,10 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto x.HooksOrder = *clv.list case "cosmos.staking.module.v1.Module.authority": x.Authority = value.Interface().(string) + case "cosmos.staking.module.v1.Module.bech32_prefix_validator": + x.Bech32PrefixValidator = value.Interface().(string) + case "cosmos.staking.module.v1.Module.bech32_prefix_consensus": + x.Bech32PrefixConsensus = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.module.v1.Module")) @@ -267,6 +301,10 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore return protoreflect.ValueOfList(value) case "cosmos.staking.module.v1.Module.authority": panic(fmt.Errorf("field authority of message cosmos.staking.module.v1.Module is not mutable")) + case "cosmos.staking.module.v1.Module.bech32_prefix_validator": + panic(fmt.Errorf("field bech32_prefix_validator of message cosmos.staking.module.v1.Module is not mutable")) + case "cosmos.staking.module.v1.Module.bech32_prefix_consensus": + panic(fmt.Errorf("field bech32_prefix_consensus of message cosmos.staking.module.v1.Module is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.module.v1.Module")) @@ -285,6 +323,10 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor return protoreflect.ValueOfList(&_Module_1_list{list: &list}) case "cosmos.staking.module.v1.Module.authority": return protoreflect.ValueOfString("") + case "cosmos.staking.module.v1.Module.bech32_prefix_validator": + return protoreflect.ValueOfString("") + case "cosmos.staking.module.v1.Module.bech32_prefix_consensus": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.module.v1.Module")) @@ -364,6 +406,14 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.Bech32PrefixValidator) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Bech32PrefixConsensus) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -393,6 +443,20 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.Bech32PrefixConsensus) > 0 { + i -= len(x.Bech32PrefixConsensus) + copy(dAtA[i:], x.Bech32PrefixConsensus) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bech32PrefixConsensus))) + i-- + dAtA[i] = 0x22 + } + if len(x.Bech32PrefixValidator) > 0 { + i -= len(x.Bech32PrefixValidator) + copy(dAtA[i:], x.Bech32PrefixValidator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bech32PrefixValidator))) + i-- + dAtA[i] = 0x1a + } if len(x.Authority) > 0 { i -= len(x.Authority) copy(dAtA[i:], x.Authority) @@ -522,6 +586,70 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { } x.Authority = 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 Bech32PrefixValidator", 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.Bech32PrefixValidator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Bech32PrefixConsensus", 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.Bech32PrefixConsensus = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -582,6 +710,10 @@ type Module struct { HooksOrder []string `protobuf:"bytes,1,rep,name=hooks_order,json=hooksOrder,proto3" json:"hooks_order,omitempty"` // authority defines the custom module authority. If not set, defaults to the governance module. Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` + // bech32_prefix_validator is the bech32 validator prefix for the app. + Bech32PrefixValidator string `protobuf:"bytes,3,opt,name=bech32_prefix_validator,json=bech32PrefixValidator,proto3" json:"bech32_prefix_validator,omitempty"` + // bech32_prefix_consensus is the bech32 consensus node prefix for the app. + Bech32PrefixConsensus string `protobuf:"bytes,4,opt,name=bech32_prefix_consensus,json=bech32PrefixConsensus,proto3" json:"bech32_prefix_consensus,omitempty"` } func (x *Module) Reset() { @@ -618,6 +750,20 @@ func (x *Module) GetAuthority() string { return "" } +func (x *Module) GetBech32PrefixValidator() string { + if x != nil { + return x.Bech32PrefixValidator + } + return "" +} + +func (x *Module) GetBech32PrefixConsensus() string { + if x != nil { + return x.Bech32PrefixConsensus + } + return "" +} + var File_cosmos_staking_module_v1_module_proto protoreflect.FileDescriptor var file_cosmos_staking_module_v1_module_proto_rawDesc = []byte{ @@ -627,29 +773,36 @@ var file_cosmos_staking_module_v1_module_proto_rawDesc = []byte{ 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x77, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x1f, 0x0a, - 0x0b, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0a, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1c, - 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x2e, 0xba, 0xc0, - 0x96, 0xda, 0x01, 0x28, 0x0a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x42, 0xe2, 0x01, 0x0a, - 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, - 0x69, 0x6e, 0x67, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 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, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x6d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x43, 0x53, 0x4d, 0xaa, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x24, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, 0x4d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x6f, 0x22, 0xe7, 0x01, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x1f, + 0x0a, 0x0b, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, + 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x36, 0x0a, + 0x17, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, + 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x5f, + 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x3a, 0x2e, 0xba, + 0xc0, 0x96, 0xda, 0x01, 0x28, 0x0a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, + 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x42, 0xe2, 0x01, + 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, + 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 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, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x4d, 0xaa, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x24, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, 0x4d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/cosmos/staking/v1beta1/genesis.pulsar.go b/api/cosmos/staking/v1beta1/genesis.pulsar.go index 38efa2056c46..09c705bdb2e7 100644 --- a/api/cosmos/staking/v1beta1/genesis.pulsar.go +++ b/api/cosmos/staking/v1beta1/genesis.pulsar.go @@ -1763,7 +1763,8 @@ type GenesisState struct { UnbondingDelegations []*UnbondingDelegation `protobuf:"bytes,6,rep,name=unbonding_delegations,json=unbondingDelegations,proto3" json:"unbonding_delegations,omitempty"` // redelegations defines the redelegations active at genesis. Redelegations []*Redelegation `protobuf:"bytes,7,rep,name=redelegations,proto3" json:"redelegations,omitempty"` - Exported bool `protobuf:"varint,8,opt,name=exported,proto3" json:"exported,omitempty"` + // exported defines a bool to identify whether the chain dealing with exported or initialized genesis. + Exported bool `protobuf:"varint,8,opt,name=exported,proto3" json:"exported,omitempty"` } func (x *GenesisState) Reset() { @@ -1901,70 +1902,70 @@ var file_cosmos_staking_v1beta1_genesis_proto_rawDesc = []byte{ 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, - 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a, 0x05, 0x0a, 0x0c, 0x47, 0x65, 0x6e, + 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, 0x05, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, - 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x5d, 0x0a, 0x10, + 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x5a, 0x0a, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x33, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x6c, 0x61, 0x73, - 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x69, 0x0a, 0x15, 0x6c, - 0x61, 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x6f, - 0x77, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, - 0x01, 0x52, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x12, 0x4c, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x09, 0xc8, - 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x73, 0x12, 0x4f, 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, - 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x6b, 0x0a, 0x15, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, - 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x14, 0x75, 0x6e, - 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x0d, 0x72, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0d, 0x72, 0x65, 0x64, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x70, - 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x65, 0x78, 0x70, - 0x6f, 0x72, 0x74, 0x65, 0x64, 0x22, 0x68, 0x0a, 0x12, 0x4c, 0x61, 0x73, 0x74, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, - 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, - 0x70, 0x6f, 0x77, 0x65, 0x72, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x42, - 0xdc, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, - 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x58, 0xaa, 0x02, 0x16, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, - 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, + 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x6f, + 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x69, 0x0a, 0x15, 0x6c, 0x61, 0x73, 0x74, + 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4c, 0x61, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x6f, + 0x77, 0x65, 0x72, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x13, + 0x6c, 0x61, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x6f, 0x77, + 0x65, 0x72, 0x73, 0x12, 0x4c, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, + 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x73, 0x12, 0x4f, 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, + 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x6b, 0x0a, 0x15, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, + 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x62, 0x6f, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, + 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x14, 0x75, 0x6e, 0x62, 0x6f, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x55, 0x0a, 0x0d, 0x72, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, + 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0d, 0x72, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, + 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, + 0x65, 0x64, 0x22, 0x68, 0x0a, 0x12, 0x4c, 0x61, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, + 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, + 0x65, 0x72, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x42, 0xdc, 0x01, 0x0a, + 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, + 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x3b, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x58, 0xaa, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xca, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x22, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/api/cosmos/staking/v1beta1/query.pulsar.go b/api/cosmos/staking/v1beta1/query.pulsar.go index b1905fe7e803..f0538f036791 100644 --- a/api/cosmos/staking/v1beta1/query.pulsar.go +++ b/api/cosmos/staking/v1beta1/query.pulsar.go @@ -14935,134 +14935,197 @@ var file_cosmos_staking_v1beta1_query_proto_rawDesc = []byte{ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x58, 0x0a, 0x15, 0x51, 0x75, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x61, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x5f, 0x61, 0x64, 0x64, 0x72, 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, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x22, 0x64, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, - 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, - 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0xab, 0x01, 0x0a, 0x20, 0x51, + 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, + 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0d, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x22, 0x64, 0x0a, + 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x09, 0xc8, + 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x22, 0xb4, 0x01, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, + 0x64, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xed, 0x01, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x7f, 0x0a, 0x14, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x20, 0xc8, 0xde, 0x1f, 0x00, + 0xaa, 0xdf, 0x1f, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x13, 0x64, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xbd, 0x01, 0x0a, 0x29, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x6e, 0x62, + 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, + 0x64, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xde, 0x01, 0x0a, 0x2a, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x6e, 0x62, + 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x13, 0x75, 0x6e, 0x62, + 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x12, + 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, + 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xad, 0x01, 0x0a, 0x16, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 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, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x48, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, + 0x72, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x76, 0x0a, 0x17, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x13, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, + 0x12, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x62, + 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 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, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x48, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, + 0x64, 0x72, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x72, 0x0a, 0x20, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x4e, 0x0a, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, + 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, + 0x22, 0xb5, 0x01, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 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, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x08, + 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xd6, 0x01, 0x0a, 0x21, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, + 0x0a, 0x14, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, + 0xb0, 0x2a, 0x01, 0x52, 0x13, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0xbe, 0x01, 0x0a, 0x29, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x3f, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, + 0x3f, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 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, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x67, 0x52, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xed, 0x01, 0x0a, 0x21, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, - 0x0a, 0x14, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x20, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, - 0x1f, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x13, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, - 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb4, 0x01, 0x0a, 0x29, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x6e, 0x62, 0x6f, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 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, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0xde, 0x01, 0x0a, 0x2a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, - 0x0a, 0x13, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, - 0xb0, 0x2a, 0x01, 0x52, 0x12, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0xa4, 0x01, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0e, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 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, 0x0d, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x3f, 0x0a, 0x0e, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0d, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x3a, 0x08, 0x88, - 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x76, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x13, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x12, 0x64, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0xad, 0x01, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x5f, 0x61, 0x64, 0x64, 0x72, 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, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x12, 0x3f, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, - 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x41, 0x64, 0x64, 0x72, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, - 0x72, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x62, - 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x75, 0x6e, 0x62, - 0x6f, 0x6e, 0x64, 0x22, 0xb5, 0x01, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 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, 0x0d, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xd6, 0x01, 0x0a, 0x21, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, + 0x1f, 0x00, 0x22, 0xde, 0x01, 0x0a, 0x2a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x68, 0x0a, 0x14, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x09, 0xc8, 0xde, 0x1f, - 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x13, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xbe, 0x01, 0x0a, 0x29, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x65, 0x12, 0x67, 0x0a, 0x13, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, + 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x12, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0xd0, 0x02, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x64, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x3f, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, + 0x64, 0x64, 0x72, 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, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, + 0x64, 0x72, 0x12, 0x4f, 0x0a, 0x12, 0x73, 0x72, 0x63, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, + 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x10, 0x73, 0x72, 0x63, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x12, 0x4f, 0x0a, 0x12, 0x64, 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x52, 0x10, 0x64, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x04, 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, 0x3a, 0x08, 0x88, 0xa0, + 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xd5, 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x16, 0x72, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, + 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x15, + 0x72, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb4, + 0x01, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 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, @@ -15072,311 +15135,253 @@ var file_cosmos_staking_v1beta1_query_proto_rawDesc = []byte{ 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, 0x3a, 0x08, 0x88, 0xa0, 0x1f, - 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xde, 0x01, 0x0a, 0x2a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x13, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x62, 0x6f, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, - 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x12, 0x75, 0x6e, 0x62, 0x6f, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x47, 0x0a, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xbe, 0x02, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xb9, 0x01, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0a, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0xb5, 0x01, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 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, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x46, 0x0a, 0x12, 0x73, 0x72, 0x63, 0x5f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x73, 0x72, 0x63, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x46, 0x0a, - 0x12, 0x64, 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x18, 0x03, 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, 0x10, 0x64, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x04, 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, 0x3a, 0x08, 0x88, - 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xd5, 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x16, 0x72, 0x65, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, - 0x15, 0x72, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0xb4, 0x01, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x5f, 0x61, 0x64, 0x64, 0x72, 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, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x08, 0x88, 0xa0, - 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xb9, 0x01, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0a, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x48, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, + 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x3a, + 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x6d, 0x0a, 0x1f, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x09, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0xac, 0x01, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 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, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x3f, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, - 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, - 0x00, 0x22, 0x6d, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, - 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x22, 0x34, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, - 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, - 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, - 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x59, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, - 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x68, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x48, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x68, 0x69, 0x73, - 0x74, 0x22, 0x12, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x50, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, - 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x70, 0x6f, - 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x6f, 0x72, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x34, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x59, + 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, + 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, + 0x04, 0x68, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x68, 0x69, 0x73, 0x74, 0x22, 0x12, 0x0a, 0x10, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x50, 0x0a, + 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x70, 0x6f, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x42, 0x09, + 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x04, 0x70, 0x6f, 0x6f, 0x6c, 0x22, + 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x58, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x06, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, + 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, + 0xb0, 0x16, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x9e, 0x01, 0x0a, 0x0a, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, - 0x01, 0x52, 0x04, 0x70, 0x6f, 0x6f, 0x6c, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x58, 0x0a, - 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, 0xb0, 0x16, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x12, 0x9e, 0x01, 0x0a, 0x0a, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, - 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x2f, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x73, 0x12, 0xac, 0x01, 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x40, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, - 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x7d, 0x12, 0xd9, 0x01, 0x0a, 0x14, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x2e, 0x63, 0x6f, 0x73, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x88, 0xe7, 0xb0, 0x2a, 0x01, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0xac, 0x01, 0x0a, 0x09, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x12, 0xd9, 0x01, 0x0a, 0x14, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4c, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x41, 0x12, 0x3f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xfe, 0x01, 0x0a, 0x1d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, + 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x42, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x4c, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x41, 0x12, 0x3f, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, - 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x7d, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xfe, 0x01, - 0x0a, 0x1d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x6e, 0x62, 0x6f, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x41, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x42, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x56, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x4b, 0x12, 0x49, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x6f, 0x72, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x56, + 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4b, 0x12, 0x49, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, + 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, + 0x2f, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xcc, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5d, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x52, 0x12, 0x50, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x2f, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xcc, - 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x2e, + 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x7d, 0x12, 0xfc, 0x01, 0x0a, 0x13, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x62, 0x6f, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x72, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x67, 0x12, 0x65, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x7d, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, + 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x2f, + 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xce, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5d, - 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x52, 0x12, 0x50, 0x2f, 0x63, 0x6f, + 0x67, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x44, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x41, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, + 0x34, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x7d, 0x12, 0xfe, 0x01, 0x0a, 0x1d, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x55, + 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x42, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x56, + 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4b, 0x12, 0x49, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, - 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, - 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x64, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x12, 0xfc, 0x01, - 0x0a, 0x13, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x62, - 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x72, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x67, 0x12, 0x65, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x2f, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xce, 0x01, 0x0a, - 0x14, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x39, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x88, 0xe7, 0xb0, 0x2a, - 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x64, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x12, 0xfe, 0x01, - 0x0a, 0x1d, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x6e, 0x62, 0x6f, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x41, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x42, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x56, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x4b, 0x12, 0x49, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x2f, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xc6, - 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x43, 0x12, 0x41, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x2f, 0x72, 0x65, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xd5, 0x01, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, - 0x37, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, + 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, + 0x2f, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xc6, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x64, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x4b, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x12, - 0x3e, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x7d, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, - 0xe3, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x36, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x4e, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x43, 0x12, 0x41, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, + 0x2f, 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x7d, 0x2f, 0x72, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0xd5, 0x01, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x37, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x88, 0xe7, 0xb0, 0x2a, + 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x12, 0x3e, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0xe3, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x36, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5c, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x51, 0x12, 0x4f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x7d, 0x12, 0xb8, 0x01, 0x0a, 0x0e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, - 0x69, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, - 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x3d, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, - 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x7b, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x7d, - 0x12, 0x86, 0x01, 0x0a, 0x04, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, - 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x12, 0x8e, 0x01, 0x0a, 0x06, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x5c, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x51, 0x12, 0x4f, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, + 0x2f, 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x7d, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x12, 0xb8, 0x01, + 0x0a, 0x0e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, + 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 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, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 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, 0x2b, 0x88, - 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xda, 0x01, 0x0a, 0x1a, 0x63, - 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, - 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x3b, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, - 0x02, 0x03, 0x43, 0x53, 0x58, 0xaa, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x53, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, - 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x88, 0xe7, 0xb0, 0x2a, 0x01, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2f, + 0x7b, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x7d, 0x12, 0x86, 0x01, 0x0a, 0x04, 0x50, 0x6f, 0x6f, + 0x6c, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x6f, 0x6f, + 0x6c, 0x12, 0x8e, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2a, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 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, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 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, 0x2b, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x42, 0xda, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x36, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x58, 0xaa, 0x02, 0x16, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, + 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, + 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, + 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/cosmos/staking/v1beta1/staking.pulsar.go b/api/cosmos/staking/v1beta1/staking.pulsar.go index a86d038bb8ab..9ec8314f45ca 100644 --- a/api/cosmos/staking/v1beta1/staking.pulsar.go +++ b/api/cosmos/staking/v1beta1/staking.pulsar.go @@ -13395,9 +13395,9 @@ type Delegation struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // delegator_address is the bech32-encoded address of the delegator. + // delegator_address is the encoded address of the delegator. DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` - // validator_address is the bech32-encoded address of the validator. + // validator_address is the encoded address of the validator. ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` // shares define the delegation shares received. Shares string `protobuf:"bytes,3,opt,name=shares,proto3" json:"shares,omitempty"` @@ -13451,9 +13451,9 @@ type UnbondingDelegation struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // delegator_address is the bech32-encoded address of the delegator. + // delegator_address is the encoded address of the delegator. DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` - // validator_address is the bech32-encoded address of the validator. + // validator_address is the encoded address of the validator. ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` // entries are the unbonding delegation entries. Entries []*UnbondingDelegationEntry `protobuf:"bytes,3,rep,name=entries,proto3" json:"entries,omitempty"` // unbonding delegation entries @@ -14062,377 +14062,368 @@ var file_cosmos_staking_v1beta1_staking_proto_rawDesc = []byte{ 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x22, - 0xb7, 0x02, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, - 0x74, 0x65, 0x73, 0x12, 0x55, 0x0a, 0x04, 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x41, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, - 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, - 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x04, 0x72, 0x61, 0x74, 0x65, 0x12, 0x5c, 0x0a, 0x08, 0x6d, 0x61, - 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x41, 0xc8, 0xde, - 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, - 0x07, 0x6d, 0x61, 0x78, 0x52, 0x61, 0x74, 0x65, 0x12, 0x69, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, - 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x41, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, - 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, - 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, - 0x61, 0x74, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xc1, 0x01, 0x0a, 0x0a, 0x43, 0x6f, - 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x61, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x73, 0x42, 0x0d, 0xc8, 0xde, 0x1f, - 0x00, 0xd0, 0xde, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x0b, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 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, 0x42, 0x0d, 0xc8, 0xde, - 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xa8, 0x01, - 0x0a, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, - 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x12, 0x29, 0x0a, - 0x10, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, - 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xb7, 0x07, 0x0a, 0x09, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x43, 0x0a, 0x10, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x6f, 0x72, 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, 0x0f, 0x6f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x59, 0x0a, 0x10, 0x63, - 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x18, 0xca, 0xb4, 0x2d, - 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x50, - 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, - 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6a, 0x61, 0x69, 0x6c, 0x65, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6a, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x3a, - 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x6f, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x54, 0x0a, 0x06, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, - 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, - 0x12, 0x67, 0x0a, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x68, - 0x61, 0x72, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, - 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x53, 0x68, 0x61, 0x72, 0x65, 0x73, 0x12, 0x50, 0x0a, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x75, - 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x50, 0x0a, 0x0e, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 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, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, - 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0d, 0x75, 0x6e, 0x62, 0x6f, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4d, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x63, 0x6f, 0x6d, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x6c, 0x0a, 0x13, 0x6d, 0x69, 0x6e, 0x5f, 0x73, - 0x65, 0x6c, 0x66, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, - 0x6e, 0x74, 0x52, 0x11, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x6c, 0x66, 0x44, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x1b, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x5f, 0x6f, 0x6e, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x75, 0x6e, 0x62, 0x6f, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4f, 0x6e, 0x48, 0x6f, 0x6c, 0x64, 0x52, 0x65, 0x66, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0c, 0x75, 0x6e, 0x62, 0x6f, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, - 0x1f, 0x00, 0x22, 0x46, 0x0a, 0x0c, 0x56, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x06, 0x44, - 0x56, 0x50, 0x61, 0x69, 0x72, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 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, 0x10, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x45, 0x0a, 0x11, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x96, 0x02, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, + 0x74, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x04, 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x36, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, + 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x04, 0x72, 0x61, 0x74, 0x65, 0x12, + 0x51, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x36, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, + 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x52, 0x61, + 0x74, 0x65, 0x12, 0x5e, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36, 0xc8, 0xde, 0x1f, + 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, + 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, + 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, + 0xb0, 0x2a, 0x01, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, + 0x74, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xc1, 0x01, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x61, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x73, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, + 0xd0, 0xde, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x0b, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 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, 0x42, 0x0d, 0xc8, 0xde, 0x1f, + 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xa8, 0x01, 0x0a, + 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, + 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, + 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x10, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, + 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x8a, 0x07, 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x43, 0x0a, 0x10, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 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, 0x0f, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x59, 0x0a, 0x10, 0x63, 0x6f, + 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x18, 0xca, 0xb4, 0x2d, 0x14, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x50, 0x75, + 0x62, 0x4b, 0x65, 0x79, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, + 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6a, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6a, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x3a, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x6f, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x43, 0x0a, 0x06, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, + 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, + 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x5c, + 0x0a, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x68, 0x61, 0x72, + 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, + 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, + 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, + 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0f, 0x64, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x68, 0x61, 0x72, 0x65, 0x73, 0x12, 0x50, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, + 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, + 0x0a, 0x10, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x50, 0x0a, 0x0e, 0x75, 0x6e, 0x62, + 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 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, 0x42, 0x0d, 0xc8, + 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0d, 0x75, 0x6e, + 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4d, 0x0a, 0x0a, 0x63, + 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5b, 0x0a, 0x13, 0x6d, 0x69, + 0x6e, 0x5f, 0x73, 0x65, 0x6c, 0x66, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, + 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, + 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x11, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x6c, 0x66, 0x44, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x1b, 0x75, 0x6e, 0x62, 0x6f, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x6e, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x72, 0x65, 0x66, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x75, 0x6e, + 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4f, 0x6e, 0x48, 0x6f, 0x6c, 0x64, 0x52, 0x65, 0x66, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0c, 0x75, 0x6e, + 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, + 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x46, 0x0a, 0x0c, 0x56, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 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, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x4a, 0x0a, - 0x07, 0x44, 0x56, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x3f, 0x0a, 0x05, 0x70, 0x61, 0x69, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x67, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x22, 0xa9, 0x01, 0x0a, + 0x06, 0x44, 0x56, 0x50, 0x61, 0x69, 0x72, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 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, 0x10, 0x64, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4e, + 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x08, + 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x4a, 0x0a, 0x07, 0x44, 0x56, 0x50, 0x61, + 0x69, 0x72, 0x73, 0x12, 0x3f, 0x0a, 0x05, 0x70, 0x61, 0x69, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x56, 0x50, 0x61, + 0x69, 0x72, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, 0x70, + 0x61, 0x69, 0x72, 0x73, 0x22, 0x8b, 0x02, 0x0a, 0x0a, 0x44, 0x56, 0x56, 0x54, 0x72, 0x69, 0x70, + 0x6c, 0x65, 0x74, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, + 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, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x55, 0x0a, 0x15, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x72, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x13, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x72, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x55, 0x0a, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, + 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x13, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x73, + 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, + 0x1f, 0x00, 0x22, 0x58, 0x0a, 0x0b, 0x44, 0x56, 0x56, 0x54, 0x72, 0x69, 0x70, 0x6c, 0x65, 0x74, + 0x73, 0x12, 0x49, 0x0a, 0x08, 0x74, 0x72, 0x69, 0x70, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x56, 0x56, + 0x54, 0x72, 0x69, 0x70, 0x6c, 0x65, 0x74, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x08, 0x74, 0x72, 0x69, 0x70, 0x6c, 0x65, 0x74, 0x73, 0x22, 0xf8, 0x01, 0x0a, + 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x11, 0x64, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 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, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, + 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x49, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, + 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x3a, 0x08, 0x88, + 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x8d, 0x02, 0x0a, 0x13, 0x55, 0x6e, 0x62, 0x6f, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 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, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x55, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x44, 0x56, 0x50, 0x61, 0x69, 0x72, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, - 0x2a, 0x01, 0x52, 0x05, 0x70, 0x61, 0x69, 0x72, 0x73, 0x22, 0xf9, 0x01, 0x0a, 0x0a, 0x44, 0x56, - 0x56, 0x54, 0x72, 0x69, 0x70, 0x6c, 0x65, 0x74, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, + 0x2e, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, + 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x08, 0x88, + 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x9b, 0x03, 0x0a, 0x18, 0x55, 0x6e, 0x62, 0x6f, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x52, 0x0a, + 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x02, 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, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, + 0x01, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x62, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, + 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, + 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, + 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x45, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, + 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, + 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x49, + 0x64, 0x12, 0x3c, 0x0a, 0x1b, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6f, + 0x6e, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x4f, 0x6e, 0x48, 0x6f, 0x6c, 0x64, 0x52, 0x65, 0x66, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x3a, + 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x9f, 0x03, 0x0a, 0x11, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x12, 0x52, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 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, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, + 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x6c, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, + 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0e, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x50, + 0x0a, 0x0a, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x5f, 0x64, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, + 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x44, 0x73, 0x74, + 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x1b, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x5f, 0x6f, 0x6e, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x4f, 0x6e, 0x48, 0x6f, 0x6c, 0x64, 0x52, 0x65, 0x66, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xdd, 0x02, 0x0a, 0x0c, 0x52, 0x65, 0x64, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 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, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x4c, 0x0a, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x72, 0x63, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, - 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x55, 0x0a, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x72, 0x63, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, + 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x13, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x72, 0x63, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x55, 0x0a, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x13, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x53, 0x72, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4c, 0x0a, - 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x73, 0x74, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 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, 0x13, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x44, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, - 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x58, 0x0a, 0x0b, 0x44, 0x56, 0x56, 0x54, 0x72, 0x69, 0x70, - 0x6c, 0x65, 0x74, 0x73, 0x12, 0x49, 0x0a, 0x08, 0x74, 0x72, 0x69, 0x70, 0x6c, 0x65, 0x74, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x44, 0x56, 0x56, 0x54, 0x72, 0x69, 0x70, 0x6c, 0x65, 0x74, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, - 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x74, 0x72, 0x69, 0x70, 0x6c, 0x65, 0x74, 0x73, 0x22, - 0xfa, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, - 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 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, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x45, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x54, 0x0a, 0x06, - 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, - 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, - 0x65, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x84, 0x02, 0x0a, - 0x13, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 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, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x45, 0x0a, 0x11, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x55, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x62, - 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, - 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, - 0xa0, 0x1f, 0x00, 0x22, 0xbd, 0x03, 0x0a, 0x18, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x52, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, - 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 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, 0x42, 0x0d, - 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x63, - 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x65, 0x0a, - 0x0f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x42, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x12, 0x56, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x49, 0x6e, 0x74, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, - 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0b, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, - 0x3c, 0x0a, 0x1b, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x6e, 0x5f, - 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4f, - 0x6e, 0x48, 0x6f, 0x6c, 0x64, 0x52, 0x65, 0x66, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x04, 0xe8, - 0xa0, 0x1f, 0x01, 0x22, 0xbb, 0x03, 0x0a, 0x11, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x12, 0x52, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 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, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, - 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x65, 0x0a, 0x0f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, - 0x6c, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xd2, - 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0e, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x5b, 0x0a, - 0x0a, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x5f, 0x64, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, - 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, - 0x09, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x44, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e, - 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0b, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x3c, 0x0a, - 0x1b, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x6e, 0x5f, 0x68, 0x6f, - 0x6c, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x17, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4f, 0x6e, 0x48, - 0x6f, 0x6c, 0x64, 0x52, 0x65, 0x66, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, - 0x01, 0x22, 0xcb, 0x02, 0x0a, 0x0c, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 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, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4c, 0x0a, 0x15, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x72, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x13, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x72, 0x63, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4c, 0x0a, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x03, 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, 0x13, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x73, 0x74, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4e, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x65, 0x6e, - 0x74, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, - 0xa7, 0x03, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x4f, 0x0a, 0x0e, 0x75, 0x6e, - 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0xc8, - 0xde, 0x1f, 0x00, 0x98, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0d, 0x75, 0x6e, - 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6d, - 0x61, 0x78, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x45, 0x6e, 0x74, 0x72, - 0x69, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, - 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x11, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x69, - 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x6e, 0x64, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6f, 0x6e, 0x64, 0x44, 0x65, 0x6e, 0x6f, - 0x6d, 0x12, 0x8f, 0x01, 0x0a, 0x13, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x5f, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xf2, - 0xde, 0x1f, 0x1a, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6d, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x22, 0xd2, 0xb4, 0x2d, - 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, - 0x52, 0x11, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x61, 0x74, 0x65, 0x3a, 0x24, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xa9, 0x01, 0x0a, 0x12, 0x44, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4d, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, - 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x3e, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, - 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x3a, - 0x04, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xde, 0x01, 0x0a, 0x19, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x12, 0x72, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, - 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x11, 0x72, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x56, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, - 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, - 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xc9, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x64, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x53, 0x0a, 0x0c, 0x72, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, - 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, - 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x56, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, - 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, - 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x04, 0xe8, 0xa0, - 0x1f, 0x00, 0x22, 0x8e, 0x02, 0x0a, 0x04, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x82, 0x01, 0x0a, 0x11, - 0x6e, 0x6f, 0x74, 0x5f, 0x62, 0x6f, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x56, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, - 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xea, 0xde, 0x1f, 0x11, 0x6e, 0x6f, 0x74, 0x5f, 0x62, - 0x6f, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0xd2, 0xb4, 0x2d, 0x0a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, - 0x0f, 0x6e, 0x6f, 0x74, 0x42, 0x6f, 0x6e, 0x64, 0x65, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, - 0x12, 0x77, 0x0a, 0x0d, 0x62, 0x6f, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x52, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, - 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xea, 0xde, 0x1f, 0x0d, 0x62, 0x6f, 0x6e, 0x64, 0x65, - 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0c, 0x62, 0x6f, 0x6e, - 0x64, 0x65, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x3a, 0x08, 0xe8, 0xa0, 0x1f, 0x01, 0xf0, - 0xa0, 0x1f, 0x01, 0x22, 0x59, 0x0a, 0x10, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, - 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x2a, 0xb6, - 0x01, 0x0a, 0x0a, 0x42, 0x6f, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2c, 0x0a, - 0x17, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x0f, 0x8a, 0x9d, 0x20, 0x0b, - 0x55, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x14, 0x42, - 0x4f, 0x4e, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x42, 0x4f, 0x4e, - 0x44, 0x45, 0x44, 0x10, 0x01, 0x1a, 0x0c, 0x8a, 0x9d, 0x20, 0x08, 0x55, 0x6e, 0x62, 0x6f, 0x6e, - 0x64, 0x65, 0x64, 0x12, 0x28, 0x0a, 0x15, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x42, 0x4f, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x1a, 0x0d, - 0x8a, 0x9d, 0x20, 0x09, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x22, 0x0a, - 0x12, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x42, 0x4f, 0x4e, - 0x44, 0x45, 0x44, 0x10, 0x03, 0x1a, 0x0a, 0x8a, 0x9d, 0x20, 0x06, 0x42, 0x6f, 0x6e, 0x64, 0x65, - 0x64, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x2a, 0x5d, 0x0a, 0x0a, 0x49, 0x6e, 0x66, 0x72, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x16, 0x49, 0x4e, 0x46, 0x52, 0x41, 0x43, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x49, 0x4e, 0x46, 0x52, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x10, 0x01, 0x12, 0x17, 0x0a, - 0x13, 0x49, 0x4e, 0x46, 0x52, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x4f, 0x57, 0x4e, - 0x54, 0x49, 0x4d, 0x45, 0x10, 0x02, 0x42, 0xdc, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, + 0x74, 0x6f, 0x72, 0x44, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4e, 0x0a, + 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, + 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x08, 0x88, + 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x9c, 0x03, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x4f, 0x0a, 0x0e, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x98, 0xdf, 0x1f, 0x01, 0xa8, + 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0d, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x6d, 0x61, 0x78, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, + 0x78, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0a, 0x6d, 0x61, 0x78, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x68, + 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, + 0x63, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6f, + 0x6e, 0x64, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x62, 0x6f, 0x6e, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x84, 0x01, 0x0a, 0x13, 0x6d, 0x69, + 0x6e, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x54, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, + 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, + 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xf2, 0xde, 0x1f, 0x1a, + 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x22, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x11, 0x6d, + 0x69, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, + 0x3a, 0x24, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xa9, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, + 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x07, + 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, + 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x3a, 0x04, 0xe8, 0xa0, + 0x1f, 0x00, 0x22, 0xcd, 0x01, 0x0a, 0x19, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x63, 0x0a, 0x12, 0x72, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, - 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, - 0x43, 0x53, 0x58, 0xaa, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x53, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x16, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x11, 0x72, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x45, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, + 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x49, 0x6e, 0x74, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x3a, 0x04, 0xe8, 0xa0, + 0x1f, 0x01, 0x22, 0xc9, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0c, 0x72, + 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x64, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x56, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x64, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, + 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xeb, + 0x01, 0x0a, 0x04, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x71, 0x0a, 0x11, 0x6e, 0x6f, 0x74, 0x5f, 0x62, + 0x6f, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x45, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, + 0x74, 0xea, 0xde, 0x1f, 0x11, 0x6e, 0x6f, 0x74, 0x5f, 0x62, 0x6f, 0x6e, 0x64, 0x65, 0x64, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0f, 0x6e, 0x6f, 0x74, 0x42, 0x6f, + 0x6e, 0x64, 0x65, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x66, 0x0a, 0x0d, 0x62, 0x6f, + 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x41, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, + 0xea, 0xde, 0x1f, 0x0d, 0x62, 0x6f, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x73, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, + 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0c, 0x62, 0x6f, 0x6e, 0x64, 0x65, 0x64, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x73, 0x3a, 0x08, 0xe8, 0xa0, 0x1f, 0x01, 0xf0, 0xa0, 0x1f, 0x01, 0x22, 0x59, 0x0a, 0x10, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, + 0x12, 0x45, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, + 0x62, 0x63, 0x69, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x2a, 0xb6, 0x01, 0x0a, 0x0a, 0x42, 0x6f, 0x6e, 0x64, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2c, 0x0a, 0x17, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x1a, 0x0f, 0x8a, 0x9d, 0x20, 0x0b, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x14, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x42, 0x4f, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x01, 0x1a, 0x0c, + 0x8a, 0x9d, 0x20, 0x08, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x28, 0x0a, 0x15, + 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x42, 0x4f, + 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x1a, 0x0d, 0x8a, 0x9d, 0x20, 0x09, 0x55, 0x6e, 0x62, + 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x22, 0x0a, 0x12, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x42, 0x4f, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x03, 0x1a, 0x0a, + 0x8a, 0x9d, 0x20, 0x06, 0x42, 0x6f, 0x6e, 0x64, 0x65, 0x64, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, + 0x2a, 0x5d, 0x0a, 0x0a, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, + 0x0a, 0x16, 0x49, 0x4e, 0x46, 0x52, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x49, 0x4e, + 0x46, 0x52, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x5f, + 0x53, 0x49, 0x47, 0x4e, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x4e, 0x46, 0x52, 0x41, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x02, 0x42, + 0xdc, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, + 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x58, 0xaa, 0x02, 0x16, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, + 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x74, + 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/cosmos/staking/v1beta1/tx.pulsar.go b/api/cosmos/staking/v1beta1/tx.pulsar.go index 39cb6d1aca38..36214b35c38e 100644 --- a/api/cosmos/staking/v1beta1/tx.pulsar.go +++ b/api/cosmos/staking/v1beta1/tx.pulsar.go @@ -7793,7 +7793,7 @@ var file_cosmos_staking_v1beta1_tx_proto_rawDesc = []byte{ 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, - 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8c, 0x05, 0x0a, 0x12, 0x4d, 0x73, 0x67, + 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfb, 0x04, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x50, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, @@ -7805,252 +7805,249 @@ var file_cosmos_staking_v1beta1_tx_proto_rawDesc = []byte{ 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x71, 0x0a, 0x13, 0x6d, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x6c, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x60, 0x0a, 0x13, 0x6d, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x6c, 0x66, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x41, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, - 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, - 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x11, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x6c, 0x66, 0x44, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x1a, 0x18, 0x01, 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, - 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, + 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, + 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, + 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x11, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x6c, 0x66, 0x44, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x1a, 0x18, 0x01, 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, 0x10, + 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, + 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x46, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x06, 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, 0x18, 0xca, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, + 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, + 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x40, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, + 0xb0, 0x2a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x8a, 0xe7, 0xb0, 0x2a, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, + 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa5, 0x03, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x50, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x11, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x56, 0x0a, 0x0f, 0x63, + 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x2d, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, + 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x44, 0x65, 0x63, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x61, 0x74, 0x65, 0x12, 0x57, 0x0a, 0x13, 0x6d, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x6c, 0x66, 0x5f, + 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x27, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, + 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x11, 0x6d, 0x69, 0x6e, 0x53, 0x65, + 0x6c, 0x66, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3e, 0x88, 0xa0, + 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x8a, 0xe7, 0xb0, 0x2a, + 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x45, + 0x64, 0x69, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x1a, 0x0a, 0x18, + 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9d, 0x02, 0x0a, 0x0b, 0x4d, 0x73, 0x67, + 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x6f, 0x72, 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, 0x10, 0x64, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x3c, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, + 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x39, 0x88, + 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x64, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x8a, 0xe7, 0xb0, + 0x2a, 0x16, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, + 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x44, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x89, 0x03, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x64, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 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, 0x10, 0x64, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x55, 0x0a, + 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x72, 0x63, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x46, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x06, 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, 0x18, 0xca, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, - 0x79, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, - 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x40, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, - 0xe7, 0xb0, 0x2a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x8a, 0xe7, 0xb0, 0x2a, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc1, 0x03, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, - 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x50, 0x0a, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x11, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x61, 0x0a, 0x0f, - 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x38, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, - 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, - 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x12, - 0x68, 0x0a, 0x13, 0x6d, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x6c, 0x66, 0x5f, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x38, 0xda, 0xde, - 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x11, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x6c, 0x66, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3e, 0x88, 0xa0, 0x1f, 0x00, 0xe8, - 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, - 0x45, 0x64, 0x69, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9d, 0x02, 0x0a, 0x0b, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 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, 0x10, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4e, 0x0a, 0x11, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3c, 0x0a, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, - 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x39, 0x88, 0xa0, 0x1f, 0x00, - 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x89, 0x03, 0x0a, - 0x12, 0x4d, 0x73, 0x67, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x65, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 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, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x55, 0x0a, 0x15, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x72, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x13, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x72, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x55, 0x0a, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, - 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x13, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x72, 0x63, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x55, 0x0a, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x5f, 0x64, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x13, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x44, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3c, 0x0a, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, + 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x40, 0x88, 0xa0, 0x1f, 0x00, 0xe8, + 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x8a, 0xe7, 0xb0, 0x2a, 0x1d, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x42, 0x65, 0x67, 0x69, + 0x6e, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x22, 0x70, 0x0a, 0x1a, 0x4d, + 0x73, 0x67, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, + 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 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, 0x42, 0x0d, + 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x63, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xa1, 0x02, + 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, + 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 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, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3c, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, + 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x3b, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, + 0xb0, 0x2a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, + 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x22, 0xa9, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0f, 0x63, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, + 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, + 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, + 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x3c, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, + 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xe8, 0x02, + 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x6e, 0x62, 0x6f, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, + 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 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, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x13, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x73, - 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3c, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, - 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x40, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, - 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x8a, 0xe7, 0xb0, 0x2a, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x52, 0x65, - 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x22, 0x70, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x42, - 0x65, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 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, 0x42, 0x0d, 0xc8, 0xde, 0x1f, - 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, - 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xa1, 0x02, 0x0a, 0x0d, 0x4d, - 0x73, 0x67, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x45, 0x0a, 0x11, - 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3c, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, + 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x4a, 0x88, 0xa0, + 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x8a, 0xe7, 0xb0, 0x2a, + 0x27, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x43, + 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x26, 0x0a, 0x24, 0x4d, 0x73, 0x67, 0x43, + 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0xc5, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, - 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x3c, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, - 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x3a, 0x3b, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x11, - 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, - 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x22, 0xa9, - 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, - 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 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, 0x42, 0x0d, 0xc8, - 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x63, 0x6f, - 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, - 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xe8, 0x02, 0x0a, 0x1c, 0x4d, - 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x11, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 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, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, - 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x3c, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, - 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x4a, 0x88, 0xa0, 0x1f, 0x00, 0xe8, - 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x8a, 0xe7, 0xb0, 0x2a, 0x27, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, - 0x65, 0x6c, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x26, 0x0a, 0x24, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, - 0x65, 0x6c, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc5, 0x01, - 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, - 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x37, 0x82, 0xe7, - 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, - 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x73, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x32, 0x9d, 0x06, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x71, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2a, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x0d, 0x45, - 0x64, 0x69, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x28, 0x2e, 0x63, + 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x41, 0x0a, 0x06, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x08, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x0f, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x52, - 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, + 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, + 0x37, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, + 0xe7, 0xb0, 0x2a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, + 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x32, 0x9d, 0x06, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x71, 0x0a, 0x0f, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2a, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, + 0x0a, 0x0d, 0x45, 0x64, 0x69, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, + 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x64, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x0a, 0x55, 0x6e, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x08, 0x44, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x1a, 0x2d, + 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x1a, 0x2b, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x0f, 0x42, 0x65, 0x67, + 0x69, 0x6e, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x52, 0x65, + 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x0a, + 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x1a, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, + 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x8f, 0x01, 0x0a, 0x19, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x6e, 0x62, 0x6f, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x64, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8f, 0x01, - 0x0a, 0x19, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x2e, 0x63, 0x6f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x3c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, + 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x68, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x6e, - 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x1a, 0x3c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, - 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x68, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, - 0x42, 0xd7, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, - 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x3b, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x58, 0xaa, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xca, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x22, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, + 0xb0, 0x2a, 0x01, 0x42, 0xd7, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x58, 0xaa, 0x02, 0x16, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, + 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x22, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/cosmos/tx/signing/v1beta1/signing.pulsar.go b/api/cosmos/tx/signing/v1beta1/signing.pulsar.go index 0e6c12827053..831e47585df9 100644 --- a/api/cosmos/tx/signing/v1beta1/signing.pulsar.go +++ b/api/cosmos/tx/signing/v1beta1/signing.pulsar.go @@ -2723,14 +2723,13 @@ const ( SignMode_SIGN_MODE_DIRECT SignMode = 1 // SIGN_MODE_TEXTUAL is a future signing mode that will verify some // human-readable textual representation on top of the binary representation - // from SIGN_MODE_DIRECT. It is currently experimental, and should be used - // for testing purposes only, until Textual is fully released. Please follow - // the tracking issue https://github.com/cosmos/cosmos-sdk/issues/11970. + // from SIGN_MODE_DIRECT. + // + // Since: cosmos-sdk 0.50 SignMode_SIGN_MODE_TEXTUAL SignMode = 2 // SIGN_MODE_DIRECT_AUX specifies a signing mode which uses // SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not - // require signers signing over other signers' `signer_info`. It also allows - // for adding Tips in transactions. + // require signers signing over other signers' `signer_info`. // // Since: cosmos-sdk 0.46 SignMode_SIGN_MODE_DIRECT_AUX SignMode = 3 diff --git a/api/cosmos/tx/v1beta1/tx.pulsar.go b/api/cosmos/tx/v1beta1/tx.pulsar.go index e96c797a907f..4b00dac60a64 100644 --- a/api/cosmos/tx/v1beta1/tx.pulsar.go +++ b/api/cosmos/tx/v1beta1/tx.pulsar.go @@ -8329,12 +8329,9 @@ type SignDocDirectAux struct { AccountNumber uint64 `protobuf:"varint,4,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` // sequence is the sequence number of the signing account. Sequence uint64 `protobuf:"varint,5,opt,name=sequence,proto3" json:"sequence,omitempty"` - // Tip is the optional tip used for transactions fees paid in another denom. - // It should be left empty if the signer is not the tipper for this - // transaction. + // tips have been depreacted and should not be used // - // This field is ignored if the chain didn't enable tips, i.e. didn't add the - // `TipDecorator` in its posthandler. + // Deprecated: Do not use. Tip *Tip `protobuf:"bytes,6,opt,name=tip,proto3" json:"tip,omitempty"` } @@ -8393,6 +8390,7 @@ func (x *SignDocDirectAux) GetSequence() uint64 { return 0 } +// Deprecated: Do not use. func (x *SignDocDirectAux) GetTip() *Tip { if x != nil { return x.Tip @@ -8509,6 +8507,8 @@ type AuthInfo struct { // `TipDecorator` in its posthandler. // // Since: cosmos-sdk 0.46 + // + // Deprecated: Do not use. Tip *Tip `protobuf:"bytes,3,opt,name=tip,proto3" json:"tip,omitempty"` } @@ -8546,6 +8546,7 @@ func (x *AuthInfo) GetFee() *Fee { return nil } +// Deprecated: Do not use. func (x *AuthInfo) GetTip() *Tip { if x != nil { return x.Tip @@ -8763,6 +8764,8 @@ func (x *Fee) GetGranter() string { // Tip is the tip used for meta-transactions. // // Since: cosmos-sdk 0.46 +// +// Deprecated: Do not use. type Tip struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -9011,7 +9014,7 @@ var file_cosmos_tx_v1beta1_tx_proto_rawDesc = []byte{ 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xee, 0x01, 0x0a, 0x10, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xf2, 0x01, 0x0a, 0x10, 0x53, 0x69, 0x67, 0x6e, 0x44, 0x6f, 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x75, 0x78, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x6f, 0x64, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, @@ -9024,121 +9027,122 @@ var file_cosmos_tx_v1beta1_tx_proto_rawDesc = []byte{ 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, - 0x63, 0x65, 0x12, 0x28, 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x63, 0x65, 0x12, 0x2c, 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x70, 0x52, 0x03, 0x74, 0x69, 0x70, 0x22, 0x95, 0x02, 0x0a, - 0x06, 0x54, 0x78, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 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, 0x52, - 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, - 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x25, 0x0a, - 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x48, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x12, 0x42, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xff, 0x07, 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, 0x52, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5a, 0x0a, 0x1e, 0x6e, 0x6f, 0x6e, 0x5f, - 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xff, 0x0f, 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, 0x52, 0x1b, 0x6e, 0x6f, 0x6e, 0x43, 0x72, 0x69, 0x74, - 0x69, 0x63, 0x61, 0x6c, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x08, 0x41, 0x75, 0x74, 0x68, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x40, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x49, 0x6e, - 0x66, 0x6f, 0x73, 0x12, 0x28, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x28, 0x0a, - 0x03, 0x74, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, - 0x69, 0x70, 0x52, 0x03, 0x74, 0x69, 0x70, 0x22, 0x97, 0x01, 0x0a, 0x0a, 0x53, 0x69, 0x67, 0x6e, - 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x33, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x5f, 0x6b, 0x65, 0x79, 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, - 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x38, 0x0a, 0x09, 0x6d, - 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x6d, 0x6f, 0x64, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, - 0x65, 0x22, 0xe0, 0x02, 0x0a, 0x08, 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3c, - 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x53, 0x69, 0x6e, 0x67, - 0x6c, 0x65, 0x48, 0x00, 0x52, 0x06, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x05, - 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, + 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x70, 0x42, 0x02, 0x18, 0x01, 0x52, 0x03, 0x74, 0x69, 0x70, + 0x22, 0x95, 0x02, 0x0a, 0x06, 0x54, 0x78, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x08, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 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, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x12, 0x0a, + 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, + 0x6f, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x68, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x42, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xff, 0x07, + 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, 0x52, 0x10, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5a, 0x0a, 0x1e, + 0x6e, 0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xff, + 0x0f, 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, 0x52, 0x1b, 0x6e, 0x6f, 0x6e, + 0x43, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa4, 0x01, 0x0a, 0x08, 0x41, 0x75, 0x74, + 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x40, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x5f, + 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x48, 0x00, - 0x52, 0x05, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x1a, 0x41, 0x0a, 0x06, 0x53, 0x69, 0x6e, 0x67, 0x6c, - 0x65, 0x12, 0x37, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x73, 0x69, 0x67, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x1a, 0x90, 0x01, 0x0a, 0x05, 0x4d, - 0x75, 0x6c, 0x74, 0x69, 0x12, 0x4b, 0x0a, 0x08, 0x62, 0x69, 0x74, 0x61, 0x72, 0x72, 0x61, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x42, - 0x69, 0x74, 0x41, 0x72, 0x72, 0x61, 0x79, 0x52, 0x08, 0x62, 0x69, 0x74, 0x61, 0x72, 0x72, 0x61, - 0x79, 0x12, 0x3a, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, - 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x42, 0x05, 0x0a, - 0x03, 0x73, 0x75, 0x6d, 0x22, 0x81, 0x02, 0x0a, 0x03, 0x46, 0x65, 0x65, 0x12, 0x79, 0x0a, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, - 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, - 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x70, 0x61, 0x79, 0x65, 0x72, 0x18, 0x03, 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, 0x05, 0x70, - 0x61, 0x79, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, - 0x04, 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, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x22, 0xb2, 0x01, 0x0a, 0x03, 0x54, 0x69, 0x70, - 0x12, 0x79, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, 0x1f, - 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, 0xb0, - 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, - 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x06, 0x74, - 0x69, 0x70, 0x70, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, + 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x28, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x52, 0x03, 0x66, 0x65, + 0x65, 0x12, 0x2c, 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x54, 0x69, 0x70, 0x42, 0x02, 0x18, 0x01, 0x52, 0x03, 0x74, 0x69, 0x70, 0x22, + 0x97, 0x01, 0x0a, 0x0a, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x33, + 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 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, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x12, 0x38, 0x0a, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x6d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, + 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0xe0, 0x02, 0x0a, 0x08, 0x4d, 0x6f, + 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3c, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x06, 0x73, 0x69, + 0x6e, 0x67, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x05, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x48, 0x00, 0x52, 0x05, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x1a, + 0x41, 0x0a, 0x06, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x6d, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x74, 0x78, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, + 0x64, 0x65, 0x1a, 0x90, 0x01, 0x0a, 0x05, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x12, 0x4b, 0x0a, 0x08, + 0x62, 0x69, 0x74, 0x61, 0x72, 0x72, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x42, 0x69, 0x74, 0x41, 0x72, 0x72, 0x61, 0x79, 0x52, + 0x08, 0x62, 0x69, 0x74, 0x61, 0x72, 0x72, 0x61, 0x79, 0x12, 0x3a, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, + 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x42, 0x05, 0x0a, 0x03, 0x73, 0x75, 0x6d, 0x22, 0x81, 0x02, 0x0a, + 0x03, 0x46, 0x65, 0x65, 0x12, 0x79, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, + 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, + 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, + 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2e, 0x0a, 0x05, + 0x70, 0x61, 0x79, 0x65, 0x72, 0x18, 0x03, 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, 0x06, 0x74, 0x69, 0x70, 0x70, 0x65, 0x72, 0x22, 0xce, 0x01, - 0x0a, 0x0d, 0x41, 0x75, 0x78, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, - 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x3e, 0x0a, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x64, 0x6f, 0x63, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, - 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x44, 0x6f, - 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x75, 0x78, 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, - 0x44, 0x6f, 0x63, 0x12, 0x37, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x73, 0x69, - 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, - 0x67, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, - 0x73, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x73, 0x69, 0x67, 0x42, 0xb4, - 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 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, 0x74, 0x78, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x78, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xa2, 0x02, 0x03, 0x43, 0x54, 0x58, 0xaa, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x54, 0x78, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x11, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x54, 0x78, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, - 0x02, 0x1d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x54, 0x78, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x54, 0x78, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x70, 0x61, 0x79, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, + 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x04, 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, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, + 0x22, 0xb6, 0x01, 0x0a, 0x03, 0x54, 0x69, 0x70, 0x12, 0x79, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, + 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, + 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x06, 0x74, 0x69, 0x70, 0x70, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x74, + 0x69, 0x70, 0x70, 0x65, 0x72, 0x3a, 0x02, 0x18, 0x01, 0x22, 0xce, 0x01, 0x0a, 0x0d, 0x41, 0x75, + 0x78, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x32, 0x0a, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, + 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x3e, 0x0a, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x64, 0x6f, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x44, 0x6f, 0x63, 0x44, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x41, 0x75, 0x78, 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x44, 0x6f, 0x63, 0x12, + 0x37, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x6f, + 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x67, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x73, 0x69, 0x67, 0x42, 0xb4, 0x01, 0x0a, 0x15, 0x63, + 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 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, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x3b, 0x74, 0x78, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, + 0x43, 0x54, 0x58, 0xaa, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x54, 0x78, 0x2e, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5c, 0x54, 0x78, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1d, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x54, 0x78, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x54, 0x78, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/go.mod b/api/go.mod index b54974c192bc..5eebf2fac83e 100644 --- a/api/go.mod +++ b/api/go.mod @@ -3,18 +3,19 @@ module cosmossdk.io/api go 1.20 require ( - github.com/cosmos/cosmos-proto v1.0.0-beta.3 - github.com/cosmos/gogoproto v1.4.10 - google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 - google.golang.org/grpc v1.55.0 - google.golang.org/protobuf v1.30.0 + github.com/cosmos/cosmos-proto v1.0.0-beta.5 + github.com/cosmos/gogoproto v1.7.0 + google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 + google.golang.org/grpc v1.62.1 + google.golang.org/protobuf v1.33.0 ) require ( - github.com/golang/protobuf v1.5.3 // indirect - github.com/google/go-cmp v0.5.9 // indirect - golang.org/x/exp v0.0.0-20230131160201-f062dba9d201 // indirect - golang.org/x/net v0.9.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/google/go-cmp v0.6.0 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect ) diff --git a/api/go.sum b/api/go.sum index 7f18a8b3335a..e1cbdeef5534 100644 --- a/api/go.sum +++ b/api/go.sum @@ -1,27 +1,24 @@ -github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= -github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -golang.org/x/exp v0.0.0-20230131160201-f062dba9d201 h1:BEABXpNXLEz0WxtA+6CQIz2xkg80e+1zrhWyMcq8VzE= -golang.org/x/exp v0.0.0-20230131160201-f062dba9d201/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= -golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= -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.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= diff --git a/api/tendermint/abci/types.pulsar.go b/api/tendermint/abci/types.pulsar.go index 8f6206311cb0..bfdc98d0bf7b 100644 --- a/api/tendermint/abci/types.pulsar.go +++ b/api/tendermint/abci/types.pulsar.go @@ -9577,10 +9577,113 @@ func (x *fastReflection_RequestProcessProposal) ProtoMethods() *protoiface.Metho } } +var _ protoreflect.List = (*_RequestExtendVote_4_list)(nil) + +type _RequestExtendVote_4_list struct { + list *[][]byte +} + +func (x *_RequestExtendVote_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_RequestExtendVote_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfBytes((*x.list)[i]) +} + +func (x *_RequestExtendVote_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_RequestExtendVote_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_RequestExtendVote_4_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message RequestExtendVote at list field Txs as it is not of Message kind")) +} + +func (x *_RequestExtendVote_4_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_RequestExtendVote_4_list) NewElement() protoreflect.Value { + var v []byte + return protoreflect.ValueOfBytes(v) +} + +func (x *_RequestExtendVote_4_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_RequestExtendVote_6_list)(nil) + +type _RequestExtendVote_6_list struct { + list *[]*Misbehavior +} + +func (x *_RequestExtendVote_6_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_RequestExtendVote_6_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_RequestExtendVote_6_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Misbehavior) + (*x.list)[i] = concreteValue +} + +func (x *_RequestExtendVote_6_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Misbehavior) + *x.list = append(*x.list, concreteValue) +} + +func (x *_RequestExtendVote_6_list) AppendMutable() protoreflect.Value { + v := new(Misbehavior) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_RequestExtendVote_6_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_RequestExtendVote_6_list) NewElement() protoreflect.Value { + v := new(Misbehavior) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_RequestExtendVote_6_list) IsValid() bool { + return x.list != nil +} + var ( - md_RequestExtendVote protoreflect.MessageDescriptor - fd_RequestExtendVote_hash protoreflect.FieldDescriptor - fd_RequestExtendVote_height protoreflect.FieldDescriptor + md_RequestExtendVote protoreflect.MessageDescriptor + fd_RequestExtendVote_hash protoreflect.FieldDescriptor + fd_RequestExtendVote_height protoreflect.FieldDescriptor + fd_RequestExtendVote_time protoreflect.FieldDescriptor + fd_RequestExtendVote_txs protoreflect.FieldDescriptor + fd_RequestExtendVote_proposed_last_commit protoreflect.FieldDescriptor + fd_RequestExtendVote_misbehavior protoreflect.FieldDescriptor + fd_RequestExtendVote_next_validators_hash protoreflect.FieldDescriptor + fd_RequestExtendVote_proposer_address protoreflect.FieldDescriptor ) func init() { @@ -9588,6 +9691,12 @@ func init() { md_RequestExtendVote = File_tendermint_abci_types_proto.Messages().ByName("RequestExtendVote") fd_RequestExtendVote_hash = md_RequestExtendVote.Fields().ByName("hash") fd_RequestExtendVote_height = md_RequestExtendVote.Fields().ByName("height") + fd_RequestExtendVote_time = md_RequestExtendVote.Fields().ByName("time") + fd_RequestExtendVote_txs = md_RequestExtendVote.Fields().ByName("txs") + fd_RequestExtendVote_proposed_last_commit = md_RequestExtendVote.Fields().ByName("proposed_last_commit") + fd_RequestExtendVote_misbehavior = md_RequestExtendVote.Fields().ByName("misbehavior") + fd_RequestExtendVote_next_validators_hash = md_RequestExtendVote.Fields().ByName("next_validators_hash") + fd_RequestExtendVote_proposer_address = md_RequestExtendVote.Fields().ByName("proposer_address") } var _ protoreflect.Message = (*fastReflection_RequestExtendVote)(nil) @@ -9667,6 +9776,42 @@ func (x *fastReflection_RequestExtendVote) Range(f func(protoreflect.FieldDescri return } } + if x.Time != nil { + value := protoreflect.ValueOfMessage(x.Time.ProtoReflect()) + if !f(fd_RequestExtendVote_time, value) { + return + } + } + if len(x.Txs) != 0 { + value := protoreflect.ValueOfList(&_RequestExtendVote_4_list{list: &x.Txs}) + if !f(fd_RequestExtendVote_txs, value) { + return + } + } + if x.ProposedLastCommit != nil { + value := protoreflect.ValueOfMessage(x.ProposedLastCommit.ProtoReflect()) + if !f(fd_RequestExtendVote_proposed_last_commit, value) { + return + } + } + if len(x.Misbehavior) != 0 { + value := protoreflect.ValueOfList(&_RequestExtendVote_6_list{list: &x.Misbehavior}) + if !f(fd_RequestExtendVote_misbehavior, value) { + return + } + } + if len(x.NextValidatorsHash) != 0 { + value := protoreflect.ValueOfBytes(x.NextValidatorsHash) + if !f(fd_RequestExtendVote_next_validators_hash, value) { + return + } + } + if len(x.ProposerAddress) != 0 { + value := protoreflect.ValueOfBytes(x.ProposerAddress) + if !f(fd_RequestExtendVote_proposer_address, value) { + return + } + } } // Has reports whether a field is populated. @@ -9686,6 +9831,18 @@ func (x *fastReflection_RequestExtendVote) Has(fd protoreflect.FieldDescriptor) return len(x.Hash) != 0 case "tendermint.abci.RequestExtendVote.height": return x.Height != int64(0) + case "tendermint.abci.RequestExtendVote.time": + return x.Time != nil + case "tendermint.abci.RequestExtendVote.txs": + return len(x.Txs) != 0 + case "tendermint.abci.RequestExtendVote.proposed_last_commit": + return x.ProposedLastCommit != nil + case "tendermint.abci.RequestExtendVote.misbehavior": + return len(x.Misbehavior) != 0 + case "tendermint.abci.RequestExtendVote.next_validators_hash": + return len(x.NextValidatorsHash) != 0 + case "tendermint.abci.RequestExtendVote.proposer_address": + return len(x.ProposerAddress) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestExtendVote")) @@ -9706,6 +9863,18 @@ func (x *fastReflection_RequestExtendVote) Clear(fd protoreflect.FieldDescriptor x.Hash = nil case "tendermint.abci.RequestExtendVote.height": x.Height = int64(0) + case "tendermint.abci.RequestExtendVote.time": + x.Time = nil + case "tendermint.abci.RequestExtendVote.txs": + x.Txs = nil + case "tendermint.abci.RequestExtendVote.proposed_last_commit": + x.ProposedLastCommit = nil + case "tendermint.abci.RequestExtendVote.misbehavior": + x.Misbehavior = nil + case "tendermint.abci.RequestExtendVote.next_validators_hash": + x.NextValidatorsHash = nil + case "tendermint.abci.RequestExtendVote.proposer_address": + x.ProposerAddress = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestExtendVote")) @@ -9728,6 +9897,30 @@ func (x *fastReflection_RequestExtendVote) Get(descriptor protoreflect.FieldDesc case "tendermint.abci.RequestExtendVote.height": value := x.Height return protoreflect.ValueOfInt64(value) + case "tendermint.abci.RequestExtendVote.time": + value := x.Time + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tendermint.abci.RequestExtendVote.txs": + if len(x.Txs) == 0 { + return protoreflect.ValueOfList(&_RequestExtendVote_4_list{}) + } + listValue := &_RequestExtendVote_4_list{list: &x.Txs} + return protoreflect.ValueOfList(listValue) + case "tendermint.abci.RequestExtendVote.proposed_last_commit": + value := x.ProposedLastCommit + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tendermint.abci.RequestExtendVote.misbehavior": + if len(x.Misbehavior) == 0 { + return protoreflect.ValueOfList(&_RequestExtendVote_6_list{}) + } + listValue := &_RequestExtendVote_6_list{list: &x.Misbehavior} + return protoreflect.ValueOfList(listValue) + case "tendermint.abci.RequestExtendVote.next_validators_hash": + value := x.NextValidatorsHash + return protoreflect.ValueOfBytes(value) + case "tendermint.abci.RequestExtendVote.proposer_address": + value := x.ProposerAddress + return protoreflect.ValueOfBytes(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestExtendVote")) @@ -9752,6 +9945,22 @@ func (x *fastReflection_RequestExtendVote) Set(fd protoreflect.FieldDescriptor, x.Hash = value.Bytes() case "tendermint.abci.RequestExtendVote.height": x.Height = value.Int() + case "tendermint.abci.RequestExtendVote.time": + x.Time = value.Message().Interface().(*timestamppb.Timestamp) + case "tendermint.abci.RequestExtendVote.txs": + lv := value.List() + clv := lv.(*_RequestExtendVote_4_list) + x.Txs = *clv.list + case "tendermint.abci.RequestExtendVote.proposed_last_commit": + x.ProposedLastCommit = value.Message().Interface().(*CommitInfo) + case "tendermint.abci.RequestExtendVote.misbehavior": + lv := value.List() + clv := lv.(*_RequestExtendVote_6_list) + x.Misbehavior = *clv.list + case "tendermint.abci.RequestExtendVote.next_validators_hash": + x.NextValidatorsHash = value.Bytes() + case "tendermint.abci.RequestExtendVote.proposer_address": + x.ProposerAddress = value.Bytes() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestExtendVote")) @@ -9772,10 +9981,36 @@ func (x *fastReflection_RequestExtendVote) Set(fd protoreflect.FieldDescriptor, // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RequestExtendVote) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "tendermint.abci.RequestExtendVote.time": + if x.Time == nil { + x.Time = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.Time.ProtoReflect()) + case "tendermint.abci.RequestExtendVote.txs": + if x.Txs == nil { + x.Txs = [][]byte{} + } + value := &_RequestExtendVote_4_list{list: &x.Txs} + return protoreflect.ValueOfList(value) + case "tendermint.abci.RequestExtendVote.proposed_last_commit": + if x.ProposedLastCommit == nil { + x.ProposedLastCommit = new(CommitInfo) + } + return protoreflect.ValueOfMessage(x.ProposedLastCommit.ProtoReflect()) + case "tendermint.abci.RequestExtendVote.misbehavior": + if x.Misbehavior == nil { + x.Misbehavior = []*Misbehavior{} + } + value := &_RequestExtendVote_6_list{list: &x.Misbehavior} + return protoreflect.ValueOfList(value) case "tendermint.abci.RequestExtendVote.hash": panic(fmt.Errorf("field hash of message tendermint.abci.RequestExtendVote is not mutable")) case "tendermint.abci.RequestExtendVote.height": panic(fmt.Errorf("field height of message tendermint.abci.RequestExtendVote is not mutable")) + case "tendermint.abci.RequestExtendVote.next_validators_hash": + panic(fmt.Errorf("field next_validators_hash of message tendermint.abci.RequestExtendVote is not mutable")) + case "tendermint.abci.RequestExtendVote.proposer_address": + panic(fmt.Errorf("field proposer_address of message tendermint.abci.RequestExtendVote is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestExtendVote")) @@ -9793,6 +10028,22 @@ func (x *fastReflection_RequestExtendVote) NewField(fd protoreflect.FieldDescrip return protoreflect.ValueOfBytes(nil) case "tendermint.abci.RequestExtendVote.height": return protoreflect.ValueOfInt64(int64(0)) + case "tendermint.abci.RequestExtendVote.time": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tendermint.abci.RequestExtendVote.txs": + list := [][]byte{} + return protoreflect.ValueOfList(&_RequestExtendVote_4_list{list: &list}) + case "tendermint.abci.RequestExtendVote.proposed_last_commit": + m := new(CommitInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tendermint.abci.RequestExtendVote.misbehavior": + list := []*Misbehavior{} + return protoreflect.ValueOfList(&_RequestExtendVote_6_list{list: &list}) + case "tendermint.abci.RequestExtendVote.next_validators_hash": + return protoreflect.ValueOfBytes(nil) + case "tendermint.abci.RequestExtendVote.proposer_address": + return protoreflect.ValueOfBytes(nil) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestExtendVote")) @@ -9869,6 +10120,34 @@ func (x *fastReflection_RequestExtendVote) ProtoMethods() *protoiface.Methods { if x.Height != 0 { n += 1 + runtime.Sov(uint64(x.Height)) } + if x.Time != nil { + l = options.Size(x.Time) + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Txs) > 0 { + for _, b := range x.Txs { + l = len(b) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.ProposedLastCommit != nil { + l = options.Size(x.ProposedLastCommit) + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Misbehavior) > 0 { + for _, e := range x.Misbehavior { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.NextValidatorsHash) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ProposerAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -9898,6 +10177,73 @@ func (x *fastReflection_RequestExtendVote) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.ProposerAddress) > 0 { + i -= len(x.ProposerAddress) + copy(dAtA[i:], x.ProposerAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ProposerAddress))) + i-- + dAtA[i] = 0x42 + } + if len(x.NextValidatorsHash) > 0 { + i -= len(x.NextValidatorsHash) + copy(dAtA[i:], x.NextValidatorsHash) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NextValidatorsHash))) + i-- + dAtA[i] = 0x3a + } + if len(x.Misbehavior) > 0 { + for iNdEx := len(x.Misbehavior) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Misbehavior[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] = 0x32 + } + } + if x.ProposedLastCommit != nil { + encoded, err := options.Marshal(x.ProposedLastCommit) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + if len(x.Txs) > 0 { + for iNdEx := len(x.Txs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Txs[iNdEx]) + copy(dAtA[i:], x.Txs[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Txs[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if x.Time != nil { + encoded, err := options.Marshal(x.Time) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } if x.Height != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) i-- @@ -9940,28 +10286,219 @@ func (x *fastReflection_RequestExtendVote) ProtoMethods() *protoiface.Methods { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } - if iNdEx >= l { + 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: RequestExtendVote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RequestExtendVote: 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 Hash", 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.Hash = append(x.Hash[:0], dAtA[iNdEx:postIndex]...) + if x.Hash == nil { + x.Hash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + x.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Time", 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.Time == nil { + x.Time = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Time); 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 Txs", 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 } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + x.Txs = append(x.Txs, make([]byte, postIndex-iNdEx)) + copy(x.Txs[len(x.Txs)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposedLastCommit", wireType) } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RequestExtendVote: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RequestExtendVote: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + 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.ProposedLastCommit == nil { + x.ProposedLastCommit = &CommitInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ProposedLastCommit); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 6: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Misbehavior", 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.Misbehavior = append(x.Misbehavior, &Misbehavior{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Misbehavior[len(x.Misbehavior)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NextValidatorsHash", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -9988,16 +10525,16 @@ func (x *fastReflection_RequestExtendVote) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Hash = append(x.Hash[:0], dAtA[iNdEx:postIndex]...) - if x.Hash == nil { - x.Hash = []byte{} + x.NextValidatorsHash = append(x.NextValidatorsHash[:0], dAtA[iNdEx:postIndex]...) + if x.NextValidatorsHash == nil { + x.NextValidatorsHash = []byte{} } iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) } - x.Height = 0 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -10007,11 +10544,26 @@ func (x *fastReflection_RequestExtendVote) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.Height |= int64(b&0x7F) << shift + 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.ProposerAddress = append(x.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) + if x.ProposerAddress == nil { + x.ProposerAddress = []byte{} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -31455,10 +32007,18 @@ type RequestExtendVote struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // the hash of the block that this vote may be referring to + // the hash of the block that this vote may be referring to Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // the height of the extended vote Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` + // info of the block that this vote may be referring to + Time *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=time,proto3" json:"time,omitempty"` + Txs [][]byte `protobuf:"bytes,4,rep,name=txs,proto3" json:"txs,omitempty"` + ProposedLastCommit *CommitInfo `protobuf:"bytes,5,opt,name=proposed_last_commit,json=proposedLastCommit,proto3" json:"proposed_last_commit,omitempty"` + Misbehavior []*Misbehavior `protobuf:"bytes,6,rep,name=misbehavior,proto3" json:"misbehavior,omitempty"` + NextValidatorsHash []byte `protobuf:"bytes,7,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"` + // address of the public key of the original proposer of the block. + ProposerAddress []byte `protobuf:"bytes,8,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` } func (x *RequestExtendVote) Reset() { @@ -31495,6 +32055,48 @@ func (x *RequestExtendVote) GetHeight() int64 { return 0 } +func (x *RequestExtendVote) GetTime() *timestamppb.Timestamp { + if x != nil { + return x.Time + } + return nil +} + +func (x *RequestExtendVote) GetTxs() [][]byte { + if x != nil { + return x.Txs + } + return nil +} + +func (x *RequestExtendVote) GetProposedLastCommit() *CommitInfo { + if x != nil { + return x.ProposedLastCommit + } + return nil +} + +func (x *RequestExtendVote) GetMisbehavior() []*Misbehavior { + if x != nil { + return x.Misbehavior + } + return nil +} + +func (x *RequestExtendVote) GetNextValidatorsHash() []byte { + if x != nil { + return x.NextValidatorsHash + } + return nil +} + +func (x *RequestExtendVote) GetProposerAddress() []byte { + if x != nil { + return x.ProposerAddress + } + return nil +} + // Verify the vote extension type RequestVerifyVoteExtension struct { state protoimpl.MessageState @@ -32681,7 +33283,8 @@ type ResponseFinalizeBlock struct { ValidatorUpdates []*ValidatorUpdate `protobuf:"bytes,3,rep,name=validator_updates,json=validatorUpdates,proto3" json:"validator_updates,omitempty"` // updates to the consensus params, if any. ConsensusParamUpdates *types.ConsensusParams `protobuf:"bytes,4,opt,name=consensus_param_updates,json=consensusParamUpdates,proto3" json:"consensus_param_updates,omitempty"` - // app_hash is the hash of the applications' state which is used to confirm that execution of the transactions was deterministic. It is up to the application to decide which algorithm to use. + // app_hash is the hash of the applications' state which is used to confirm that execution of the transactions was + // deterministic. It is up to the application to decide which algorithm to use. AppHash []byte `protobuf:"bytes,5,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` } @@ -32942,8 +33545,8 @@ type ExecTxResult struct { Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` // nondeterministic Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` // nondeterministic - GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"` - GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` + GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,proto3" json:"gas_wanted,omitempty"` + GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,proto3" json:"gas_used,omitempty"` Events []*Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"` // nondeterministic Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"` } @@ -33629,503 +34232,523 @@ var file_tendermint_abci_types_proto_rawDesc = []byte{ 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3f, 0x0a, 0x11, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x83, 0x03, 0x0a, 0x11, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, + 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, 0x0a, 0x04, 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, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x04, 0x74, 0x69, + 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0c, 0x52, + 0x03, 0x74, 0x78, 0x73, 0x12, 0x53, 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, + 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, + 0x61, 0x62, 0x63, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x42, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x4c, + 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x6d, 0x69, 0x73, + 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, + 0x2e, 0x4d, 0x69, 0x73, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x04, 0xc8, 0xde, + 0x1f, 0x00, 0x52, 0x0b, 0x6d, 0x69, 0x73, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x12, + 0x30, 0x0a, 0x14, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x6e, + 0x65, 0x78, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x48, 0x61, 0x73, + 0x68, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x70, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x9c, 0x01, 0x0a, + 0x1a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x56, 0x6f, + 0x74, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, - 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x9c, 0x01, 0x0a, 0x1a, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x45, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, - 0x25, 0x0a, 0x0e, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x76, 0x6f, 0x74, 0x65, 0x45, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x84, 0x03, 0x0a, 0x14, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, - 0x10, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x03, 0x74, 0x78, - 0x73, 0x12, 0x51, 0x0a, 0x13, 0x64, 0x65, 0x63, 0x69, 0x64, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x73, - 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x76, 0x6f, + 0x74, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x84, 0x03, 0x0a, 0x14, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0c, 0x52, 0x03, 0x74, 0x78, 0x73, 0x12, 0x51, 0x0a, 0x13, 0x64, 0x65, 0x63, 0x69, 0x64, 0x65, + 0x64, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, + 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, + 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x11, 0x64, 0x65, 0x63, 0x69, 0x64, 0x65, 0x64, 0x4c, + 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x6d, 0x69, 0x73, + 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, - 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x04, 0xc8, 0xde, 0x1f, - 0x00, 0x52, 0x11, 0x64, 0x65, 0x63, 0x69, 0x64, 0x65, 0x64, 0x4c, 0x61, 0x73, 0x74, 0x43, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x6d, 0x69, 0x73, 0x62, 0x65, 0x68, 0x61, 0x76, - 0x69, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x4d, 0x69, 0x73, 0x62, - 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x6d, - 0x69, 0x73, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x16, - 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, - 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, - 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, - 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, - 0x12, 0x30, 0x0a, 0x14, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, - 0x6e, 0x65, 0x78, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x48, 0x61, - 0x73, 0x68, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x94, 0x0a, - 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x09, 0x65, 0x78, - 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x48, 0x00, 0x52, 0x09, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, - 0x0a, 0x04, 0x65, 0x63, 0x68, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x63, 0x68, 0x6f, 0x48, 0x00, 0x52, 0x04, 0x65, - 0x63, 0x68, 0x6f, 0x12, 0x36, 0x0a, 0x05, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x75, - 0x73, 0x68, 0x48, 0x00, 0x52, 0x05, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x12, 0x33, 0x0a, 0x04, 0x69, - 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x65, 0x6e, 0x64, + 0x2e, 0x4d, 0x69, 0x73, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x04, 0xc8, 0xde, + 0x1f, 0x00, 0x52, 0x0b, 0x6d, 0x69, 0x73, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x12, + 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, + 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, 0x0a, 0x04, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x06, 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, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, + 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x12, 0x6e, 0x65, 0x78, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x22, 0x94, 0x0a, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x42, 0x0a, 0x09, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, + 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x78, 0x63, + 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x04, 0x65, 0x63, 0x68, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, + 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x63, 0x68, 0x6f, + 0x48, 0x00, 0x52, 0x04, 0x65, 0x63, 0x68, 0x6f, 0x12, 0x36, 0x0a, 0x05, 0x66, 0x6c, 0x75, 0x73, + 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x48, 0x00, 0x52, 0x05, 0x66, 0x6c, 0x75, 0x73, 0x68, + 0x12, 0x33, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, + 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x48, 0x00, 0x52, + 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x43, 0x0a, 0x0a, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x48, 0x00, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, - 0x12, 0x43, 0x0a, 0x0a, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, - 0x6e, 0x69, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x69, 0x6e, 0x69, 0x74, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x36, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x48, 0x00, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x3d, 0x0a, - 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x74, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x20, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, - 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, - 0x78, 0x48, 0x00, 0x52, 0x07, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x78, 0x12, 0x39, 0x0a, 0x06, - 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x48, 0x00, 0x52, - 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x4f, 0x0a, 0x0e, 0x6c, 0x69, 0x73, 0x74, 0x5f, - 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, - 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, - 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x48, 0x00, 0x52, 0x0d, 0x6c, 0x69, 0x73, 0x74, 0x53, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x12, 0x4f, 0x0a, 0x0e, 0x6f, 0x66, 0x66, 0x65, - 0x72, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, - 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x66, 0x66, 0x65, 0x72, - 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x6f, 0x66, 0x66, 0x65, - 0x72, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x5c, 0x0a, 0x13, 0x6c, 0x6f, 0x61, - 0x64, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, - 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, - 0x6e, 0x6b, 0x48, 0x00, 0x52, 0x11, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x5f, 0x0a, 0x14, 0x61, 0x70, 0x70, 0x6c, 0x79, - 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, - 0x6e, 0x6b, 0x48, 0x00, 0x52, 0x12, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x55, 0x0a, 0x10, 0x70, 0x72, 0x65, 0x70, - 0x61, 0x72, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0x11, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x65, - 0x70, 0x61, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x0f, - 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, - 0x55, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, 0x6e, 0x64, + 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x00, 0x52, + 0x09, 0x69, 0x6e, 0x69, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x36, 0x0a, 0x05, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x50, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x46, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, - 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x65, + 0x6f, 0x6e, 0x73, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x00, 0x52, 0x05, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x12, 0x3d, 0x0a, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x74, 0x78, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, + 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x54, 0x78, 0x48, 0x00, 0x52, 0x07, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x54, + 0x78, 0x12, 0x39, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, + 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x48, 0x00, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x4f, 0x0a, 0x0e, + 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, + 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, + 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x48, 0x00, 0x52, 0x0d, + 0x6c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x12, 0x4f, 0x0a, + 0x0e, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x4f, 0x66, 0x66, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x48, 0x00, 0x52, + 0x0d, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x5c, + 0x0a, 0x13, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, + 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x56, 0x6f, 0x74, 0x65, - 0x48, 0x00, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x62, - 0x0a, 0x15, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x56, 0x6f, - 0x74, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x13, 0x76, - 0x65, 0x72, 0x69, 0x66, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x0e, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x5f, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x74, 0x65, 0x6e, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x48, 0x00, 0x52, 0x11, 0x6c, 0x6f, 0x61, 0x64, 0x53, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x5f, 0x0a, 0x14, + 0x61, 0x70, 0x70, 0x6c, 0x79, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x63, + 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x48, 0x00, 0x52, 0x0d, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4a, 0x04, 0x08, 0x05, - 0x10, 0x06, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x0a, 0x10, 0x0b, 0x4a, 0x04, - 0x08, 0x0b, 0x10, 0x0c, 0x22, 0x29, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, - 0x28, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x63, 0x68, 0x6f, 0x12, - 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x22, 0xb8, 0x01, 0x0a, 0x0c, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x70, 0x70, - 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, - 0x61, 0x70, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, - 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2d, 0x0a, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x61, 0x70, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x70, - 0x70, 0x48, 0x61, 0x73, 0x68, 0x22, 0xc4, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x4c, 0x0a, 0x10, 0x63, - 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, - 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, - 0x73, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x46, 0x0a, 0x0a, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, - 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x73, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x70, 0x70, 0x48, 0x61, 0x73, 0x68, 0x22, 0xf7, 0x01, 0x0a, - 0x0d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x12, - 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6c, 0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, - 0x6f, 0x70, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x50, 0x72, - 0x6f, 0x6f, 0x66, 0x4f, 0x70, 0x73, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x70, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x64, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x64, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xaa, 0x02, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6c, 0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x61, 0x73, 0x5f, - 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x67, 0x61, - 0x73, 0x5f, 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, - 0x75, 0x73, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x67, 0x61, 0x73, 0x5f, - 0x75, 0x73, 0x65, 0x64, 0x12, 0x48, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x07, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x18, 0xc8, 0xde, - 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x10, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x6f, 0x6d, 0x69, - 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1c, - 0x0a, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4a, 0x04, 0x08, 0x09, - 0x10, 0x0c, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x6d, 0x65, 0x6d, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x22, 0x41, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x5f, - 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x72, 0x65, - 0x74, 0x61, 0x69, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, - 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0x50, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x12, - 0x37, 0x0a, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x61, 0x62, 0x63, 0x69, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x09, 0x73, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x22, 0xbe, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x12, 0x45, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x66, 0x66, - 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x5e, 0x0a, 0x06, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, - 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, - 0x41, 0x42, 0x4f, 0x52, 0x54, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x4a, 0x45, 0x43, - 0x54, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x46, 0x4f, - 0x52, 0x4d, 0x41, 0x54, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, - 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x45, 0x52, 0x10, 0x05, 0x22, 0x31, 0x0a, 0x19, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x22, 0x98, 0x02, 0x0a, - 0x1a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x6e, - 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x4a, 0x0a, 0x06, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, - 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x66, 0x65, 0x74, - 0x63, 0x68, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0d, 0x52, - 0x0d, 0x72, 0x65, 0x66, 0x65, 0x74, 0x63, 0x68, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x12, 0x25, - 0x0a, 0x0e, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x73, 0x22, 0x60, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, - 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, - 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x42, 0x4f, 0x52, - 0x54, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x54, 0x52, 0x59, 0x10, 0x03, 0x12, 0x12, - 0x0a, 0x0e, 0x52, 0x45, 0x54, 0x52, 0x59, 0x5f, 0x53, 0x4e, 0x41, 0x50, 0x53, 0x48, 0x4f, 0x54, - 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x53, 0x4e, 0x41, - 0x50, 0x53, 0x48, 0x4f, 0x54, 0x10, 0x05, 0x22, 0x2b, 0x0a, 0x17, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, - 0x03, 0x74, 0x78, 0x73, 0x22, 0xa1, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x12, 0x4f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x37, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, - 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x22, 0x35, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, - 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, - 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x02, 0x22, 0x3b, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x25, - 0x0a, 0x0e, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x76, 0x6f, 0x74, 0x65, 0x45, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa5, 0x01, 0x0a, 0x1b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x45, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x48, 0x00, 0x52, 0x12, 0x61, 0x70, 0x70, 0x6c, 0x79, + 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x55, 0x0a, + 0x10, 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x55, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f, + 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, + 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x46, 0x0a, 0x0b, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x64, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, + 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x64, 0x56, 0x6f, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x56, + 0x6f, 0x74, 0x65, 0x12, 0x62, 0x0a, 0x15, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x76, 0x6f, + 0x74, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x14, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, + 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x65, 0x72, + 0x69, 0x66, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x48, 0x00, 0x52, 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x0e, 0x66, 0x69, 0x6e, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, + 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x0d, 0x66, 0x69, 0x6e, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, + 0x0a, 0x10, 0x0b, 0x4a, 0x04, 0x08, 0x0b, 0x10, 0x0c, 0x22, 0x29, 0x0a, 0x11, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, + 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x22, 0x28, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x45, 0x63, 0x68, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x0f, + 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x22, + 0xb8, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, + 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2d, 0x0a, 0x13, 0x6c, + 0x61, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x61, 0x70, 0x70, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x41, 0x70, 0x70, 0x48, 0x61, 0x73, 0x68, 0x22, 0xc4, 0x01, 0x0a, 0x11, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, + 0x12, 0x4c, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x74, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, + 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0f, 0x63, + 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x46, + 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, + 0x61, 0x62, 0x63, 0x69, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x70, 0x70, 0x48, 0x61, 0x73, + 0x68, 0x22, 0xf7, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, + 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, + 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x70, + 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x6f, 0x70, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x70, 0x73, 0x52, 0x08, 0x70, 0x72, 0x6f, + 0x6f, 0x66, 0x4f, 0x70, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1c, 0x0a, + 0x09, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xaa, 0x02, 0x0a, 0x0f, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x78, 0x12, + 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, + 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, + 0x0a, 0x67, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0a, 0x67, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x12, 0x48, 0x0a, 0x06, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x42, 0x18, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x10, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x06, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0c, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x52, + 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x6d, 0x65, 0x6d, 0x70, 0x6f, + 0x6f, 0x6c, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x41, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, + 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0c, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x4a, + 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0x50, 0x0a, 0x15, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x52, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x22, 0xbe, 0x01, + 0x0a, 0x15, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x53, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x45, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x5e, + 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x10, + 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x42, 0x4f, 0x52, 0x54, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, + 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x52, 0x45, 0x4a, 0x45, + 0x43, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x52, + 0x45, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x45, 0x52, 0x10, 0x05, 0x22, 0x31, + 0x0a, 0x19, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x63, + 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, + 0x6b, 0x22, 0x98, 0x02, 0x0a, 0x1a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x70, + 0x70, 0x6c, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, + 0x12, 0x4a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x32, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, + 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x79, + 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x2e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x0a, 0x0e, + 0x72, 0x65, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0d, 0x72, 0x65, 0x66, 0x65, 0x74, 0x63, 0x68, 0x43, 0x68, 0x75, + 0x6e, 0x6b, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x6a, + 0x65, 0x63, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x22, 0x60, 0x0a, 0x06, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, + 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, + 0x05, 0x41, 0x42, 0x4f, 0x52, 0x54, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x54, 0x52, + 0x59, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x54, 0x52, 0x59, 0x5f, 0x53, 0x4e, 0x41, + 0x50, 0x53, 0x48, 0x4f, 0x54, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x45, 0x4a, 0x45, 0x43, + 0x54, 0x5f, 0x53, 0x4e, 0x41, 0x50, 0x53, 0x48, 0x4f, 0x54, 0x10, 0x05, 0x22, 0x2b, 0x0a, 0x17, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x50, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0c, 0x52, 0x03, 0x74, 0x78, 0x73, 0x22, 0xa1, 0x01, 0x0a, 0x17, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x4f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x33, 0x0a, 0x0c, 0x56, 0x65, 0x72, 0x69, - 0x66, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, + 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x2e, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x35, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x10, - 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x02, 0x22, 0xea, 0x02, - 0x0a, 0x15, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, - 0x7a, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x48, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, - 0x18, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x10, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2c, - 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x12, 0x3c, 0x0a, 0x0a, 0x74, 0x78, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x54, 0x78, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x52, 0x09, 0x74, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, - 0x53, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x73, 0x12, 0x59, 0x0a, 0x17, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, - 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, - 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x15, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, - 0x73, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, - 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x07, 0x61, 0x70, 0x70, 0x48, 0x61, 0x73, 0x68, 0x22, 0x59, 0x0a, 0x0a, 0x43, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x35, - 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, + 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x02, 0x22, 0x3b, 0x0a, + 0x12, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x56, + 0x6f, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x76, 0x6f, 0x74, + 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa5, 0x01, 0x0a, 0x1b, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x56, 0x6f, 0x74, + 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x74, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x33, 0x0a, + 0x0c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, + 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, + 0x43, 0x45, 0x50, 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, + 0x10, 0x02, 0x22, 0xea, 0x02, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, + 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x48, 0x0a, 0x06, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x42, 0x18, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x10, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x06, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x0a, 0x74, 0x78, 0x5f, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x45, 0x78, 0x65, + 0x63, 0x54, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x09, 0x74, 0x78, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x73, 0x12, 0x53, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, + 0x69, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x59, 0x0a, 0x17, 0x63, 0x6f, 0x6e, + 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x74, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, + 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x15, 0x63, + 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x70, 0x70, 0x48, 0x61, 0x73, 0x68, 0x22, + 0x59, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, + 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, + 0x75, 0x6e, 0x64, 0x12, 0x35, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, + 0x61, 0x62, 0x63, 0x69, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x04, 0xc8, + 0xde, 0x1f, 0x00, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x69, 0x0a, 0x12, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x3d, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, - 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x69, 0x0a, 0x12, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x72, - 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, - 0x64, 0x12, 0x3d, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x21, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, - 0x63, 0x69, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, - 0x22, 0x7a, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x5d, 0x0a, - 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, - 0x62, 0x63, 0x69, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x42, 0x1c, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x14, 0x61, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, - 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0x4e, 0x0a, 0x0e, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xfe, 0x01, 0x0a, - 0x0c, 0x45, 0x78, 0x65, 0x63, 0x54, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x67, - 0x61, 0x73, 0x5f, 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x09, 0x67, 0x61, 0x73, 0x57, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, - 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x61, - 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x48, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x18, 0xc8, - 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x10, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x6f, 0x6d, - 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, - 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x85, 0x01, - 0x0a, 0x08, 0x54, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x78, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x74, 0x78, 0x12, 0x3b, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x54, - 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3b, 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, - 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, - 0x65, 0x72, 0x22, 0x64, 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x4b, 0x65, 0x79, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x93, 0x01, 0x0a, 0x08, 0x56, 0x6f, 0x74, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3e, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x41, 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, - 0x64, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x0b, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x49, 0x64, 0x46, 0x6c, 0x61, 0x67, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0xf3, - 0x01, 0x0a, 0x10, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x3e, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x76, 0x6f, 0x74, - 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x13, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x41, 0x0a, 0x0d, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x46, 0x6c, 0x61, - 0x67, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x46, 0x6c, 0x61, 0x67, 0x4a, 0x04, - 0x08, 0x02, 0x10, 0x03, 0x22, 0x83, 0x02, 0x0a, 0x0b, 0x4d, 0x69, 0x73, 0x62, 0x65, 0x68, 0x61, - 0x76, 0x69, 0x6f, 0x72, 0x12, 0x34, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x61, 0x62, 0x63, 0x69, 0x2e, 0x4d, 0x69, 0x73, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x3e, 0x0a, 0x09, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x7a, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x5d, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x42, 0x1c, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, + 0x14, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2c, 0x6f, 0x6d, 0x69, 0x74, + 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x22, 0x4e, 0x0a, 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x22, 0x80, 0x02, 0x0a, 0x0c, 0x45, 0x78, 0x65, 0x63, 0x54, 0x78, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, + 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, + 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, + 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x67, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x12, 0x48, 0x0a, 0x06, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x42, 0x18, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x10, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x06, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x08, 0x54, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x0e, 0x0a, 0x02, 0x74, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x74, 0x78, 0x12, + 0x3b, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, + 0x69, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x54, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x04, + 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3b, 0x0a, 0x09, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x64, 0x0a, 0x0f, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x3b, 0x0a, 0x07, + 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x42, 0x04, 0xc8, 0xde, 0x1f, + 0x00, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x22, + 0x93, 0x01, 0x0a, 0x08, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3e, 0x0a, 0x09, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, + 0x69, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, + 0x00, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x41, 0x0a, 0x0d, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x46, 0x6c, + 0x61, 0x67, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x46, 0x6c, 0x61, 0x67, 0x4a, + 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0xf3, 0x01, 0x0a, 0x10, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, + 0x65, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3e, 0x0a, 0x09, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, - 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x12, 0x38, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 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, 0x42, 0x08, 0xc8, 0xde, - 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x12, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x77, - 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x56, - 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x82, 0x01, 0x0a, 0x08, 0x53, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x12, - 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, - 0x61, 0x73, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2a, - 0x39, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, - 0x0a, 0x03, 0x4e, 0x45, 0x57, 0x10, 0x00, 0x1a, 0x07, 0x8a, 0x9d, 0x20, 0x03, 0x4e, 0x65, 0x77, - 0x12, 0x18, 0x0a, 0x07, 0x52, 0x45, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x10, 0x01, 0x1a, 0x0b, 0x8a, - 0x9d, 0x20, 0x07, 0x52, 0x65, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2a, 0x4b, 0x0a, 0x0f, 0x4d, 0x69, - 0x73, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, - 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x55, - 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x45, 0x5f, 0x56, 0x4f, 0x54, 0x45, 0x10, 0x01, 0x12, 0x17, - 0x0a, 0x13, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x5f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x41, - 0x54, 0x54, 0x41, 0x43, 0x4b, 0x10, 0x02, 0x32, 0x9d, 0x0b, 0x0a, 0x04, 0x41, 0x42, 0x43, 0x49, - 0x12, 0x43, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x45, 0x63, 0x68, 0x6f, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x46, 0x0a, 0x05, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x12, 0x1d, - 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, - 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x1a, 0x1e, 0x2e, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x12, 0x43, 0x0a, - 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, - 0x6e, 0x66, 0x6f, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, - 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x12, 0x4c, 0x0a, 0x07, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x78, 0x12, 0x1f, 0x2e, + 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x76, 0x6f, + 0x74, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0d, 0x76, 0x6f, 0x74, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x2f, 0x0a, 0x13, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x12, 0x41, 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x5f, 0x66, + 0x6c, 0x61, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x74, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x49, 0x44, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, + 0x64, 0x46, 0x6c, 0x61, 0x67, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0x83, 0x02, 0x0a, 0x0b, + 0x4d, 0x69, 0x73, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x12, 0x34, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x4d, 0x69, 0x73, 0x62, + 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x3e, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, + 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, 0x0a, 0x04, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x04, 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, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x04, 0x74, + 0x69, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x76, 0x6f, 0x74, + 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x77, 0x65, + 0x72, 0x22, 0x82, 0x01, 0x0a, 0x08, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, + 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2a, 0x39, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, + 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x45, 0x57, 0x10, 0x00, 0x1a, 0x07, + 0x8a, 0x9d, 0x20, 0x03, 0x4e, 0x65, 0x77, 0x12, 0x18, 0x0a, 0x07, 0x52, 0x45, 0x43, 0x48, 0x45, + 0x43, 0x4b, 0x10, 0x01, 0x1a, 0x0b, 0x8a, 0x9d, 0x20, 0x07, 0x52, 0x65, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x2a, 0x4b, 0x0a, 0x0f, 0x4d, 0x69, 0x73, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, + 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x55, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x45, 0x5f, 0x56, + 0x4f, 0x54, 0x45, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x5f, 0x43, + 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x54, 0x54, 0x41, 0x43, 0x4b, 0x10, 0x02, 0x32, 0x9d, + 0x0b, 0x0a, 0x04, 0x41, 0x42, 0x43, 0x49, 0x12, 0x43, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12, + 0x1c, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, + 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x45, 0x63, 0x68, 0x6f, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x78, 0x1a, 0x20, - 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, - 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x78, - 0x12, 0x46, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1d, 0x2e, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x1a, 0x1e, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x49, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x12, 0x1e, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x1a, 0x1f, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x12, 0x52, 0x0a, 0x09, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x12, 0x21, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, - 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x1a, 0x22, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, - 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x6e, - 0x69, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x5e, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x53, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x1a, - 0x26, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, - 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, - 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x12, 0x5e, 0x0a, 0x0d, 0x4f, 0x66, 0x66, 0x65, 0x72, - 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x25, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x1a, - 0x26, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, - 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x53, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x6a, 0x0a, 0x11, 0x4c, 0x6f, 0x61, 0x64, 0x53, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x29, 0x2e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x46, 0x0a, 0x05, + 0x46, 0x6c, 0x75, 0x73, 0x68, 0x12, 0x1d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, + 0x6c, 0x75, 0x73, 0x68, 0x1a, 0x1e, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, + 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, + 0x6c, 0x75, 0x73, 0x68, 0x12, 0x43, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x1a, 0x2a, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, - 0x75, 0x6e, 0x6b, 0x12, 0x6d, 0x0a, 0x12, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x2a, 0x2e, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, - 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x1a, 0x2b, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4c, 0x0a, 0x07, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x54, 0x78, 0x12, 0x1f, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, + 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x54, 0x78, 0x1a, 0x20, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, - 0x6e, 0x6b, 0x12, 0x64, 0x0a, 0x0f, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x27, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, - 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x28, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x78, 0x12, 0x46, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x12, 0x1d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, + 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x1a, + 0x1e, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, + 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, + 0x49, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x1e, 0x2e, 0x74, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x1a, 0x1f, 0x2e, 0x74, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x52, 0x0a, 0x09, 0x49, 0x6e, + 0x69, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x1a, 0x22, 0x2e, 0x74, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x5e, + 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x12, + 0x25, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, + 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x1a, 0x26, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x12, 0x5e, + 0x0a, 0x0d, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, + 0x25, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, + 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x1a, 0x26, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x6a, + 0x0a, 0x11, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, + 0x75, 0x6e, 0x6b, 0x12, 0x29, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, + 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x6f, 0x61, + 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x1a, 0x2a, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, - 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x64, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x63, - 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x27, 0x2e, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x28, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, - 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x55, - 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x74, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x6d, 0x0a, 0x12, 0x41, 0x70, + 0x70, 0x6c, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, + 0x12, 0x2a, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, + 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x1a, 0x2b, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x56, 0x6f, 0x74, 0x65, - 0x1a, 0x23, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, - 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x64, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x70, 0x0a, 0x13, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x56, - 0x6f, 0x74, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, 0x74, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x64, 0x0a, 0x0f, 0x50, 0x72, 0x65, + 0x70, 0x61, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x27, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x56, 0x6f, 0x74, 0x65, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x2c, 0x2e, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5e, 0x0a, 0x0d, 0x46, 0x69, 0x6e, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x25, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, - 0x26, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, - 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, - 0x7a, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0xa0, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x42, - 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x61, 0x62, 0x63, 0x69, 0xa2, - 0x02, 0x03, 0x54, 0x41, 0x58, 0xaa, 0x02, 0x0f, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x41, 0x62, 0x63, 0x69, 0xca, 0x02, 0x0f, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x74, 0x5c, 0x41, 0x62, 0x63, 0x69, 0xe2, 0x02, 0x1b, 0x54, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x5c, 0x41, 0x62, 0x63, 0x69, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x74, 0x3a, 0x3a, 0x41, 0x62, 0x63, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x28, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, + 0x64, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x12, 0x27, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, + 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x28, 0x2e, 0x74, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x55, 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x56, + 0x6f, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, + 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x1a, 0x23, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x70, 0x0a, 0x13, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, + 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, + 0x69, 0x66, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x1a, 0x2c, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, + 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x79, 0x56, 0x6f, 0x74, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5e, + 0x0a, 0x0d, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, + 0x25, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, + 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0x26, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0xa0, + 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, + 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, + 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, + 0x74, 0x2f, 0x61, 0x62, 0x63, 0x69, 0xa2, 0x02, 0x03, 0x54, 0x41, 0x58, 0xaa, 0x02, 0x0f, 0x54, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x41, 0x62, 0x63, 0x69, 0xca, 0x02, + 0x0f, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x5c, 0x41, 0x62, 0x63, 0x69, + 0xe2, 0x02, 0x1b, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x5c, 0x41, 0x62, + 0x63, 0x69, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x10, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x3a, 0x3a, 0x41, 0x62, 0x63, + 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -34230,89 +34853,92 @@ var file_tendermint_abci_types_proto_depIdxs = []int32{ 41, // 24: tendermint.abci.RequestProcessProposal.proposed_last_commit:type_name -> tendermint.abci.CommitInfo 51, // 25: tendermint.abci.RequestProcessProposal.misbehavior:type_name -> tendermint.abci.Misbehavior 53, // 26: tendermint.abci.RequestProcessProposal.time:type_name -> google.protobuf.Timestamp - 41, // 27: tendermint.abci.RequestFinalizeBlock.decided_last_commit:type_name -> tendermint.abci.CommitInfo - 51, // 28: tendermint.abci.RequestFinalizeBlock.misbehavior:type_name -> tendermint.abci.Misbehavior - 53, // 29: tendermint.abci.RequestFinalizeBlock.time:type_name -> google.protobuf.Timestamp - 24, // 30: tendermint.abci.Response.exception:type_name -> tendermint.abci.ResponseException - 25, // 31: tendermint.abci.Response.echo:type_name -> tendermint.abci.ResponseEcho - 26, // 32: tendermint.abci.Response.flush:type_name -> tendermint.abci.ResponseFlush - 27, // 33: tendermint.abci.Response.info:type_name -> tendermint.abci.ResponseInfo - 28, // 34: tendermint.abci.Response.init_chain:type_name -> tendermint.abci.ResponseInitChain - 29, // 35: tendermint.abci.Response.query:type_name -> tendermint.abci.ResponseQuery - 30, // 36: tendermint.abci.Response.check_tx:type_name -> tendermint.abci.ResponseCheckTx - 31, // 37: tendermint.abci.Response.commit:type_name -> tendermint.abci.ResponseCommit - 32, // 38: tendermint.abci.Response.list_snapshots:type_name -> tendermint.abci.ResponseListSnapshots - 33, // 39: tendermint.abci.Response.offer_snapshot:type_name -> tendermint.abci.ResponseOfferSnapshot - 34, // 40: tendermint.abci.Response.load_snapshot_chunk:type_name -> tendermint.abci.ResponseLoadSnapshotChunk - 35, // 41: tendermint.abci.Response.apply_snapshot_chunk:type_name -> tendermint.abci.ResponseApplySnapshotChunk - 36, // 42: tendermint.abci.Response.prepare_proposal:type_name -> tendermint.abci.ResponsePrepareProposal - 37, // 43: tendermint.abci.Response.process_proposal:type_name -> tendermint.abci.ResponseProcessProposal - 38, // 44: tendermint.abci.Response.extend_vote:type_name -> tendermint.abci.ResponseExtendVote - 39, // 45: tendermint.abci.Response.verify_vote_extension:type_name -> tendermint.abci.ResponseVerifyVoteExtension - 40, // 46: tendermint.abci.Response.finalize_block:type_name -> tendermint.abci.ResponseFinalizeBlock - 54, // 47: tendermint.abci.ResponseInitChain.consensus_params:type_name -> tendermint.types.ConsensusParams - 48, // 48: tendermint.abci.ResponseInitChain.validators:type_name -> tendermint.abci.ValidatorUpdate - 55, // 49: tendermint.abci.ResponseQuery.proof_ops:type_name -> tendermint.crypto.ProofOps - 43, // 50: tendermint.abci.ResponseCheckTx.events:type_name -> tendermint.abci.Event - 52, // 51: tendermint.abci.ResponseListSnapshots.snapshots:type_name -> tendermint.abci.Snapshot - 2, // 52: tendermint.abci.ResponseOfferSnapshot.result:type_name -> tendermint.abci.ResponseOfferSnapshot.Result - 3, // 53: tendermint.abci.ResponseApplySnapshotChunk.result:type_name -> tendermint.abci.ResponseApplySnapshotChunk.Result - 4, // 54: tendermint.abci.ResponseProcessProposal.status:type_name -> tendermint.abci.ResponseProcessProposal.ProposalStatus - 5, // 55: tendermint.abci.ResponseVerifyVoteExtension.status:type_name -> tendermint.abci.ResponseVerifyVoteExtension.VerifyStatus - 43, // 56: tendermint.abci.ResponseFinalizeBlock.events:type_name -> tendermint.abci.Event - 45, // 57: tendermint.abci.ResponseFinalizeBlock.tx_results:type_name -> tendermint.abci.ExecTxResult - 48, // 58: tendermint.abci.ResponseFinalizeBlock.validator_updates:type_name -> tendermint.abci.ValidatorUpdate - 54, // 59: tendermint.abci.ResponseFinalizeBlock.consensus_param_updates:type_name -> tendermint.types.ConsensusParams - 49, // 60: tendermint.abci.CommitInfo.votes:type_name -> tendermint.abci.VoteInfo - 50, // 61: tendermint.abci.ExtendedCommitInfo.votes:type_name -> tendermint.abci.ExtendedVoteInfo - 44, // 62: tendermint.abci.Event.attributes:type_name -> tendermint.abci.EventAttribute - 43, // 63: tendermint.abci.ExecTxResult.events:type_name -> tendermint.abci.Event - 45, // 64: tendermint.abci.TxResult.result:type_name -> tendermint.abci.ExecTxResult - 56, // 65: tendermint.abci.ValidatorUpdate.pub_key:type_name -> tendermint.crypto.PublicKey - 47, // 66: tendermint.abci.VoteInfo.validator:type_name -> tendermint.abci.Validator - 57, // 67: tendermint.abci.VoteInfo.block_id_flag:type_name -> tendermint.types.BlockIDFlag - 47, // 68: tendermint.abci.ExtendedVoteInfo.validator:type_name -> tendermint.abci.Validator - 57, // 69: tendermint.abci.ExtendedVoteInfo.block_id_flag:type_name -> tendermint.types.BlockIDFlag - 1, // 70: tendermint.abci.Misbehavior.type:type_name -> tendermint.abci.MisbehaviorType - 47, // 71: tendermint.abci.Misbehavior.validator:type_name -> tendermint.abci.Validator - 53, // 72: tendermint.abci.Misbehavior.time:type_name -> google.protobuf.Timestamp - 7, // 73: tendermint.abci.ABCI.Echo:input_type -> tendermint.abci.RequestEcho - 8, // 74: tendermint.abci.ABCI.Flush:input_type -> tendermint.abci.RequestFlush - 9, // 75: tendermint.abci.ABCI.Info:input_type -> tendermint.abci.RequestInfo - 12, // 76: tendermint.abci.ABCI.CheckTx:input_type -> tendermint.abci.RequestCheckTx - 11, // 77: tendermint.abci.ABCI.Query:input_type -> tendermint.abci.RequestQuery - 13, // 78: tendermint.abci.ABCI.Commit:input_type -> tendermint.abci.RequestCommit - 10, // 79: tendermint.abci.ABCI.InitChain:input_type -> tendermint.abci.RequestInitChain - 14, // 80: tendermint.abci.ABCI.ListSnapshots:input_type -> tendermint.abci.RequestListSnapshots - 15, // 81: tendermint.abci.ABCI.OfferSnapshot:input_type -> tendermint.abci.RequestOfferSnapshot - 16, // 82: tendermint.abci.ABCI.LoadSnapshotChunk:input_type -> tendermint.abci.RequestLoadSnapshotChunk - 17, // 83: tendermint.abci.ABCI.ApplySnapshotChunk:input_type -> tendermint.abci.RequestApplySnapshotChunk - 18, // 84: tendermint.abci.ABCI.PrepareProposal:input_type -> tendermint.abci.RequestPrepareProposal - 19, // 85: tendermint.abci.ABCI.ProcessProposal:input_type -> tendermint.abci.RequestProcessProposal - 20, // 86: tendermint.abci.ABCI.ExtendVote:input_type -> tendermint.abci.RequestExtendVote - 21, // 87: tendermint.abci.ABCI.VerifyVoteExtension:input_type -> tendermint.abci.RequestVerifyVoteExtension - 22, // 88: tendermint.abci.ABCI.FinalizeBlock:input_type -> tendermint.abci.RequestFinalizeBlock - 25, // 89: tendermint.abci.ABCI.Echo:output_type -> tendermint.abci.ResponseEcho - 26, // 90: tendermint.abci.ABCI.Flush:output_type -> tendermint.abci.ResponseFlush - 27, // 91: tendermint.abci.ABCI.Info:output_type -> tendermint.abci.ResponseInfo - 30, // 92: tendermint.abci.ABCI.CheckTx:output_type -> tendermint.abci.ResponseCheckTx - 29, // 93: tendermint.abci.ABCI.Query:output_type -> tendermint.abci.ResponseQuery - 31, // 94: tendermint.abci.ABCI.Commit:output_type -> tendermint.abci.ResponseCommit - 28, // 95: tendermint.abci.ABCI.InitChain:output_type -> tendermint.abci.ResponseInitChain - 32, // 96: tendermint.abci.ABCI.ListSnapshots:output_type -> tendermint.abci.ResponseListSnapshots - 33, // 97: tendermint.abci.ABCI.OfferSnapshot:output_type -> tendermint.abci.ResponseOfferSnapshot - 34, // 98: tendermint.abci.ABCI.LoadSnapshotChunk:output_type -> tendermint.abci.ResponseLoadSnapshotChunk - 35, // 99: tendermint.abci.ABCI.ApplySnapshotChunk:output_type -> tendermint.abci.ResponseApplySnapshotChunk - 36, // 100: tendermint.abci.ABCI.PrepareProposal:output_type -> tendermint.abci.ResponsePrepareProposal - 37, // 101: tendermint.abci.ABCI.ProcessProposal:output_type -> tendermint.abci.ResponseProcessProposal - 38, // 102: tendermint.abci.ABCI.ExtendVote:output_type -> tendermint.abci.ResponseExtendVote - 39, // 103: tendermint.abci.ABCI.VerifyVoteExtension:output_type -> tendermint.abci.ResponseVerifyVoteExtension - 40, // 104: tendermint.abci.ABCI.FinalizeBlock:output_type -> tendermint.abci.ResponseFinalizeBlock - 89, // [89:105] is the sub-list for method output_type - 73, // [73:89] is the sub-list for method input_type - 73, // [73:73] is the sub-list for extension type_name - 73, // [73:73] is the sub-list for extension extendee - 0, // [0:73] is the sub-list for field type_name + 53, // 27: tendermint.abci.RequestExtendVote.time:type_name -> google.protobuf.Timestamp + 41, // 28: tendermint.abci.RequestExtendVote.proposed_last_commit:type_name -> tendermint.abci.CommitInfo + 51, // 29: tendermint.abci.RequestExtendVote.misbehavior:type_name -> tendermint.abci.Misbehavior + 41, // 30: tendermint.abci.RequestFinalizeBlock.decided_last_commit:type_name -> tendermint.abci.CommitInfo + 51, // 31: tendermint.abci.RequestFinalizeBlock.misbehavior:type_name -> tendermint.abci.Misbehavior + 53, // 32: tendermint.abci.RequestFinalizeBlock.time:type_name -> google.protobuf.Timestamp + 24, // 33: tendermint.abci.Response.exception:type_name -> tendermint.abci.ResponseException + 25, // 34: tendermint.abci.Response.echo:type_name -> tendermint.abci.ResponseEcho + 26, // 35: tendermint.abci.Response.flush:type_name -> tendermint.abci.ResponseFlush + 27, // 36: tendermint.abci.Response.info:type_name -> tendermint.abci.ResponseInfo + 28, // 37: tendermint.abci.Response.init_chain:type_name -> tendermint.abci.ResponseInitChain + 29, // 38: tendermint.abci.Response.query:type_name -> tendermint.abci.ResponseQuery + 30, // 39: tendermint.abci.Response.check_tx:type_name -> tendermint.abci.ResponseCheckTx + 31, // 40: tendermint.abci.Response.commit:type_name -> tendermint.abci.ResponseCommit + 32, // 41: tendermint.abci.Response.list_snapshots:type_name -> tendermint.abci.ResponseListSnapshots + 33, // 42: tendermint.abci.Response.offer_snapshot:type_name -> tendermint.abci.ResponseOfferSnapshot + 34, // 43: tendermint.abci.Response.load_snapshot_chunk:type_name -> tendermint.abci.ResponseLoadSnapshotChunk + 35, // 44: tendermint.abci.Response.apply_snapshot_chunk:type_name -> tendermint.abci.ResponseApplySnapshotChunk + 36, // 45: tendermint.abci.Response.prepare_proposal:type_name -> tendermint.abci.ResponsePrepareProposal + 37, // 46: tendermint.abci.Response.process_proposal:type_name -> tendermint.abci.ResponseProcessProposal + 38, // 47: tendermint.abci.Response.extend_vote:type_name -> tendermint.abci.ResponseExtendVote + 39, // 48: tendermint.abci.Response.verify_vote_extension:type_name -> tendermint.abci.ResponseVerifyVoteExtension + 40, // 49: tendermint.abci.Response.finalize_block:type_name -> tendermint.abci.ResponseFinalizeBlock + 54, // 50: tendermint.abci.ResponseInitChain.consensus_params:type_name -> tendermint.types.ConsensusParams + 48, // 51: tendermint.abci.ResponseInitChain.validators:type_name -> tendermint.abci.ValidatorUpdate + 55, // 52: tendermint.abci.ResponseQuery.proof_ops:type_name -> tendermint.crypto.ProofOps + 43, // 53: tendermint.abci.ResponseCheckTx.events:type_name -> tendermint.abci.Event + 52, // 54: tendermint.abci.ResponseListSnapshots.snapshots:type_name -> tendermint.abci.Snapshot + 2, // 55: tendermint.abci.ResponseOfferSnapshot.result:type_name -> tendermint.abci.ResponseOfferSnapshot.Result + 3, // 56: tendermint.abci.ResponseApplySnapshotChunk.result:type_name -> tendermint.abci.ResponseApplySnapshotChunk.Result + 4, // 57: tendermint.abci.ResponseProcessProposal.status:type_name -> tendermint.abci.ResponseProcessProposal.ProposalStatus + 5, // 58: tendermint.abci.ResponseVerifyVoteExtension.status:type_name -> tendermint.abci.ResponseVerifyVoteExtension.VerifyStatus + 43, // 59: tendermint.abci.ResponseFinalizeBlock.events:type_name -> tendermint.abci.Event + 45, // 60: tendermint.abci.ResponseFinalizeBlock.tx_results:type_name -> tendermint.abci.ExecTxResult + 48, // 61: tendermint.abci.ResponseFinalizeBlock.validator_updates:type_name -> tendermint.abci.ValidatorUpdate + 54, // 62: tendermint.abci.ResponseFinalizeBlock.consensus_param_updates:type_name -> tendermint.types.ConsensusParams + 49, // 63: tendermint.abci.CommitInfo.votes:type_name -> tendermint.abci.VoteInfo + 50, // 64: tendermint.abci.ExtendedCommitInfo.votes:type_name -> tendermint.abci.ExtendedVoteInfo + 44, // 65: tendermint.abci.Event.attributes:type_name -> tendermint.abci.EventAttribute + 43, // 66: tendermint.abci.ExecTxResult.events:type_name -> tendermint.abci.Event + 45, // 67: tendermint.abci.TxResult.result:type_name -> tendermint.abci.ExecTxResult + 56, // 68: tendermint.abci.ValidatorUpdate.pub_key:type_name -> tendermint.crypto.PublicKey + 47, // 69: tendermint.abci.VoteInfo.validator:type_name -> tendermint.abci.Validator + 57, // 70: tendermint.abci.VoteInfo.block_id_flag:type_name -> tendermint.types.BlockIDFlag + 47, // 71: tendermint.abci.ExtendedVoteInfo.validator:type_name -> tendermint.abci.Validator + 57, // 72: tendermint.abci.ExtendedVoteInfo.block_id_flag:type_name -> tendermint.types.BlockIDFlag + 1, // 73: tendermint.abci.Misbehavior.type:type_name -> tendermint.abci.MisbehaviorType + 47, // 74: tendermint.abci.Misbehavior.validator:type_name -> tendermint.abci.Validator + 53, // 75: tendermint.abci.Misbehavior.time:type_name -> google.protobuf.Timestamp + 7, // 76: tendermint.abci.ABCI.Echo:input_type -> tendermint.abci.RequestEcho + 8, // 77: tendermint.abci.ABCI.Flush:input_type -> tendermint.abci.RequestFlush + 9, // 78: tendermint.abci.ABCI.Info:input_type -> tendermint.abci.RequestInfo + 12, // 79: tendermint.abci.ABCI.CheckTx:input_type -> tendermint.abci.RequestCheckTx + 11, // 80: tendermint.abci.ABCI.Query:input_type -> tendermint.abci.RequestQuery + 13, // 81: tendermint.abci.ABCI.Commit:input_type -> tendermint.abci.RequestCommit + 10, // 82: tendermint.abci.ABCI.InitChain:input_type -> tendermint.abci.RequestInitChain + 14, // 83: tendermint.abci.ABCI.ListSnapshots:input_type -> tendermint.abci.RequestListSnapshots + 15, // 84: tendermint.abci.ABCI.OfferSnapshot:input_type -> tendermint.abci.RequestOfferSnapshot + 16, // 85: tendermint.abci.ABCI.LoadSnapshotChunk:input_type -> tendermint.abci.RequestLoadSnapshotChunk + 17, // 86: tendermint.abci.ABCI.ApplySnapshotChunk:input_type -> tendermint.abci.RequestApplySnapshotChunk + 18, // 87: tendermint.abci.ABCI.PrepareProposal:input_type -> tendermint.abci.RequestPrepareProposal + 19, // 88: tendermint.abci.ABCI.ProcessProposal:input_type -> tendermint.abci.RequestProcessProposal + 20, // 89: tendermint.abci.ABCI.ExtendVote:input_type -> tendermint.abci.RequestExtendVote + 21, // 90: tendermint.abci.ABCI.VerifyVoteExtension:input_type -> tendermint.abci.RequestVerifyVoteExtension + 22, // 91: tendermint.abci.ABCI.FinalizeBlock:input_type -> tendermint.abci.RequestFinalizeBlock + 25, // 92: tendermint.abci.ABCI.Echo:output_type -> tendermint.abci.ResponseEcho + 26, // 93: tendermint.abci.ABCI.Flush:output_type -> tendermint.abci.ResponseFlush + 27, // 94: tendermint.abci.ABCI.Info:output_type -> tendermint.abci.ResponseInfo + 30, // 95: tendermint.abci.ABCI.CheckTx:output_type -> tendermint.abci.ResponseCheckTx + 29, // 96: tendermint.abci.ABCI.Query:output_type -> tendermint.abci.ResponseQuery + 31, // 97: tendermint.abci.ABCI.Commit:output_type -> tendermint.abci.ResponseCommit + 28, // 98: tendermint.abci.ABCI.InitChain:output_type -> tendermint.abci.ResponseInitChain + 32, // 99: tendermint.abci.ABCI.ListSnapshots:output_type -> tendermint.abci.ResponseListSnapshots + 33, // 100: tendermint.abci.ABCI.OfferSnapshot:output_type -> tendermint.abci.ResponseOfferSnapshot + 34, // 101: tendermint.abci.ABCI.LoadSnapshotChunk:output_type -> tendermint.abci.ResponseLoadSnapshotChunk + 35, // 102: tendermint.abci.ABCI.ApplySnapshotChunk:output_type -> tendermint.abci.ResponseApplySnapshotChunk + 36, // 103: tendermint.abci.ABCI.PrepareProposal:output_type -> tendermint.abci.ResponsePrepareProposal + 37, // 104: tendermint.abci.ABCI.ProcessProposal:output_type -> tendermint.abci.ResponseProcessProposal + 38, // 105: tendermint.abci.ABCI.ExtendVote:output_type -> tendermint.abci.ResponseExtendVote + 39, // 106: tendermint.abci.ABCI.VerifyVoteExtension:output_type -> tendermint.abci.ResponseVerifyVoteExtension + 40, // 107: tendermint.abci.ABCI.FinalizeBlock:output_type -> tendermint.abci.ResponseFinalizeBlock + 92, // [92:108] is the sub-list for method output_type + 76, // [76:92] is the sub-list for method input_type + 76, // [76:76] is the sub-list for extension type_name + 76, // [76:76] is the sub-list for extension extendee + 0, // [0:76] is the sub-list for field type_name } func init() { file_tendermint_abci_types_proto_init() } diff --git a/baseapp/abci.go b/baseapp/abci.go index 6dc7d404fb7f..cb924e271e9b 100644 --- a/baseapp/abci.go +++ b/baseapp/abci.go @@ -2,18 +2,11 @@ package baseapp import ( "context" - "crypto/sha256" "fmt" - "os" "sort" "strings" - "syscall" "time" - errorsmod "cosmossdk.io/errors" - "cosmossdk.io/store/rootmulti" - snapshottypes "cosmossdk.io/store/snapshots/types" - storetypes "cosmossdk.io/store/types" "github.com/cockroachdb/errors" abci "github.com/cometbft/cometbft/abci/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" @@ -21,6 +14,12 @@ import ( "google.golang.org/grpc/codes" grpcstatus "google.golang.org/grpc/status" + coreheader "cosmossdk.io/core/header" + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/store/rootmulti" + snapshottypes "cosmossdk.io/store/snapshots/types" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" @@ -45,13 +44,14 @@ func (app *BaseApp) InitChain(req *abci.RequestInitChain) (*abci.ResponseInitCha // On a new chain, we consider the init chain block height as 0, even though // req.InitialHeight is 1 by default. initHeader := cmtproto.Header{ChainID: req.ChainId, Time: req.Time} - app.initialHeight = req.InitialHeight - app.logger.Info("InitChain", "initialHeight", req.InitialHeight, "chainID", req.ChainId) // Set the initial height, which will be used to determine if we are proposing // or processing the first block or not. app.initialHeight = req.InitialHeight + if app.initialHeight == 0 { // If initial height is 0, set it to 1 + app.initialHeight = 1 + } // if req.InitialHeight is > 1, then we set the initial version on all stores if req.InitialHeight > 1 { @@ -69,7 +69,7 @@ func (app *BaseApp) InitChain(req *abci.RequestInitChain) (*abci.ResponseInitCha // done after the finalizeBlockState and context have been set as it's persisted // to state. if req.ConsensusParams != nil { - err := app.StoreConsensusParams(app.finalizeBlockState.ctx, *req.ConsensusParams) + err := app.StoreConsensusParams(app.finalizeBlockState.Context(), *req.ConsensusParams) if err != nil { return nil, err } @@ -81,8 +81,18 @@ func (app *BaseApp) InitChain(req *abci.RequestInitChain) (*abci.ResponseInitCha // handler, the block height is zero by default. However, after Commit is called // the height needs to reflect the true block height. initHeader.Height = req.InitialHeight - app.checkState.ctx = app.checkState.ctx.WithBlockHeader(initHeader) - app.finalizeBlockState.ctx = app.finalizeBlockState.ctx.WithBlockHeader(initHeader) + app.checkState.SetContext(app.checkState.Context().WithBlockHeader(initHeader). + WithHeaderInfo(coreheader.Info{ + ChainID: req.ChainId, + Height: req.InitialHeight, + Time: req.Time, + })) + app.finalizeBlockState.SetContext(app.finalizeBlockState.Context().WithBlockHeader(initHeader). + WithHeaderInfo(coreheader.Info{ + ChainID: req.ChainId, + Height: req.InitialHeight, + Time: req.Time, + })) }() if app.initChainer == nil { @@ -90,9 +100,9 @@ func (app *BaseApp) InitChain(req *abci.RequestInitChain) (*abci.ResponseInitCha } // add block gas meter for any genesis transactions (allow infinite gas) - app.finalizeBlockState.ctx = app.finalizeBlockState.ctx.WithBlockGasMeter(storetypes.NewInfiniteGasMeter()) + app.finalizeBlockState.SetContext(app.finalizeBlockState.Context().WithBlockGasMeter(storetypes.NewInfiniteGasMeter())) - res, err := app.initChainer(app.finalizeBlockState.ctx, req) + res, err := app.initChainer(app.finalizeBlockState.Context(), req) if err != nil { return nil, err } @@ -115,28 +125,16 @@ func (app *BaseApp) InitChain(req *abci.RequestInitChain) (*abci.ResponseInitCha } } - // In the case of a new chain, AppHash will be the hash of an empty string. - // During an upgrade, it'll be the hash of the last committed block. - var appHash []byte - if !app.LastCommitID().IsZero() { - appHash = app.LastCommitID().Hash - } else { - // $ echo -n '' | sha256sum - // e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - emptyHash := sha256.Sum256([]byte{}) - appHash = emptyHash[:] - } - // NOTE: We don't commit, but FinalizeBlock for block InitialHeight starts from // this FinalizeBlockState. return &abci.ResponseInitChain{ ConsensusParams: res.ConsensusParams, Validators: res.Validators, - AppHash: appHash, + AppHash: app.LastCommitID().Hash, }, nil } -func (app *BaseApp) Info(req *abci.RequestInfo) (*abci.ResponseInfo, error) { +func (app *BaseApp) Info(_ *abci.RequestInfo) (*abci.ResponseInfo, error) { lastCommitID := app.cms.LastCommitID() return &abci.ResponseInfo{ @@ -167,7 +165,7 @@ func (app *BaseApp) Query(_ context.Context, req *abci.RequestQuery) (resp *abci telemetry.IncrCounter(1, "query", "count") telemetry.IncrCounter(1, "query", req.Path) - defer telemetry.MeasureSince(time.Now(), req.Path) + defer telemetry.MeasureSince(telemetry.Now(), req.Path) if req.Path == QueryPathBroadcastTx { return sdkerrors.QueryResult(errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "can't route a broadcast tx message"), app.trace), nil @@ -389,6 +387,7 @@ func (app *BaseApp) PrepareProposal(req *abci.RequestPrepareProposal) (resp *abc Time: req.Time, ProposerAddress: req.ProposerAddress, NextValidatorsHash: req.NextValidatorsHash, + AppHash: app.LastCommitID().Hash, } app.setState(execModePrepareProposal, header) @@ -399,17 +398,22 @@ func (app *BaseApp) PrepareProposal(req *abci.RequestPrepareProposal) (resp *abc return nil, errors.New("PrepareProposal called with invalid height") } - app.prepareProposalState.ctx = app.getContextForProposal(app.prepareProposalState.ctx, req.Height). + app.prepareProposalState.SetContext(app.getContextForProposal(app.prepareProposalState.Context(), req.Height). WithVoteInfos(toVoteInfo(req.LocalLastCommit.Votes)). // this is a set of votes that are not finalized yet, wait for commit WithBlockHeight(req.Height). WithBlockTime(req.Time). WithProposer(req.ProposerAddress). WithExecMode(sdk.ExecModePrepareProposal). - WithCometInfo(prepareProposalInfo{req}) + WithCometInfo(prepareProposalInfo{req}). + WithHeaderInfo(coreheader.Info{ + ChainID: app.chainID, + Height: req.Height, + Time: req.Time, + })) - app.prepareProposalState.ctx = app.prepareProposalState.ctx. - WithConsensusParams(app.GetConsensusParams(app.prepareProposalState.ctx)). - WithBlockGasMeter(app.getBlockGasMeter(app.prepareProposalState.ctx)) + app.prepareProposalState.SetContext(app.prepareProposalState.Context(). + WithConsensusParams(app.GetConsensusParams(app.prepareProposalState.Context())). + WithBlockGasMeter(app.getBlockGasMeter(app.prepareProposalState.Context()))) defer func() { if err := recover(); err != nil { @@ -420,14 +424,14 @@ func (app *BaseApp) PrepareProposal(req *abci.RequestPrepareProposal) (resp *abc "panic", err, ) - resp = &abci.ResponsePrepareProposal{} + resp = &abci.ResponsePrepareProposal{Txs: req.Txs} } }() - resp, err = app.prepareProposal(app.prepareProposalState.ctx, req) + resp, err = app.prepareProposal(app.prepareProposalState.Context(), req) if err != nil { - app.logger.Error("failed to prepare proposal", "height", req.Height, "error", err) - return &abci.ResponsePrepareProposal{}, nil + app.logger.Error("failed to prepare proposal", "height", req.Height, "time", req.Time, "err", err) + return &abci.ResponsePrepareProposal{Txs: req.Txs}, nil } return resp, nil @@ -467,6 +471,7 @@ func (app *BaseApp) ProcessProposal(req *abci.RequestProcessProposal) (resp *abc Time: req.Time, ProposerAddress: req.ProposerAddress, NextValidatorsHash: req.NextValidatorsHash, + AppHash: app.LastCommitID().Hash, } app.setState(execModeProcessProposal, header) @@ -476,21 +481,28 @@ func (app *BaseApp) ProcessProposal(req *abci.RequestProcessProposal) (resp *abc // processed the first block, as we want to avoid overwriting the finalizeState // after state changes during InitChain. if req.Height > app.initialHeight { + // abort any running OE + app.optimisticExec.Abort() app.setState(execModeFinalize, header) } - app.processProposalState.ctx = app.getContextForProposal(app.processProposalState.ctx, req.Height). + app.processProposalState.SetContext(app.getContextForProposal(app.processProposalState.Context(), req.Height). WithVoteInfos(req.ProposedLastCommit.Votes). // this is a set of votes that are not finalized yet, wait for commit WithBlockHeight(req.Height). WithBlockTime(req.Time). WithHeaderHash(req.Hash). WithProposer(req.ProposerAddress). WithCometInfo(cometInfo{ProposerAddress: req.ProposerAddress, ValidatorsHash: req.NextValidatorsHash, Misbehavior: req.Misbehavior, LastCommit: req.ProposedLastCommit}). - WithExecMode(sdk.ExecModeProcessProposal) + WithExecMode(sdk.ExecModeProcessProposal). + WithHeaderInfo(coreheader.Info{ + ChainID: app.chainID, + Height: req.Height, + Time: req.Time, + })) - app.processProposalState.ctx = app.processProposalState.ctx. - WithConsensusParams(app.GetConsensusParams(app.processProposalState.ctx)). - WithBlockGasMeter(app.getBlockGasMeter(app.processProposalState.ctx)) + app.processProposalState.SetContext(app.processProposalState.Context(). + WithConsensusParams(app.GetConsensusParams(app.processProposalState.Context())). + WithBlockGasMeter(app.getBlockGasMeter(app.processProposalState.Context()))) defer func() { if err := recover(); err != nil { @@ -505,12 +517,25 @@ func (app *BaseApp) ProcessProposal(req *abci.RequestProcessProposal) (resp *abc } }() - resp, err = app.processProposal(app.processProposalState.ctx, req) + resp, err = app.processProposal(app.processProposalState.Context(), req) if err != nil { - app.logger.Error("failed to process proposal", "height", req.Height, "error", err) + app.logger.Error("failed to process proposal", "height", req.Height, "time", req.Time, "hash", fmt.Sprintf("%X", req.Hash), "err", err) return &abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_REJECT}, nil } + // Only execute optimistic execution if the proposal is accepted, OE is + // enabled and the block height is greater than the initial height. During + // the first block we'll be carrying state from InitChain, so it would be + // impossible for us to easily revert. + // After the first block has been processed, the next blocks will get executed + // optimistically, so that when the ABCI client calls `FinalizeBlock` the app + // can have a response ready. + if resp.Status == abci.ResponseProcessProposal_ACCEPT && + app.optimisticExec.Enabled() && + req.Height > app.initialHeight { + app.optimisticExec.Execute(req) + } + return resp, nil } @@ -526,8 +551,18 @@ func (app *BaseApp) ProcessProposal(req *abci.RequestProcessProposal) (resp *abc func (app *BaseApp) ExtendVote(_ context.Context, req *abci.RequestExtendVote) (resp *abci.ResponseExtendVote, err error) { // Always reset state given that ExtendVote and VerifyVoteExtension can timeout // and be called again in a subsequent round. - emptyHeader := cmtproto.Header{ChainID: app.chainID, Height: req.Height} - app.setState(execModeVoteExtension, emptyHeader) + var ctx sdk.Context + + // If we're extending the vote for the initial height, we need to use the + // finalizeBlockState context, otherwise we don't get the uncommitted data + // from InitChain. + if req.Height == app.initialHeight { + ctx, _ = app.finalizeBlockState.Context().CacheContext() + } else { + emptyHeader := cmtproto.Header{ChainID: app.chainID, Height: req.Height} + ms := app.cms.CacheMultiStore() + ctx = sdk.NewContext(ms, emptyHeader, false, app.logger).WithStreamingManager(app.streamingManager) + } if app.extendVote == nil { return nil, errors.New("application ExtendVote handler not set") @@ -535,17 +570,28 @@ func (app *BaseApp) ExtendVote(_ context.Context, req *abci.RequestExtendVote) ( // If vote extensions are not enabled, as a safety precaution, we return an // error. - cp := app.GetConsensusParams(app.voteExtensionState.ctx) - if cp.Abci != nil && cp.Abci.VoteExtensionsEnableHeight <= 0 { + cp := app.GetConsensusParams(ctx) + + // Note: In this case, we do want to extend vote if the height is equal or + // greater than VoteExtensionsEnableHeight. This defers from the check done + // in ValidateVoteExtensions and PrepareProposal in which we'll check for + // vote extensions on VoteExtensionsEnableHeight+1. + extsEnabled := cp.Abci != nil && req.Height >= cp.Abci.VoteExtensionsEnableHeight && cp.Abci.VoteExtensionsEnableHeight != 0 + if !extsEnabled { return nil, fmt.Errorf("vote extensions are not enabled; unexpected call to ExtendVote at height %d", req.Height) } - app.voteExtensionState.ctx = app.voteExtensionState.ctx. + ctx = ctx. WithConsensusParams(cp). WithBlockGasMeter(storetypes.NewInfiniteGasMeter()). WithBlockHeight(req.Height). WithHeaderHash(req.Hash). - WithExecMode(sdk.ExecModeVoteExtension) + WithExecMode(sdk.ExecModeVoteExtension). + WithHeaderInfo(coreheader.Info{ + ChainID: app.chainID, + Height: req.Height, + Hash: req.Hash, + }) // add a deferred recover handler in case extendVote panics defer func() { @@ -560,9 +606,9 @@ func (app *BaseApp) ExtendVote(_ context.Context, req *abci.RequestExtendVote) ( } }() - resp, err = app.extendVote(app.voteExtensionState.ctx, req) + resp, err = app.extendVote(ctx, req) if err != nil { - app.logger.Error("failed to extend vote", "height", req.Height, "error", err) + app.logger.Error("failed to extend vote", "height", req.Height, "hash", fmt.Sprintf("%X", req.Hash), "err", err) return &abci.ResponseExtendVote{VoteExtension: []byte{}}, nil } @@ -580,10 +626,27 @@ func (app *BaseApp) VerifyVoteExtension(req *abci.RequestVerifyVoteExtension) (r return nil, errors.New("application VerifyVoteExtension handler not set") } + var ctx sdk.Context + + // If we're verifying the vote for the initial height, we need to use the + // finalizeBlockState context, otherwise we don't get the uncommitted data + // from InitChain. + if req.Height == app.initialHeight { + ctx, _ = app.finalizeBlockState.Context().CacheContext() + } else { + emptyHeader := cmtproto.Header{ChainID: app.chainID, Height: req.Height} + ms := app.cms.CacheMultiStore() + ctx = sdk.NewContext(ms, emptyHeader, false, app.logger).WithStreamingManager(app.streamingManager) + } + // If vote extensions are not enabled, as a safety precaution, we return an // error. - cp := app.GetConsensusParams(app.voteExtensionState.ctx) - if cp.Abci != nil && cp.Abci.VoteExtensionsEnableHeight <= 0 { + cp := app.GetConsensusParams(ctx) + + // Note: we verify votes extensions on VoteExtensionsEnableHeight+1. Check + // comment in ExtendVote and ValidateVoteExtensions for more details. + extsEnabled := cp.Abci != nil && req.Height >= cp.Abci.VoteExtensionsEnableHeight && cp.Abci.VoteExtensionsEnableHeight != 0 + if !extsEnabled { return nil, fmt.Errorf("vote extensions are not enabled; unexpected call to VerifyVoteExtension at height %d", req.Height) } @@ -601,28 +664,38 @@ func (app *BaseApp) VerifyVoteExtension(req *abci.RequestVerifyVoteExtension) (r } }() - resp, err = app.verifyVoteExt(app.voteExtensionState.ctx, req) + ctx = ctx. + WithConsensusParams(cp). + WithBlockGasMeter(storetypes.NewInfiniteGasMeter()). + WithBlockHeight(req.Height). + WithHeaderHash(req.Hash). + WithExecMode(sdk.ExecModeVerifyVoteExtension). + WithHeaderInfo(coreheader.Info{ + ChainID: app.chainID, + Height: req.Height, + Hash: req.Hash, + }) + + resp, err = app.verifyVoteExt(ctx, req) if err != nil { - app.logger.Error("failed to verify vote extension", "height", req.Height, "error", err) + app.logger.Error("failed to verify vote extension", "height", req.Height, "err", err) return &abci.ResponseVerifyVoteExtension{Status: abci.ResponseVerifyVoteExtension_REJECT}, nil } return resp, err } -// FinalizeBlock will execute the block proposal provided by RequestFinalizeBlock. -// Specifically, it will execute an application's BeginBlock (if defined), followed -// by the transactions in the proposal, finally followed by the application's -// EndBlock (if defined). -// -// For each raw transaction, i.e. a byte slice, BaseApp will only execute it if -// it adheres to the sdk.Tx interface. Otherwise, the raw transaction will be -// skipped. This is to support compatibility with proposers injecting vote -// extensions into the proposal, which should not themselves be executed in cases -// where they adhere to the sdk.Tx interface. -func (app *BaseApp) FinalizeBlock(req *abci.RequestFinalizeBlock) (*abci.ResponseFinalizeBlock, error) { +// internalFinalizeBlock executes the block, called by the Optimistic +// Execution flow or by the FinalizeBlock ABCI method. The context received is +// only used to handle early cancellation, for anything related to state app.finalizeBlockState.Context() +// must be used. +func (app *BaseApp) internalFinalizeBlock(ctx context.Context, req *abci.RequestFinalizeBlock) (*abci.ResponseFinalizeBlock, error) { var events []abci.Event + if err := app.checkHalt(req.Height, req.Time); err != nil { + return nil, err + } + if err := app.validateFinalizeBlockHeight(req); err != nil { return nil, err } @@ -639,39 +712,74 @@ func (app *BaseApp) FinalizeBlock(req *abci.RequestFinalizeBlock) (*abci.Respons Time: req.Time, ProposerAddress: req.ProposerAddress, NextValidatorsHash: req.NextValidatorsHash, + AppHash: app.LastCommitID().Hash, } - // Initialize the FinalizeBlock state. If this is the first block, it should - // already be initialized in InitChain. Otherwise app.finalizeBlockState will be - // nil, since it is reset on Commit. + // finalizeBlockState should be set on InitChain or ProcessProposal. If it is + // nil, it means we are replaying this block and we need to set the state here + // given that during block replay ProcessProposal is not executed by CometBFT. if app.finalizeBlockState == nil { app.setState(execModeFinalize, header) - } else { - // In the first block, app.finalizeBlockState.ctx will already be initialized - // by InitChain. Context is now updated with Header information. - app.finalizeBlockState.ctx = app.finalizeBlockState.ctx. - WithBlockHeader(header). - WithBlockHeight(req.Height) } - gasMeter := app.getBlockGasMeter(app.finalizeBlockState.ctx) - - app.finalizeBlockState.ctx = app.finalizeBlockState.ctx. - WithBlockGasMeter(gasMeter). + // Context is now updated with Header information. + app.finalizeBlockState.SetContext(app.finalizeBlockState.Context(). + WithBlockHeader(header). WithHeaderHash(req.Hash). - WithConsensusParams(app.GetConsensusParams(app.finalizeBlockState.ctx)). + WithHeaderInfo(coreheader.Info{ + ChainID: app.chainID, + Height: req.Height, + Time: req.Time, + Hash: req.Hash, + AppHash: app.LastCommitID().Hash, + }). + WithConsensusParams(app.GetConsensusParams(app.finalizeBlockState.Context())). WithVoteInfos(req.DecidedLastCommit.Votes). - WithExecMode(sdk.ExecModeFinalize) + WithExecMode(sdk.ExecModeFinalize). + WithCometInfo(cometInfo{ + Misbehavior: req.Misbehavior, + ValidatorsHash: req.NextValidatorsHash, + ProposerAddress: req.ProposerAddress, + LastCommit: req.DecidedLastCommit, + })) + + // GasMeter must be set after we get a context with updated consensus params. + gasMeter := app.getBlockGasMeter(app.finalizeBlockState.Context()) + app.finalizeBlockState.SetContext(app.finalizeBlockState.Context().WithBlockGasMeter(gasMeter)) if app.checkState != nil { - app.checkState.ctx = app.checkState.ctx. + app.checkState.SetContext(app.checkState.Context(). WithBlockGasMeter(gasMeter). - WithHeaderHash(req.Hash) + WithHeaderHash(req.Hash)) + } + + preblockEvents, err := app.preBlock(req) + if err != nil { + return nil, err + } + + events = append(events, preblockEvents...) + + beginBlock, err := app.beginBlock(req) + if err != nil { + return nil, err + } + + // First check for an abort signal after beginBlock, as it's the first place + // we spend any significant amount of time. + select { + case <-ctx.Done(): + return nil, ctx.Err() + default: + // continue } - beginBlock := app.beginBlock(req) events = append(events, beginBlock.Events...) + // Reset the gas meter so that the AnteHandlers aren't required to + gasMeter = app.getBlockGasMeter(app.finalizeBlockState.Context()) + app.finalizeBlockState.SetContext(app.finalizeBlockState.Context().WithBlockGasMeter(gasMeter)) + // Iterate over all raw transactions in the proposal and attempt to execute // them, gathering the execution results. // @@ -679,32 +787,129 @@ func (app *BaseApp) FinalizeBlock(req *abci.RequestFinalizeBlock) (*abci.Respons // vote extensions, so skip those. txResults := make([]*abci.ExecTxResult, 0, len(req.Txs)) for _, rawTx := range req.Txs { + var response *abci.ExecTxResult + if _, err := app.txDecoder(rawTx); err == nil { - txResults = append(txResults, app.deliverTx(rawTx)) + response = app.deliverTx(rawTx) + } else { + // In the case where a transaction included in a block proposal is malformed, + // we still want to return a default response to comet. This is because comet + // expects a response for each transaction included in a block proposal. + response = sdkerrors.ResponseExecTxResultWithEvents( + sdkerrors.ErrTxDecode, + 0, + 0, + nil, + false, + ) + } + + // check after every tx if we should abort + select { + case <-ctx.Done(): + return nil, ctx.Err() + default: + // continue } + + txResults = append(txResults, response) } if app.finalizeBlockState.ms.TracingEnabled() { app.finalizeBlockState.ms = app.finalizeBlockState.ms.SetTracingContext(nil).(storetypes.CacheMultiStore) } - endBlock, err := app.endBlock(app.finalizeBlockState.ctx) + endBlock, err := app.endBlock(app.finalizeBlockState.Context()) if err != nil { return nil, err } + // check after endBlock if we should abort, to avoid propagating the result + select { + case <-ctx.Done(): + return nil, ctx.Err() + default: + // continue + } + events = append(events, endBlock.Events...) - cp := app.GetConsensusParams(app.finalizeBlockState.ctx) + cp := app.GetConsensusParams(app.finalizeBlockState.Context()) return &abci.ResponseFinalizeBlock{ Events: events, TxResults: txResults, ValidatorUpdates: endBlock.ValidatorUpdates, ConsensusParamUpdates: &cp, - AppHash: app.workingHash(), }, nil } +// FinalizeBlock will execute the block proposal provided by RequestFinalizeBlock. +// Specifically, it will execute an application's BeginBlock (if defined), followed +// by the transactions in the proposal, finally followed by the application's +// EndBlock (if defined). +// +// For each raw transaction, i.e. a byte slice, BaseApp will only execute it if +// it adheres to the sdk.Tx interface. Otherwise, the raw transaction will be +// skipped. This is to support compatibility with proposers injecting vote +// extensions into the proposal, which should not themselves be executed in cases +// where they adhere to the sdk.Tx interface. +func (app *BaseApp) FinalizeBlock(req *abci.RequestFinalizeBlock) (res *abci.ResponseFinalizeBlock, err error) { + defer func() { + // call the streaming service hooks with the FinalizeBlock messages + for _, streamingListener := range app.streamingManager.ABCIListeners { + if err := streamingListener.ListenFinalizeBlock(app.finalizeBlockState.Context(), *req, *res); err != nil { + app.logger.Error("ListenFinalizeBlock listening hook failed", "height", req.Height, "err", err) + } + } + }() + + if app.optimisticExec.Initialized() { + // check if the hash we got is the same as the one we are executing + aborted := app.optimisticExec.AbortIfNeeded(req.Hash) + // Wait for the OE to finish, regardless of whether it was aborted or not + res, err = app.optimisticExec.WaitResult() + + // only return if we are not aborting + if !aborted { + if res != nil { + res.AppHash = app.workingHash() + } + + return res, err + } + + // if it was aborted, we need to reset the state + app.finalizeBlockState = nil + app.optimisticExec.Reset() + } + + // if no OE is running, just run the block (this is either a block replay or a OE that got aborted) + res, err = app.internalFinalizeBlock(context.Background(), req) + if res != nil { + res.AppHash = app.workingHash() + } + + return res, err +} + +// checkHalt checkes if height or time exceeds halt-height or halt-time respectively. +func (app *BaseApp) checkHalt(height int64, time time.Time) error { + var halt bool + switch { + case app.haltHeight > 0 && uint64(height) >= app.haltHeight: + halt = true + + case app.haltTime > 0 && time.Unix() >= int64(app.haltTime): + halt = true + } + + if halt { + return fmt.Errorf("halt per configuration height %d time %d", app.haltHeight, app.haltTime) + } + + return nil +} + // Commit implements the ABCI interface. It will commit all state that exists in // the deliver state's multi-store and includes the resulting commit ID in the // returned abci.ResponseCommit. Commit will set the check state based on the @@ -713,11 +918,11 @@ func (app *BaseApp) FinalizeBlock(req *abci.RequestFinalizeBlock) (*abci.Respons // against that height and gracefully halt if it matches the latest committed // height. func (app *BaseApp) Commit() (*abci.ResponseCommit, error) { - header := app.finalizeBlockState.ctx.BlockHeader() + header := app.finalizeBlockState.Context().BlockHeader() retainHeight := app.GetBlockRetentionHeight(header.Height) if app.precommiter != nil { - app.precommiter(app.finalizeBlockState.ctx) + app.precommiter(app.finalizeBlockState.Context()) } rms, ok := app.cms.(*rootmulti.Store) @@ -733,7 +938,7 @@ func (app *BaseApp) Commit() (*abci.ResponseCommit, error) { abciListeners := app.streamingManager.ABCIListeners if len(abciListeners) > 0 { - ctx := app.finalizeBlockState.ctx + ctx := app.finalizeBlockState.Context() blockHeight := ctx.BlockHeight() changeSet := app.cms.PopStateCache() @@ -753,27 +958,11 @@ func (app *BaseApp) Commit() (*abci.ResponseCommit, error) { app.finalizeBlockState = nil if app.prepareCheckStater != nil { - app.prepareCheckStater(app.checkState.ctx) - } - - var halt bool - switch { - case app.haltHeight > 0 && uint64(header.Height) >= app.haltHeight: - halt = true - - case app.haltTime > 0 && header.Time.Unix() >= int64(app.haltTime): - halt = true - } - - if halt { - // Halt the binary and allow CometBFT to receive the ResponseCommit - // response with the commit ID hash. This will allow the node to successfully - // restart and process blocks assuming the halt configuration has been - // reset or moved to a more distant value. - app.halt() + app.prepareCheckStater(app.checkState.Context()) } - go app.snapshotManager.SnapshotIfApplicable(header.Height) + // The SnapshotIfApplicable method will create the snapshot by starting the goroutine + app.snapshotManager.SnapshotIfApplicable(header.Height) return resp, nil } @@ -796,28 +985,6 @@ func (app *BaseApp) workingHash() []byte { return commitHash } -// halt attempts to gracefully shutdown the node via SIGINT and SIGTERM falling -// back on os.Exit if both fail. -func (app *BaseApp) halt() { - app.logger.Info("halting node per configuration", "height", app.haltHeight, "time", app.haltTime) - - p, err := os.FindProcess(os.Getpid()) - if err == nil { - // attempt cascading signals in case SIGINT fails (os dependent) - sigIntErr := p.Signal(syscall.SIGINT) - sigTermErr := p.Signal(syscall.SIGTERM) - - if sigIntErr == nil || sigTermErr == nil { - return - } - } - - // Resort to exiting immediately if the process could not be found or killed - // via SIGINT/SIGTERM signals. - app.logger.Info("failed to send SIGINT/SIGTERM; exiting...") - os.Exit(0) -} - func handleQueryApp(app *BaseApp, path []string, req *abci.RequestQuery) *abci.ResponseQuery { if len(path) >= 2 { switch path[1] { @@ -956,10 +1123,10 @@ func (app *BaseApp) FilterPeerByID(info string) *abci.ResponseQuery { // access any state changes made in InitChain. func (app *BaseApp) getContextForProposal(ctx sdk.Context, height int64) sdk.Context { if height == app.initialHeight { - ctx, _ = app.finalizeBlockState.ctx.CacheContext() + ctx, _ = app.finalizeBlockState.Context().CacheContext() // clear all context data set during InitChain to avoid inconsistent behavior - ctx = ctx.WithBlockHeader(cmtproto.Header{}) + ctx = ctx.WithBlockHeader(cmtproto.Header{}).WithHeaderInfo(coreheader.Info{}) return ctx } @@ -1063,8 +1230,11 @@ func (app *BaseApp) CreateQueryContext(height int64, prove bool) (sdk.Context, e } // branch the commit multi-store for safety - ctx := sdk.NewContext(cacheMS, app.checkState.ctx.BlockHeader(), true, app.logger). + header := app.checkState.Context().BlockHeader() + ctx := sdk.NewContext(cacheMS, header, true, app.logger). WithMinGasPrices(app.minGasPrices). + WithGasMeter(storetypes.NewGasMeter(app.queryGasLimit)). + WithBlockHeader(header). WithBlockHeight(height) if height != lastBlockHeight { @@ -1133,7 +1303,7 @@ func (app *BaseApp) GetBlockRetentionHeight(commitHeight int64) int64 { // evidence parameters instead of computing an estimated number of blocks based // on the unbonding period and block commitment time as the two should be // equivalent. - cp := app.GetConsensusParams(app.finalizeBlockState.ctx) + cp := app.GetConsensusParams(app.finalizeBlockState.Context()) if cp.Evidence != nil && cp.Evidence.MaxAgeNumBlocks > 0 { retentionHeight = commitHeight - cp.Evidence.MaxAgeNumBlocks } diff --git a/baseapp/abci_test.go b/baseapp/abci_test.go index 9d12ed1ac121..d57a98a801b0 100644 --- a/baseapp/abci_test.go +++ b/baseapp/abci_test.go @@ -3,20 +3,30 @@ package baseapp_test import ( "bytes" "context" + "crypto/sha256" + "encoding/binary" + "encoding/hex" "errors" "fmt" + "math/rand" + "strconv" "strings" "testing" - - errorsmod "cosmossdk.io/errors" - "cosmossdk.io/log" + "time" abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/crypto/secp256k1" + cmtprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" + protoio "github.com/cosmos/gogoproto/io" "github.com/cosmos/gogoproto/jsonpb" + "github.com/cosmos/gogoproto/proto" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/log" pruningtypes "cosmossdk.io/store/pruning/types" "cosmossdk.io/store/snapshots" snapshottypes "cosmossdk.io/store/snapshots/types" @@ -24,6 +34,7 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" baseapptestutil "github.com/cosmos/cosmos-sdk/baseapp/testutil" + "github.com/cosmos/cosmos-sdk/baseapp/testutil/mock" "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" @@ -39,10 +50,12 @@ func TestABCI_Info(t *testing.T) { res, err := suite.baseApp.Info(&reqInfo) require.NoError(t, err) + emptyHash := sha256.Sum256([]byte{}) + appHash := emptyHash[:] require.Equal(t, "", res.Version) require.Equal(t, t.Name(), res.GetData()) require.Equal(t, int64(0), res.LastBlockHeight) - require.Equal(t, []uint8(nil), res.LastBlockAppHash) + require.Equal(t, appHash, res.LastBlockAppHash) require.Equal(t, suite.baseApp.AppVersion(), res.AppVersion) } @@ -50,12 +63,14 @@ func TestABCI_First_block_Height(t *testing.T) { suite := NewBaseAppSuite(t, baseapp.SetChainID("test-chain-id")) app := suite.baseApp - app.InitChain(&abci.RequestInitChain{ + _, err := app.InitChain(&abci.RequestInitChain{ ChainId: "test-chain-id", ConsensusParams: &cmtproto.ConsensusParams{Block: &cmtproto.BlockParams{MaxGas: 5000000}}, InitialHeight: 1, }) - app.Commit() + require.NoError(t, err) + _, err = app.Commit() + require.NoError(t, err) ctx := app.GetContextForCheckTx(nil) require.Equal(t, int64(1), ctx.BlockHeight()) @@ -84,8 +99,8 @@ func TestABCI_InitChain(t *testing.T) { Data: key, } + // initChain is nil and chain ID is wrong - errors _, err := app.InitChain(&abci.RequestInitChain{ChainId: "wrong-chain-id"}) - // initChain is nil and chain ID is wrong - panics require.Error(t, err) // initChain is nil - nothing happens @@ -109,11 +124,11 @@ func TestABCI_InitChain(t *testing.T) { // The AppHash returned by a new chain is the sha256 hash of "". // $ echo -n '' | sha256sum // e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - require.Equal( - t, - []byte{0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55}, - initChainRes.AppHash, - ) + emptyHash := sha256.Sum256([]byte{}) + appHash := emptyHash[:] + require.NoError(t, err) + + require.Equal(t, appHash, initChainRes.AppHash) // assert that chainID is set correctly in InitChain chainID := getFinalizeBlockStateCtx(app).ChainID() @@ -122,12 +137,15 @@ func TestABCI_InitChain(t *testing.T) { chainID = getCheckStateCtx(app).ChainID() require.Equal(t, "test-chain-id", chainID, "ChainID in checkState not set correctly in InitChain") - app.FinalizeBlock(&abci.RequestFinalizeBlock{ + _, err = app.FinalizeBlock(&abci.RequestFinalizeBlock{ Hash: initChainRes.AppHash, Height: 1, }) + require.NoError(t, err) + + _, err = app.Commit() + require.NoError(t, err) - app.Commit() resQ, err = app.Query(context.TODO(), &query) require.NoError(t, err) require.Equal(t, int64(1), app.LastBlockHeight()) @@ -147,8 +165,10 @@ func TestABCI_InitChain(t *testing.T) { require.Equal(t, value, resQ.Value) // commit and ensure we can still query - app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: app.LastBlockHeight() + 1}) - app.Commit() + _, err = app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: app.LastBlockHeight() + 1}) + require.NoError(t, err) + _, err = app.Commit() + require.NoError(t, err) resQ, err = app.Query(context.TODO(), &query) require.NoError(t, err) @@ -160,12 +180,14 @@ func TestABCI_InitChain_WithInitialHeight(t *testing.T) { db := dbm.NewMemDB() app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil) - app.InitChain( + _, err := app.InitChain( &abci.RequestInitChain{ InitialHeight: 3, }, ) - app.Commit() + require.NoError(t, err) + _, err = app.Commit() + require.NoError(t, err) require.Equal(t, int64(3), app.LastBlockHeight()) } @@ -175,21 +197,229 @@ func TestABCI_FinalizeBlock_WithInitialHeight(t *testing.T) { db := dbm.NewMemDB() app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil) - app.InitChain( + _, err := app.InitChain( &abci.RequestInitChain{ InitialHeight: 3, }, ) + require.NoError(t, err) - _, err := app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 4}) + _, err = app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 4}) require.Error(t, err, "invalid height: 4; expected: 3") - app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 3}) - app.Commit() + _, err = app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 3}) + require.NoError(t, err) + _, err = app.Commit() + require.NoError(t, err) require.Equal(t, int64(3), app.LastBlockHeight()) } +func TestABCI_FinalizeBlock_WithBeginAndEndBlocker(t *testing.T) { + name := t.Name() + db := dbm.NewMemDB() + app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil) + + app.SetBeginBlocker(func(ctx sdk.Context) (sdk.BeginBlock, error) { + return sdk.BeginBlock{ + Events: []abci.Event{ + { + Type: "sometype", + Attributes: []abci.EventAttribute{ + { + Key: "foo", + Value: "bar", + }, + }, + }, + }, + }, nil + }) + + app.SetEndBlocker(func(ctx sdk.Context) (sdk.EndBlock, error) { + return sdk.EndBlock{ + Events: []abci.Event{ + { + Type: "anothertype", + Attributes: []abci.EventAttribute{ + { + Key: "foo", + Value: "bar", + }, + }, + }, + }, + }, nil + }) + + _, err := app.InitChain( + &abci.RequestInitChain{ + InitialHeight: 1, + }, + ) + require.NoError(t, err) + + res, err := app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 1}) + require.NoError(t, err) + + require.Len(t, res.Events, 2) + + require.Equal(t, "sometype", res.Events[0].Type) + require.Equal(t, "foo", res.Events[0].Attributes[0].Key) + require.Equal(t, "bar", res.Events[0].Attributes[0].Value) + require.Equal(t, "mode", res.Events[0].Attributes[1].Key) + require.Equal(t, "BeginBlock", res.Events[0].Attributes[1].Value) + + require.Equal(t, "anothertype", res.Events[1].Type) + require.Equal(t, "foo", res.Events[1].Attributes[0].Key) + require.Equal(t, "bar", res.Events[1].Attributes[0].Value) + require.Equal(t, "mode", res.Events[1].Attributes[1].Key) + require.Equal(t, "EndBlock", res.Events[1].Attributes[1].Value) + + _, err = app.Commit() + require.NoError(t, err) + + require.Equal(t, int64(1), app.LastBlockHeight()) +} + +func TestABCI_ExtendVote(t *testing.T) { + name := t.Name() + db := dbm.NewMemDB() + app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil) + + app.SetExtendVoteHandler(func(ctx sdk.Context, req *abci.RequestExtendVote) (*abci.ResponseExtendVote, error) { + voteExt := "foo" + hex.EncodeToString(req.Hash) + strconv.FormatInt(req.Height, 10) + return &abci.ResponseExtendVote{VoteExtension: []byte(voteExt)}, nil + }) + + app.SetVerifyVoteExtensionHandler(func(ctx sdk.Context, req *abci.RequestVerifyVoteExtension) (*abci.ResponseVerifyVoteExtension, error) { + // do some kind of verification here + expectedVoteExt := "foo" + hex.EncodeToString(req.Hash) + strconv.FormatInt(req.Height, 10) + if !bytes.Equal(req.VoteExtension, []byte(expectedVoteExt)) { + return &abci.ResponseVerifyVoteExtension{Status: abci.ResponseVerifyVoteExtension_REJECT}, nil + } + + return &abci.ResponseVerifyVoteExtension{Status: abci.ResponseVerifyVoteExtension_ACCEPT}, nil + }) + + app.SetParamStore(¶mStore{db: dbm.NewMemDB()}) + _, err := app.InitChain( + &abci.RequestInitChain{ + InitialHeight: 1, + ConsensusParams: &cmtproto.ConsensusParams{ + Abci: &cmtproto.ABCIParams{ + VoteExtensionsEnableHeight: 200, + }, + }, + }, + ) + require.NoError(t, err) + + // Votes not enabled yet + _, err = app.ExtendVote(context.Background(), &abci.RequestExtendVote{Height: 123, Hash: []byte("thehash")}) + require.ErrorContains(t, err, "vote extensions are not enabled") + + // First vote on the first enabled height + res, err := app.ExtendVote(context.Background(), &abci.RequestExtendVote{Height: 200, Hash: []byte("thehash")}) + require.NoError(t, err) + require.Len(t, res.VoteExtension, 20) + + res, err = app.ExtendVote(context.Background(), &abci.RequestExtendVote{Height: 1000, Hash: []byte("thehash")}) + require.NoError(t, err) + require.Len(t, res.VoteExtension, 21) + + // Error during vote extension should return an empty vote extension and no error + app.SetExtendVoteHandler(func(ctx sdk.Context, req *abci.RequestExtendVote) (*abci.ResponseExtendVote, error) { + return nil, errors.New("some error") + }) + res, err = app.ExtendVote(context.Background(), &abci.RequestExtendVote{Height: 1000, Hash: []byte("thehash")}) + require.NoError(t, err) + require.Len(t, res.VoteExtension, 0) + + // Verify Vote Extensions + _, err = app.VerifyVoteExtension(&abci.RequestVerifyVoteExtension{Height: 123, VoteExtension: []byte("1234567")}) + require.ErrorContains(t, err, "vote extensions are not enabled") + + // First vote on the first enabled height + vres, err := app.VerifyVoteExtension(&abci.RequestVerifyVoteExtension{Height: 200, Hash: []byte("thehash"), VoteExtension: []byte("foo74686568617368200")}) + require.NoError(t, err) + require.Equal(t, abci.ResponseVerifyVoteExtension_ACCEPT, vres.Status) + + vres, err = app.VerifyVoteExtension(&abci.RequestVerifyVoteExtension{Height: 1000, Hash: []byte("thehash"), VoteExtension: []byte("foo746865686173681000")}) + require.NoError(t, err) + require.Equal(t, abci.ResponseVerifyVoteExtension_ACCEPT, vres.Status) + + // Reject because it's just some random bytes + vres, err = app.VerifyVoteExtension(&abci.RequestVerifyVoteExtension{Height: 201, Hash: []byte("thehash"), VoteExtension: []byte("12345678")}) + require.NoError(t, err) + require.Equal(t, abci.ResponseVerifyVoteExtension_REJECT, vres.Status) + + // Reject because the verification failed (no error) + app.SetVerifyVoteExtensionHandler(func(ctx sdk.Context, req *abci.RequestVerifyVoteExtension) (*abci.ResponseVerifyVoteExtension, error) { + return nil, errors.New("some error") + }) + vres, err = app.VerifyVoteExtension(&abci.RequestVerifyVoteExtension{Height: 201, Hash: []byte("thehash"), VoteExtension: []byte("12345678")}) + require.NoError(t, err) + require.Equal(t, abci.ResponseVerifyVoteExtension_REJECT, vres.Status) +} + +// TestABCI_OnlyVerifyVoteExtension makes sure we can call VerifyVoteExtension +// without having called ExtendVote before. +func TestABCI_OnlyVerifyVoteExtension(t *testing.T) { + name := t.Name() + db := dbm.NewMemDB() + app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil) + + app.SetVerifyVoteExtensionHandler(func(ctx sdk.Context, req *abci.RequestVerifyVoteExtension) (*abci.ResponseVerifyVoteExtension, error) { + // do some kind of verification here + expectedVoteExt := "foo" + hex.EncodeToString(req.Hash) + strconv.FormatInt(req.Height, 10) + if !bytes.Equal(req.VoteExtension, []byte(expectedVoteExt)) { + return &abci.ResponseVerifyVoteExtension{Status: abci.ResponseVerifyVoteExtension_REJECT}, nil + } + + return &abci.ResponseVerifyVoteExtension{Status: abci.ResponseVerifyVoteExtension_ACCEPT}, nil + }) + + app.SetParamStore(¶mStore{db: dbm.NewMemDB()}) + _, err := app.InitChain( + &abci.RequestInitChain{ + InitialHeight: 1, + ConsensusParams: &cmtproto.ConsensusParams{ + Abci: &cmtproto.ABCIParams{ + VoteExtensionsEnableHeight: 200, + }, + }, + }, + ) + require.NoError(t, err) + + // Verify Vote Extensions + _, err = app.VerifyVoteExtension(&abci.RequestVerifyVoteExtension{Height: 123, VoteExtension: []byte("1234567")}) + require.ErrorContains(t, err, "vote extensions are not enabled") + + // First vote on the first enabled height + vres, err := app.VerifyVoteExtension(&abci.RequestVerifyVoteExtension{Height: 200, Hash: []byte("thehash"), VoteExtension: []byte("foo74686568617368200")}) + require.NoError(t, err) + require.Equal(t, abci.ResponseVerifyVoteExtension_ACCEPT, vres.Status) + + vres, err = app.VerifyVoteExtension(&abci.RequestVerifyVoteExtension{Height: 1000, Hash: []byte("thehash"), VoteExtension: []byte("foo746865686173681000")}) + require.NoError(t, err) + require.Equal(t, abci.ResponseVerifyVoteExtension_ACCEPT, vres.Status) + + // Reject because it's just some random bytes + vres, err = app.VerifyVoteExtension(&abci.RequestVerifyVoteExtension{Height: 201, Hash: []byte("thehash"), VoteExtension: []byte("12345678")}) + require.NoError(t, err) + require.Equal(t, abci.ResponseVerifyVoteExtension_REJECT, vres.Status) + + // Reject because the verification failed (no error) + app.SetVerifyVoteExtensionHandler(func(ctx sdk.Context, req *abci.RequestVerifyVoteExtension) (*abci.ResponseVerifyVoteExtension, error) { + return nil, errors.New("some error") + }) + vres, err = app.VerifyVoteExtension(&abci.RequestVerifyVoteExtension{Height: 201, Hash: []byte("thehash"), VoteExtension: []byte("12345678")}) + require.NoError(t, err) + require.Equal(t, abci.ResponseVerifyVoteExtension_REJECT, vres.Status) +} + func TestABCI_GRPCQuery(t *testing.T) { grpcQueryOpt := func(bapp *baseapp.BaseApp) { testdata.RegisterQueryServer( @@ -200,9 +430,10 @@ func TestABCI_GRPCQuery(t *testing.T) { suite := NewBaseAppSuite(t, grpcQueryOpt) - suite.baseApp.InitChain(&abci.RequestInitChain{ + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ ConsensusParams: &cmtproto.ConsensusParams{}, }) + require.NoError(t, err) req := testdata.SayHelloRequest{Name: "foo"} reqBz, err := req.Marshal() @@ -216,8 +447,10 @@ func TestABCI_GRPCQuery(t *testing.T) { require.Equal(t, sdkerrors.ErrInvalidHeight.ABCICode(), resQuery.Code, resQuery) require.Contains(t, resQuery.Log, "TestABCI_GRPCQuery is not ready; please wait for first block") - suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{Height: suite.baseApp.LastBlockHeight() + 1}) - suite.baseApp.Commit() + _, err = suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{Height: suite.baseApp.LastBlockHeight() + 1}) + require.NoError(t, err) + _, err = suite.baseApp.Commit() + require.NoError(t, err) reqQuery := abci.RequestQuery{ Data: reqBz, @@ -278,9 +511,10 @@ func TestBaseApp_PrepareCheckState(t *testing.T) { app := baseapp.NewBaseApp(name, logger, db, nil) app.SetParamStore(¶mStore{db: dbm.NewMemDB()}) - app.InitChain(&abci.RequestInitChain{ + _, err := app.InitChain(&abci.RequestInitChain{ ConsensusParams: cp, }) + require.NoError(t, err) wasPrepareCheckStateCalled := false app.SetPrepareCheckStater(func(ctx sdk.Context) { @@ -288,7 +522,8 @@ func TestBaseApp_PrepareCheckState(t *testing.T) { }) app.Seal() - app.Commit() + _, err = app.Commit() + require.NoError(t, err) require.Equal(t, true, wasPrepareCheckStateCalled) } @@ -305,9 +540,10 @@ func TestBaseApp_Precommit(t *testing.T) { app := baseapp.NewBaseApp(name, logger, db, nil) app.SetParamStore(¶mStore{db: dbm.NewMemDB()}) - app.InitChain(&abci.RequestInitChain{ + _, err := app.InitChain(&abci.RequestInitChain{ ConsensusParams: cp, }) + require.NoError(t, err) wasPrecommiterCalled := false app.SetPrecommiter(func(ctx sdk.Context) { @@ -315,7 +551,8 @@ func TestBaseApp_Precommit(t *testing.T) { }) app.Seal() - app.Commit() + _, err = app.Commit() + require.NoError(t, err) require.Equal(t, true, wasPrecommiterCalled) } @@ -330,9 +567,10 @@ func TestABCI_CheckTx(t *testing.T) { baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImpl{t, capKey1, counterKey}) nTxs := int64(5) - suite.baseApp.InitChain(&abci.RequestInitChain{ + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ ConsensusParams: &cmtproto.ConsensusParams{}, }) + require.NoError(t, err) for i := int64(0); i < nTxs; i++ { tx := newTxCounter(t, suite.txConfig, i, 0) // no messages @@ -352,7 +590,7 @@ func TestABCI_CheckTx(t *testing.T) { require.Equal(t, nTxs, storedCounter) // if a block is committed, CheckTx state should be reset - _, err := suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{ + _, err = suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{ Height: 1, Hash: []byte("hash"), }) @@ -361,7 +599,8 @@ func TestABCI_CheckTx(t *testing.T) { require.NotNil(t, getCheckStateCtx(suite.baseApp).BlockGasMeter(), "block gas meter should have been set to checkState") require.NotEmpty(t, getCheckStateCtx(suite.baseApp).HeaderHash()) - suite.baseApp.Commit() + _, err = suite.baseApp.Commit() + require.NoError(t, err) checkStateStore = getCheckStateCtx(suite.baseApp).KVStore(capKey1) storedBytes := checkStateStore.Get(counterKey) @@ -373,9 +612,10 @@ func TestABCI_FinalizeBlock_DeliverTx(t *testing.T) { anteOpt := func(bapp *baseapp.BaseApp) { bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, anteKey)) } suite := NewBaseAppSuite(t, anteOpt) - suite.baseApp.InitChain(&abci.RequestInitChain{ + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ ConsensusParams: &cmtproto.ConsensusParams{}, }) + require.NoError(t, err) deliverKey := []byte("deliver-key") baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImpl{t, capKey1, deliverKey}) @@ -412,7 +652,8 @@ func TestABCI_FinalizeBlock_DeliverTx(t *testing.T) { require.Equal(t, sdk.MarkEventsToIndex(counterEvent(sdk.EventTypeMessage, counter).ToABCIEvents(), map[string]struct{}{})[0].Attributes[0], events[2].Attributes[0], "msg handler update counter event") } - suite.baseApp.Commit() + _, err = suite.baseApp.Commit() + require.NoError(t, err) } } @@ -421,9 +662,10 @@ func TestABCI_FinalizeBlock_MultiMsg(t *testing.T) { anteOpt := func(bapp *baseapp.BaseApp) { bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, anteKey)) } suite := NewBaseAppSuite(t, anteOpt) - suite.baseApp.InitChain(&abci.RequestInitChain{ + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ ConsensusParams: &cmtproto.ConsensusParams{}, }) + require.NoError(t, err) deliverKey := []byte("deliver-key") baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImpl{t, capKey1, deliverKey}) @@ -437,10 +679,11 @@ func TestABCI_FinalizeBlock_MultiMsg(t *testing.T) { txBytes, err := suite.txConfig.TxEncoder()(tx) require.NoError(t, err) - suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{ + _, err = suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{ Height: 1, Txs: [][]byte{txBytes}, }) + require.NoError(t, err) store := getFinalizeBlockStateCtx(suite.baseApp).KVStore(capKey1) @@ -499,9 +742,10 @@ func TestABCI_Query_SimulateTx(t *testing.T) { } suite := NewBaseAppSuite(t, anteOpt) - suite.baseApp.InitChain(&abci.RequestInitChain{ + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ ConsensusParams: &cmtproto.ConsensusParams{}, }) + require.NoError(t, err) baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImplGasMeterOnly{gasConsumed}) @@ -543,8 +787,10 @@ func TestABCI_Query_SimulateTx(t *testing.T) { require.Equal(t, result.Events, simRes.Result.Events) require.True(t, bytes.Equal(result.Data, simRes.Result.Data)) - suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{Height: count}) - suite.baseApp.Commit() + _, err = suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{Height: count}) + require.NoError(t, err) + _, err = suite.baseApp.Commit() + require.NoError(t, err) } } @@ -558,14 +804,29 @@ func TestABCI_InvalidTransaction(t *testing.T) { suite := NewBaseAppSuite(t, anteOpt) baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImplGasMeterOnly{}) - suite.baseApp.InitChain(&abci.RequestInitChain{ + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ ConsensusParams: &cmtproto.ConsensusParams{}, }) + require.NoError(t, err) - suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{ + _, err = suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{ Height: 1, }) + require.NoError(t, err) + + // malformed transaction bytes + { + bz := []byte("example vote extension") + result, err := suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{ + Height: 1, + Txs: [][]byte{bz}, + }) + require.EqualValues(t, sdkerrors.ErrTxDecode.Codespace(), result.TxResults[0].Codespace, err) + require.EqualValues(t, sdkerrors.ErrTxDecode.ABCICode(), result.TxResults[0].Code, err) + require.EqualValues(t, 0, result.TxResults[0].GasUsed, err) + require.EqualValues(t, 0, result.TxResults[0].GasWanted, err) + } // transaction with no messages { emptyTx := suite.txConfig.NewTxBuilder().GetTx() @@ -689,15 +950,18 @@ func TestABCI_TxGasLimits(t *testing.T) { suite := NewBaseAppSuite(t, anteOpt) baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImplGasMeterOnly{}) - suite.baseApp.InitChain(&abci.RequestInitChain{ + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ ConsensusParams: &cmtproto.ConsensusParams{}, }) + require.NoError(t, err) - suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{ + _, err = suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{ Height: 1, }) + require.NoError(t, err) - suite.baseApp.Commit() + _, err = suite.baseApp.Commit() + require.NoError(t, err) testCases := []struct { tx signing.Tx @@ -778,15 +1042,17 @@ func TestABCI_MaxBlockGasLimits(t *testing.T) { suite := NewBaseAppSuite(t, anteOpt) baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImplGasMeterOnly{}) - suite.baseApp.InitChain(&abci.RequestInitChain{ + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ ConsensusParams: &cmtproto.ConsensusParams{ Block: &cmtproto.BlockParams{ MaxGas: 100, }, }, }) + require.NoError(t, err) - suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 1}) + _, err = suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 1}) + require.NoError(t, err) testCases := []struct { tx signing.Tx @@ -811,7 +1077,8 @@ func TestABCI_MaxBlockGasLimits(t *testing.T) { tx := tc.tx // reset block gas - suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{Height: suite.baseApp.LastBlockHeight() + 1}) + _, err = suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{Height: suite.baseApp.LastBlockHeight() + 1}) + require.NoError(t, err) // execute the transaction multiple times for j := 0; j < tc.numDelivers; j++ { @@ -876,13 +1143,14 @@ func TestABCI_GasConsumptionBadTx(t *testing.T) { suite := NewBaseAppSuite(t, anteOpt) baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImplGasMeterOnly{}) - suite.baseApp.InitChain(&abci.RequestInitChain{ + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ ConsensusParams: &cmtproto.ConsensusParams{ Block: &cmtproto.BlockParams{ MaxGas: 9, }, }, }) + require.NoError(t, err) tx := newTxCounter(t, suite.txConfig, 5, 0) tx = setFailOnAnte(t, suite.txConfig, tx, true) @@ -914,9 +1182,10 @@ func TestABCI_Query(t *testing.T) { suite := NewBaseAppSuite(t, anteOpt) baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImplGasMeterOnly{}) - suite.baseApp.InitChain(&abci.RequestInitChain{ + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ ConsensusParams: &cmtproto.ConsensusParams{}, }) + require.NoError(t, err) // NOTE: "/store/key1" tells us KVStore // and the final "/key" says to use the data as the @@ -944,7 +1213,7 @@ func TestABCI_Query(t *testing.T) { bz, err := suite.txConfig.TxEncoder()(tx) require.NoError(t, err) - suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{ + _, err = suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{ Height: 1, Txs: [][]byte{bz}, }) @@ -955,7 +1224,8 @@ func TestABCI_Query(t *testing.T) { require.Equal(t, 0, len(res.Value)) // query returns correct value after Commit - suite.baseApp.Commit() + _, err = suite.baseApp.Commit() + require.NoError(t, err) res, err = suite.baseApp.Query(context.TODO(), &query) require.NoError(t, err) @@ -1057,13 +1327,14 @@ func TestABCI_GetBlockRetentionHeight(t *testing.T) { tc := tc tc.bapp.SetParamStore(¶mStore{db: dbm.NewMemDB()}) - tc.bapp.InitChain(&abci.RequestInitChain{ + _, err = tc.bapp.InitChain(&abci.RequestInitChain{ ConsensusParams: &cmtproto.ConsensusParams{ Evidence: &cmtproto.EvidenceParams{ MaxAgeNumBlocks: tc.maxAgeBlocks, }, }, }) + require.NoError(t, err) t.Run(name, func(t *testing.T) { require.Equal(t, tc.expected, tc.bapp.GetBlockRetentionHeight(tc.commitHeight)) @@ -1086,8 +1357,10 @@ func TestPrepareCheckStateCalledWithCheckState(t *testing.T) { wasPrepareCheckStateCalled = true }) - app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 1}) - app.Commit() + _, err := app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 1}) + require.NoError(t, err) + _, err = app.Commit() + require.NoError(t, err) require.Equal(t, true, wasPrepareCheckStateCalled) } @@ -1108,15 +1381,17 @@ func TestPrecommiterCalledWithDeliverState(t *testing.T) { wasPrecommiterCalled = true }) - app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 1}) - app.Commit() + _, err := app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 1}) + require.NoError(t, err) + _, err = app.Commit() + require.NoError(t, err) require.Equal(t, true, wasPrecommiterCalled) } func TestABCI_Proposal_HappyPath(t *testing.T) { anteKey := []byte("ante-key") - pool := mempool.NewSenderNonceMempool() + pool := mempool.NewSenderNonceMempool(mempool.SenderNonceMaxTxOpt(5000)) anteOpt := func(bapp *baseapp.BaseApp) { bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, anteKey)) } @@ -1125,9 +1400,10 @@ func TestABCI_Proposal_HappyPath(t *testing.T) { baseapptestutil.RegisterKeyValueServer(suite.baseApp.MsgServiceRouter(), MsgKeyValueImpl{}) baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), NoopCounterServerImpl{}) - suite.baseApp.InitChain(&abci.RequestInitChain{ + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ ConsensusParams: &cmtproto.ConsensusParams{}, }) + require.NoError(t, err) tx := newTxCounter(t, suite.txConfig, 0, 1) txBytes, err := suite.txConfig.TxEncoder()(tx) @@ -1169,13 +1445,14 @@ func TestABCI_Proposal_HappyPath(t *testing.T) { require.NoError(t, err) require.Equal(t, abci.ResponseProcessProposal_ACCEPT, resProcessProposal.Status) + // the same txs as in PrepareProposal res, err := suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{ Height: suite.baseApp.LastBlockHeight() + 1, - Txs: [][]byte{txBytes}, + Txs: reqProposalTxBytes[:], }) require.NoError(t, err) - require.Equal(t, 1, pool.CountTx()) + require.Equal(t, 0, pool.CountTx()) require.NotEmpty(t, res.TxResults[0].Events) require.True(t, res.TxResults[0].IsOK(), fmt.Sprintf("%v", res)) @@ -1202,10 +1479,11 @@ func TestABCI_Proposal_Read_State_PrepareProposal(t *testing.T) { suite := NewBaseAppSuite(t, setInitChainerOpt, prepareOpt) - suite.baseApp.InitChain(&abci.RequestInitChain{ + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ InitialHeight: 1, ConsensusParams: &cmtproto.ConsensusParams{}, }) + require.NoError(t, err) reqPrepareProposal := abci.RequestPrepareProposal{ MaxTxBytes: 1000, @@ -1224,23 +1502,85 @@ func TestABCI_Proposal_Read_State_PrepareProposal(t *testing.T) { resProcessProposal, err := suite.baseApp.ProcessProposal(&reqProcessProposal) require.NoError(t, err) require.Equal(t, abci.ResponseProcessProposal_ACCEPT, resProcessProposal.Status) +} + +func TestABCI_Proposals_WithVE(t *testing.T) { + someVoteExtension := []byte("some-vote-extension") + + setInitChainerOpt := func(bapp *baseapp.BaseApp) { + bapp.SetInitChainer(func(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error) { + return &abci.ResponseInitChain{}, nil + }) + } + + prepareOpt := func(bapp *baseapp.BaseApp) { + bapp.SetPrepareProposal(func(ctx sdk.Context, req *abci.RequestPrepareProposal) (*abci.ResponsePrepareProposal, error) { + // Inject the vote extension to the beginning of the proposal + txs := make([][]byte, len(req.Txs)+1) + txs[0] = someVoteExtension + copy(txs[1:], req.Txs) + + return &abci.ResponsePrepareProposal{Txs: txs}, nil + }) + + bapp.SetProcessProposal(func(ctx sdk.Context, req *abci.RequestProcessProposal) (*abci.ResponseProcessProposal, error) { + // Check that the vote extension is still there + require.Equal(t, someVoteExtension, req.Txs[0]) + return &abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT}, nil + }) + } + + suite := NewBaseAppSuite(t, setInitChainerOpt, prepareOpt) + + suite.baseApp.InitChain(&abci.RequestInitChain{ + InitialHeight: 1, + ConsensusParams: &cmtproto.ConsensusParams{}, + }) + + reqPrepareProposal := abci.RequestPrepareProposal{ + MaxTxBytes: 100000, + Height: 1, // this value can't be 0 + } + resPrepareProposal, err := suite.baseApp.PrepareProposal(&reqPrepareProposal) + require.NoError(t, err) + require.Equal(t, 1, len(resPrepareProposal.Txs)) + + reqProcessProposal := abci.RequestProcessProposal{ + Txs: resPrepareProposal.Txs, + Height: reqPrepareProposal.Height, + } + resProcessProposal, err := suite.baseApp.ProcessProposal(&reqProcessProposal) + require.NoError(t, err) + require.Equal(t, abci.ResponseProcessProposal_ACCEPT, resProcessProposal.Status) - // suite.baseApp.BeginBlock(abci.RequestBeginBlock{ - // Header: cmtproto.Header{Height: suite.baseApp.LastBlockHeight() + 1}, - // }) + // Run finalize block and ensure that the vote extension is still there and that + // the proposal is accepted + result, err := suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{ + Txs: resPrepareProposal.Txs, + Height: reqPrepareProposal.Height, + }) + require.NoError(t, err) + require.Equal(t, 1, len(result.TxResults)) + require.EqualValues(t, sdkerrors.ErrTxDecode.Codespace(), result.TxResults[0].Codespace, err) + require.EqualValues(t, sdkerrors.ErrTxDecode.ABCICode(), result.TxResults[0].Code, err) + require.EqualValues(t, 0, result.TxResults[0].GasUsed, err) + require.EqualValues(t, 0, result.TxResults[0].GasWanted, err) } func TestABCI_PrepareProposal_ReachedMaxBytes(t *testing.T) { anteKey := []byte("ante-key") - pool := mempool.NewSenderNonceMempool() + pool := mempool.NewSenderNonceMempool(mempool.SenderNonceMaxTxOpt(5000)) anteOpt := func(bapp *baseapp.BaseApp) { bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, anteKey)) } + suite := NewBaseAppSuite(t, anteOpt, baseapp.SetMempool(pool)) + baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), NoopCounterServerImpl{}) - suite.baseApp.InitChain(&abci.RequestInitChain{ + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ ConsensusParams: &cmtproto.ConsensusParams{}, }) + require.NoError(t, err) for i := 0; i < 100; i++ { tx2 := newTxCounter(t, suite.txConfig, int64(i), int64(i)) @@ -1259,18 +1599,21 @@ func TestABCI_PrepareProposal_ReachedMaxBytes(t *testing.T) { func TestABCI_PrepareProposal_BadEncoding(t *testing.T) { anteKey := []byte("ante-key") - pool := mempool.NewSenderNonceMempool() + pool := mempool.NewSenderNonceMempool(mempool.SenderNonceMaxTxOpt(5000)) anteOpt := func(bapp *baseapp.BaseApp) { bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, anteKey)) } + suite := NewBaseAppSuite(t, anteOpt, baseapp.SetMempool(pool)) + baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), NoopCounterServerImpl{}) - suite.baseApp.InitChain(&abci.RequestInitChain{ + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ ConsensusParams: &cmtproto.ConsensusParams{}, }) + require.NoError(t, err) tx := newTxCounter(t, suite.txConfig, 0, 0) - err := pool.Insert(sdk.Context{}, tx) + err = pool.Insert(sdk.Context{}, tx) require.NoError(t, err) reqPrepareProposal := abci.RequestPrepareProposal{ @@ -1282,36 +1625,117 @@ func TestABCI_PrepareProposal_BadEncoding(t *testing.T) { require.Equal(t, 1, len(resPrepareProposal.Txs)) } -func TestABCI_PrepareProposal_Failures(t *testing.T) { - anteKey := []byte("ante-key") - pool := mempool.NewSenderNonceMempool() - anteOpt := func(bapp *baseapp.BaseApp) { - bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, anteKey)) - } - suite := NewBaseAppSuite(t, anteOpt, baseapp.SetMempool(pool)) +func TestABCI_PrepareProposal_OverGasUnderBytes(t *testing.T) { + pool := mempool.NewSenderNonceMempool(mempool.SenderNonceMaxTxOpt(5000)) + suite := NewBaseAppSuite(t, baseapp.SetMempool(pool)) + baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), NoopCounterServerImpl{}) - suite.baseApp.InitChain(&abci.RequestInitChain{ - ConsensusParams: &cmtproto.ConsensusParams{}, + // set max block gas limit to 99, this will allow 9 txs of 10 gas each. + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ + ConsensusParams: &cmtproto.ConsensusParams{ + Block: &cmtproto.BlockParams{MaxGas: 99}, + }, }) - tx := newTxCounter(t, suite.txConfig, 0, 0) - txBytes, err := suite.txConfig.TxEncoder()(tx) require.NoError(t, err) + // insert 100 txs, each with a gas limit of 10 + _, _, addr := testdata.KeyTestPubAddr() + for i := int64(0); i < 100; i++ { + msg := &baseapptestutil.MsgCounter{Counter: i, FailOnHandler: false, Signer: addr.String()} + msgs := []sdk.Msg{msg} - reqCheckTx := abci.RequestCheckTx{ - Tx: txBytes, - Type: abci.CheckTxType_New, + builder := suite.txConfig.NewTxBuilder() + err = builder.SetMsgs(msgs...) + require.NoError(t, err) + builder.SetMemo("counter=" + strconv.FormatInt(i, 10) + "&failOnAnte=false") + builder.SetGasLimit(10) + setTxSignature(t, builder, uint64(i)) + + err := pool.Insert(sdk.Context{}, builder.GetTx()) + require.NoError(t, err) } - checkTxRes, err := suite.baseApp.CheckTx(&reqCheckTx) + + // ensure we only select transactions that fit within the block gas limit + res, err := suite.baseApp.PrepareProposal(&abci.RequestPrepareProposal{ + MaxTxBytes: 1_000_000, // large enough to ignore restriction + Height: 1, + }) require.NoError(t, err) - require.True(t, checkTxRes.IsOK()) - failTx := newTxCounter(t, suite.txConfig, 1, 1) - failTx = setFailOnAnte(t, suite.txConfig, failTx, true) + // Should include 9 transactions + require.Len(t, res.Txs, 9, "invalid number of transactions returned") +} - err = pool.Insert(sdk.Context{}, failTx) - require.NoError(t, err) - require.Equal(t, 2, pool.CountTx()) +func TestABCI_PrepareProposal_MaxGas(t *testing.T) { + pool := mempool.NewSenderNonceMempool(mempool.SenderNonceMaxTxOpt(5000)) + suite := NewBaseAppSuite(t, baseapp.SetMempool(pool)) + baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), NoopCounterServerImpl{}) + + // set max block gas limit to 100 + suite.baseApp.InitChain(&abci.RequestInitChain{ + ConsensusParams: &cmtproto.ConsensusParams{ + Block: &cmtproto.BlockParams{MaxGas: 100}, + }, + }) + + // insert 100 txs, each with a gas limit of 10 + _, _, addr := testdata.KeyTestPubAddr() + for i := int64(0); i < 100; i++ { + msg := &baseapptestutil.MsgCounter{Counter: i, FailOnHandler: false, Signer: addr.String()} + msgs := []sdk.Msg{msg} + + builder := suite.txConfig.NewTxBuilder() + builder.SetMsgs(msgs...) + builder.SetMemo("counter=" + strconv.FormatInt(i, 10) + "&failOnAnte=false") + builder.SetGasLimit(10) + setTxSignature(t, builder, uint64(i)) + + err := pool.Insert(sdk.Context{}, builder.GetTx()) + require.NoError(t, err) + } + + // ensure we only select transactions that fit within the block gas limit + res, err := suite.baseApp.PrepareProposal(&abci.RequestPrepareProposal{ + MaxTxBytes: 1_000_000, // large enough to ignore restriction + Height: 1, + }) + require.NoError(t, err) + require.Len(t, res.Txs, 10, "invalid number of transactions returned") +} + +func TestABCI_PrepareProposal_Failures(t *testing.T) { + anteKey := []byte("ante-key") + pool := mempool.NewSenderNonceMempool(mempool.SenderNonceMaxTxOpt(5000)) + anteOpt := func(bapp *baseapp.BaseApp) { + bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, anteKey)) + } + + suite := NewBaseAppSuite(t, anteOpt, baseapp.SetMempool(pool)) + baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), NoopCounterServerImpl{}) + + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ + ConsensusParams: &cmtproto.ConsensusParams{}, + }) + require.NoError(t, err) + + tx := newTxCounter(t, suite.txConfig, 0, 0) + txBytes, err := suite.txConfig.TxEncoder()(tx) + require.NoError(t, err) + + reqCheckTx := abci.RequestCheckTx{ + Tx: txBytes, + Type: abci.CheckTxType_New, + } + checkTxRes, err := suite.baseApp.CheckTx(&reqCheckTx) + require.NoError(t, err) + require.True(t, checkTxRes.IsOK()) + + failTx := newTxCounter(t, suite.txConfig, 1, 1) + failTx = setFailOnAnte(t, suite.txConfig, failTx, true) + + err = pool.Insert(sdk.Context{}, failTx) + require.NoError(t, err) + require.Equal(t, 2, pool.CountTx()) req := abci.RequestPrepareProposal{ MaxTxBytes: 1000, @@ -1330,9 +1754,10 @@ func TestABCI_PrepareProposal_PanicRecovery(t *testing.T) { } suite := NewBaseAppSuite(t, prepareOpt) - suite.baseApp.InitChain(&abci.RequestInitChain{ + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ ConsensusParams: &cmtproto.ConsensusParams{}, }) + require.NoError(t, err) req := abci.RequestPrepareProposal{ MaxTxBytes: 1000, @@ -1346,6 +1771,133 @@ func TestABCI_PrepareProposal_PanicRecovery(t *testing.T) { }) } +func TestABCI_PrepareProposal_VoteExtensions(t *testing.T) { + // set up mocks + ctrl := gomock.NewController(t) + valStore := mock.NewMockValidatorStore(ctrl) + privkey := secp256k1.GenPrivKey() + pubkey := privkey.PubKey() + addr := sdk.AccAddress(pubkey.Address()) + tmPk := cmtprotocrypto.PublicKey{ + Sum: &cmtprotocrypto.PublicKey_Secp256K1{ + Secp256K1: pubkey.Bytes(), + }, + } + + consAddr := sdk.ConsAddress(addr.String()) + valStore.EXPECT().GetPubKeyByConsAddr(gomock.Any(), consAddr.Bytes()).Return(tmPk, nil) + + // set up baseapp + prepareOpt := func(bapp *baseapp.BaseApp) { + bapp.SetPrepareProposal(func(ctx sdk.Context, req *abci.RequestPrepareProposal) (*abci.ResponsePrepareProposal, error) { + ctx = ctx.WithBlockHeight(req.Height).WithChainID(bapp.ChainID()) + _, info := extendedCommitToLastCommit(req.LocalLastCommit) + ctx = ctx.WithCometInfo(info) + err := baseapp.ValidateVoteExtensions(ctx, valStore, 0, "", req.LocalLastCommit) + if err != nil { + return nil, err + } + + cp := ctx.ConsensusParams() + extsEnabled := cp.Abci != nil && req.Height >= cp.Abci.VoteExtensionsEnableHeight && cp.Abci.VoteExtensionsEnableHeight != 0 + if extsEnabled { + req.Txs = append(req.Txs, []byte("some-tx-that-does-something-from-votes")) + } + return &abci.ResponsePrepareProposal{Txs: req.Txs}, nil + }) + } + + suite := NewBaseAppSuite(t, prepareOpt) + + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ + InitialHeight: 1, + ConsensusParams: &cmtproto.ConsensusParams{ + Abci: &cmtproto.ABCIParams{ + VoteExtensionsEnableHeight: 2, + }, + }, + }) + require.NoError(t, err) + + // first test without vote extensions, no new txs should be added + reqPrepareProposal := abci.RequestPrepareProposal{ + MaxTxBytes: 1000, + Height: 1, // this value can't be 0 + } + resPrepareProposal, err := suite.baseApp.PrepareProposal(&reqPrepareProposal) + require.NoError(t, err) + require.Equal(t, 0, len(resPrepareProposal.Txs)) + + // now we try with vote extensions, a new tx should show up + marshalDelimitedFn := func(msg proto.Message) ([]byte, error) { + var buf bytes.Buffer + if err := protoio.NewDelimitedWriter(&buf).WriteMsg(msg); err != nil { + return nil, err + } + + return buf.Bytes(), nil + } + + ext := []byte("something") + cve := cmtproto.CanonicalVoteExtension{ + Extension: ext, + Height: 2, // the vote extension was signed in the previous height + Round: int64(0), + ChainId: suite.baseApp.ChainID(), + } + + bz, err := marshalDelimitedFn(&cve) + require.NoError(t, err) + + extSig, err := privkey.Sign(bz) + require.NoError(t, err) + + reqPrepareProposal = abci.RequestPrepareProposal{ + MaxTxBytes: 1000, + Height: 3, // this value can't be 0 + LocalLastCommit: abci.ExtendedCommitInfo{ + Round: 0, + Votes: []abci.ExtendedVoteInfo{ + { + Validator: abci.Validator{ + Address: consAddr.Bytes(), + Power: 666, + }, + VoteExtension: ext, + ExtensionSignature: extSig, + BlockIdFlag: cmtproto.BlockIDFlagCommit, + }, + }, + }, + } + resPrepareProposal, err = suite.baseApp.PrepareProposal(&reqPrepareProposal) + require.NoError(t, err) + require.Equal(t, 1, len(resPrepareProposal.Txs)) + + // now vote extensions but our sole voter doesn't reach majority + reqPrepareProposal = abci.RequestPrepareProposal{ + MaxTxBytes: 1000, + Height: 3, // this value can't be 0 + LocalLastCommit: abci.ExtendedCommitInfo{ + Round: 0, + Votes: []abci.ExtendedVoteInfo{ + { + Validator: abci.Validator{ + Address: consAddr.Bytes(), + Power: 666, + }, + VoteExtension: ext, + ExtensionSignature: extSig, + BlockIdFlag: cmtproto.BlockIDFlagNil, // This will ignore the vote extension + }, + }, + }, + } + resPrepareProposal, err = suite.baseApp.PrepareProposal(&reqPrepareProposal) + require.NoError(t, err) + require.Equal(t, 0, len(resPrepareProposal.Txs)) +} + func TestABCI_ProcessProposal_PanicRecovery(t *testing.T) { processOpt := func(app *baseapp.BaseApp) { app.SetProcessProposal(func(ctx sdk.Context, rpp *abci.RequestProcessProposal) (*abci.ResponseProcessProposal, error) { @@ -1354,9 +1906,10 @@ func TestABCI_ProcessProposal_PanicRecovery(t *testing.T) { } suite := NewBaseAppSuite(t, processOpt) - suite.baseApp.InitChain(&abci.RequestInitChain{ + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ ConsensusParams: &cmtproto.ConsensusParams{}, }) + require.NoError(t, err) require.NotPanics(t, func() { res, err := suite.baseApp.ProcessProposal(&abci.RequestProcessProposal{Height: 1}) @@ -1392,9 +1945,10 @@ func TestABCI_Proposal_Reset_State_Between_Calls(t *testing.T) { suite := NewBaseAppSuite(t, prepareOpt, processOpt) - suite.baseApp.InitChain(&abci.RequestInitChain{ + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ ConsensusParams: &cmtproto.ConsensusParams{}, }) + require.NoError(t, err) reqPrepareProposal := abci.RequestPrepareProposal{ MaxTxBytes: 1000, @@ -1423,3 +1977,519 @@ func TestABCI_Proposal_Reset_State_Between_Calls(t *testing.T) { require.Equal(t, abci.ResponseProcessProposal_ACCEPT, resProcessProposal.Status) } } + +func TestABCI_HaltChain(t *testing.T) { + testCases := []struct { + name string + haltHeight uint64 + haltTime uint64 + blockHeight int64 + blockTime int64 + expHalt bool + }{ + {"default", 0, 0, 10, 0, false}, + {"halt-height-edge", 11, 0, 10, 0, false}, + {"halt-height-equal", 10, 0, 10, 0, true}, + {"halt-height", 10, 0, 10, 0, true}, + {"halt-time-edge", 0, 11, 1, 10, false}, + {"halt-time-equal", 0, 10, 1, 10, true}, + {"halt-time", 0, 10, 1, 11, true}, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + suite := NewBaseAppSuite(t, baseapp.SetHaltHeight(tc.haltHeight), baseapp.SetHaltTime(tc.haltTime)) + suite.baseApp.InitChain(&abci.RequestInitChain{ + ConsensusParams: &cmtproto.ConsensusParams{}, + InitialHeight: tc.blockHeight, + }) + + app := suite.baseApp + _, err := app.FinalizeBlock(&abci.RequestFinalizeBlock{ + Height: tc.blockHeight, + Time: time.Unix(tc.blockTime, 0), + }) + if !tc.expHalt { + require.NoError(t, err) + } else { + require.Error(t, err) + require.True(t, strings.HasPrefix(err.Error(), "halt per configuration")) + } + }) + } +} + +func TestBaseApp_PreBlocker(t *testing.T) { + db := dbm.NewMemDB() + name := t.Name() + logger := log.NewTestLogger(t) + + app := baseapp.NewBaseApp(name, logger, db, nil) + _, err := app.InitChain(&abci.RequestInitChain{}) + require.NoError(t, err) + + wasHookCalled := false + app.SetPreBlocker(func(ctx sdk.Context, req *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) { + wasHookCalled = true + + ctx.EventManager().EmitEvent(sdk.NewEvent("preblockertest", sdk.NewAttribute("height", fmt.Sprintf("%d", req.Height)))) + return &sdk.ResponsePreBlock{ConsensusParamsChanged: false}, nil + }) + app.Seal() + + res, err := app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 1}) + require.NoError(t, err) + require.Equal(t, true, wasHookCalled) + require.Len(t, res.Events, 1) + require.Equal(t, "preblockertest", res.Events[0].Type) + + // Now try erroring + app = baseapp.NewBaseApp(name, logger, db, nil) + _, err = app.InitChain(&abci.RequestInitChain{}) + require.NoError(t, err) + + app.SetPreBlocker(func(_ sdk.Context, req *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) { + return nil, errors.New("some error") + }) + app.Seal() + + _, err = app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 1}) + require.Error(t, err) +} + +// TestBaseApp_VoteExtensions tests vote extensions using a price as an example. +func TestBaseApp_VoteExtensions(t *testing.T) { + ctrl := gomock.NewController(t) + valStore := mock.NewMockValidatorStore(ctrl) + + // 10 good vote extensions, 2 bad ones from 12 total validators + numVals := 12 + privKeys := make([]secp256k1.PrivKey, numVals) + vals := make([]sdk.ConsAddress, numVals) + for i := 0; i < numVals; i++ { + privKey := secp256k1.GenPrivKey() + privKeys[i] = privKey + + pubKey := privKey.PubKey() + val := sdk.ConsAddress(pubKey.Bytes()) + vals[i] = val + + tmPk := cmtprotocrypto.PublicKey{ + Sum: &cmtprotocrypto.PublicKey_Secp256K1{ + Secp256K1: pubKey.Bytes(), + }, + } + valStore.EXPECT().GetPubKeyByConsAddr(gomock.Any(), val).Return(tmPk, nil) + } + + baseappOpts := func(app *baseapp.BaseApp) { + app.SetExtendVoteHandler(func(sdk.Context, *abci.RequestExtendVote) (*abci.ResponseExtendVote, error) { + // here we would have a process to get the price from an external source + price := 10000000 + rand.Int63n(1000000) + ve := make([]byte, 8) + binary.BigEndian.PutUint64(ve, uint64(price)) + return &abci.ResponseExtendVote{VoteExtension: ve}, nil + }) + + app.SetVerifyVoteExtensionHandler(func(_ sdk.Context, req *abci.RequestVerifyVoteExtension) (*abci.ResponseVerifyVoteExtension, error) { + vePrice := binary.BigEndian.Uint64(req.VoteExtension) + // here we would do some price validation, must not be 0 and not too high + if vePrice > 11000000 || vePrice == 0 { + // usually application should always return ACCEPT unless they really want to discard the entire vote + return &abci.ResponseVerifyVoteExtension{Status: abci.ResponseVerifyVoteExtension_REJECT}, nil + } + + return &abci.ResponseVerifyVoteExtension{Status: abci.ResponseVerifyVoteExtension_ACCEPT}, nil + }) + + app.SetPrepareProposal(func(ctx sdk.Context, req *abci.RequestPrepareProposal) (*abci.ResponsePrepareProposal, error) { + txs := [][]byte{} + ctx = ctx.WithBlockHeight(req.Height).WithChainID(app.ChainID()) + _, info := extendedCommitToLastCommit(req.LocalLastCommit) + ctx = ctx.WithCometInfo(info) + if err := baseapp.ValidateVoteExtensions(ctx, valStore, 0, "", req.LocalLastCommit); err != nil { + return nil, err + } + // add all VE as txs (in a real scenario we would need to check signatures too) + for _, v := range req.LocalLastCommit.Votes { + if len(v.VoteExtension) == 8 { + // pretend this is a way to check if the VE is valid + if binary.BigEndian.Uint64(v.VoteExtension) < 11000000 && binary.BigEndian.Uint64(v.VoteExtension) > 0 { + txs = append(txs, v.VoteExtension) + } + } + } + + return &abci.ResponsePrepareProposal{Txs: txs}, nil + }) + + app.SetProcessProposal(func(ctx sdk.Context, req *abci.RequestProcessProposal) (*abci.ResponseProcessProposal, error) { + // here we check if the proposal is valid, mainly if the vote extensions appended to the txs are valid + for _, v := range req.Txs { + // pretend this is a way to check if the tx is actually a VE + if len(v) == 8 { + // pretend this is a way to check if the VE is valid + if binary.BigEndian.Uint64(v) > 11000000 || binary.BigEndian.Uint64(v) == 0 { + return &abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_REJECT}, nil + } + } + } + + return &abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT}, nil + }) + + app.SetPreBlocker(func(ctx sdk.Context, req *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) { + count := uint64(0) + pricesSum := uint64(0) + for _, v := range req.Txs { + // pretend this is a way to check if the tx is actually a VE + if len(v) == 8 { + count++ + pricesSum += binary.BigEndian.Uint64(v) + } + } + + if count > 0 { + // we process the average price and store it in the context to make it available for FinalizeBlock + avgPrice := pricesSum / count + buf := make([]byte, 8) + binary.BigEndian.PutUint64(buf, avgPrice) + ctx.KVStore(capKey1).Set([]byte("avgPrice"), buf) + } + + return &sdk.ResponsePreBlock{ + ConsensusParamsChanged: true, + }, nil + }) + } + + suite := NewBaseAppSuite(t, baseappOpts) + + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ + ConsensusParams: &cmtproto.ConsensusParams{ + Abci: &cmtproto.ABCIParams{ + VoteExtensionsEnableHeight: 1, + }, + }, + }) + require.NoError(t, err) + + allVEs := [][]byte{} + // simulate getting 10 vote extensions from 10 validators + for i := 0; i < 10; i++ { + ve, err := suite.baseApp.ExtendVote(context.TODO(), &abci.RequestExtendVote{Height: 1}) + require.NoError(t, err) + allVEs = append(allVEs, ve.VoteExtension) + } + + // add a couple of invalid vote extensions (in what regards to the check we are doing in VerifyVoteExtension/ProcessProposal) + // add a 0 price + ve := make([]byte, 8) + binary.BigEndian.PutUint64(ve, uint64(0)) + allVEs = append(allVEs, ve) + + // add a price too high + ve = make([]byte, 8) + binary.BigEndian.PutUint64(ve, uint64(13000000)) + allVEs = append(allVEs, ve) + + // verify all votes, only 10 should be accepted + successful := 0 + for _, v := range allVEs { + res, err := suite.baseApp.VerifyVoteExtension(&abci.RequestVerifyVoteExtension{ + Height: 1, + VoteExtension: v, + }) + require.NoError(t, err) + if res.Status == abci.ResponseVerifyVoteExtension_ACCEPT { + successful++ + } + } + require.Equal(t, 10, successful) + + extVotes := []abci.ExtendedVoteInfo{} + for _, val := range vals { + extVotes = append(extVotes, abci.ExtendedVoteInfo{ + VoteExtension: allVEs[0], + BlockIdFlag: cmtproto.BlockIDFlagCommit, + ExtensionSignature: []byte{}, + Validator: abci.Validator{ + Address: val.Bytes(), + Power: 666, + }, + }, + ) + } + + prepPropReq := &abci.RequestPrepareProposal{ + Height: 1, + LocalLastCommit: abci.ExtendedCommitInfo{ + Round: 0, + Votes: extVotes, + }, + } + + // add all VEs to the local last commit, which will make PrepareProposal fail + // because it's not expecting to receive vote extensions when height == VoteExtensionsEnableHeight + for _, ve := range allVEs { + prepPropReq.LocalLastCommit.Votes = append(prepPropReq.LocalLastCommit.Votes, abci.ExtendedVoteInfo{ + VoteExtension: ve, + BlockIdFlag: cmtproto.BlockIDFlagCommit, + ExtensionSignature: []byte{}, // doesn't matter, it's just to make the next PrepareProposal fail + }) + } + resp, err := suite.baseApp.PrepareProposal(prepPropReq) + require.Len(t, resp.Txs, 0) // this is actually a failure, but we don't want to halt the chain + require.NoError(t, err) // we don't error here + + prepPropReq.LocalLastCommit.Votes = []abci.ExtendedVoteInfo{} // reset votes + resp, err = suite.baseApp.PrepareProposal(prepPropReq) + require.NoError(t, err) + require.Len(t, resp.Txs, 0) + + procPropRes, err := suite.baseApp.ProcessProposal(&abci.RequestProcessProposal{Height: 1, Txs: resp.Txs}) + require.NoError(t, err) + require.Equal(t, abci.ResponseProcessProposal_ACCEPT, procPropRes.Status) + + _, err = suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 1, Txs: resp.Txs}) + require.NoError(t, err) + + // The average price will be nil during the first block, given that we don't have + // any vote extensions on block 1 in PrepareProposal + avgPrice := getFinalizeBlockStateCtx(suite.baseApp).KVStore(capKey1).Get([]byte("avgPrice")) + require.Nil(t, avgPrice) + _, err = suite.baseApp.Commit() + require.NoError(t, err) + + // Now onto the second block, this time we process vote extensions from the + // previous block (which we sign now) + for i, ve := range allVEs { + cve := cmtproto.CanonicalVoteExtension{ + Extension: ve, + Height: 1, + Round: int64(0), + ChainId: suite.baseApp.ChainID(), + } + + bz, err := marshalDelimitedFn(&cve) + require.NoError(t, err) + + privKey := privKeys[i] + extSig, err := privKey.Sign(bz) + require.NoError(t, err) + + prepPropReq.LocalLastCommit.Votes = append(prepPropReq.LocalLastCommit.Votes, abci.ExtendedVoteInfo{ + VoteExtension: ve, + BlockIdFlag: cmtproto.BlockIDFlagCommit, + ExtensionSignature: extSig, + Validator: abci.Validator{ + Address: vals[i].Bytes(), + Power: 666, + }, + }) + } + + prepPropReq.Height = 2 + resp, err = suite.baseApp.PrepareProposal(prepPropReq) + require.NoError(t, err) + require.Len(t, resp.Txs, 10) + + procPropRes, err = suite.baseApp.ProcessProposal(&abci.RequestProcessProposal{Height: 2, Txs: resp.Txs}) + require.NoError(t, err) + require.Equal(t, abci.ResponseProcessProposal_ACCEPT, procPropRes.Status) + + _, err = suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 2, Txs: resp.Txs}) + require.NoError(t, err) + + // Check if the average price was available in FinalizeBlock's context + avgPrice = getFinalizeBlockStateCtx(suite.baseApp).KVStore(capKey1).Get([]byte("avgPrice")) + require.NotNil(t, avgPrice) + require.GreaterOrEqual(t, binary.BigEndian.Uint64(avgPrice), uint64(10000000)) + require.Less(t, binary.BigEndian.Uint64(avgPrice), uint64(11000000)) + + _, err = suite.baseApp.Commit() + require.NoError(t, err) + + // check if avgPrice was committed + committedAvgPrice := suite.baseApp.NewContext(true).KVStore(capKey1).Get([]byte("avgPrice")) + require.Equal(t, avgPrice, committedAvgPrice) +} + +func TestABCI_PrepareProposal_Panic(t *testing.T) { + prepareOpt := func(bapp *baseapp.BaseApp) { + bapp.SetPrepareProposal(func(ctx sdk.Context, req *abci.RequestPrepareProposal) (*abci.ResponsePrepareProposal, error) { + if len(req.Txs) == 3 { + panic("i don't like number 3, panic") + } + // return empty if no panic + return &abci.ResponsePrepareProposal{}, nil + }) + } + + suite := NewBaseAppSuite(t, prepareOpt) + + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ + InitialHeight: 1, + ConsensusParams: &cmtproto.ConsensusParams{}, + }) + require.NoError(t, err) + + txs := [][]byte{{1}, {2}} + reqPrepareProposal := abci.RequestPrepareProposal{ + MaxTxBytes: 1000, + Height: 1, // this value can't be 0 + Txs: txs, + } + resPrepareProposal, err := suite.baseApp.PrepareProposal(&reqPrepareProposal) + require.NoError(t, err) + require.Equal(t, 0, len(resPrepareProposal.Txs)) + + // make it panic, and check if it returns 3 txs (because of panic recovery) + txs = [][]byte{{1}, {2}, {3}} + reqPrepareProposal.Txs = txs + resPrepareProposal, err = suite.baseApp.PrepareProposal(&reqPrepareProposal) + require.NoError(t, err) + require.Equal(t, 3, len(resPrepareProposal.Txs)) +} + +func TestOptimisticExecution(t *testing.T) { + suite := NewBaseAppSuite(t, baseapp.SetOptimisticExecution()) + + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ + ConsensusParams: &cmtproto.ConsensusParams{}, + }) + require.NoError(t, err) + + // run 50 blocks + for i := 0; i < 50; i++ { + tx := newTxCounter(t, suite.txConfig, 0, 1) + txBytes, err := suite.txConfig.TxEncoder()(tx) + require.NoError(t, err) + + reqProcProp := abci.RequestProcessProposal{ + Txs: [][]byte{txBytes}, + Height: suite.baseApp.LastBlockHeight() + 1, + Hash: []byte("some-hash" + strconv.FormatInt(suite.baseApp.LastBlockHeight()+1, 10)), + } + + respProcProp, err := suite.baseApp.ProcessProposal(&reqProcProp) + require.Equal(t, abci.ResponseProcessProposal_ACCEPT, respProcProp.Status) + require.NoError(t, err) + + reqFinalizeBlock := abci.RequestFinalizeBlock{ + Height: reqProcProp.Height, + Txs: reqProcProp.Txs, + Hash: reqProcProp.Hash, + } + + respFinalizeBlock, err := suite.baseApp.FinalizeBlock(&reqFinalizeBlock) + require.NoError(t, err) + require.Len(t, respFinalizeBlock.TxResults, 1) + + _, err = suite.baseApp.Commit() + require.NoError(t, err) + } + + require.Equal(t, int64(50), suite.baseApp.LastBlockHeight()) +} + +func TestABCI_Proposal_FailReCheckTx(t *testing.T) { + pool := mempool.NewPriorityMempool[int64](mempool.PriorityNonceMempoolConfig[int64]{ + TxPriority: mempool.NewDefaultTxPriority(), + MaxTx: 0, + SignerExtractor: mempool.NewDefaultSignerExtractionAdapter(), + }) + + anteOpt := func(bapp *baseapp.BaseApp) { + bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (sdk.Context, error) { + // always fail on recheck, just to test the recheck logic + if ctx.IsReCheckTx() { + return ctx, errors.New("recheck failed in ante handler") + } + + return ctx, nil + }) + } + + suite := NewBaseAppSuite(t, anteOpt, baseapp.SetMempool(pool)) + baseapptestutil.RegisterKeyValueServer(suite.baseApp.MsgServiceRouter(), MsgKeyValueImpl{}) + baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), NoopCounterServerImpl{}) + + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ + ConsensusParams: &cmtproto.ConsensusParams{}, + }) + require.NoError(t, err) + + tx := newTxCounter(t, suite.txConfig, 0, 1) + txBytes, err := suite.txConfig.TxEncoder()(tx) + require.NoError(t, err) + + reqCheckTx := abci.RequestCheckTx{ + Tx: txBytes, + Type: abci.CheckTxType_New, + } + _, err = suite.baseApp.CheckTx(&reqCheckTx) + require.NoError(t, err) + + tx2 := newTxCounter(t, suite.txConfig, 1, 1) + + tx2Bytes, err := suite.txConfig.TxEncoder()(tx2) + require.NoError(t, err) + + err = pool.Insert(sdk.Context{}, tx2) + require.NoError(t, err) + + require.Equal(t, 2, pool.CountTx()) + + // call prepareProposal before calling recheck tx, just as a sanity check + reqPrepareProposal := abci.RequestPrepareProposal{ + MaxTxBytes: 1000, + Height: 1, + } + resPrepareProposal, err := suite.baseApp.PrepareProposal(&reqPrepareProposal) + require.NoError(t, err) + require.Equal(t, 2, len(resPrepareProposal.Txs)) + + // call recheck on the first tx, it MUST return an error + reqReCheckTx := abci.RequestCheckTx{ + Tx: txBytes, + Type: abci.CheckTxType_Recheck, + } + resp, err := suite.baseApp.CheckTx(&reqReCheckTx) + require.NoError(t, err) + require.True(t, resp.IsErr()) + require.Equal(t, "recheck failed in ante handler", resp.Log) + + // call prepareProposal again, should return only the second tx + resPrepareProposal, err = suite.baseApp.PrepareProposal(&reqPrepareProposal) + require.NoError(t, err) + require.Equal(t, 1, len(resPrepareProposal.Txs)) + require.Equal(t, tx2Bytes, resPrepareProposal.Txs[0]) + + // check the mempool, it should have only the second tx + require.Equal(t, 1, pool.CountTx()) + + reqProposalTxBytes := [][]byte{ + tx2Bytes, + } + reqProcessProposal := abci.RequestProcessProposal{ + Txs: reqProposalTxBytes, + Height: reqPrepareProposal.Height, + } + + resProcessProposal, err := suite.baseApp.ProcessProposal(&reqProcessProposal) + require.NoError(t, err) + require.Equal(t, abci.ResponseProcessProposal_ACCEPT, resProcessProposal.Status) + + // the same txs as in PrepareProposal + res, err := suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{ + Height: suite.baseApp.LastBlockHeight() + 1, + Txs: reqProposalTxBytes, + }) + require.NoError(t, err) + + require.Equal(t, 0, pool.CountTx()) + + require.NotEmpty(t, res.TxResults[0].Events) + require.True(t, res.TxResults[0].IsOK(), fmt.Sprintf("%v", res)) +} diff --git a/baseapp/abci_utils.go b/baseapp/abci_utils.go index 465dfa516416..30914b3c8705 100644 --- a/baseapp/abci_utils.go +++ b/baseapp/abci_utils.go @@ -2,61 +2,67 @@ package baseapp import ( "bytes" + "context" "fmt" + "slices" //nolint: gci // ignore this line for this linter - "cosmossdk.io/math" "github.com/cockroachdb/errors" abci "github.com/cometbft/cometbft/abci/types" - cmtcrypto "github.com/cometbft/cometbft/crypto" cryptoenc "github.com/cometbft/cometbft/crypto/encoding" cmtprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" protoio "github.com/cosmos/gogoproto/io" - "github.com/cosmos/gogoproto/proto" + "github.com/cosmos/gogoproto/proto" //nolint: gci // ignore this line for this linter + + "cosmossdk.io/core/comet" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/mempool" ) -// VoteExtensionThreshold defines the total voting power % that must be -// submitted in order for all vote extensions to be considered valid for a -// given height. -var VoteExtensionThreshold = math.LegacyNewDecWithPrec(667, 3) - type ( - // Validator defines the interface contract require for verifying vote extension - // signatures. Typically, this will be implemented by the x/staking module, - // which has knowledge of the CometBFT public key. - Validator interface { - CmtConsPublicKey() (cmtprotocrypto.PublicKey, error) - BondedTokens() math.Int - } - // ValidatorStore defines the interface contract require for verifying vote // extension signatures. Typically, this will be implemented by the x/staking // module, which has knowledge of the CometBFT public key. ValidatorStore interface { - GetValidatorByConsAddr(sdk.Context, cryptotypes.Address) (Validator, error) - TotalBondedTokens(ctx sdk.Context) math.Int + GetPubKeyByConsAddr(context.Context, sdk.ConsAddress) (cmtprotocrypto.PublicKey, error) + } + + // GasTx defines the contract that a transaction with a gas limit must implement. + GasTx interface { + GetGas() uint64 } ) // ValidateVoteExtensions defines a helper function for verifying vote extension // signatures that may be passed or manually injected into a block proposal from -// a proposer in ProcessProposal. It returns an error if any signature is invalid +// a proposer in PrepareProposal. It returns an error if any signature is invalid // or if unexpected vote extensions and/or signatures are found or less than 2/3 // power is received. +// NOTE: From v0.50.5 `currentHeight` and `chainID` arguments are ignored for fixing an issue. +// They will be removed from the function in v0.51+. func ValidateVoteExtensions( ctx sdk.Context, valStore ValidatorStore, - currentHeight int64, - chainID string, + _ int64, + _ string, extCommit abci.ExtendedCommitInfo, ) error { + // Get values from context cp := ctx.ConsensusParams() - extsEnabled := cp.Abci != nil && cp.Abci.VoteExtensionsEnableHeight > 0 + currentHeight := ctx.HeaderInfo().Height + chainID := ctx.HeaderInfo().ChainID + commitInfo := ctx.CometInfo().GetLastCommit() + // Check that both extCommit + commit are ordered in accordance with vp/address. + if err := validateExtendedCommitAgainstLastCommit(extCommit, commitInfo); err != nil { + return err + } + + // Start checking vote extensions only **after** the vote extensions enable + // height, because when `currentHeight == VoteExtensionsEnableHeight` + // PrepareProposal doesn't get any vote extensions in its request. + extsEnabled := cp.Abci != nil && currentHeight > cp.Abci.VoteExtensionsEnableHeight && cp.Abci.VoteExtensionsEnableHeight != 0 marshalDelimitedFn := func(msg proto.Message) ([]byte, error) { var buf bytes.Buffer if err := protoio.NewDelimitedWriter(&buf).WriteMsg(msg); err != nil { @@ -66,8 +72,22 @@ func ValidateVoteExtensions( return buf.Bytes(), nil } - var sumVP math.Int + var ( + // Total voting power of all vote extensions. + totalVP int64 + // Total voting power of all validators that submitted valid vote extensions. + sumVP int64 + ) + for _, vote := range extCommit.Votes { + totalVP += vote.Validator.Power + + // Only check + include power if the vote is a commit vote. There must be super-majority, otherwise the + // previous block (the block vote is for) could not have been committed. + if vote.BlockIdFlag != cmtproto.BlockIDFlagCommit { + continue + } + if !extsEnabled { if len(vote.VoteExtension) > 0 { return fmt.Errorf("vote extensions disabled; received non-empty vote extension at height %d", currentHeight) @@ -83,22 +103,14 @@ func ValidateVoteExtensions( return fmt.Errorf("vote extensions enabled; received empty vote extension signature at height %d", currentHeight) } - valConsAddr := cmtcrypto.Address(vote.Validator.Address) - - validator, err := valStore.GetValidatorByConsAddr(ctx, valConsAddr) - if err != nil { - return fmt.Errorf("failed to get validator %X: %w", valConsAddr, err) - } - if validator == nil { - return fmt.Errorf("validator %X not found", valConsAddr) - } + valConsAddr := sdk.ConsAddress(vote.Validator.Address) - cmtPubKeyProto, err := validator.CmtConsPublicKey() + pubKeyProto, err := valStore.GetPubKeyByConsAddr(ctx, valConsAddr) if err != nil { return fmt.Errorf("failed to get validator %X public key: %w", valConsAddr, err) } - cmtPubKey, err := cryptoenc.PubKeyFromProto(cmtPubKeyProto) + cmtPubKey, err := cryptoenc.PubKeyFromProto(pubKeyProto) if err != nil { return fmt.Errorf("failed to convert validator %X public key: %w", valConsAddr, err) } @@ -119,15 +131,64 @@ func ValidateVoteExtensions( return fmt.Errorf("failed to verify validator %X vote extension signature", valConsAddr) } - sumVP = sumVP.Add(validator.BondedTokens()) + sumVP += vote.Validator.Power } - // Ensure we have at least 2/3 voting power that submitted valid vote - // extensions. - totalVP := valStore.TotalBondedTokens(ctx) - percentSubmitted := math.LegacyNewDecFromInt(sumVP).Quo(math.LegacyNewDecFromInt(totalVP)) - if percentSubmitted.LT(VoteExtensionThreshold) { - return fmt.Errorf("insufficient cumulative voting power received to verify vote extensions; got: %s, expected: >=%s", percentSubmitted, VoteExtensionThreshold) + // This check is probably unnecessary, but better safe than sorry. + if totalVP <= 0 { + return fmt.Errorf("total voting power must be positive, got: %d", totalVP) + } + + // If the sum of the voting power has not reached (2/3 + 1) we need to error. + if requiredVP := ((totalVP * 2) / 3) + 1; sumVP < requiredVP { + return fmt.Errorf( + "insufficient cumulative voting power received to verify vote extensions; got: %d, expected: >=%d", + sumVP, requiredVP, + ) + } + return nil +} + +// validateExtendedCommitAgainstLastCommit validates an ExtendedCommitInfo against a LastCommit. Specifically, +// it checks that the ExtendedCommit + LastCommit (for the same height), are consistent with each other + that +// they are ordered correctly (by voting power) in accordance with +// [comet](https://github.com/cometbft/cometbft/blob/4ce0277b35f31985bbf2c25d3806a184a4510010/types/validator_set.go#L784). +func validateExtendedCommitAgainstLastCommit(ec abci.ExtendedCommitInfo, lc comet.CommitInfo) error { + // check that the rounds are the same + if ec.Round != lc.Round() { + return fmt.Errorf("extended commit round %d does not match last commit round %d", ec.Round, lc.Round()) + } + + // check that the # of votes are the same + if len(ec.Votes) != lc.Votes().Len() { + return fmt.Errorf("extended commit votes length %d does not match last commit votes length %d", len(ec.Votes), lc.Votes().Len()) + } + + // check sort order of extended commit votes + if !slices.IsSortedFunc(ec.Votes, func(vote1, vote2 abci.ExtendedVoteInfo) int { + if vote1.Validator.Power == vote2.Validator.Power { + return bytes.Compare(vote1.Validator.Address, vote2.Validator.Address) // addresses sorted in ascending order (used to break vp conflicts) + } + return -int(vote1.Validator.Power - vote2.Validator.Power) // vp sorted in descending order + }) { + return fmt.Errorf("extended commit votes are not sorted by voting power") + } + + addressCache := make(map[string]struct{}, len(ec.Votes)) + // check that consistency between LastCommit and ExtendedCommit + for i, vote := range ec.Votes { + // cache addresses to check for duplicates + if _, ok := addressCache[string(vote.Validator.Address)]; ok { + return fmt.Errorf("extended commit vote address %X is duplicated", vote.Validator.Address) + } + addressCache[string(vote.Validator.Address)] = struct{}{} + + if !bytes.Equal(vote.Validator.Address, lc.Votes().Get(i).Validator().Address()) { + return fmt.Errorf("extended commit vote address %X does not match last commit vote address %X", vote.Validator.Address, lc.Votes().Get(i).Validator().Address()) + } + if vote.Validator.Power != lc.Votes().Get(i).Validator().Power() { + return fmt.Errorf("extended commit vote power %d does not match last commit vote power %d", vote.Validator.Power, lc.Votes().Get(i).Validator().Power()) + } } return nil @@ -140,23 +201,34 @@ type ( ProposalTxVerifier interface { PrepareProposalVerifyTx(tx sdk.Tx) ([]byte, error) ProcessProposalVerifyTx(txBz []byte) (sdk.Tx, error) + TxDecode(txBz []byte) (sdk.Tx, error) + TxEncode(tx sdk.Tx) ([]byte, error) } // DefaultProposalHandler defines the default ABCI PrepareProposal and // ProcessProposal handlers. DefaultProposalHandler struct { - mempool mempool.Mempool - txVerifier ProposalTxVerifier + mempool mempool.Mempool + txVerifier ProposalTxVerifier + txSelector TxSelector + signerExtAdapter mempool.SignerExtractionAdapter } ) -func NewDefaultProposalHandler(mp mempool.Mempool, txVerifier ProposalTxVerifier) DefaultProposalHandler { - return DefaultProposalHandler{ - mempool: mp, - txVerifier: txVerifier, +func NewDefaultProposalHandler(mp mempool.Mempool, txVerifier ProposalTxVerifier) *DefaultProposalHandler { + return &DefaultProposalHandler{ + mempool: mp, + txVerifier: txVerifier, + txSelector: NewDefaultTxSelector(), + signerExtAdapter: mempool.NewDefaultSignerExtractionAdapter(), } } +// SetTxSelector sets the TxSelector function on the DefaultProposalHandler. +func (h *DefaultProposalHandler) SetTxSelector(ts TxSelector) { + h.txSelector = ts +} + // PrepareProposalHandler returns the default implementation for processing an // ABCI proposal. The application's mempool is enumerated and all valid // transactions are added to the proposal. Transactions are valid if they: @@ -177,50 +249,120 @@ func NewDefaultProposalHandler(mp mempool.Mempool, txVerifier ProposalTxVerifier // - If no mempool is set or if the mempool is a no-op mempool, the transactions // requested from CometBFT will simply be returned, which, by default, are in // FIFO order. -func (h DefaultProposalHandler) PrepareProposalHandler() sdk.PrepareProposalHandler { +func (h *DefaultProposalHandler) PrepareProposalHandler() sdk.PrepareProposalHandler { return func(ctx sdk.Context, req *abci.RequestPrepareProposal) (*abci.ResponsePrepareProposal, error) { + var maxBlockGas uint64 + if b := ctx.ConsensusParams().Block; b != nil { + maxBlockGas = uint64(b.MaxGas) + } + + defer h.txSelector.Clear() + // If the mempool is nil or NoOp we simply return the transactions // requested from CometBFT, which, by default, should be in FIFO order. + // + // Note, we still need to ensure the transactions returned respect req.MaxTxBytes. _, isNoOp := h.mempool.(mempool.NoOpMempool) if h.mempool == nil || isNoOp { - return &abci.ResponsePrepareProposal{Txs: req.Txs}, nil + for _, txBz := range req.Txs { + tx, err := h.txVerifier.TxDecode(txBz) + if err != nil { + return nil, err + } + + stop := h.txSelector.SelectTxForProposal(ctx, uint64(req.MaxTxBytes), maxBlockGas, tx, txBz) + if stop { + break + } + } + + return &abci.ResponsePrepareProposal{Txs: h.txSelector.SelectedTxs(ctx)}, nil } + selectedTxsSignersSeqs := make(map[string]uint64) var ( - selectedTxs [][]byte - totalTxBytes int64 + resError error + selectedTxsNums int + invalidTxs []sdk.Tx // invalid txs to be removed out of the loop to avoid dead lock ) + mempool.SelectBy(ctx, h.mempool, req.Txs, func(memTx sdk.Tx) bool { + signerData, err := h.signerExtAdapter.GetSigners(memTx) + if err != nil { + // propagate the error to the caller + resError = err + return false + } - iterator := h.mempool.Select(ctx, req.Txs) + // If the signers aren't in selectedTxsSignersSeqs then we haven't seen them before + // so we add them and continue given that we don't need to check the sequence. + shouldAdd := true + txSignersSeqs := make(map[string]uint64) + for _, signer := range signerData { + seq, ok := selectedTxsSignersSeqs[signer.Signer.String()] + if !ok { + txSignersSeqs[signer.Signer.String()] = signer.Sequence + continue + } - for iterator != nil { - memTx := iterator.Tx() + // If we have seen this signer before in this block, we must make + // sure that the current sequence is seq+1; otherwise is invalid + // and we skip it. + if seq+1 != signer.Sequence { + shouldAdd = false + break + } + txSignersSeqs[signer.Signer.String()] = signer.Sequence + } + if !shouldAdd { + return true + } // NOTE: Since transaction verification was already executed in CheckTx, // which calls mempool.Insert, in theory everything in the pool should be // valid. But some mempool implementations may insert invalid txs, so we // check again. - bz, err := h.txVerifier.PrepareProposalVerifyTx(memTx) + txBz, err := h.txVerifier.PrepareProposalVerifyTx(memTx) if err != nil { - err := h.mempool.Remove(memTx) - if err != nil && !errors.Is(err, mempool.ErrTxNotFound) { - panic(err) - } + invalidTxs = append(invalidTxs, memTx) } else { - txSize := int64(len(bz)) - if totalTxBytes += txSize; totalTxBytes <= req.MaxTxBytes { - selectedTxs = append(selectedTxs, bz) - } else { - // We've reached capacity per req.MaxTxBytes so we cannot select any - // more transactions. - break + stop := h.txSelector.SelectTxForProposal(ctx, uint64(req.MaxTxBytes), maxBlockGas, memTx, txBz) + if stop { + return false + } + + txsLen := len(h.txSelector.SelectedTxs(ctx)) + for sender, seq := range txSignersSeqs { + // If txsLen != selectedTxsNums is true, it means that we've + // added a new tx to the selected txs, so we need to update + // the sequence of the sender. + if txsLen != selectedTxsNums { + selectedTxsSignersSeqs[sender] = seq + } else if _, ok := selectedTxsSignersSeqs[sender]; !ok { + // The transaction hasn't been added but it passed the + // verification, so we know that the sequence is correct. + // So we set this sender's sequence to seq-1, in order + // to avoid unnecessary calls to PrepareProposalVerifyTx. + selectedTxsSignersSeqs[sender] = seq - 1 + } } + selectedTxsNums = txsLen } - iterator = iterator.Next() + return true + }) + + if resError != nil { + return nil, resError + } + + for _, tx := range invalidTxs { + err := h.mempool.Remove(tx) + if err != nil && !errors.Is(err, mempool.ErrTxNotFound) { + return nil, err + } } - return &abci.ResponsePrepareProposal{Txs: selectedTxs}, nil + return &abci.ResponsePrepareProposal{Txs: h.txSelector.SelectedTxs(ctx)}, nil } } @@ -235,7 +377,7 @@ func (h DefaultProposalHandler) PrepareProposalHandler() sdk.PrepareProposalHand // DefaultPrepareProposal. It is very important that the same validation logic // is used in both steps, and applications must ensure that this is the case in // non-default handlers. -func (h DefaultProposalHandler) ProcessProposalHandler() sdk.ProcessProposalHandler { +func (h *DefaultProposalHandler) ProcessProposalHandler() sdk.ProcessProposalHandler { // If the mempool is nil or NoOp we simply return ACCEPT, // because PrepareProposal may have included txs that could fail verification. _, isNoOp := h.mempool.(mempool.NoOpMempool) @@ -244,11 +386,29 @@ func (h DefaultProposalHandler) ProcessProposalHandler() sdk.ProcessProposalHand } return func(ctx sdk.Context, req *abci.RequestProcessProposal) (*abci.ResponseProcessProposal, error) { + var totalTxGas uint64 + + var maxBlockGas int64 + if b := ctx.ConsensusParams().Block; b != nil { + maxBlockGas = b.MaxGas + } + for _, txBytes := range req.Txs { - _, err := h.txVerifier.ProcessProposalVerifyTx(txBytes) + tx, err := h.txVerifier.ProcessProposalVerifyTx(txBytes) if err != nil { return &abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_REJECT}, nil } + + if maxBlockGas > 0 { + gasTx, ok := tx.(GasTx) + if ok { + totalTxGas += gasTx.GetGas() + } + + if totalTxGas > uint64(maxBlockGas) { + return &abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_REJECT}, nil + } + } } return &abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT}, nil @@ -286,3 +446,73 @@ func NoOpVerifyVoteExtensionHandler() sdk.VerifyVoteExtensionHandler { return &abci.ResponseVerifyVoteExtension{Status: abci.ResponseVerifyVoteExtension_ACCEPT}, nil } } + +// TxSelector defines a helper type that assists in selecting transactions during +// mempool transaction selection in PrepareProposal. It keeps track of the total +// number of bytes and total gas of the selected transactions. It also keeps +// track of the selected transactions themselves. +type TxSelector interface { + // SelectedTxs should return a copy of the selected transactions. + SelectedTxs(ctx context.Context) [][]byte + + // Clear should clear the TxSelector, nulling out all relevant fields. + Clear() + + // SelectTxForProposal should attempt to select a transaction for inclusion in + // a proposal based on inclusion criteria defined by the TxSelector. It must + // return if the caller should halt the transaction selection loop + // (typically over a mempool) or otherwise. + SelectTxForProposal(ctx context.Context, maxTxBytes, maxBlockGas uint64, memTx sdk.Tx, txBz []byte) bool +} + +type defaultTxSelector struct { + totalTxBytes uint64 + totalTxGas uint64 + selectedTxs [][]byte +} + +func NewDefaultTxSelector() TxSelector { + return &defaultTxSelector{} +} + +func (ts *defaultTxSelector) SelectedTxs(_ context.Context) [][]byte { + txs := make([][]byte, len(ts.selectedTxs)) + copy(txs, ts.selectedTxs) + return txs +} + +func (ts *defaultTxSelector) Clear() { + ts.totalTxBytes = 0 + ts.totalTxGas = 0 + ts.selectedTxs = nil +} + +func (ts *defaultTxSelector) SelectTxForProposal(_ context.Context, maxTxBytes, maxBlockGas uint64, memTx sdk.Tx, txBz []byte) bool { + txSize := uint64(len(txBz)) + + var txGasLimit uint64 + if memTx != nil { + if gasTx, ok := memTx.(GasTx); ok { + txGasLimit = gasTx.GetGas() + } + } + + // only add the transaction to the proposal if we have enough capacity + if (txSize + ts.totalTxBytes) <= maxTxBytes { + // If there is a max block gas limit, add the tx only if the limit has + // not been met. + if maxBlockGas > 0 { + if (txGasLimit + ts.totalTxGas) <= maxBlockGas { + ts.totalTxGas += txGasLimit + ts.totalTxBytes += txSize + ts.selectedTxs = append(ts.selectedTxs, txBz) + } + } else { + ts.totalTxBytes += txSize + ts.selectedTxs = append(ts.selectedTxs, txBz) + } + } + + // check if we've reached capacity; if so, we cannot select any more transactions + return ts.totalTxBytes >= maxTxBytes || (maxBlockGas > 0 && (ts.totalTxGas >= maxBlockGas)) +} diff --git a/baseapp/abci_utils_test.go b/baseapp/abci_utils_test.go new file mode 100644 index 000000000000..bfe1b2b2092f --- /dev/null +++ b/baseapp/abci_utils_test.go @@ -0,0 +1,776 @@ +package baseapp_test + +import ( + "bytes" + "sort" + "testing" + + abci "github.com/cometbft/cometbft/abci/types" + cmtsecp256k1 "github.com/cometbft/cometbft/crypto/secp256k1" + cmtprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + cmttypes "github.com/cometbft/cometbft/types" + dbm "github.com/cosmos/cosmos-db" + protoio "github.com/cosmos/gogoproto/io" + "github.com/cosmos/gogoproto/proto" + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" + + "cosmossdk.io/core/comet" + "cosmossdk.io/core/header" + "cosmossdk.io/log" + + "github.com/cosmos/cosmos-sdk/baseapp" + baseapptestutil "github.com/cosmos/cosmos-sdk/baseapp/testutil" + "github.com/cosmos/cosmos-sdk/baseapp/testutil/mock" + "github.com/cosmos/cosmos-sdk/client" + codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/mempool" + signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" + authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" +) + +const ( + chainID = "chain-id" +) + +type testValidator struct { + consAddr sdk.ConsAddress + tmPk cmtprotocrypto.PublicKey + privKey cmtsecp256k1.PrivKey +} + +func newTestValidator() testValidator { + privkey := cmtsecp256k1.GenPrivKey() + pubkey := privkey.PubKey() + tmPk := cmtprotocrypto.PublicKey{ + Sum: &cmtprotocrypto.PublicKey_Secp256K1{ + Secp256K1: pubkey.Bytes(), + }, + } + + return testValidator{ + consAddr: sdk.ConsAddress(pubkey.Address()), + tmPk: tmPk, + privKey: privkey, + } +} + +func (t testValidator) toValidator(power int64) abci.Validator { + return abci.Validator{ + Address: t.consAddr.Bytes(), + Power: power, + } +} + +type ABCIUtilsTestSuite struct { + suite.Suite + + valStore *mock.MockValidatorStore + vals [3]testValidator + ctx sdk.Context +} + +func NewABCIUtilsTestSuite(t *testing.T) *ABCIUtilsTestSuite { + t.Helper() + // create 3 validators + s := &ABCIUtilsTestSuite{ + vals: [3]testValidator{ + newTestValidator(), + newTestValidator(), + newTestValidator(), + }, + } + + // create mock + ctrl := gomock.NewController(t) + valStore := mock.NewMockValidatorStore(ctrl) + s.valStore = valStore + + // set up mock + s.valStore.EXPECT().GetPubKeyByConsAddr(gomock.Any(), s.vals[0].consAddr.Bytes()).Return(s.vals[0].tmPk, nil).AnyTimes() + s.valStore.EXPECT().GetPubKeyByConsAddr(gomock.Any(), s.vals[1].consAddr.Bytes()).Return(s.vals[1].tmPk, nil).AnyTimes() + s.valStore.EXPECT().GetPubKeyByConsAddr(gomock.Any(), s.vals[2].consAddr.Bytes()).Return(s.vals[2].tmPk, nil).AnyTimes() + + // create context + s.ctx = sdk.Context{}.WithConsensusParams(cmtproto.ConsensusParams{ + Abci: &cmtproto.ABCIParams{ + VoteExtensionsEnableHeight: 2, + }, + }).WithBlockHeader(cmtproto.Header{ + ChainID: chainID, + }).WithLogger(log.NewTestLogger(t)) + return s +} + +func TestABCIUtilsTestSuite(t *testing.T) { + suite.Run(t, NewABCIUtilsTestSuite(t)) +} + +// check ValidateVoteExtensions works when all nodes have CommitBlockID votes +func (s *ABCIUtilsTestSuite) TestValidateVoteExtensionsHappyPath() { + ext := []byte("vote-extension") + cve := cmtproto.CanonicalVoteExtension{ + Extension: ext, + Height: 2, + Round: int64(0), + ChainId: chainID, + } + + bz, err := marshalDelimitedFn(&cve) + s.Require().NoError(err) + + extSig0, err := s.vals[0].privKey.Sign(bz) + s.Require().NoError(err) + + extSig1, err := s.vals[1].privKey.Sign(bz) + s.Require().NoError(err) + + extSig2, err := s.vals[2].privKey.Sign(bz) + s.Require().NoError(err) + + s.ctx = s.ctx.WithBlockHeight(3).WithHeaderInfo(header.Info{Height: 3, ChainID: chainID}) // enable vote-extensions + + llc := abci.ExtendedCommitInfo{ + Round: 0, + Votes: []abci.ExtendedVoteInfo{ + { + Validator: s.vals[0].toValidator(333), + VoteExtension: ext, + ExtensionSignature: extSig0, + BlockIdFlag: cmtproto.BlockIDFlagCommit, + }, + { + Validator: s.vals[1].toValidator(333), + VoteExtension: ext, + ExtensionSignature: extSig1, + BlockIdFlag: cmtproto.BlockIDFlagCommit, + }, + { + Validator: s.vals[2].toValidator(334), + VoteExtension: ext, + ExtensionSignature: extSig2, + BlockIdFlag: cmtproto.BlockIDFlagCommit, + }, + }, + } + + // order + convert to last commit + llc, info := extendedCommitToLastCommit(llc) + s.ctx = s.ctx.WithCometInfo(info) + + // expect-pass (votes of height 2 are included in next block) + s.Require().NoError(baseapp.ValidateVoteExtensions(s.ctx, s.valStore, 0, "", llc)) +} + +// check ValidateVoteExtensions works when a single node has submitted a BlockID_Absent +func (s *ABCIUtilsTestSuite) TestValidateVoteExtensionsSingleVoteAbsent() { + ext := []byte("vote-extension") + cve := cmtproto.CanonicalVoteExtension{ + Extension: ext, + Height: 2, + Round: int64(0), + ChainId: chainID, + } + + bz, err := marshalDelimitedFn(&cve) + s.Require().NoError(err) + + extSig0, err := s.vals[0].privKey.Sign(bz) + s.Require().NoError(err) + + extSig2, err := s.vals[2].privKey.Sign(bz) + s.Require().NoError(err) + + s.ctx = s.ctx.WithBlockHeight(3).WithHeaderInfo(header.Info{Height: 3, ChainID: chainID}) // vote-extensions are enabled + + llc := abci.ExtendedCommitInfo{ + Round: 0, + Votes: []abci.ExtendedVoteInfo{ + { + Validator: s.vals[0].toValidator(333), + VoteExtension: ext, + ExtensionSignature: extSig0, + BlockIdFlag: cmtproto.BlockIDFlagCommit, + }, + // validator of power <1/3 is missing, so commit-info shld still be valid + { + Validator: s.vals[1].toValidator(333), + BlockIdFlag: cmtproto.BlockIDFlagAbsent, + }, + { + Validator: s.vals[2].toValidator(334), + VoteExtension: ext, + ExtensionSignature: extSig2, + BlockIdFlag: cmtproto.BlockIDFlagCommit, + }, + }, + } + + llc, info := extendedCommitToLastCommit(llc) + s.ctx = s.ctx.WithCometInfo(info) + + // expect-pass (votes of height 2 are included in next block) + s.Require().NoError(baseapp.ValidateVoteExtensions(s.ctx, s.valStore, 0, "", llc)) +} + +// check ValidateVoteExtensions works with duplicate votes +func (s *ABCIUtilsTestSuite) TestValidateVoteExtensionsDuplicateVotes() { + ext := []byte("vote-extension") + cve := cmtproto.CanonicalVoteExtension{ + Extension: ext, + Height: 2, + Round: int64(0), + ChainId: chainID, + } + + bz, err := marshalDelimitedFn(&cve) + s.Require().NoError(err) + + extSig0, err := s.vals[0].privKey.Sign(bz) + s.Require().NoError(err) + + ve := abci.ExtendedVoteInfo{ + Validator: s.vals[0].toValidator(333), + VoteExtension: ext, + ExtensionSignature: extSig0, + BlockIdFlag: cmtproto.BlockIDFlagCommit, + } + + ve2 := abci.ExtendedVoteInfo{ + Validator: s.vals[0].toValidator(334), // use diff voting-power to dupe + VoteExtension: ext, + ExtensionSignature: extSig0, + BlockIdFlag: cmtproto.BlockIDFlagCommit, + } + + llc := abci.ExtendedCommitInfo{ + Round: 0, + Votes: []abci.ExtendedVoteInfo{ + ve, + ve2, + }, + } + + s.ctx = s.ctx.WithBlockHeight(3).WithHeaderInfo(header.Info{Height: 3, ChainID: chainID}) // vote-extensions are enabled + llc, info := extendedCommitToLastCommit(llc) + s.ctx = s.ctx.WithCometInfo(info) + + // expect fail (duplicate votes) + s.Require().Error(baseapp.ValidateVoteExtensions(s.ctx, s.valStore, 0, "", llc)) +} + +// check ValidateVoteExtensions works when a single node has submitted a BlockID_Nil +func (s *ABCIUtilsTestSuite) TestValidateVoteExtensionsSingleVoteNil() { + ext := []byte("vote-extension") + cve := cmtproto.CanonicalVoteExtension{ + Extension: ext, + Height: 2, + Round: int64(0), + ChainId: chainID, + } + + bz, err := marshalDelimitedFn(&cve) + s.Require().NoError(err) + + extSig0, err := s.vals[0].privKey.Sign(bz) + s.Require().NoError(err) + + extSig2, err := s.vals[2].privKey.Sign(bz) + s.Require().NoError(err) + + llc := abci.ExtendedCommitInfo{ + Round: 0, + Votes: []abci.ExtendedVoteInfo{ + { + Validator: s.vals[0].toValidator(333), + VoteExtension: ext, + ExtensionSignature: extSig0, + BlockIdFlag: cmtproto.BlockIDFlagCommit, + }, + // validator of power <1/3 is missing, so commit-info should still be valid + { + Validator: s.vals[1].toValidator(333), + BlockIdFlag: cmtproto.BlockIDFlagNil, + }, + { + Validator: s.vals[2].toValidator(334), + VoteExtension: ext, + ExtensionSignature: extSig2, + BlockIdFlag: cmtproto.BlockIDFlagCommit, + }, + }, + } + + s.ctx = s.ctx.WithBlockHeight(3).WithHeaderInfo(header.Info{Height: 3, ChainID: chainID}) // vote-extensions are enabled + + // create last commit + llc, info := extendedCommitToLastCommit(llc) + s.ctx = s.ctx.WithCometInfo(info) + + // expect-pass (votes of height 2 are included in next block) + s.Require().NoError(baseapp.ValidateVoteExtensions(s.ctx, s.valStore, 0, "", llc)) +} + +// check ValidateVoteExtensions works when two nodes have submitted a BlockID_Nil / BlockID_Absent +func (s *ABCIUtilsTestSuite) TestValidateVoteExtensionsTwoVotesNilAbsent() { + ext := []byte("vote-extension") + cve := cmtproto.CanonicalVoteExtension{ + Extension: ext, + Height: 2, + Round: int64(0), + ChainId: chainID, + } + + bz, err := marshalDelimitedFn(&cve) + s.Require().NoError(err) + + extSig0, err := s.vals[0].privKey.Sign(bz) + s.Require().NoError(err) + + llc := abci.ExtendedCommitInfo{ + Round: 0, + Votes: []abci.ExtendedVoteInfo{ + // validator of power >2/3 is missing, so commit-info should not be valid + { + Validator: s.vals[0].toValidator(333), + BlockIdFlag: cmtproto.BlockIDFlagCommit, + VoteExtension: ext, + ExtensionSignature: extSig0, + }, + { + Validator: s.vals[1].toValidator(333), + BlockIdFlag: cmtproto.BlockIDFlagNil, + }, + { + Validator: s.vals[2].toValidator(334), + VoteExtension: ext, + BlockIdFlag: cmtproto.BlockIDFlagAbsent, + }, + }, + } + + s.ctx = s.ctx.WithBlockHeight(3).WithHeaderInfo(header.Info{Height: 3, ChainID: chainID}) // vote-extensions are enabled + + // create last commit + llc, info := extendedCommitToLastCommit(llc) + s.ctx = s.ctx.WithCometInfo(info) + + // expect-pass (votes of height 2 are included in next block) + s.Require().Error(baseapp.ValidateVoteExtensions(s.ctx, s.valStore, 0, "", llc)) +} + +func (s *ABCIUtilsTestSuite) TestValidateVoteExtensionsIncorrectVotingPower() { + ext := []byte("vote-extension") + cve := cmtproto.CanonicalVoteExtension{ + Extension: ext, + Height: 2, + Round: int64(0), + ChainId: chainID, + } + + bz, err := marshalDelimitedFn(&cve) + s.Require().NoError(err) + + extSig0, err := s.vals[0].privKey.Sign(bz) + s.Require().NoError(err) + + llc := abci.ExtendedCommitInfo{ + Round: 0, + Votes: []abci.ExtendedVoteInfo{ + // validator of power >2/3 is missing, so commit-info should not be valid + { + Validator: s.vals[0].toValidator(333), + BlockIdFlag: cmtproto.BlockIDFlagCommit, + VoteExtension: ext, + ExtensionSignature: extSig0, + }, + { + Validator: s.vals[1].toValidator(333), + BlockIdFlag: cmtproto.BlockIDFlagNil, + }, + { + Validator: s.vals[2].toValidator(334), + VoteExtension: ext, + BlockIdFlag: cmtproto.BlockIDFlagAbsent, + }, + }, + } + + s.ctx = s.ctx.WithBlockHeight(3).WithHeaderInfo(header.Info{Height: 3, ChainID: chainID}) // vote-extensions are enabled + + // create last commit + llc, info := extendedCommitToLastCommit(llc) + s.ctx = s.ctx.WithCometInfo(info) + + // modify voting powers to differ from the last-commit + llc.Votes[0].Validator.Power = 335 + llc.Votes[2].Validator.Power = 332 + + // expect-pass (votes of height 2 are included in next block) + s.Require().Error(baseapp.ValidateVoteExtensions(s.ctx, s.valStore, 0, "", llc)) +} + +func (s *ABCIUtilsTestSuite) TestValidateVoteExtensionsIncorrectOrder() { + ext := []byte("vote-extension") + cve := cmtproto.CanonicalVoteExtension{ + Extension: ext, + Height: 2, + Round: int64(0), + ChainId: chainID, + } + + bz, err := marshalDelimitedFn(&cve) + s.Require().NoError(err) + + extSig0, err := s.vals[0].privKey.Sign(bz) + s.Require().NoError(err) + + llc := abci.ExtendedCommitInfo{ + Round: 0, + Votes: []abci.ExtendedVoteInfo{ + // validator of power >2/3 is missing, so commit-info should not be valid + { + Validator: s.vals[0].toValidator(333), + BlockIdFlag: cmtproto.BlockIDFlagCommit, + VoteExtension: ext, + ExtensionSignature: extSig0, + }, + { + Validator: s.vals[1].toValidator(333), + BlockIdFlag: cmtproto.BlockIDFlagNil, + }, + { + Validator: s.vals[2].toValidator(334), + VoteExtension: ext, + BlockIdFlag: cmtproto.BlockIDFlagAbsent, + }, + }, + } + + s.ctx = s.ctx.WithBlockHeight(3).WithHeaderInfo(header.Info{Height: 3, ChainID: chainID}) // vote-extensions are enabled + + // create last commit + llc, info := extendedCommitToLastCommit(llc) + s.ctx = s.ctx.WithCometInfo(info) + + // modify voting powers to differ from the last-commit + llc.Votes[0], llc.Votes[2] = llc.Votes[2], llc.Votes[0] + + // expect-pass (votes of height 2 are included in next block) + s.Require().Error(baseapp.ValidateVoteExtensions(s.ctx, s.valStore, 0, "", llc)) +} + +func (s *ABCIUtilsTestSuite) TestDefaultProposalHandler_NoOpMempoolTxSelection() { + // create a codec for marshaling + cdc := codectestutil.CodecOptions{}.NewCodec() + baseapptestutil.RegisterInterfaces(cdc.InterfaceRegistry()) + + // create a baseapp along with a tx config for tx generation + txConfig := authtx.NewTxConfig(cdc, authtx.DefaultSignModes) + app := baseapp.NewBaseApp(s.T().Name(), log.NewNopLogger(), dbm.NewMemDB(), txConfig.TxDecoder()) + + // create a proposal handler + ph := baseapp.NewDefaultProposalHandler(mempool.NoOpMempool{}, app) + handler := ph.PrepareProposalHandler() + + // build a tx + _, _, addr := testdata.KeyTestPubAddr() + builder := txConfig.NewTxBuilder() + s.Require().NoError(builder.SetMsgs( + &baseapptestutil.MsgCounter{Counter: 0, FailOnHandler: false, Signer: addr.String()}, + )) + builder.SetGasLimit(100) + setTxSignature(s.T(), builder, 0) + + // encode the tx to be used in the proposal request + tx := builder.GetTx() + txBz, err := txConfig.TxEncoder()(tx) + s.Require().NoError(err) + s.Require().Len(txBz, 152) + + testCases := map[string]struct { + ctx sdk.Context + req *abci.RequestPrepareProposal + expectedTxs int + }{ + "small max tx bytes": { + ctx: s.ctx, + req: &abci.RequestPrepareProposal{ + Txs: [][]byte{txBz, txBz, txBz, txBz, txBz}, + MaxTxBytes: 10, + }, + expectedTxs: 0, + }, + "small max gas": { + ctx: s.ctx.WithConsensusParams(cmtproto.ConsensusParams{ + Block: &cmtproto.BlockParams{ + MaxGas: 10, + }, + }), + req: &abci.RequestPrepareProposal{ + Txs: [][]byte{txBz, txBz, txBz, txBz, txBz}, + MaxTxBytes: 456, + }, + expectedTxs: 0, + }, + "large max tx bytes": { + ctx: s.ctx, + req: &abci.RequestPrepareProposal{ + Txs: [][]byte{txBz, txBz, txBz, txBz, txBz}, + MaxTxBytes: 456, + }, + expectedTxs: 3, + }, + "max gas and tx bytes": { + ctx: s.ctx.WithConsensusParams(cmtproto.ConsensusParams{ + Block: &cmtproto.BlockParams{ + MaxGas: 200, + }, + }), + req: &abci.RequestPrepareProposal{ + Txs: [][]byte{txBz, txBz, txBz, txBz, txBz}, + MaxTxBytes: 456, + }, + expectedTxs: 2, + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + // iterate multiple times to ensure the tx selector is cleared each time + for i := 0; i < 5; i++ { + resp, err := handler(tc.ctx, tc.req) + s.Require().NoError(err) + s.Require().Len(resp.Txs, tc.expectedTxs) + } + }) + } +} + +func (s *ABCIUtilsTestSuite) TestDefaultProposalHandler_PriorityNonceMempoolTxSelection() { + cdc := codectestutil.CodecOptions{}.NewCodec() + baseapptestutil.RegisterInterfaces(cdc.InterfaceRegistry()) + txConfig := authtx.NewTxConfig(cdc, authtx.DefaultSignModes) + + var ( + secret1 = []byte("secret1") + secret2 = []byte("secret2") + secret3 = []byte("secret3") + secret4 = []byte("secret4") + secret5 = []byte("secret5") + secret6 = []byte("secret6") + ) + + type testTx struct { + tx sdk.Tx + priority int64 + bz []byte + size int + } + + testTxs := []testTx{ + // test 1 + {tx: buildMsg(s.T(), txConfig, []byte(`0`), [][]byte{secret1}, []uint64{1}), priority: 10}, + {tx: buildMsg(s.T(), txConfig, []byte(`12345678910`), [][]byte{secret1}, []uint64{2}), priority: 10}, + {tx: buildMsg(s.T(), txConfig, []byte(`22`), [][]byte{secret1}, []uint64{3}), priority: 10}, + {tx: buildMsg(s.T(), txConfig, []byte(`32`), [][]byte{secret2}, []uint64{1}), priority: 8}, + // test 2 + {tx: buildMsg(s.T(), txConfig, []byte(`4`), [][]byte{secret1, secret2}, []uint64{3, 3}), priority: 10}, + {tx: buildMsg(s.T(), txConfig, []byte(`52345678910`), [][]byte{secret1, secret3}, []uint64{4, 3}), priority: 10}, + {tx: buildMsg(s.T(), txConfig, []byte(`62`), [][]byte{secret1, secret4}, []uint64{5, 3}), priority: 8}, + {tx: buildMsg(s.T(), txConfig, []byte(`72`), [][]byte{secret3, secret5}, []uint64{4, 3}), priority: 8}, + {tx: buildMsg(s.T(), txConfig, []byte(`82`), [][]byte{secret2, secret6}, []uint64{4, 3}), priority: 8}, + // test 3 + {tx: buildMsg(s.T(), txConfig, []byte(`9`), [][]byte{secret3, secret4}, []uint64{3, 3}), priority: 10}, + {tx: buildMsg(s.T(), txConfig, []byte(`1052345678910`), [][]byte{secret1, secret2}, []uint64{4, 4}), priority: 8}, + {tx: buildMsg(s.T(), txConfig, []byte(`11`), [][]byte{secret1, secret2}, []uint64{5, 5}), priority: 8}, + // test 4 + {tx: buildMsg(s.T(), txConfig, []byte(`1252345678910`), [][]byte{secret1}, []uint64{3}), priority: 10}, + {tx: buildMsg(s.T(), txConfig, []byte(`13`), [][]byte{secret1}, []uint64{5}), priority: 10}, + {tx: buildMsg(s.T(), txConfig, []byte(`14`), [][]byte{secret1}, []uint64{6}), priority: 8}, + } + + for i := range testTxs { + bz, err := txConfig.TxEncoder()(testTxs[i].tx) + s.Require().NoError(err) + testTxs[i].bz = bz + testTxs[i].size = int(cmttypes.ComputeProtoSizeForTxs([]cmttypes.Tx{bz})) + } + + s.Require().Equal(testTxs[0].size, 111) + s.Require().Equal(testTxs[1].size, 121) + s.Require().Equal(testTxs[2].size, 112) + s.Require().Equal(testTxs[3].size, 112) + s.Require().Equal(testTxs[4].size, 195) + s.Require().Equal(testTxs[5].size, 205) + s.Require().Equal(testTxs[6].size, 196) + s.Require().Equal(testTxs[7].size, 196) + s.Require().Equal(testTxs[8].size, 196) + + testCases := map[string]struct { + ctx sdk.Context + txInputs []testTx + req *abci.RequestPrepareProposal + handler sdk.PrepareProposalHandler + expectedTxs []int + }{ + "skip same-sender non-sequential sequence and then add others txs": { + ctx: s.ctx, + txInputs: []testTx{testTxs[0], testTxs[1], testTxs[2], testTxs[3]}, + req: &abci.RequestPrepareProposal{ + MaxTxBytes: 111 + 112, + }, + expectedTxs: []int{0, 3}, + }, + "skip multi-signers msg non-sequential sequence": { + ctx: s.ctx, + txInputs: []testTx{testTxs[4], testTxs[5], testTxs[6], testTxs[7], testTxs[8]}, + req: &abci.RequestPrepareProposal{ + MaxTxBytes: 195 + 196, + }, + expectedTxs: []int{4, 8}, + }, + "only the first tx is added": { + // Because tx 10 is valid, tx 11 can't be valid as they have higher sequence numbers. + ctx: s.ctx, + txInputs: []testTx{testTxs[9], testTxs[10], testTxs[11]}, + req: &abci.RequestPrepareProposal{ + MaxTxBytes: 195 + 196, + }, + expectedTxs: []int{9}, + }, + "no txs added": { + // Becasuse the first tx was deemed valid but too big, the next expected valid sequence is tx[0].seq (3), so + // the rest of the txs fail because they have a seq of 4. + ctx: s.ctx, + txInputs: []testTx{testTxs[12], testTxs[13], testTxs[14]}, + req: &abci.RequestPrepareProposal{ + MaxTxBytes: 112, + }, + expectedTxs: []int{}, + }, + } + + for name, tc := range testCases { + s.Run(name, func() { + ctrl := gomock.NewController(s.T()) + app := mock.NewMockProposalTxVerifier(ctrl) + mp := mempool.NewPriorityMempool( + mempool.PriorityNonceMempoolConfig[int64]{ + TxPriority: mempool.NewDefaultTxPriority(), + MaxTx: 0, + SignerExtractor: mempool.NewDefaultSignerExtractionAdapter(), + }, + ) + + ph := baseapp.NewDefaultProposalHandler(mp, app) + + for _, v := range tc.txInputs { + app.EXPECT().PrepareProposalVerifyTx(v.tx).Return(v.bz, nil).AnyTimes() + s.NoError(mp.Insert(s.ctx.WithPriority(v.priority), v.tx)) + tc.req.Txs = append(tc.req.Txs, v.bz) + } + + resp, err := ph.PrepareProposalHandler()(tc.ctx, tc.req) + s.Require().NoError(err) + respTxIndexes := []int{} + for _, tx := range resp.Txs { + for i, v := range testTxs { + if bytes.Equal(tx, v.bz) { + respTxIndexes = append(respTxIndexes, i) + } + } + } + + s.Require().EqualValues(tc.expectedTxs, respTxIndexes) + }) + } +} + +func marshalDelimitedFn(msg proto.Message) ([]byte, error) { + var buf bytes.Buffer + if err := protoio.NewDelimitedWriter(&buf).WriteMsg(msg); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +func buildMsg(t *testing.T, txConfig client.TxConfig, value []byte, secrets [][]byte, nonces []uint64) sdk.Tx { + t.Helper() + builder := txConfig.NewTxBuilder() + _ = builder.SetMsgs( + &baseapptestutil.MsgKeyValue{Value: value}, + ) + require.Equal(t, len(secrets), len(nonces)) + signatures := make([]signingtypes.SignatureV2, 0) + for index, secret := range secrets { + nonce := nonces[index] + privKey := secp256k1.GenPrivKeyFromSecret(secret) + pubKey := privKey.PubKey() + signatures = append(signatures, signingtypes.SignatureV2{ + PubKey: pubKey, + Sequence: nonce, + Data: &signingtypes.SingleSignatureData{}, + }) + } + setTxSignatureWithSecret(t, builder, signatures...) + return builder.GetTx() +} + +func setTxSignatureWithSecret(t *testing.T, builder client.TxBuilder, signatures ...signingtypes.SignatureV2) { + t.Helper() + err := builder.SetSignatures( + signatures..., + ) + require.NoError(t, err) +} + +func extendedCommitToLastCommit(ec abci.ExtendedCommitInfo) (abci.ExtendedCommitInfo, comet.BlockInfo) { + // sort the extended commit info + sort.Sort(extendedVoteInfos(ec.Votes)) + + // convert the extended commit info to last commit info + lastCommit := abci.CommitInfo{ + Round: ec.Round, + Votes: make([]abci.VoteInfo, len(ec.Votes)), + } + + for i, vote := range ec.Votes { + lastCommit.Votes[i] = abci.VoteInfo{ + Validator: abci.Validator{ + Address: vote.Validator.Address, + Power: vote.Validator.Power, + }, + } + } + + return ec, baseapp.NewBlockInfo( + nil, + nil, + nil, + lastCommit, + ) +} + +type extendedVoteInfos []abci.ExtendedVoteInfo + +func (v extendedVoteInfos) Len() int { + return len(v) +} + +func (v extendedVoteInfos) Less(i, j int) bool { + if v[i].Validator.Power == v[j].Validator.Power { + return bytes.Compare(v[i].Validator.Address, v[j].Validator.Address) == -1 + } + return v[i].Validator.Power > v[j].Validator.Power +} + +func (v extendedVoteInfos) Swap(i, j int) { + v[i], v[j] = v[j], v[i] +} diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index 5e548dc77bb6..5fb0b0fca479 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -3,11 +3,10 @@ package baseapp import ( "context" "fmt" + "math" "sort" "strconv" - errorsmod "cosmossdk.io/errors" - "cosmossdk.io/log" "github.com/cockroachdb/errors" abci "github.com/cometbft/cometbft/abci/types" "github.com/cometbft/cometbft/crypto/tmhash" @@ -17,11 +16,15 @@ import ( "golang.org/x/exp/maps" protov2 "google.golang.org/protobuf/proto" + "cosmossdk.io/core/header" + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/log" "cosmossdk.io/store" storemetrics "cosmossdk.io/store/metrics" "cosmossdk.io/store/snapshots" storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/baseapp/oe" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" servertypes "github.com/cosmos/cosmos-sdk/server/types" @@ -43,13 +46,14 @@ type ( ) const ( - execModeCheck execMode = iota // Check a transaction - execModeReCheck // Recheck a (pending) transaction after a commit - execModeSimulate // Simulate a transaction - execModePrepareProposal // Prepare a block proposal - execModeProcessProposal // Process a block proposal - execModeVoteExtension // Extend or verify a pre-commit vote - execModeFinalize // Finalize a block proposal + execModeCheck execMode = iota // Check a transaction + execModeReCheck // Recheck a (pending) transaction after a commit + execModeSimulate // Simulate a transaction + execModePrepareProposal // Prepare a block proposal + execModeProcessProposal // Process a block proposal + execModeVoteExtension // Extend or verify a pre-commit vote + execModeVerifyVoteExtension // Verify a vote extension + execModeFinalize // Finalize a block proposal ) var _ servertypes.ABCI = (*BaseApp)(nil) @@ -71,9 +75,10 @@ type BaseApp struct { mempool mempool.Mempool // application side mempool anteHandler sdk.AnteHandler // ante handler for fee and auth - postHandler sdk.PostHandler // post handler, optional, e.g. for tips + postHandler sdk.PostHandler // post handler, optional initChainer sdk.InitChainer // ABCI InitChain handler + preBlocker sdk.PreBlocker // logic to run before BeginBlocker beginBlocker sdk.BeginBlocker // (legacy ABCI) BeginBlock handler endBlocker sdk.EndBlocker // (legacy ABCI) EndBlock handler processProposal sdk.ProcessProposalHandler // ABCI ProcessProposal handler @@ -86,6 +91,7 @@ type BaseApp struct { addrPeerFilter sdk.PeerFilter // filter peers by address and port idPeerFilter sdk.PeerFilter // filter peers by node ID fauxMerkleMode bool // if true, IAVL MountStores uses MountStoresDB for simulation speed. + sigverifyTx bool // in the simulation test, since the account does not have a private key, we have to ignore the tx sigverify. // manages snapshots, i.e. dumps of app state at certain intervals snapshotManager *snapshots.Manager @@ -103,11 +109,6 @@ type BaseApp struct { // previous block's state. This state is never committed. In case of multiple // consensus rounds, the state is always reset to the previous block's state. // - // - voteExtensionState: Used for ExtendVote and VerifyVoteExtension, which is - // set based on the previous block's state. This state is never committed. In - // case of multiple rounds, the state is always reset to the previous block's - // state. - // // - processProposalState: Used for ProcessProposal, which is set based on the // the previous block's state. This state is never committed. In case of // multiple rounds, the state is always reset to the previous block's state. @@ -117,7 +118,6 @@ type BaseApp struct { checkState *state prepareProposalState *state processProposalState *state - voteExtensionState *state finalizeBlockState *state // An inter-block write-through cache provided to the context during the ABCI @@ -128,6 +128,9 @@ type BaseApp struct { // application parameter store. paramStore ParamStore + // queryGasLimit defines the maximum gas for queries; unbounded if 0. + queryGasLimit uint64 + // The minimum gas prices a validator is willing to accept for processing a // transaction. This is mainly used for DoS and spam prevention. minGasPrices sdk.DecCoins @@ -179,6 +182,18 @@ type BaseApp struct { chainID string cdc codec.Codec + + // optimisticExec contains the context required for Optimistic Execution, + // including the goroutine handling.This is experimental and must be enabled + // by developers. + optimisticExec *oe.OptimisticExecution + + // disableBlockGasMeter will disable the block gas meter if true, block gas meter is tricky to support + // when executing transactions in parallel. + // when disabled, the block gas meter in context is a noop one. + // + // SAFETY: it's safe to do if validators validate the total gas wanted in the `ProcessProposal`, which is the case in the default handler. + disableBlockGasMeter bool } // NewBaseApp returns a reference to an initialized BaseApp. It accepts a @@ -197,6 +212,8 @@ func NewBaseApp( msgServiceRouter: NewMsgServiceRouter(), txDecoder: txDecoder, fauxMerkleMode: false, + sigverifyTx: true, + queryGasLimit: math.MaxUint64, } for _, option := range options { @@ -228,7 +245,7 @@ func NewBaseApp( app.runTxRecoveryMiddleware = newDefaultRecoveryMiddleware() // Initialize with an empty interface registry to avoid nil pointer dereference. - // Unless SetInterfaceRegistry is called with an interface registry with proper address codecs base app will panic. + // Unless SetInterfaceRegistry is called with an interface registry with proper address codecs baseapp will panic. app.cdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry()) return app @@ -262,10 +279,8 @@ func (app *BaseApp) Trace() bool { // MsgServiceRouter returns the MsgServiceRouter of a BaseApp. func (app *BaseApp) MsgServiceRouter() *MsgServiceRouter { return app.msgServiceRouter } -// SetMsgServiceRouter sets the MsgServiceRouter of a BaseApp. -func (app *BaseApp) SetMsgServiceRouter(msgServiceRouter *MsgServiceRouter) { - app.msgServiceRouter = msgServiceRouter -} +// GRPCQueryRouter returns the GRPCQueryRouter of a BaseApp. +func (app *BaseApp) GRPCQueryRouter() *GRPCQueryRouter { return app.grpcQueryRouter } // MountStores mounts all IAVL or DB stores to the provided keys in the BaseApp // multistore. @@ -393,6 +408,11 @@ func (app *BaseApp) AnteHandler() sdk.AnteHandler { return app.anteHandler } +// Mempool returns the Mempool of the app. +func (app *BaseApp) Mempool() mempool.Mempool { + return app.mempool +} + // Init initializes the app. It seals the app, preventing any // further modifications. In addition, it validates the app against // the earlier provided settings. Returns an error if validation fails. @@ -456,16 +476,24 @@ func (app *BaseApp) IsSealed() bool { return app.sealed } // setState sets the BaseApp's state for the corresponding mode with a branched // multi-store (i.e. a CacheMultiStore) and a new Context with the same // multi-store branch, and provided header. -func (app *BaseApp) setState(mode execMode, header cmtproto.Header) { +func (app *BaseApp) setState(mode execMode, h cmtproto.Header) { ms := app.cms.CacheMultiStore() + headerInfo := header.Info{ + Height: h.Height, + Time: h.Time, + ChainID: h.ChainID, + AppHash: h.AppHash, + } baseState := &state{ - ms: ms, - ctx: sdk.NewContext(ms, header, false, app.logger).WithStreamingManager(app.streamingManager), + ms: ms, + ctx: sdk.NewContext(ms, h, false, app.logger). + WithStreamingManager(app.streamingManager). + WithHeaderInfo(headerInfo), } switch mode { case execModeCheck: - baseState.ctx = baseState.ctx.WithIsCheckTx(true).WithMinGasPrices(app.minGasPrices) + baseState.SetContext(baseState.Context().WithIsCheckTx(true).WithMinGasPrices(app.minGasPrices)) app.checkState = baseState case execModePrepareProposal: @@ -474,9 +502,6 @@ func (app *BaseApp) setState(mode execMode, header cmtproto.Header) { case execModeProcessProposal: app.processProposalState = baseState - case execModeVoteExtension: - app.voteExtensionState = baseState - case execModeFinalize: app.finalizeBlockState = baseState @@ -485,18 +510,6 @@ func (app *BaseApp) setState(mode execMode, header cmtproto.Header) { } } -// GetFinalizeBlockStateCtx returns the Context associated with the FinalizeBlock -// state. This Context can be used to write data derived from processing vote -// extensions to application state during ProcessProposal. -// -// NOTE: -// - Do NOT use or write to state using this Context unless you intend for -// that state to be committed. -// - Do NOT use or write to state using this Context on the first block. -func (app *BaseApp) GetFinalizeBlockStateCtx() sdk.Context { - return app.finalizeBlockState.ctx -} - // SetCircuitBreaker sets the circuit breaker for the BaseApp. // The circuit breaker is checked on every message execution to verify if a transaction should be executed or not. func (app *BaseApp) SetCircuitBreaker(cb CircuitBreaker) { @@ -515,7 +528,11 @@ func (app *BaseApp) GetConsensusParams(ctx sdk.Context) cmtproto.ConsensusParams cp, err := app.paramStore.Get(ctx) if err != nil { - panic(fmt.Errorf("consensus key is nil: %w", err)) + // This could happen while migrating from v0.45/v0.46 to v0.50, we should + // allow it to happen so during preblock the upgrade plan can be executed + // and the consensus params set for the first time in the new format. + app.logger.Error("failed to get consensus params", "err", err) + return cmtproto.ConsensusParams{} } return cp @@ -528,7 +545,7 @@ func (app *BaseApp) GetConsensusParams(ctx sdk.Context) cmtproto.ConsensusParams // It's stored instead in the x/upgrade store, with its own bump logic. func (app *BaseApp) StoreConsensusParams(ctx sdk.Context, cp cmtproto.ConsensusParams) error { if app.paramStore == nil { - panic("cannot store consensus params with no params store set") + return errors.New("cannot store consensus params with no params store set") } return app.paramStore.Set(ctx, cp) @@ -630,6 +647,10 @@ func (app *BaseApp) getState(mode execMode) *state { } func (app *BaseApp) getBlockGasMeter(ctx sdk.Context) storetypes.GasMeter { + if app.disableBlockGasMeter { + return noopGasMeter{} + } + if maxGas := app.GetMaximumBlockGas(ctx); maxGas > 0 { return storetypes.NewGasMeter(maxGas) } @@ -643,10 +664,13 @@ func (app *BaseApp) getContextForTx(mode execMode, txBytes []byte) sdk.Context { if modeState == nil { panic(fmt.Sprintf("state is nil for mode %v", mode)) } - ctx := modeState.ctx. - WithTxBytes(txBytes) + ctx := modeState.Context(). + WithTxBytes(txBytes). + WithGasMeter(storetypes.NewInfiniteGasMeter()) // WithVoteInfos(app.voteInfos) // TODO: identify if this is needed + ctx = ctx.WithIsSigverifyTx(app.sigverifyTx) + ctx = ctx.WithConsensusParams(app.GetConsensusParams(ctx)) if mode == execModeReCheck { @@ -655,6 +679,7 @@ func (app *BaseApp) getContextForTx(mode execMode, txBytes []byte) sdk.Context { if mode == execModeSimulate { ctx, _ = ctx.CacheContext() + ctx = ctx.WithExecMode(sdk.ExecMode(execModeSimulate)) } return ctx @@ -679,16 +704,38 @@ func (app *BaseApp) cacheTxContext(ctx sdk.Context, txBytes []byte) (sdk.Context return ctx.WithMultiStore(msCache), msCache } -func (app *BaseApp) beginBlock(req *abci.RequestFinalizeBlock) sdk.BeginBlock { +func (app *BaseApp) preBlock(req *abci.RequestFinalizeBlock) ([]abci.Event, error) { + var events []abci.Event + if app.preBlocker != nil { + ctx := app.finalizeBlockState.Context().WithEventManager(sdk.NewEventManager()) + rsp, err := app.preBlocker(ctx, req) + if err != nil { + return nil, err + } + // rsp.ConsensusParamsChanged is true from preBlocker means ConsensusParams in store get changed + // write the consensus parameters in store to context + if rsp.ConsensusParamsChanged { + ctx = ctx.WithConsensusParams(app.GetConsensusParams(ctx)) + // GasMeter must be set after we get a context with updated consensus params. + gasMeter := app.getBlockGasMeter(ctx) + ctx = ctx.WithBlockGasMeter(gasMeter) + app.finalizeBlockState.SetContext(ctx) + } + events = ctx.EventManager().ABCIEvents() + } + return events, nil +} + +func (app *BaseApp) beginBlock(_ *abci.RequestFinalizeBlock) (sdk.BeginBlock, error) { var ( resp sdk.BeginBlock err error ) if app.beginBlocker != nil { - resp, err = app.beginBlocker(app.finalizeBlockState.ctx) + resp, err = app.beginBlocker(app.finalizeBlockState.Context()) if err != nil { - panic(err) + return resp, err } // append BeginBlock attributes to all events in the EndBlock response @@ -702,7 +749,7 @@ func (app *BaseApp) beginBlock(req *abci.RequestFinalizeBlock) sdk.BeginBlock { resp.Events = sdk.MarkEventsToIndex(resp.Events, app.indexEvents) } - return resp + return resp, nil } func (app *BaseApp) deliverTx(tx []byte) *abci.ExecTxResult { @@ -744,13 +791,13 @@ func (app *BaseApp) deliverTx(tx []byte) *abci.ExecTxResult { // endBlock is an application-defined function that is called after transactions // have been processed in FinalizeBlock. -func (app *BaseApp) endBlock(ctx context.Context) (sdk.EndBlock, error) { +func (app *BaseApp) endBlock(_ context.Context) (sdk.EndBlock, error) { var endblock sdk.EndBlock if app.endBlocker != nil { - eb, err := app.endBlocker(app.finalizeBlockState.ctx) + eb, err := app.endBlocker(app.finalizeBlockState.Context()) if err != nil { - panic(err) + return endblock, err } // append EndBlock attributes to all events in the EndBlock response @@ -793,6 +840,7 @@ func (app *BaseApp) runTx(mode execMode, txBytes []byte) (gInfo sdk.GasInfo, res if r := recover(); r != nil { recoveryMW := newOutOfGasRecoveryMiddleware(gasWanted, ctx, app.runTxRecoveryMiddleware) err, result = processRecovery(r, recoveryMW), nil + ctx.Logger().Error("panic recovered in runTx", "err", err) } gInfo = sdk.GasInfo{GasWanted: gasWanted, GasUsed: ctx.GasMeter().GasConsumed()} @@ -832,6 +880,13 @@ func (app *BaseApp) runTx(mode execMode, txBytes []byte) (gInfo sdk.GasInfo, res return sdk.GasInfo{}, nil, nil, err } + for _, msg := range msgs { + handler := app.msgServiceRouter.Handler(msg) + if handler == nil { + return sdk.GasInfo{}, nil, nil, errorsmod.Wrapf(sdkerrors.ErrUnknownRequest, "no message handler found for %T", msg) + } + } + if app.anteHandler != nil { var ( anteCtx sdk.Context @@ -865,6 +920,12 @@ func (app *BaseApp) runTx(mode execMode, txBytes []byte) (gInfo sdk.GasInfo, res gasWanted = ctx.GasMeter().Limit() if err != nil { + if mode == execModeReCheck { + // if the ante handler fails on recheck, we want to remove the tx from the mempool + if mempoolErr := app.mempool.Remove(tx); mempoolErr != nil { + return gInfo, nil, anteEvents, errors.Join(err, mempoolErr) + } + } return gInfo, nil, nil, err } @@ -897,24 +958,29 @@ func (app *BaseApp) runTx(mode execMode, txBytes []byte) (gInfo sdk.GasInfo, res if err == nil { result, err = app.runMsgs(runMsgCtx, msgs, msgsV2, mode) } - if err == nil { - // Run optional postHandlers. - // - // Note: If the postHandler fails, we also revert the runMsgs state. - if app.postHandler != nil { - // The runMsgCtx context currently contains events emitted by the ante handler. - // We clear this to correctly order events without duplicates. - // Note that the state is still preserved. - postCtx := runMsgCtx.WithEventManager(sdk.NewEventManager()) - - newCtx, err := app.postHandler(postCtx, tx, mode == execModeSimulate, err == nil) - if err != nil { - return gInfo, nil, anteEvents, err - } - result.Events = append(result.Events, newCtx.EventManager().ABCIEvents()...) + // Run optional postHandlers (should run regardless of the execution result). + // + // Note: If the postHandler fails, we also revert the runMsgs state. + if app.postHandler != nil { + // The runMsgCtx context currently contains events emitted by the ante handler. + // We clear this to correctly order events without duplicates. + // Note that the state is still preserved. + postCtx := runMsgCtx.WithEventManager(sdk.NewEventManager()) + + newCtx, errPostHandler := app.postHandler(postCtx, tx, mode == execModeSimulate, err == nil) + if errPostHandler != nil { + return gInfo, nil, anteEvents, errors.Join(err, errPostHandler) } + // we don't want runTx to panic if runMsgs has failed earlier + if result == nil { + result = &sdk.Result{} + } + result.Events = append(result.Events, newCtx.EventManager().ABCIEvents()...) + } + + if err == nil { if mode == execModeFinalize { // When block gas exceeds, it'll panic and won't commit the cached store. consumeBlockGas() @@ -948,7 +1014,7 @@ func (app *BaseApp) runMsgs(ctx sdk.Context, msgs []sdk.Msg, msgsV2 []protov2.Me handler := app.msgServiceRouter.Handler(msg) if handler == nil { - return nil, errorsmod.Wrapf(sdkerrors.ErrUnknownRequest, "can't route message %+v", msg) + return nil, errorsmod.Wrapf(sdkerrors.ErrUnknownRequest, "no message handler found for %T", msg) } // ADR 031 request type routing @@ -958,7 +1024,10 @@ func (app *BaseApp) runMsgs(ctx sdk.Context, msgs []sdk.Msg, msgsV2 []protov2.Me } // create message events - msgEvents := createEvents(app.cdc, msgResult.GetEvents(), msg, msgsV2[i]) + msgEvents, err := createEvents(app.cdc, msgResult.GetEvents(), msg, msgsV2[i]) + if err != nil { + return nil, errorsmod.Wrapf(err, "failed to create message events; message index: %d", i) + } // append message events and data // @@ -1003,19 +1072,19 @@ func makeABCIData(msgResponses []*codectypes.Any) ([]byte, error) { return proto.Marshal(&sdk.TxMsgData{MsgResponses: msgResponses}) } -func createEvents(cdc codec.Codec, events sdk.Events, msg sdk.Msg, msgV2 protov2.Message) sdk.Events { +func createEvents(cdc codec.Codec, events sdk.Events, msg sdk.Msg, msgV2 protov2.Message) (sdk.Events, error) { eventMsgName := sdk.MsgTypeURL(msg) msgEvent := sdk.NewEvent(sdk.EventTypeMessage, sdk.NewAttribute(sdk.AttributeKeyAction, eventMsgName)) // we set the signer attribute as the sender signers, err := cdc.GetMsgV2Signers(msgV2) if err != nil { - panic(err) + return nil, err } if len(signers) > 0 && signers[0] != nil { addrStr, err := cdc.InterfaceRegistry().SigningContext().AddressCodec().BytesToString(signers[0]) if err != nil { - panic(err) + return nil, err } msgEvent = msgEvent.AppendAttributes(sdk.NewAttribute(sdk.AttributeKeySender, addrStr)) } @@ -1027,7 +1096,7 @@ func createEvents(cdc codec.Codec, events sdk.Events, msg sdk.Msg, msgV2 protov2 } } - return sdk.Events{msgEvent}.AppendEvents(events) + return sdk.Events{msgEvent}.AppendEvents(events), nil } // PrepareProposalVerifyTx performs transaction verification when a proposer is @@ -1068,7 +1137,37 @@ func (app *BaseApp) ProcessProposalVerifyTx(txBz []byte) (sdk.Tx, error) { return tx, nil } +func (app *BaseApp) TxDecode(txBytes []byte) (sdk.Tx, error) { + return app.txDecoder(txBytes) +} + +func (app *BaseApp) TxEncode(tx sdk.Tx) ([]byte, error) { + return app.txEncoder(tx) +} + // Close is called in start cmd to gracefully cleanup resources. func (app *BaseApp) Close() error { - return nil + var errs []error + + // Close app.db (opened by cosmos-sdk/server/start.go call to openDB) + if app.db != nil { + app.logger.Info("Closing application.db") + if err := app.db.Close(); err != nil { + errs = append(errs, err) + } + } + + // Close app.snapshotManager + // - opened when app chains use cosmos-sdk/server/util.go/DefaultBaseappOptions (boilerplate) + // - which calls cosmos-sdk/server/util.go/GetSnapshotStore + // - which is passed to baseapp/options.go/SetSnapshot + // - to set app.snapshotManager = snapshots.NewManager + if app.snapshotManager != nil { + app.logger.Info("Closing snapshots/metadata.db") + if err := app.snapshotManager.Close(); err != nil { + errs = append(errs, err) + } + } + + return errors.Join(errs...) } diff --git a/baseapp/baseapp_test.go b/baseapp/baseapp_test.go index 44c91901f3fc..f847009e8e49 100644 --- a/baseapp/baseapp_test.go +++ b/baseapp/baseapp_test.go @@ -1,25 +1,28 @@ package baseapp_test import ( + "bytes" "context" + "crypto/sha256" "fmt" "math/rand" "testing" "time" - errorsmod "cosmossdk.io/errors" - "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require" + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/log" "cosmossdk.io/store/metrics" pruningtypes "cosmossdk.io/store/pruning/types" "cosmossdk.io/store/rootmulti" "cosmossdk.io/store/snapshots" snapshottypes "cosmossdk.io/store/snapshots/types" storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/baseapp" baseapptestutil "github.com/cosmos/cosmos-sdk/baseapp/testutil" "github.com/cosmos/cosmos-sdk/client" @@ -43,9 +46,10 @@ var ( type ( BaseAppSuite struct { - baseApp *baseapp.BaseApp - cdc *codec.ProtoCodec - txConfig client.TxConfig + baseApp *baseapp.BaseApp + cdc *codec.ProtoCodec + txConfig client.TxConfig + logBuffer *bytes.Buffer } SnapshotsConfig struct { @@ -63,8 +67,10 @@ func NewBaseAppSuite(t *testing.T, opts ...func(*baseapp.BaseApp)) *BaseAppSuite txConfig := authtx.NewTxConfig(cdc, authtx.DefaultSignModes) db := dbm.NewMemDB() + logBuffer := new(bytes.Buffer) + logger := log.NewLogger(logBuffer, log.ColorOption(false)) - app := baseapp.NewBaseApp(t.Name(), log.NewTestLogger(t), db, txConfig.TxDecoder(), opts...) + app := baseapp.NewBaseApp(t.Name(), logger, db, txConfig.TxDecoder(), opts...) require.Equal(t, t.Name(), app.Name()) app.SetInterfaceRegistry(cdc.InterfaceRegistry()) @@ -78,12 +84,33 @@ func NewBaseAppSuite(t *testing.T, opts ...func(*baseapp.BaseApp)) *BaseAppSuite require.Nil(t, app.LoadLatestVersion()) return &BaseAppSuite{ - baseApp: app, - cdc: cdc, - txConfig: txConfig, + baseApp: app, + cdc: cdc, + txConfig: txConfig, + logBuffer: logBuffer, } } +func getQueryBaseapp(t *testing.T) *baseapp.BaseApp { + t.Helper() + + db := dbm.NewMemDB() + name := t.Name() + app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil) + + _, err := app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 1}) + require.NoError(t, err) + _, err = app.Commit() + require.NoError(t, err) + + _, err = app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 2}) + require.NoError(t, err) + _, err = app.Commit() + require.NoError(t, err) + + return app +} + func NewBaseAppSuiteWithSnapshots(t *testing.T, cfg SnapshotsConfig, opts ...func(*baseapp.BaseApp)) *BaseAppSuite { snapshotTimeout := 1 * time.Minute snapshotStore, err := snapshots.NewStore(dbm.NewMemDB(), testutil.GetTempDir(t)) @@ -100,9 +127,10 @@ func NewBaseAppSuiteWithSnapshots(t *testing.T, cfg SnapshotsConfig, opts ...fun baseapptestutil.RegisterKeyValueServer(suite.baseApp.MsgServiceRouter(), MsgKeyValueImpl{}) - suite.baseApp.InitChain(&abci.RequestInitChain{ + _, err = suite.baseApp.InitChain(&abci.RequestInitChain{ ConsensusParams: &cmtproto.ConsensusParams{}, }) + require.NoError(t, err) r := rand.New(rand.NewSource(3920758213583)) keyCounter := 0 @@ -166,6 +194,40 @@ func NewBaseAppSuiteWithSnapshots(t *testing.T, cfg SnapshotsConfig, opts ...fun return suite } +func TestAnteHandlerGasMeter(t *testing.T) { + // run BeginBlock and assert that the gas meter passed into the first Txn is zeroed out + anteOpt := func(bapp *baseapp.BaseApp) { + bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { + gasMeter := ctx.BlockGasMeter() + require.NotNil(t, gasMeter) + require.Equal(t, storetypes.Gas(0), gasMeter.GasConsumed()) + return ctx, nil + }) + } + // set the beginBlocker to use some gas + beginBlockerOpt := func(bapp *baseapp.BaseApp) { + bapp.SetBeginBlocker(func(ctx sdk.Context) (sdk.BeginBlock, error) { + ctx.BlockGasMeter().ConsumeGas(1, "beginBlocker gas consumption") + return sdk.BeginBlock{}, nil + }) + } + + suite := NewBaseAppSuite(t, anteOpt, beginBlockerOpt) + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ + ConsensusParams: &cmtproto.ConsensusParams{}, + }) + require.NoError(t, err) + + deliverKey := []byte("deliver-key") + baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImpl{t, capKey1, deliverKey}) + + tx := newTxCounter(t, suite.txConfig, 0, 0) + txBytes, err := suite.txConfig.TxEncoder()(tx) + require.NoError(t, err) + _, err = suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 1, Txs: [][]byte{txBytes}}) + require.NoError(t, err) +} + func TestLoadVersion(t *testing.T) { logger := log.NewTestLogger(t) pruningOpt := baseapp.SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) @@ -177,7 +239,9 @@ func TestLoadVersion(t *testing.T) { err := app.LoadLatestVersion() // needed to make stores non-nil require.Nil(t, err) - emptyCommitID := storetypes.CommitID{} + emptyHash := sha256.Sum256([]byte{}) + appHash := emptyHash[:] + emptyCommitID := storetypes.CommitID{Hash: appHash} // fresh store has zero/empty last commit lastHeight := app.LastBlockHeight() @@ -400,6 +464,9 @@ func TestBaseAppOptionSeal(t *testing.T) { require.Panics(t, func() { suite.baseApp.SetInitChainer(nil) }) + require.Panics(t, func() { + suite.baseApp.SetPreBlocker(nil) + }) require.Panics(t, func() { suite.baseApp.SetBeginBlocker(nil) }) @@ -453,11 +520,14 @@ func TestCustomRunTxPanicHandler(t *testing.T) { panic(errorsmod.Wrap(anteErr, "anteHandler")) }) } + suite := NewBaseAppSuite(t, anteOpt) + baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), NoopCounterServerImpl{}) - suite.baseApp.InitChain(&abci.RequestInitChain{ + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ ConsensusParams: &cmtproto.ConsensusParams{}, }) + require.NoError(t, err) suite.baseApp.AddRunTxRecoveryHandler(func(recoveryObj interface{}) error { err, ok := recoveryObj.(error) @@ -494,9 +564,10 @@ func TestBaseAppAnteHandler(t *testing.T) { deliverKey := []byte("deliver-key") baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImpl{t, capKey1, deliverKey}) - suite.baseApp.InitChain(&abci.RequestInitChain{ + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ ConsensusParams: &cmtproto.ConsensusParams{}, }) + require.NoError(t, err) // execute a tx that will fail ante handler execution // @@ -555,6 +626,60 @@ func TestBaseAppAnteHandler(t *testing.T) { suite.baseApp.Commit() } +func TestBaseAppPostHandler(t *testing.T) { + postHandlerRun := false + anteOpt := func(bapp *baseapp.BaseApp) { + bapp.SetPostHandler(func(ctx sdk.Context, tx sdk.Tx, simulate, success bool) (newCtx sdk.Context, err error) { + postHandlerRun = true + return ctx, nil + }) + } + + suite := NewBaseAppSuite(t, anteOpt) + baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImpl{t, capKey1, []byte("foo")}) + + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{ + ConsensusParams: &cmtproto.ConsensusParams{}, + }) + require.NoError(t, err) + + // execute a tx that will fail ante handler execution + // + // NOTE: State should not be mutated here. This will be implicitly checked by + // the next txs ante handler execution (anteHandlerTxTest). + tx := newTxCounter(t, suite.txConfig, 0, 0) + txBytes, err := suite.txConfig.TxEncoder()(tx) + require.NoError(t, err) + + res, err := suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 1, Txs: [][]byte{txBytes}}) + require.NoError(t, err) + require.Empty(t, res.Events) + require.True(t, res.TxResults[0].IsOK(), fmt.Sprintf("%v", res)) + + // PostHandler runs on successful message execution + require.True(t, postHandlerRun) + + // It should also run on failed message execution + postHandlerRun = false + tx = setFailOnHandler(suite.txConfig, tx, true) + txBytes, err = suite.txConfig.TxEncoder()(tx) + require.NoError(t, err) + res, err = suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 1, Txs: [][]byte{txBytes}}) + require.NoError(t, err) + require.Empty(t, res.Events) + require.False(t, res.TxResults[0].IsOK(), fmt.Sprintf("%v", res)) + + require.True(t, postHandlerRun) + + // regression test, should not panic when runMsgs fails + tx = wonkyMsg(t, suite.txConfig, tx) + txBytes, err = suite.txConfig.TxEncoder()(tx) + require.NoError(t, err) + _, err = suite.baseApp.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 1, Txs: [][]byte{txBytes}}) + require.NoError(t, err) + require.NotContains(t, suite.logBuffer.String(), "panic recovered in runTx") +} + // Test and ensure that invalid block heights always cause errors. // See issues: // - https://github.com/cosmos/cosmos-sdk/issues/11220 @@ -566,31 +691,44 @@ func TestABCI_CreateQueryContext(t *testing.T) { name := t.Name() app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil) - app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 1}) - app.Commit() + _, err := app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 1}) + require.NoError(t, err) + _, err = app.Commit() + require.NoError(t, err) - app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 2}) - app.Commit() + _, err = app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 2}) + require.NoError(t, err) + _, err = app.Commit() + require.NoError(t, err) testCases := []struct { - name string - height int64 - prove bool - expErr bool + name string + height int64 + headerHeight int64 + prove bool + expErr bool }{ - {"valid height", 2, true, false}, - {"future height", 10, true, true}, - {"negative height, prove=true", -1, true, true}, - {"negative height, prove=false", -1, false, true}, + {"valid height", 2, 2, true, false}, + {"valid height with different initial height", 2, 1, true, false}, + {"future height", 10, 10, true, true}, + {"negative height, prove=true", -1, -1, true, true}, + {"negative height, prove=false", -1, -1, false, true}, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - _, err := app.CreateQueryContext(tc.height, tc.prove) + if tc.headerHeight != tc.height { + _, err := app.InitChain(&abci.RequestInitChain{ + InitialHeight: tc.headerHeight, + }) + require.NoError(t, err) + } + ctx, err := app.CreateQueryContext(tc.height, tc.prove) if tc.expErr { require.Error(t, err) } else { require.NoError(t, err) + require.Equal(t, tc.height, ctx.BlockHeight()) } }) } @@ -604,9 +742,65 @@ func TestSetMinGasPrices(t *testing.T) { require.Equal(t, minGasPrices, ctx.MinGasPrices()) } +type ctxType string + +const ( + QueryCtx ctxType = "query" + CheckTxCtx ctxType = "checkTx" +) + +var ctxTypes = []ctxType{QueryCtx, CheckTxCtx} + +func (c ctxType) GetCtx(t *testing.T, bapp *baseapp.BaseApp) sdk.Context { + t.Helper() + if c == QueryCtx { + ctx, err := bapp.CreateQueryContext(1, false) + require.NoError(t, err) + return ctx + } else if c == CheckTxCtx { + return getCheckStateCtx(bapp) + } + // TODO: Not supported yet + return getFinalizeBlockStateCtx(bapp) +} + +func TestQueryGasLimit(t *testing.T) { + testCases := []struct { + queryGasLimit uint64 + gasActuallyUsed uint64 + shouldQueryErr bool + }{ + {queryGasLimit: 100, gasActuallyUsed: 50, shouldQueryErr: false}, // Valid case + {queryGasLimit: 100, gasActuallyUsed: 150, shouldQueryErr: true}, // gasActuallyUsed > queryGasLimit + {queryGasLimit: 0, gasActuallyUsed: 50, shouldQueryErr: false}, // fuzzing with queryGasLimit = 0 + {queryGasLimit: 0, gasActuallyUsed: 0, shouldQueryErr: false}, // both queryGasLimit and gasActuallyUsed are 0 + {queryGasLimit: 200, gasActuallyUsed: 200, shouldQueryErr: false}, // gasActuallyUsed == queryGasLimit + {queryGasLimit: 100, gasActuallyUsed: 1000, shouldQueryErr: true}, // gasActuallyUsed > queryGasLimit + } + + for _, tc := range testCases { + for _, ctxType := range ctxTypes { + t.Run(fmt.Sprintf("%s: %d - %d", ctxType, tc.queryGasLimit, tc.gasActuallyUsed), func(t *testing.T) { + app := getQueryBaseapp(t) + baseapp.SetQueryGasLimit(tc.queryGasLimit)(app) + ctx := ctxType.GetCtx(t, app) + + // query gas limit should have no effect when CtxType != QueryCtx + if tc.shouldQueryErr && ctxType == QueryCtx { + require.Panics(t, func() { ctx.GasMeter().ConsumeGas(tc.gasActuallyUsed, "test") }) + } else { + require.NotPanics(t, func() { ctx.GasMeter().ConsumeGas(tc.gasActuallyUsed, "test") }) + } + }) + } + } +} + func TestGetMaximumBlockGas(t *testing.T) { suite := NewBaseAppSuite(t) - suite.baseApp.InitChain(&abci.RequestInitChain{}) + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{}) + require.NoError(t, err) + ctx := suite.baseApp.NewContext(true) suite.baseApp.StoreConsensusParams(ctx, cmtproto.ConsensusParams{Block: &cmtproto.BlockParams{MaxGas: 0}}) @@ -622,6 +816,17 @@ func TestGetMaximumBlockGas(t *testing.T) { require.Panics(t, func() { suite.baseApp.GetMaximumBlockGas(ctx) }) } +func TestGetEmptyConsensusParams(t *testing.T) { + suite := NewBaseAppSuite(t) + _, err := suite.baseApp.InitChain(&abci.RequestInitChain{}) + require.NoError(t, err) + ctx := suite.baseApp.NewContext(true) + + cp := suite.baseApp.GetConsensusParams(ctx) + require.Equal(t, cmtproto.ConsensusParams{}, cp) + require.Equal(t, uint64(0), suite.baseApp.GetMaximumBlockGas(ctx)) +} + func TestLoadVersionPruning(t *testing.T) { logger := log.NewNopLogger() pruningOptions := pruningtypes.NewCustomPruningOptions(10, 15) @@ -637,7 +842,10 @@ func TestLoadVersionPruning(t *testing.T) { err := app.LoadLatestVersion() // needed to make stores non-nil require.Nil(t, err) - emptyCommitID := storetypes.CommitID{} + emptyHash := sha256.Sum256([]byte{}) + emptyCommitID := storetypes.CommitID{ + Hash: emptyHash[:], + } // fresh store has zero/empty last commit lastHeight := app.LastBlockHeight() diff --git a/baseapp/block_gas_test.go b/baseapp/block_gas_test.go index 518f796fa5f1..adc3e706f2c7 100644 --- a/baseapp/block_gas_test.go +++ b/baseapp/block_gas_test.go @@ -64,7 +64,7 @@ func TestBaseApp_BlockGas(t *testing.T) { {"less than block gas meter", 10, false, false}, {"more than block gas meter", blockMaxGas, false, true}, {"more than block gas meter", uint64(float64(blockMaxGas) * 1.2), false, true}, - {"consume MaxUint64", math.MaxUint64, false, true}, + {"consume MaxUint64", math.MaxUint64, true, true}, {"consume MaxGasWanted", txtypes.MaxGasWanted, false, true}, {"consume block gas when panicked", 10, true, true}, } @@ -76,7 +76,6 @@ func TestBaseApp_BlockGas(t *testing.T) { appBuilder *runtime.AppBuilder txConfig client.TxConfig cdc codec.Codec - pcdc codec.ProtoCodecMarshaler interfaceRegistry codectypes.InterfaceRegistry err error ) @@ -98,7 +97,6 @@ func TestBaseApp_BlockGas(t *testing.T) { &interfaceRegistry, &txConfig, &cdc, - &pcdc, &appBuilder) require.NoError(t, err) @@ -150,7 +148,7 @@ func TestBaseApp_BlockGas(t *testing.T) { require.NoError(t, txBuilder.SetMsgs(msg)) txBuilder.SetFeeAmount(feeAmount) - txBuilder.SetGasLimit(txtypes.MaxGasWanted) // tx validation checks that gasLimit can't be bigger than this + txBuilder.SetGasLimit(uint64(simtestutil.DefaultConsensusParams.Block.MaxGas)) senderAccountNumber := accountKeeper.GetAccount(ctx, addr1).GetAccountNumber() privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{senderAccountNumber}, []uint64{0} @@ -176,11 +174,11 @@ func TestBaseApp_BlockGas(t *testing.T) { require.Equal(t, []byte("ok"), okValue) } // check block gas is always consumed - baseGas := uint64(57554) // baseGas is the gas consumed before tx msg + baseGas := uint64(57504) // baseGas is the gas consumed before tx msg expGasConsumed := addUint64Saturating(tc.gasToConsume, baseGas) - if expGasConsumed > txtypes.MaxGasWanted { + if expGasConsumed > uint64(simtestutil.DefaultConsensusParams.Block.MaxGas) { // capped by gasLimit - expGasConsumed = txtypes.MaxGasWanted + expGasConsumed = uint64(simtestutil.DefaultConsensusParams.Block.MaxGas) } require.Equal(t, int(expGasConsumed), int(ctx.BlockGasMeter().GasConsumed())) // tx fee is always deducted diff --git a/baseapp/genesis.go b/baseapp/genesis.go index 564159edc4ab..4a6b0082b656 100644 --- a/baseapp/genesis.go +++ b/baseapp/genesis.go @@ -3,8 +3,9 @@ package baseapp import ( "errors" - "cosmossdk.io/core/genesis" "github.com/cometbft/cometbft/abci/types" + + "cosmossdk.io/core/genesis" ) var _ genesis.TxHandler = (*BaseApp)(nil) diff --git a/baseapp/grpcrouter.go b/baseapp/grpcrouter.go index 5a127277feab..9955ecb460e4 100644 --- a/baseapp/grpcrouter.go +++ b/baseapp/grpcrouter.go @@ -1,13 +1,16 @@ package baseapp import ( + "context" "fmt" abci "github.com/cometbft/cometbft/abci/types" gogogrpc "github.com/cosmos/gogoproto/grpc" "google.golang.org/grpc" "google.golang.org/grpc/encoding" + "google.golang.org/protobuf/runtime/protoiface" + "github.com/cosmos/cosmos-sdk/baseapp/internal/protocompat" "github.com/cosmos/cosmos-sdk/client/grpc/reflection" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -16,8 +19,16 @@ import ( // GRPCQueryRouter routes ABCI Query requests to GRPC handlers type GRPCQueryRouter struct { - routes map[string]GRPCQueryHandler - cdc encoding.Codec + // routes maps query handlers used in ABCIQuery. + routes map[string]GRPCQueryHandler + // hybridHandlers maps the request name to the handler. It is a hybrid handler which seamlessly + // handles both gogo and protov2 messages. + hybridHandlers map[string][]func(ctx context.Context, req, resp protoiface.MessageV1) error + // binaryCodec is used to encode/decode binary protobuf messages. + binaryCodec codec.BinaryCodec + // cdc is the gRPC codec used by the router to correctly unmarshal messages. + cdc encoding.Codec + // serviceData contains the gRPC services and their handlers. serviceData []serviceData } @@ -32,7 +43,8 @@ var _ gogogrpc.Server = &GRPCQueryRouter{} // NewGRPCQueryRouter creates a new GRPCQueryRouter func NewGRPCQueryRouter() *GRPCQueryRouter { return &GRPCQueryRouter{ - routes: map[string]GRPCQueryHandler{}, + routes: map[string]GRPCQueryHandler{}, + hybridHandlers: map[string][]func(ctx context.Context, req, resp protoiface.MessageV1) error{}, } } @@ -58,46 +70,13 @@ func (qrt *GRPCQueryRouter) Route(path string) GRPCQueryHandler { func (qrt *GRPCQueryRouter) RegisterService(sd *grpc.ServiceDesc, handler interface{}) { // adds a top-level query handler based on the gRPC service name for _, method := range sd.Methods { - fqName := fmt.Sprintf("/%s/%s", sd.ServiceName, method.MethodName) - methodHandler := method.Handler - - // Check that each service is only registered once. If a service is - // registered more than once, then we should error. Since we can't - // return an error (`Server.RegisterService` interface restriction) we - // panic (at startup). - _, found := qrt.routes[fqName] - if found { - panic( - fmt.Errorf( - "gRPC query service %s has already been registered. Please make sure to only register each service once. "+ - "This usually means that there are conflicting modules registering the same gRPC query service", - fqName, - ), - ) + err := qrt.registerABCIQueryHandler(sd, method, handler) + if err != nil { + panic(err) } - - qrt.routes[fqName] = func(ctx sdk.Context, req *abci.RequestQuery) (*abci.ResponseQuery, error) { - // call the method handler from the service description with the handler object, - // a wrapped sdk.Context with proto-unmarshaled data from the ABCI request data - res, err := methodHandler(handler, ctx, func(i interface{}) error { - return qrt.cdc.Unmarshal(req.Data, i) - }, nil) - if err != nil { - return nil, err - } - - // proto marshal the result bytes - var resBytes []byte - resBytes, err = qrt.cdc.Marshal(res) - if err != nil { - return nil, err - } - - // return the result bytes as the response value - return &abci.ResponseQuery{ - Height: req.Height, - Value: resBytes, - }, nil + err = qrt.registerHybridHandler(sd, method, handler) + if err != nil { + panic(err) } } @@ -107,11 +86,73 @@ func (qrt *GRPCQueryRouter) RegisterService(sd *grpc.ServiceDesc, handler interf }) } +func (qrt *GRPCQueryRouter) registerABCIQueryHandler(sd *grpc.ServiceDesc, method grpc.MethodDesc, handler interface{}) error { + fqName := fmt.Sprintf("/%s/%s", sd.ServiceName, method.MethodName) + methodHandler := method.Handler + + // Check that each service is only registered once. If a service is + // registered more than once, then we should error. Since we can't + // return an error (`Server.RegisterService` interface restriction) we + // panic (at startup). + _, found := qrt.routes[fqName] + if found { + return fmt.Errorf( + "gRPC query service %s has already been registered. Please make sure to only register each service once. "+ + "This usually means that there are conflicting modules registering the same gRPC query service", + fqName, + ) + } + + qrt.routes[fqName] = func(ctx sdk.Context, req *abci.RequestQuery) (*abci.ResponseQuery, error) { + // call the method handler from the service description with the handler object, + // a wrapped sdk.Context with proto-unmarshaled data from the ABCI request data + res, err := methodHandler(handler, ctx, func(i interface{}) error { + return qrt.cdc.Unmarshal(req.Data, i) + }, nil) + if err != nil { + return nil, err + } + + // proto marshal the result bytes + var resBytes []byte + resBytes, err = qrt.cdc.Marshal(res) + if err != nil { + return nil, err + } + + // return the result bytes as the response value + return &abci.ResponseQuery{ + Height: req.Height, + Value: resBytes, + }, nil + } + return nil +} + +func (qrt *GRPCQueryRouter) HybridHandlerByRequestName(name string) []func(ctx context.Context, req, resp protoiface.MessageV1) error { + return qrt.hybridHandlers[name] +} + +func (qrt *GRPCQueryRouter) registerHybridHandler(sd *grpc.ServiceDesc, method grpc.MethodDesc, handler interface{}) error { + // extract message name from method descriptor + inputName, err := protocompat.RequestFullNameFromMethodDesc(sd, method) + if err != nil { + return err + } + methodHandler, err := protocompat.MakeHybridHandler(qrt.binaryCodec, sd, method, handler) + if err != nil { + return err + } + qrt.hybridHandlers[string(inputName)] = append(qrt.hybridHandlers[string(inputName)], methodHandler) + return nil +} + // SetInterfaceRegistry sets the interface registry for the router. This will // also register the interface reflection gRPC service. func (qrt *GRPCQueryRouter) SetInterfaceRegistry(interfaceRegistry codectypes.InterfaceRegistry) { // instantiate the codec qrt.cdc = codec.NewProtoCodec(interfaceRegistry).GRPCCodec() + qrt.binaryCodec = codec.NewProtoCodec(interfaceRegistry) // Once we have an interface registry, we can register the interface // registry reflection gRPC service. reflection.RegisterReflectionServiceServer(qrt, reflection.NewReflectionServiceServer(interfaceRegistry)) diff --git a/baseapp/grpcrouter_test.go b/baseapp/grpcrouter_test.go index 825a89dad284..d747fbb74703 100644 --- a/baseapp/grpcrouter_test.go +++ b/baseapp/grpcrouter_test.go @@ -5,11 +5,11 @@ import ( "sync" "testing" - "cosmossdk.io/log" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require" "cosmossdk.io/depinject" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec/types" @@ -53,6 +53,50 @@ func TestGRPCQueryRouter(t *testing.T) { require.Equal(t, spot, res3.HasAnimal.Animal.GetCachedValue()) } +func TestGRPCRouterHybridHandlers(t *testing.T) { + assertRouterBehaviour := func(helper *baseapp.QueryServiceTestHelper) { + // test getting the handler by name + handlers := helper.GRPCQueryRouter.HybridHandlerByRequestName("testpb.EchoRequest") + require.NotNil(t, handlers) + require.Len(t, handlers, 1) + handler := handlers[0] + // sending a protov2 message should work, and return a protov2 message + v2Resp := new(testdata_pulsar.EchoResponse) + err := handler(helper.Ctx, &testdata_pulsar.EchoRequest{Message: "hello"}, v2Resp) + require.Nil(t, err) + require.Equal(t, "hello", v2Resp.Message) + // also sending a protov1 message should work, and return a gogoproto message + gogoResp := new(testdata.EchoResponse) + err = handler(helper.Ctx, &testdata.EchoRequest{Message: "hello"}, gogoResp) + require.NoError(t, err) + require.Equal(t, "hello", gogoResp.Message) + } + + t.Run("protov2 server", func(t *testing.T) { + qr := baseapp.NewGRPCQueryRouter() + interfaceRegistry := testdata.NewTestInterfaceRegistry() + qr.SetInterfaceRegistry(interfaceRegistry) + testdata_pulsar.RegisterQueryServer(qr, testdata_pulsar.QueryImpl{}) + helper := &baseapp.QueryServiceTestHelper{ + GRPCQueryRouter: qr, + Ctx: sdk.Context{}.WithContext(context.Background()), + } + assertRouterBehaviour(helper) + }) + + t.Run("gogoproto server", func(t *testing.T) { + qr := baseapp.NewGRPCQueryRouter() + interfaceRegistry := testdata.NewTestInterfaceRegistry() + qr.SetInterfaceRegistry(interfaceRegistry) + testdata.RegisterQueryServer(qr, testdata.QueryImpl{}) + helper := &baseapp.QueryServiceTestHelper{ + GRPCQueryRouter: qr, + Ctx: sdk.Context{}.WithContext(context.Background()), + } + assertRouterBehaviour(helper) + }) +} + func TestRegisterQueryServiceTwice(t *testing.T) { // Setup baseapp. var appBuilder *runtime.AppBuilder diff --git a/baseapp/grpcserver.go b/baseapp/grpcserver.go index b49efbb16265..1e8f3a91d748 100644 --- a/baseapp/grpcserver.go +++ b/baseapp/grpcserver.go @@ -4,7 +4,6 @@ import ( "context" "strconv" - errorsmod "cosmossdk.io/errors" gogogrpc "github.com/cosmos/gogoproto/grpc" grpcmiddleware "github.com/grpc-ecosystem/go-grpc-middleware" grpcrecovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery" @@ -13,14 +12,13 @@ import ( "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" grpctypes "github.com/cosmos/cosmos-sdk/types/grpc" ) -// GRPCQueryRouter returns the GRPCQueryRouter of a BaseApp. -func (app *BaseApp) GRPCQueryRouter() *GRPCQueryRouter { return app.grpcQueryRouter } - // RegisterGRPCServer registers gRPC services directly with the gRPC server. func (app *BaseApp) RegisterGRPCServer(server gogogrpc.Server) { // Define an interceptor for all gRPC queries: this interceptor will create diff --git a/baseapp/info.go b/baseapp/info.go index 8c8a4451206e..1efb017b0579 100644 --- a/baseapp/info.go +++ b/baseapp/info.go @@ -8,7 +8,21 @@ import ( "cosmossdk.io/core/comet" ) -var _ comet.BlockInfo = (*cometInfo)(nil) +// NewBlockInfo returns a new BlockInfo instance +// This function should be only used in tests +func NewBlockInfo( + misbehavior []abci.Misbehavior, + validatorsHash []byte, + proposerAddress []byte, + lastCommit abci.CommitInfo, +) comet.BlockInfo { + return &cometInfo{ + Misbehavior: misbehavior, + ValidatorsHash: validatorsHash, + ProposerAddress: proposerAddress, + LastCommit: lastCommit, + } +} // CometInfo defines the properties provided by comet to the application type cometInfo struct { diff --git a/baseapp/internal/protocompat/protocompat.go b/baseapp/internal/protocompat/protocompat.go new file mode 100644 index 000000000000..6b8cdc081896 --- /dev/null +++ b/baseapp/internal/protocompat/protocompat.go @@ -0,0 +1,232 @@ +package protocompat + +import ( + "context" + "fmt" + "reflect" + + gogoproto "github.com/cosmos/gogoproto/proto" + "github.com/golang/protobuf/proto" // nolint: staticcheck // needed because gogoproto.Merge does not work consistently. See NOTE: comments. + "google.golang.org/grpc" + proto2 "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" + "google.golang.org/protobuf/runtime/protoiface" + + "github.com/cosmos/cosmos-sdk/codec" +) + +var ( + gogoType = reflect.TypeOf((*gogoproto.Message)(nil)).Elem() + protov2Type = reflect.TypeOf((*proto2.Message)(nil)).Elem() + protov2MarshalOpts = proto2.MarshalOptions{Deterministic: true} +) + +type Handler = func(ctx context.Context, request, response protoiface.MessageV1) error + +func MakeHybridHandler(cdc codec.BinaryCodec, sd *grpc.ServiceDesc, method grpc.MethodDesc, handler interface{}) (Handler, error) { + methodFullName := protoreflect.FullName(fmt.Sprintf("%s.%s", sd.ServiceName, method.MethodName)) + desc, err := gogoproto.HybridResolver.FindDescriptorByName(methodFullName) + if err != nil { + return nil, err + } + methodDesc, ok := desc.(protoreflect.MethodDescriptor) + if !ok { + return nil, fmt.Errorf("invalid method descriptor %s", methodFullName) + } + + isProtov2Handler, err := isProtov2(method) + if err != nil { + return nil, err + } + if isProtov2Handler { + return makeProtoV2HybridHandler(methodDesc, cdc, method, handler) + } + return makeGogoHybridHandler(methodDesc, cdc, method, handler) +} + +// makeProtoV2HybridHandler returns a handler that can handle both gogo and protov2 messages. +func makeProtoV2HybridHandler(prefMethod protoreflect.MethodDescriptor, cdc codec.BinaryCodec, method grpc.MethodDesc, handler any) (Handler, error) { + // it's a protov2 handler, if a gogo counterparty is not found we cannot handle gogo messages. + gogoExists := gogoproto.MessageType(string(prefMethod.Output().FullName())) != nil + if !gogoExists { + return func(ctx context.Context, inReq, outResp protoiface.MessageV1) error { + protov2Request, ok := inReq.(proto2.Message) + if !ok { + return fmt.Errorf("invalid request type %T, method %s does not accept gogoproto messages", inReq, prefMethod.FullName()) + } + resp, err := method.Handler(handler, ctx, func(msg any) error { + proto2.Merge(msg.(proto2.Message), protov2Request) + return nil + }, nil) + if err != nil { + return err + } + // merge on the resp + proto2.Merge(outResp.(proto2.Message), resp.(proto2.Message)) + return nil + }, nil + } + return func(ctx context.Context, inReq, outResp protoiface.MessageV1) error { + // we check if the request is a protov2 message. + switch m := inReq.(type) { + case proto2.Message: + // we can just call the handler after making a copy of the message, for safety reasons. + resp, err := method.Handler(handler, ctx, func(msg any) error { + proto2.Merge(msg.(proto2.Message), m) + return nil + }, nil) + if err != nil { + return err + } + // merge on the resp + proto2.Merge(outResp.(proto2.Message), resp.(proto2.Message)) + return nil + case gogoproto.Message: + // we need to marshal and unmarshal the request. + requestBytes, err := cdc.Marshal(m) + if err != nil { + return err + } + resp, err := method.Handler(handler, ctx, func(msg any) error { + // unmarshal request into the message. + return proto2.Unmarshal(requestBytes, msg.(proto2.Message)) + }, nil) + if err != nil { + return err + } + // the response is a protov2 message, so we cannot just return it. + // since the request came as gogoproto, we expect the response + // to also be gogoproto. + respBytes, err := protov2MarshalOpts.Marshal(resp.(proto2.Message)) + if err != nil { + return err + } + + // unmarshal response into a gogo message. + return cdc.Unmarshal(respBytes, outResp.(gogoproto.Message)) + default: + panic("unreachable") + } + }, nil +} + +func makeGogoHybridHandler(prefMethod protoreflect.MethodDescriptor, cdc codec.BinaryCodec, method grpc.MethodDesc, handler any) (Handler, error) { + // it's a gogo handler, we check if the existing protov2 counterparty exists. + _, err := protoregistry.GlobalTypes.FindMessageByName(prefMethod.Output().FullName()) + if err != nil { + // this can only be a gogo message. + return func(ctx context.Context, inReq, outResp protoiface.MessageV1) error { + _, ok := inReq.(proto2.Message) + if ok { + return fmt.Errorf("invalid request type %T, method %s does not accept protov2 messages", inReq, prefMethod.FullName()) + } + resp, err := method.Handler(handler, ctx, func(msg any) error { + // merge! ref: https://github.com/cosmos/cosmos-sdk/issues/18003 + // NOTE: using gogoproto.Merge will fail for some reason unknown to me, but + // using proto.Merge with gogo messages seems to work fine. + proto.Merge(msg.(gogoproto.Message), inReq) + return nil + }, nil) + if err != nil { + return err + } + // merge resp, ref: https://github.com/cosmos/cosmos-sdk/issues/18003 + // NOTE: using gogoproto.Merge will fail for some reason unknown to me, but + // using proto.Merge with gogo messages seems to work fine. + proto.Merge(outResp.(gogoproto.Message), resp.(gogoproto.Message)) + return nil + }, nil + } + // this is a gogo handler, and we have a protov2 counterparty. + return func(ctx context.Context, inReq, outResp protoiface.MessageV1) error { + switch m := inReq.(type) { + case proto2.Message: + // we need to marshal and unmarshal the request. + requestBytes, err := protov2MarshalOpts.Marshal(m) + if err != nil { + return err + } + resp, err := method.Handler(handler, ctx, func(msg any) error { + // unmarshal request into the message. + return cdc.Unmarshal(requestBytes, msg.(gogoproto.Message)) + }, nil) + if err != nil { + return err + } + // the response is a gogo message, so we cannot just return it. + // since the request came as protov2, we expect the response + // to also be protov2. + respBytes, err := cdc.Marshal(resp.(gogoproto.Message)) + if err != nil { + return err + } + // now we unmarshal back into a protov2 message. + return proto2.Unmarshal(respBytes, outResp.(proto2.Message)) + case gogoproto.Message: + // we can just call the handler after making a copy of the message, for safety reasons. + resp, err := method.Handler(handler, ctx, func(msg any) error { + // ref: https://github.com/cosmos/cosmos-sdk/issues/18003 + asGogoProto := msg.(gogoproto.Message) + // NOTE: using gogoproto.Merge will fail for some reason unknown to me, but + // using proto.Merge with gogo messages seems to work fine. + proto.Merge(asGogoProto, m) + return nil + }, nil) + if err != nil { + return err + } + // merge on the resp, ref: https://github.com/cosmos/cosmos-sdk/issues/18003 + // NOTE: using gogoproto.Merge will fail for some reason unknown to me, but + // using proto.Merge with gogo messages seems to work fine. + proto.Merge(outResp.(gogoproto.Message), resp.(gogoproto.Message)) + return nil + default: + panic("unreachable") + } + }, nil +} + +// isProtov2 returns true if the given method accepts protov2 messages. +// Returns false if it does not. +// It uses the decoder function passed to the method handler to determine +// the type. Since the decoder function is passed in by the concrete implementer the expected +// message where bytes are unmarshaled to, we can use that to determine the type. +func isProtov2(md grpc.MethodDesc) (isV2Type bool, err error) { + pullRequestType := func(msg interface{}) error { + typ := reflect.TypeOf(msg) + switch { + case typ.Implements(protov2Type): + isV2Type = true + return nil + case typ.Implements(gogoType): + isV2Type = false + return nil + default: + err = fmt.Errorf("invalid request type %T, expected protov2 or gogo message", msg) + return nil + } + } + // doNotExecute is a dummy handler that stops the request execution. + doNotExecute := func(_ context.Context, _ any, _ *grpc.UnaryServerInfo, _ grpc.UnaryHandler) (any, error) { + return nil, nil + } + // we are allowed to pass in a nil context and nil request, since we are not actually executing the request. + // this is made possible by the doNotExecute function which immediately returns without calling other handlers. + _, _ = md.Handler(nil, nil, pullRequestType, doNotExecute) + return +} + +// RequestFullNameFromMethodDesc returns the fully-qualified name of the request message of the provided service's method. +func RequestFullNameFromMethodDesc(sd *grpc.ServiceDesc, method grpc.MethodDesc) (protoreflect.FullName, error) { + methodFullName := protoreflect.FullName(fmt.Sprintf("%s.%s", sd.ServiceName, method.MethodName)) + desc, err := gogoproto.HybridResolver.FindDescriptorByName(methodFullName) + if err != nil { + return "", fmt.Errorf("cannot find method descriptor %s", methodFullName) + } + methodDesc, ok := desc.(protoreflect.MethodDescriptor) + if !ok { + return "", fmt.Errorf("invalid method descriptor %s", methodFullName) + } + return methodDesc.Input().FullName(), nil +} diff --git a/baseapp/msg_service_router.go b/baseapp/msg_service_router.go index b3876075af98..126e0f65e5bc 100644 --- a/baseapp/msg_service_router.go +++ b/baseapp/msg_service_router.go @@ -7,9 +7,12 @@ import ( gogogrpc "github.com/cosmos/gogoproto/grpc" "github.com/cosmos/gogoproto/proto" "google.golang.org/grpc" + "google.golang.org/protobuf/runtime/protoiface" errorsmod "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/baseapp/internal/protocompat" + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -26,6 +29,7 @@ type MessageRouter interface { type MsgServiceRouter struct { interfaceRegistry codectypes.InterfaceRegistry routes map[string]MsgServiceHandler + hybridHandlers map[string]func(ctx context.Context, req, resp protoiface.MessageV1) error circuitBreaker CircuitBreaker } @@ -34,7 +38,8 @@ var _ gogogrpc.Server = &MsgServiceRouter{} // NewMsgServiceRouter creates a new MsgServiceRouter. func NewMsgServiceRouter() *MsgServiceRouter { return &MsgServiceRouter{ - routes: map[string]MsgServiceHandler{}, + routes: map[string]MsgServiceHandler{}, + hybridHandlers: map[string]func(ctx context.Context, req, resp protoiface.MessageV1) error{}, } } @@ -66,100 +71,143 @@ func (msr *MsgServiceRouter) HandlerByTypeURL(typeURL string) MsgServiceHandler func (msr *MsgServiceRouter) RegisterService(sd *grpc.ServiceDesc, handler interface{}) { // Adds a top-level query handler based on the gRPC service name. for _, method := range sd.Methods { - fqMethod := fmt.Sprintf("/%s/%s", sd.ServiceName, method.MethodName) - methodHandler := method.Handler - - var requestTypeName string - - // NOTE: This is how we pull the concrete request type for each handler for registering in the InterfaceRegistry. - // This approach is maybe a bit hacky, but less hacky than reflecting on the handler object itself. - // We use a no-op interceptor to avoid actually calling into the handler itself. - _, _ = methodHandler(nil, context.Background(), func(i interface{}) error { - msg, ok := i.(sdk.Msg) - if !ok { - // We panic here because there is no other alternative and the app cannot be initialized correctly - // this should only happen if there is a problem with code generation in which case the app won't - // work correctly anyway. - panic(fmt.Errorf("unable to register service method %s: %T does not implement sdk.Msg", fqMethod, i)) - } + err := msr.registerMsgServiceHandler(sd, method, handler) + if err != nil { + panic(err) + } + err = msr.registerHybridHandler(sd, method, handler) + if err != nil { + panic(err) + } + } +} + +func (msr *MsgServiceRouter) HybridHandlerByMsgName(msgName string) func(ctx context.Context, req, resp protoiface.MessageV1) error { + return msr.hybridHandlers[msgName] +} - requestTypeName = sdk.MsgTypeURL(msg) - return nil - }, noopInterceptor) - - // Check that the service Msg fully-qualified method name has already - // been registered (via RegisterInterfaces). If the user registers a - // service without registering according service Msg type, there might be - // some unexpected behavior down the road. Since we can't return an error - // (`Server.RegisterService` interface restriction) we panic (at startup). - reqType, err := msr.interfaceRegistry.Resolve(requestTypeName) - if err != nil || reqType == nil { - panic( - fmt.Errorf( - "type_url %s has not been registered yet. "+ - "Before calling RegisterService, you must register all interfaces by calling the `RegisterInterfaces` "+ - "method on module.BasicManager. Each module should call `msgservice.RegisterMsgServiceDesc` inside its "+ - "`RegisterInterfaces` method with the `_Msg_serviceDesc` generated by proto-gen", - requestTypeName, - ), - ) +func (msr *MsgServiceRouter) registerHybridHandler(sd *grpc.ServiceDesc, method grpc.MethodDesc, handler interface{}) error { + inputName, err := protocompat.RequestFullNameFromMethodDesc(sd, method) + if err != nil { + return err + } + cdc := codec.NewProtoCodec(msr.interfaceRegistry) + hybridHandler, err := protocompat.MakeHybridHandler(cdc, sd, method, handler) + if err != nil { + return err + } + // if circuit breaker is not nil, then we decorate the hybrid handler with the circuit breaker + if msr.circuitBreaker == nil { + msr.hybridHandlers[string(inputName)] = hybridHandler + return nil + } + // decorate the hybrid handler with the circuit breaker + circuitBreakerHybridHandler := func(ctx context.Context, req, resp protoiface.MessageV1) error { + messageName := codectypes.MsgTypeURL(req) + allowed, err := msr.circuitBreaker.IsAllowed(ctx, messageName) + if err != nil { + return err + } + if !allowed { + return fmt.Errorf("circuit breaker disallows execution of message %s", messageName) } + return hybridHandler(ctx, req, resp) + } + msr.hybridHandlers[string(inputName)] = circuitBreakerHybridHandler + return nil +} - // Check that each service is only registered once. If a service is - // registered more than once, then we should error. Since we can't - // return an error (`Server.RegisterService` interface restriction) we - // panic (at startup). - _, found := msr.routes[requestTypeName] - if found { - panic( - fmt.Errorf( - "msg service %s has already been registered. Please make sure to only register each service once. "+ - "This usually means that there are conflicting modules registering the same msg service", - fqMethod, - ), - ) +func (msr *MsgServiceRouter) registerMsgServiceHandler(sd *grpc.ServiceDesc, method grpc.MethodDesc, handler interface{}) error { + fqMethod := fmt.Sprintf("/%s/%s", sd.ServiceName, method.MethodName) + methodHandler := method.Handler + + var requestTypeName string + + // NOTE: This is how we pull the concrete request type for each handler for registering in the InterfaceRegistry. + // This approach is maybe a bit hacky, but less hacky than reflecting on the handler object itself. + // We use a no-op interceptor to avoid actually calling into the handler itself. + _, _ = methodHandler(nil, context.Background(), func(i interface{}) error { + msg, ok := i.(sdk.Msg) + if !ok { + // We panic here because there is no other alternative and the app cannot be initialized correctly + // this should only happen if there is a problem with code generation in which case the app won't + // work correctly anyway. + panic(fmt.Errorf("unable to register service method %s: %T does not implement sdk.Msg", fqMethod, i)) } - msr.routes[requestTypeName] = func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { - ctx = ctx.WithEventManager(sdk.NewEventManager()) - interceptor := func(goCtx context.Context, _ interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { - goCtx = context.WithValue(goCtx, sdk.SdkContextKey, ctx) - return handler(goCtx, msg) - } + requestTypeName = sdk.MsgTypeURL(msg) + return nil + }, noopInterceptor) + + // Check that the service Msg fully-qualified method name has already + // been registered (via RegisterInterfaces). If the user registers a + // service without registering according service Msg type, there might be + // some unexpected behavior down the road. Since we can't return an error + // (`Server.RegisterService` interface restriction) we panic (at startup). + reqType, err := msr.interfaceRegistry.Resolve(requestTypeName) + if err != nil || reqType == nil { + return fmt.Errorf( + "type_url %s has not been registered yet. "+ + "Before calling RegisterService, you must register all interfaces by calling the `RegisterInterfaces` "+ + "method on module.BasicManager. Each module should call `msgservice.RegisterMsgServiceDesc` inside its "+ + "`RegisterInterfaces` method with the `_Msg_serviceDesc` generated by proto-gen", + requestTypeName, + ) + } - if m, ok := msg.(sdk.HasValidateBasic); ok { - if err := m.ValidateBasic(); err != nil { - return nil, err - } - } + // Check that each service is only registered once. If a service is + // registered more than once, then we should error. Since we can't + // return an error (`Server.RegisterService` interface restriction) we + // panic (at startup). + _, found := msr.routes[requestTypeName] + if found { + return fmt.Errorf( + "msg service %s has already been registered. Please make sure to only register each service once. "+ + "This usually means that there are conflicting modules registering the same msg service", + fqMethod, + ) + } - if msr.circuitBreaker != nil { - msgURL := sdk.MsgTypeURL(msg) - isAllowed, err := msr.circuitBreaker.IsAllowed(ctx, msgURL) - if err != nil { - return nil, err - } + msr.routes[requestTypeName] = func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { + ctx = ctx.WithEventManager(sdk.NewEventManager()) + interceptor := func(goCtx context.Context, _ interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { + goCtx = context.WithValue(goCtx, sdk.SdkContextKey, ctx) + return handler(goCtx, msg) + } - if !isAllowed { - return nil, fmt.Errorf("circuit breaker disables execution of this message: %s", msgURL) - } + if m, ok := msg.(sdk.HasValidateBasic); ok { + if err := m.ValidateBasic(); err != nil { + return nil, err } + } - // Call the method handler from the service description with the handler object. - // We don't do any decoding here because the decoding was already done. - res, err := methodHandler(handler, ctx, noopDecoder, interceptor) + if msr.circuitBreaker != nil { + msgURL := sdk.MsgTypeURL(msg) + isAllowed, err := msr.circuitBreaker.IsAllowed(ctx, msgURL) if err != nil { return nil, err } - resMsg, ok := res.(proto.Message) - if !ok { - return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidType, "Expecting proto.Message, got %T", resMsg) + if !isAllowed { + return nil, fmt.Errorf("circuit breaker disables execution of this message: %s", msgURL) } + } - return sdk.WrapServiceResult(ctx, resMsg, err) + // Call the method handler from the service description with the handler object. + // We don't do any decoding here because the decoding was already done. + res, err := methodHandler(handler, ctx, noopDecoder, interceptor) + if err != nil { + return nil, err } + + resMsg, ok := res.(proto.Message) + if !ok { + return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidType, "Expecting proto.Message, got %T", resMsg) + } + + return sdk.WrapServiceResult(ctx, resMsg, err) } + return nil } // SetInterfaceRegistry sets the interface registry for the router. diff --git a/baseapp/msg_service_router_test.go b/baseapp/msg_service_router_test.go index 23acbe99409b..8ddb490e994d 100644 --- a/baseapp/msg_service_router_test.go +++ b/baseapp/msg_service_router_test.go @@ -86,12 +86,47 @@ func TestRegisterMsgServiceTwice(t *testing.T) { }) } +func TestHybridHandlerByMsgName(t *testing.T) { + // Setup baseapp and router. + var ( + appBuilder *runtime.AppBuilder + registry codectypes.InterfaceRegistry + ) + err := depinject.Inject( + depinject.Configs( + makeMinimalConfig(), + depinject.Supply(log.NewTestLogger(t)), + ), &appBuilder, ®istry) + require.NoError(t, err) + db := dbm.NewMemDB() + app := appBuilder.Build(db, nil) + testdata.RegisterInterfaces(registry) + + testdata.RegisterMsgServer( + app.MsgServiceRouter(), + testdata.MsgServerImpl{}, + ) + + handler := app.MsgServiceRouter().HybridHandlerByMsgName("testpb.MsgCreateDog") + + require.NotNil(t, handler) + require.NoError(t, app.Init()) + ctx := app.NewContext(true) + resp := new(testdata.MsgCreateDogResponse) + err = handler(ctx, &testdata.MsgCreateDog{ + Dog: &testdata.Dog{Name: "Spot"}, + Owner: "me", + }, resp) + require.NoError(t, err) + require.Equal(t, resp.Name, "Spot") +} + func TestMsgService(t *testing.T) { priv, _, _ := testdata.KeyTestPubAddr() var ( appBuilder *runtime.AppBuilder - cdc codec.ProtoCodecMarshaler + cdc codec.Codec interfaceRegistry codectypes.InterfaceRegistry ) err := depinject.Inject( diff --git a/baseapp/noopgasmeter.go b/baseapp/noopgasmeter.go new file mode 100644 index 000000000000..c341bcbe7b11 --- /dev/null +++ b/baseapp/noopgasmeter.go @@ -0,0 +1,17 @@ +package baseapp + +import storetypes "cosmossdk.io/store/types" + +type noopGasMeter struct{} + +var _ storetypes.GasMeter = noopGasMeter{} + +func (noopGasMeter) GasConsumed() storetypes.Gas { return 0 } +func (noopGasMeter) GasConsumedToLimit() storetypes.Gas { return 0 } +func (noopGasMeter) GasRemaining() storetypes.Gas { return 0 } +func (noopGasMeter) Limit() storetypes.Gas { return 0 } +func (noopGasMeter) ConsumeGas(storetypes.Gas, string) {} +func (noopGasMeter) RefundGas(storetypes.Gas, string) {} +func (noopGasMeter) IsPastLimit() bool { return false } +func (noopGasMeter) IsOutOfGas() bool { return false } +func (noopGasMeter) String() string { return "noopGasMeter" } diff --git a/baseapp/oe/optimistic_execution.go b/baseapp/oe/optimistic_execution.go new file mode 100644 index 000000000000..c0c8e2575ac2 --- /dev/null +++ b/baseapp/oe/optimistic_execution.go @@ -0,0 +1,160 @@ +package oe + +import ( + "bytes" + "context" + "encoding/hex" + "math/rand" + "sync" + "time" + + abci "github.com/cometbft/cometbft/abci/types" + + "cosmossdk.io/log" +) + +// FinalizeBlockFunc is the function that is called by the OE to finalize the +// block. It is the same as the one in the ABCI app. +type FinalizeBlockFunc func(context.Context, *abci.RequestFinalizeBlock) (*abci.ResponseFinalizeBlock, error) + +// OptimisticExecution is a struct that contains the OE context. It is used to +// run the FinalizeBlock function in a goroutine, and to abort it if needed. +type OptimisticExecution struct { + finalizeBlockFunc FinalizeBlockFunc // ABCI FinalizeBlock function with a context + logger log.Logger + + mtx sync.Mutex + stopCh chan struct{} + request *abci.RequestFinalizeBlock + response *abci.ResponseFinalizeBlock + err error + cancelFunc func() // cancel function for the context + initialized bool // A boolean value indicating whether the struct has been initialized + + // debugging/testing options + abortRate int // number from 0 to 100 that determines the percentage of OE that should be aborted +} + +// NewOptimisticExecution initializes the Optimistic Execution context but does not start it. +func NewOptimisticExecution(logger log.Logger, fn FinalizeBlockFunc, opts ...func(*OptimisticExecution)) *OptimisticExecution { + logger = logger.With(log.ModuleKey, "oe") + oe := &OptimisticExecution{logger: logger, finalizeBlockFunc: fn} + for _, opt := range opts { + opt(oe) + } + return oe +} + +// WithAbortRate sets the abort rate for the OE. The abort rate is a number from +// 0 to 100 that determines the percentage of OE that should be aborted. +// This is for testing purposes only and must not be used in production. +func WithAbortRate(rate int) func(*OptimisticExecution) { + return func(oe *OptimisticExecution) { + oe.abortRate = rate + } +} + +// Reset resets the OE context. Must be called whenever we want to invalidate +// the current OE. +func (oe *OptimisticExecution) Reset() { + oe.mtx.Lock() + defer oe.mtx.Unlock() + oe.request = nil + oe.response = nil + oe.err = nil + oe.initialized = false +} + +func (oe *OptimisticExecution) Enabled() bool { + return oe != nil +} + +// Initialized returns true if the OE was initialized, meaning that it contains +// a request and it was run or it is running. +func (oe *OptimisticExecution) Initialized() bool { + if oe == nil { + return false + } + oe.mtx.Lock() + defer oe.mtx.Unlock() + + return oe.initialized +} + +// Execute initializes the OE and starts it in a goroutine. +func (oe *OptimisticExecution) Execute(req *abci.RequestProcessProposal) { + oe.mtx.Lock() + defer oe.mtx.Unlock() + + oe.stopCh = make(chan struct{}) + oe.request = &abci.RequestFinalizeBlock{ + Txs: req.Txs, + DecidedLastCommit: req.ProposedLastCommit, + Misbehavior: req.Misbehavior, + Hash: req.Hash, + Height: req.Height, + Time: req.Time, + NextValidatorsHash: req.NextValidatorsHash, + ProposerAddress: req.ProposerAddress, + } + + oe.logger.Debug("OE started", "height", req.Height, "hash", hex.EncodeToString(req.Hash), "time", req.Time.String()) + ctx, cancel := context.WithCancel(context.Background()) + oe.cancelFunc = cancel + oe.initialized = true + + go func() { + start := time.Now() + resp, err := oe.finalizeBlockFunc(ctx, oe.request) + + oe.mtx.Lock() + + executionTime := time.Since(start) + oe.logger.Debug("OE finished", "duration", executionTime.String(), "height", oe.request.Height, "hash", hex.EncodeToString(oe.request.Hash)) + oe.response, oe.err = resp, err + + close(oe.stopCh) + oe.mtx.Unlock() + }() +} + +// AbortIfNeeded aborts the OE if the request hash is not the same as the one in +// the running OE. Returns true if the OE was aborted. +func (oe *OptimisticExecution) AbortIfNeeded(reqHash []byte) bool { + if oe == nil { + return false + } + + oe.mtx.Lock() + defer oe.mtx.Unlock() + + if !bytes.Equal(oe.request.Hash, reqHash) { + oe.logger.Error("OE aborted due to hash mismatch", "oe_hash", hex.EncodeToString(oe.request.Hash), "req_hash", hex.EncodeToString(reqHash), "oe_height", oe.request.Height, "req_height", oe.request.Height) + oe.cancelFunc() + return true + } else if oe.abortRate > 0 && rand.Intn(100) < oe.abortRate { + // this is for test purposes only, we can emulate a certain percentage of + // OE needed to be aborted. + oe.cancelFunc() + oe.logger.Error("OE aborted due to test abort rate") + return true + } + + return false +} + +// Abort aborts the OE unconditionally and waits for it to finish. +func (oe *OptimisticExecution) Abort() { + if oe == nil || oe.cancelFunc == nil { + return + } + + oe.cancelFunc() + <-oe.stopCh +} + +// WaitResult waits for the OE to finish and returns the result. +func (oe *OptimisticExecution) WaitResult() (*abci.ResponseFinalizeBlock, error) { + <-oe.stopCh + return oe.response, oe.err +} diff --git a/baseapp/oe/optimistic_execution_test.go b/baseapp/oe/optimistic_execution_test.go new file mode 100644 index 000000000000..0b92244783cd --- /dev/null +++ b/baseapp/oe/optimistic_execution_test.go @@ -0,0 +1,34 @@ +package oe + +import ( + "context" + "errors" + "testing" + + abci "github.com/cometbft/cometbft/abci/types" + "github.com/stretchr/testify/assert" + + "cosmossdk.io/log" +) + +func testFinalizeBlock(_ context.Context, _ *abci.RequestFinalizeBlock) (*abci.ResponseFinalizeBlock, error) { + return nil, errors.New("test error") +} + +func TestOptimisticExecution(t *testing.T) { + oe := NewOptimisticExecution(log.NewNopLogger(), testFinalizeBlock) + assert.True(t, oe.Enabled()) + oe.Execute(&abci.RequestProcessProposal{ + Hash: []byte("test"), + }) + assert.True(t, oe.Initialized()) + + resp, err := oe.WaitResult() + assert.Nil(t, resp) + assert.EqualError(t, err, "test error") + + assert.False(t, oe.AbortIfNeeded([]byte("test"))) + assert.True(t, oe.AbortIfNeeded([]byte("wrong_hash"))) + + oe.Reset() +} diff --git a/baseapp/options.go b/baseapp/options.go index 4dd566f0c0da..7218a283e794 100644 --- a/baseapp/options.go +++ b/baseapp/options.go @@ -3,14 +3,17 @@ package baseapp import ( "fmt" "io" + "math" + + dbm "github.com/cosmos/cosmos-db" "cosmossdk.io/store/metrics" pruningtypes "cosmossdk.io/store/pruning/types" "cosmossdk.io/store/snapshots" snapshottypes "cosmossdk.io/store/snapshots/types" storetypes "cosmossdk.io/store/types" - dbm "github.com/cosmos/cosmos-db" + "github.com/cosmos/cosmos-sdk/baseapp/oe" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -35,6 +38,15 @@ func SetMinGasPrices(gasPricesStr string) func(*BaseApp) { return func(bapp *BaseApp) { bapp.setMinGasPrices(gasPrices) } } +// SetQueryGasLimit returns an option that sets a gas limit for queries. +func SetQueryGasLimit(queryGasLimit uint64) func(*BaseApp) { + if queryGasLimit == 0 { + queryGasLimit = math.MaxUint64 + } + + return func(bapp *BaseApp) { bapp.queryGasLimit = queryGasLimit } +} + // SetHaltHeight returns a BaseApp option function that sets the halt block height. func SetHaltHeight(blockHeight uint64) func(*BaseApp) { return func(bapp *BaseApp) { bapp.setHaltHeight(blockHeight) } @@ -93,6 +105,23 @@ func SetChainID(chainID string) func(*BaseApp) { return func(app *BaseApp) { app.chainID = chainID } } +// SetStoreLoader allows customization of the rootMultiStore initialization. +func SetStoreLoader(loader StoreLoader) func(*BaseApp) { + return func(app *BaseApp) { app.SetStoreLoader(loader) } +} + +// SetOptimisticExecution enables optimistic execution. +func SetOptimisticExecution(opts ...func(*oe.OptimisticExecution)) func(*BaseApp) { + return func(app *BaseApp) { + app.optimisticExec = oe.NewOptimisticExecution(app.logger, app.internalFinalizeBlock, opts...) + } +} + +// DisableBlockGasMeter disables the block gas meter. +func DisableBlockGasMeter() func(*BaseApp) { + return func(app *BaseApp) { app.SetDisableBlockGasMeter(true) } +} + func (app *BaseApp) SetName(name string) { if app.sealed { panic("SetName() on sealed BaseApp") @@ -147,6 +176,18 @@ func (app *BaseApp) SetInitChainer(initChainer sdk.InitChainer) { app.initChainer = initChainer } +func (app *BaseApp) PreBlocker() sdk.PreBlocker { + return app.preBlocker +} + +func (app *BaseApp) SetPreBlocker(preBlocker sdk.PreBlocker) { + if app.sealed { + panic("SetPreBlocker() on sealed BaseApp") + } + + app.preBlocker = preBlocker +} + func (app *BaseApp) SetBeginBlocker(beginBlocker sdk.BeginBlocker) { if app.sealed { panic("SetBeginBlocker() on sealed BaseApp") @@ -219,6 +260,11 @@ func (app *BaseApp) SetFauxMerkleMode() { app.fauxMerkleMode = true } +// SetNotSigverify during simulation testing, transaction signature verification needs to be ignored. +func (app *BaseApp) SetNotSigverifyTx() { + app.sigverifyTx = false +} + // SetCommitMultiStoreTracer sets the store tracer on the BaseApp's underlying // CommitMultiStore. func (app *BaseApp) SetCommitMultiStoreTracer(w io.Writer) { @@ -326,3 +372,18 @@ func (app *BaseApp) SetStoreMetrics(gatherer metrics.StoreMetrics) { func (app *BaseApp) SetStreamingManager(manager storetypes.StreamingManager) { app.streamingManager = manager } + +// SetDisableBlockGasMeter sets the disableBlockGasMeter flag for the BaseApp. +func (app *BaseApp) SetDisableBlockGasMeter(disableBlockGasMeter bool) { + app.disableBlockGasMeter = disableBlockGasMeter +} + +// SetMsgServiceRouter sets the MsgServiceRouter of a BaseApp. +func (app *BaseApp) SetMsgServiceRouter(msgServiceRouter *MsgServiceRouter) { + app.msgServiceRouter = msgServiceRouter +} + +// SetGRPCQueryRouter sets the GRPCQueryRouter of the BaseApp. +func (app *BaseApp) SetGRPCQueryRouter(grpcQueryRouter *GRPCQueryRouter) { + app.grpcQueryRouter = grpcQueryRouter +} diff --git a/baseapp/state.go b/baseapp/state.go index ddfb82f92de1..19ee4e7eaa40 100644 --- a/baseapp/state.go +++ b/baseapp/state.go @@ -1,13 +1,17 @@ package baseapp import ( + "sync" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" ) type state struct { - ms storetypes.CacheMultiStore + ms storetypes.CacheMultiStore + + mtx sync.RWMutex ctx sdk.Context } @@ -17,7 +21,16 @@ func (st *state) CacheMultiStore() storetypes.CacheMultiStore { return st.ms.CacheMultiStore() } +// SetContext updates the state's context to the context provided. +func (st *state) SetContext(ctx sdk.Context) { + st.mtx.Lock() + defer st.mtx.Unlock() + st.ctx = ctx +} + // Context returns the Context of the state. func (st *state) Context() sdk.Context { + st.mtx.RLock() + defer st.mtx.RUnlock() return st.ctx } diff --git a/baseapp/streaming.go b/baseapp/streaming.go index 56b971f842d4..c978d959aa7c 100644 --- a/baseapp/streaming.go +++ b/baseapp/streaming.go @@ -5,9 +5,10 @@ import ( "sort" "strings" + "github.com/spf13/cast" + "cosmossdk.io/store/streaming" storetypes "cosmossdk.io/store/types" - "github.com/spf13/cast" "github.com/cosmos/cosmos-sdk/client/flags" servertypes "github.com/cosmos/cosmos-sdk/server/types" diff --git a/baseapp/streaming_test.go b/baseapp/streaming_test.go index e4a896a40d28..68ab1320ef1f 100644 --- a/baseapp/streaming_test.go +++ b/baseapp/streaming_test.go @@ -5,11 +5,12 @@ import ( "fmt" "testing" - storetypes "cosmossdk.io/store/types" abci "github.com/cometbft/cometbft/abci/types" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/require" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/baseapp" baseapptestutil "github.com/cosmos/cosmos-sdk/baseapp/testutil" ) diff --git a/baseapp/test_helpers.go b/baseapp/test_helpers.go index db603f2f2982..a8f7853f224b 100644 --- a/baseapp/test_helpers.go +++ b/baseapp/test_helpers.go @@ -35,6 +35,7 @@ func (app *BaseApp) SimDeliver(txEncoder sdk.TxEncoder, tx sdk.Tx) (sdk.GasInfo, if err != nil { return sdk.GasInfo{}, nil, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "%s", err) } + gasInfo, result, _, err := app.runTx(execModeFinalize, bz) return gasInfo, result, err } diff --git a/baseapp/testutil/messages.proto b/baseapp/testutil/messages.proto index 1cce9dba5ded..d2b25d24c117 100644 --- a/baseapp/testutil/messages.proto +++ b/baseapp/testutil/messages.proto @@ -9,17 +9,17 @@ option go_package = "github.com/cosmos/cosmos-sdk/baseapp/testutil"; message MsgCounter { option (cosmos.msg.v1.signer) = "signer"; - int64 counter = 1; - bool fail_on_handler = 2; - string signer = 3; + int64 counter = 1; + bool fail_on_handler = 2; + string signer = 3; } message MsgCounter2 { option (cosmos.msg.v1.signer) = "signer"; - int64 counter = 1; - bool fail_on_handler = 2; - string signer = 3; + int64 counter = 1; + bool fail_on_handler = 2; + string signer = 3; } message MsgCreateCounterResponse {} diff --git a/baseapp/testutil/mock/mocks.go b/baseapp/testutil/mock/mocks.go new file mode 100644 index 000000000000..85d1cdeaf6d5 --- /dev/null +++ b/baseapp/testutil/mock/mocks.go @@ -0,0 +1,235 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: baseapp/abci_utils.go + +// Package mock is a generated GoMock package. +package mock + +import ( + context "context" + reflect "reflect" + + crypto "github.com/cometbft/cometbft/proto/tendermint/crypto" + types "github.com/cosmos/cosmos-sdk/types" + gomock "github.com/golang/mock/gomock" +) + +// MockValidatorStore is a mock of ValidatorStore interface. +type MockValidatorStore struct { + ctrl *gomock.Controller + recorder *MockValidatorStoreMockRecorder +} + +// MockValidatorStoreMockRecorder is the mock recorder for MockValidatorStore. +type MockValidatorStoreMockRecorder struct { + mock *MockValidatorStore +} + +// NewMockValidatorStore creates a new mock instance. +func NewMockValidatorStore(ctrl *gomock.Controller) *MockValidatorStore { + mock := &MockValidatorStore{ctrl: ctrl} + mock.recorder = &MockValidatorStoreMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockValidatorStore) EXPECT() *MockValidatorStoreMockRecorder { + return m.recorder +} + +// GetPubKeyByConsAddr mocks base method. +func (m *MockValidatorStore) GetPubKeyByConsAddr(arg0 context.Context, arg1 types.ConsAddress) (crypto.PublicKey, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetPubKeyByConsAddr", arg0, arg1) + ret0, _ := ret[0].(crypto.PublicKey) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetPubKeyByConsAddr indicates an expected call of GetPubKeyByConsAddr. +func (mr *MockValidatorStoreMockRecorder) GetPubKeyByConsAddr(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPubKeyByConsAddr", reflect.TypeOf((*MockValidatorStore)(nil).GetPubKeyByConsAddr), arg0, arg1) +} + +// MockGasTx is a mock of GasTx interface. +type MockGasTx struct { + ctrl *gomock.Controller + recorder *MockGasTxMockRecorder +} + +// MockGasTxMockRecorder is the mock recorder for MockGasTx. +type MockGasTxMockRecorder struct { + mock *MockGasTx +} + +// NewMockGasTx creates a new mock instance. +func NewMockGasTx(ctrl *gomock.Controller) *MockGasTx { + mock := &MockGasTx{ctrl: ctrl} + mock.recorder = &MockGasTxMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockGasTx) EXPECT() *MockGasTxMockRecorder { + return m.recorder +} + +// GetGas mocks base method. +func (m *MockGasTx) GetGas() uint64 { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetGas") + ret0, _ := ret[0].(uint64) + return ret0 +} + +// GetGas indicates an expected call of GetGas. +func (mr *MockGasTxMockRecorder) GetGas() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetGas", reflect.TypeOf((*MockGasTx)(nil).GetGas)) +} + +// MockProposalTxVerifier is a mock of ProposalTxVerifier interface. +type MockProposalTxVerifier struct { + ctrl *gomock.Controller + recorder *MockProposalTxVerifierMockRecorder +} + +// MockProposalTxVerifierMockRecorder is the mock recorder for MockProposalTxVerifier. +type MockProposalTxVerifierMockRecorder struct { + mock *MockProposalTxVerifier +} + +// NewMockProposalTxVerifier creates a new mock instance. +func NewMockProposalTxVerifier(ctrl *gomock.Controller) *MockProposalTxVerifier { + mock := &MockProposalTxVerifier{ctrl: ctrl} + mock.recorder = &MockProposalTxVerifierMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockProposalTxVerifier) EXPECT() *MockProposalTxVerifierMockRecorder { + return m.recorder +} + +// PrepareProposalVerifyTx mocks base method. +func (m *MockProposalTxVerifier) PrepareProposalVerifyTx(tx types.Tx) ([]byte, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "PrepareProposalVerifyTx", tx) + ret0, _ := ret[0].([]byte) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// PrepareProposalVerifyTx indicates an expected call of PrepareProposalVerifyTx. +func (mr *MockProposalTxVerifierMockRecorder) PrepareProposalVerifyTx(tx interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareProposalVerifyTx", reflect.TypeOf((*MockProposalTxVerifier)(nil).PrepareProposalVerifyTx), tx) +} + +// ProcessProposalVerifyTx mocks base method. +func (m *MockProposalTxVerifier) ProcessProposalVerifyTx(txBz []byte) (types.Tx, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ProcessProposalVerifyTx", txBz) + ret0, _ := ret[0].(types.Tx) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ProcessProposalVerifyTx indicates an expected call of ProcessProposalVerifyTx. +func (mr *MockProposalTxVerifierMockRecorder) ProcessProposalVerifyTx(txBz interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProcessProposalVerifyTx", reflect.TypeOf((*MockProposalTxVerifier)(nil).ProcessProposalVerifyTx), txBz) +} + +// TxDecode mocks base method. +func (m *MockProposalTxVerifier) TxDecode(txBz []byte) (types.Tx, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "TxDecode", txBz) + ret0, _ := ret[0].(types.Tx) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// TxDecode indicates an expected call of TxDecode. +func (mr *MockProposalTxVerifierMockRecorder) TxDecode(txBz interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TxDecode", reflect.TypeOf((*MockProposalTxVerifier)(nil).TxDecode), txBz) +} + +// TxEncode mocks base method. +func (m *MockProposalTxVerifier) TxEncode(tx types.Tx) ([]byte, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "TxEncode", tx) + ret0, _ := ret[0].([]byte) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// TxEncode indicates an expected call of TxEncode. +func (mr *MockProposalTxVerifierMockRecorder) TxEncode(tx interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TxEncode", reflect.TypeOf((*MockProposalTxVerifier)(nil).TxEncode), tx) +} + +// MockTxSelector is a mock of TxSelector interface. +type MockTxSelector struct { + ctrl *gomock.Controller + recorder *MockTxSelectorMockRecorder +} + +// MockTxSelectorMockRecorder is the mock recorder for MockTxSelector. +type MockTxSelectorMockRecorder struct { + mock *MockTxSelector +} + +// NewMockTxSelector creates a new mock instance. +func NewMockTxSelector(ctrl *gomock.Controller) *MockTxSelector { + mock := &MockTxSelector{ctrl: ctrl} + mock.recorder = &MockTxSelectorMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockTxSelector) EXPECT() *MockTxSelectorMockRecorder { + return m.recorder +} + +// Clear mocks base method. +func (m *MockTxSelector) Clear() { + m.ctrl.T.Helper() + m.ctrl.Call(m, "Clear") +} + +// Clear indicates an expected call of Clear. +func (mr *MockTxSelectorMockRecorder) Clear() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clear", reflect.TypeOf((*MockTxSelector)(nil).Clear)) +} + +// SelectTxForProposal mocks base method. +func (m *MockTxSelector) SelectTxForProposal(ctx context.Context, maxTxBytes, maxBlockGas uint64, memTx types.Tx, txBz []byte) bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SelectTxForProposal", ctx, maxTxBytes, maxBlockGas, memTx, txBz) + ret0, _ := ret[0].(bool) + return ret0 +} + +// SelectTxForProposal indicates an expected call of SelectTxForProposal. +func (mr *MockTxSelectorMockRecorder) SelectTxForProposal(ctx, maxTxBytes, maxBlockGas, memTx, txBz interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectTxForProposal", reflect.TypeOf((*MockTxSelector)(nil).SelectTxForProposal), ctx, maxTxBytes, maxBlockGas, memTx, txBz) +} + +// SelectedTxs mocks base method. +func (m *MockTxSelector) SelectedTxs(ctx context.Context) [][]byte { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SelectedTxs", ctx) + ret0, _ := ret[0].([][]byte) + return ret0 +} + +// SelectedTxs indicates an expected call of SelectedTxs. +func (mr *MockTxSelectorMockRecorder) SelectedTxs(ctx interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectedTxs", reflect.TypeOf((*MockTxSelector)(nil).SelectedTxs), ctx) +} diff --git a/baseapp/utils_test.go b/baseapp/utils_test.go index e436b47ad73e..1de526953fae 100644 --- a/baseapp/utils_test.go +++ b/baseapp/utils_test.go @@ -13,28 +13,30 @@ import ( "testing" "unsafe" - runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1" - appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" - "cosmossdk.io/depinject" - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" cmttypes "github.com/cometbft/cometbft/types" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require" + runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1" + appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" + "cosmossdk.io/core/address" "cosmossdk.io/core/appconfig" + "cosmossdk.io/depinject" + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - "github.com/cosmos/cosmos-sdk/testutil/testdata" "github.com/cosmos/cosmos-sdk/baseapp" baseapptestutil "github.com/cosmos/cosmos-sdk/baseapp/testutil" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil/mock" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/mempool" @@ -72,7 +74,7 @@ func GenesisStateWithSingleValidator(t *testing.T, codec codec.Codec, builder *r balances := []banktypes.Balance{ { Address: acc.GetAddress().String(), - Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100000000000000))), + Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(100000000000000))), }, } @@ -85,9 +87,15 @@ func GenesisStateWithSingleValidator(t *testing.T, codec codec.Codec, builder *r } func makeMinimalConfig() depinject.Config { - var mempoolOpt runtime.BaseAppOption = baseapp.SetMempool(mempool.NewSenderNonceMempool()) + var ( + mempoolOpt = baseapp.SetMempool(mempool.NewSenderNonceMempool()) + addressCodec = func() address.Codec { return addresscodec.NewBech32Codec("cosmos") } + validatorAddressCodec = func() runtime.ValidatorAddressCodec { return addresscodec.NewBech32Codec("cosmosvaloper") } + consensusAddressCodec = func() runtime.ConsensusAddressCodec { return addresscodec.NewBech32Codec("cosmosvalcons") } + ) + return depinject.Configs( - depinject.Supply(mempoolOpt), + depinject.Supply(mempoolOpt, addressCodec, validatorAddressCodec, consensusAddressCodec), appconfig.Compose(&appv1alpha1.Config{ Modules: []*appv1alpha1.ModuleConfig{ { @@ -382,3 +390,17 @@ func setFailOnHandler(cfg client.TxConfig, tx signing.Tx, fail bool) signing.Tx builder.SetMsgs(msgs...) return builder.GetTx() } + +// wonkyMsg is to be used to run a MsgCounter2 message when the MsgCounter2 handler is not registered. +func wonkyMsg(t *testing.T, cfg client.TxConfig, tx signing.Tx) signing.Tx { + t.Helper() + builder := cfg.NewTxBuilder() + builder.SetMemo(tx.GetMemo()) + + msgs := tx.GetMsgs() + msgs = append(msgs, &baseapptestutil.MsgCounter2{}) + + err := builder.SetMsgs(msgs...) + require.NoError(t, err) + return builder.GetTx() +} diff --git a/buf.work.yaml b/buf.work.yaml index d8175d0ef814..7a18eb0259c6 100644 --- a/buf.work.yaml +++ b/buf.work.yaml @@ -1,9 +1,3 @@ -# Generated by "buf config migrate-v1beta1". Edit as necessary, and -# remove this comment when you're finished. -# -# This workspace file points to the roots found in your -# previous "buf.yaml" configuration. version: v1 directories: - - proto - - orm/internal + - proto \ No newline at end of file diff --git a/client/cmd.go b/client/cmd.go index e5f9f793857e..b91b4e15c4a4 100644 --- a/client/cmd.go +++ b/client/cmd.go @@ -1,6 +1,7 @@ package client import ( + "context" "crypto/tls" "fmt" "strings" @@ -8,6 +9,7 @@ import ( "github.com/cockroachdb/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" + "golang.org/x/exp/slices" "google.golang.org/grpc" "google.golang.org/grpc/credentials" "google.golang.org/grpc/credentials/insecure" @@ -166,7 +168,7 @@ func ReadPersistentCommandFlags(clientCtx Context, flagSet *pflag.FlagSet) (Cont }))) } - grpcClient, err := grpc.Dial(grpcURI, dialOpts...) + grpcClient, err := grpc.Dial(grpcURI, dialOpts...) // nolint:staticcheck // grpc.Dial is deprecated but we still use it if err != nil { return Context{}, err } @@ -277,20 +279,13 @@ func readTxCommandFlags(clientCtx Context, flagSet *pflag.FlagSet) (Context, err from, _ := flagSet.GetString(flags.FlagFrom) fromAddr, fromName, keyType, err := GetFromFields(clientCtx, clientCtx.Keyring, from) if err != nil { - return clientCtx, err + return clientCtx, fmt.Errorf("failed to convert address field to address: %w", err) } clientCtx = clientCtx.WithFrom(from).WithFromAddress(fromAddr).WithFromName(fromName) if keyType == keyring.TypeLedger && clientCtx.SignModeStr == flags.SignModeTextual { - textualEnabled := false - for _, v := range clientCtx.TxConfig.SignModeHandler().SupportedModes() { - if v == signingv1beta1.SignMode_SIGN_MODE_TEXTUAL { - textualEnabled = true - break - } - } - if !textualEnabled { + if !slices.Contains(clientCtx.TxConfig.SignModeHandler().SupportedModes(), signingv1beta1.SignMode_SIGN_MODE_TEXTUAL) { return clientCtx, fmt.Errorf("SIGN_MODE_TEXTUAL is not available") } } @@ -311,14 +306,12 @@ func readTxCommandFlags(clientCtx Context, flagSet *pflag.FlagSet) (Context, err isAux, _ := flagSet.GetBool(flags.FlagAux) clientCtx = clientCtx.WithAux(isAux) if isAux { - // If the user didn't explicitly set an --output flag, use JSON by - // default. + // If the user didn't explicitly set an --output flag, use JSON by default. if clientCtx.OutputFormat == "" || !flagSet.Changed(flags.FlagOutput) { clientCtx = clientCtx.WithOutputFormat(flags.OutputFormatJSON) } - // If the user didn't explicitly set a --sign-mode flag, use - // DIRECT_AUX by default. + // If the user didn't explicitly set a --sign-mode flag, use DIRECT_AUX by default. if clientCtx.SignModeStr == "" || !flagSet.Changed(flags.FlagSignMode) { clientCtx = clientCtx.WithSignModeStr(flags.SignModeDirectAux) } @@ -366,13 +359,17 @@ func GetClientContextFromCmd(cmd *cobra.Command) Context { // SetCmdClientContext sets a command's Context value to the provided argument. // If the context has not been set, set the given context as the default. func SetCmdClientContext(cmd *cobra.Command, clientCtx Context) error { - v := cmd.Context().Value(ClientContextKey) - if v == nil { - v = &clientCtx + cmdCtx := cmd.Context() + if cmdCtx == nil { + cmdCtx = context.Background() } - clientCtxPtr := v.(*Context) - *clientCtxPtr = clientCtx + v := cmd.Context().Value(ClientContextKey) + if clientCtxPtr, ok := v.(*Context); ok { + *clientCtxPtr = clientCtx + } else { + cmd.SetContext(context.WithValue(cmdCtx, ClientContextKey, &clientCtx)) + } return nil } diff --git a/client/cmd_test.go b/client/cmd_test.go index 81d5719ccfb6..559d31d39f40 100644 --- a/client/cmd_test.go +++ b/client/cmd_test.go @@ -79,11 +79,13 @@ func TestSetCmdClientContextHandler(t *testing.T) { name string expectedContext client.Context args []string + ctx context.Context }{ { "no flags set", initClientCtx, []string{}, + context.WithValue(context.Background(), client.ClientContextKey, &client.Context{}), }, { "flags set", @@ -91,6 +93,7 @@ func TestSetCmdClientContextHandler(t *testing.T) { []string{ fmt.Sprintf("--%s=new-chain-id", flags.FlagChainID), }, + context.WithValue(context.Background(), client.ClientContextKey, &client.Context{}), }, { "flags set with space", @@ -99,6 +102,25 @@ func TestSetCmdClientContextHandler(t *testing.T) { fmt.Sprintf("--%s", flags.FlagHome), "/tmp/dir", }, + context.Background(), + }, + { + "no context provided", + initClientCtx.WithHomeDir("/tmp/noctx"), + []string{ + fmt.Sprintf("--%s", flags.FlagHome), + "/tmp/noctx", + }, + nil, + }, + { + "with invalid client value in the context", + initClientCtx.WithHomeDir("/tmp/invalid"), + []string{ + fmt.Sprintf("--%s", flags.FlagHome), + "/tmp/invalid", + }, + context.WithValue(context.Background(), client.ClientContextKey, "invalid"), }, } @@ -106,13 +128,11 @@ func TestSetCmdClientContextHandler(t *testing.T) { tc := tc t.Run(tc.name, func(t *testing.T) { - ctx := context.WithValue(context.Background(), client.ClientContextKey, &client.Context{}) - cmd := newCmd() _ = testutil.ApplyMockIODiscardOutErr(cmd) cmd.SetArgs(tc.args) - require.NoError(t, cmd.ExecuteContext(ctx)) + require.NoError(t, cmd.ExecuteContext(tc.ctx)) clientCtx := client.GetClientContextFromCmd(cmd) require.Equal(t, tc.expectedContext, clientCtx) diff --git a/client/cometbft.go b/client/cometbft.go index 595ea6492d24..fcf9ca64b08b 100644 --- a/client/cometbft.go +++ b/client/cometbft.go @@ -16,6 +16,7 @@ type CometRPC interface { Status(context.Context) (*coretypes.ResultStatus, error) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error) BlockByHash(ctx context.Context, hash []byte) (*coretypes.ResultBlock, error) + BlockResults(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error) BlockchainInfo(ctx context.Context, minHeight, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) Commit(ctx context.Context, height *int64) (*coretypes.ResultCommit, error) Tx(ctx context.Context, hash []byte, prove bool) (*coretypes.ResultTx, error) diff --git a/client/config/config.go b/client/config/config.go index ffe662cfc87e..e3a2a8646d93 100644 --- a/client/config/config.go +++ b/client/config/config.go @@ -46,13 +46,33 @@ func (c *ClientConfig) SetBroadcastMode(broadcastMode string) { c.BroadcastMode = broadcastMode } +// ReadDefaultValuesFromDefaultClientConfig reads default values from default client.toml file and updates them in client.Context +// The client.toml is then discarded. +func ReadDefaultValuesFromDefaultClientConfig(ctx client.Context) (client.Context, error) { + prevHomeDir := ctx.HomeDir + dir, err := os.MkdirTemp("", "simapp") + if err != nil { + return ctx, fmt.Errorf("couldn't create temp dir: %w", err) + } + defer os.RemoveAll(dir) + + ctx.HomeDir = dir + ctx, err = ReadFromClientConfig(ctx) + if err != nil { + return ctx, fmt.Errorf("couldn't create client config: %w", err) + } + + ctx.HomeDir = prevHomeDir + return ctx, nil +} + // ReadFromClientConfig reads values from client.toml file and updates them in client Context func ReadFromClientConfig(ctx client.Context) (client.Context, error) { configPath := filepath.Join(ctx.HomeDir, "config") configFilePath := filepath.Join(configPath, "client.toml") conf := DefaultConfig() - // when config.toml does not exist create and init with default values + // when client.toml does not exist create and init with default values if _, err := os.Stat(configFilePath); os.IsNotExist(err) { if err := os.MkdirAll(configPath, os.ModePerm); err != nil { return ctx, fmt.Errorf("couldn't make client config: %v", err) @@ -78,7 +98,7 @@ func ReadFromClientConfig(ctx client.Context) (client.Context, error) { keyring, err := client.NewKeyringFromBackend(ctx, conf.KeyringBackend) if err != nil { - return ctx, fmt.Errorf("couldn't get key ring: %v", err) + return ctx, fmt.Errorf("couldn't get keyring: %w", err) } ctx = ctx.WithKeyring(keyring) diff --git a/client/config/config_test.go b/client/config/config_test.go index c5630f22a378..42248b194bf9 100644 --- a/client/config/config_test.go +++ b/client/config/config_test.go @@ -5,14 +5,15 @@ import ( "os" "testing" + "github.com/spf13/cobra" + "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - "github.com/spf13/cobra" - "github.com/stretchr/testify/require" ) const ( diff --git a/client/debug/main.go b/client/debug/main.go index 17dd0ba2a19f..1c02a2257da7 100644 --- a/client/debug/main.go +++ b/client/debug/main.go @@ -16,10 +16,9 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" + legacybech32 "github.com/cosmos/cosmos-sdk/types/bech32/legacybech32" //nolint:staticcheck // we do old keys, they're keys after all. "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/version" - - legacybech32 "github.com/cosmos/cosmos-sdk/types/bech32/legacybech32" //nolint:staticcheck // we do old keys, they're keys after all. ) var ( @@ -35,6 +34,7 @@ func Cmd() *cobra.Command { RunE: client.ValidateCmd, } + cmd.AddCommand(CodecCmd()) cmd.AddCommand(PubkeyCmd()) cmd.AddCommand(PubkeyRawCmd()) cmd.AddCommand(AddrCmd()) @@ -44,6 +44,55 @@ func Cmd() *cobra.Command { return cmd } +// CodecCmd creates and returns a new codec debug cmd. +func CodecCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "codec", + Short: "Tool for helping with debugging your application codec", + RunE: client.ValidateCmd, + } + + cmd.AddCommand(getCodecInterfaces()) + cmd.AddCommand(getCodecInterfaceImpls()) + + return cmd +} + +// getCodecInterfaces creates and returns a new cmd used for listing all registered interfaces on the application codec. +func getCodecInterfaces() *cobra.Command { + return &cobra.Command{ + Use: "list-interfaces", + Short: "List all registered interface type URLs", + Long: "List all registered interface type URLs using the application codec", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + iFaces := clientCtx.Codec.InterfaceRegistry().ListAllInterfaces() + for _, iFace := range iFaces { + cmd.Println(iFace) + } + return nil + }, + } +} + +// getCodecInterfaceImpls creates and returns a new cmd used for listing all registered implemenations of a given interface on the application codec. +func getCodecInterfaceImpls() *cobra.Command { + return &cobra.Command{ + Use: "list-implementations [interface]", + Short: "List the registered type URLs for the provided interface", + Long: "List the registered type URLs that can be used for the provided interface name using the application codec", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + impls := clientCtx.Codec.InterfaceRegistry().ListImplementations(args[0]) + for _, imp := range impls { + cmd.Println(imp) + } + return nil + }, + } +} + // getPubKeyFromString decodes SDK PubKey using JSON marshaler. func getPubKeyFromString(ctx client.Context, pkstr string) (cryptotypes.PubKey, error) { var pk cryptotypes.PubKey @@ -130,11 +179,12 @@ func PubkeyRawCmd() *cobra.Command { cmd := &cobra.Command{ Use: "pubkey-raw [pubkey] -t [{ed25519, secp256k1}]", Short: "Decode a ED25519 or secp256k1 pubkey from hex, base64, or bech32", - Long: fmt.Sprintf(`Decode a pubkey from hex, base64, or bech32. -Example: -$ %s debug pubkey-raw TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlz -$ %s debug pubkey-raw cosmos1e0jnq2sun3dzjh8p2xq95kk0expwmd7shwjpfg - `, version.AppName, version.AppName), + Long: "Decode a pubkey from hex, base64, or bech32.", + Example: fmt.Sprintf(` +%s debug pubkey-raw 8FCA9D6D1F80947FD5E9A05309259746F5F72541121766D5F921339DD061174A +%s debug pubkey-raw j8qdbR+AlH/V6aBTCSWXRvX3JUESF2bV+SEzndBhF0o= +%s debug pubkey-raw cosmospub1zcjduepq3l9f6mglsz28l40f5pfsjfvhgm6lwf2pzgtkd40eyyeem5rpza9q47axrz + `, version.AppName, version.AppName, version.AppName), Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { clientCtx := client.GetClientContextFromCmd(cmd) @@ -204,28 +254,43 @@ $ %s debug addr cosmos1e0jnq2sun3dzjh8p2xq95kk0expwmd7shwjpfg Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { addrString := args[0] - var addr []byte - // try hex, then bech32 - var err error - addr, err = hex.DecodeString(addrString) - if err != nil { - var err2 error - addr, err2 = sdk.AccAddressFromBech32(addrString) - if err2 != nil { - var err3 error - addr, err3 = sdk.ValAddressFromBech32(addrString) - - if err3 != nil { - return fmt.Errorf("expected hex or bech32. Got errors: hex: %v, bech32 acc: %v, bech32 val: %v", err, err2, err3) + var ( + addr []byte + err error + ) + decodeFns := []func(text string) ([]byte, error){ + hex.DecodeString, + func(text string) ([]byte, error) { return sdk.AccAddressFromBech32(text) }, + func(text string) ([]byte, error) { return sdk.ValAddressFromBech32(text) }, + func(text string) ([]byte, error) { return sdk.ConsAddressFromBech32(text) }, + } + errs := make([]any, 0, len(decodeFns)) + for _, fn := range decodeFns { + if addr, err = fn(addrString); err == nil { + break + } + errs = append(errs, err) + } + if len(errs) == len(decodeFns) { + errTags := []string{ + "hex", "bech32 acc", "bech32 val", "bech32 con", + } + format := "" + for i := range errs { + if format != "" { + format += ", " } + format += errTags[i] + ": %w" } + return fmt.Errorf("expected hex or bech32. Got errors: "+format, errs...) } cmd.Println("Address:", addr) cmd.Printf("Address (hex): %X\n", addr) cmd.Printf("Bech32 Acc: %s\n", sdk.AccAddress(addr)) cmd.Printf("Bech32 Val: %s\n", sdk.ValAddress(addr)) + cmd.Printf("Bech32 Con: %s\n", sdk.ConsAddress(addr)) return nil }, } @@ -233,14 +298,11 @@ $ %s debug addr cosmos1e0jnq2sun3dzjh8p2xq95kk0expwmd7shwjpfg func RawBytesCmd() *cobra.Command { return &cobra.Command{ - Use: "raw-bytes [raw-bytes]", - Short: "Convert raw bytes output (eg. [10 21 13 255]) to hex", - Long: fmt.Sprintf(`Convert raw-bytes to hex. - -Example: -$ %s debug raw-bytes [72 101 108 108 111 44 32 112 108 97 121 103 114 111 117 110 100] - `, version.AppName), - Args: cobra.ExactArgs(1), + Use: "raw-bytes ", + Short: "Convert raw bytes output (eg. [10 21 13 255]) to hex", + Long: "Convert raw-bytes to hex.", + Example: fmt.Sprintf("%s debug raw-bytes '[72 101 108 108 111 44 32 112 108 97 121 103 114 111 117 110 100]'", version.AppName), + Args: cobra.ExactArgs(1), RunE: func(_ *cobra.Command, args []string) error { stringBytes := args[0] stringBytes = strings.Trim(stringBytes, "[") diff --git a/client/docs/config.json b/client/docs/config.json index 8c79b4ecd8e7..8d21362345ce 100644 --- a/client/docs/config.json +++ b/client/docs/config.json @@ -30,6 +30,9 @@ } } }, + { + "url": "./tmp-swagger-gen/cosmos/base/node/v1beta1/query.swagger.json" + }, { "url": "./tmp-swagger-gen/cosmos/distribution/v1beta1/query.swagger.json", "operationIds": { @@ -150,6 +153,27 @@ "TallyResult": "GroupTallyResult" } } + }, + { + "url": "./tmp-swagger-gen/cosmos/circuit/v1/query.swagger.json", + "operationIds": { + "rename": { + "Accounts": "CircuitAccounts", + "Account": "CircuitAccount", + "Params": "CircuitParams" + } + } + }, + { + "url": "./tmp-swagger-gen/cosmos/consensus/v1/query.swagger.json", + "operationIds": { + "rename": { + "Params": "ConsensusParams" + } + } + }, + { + "url": "./tmp-swagger-gen/cosmos/app/v1alpha1/query.swagger.json" } ] } \ No newline at end of file diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index 3315b78ff1b1..c38adbb69676 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -3568,6 +3568,170 @@ paths: descending order. + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/bank/v1beta1/denom_owners_by_query: + get: + summary: >- + DenomOwnersByQuery queries for all account addresses that own a + particular token + + denomination. + description: 'Since: cosmos-sdk 0.50.3' + operationId: DenomOwnersByQuery + responses: + '200': + description: A successful response. + schema: + type: object + properties: + denom_owners: + type: array + items: + type: object + properties: + address: + type: string + description: >- + address defines the address that owns a particular + denomination. + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the + custom method + + signatures required by gogoproto. + description: >- + DenomOwner defines structure representing an account that + owns or holds a + + particular denominated token. It contains the account + address and account + + balance of the denominated token. + + + Since: cosmos-sdk 0.46 + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryDenomOwnersByQueryResponse defines the RPC response of a + DenomOwnersByQuery RPC query. + + + Since: cosmos-sdk 0.50.3 + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: denom + description: >- + denom defines the coin denomination to query all account holders + for. + in: query + required: false + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + Since: cosmos-sdk 0.43 in: query required: false @@ -3787,7 +3951,7 @@ paths: - Query /cosmos/bank/v1beta1/denoms_metadata/{denom}: get: - summary: DenomsMetadata queries the client metadata of a given coin denomination. + summary: DenomMetadata queries the client metadata of a given coin denomination. operationId: DenomMetadata responses: '200': @@ -3919,6 +4083,143 @@ paths: type: string tags: - Query + /cosmos/bank/v1beta1/denoms_metadata_by_query_string: + get: + summary: >- + DenomMetadataByQueryString queries the client metadata of a given coin + denomination. + operationId: DenomMetadataByQueryString + responses: + '200': + description: A successful response. + schema: + type: object + properties: + metadata: + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + denom represents the string name of the given denom + unit (e.g uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one + must + + raise the base_denom to in order to equal the given + DenomUnit's denom + + 1 denom = 10^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a + DenomUnit of 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: >- + aliases is a list of string aliases for the given + denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: >- + denom_units represents the list of DenomUnit's for a given + coin + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit + with exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + description: 'Since: cosmos-sdk 0.43' + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges (eg: + ATOM). This can + + be the same as the display. + + + Since: cosmos-sdk 0.43 + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains + additional information. Optional. + + + Since: cosmos-sdk 0.46 + uri_hash: + type: string + description: >- + URIHash is a sha256 hash of a document pointed by URI. + It's used to verify that + + the document didn't change. Optional. + + + Since: cosmos-sdk 0.46 + description: |- + Metadata represents a struct that describes + a basic token. + description: >- + QueryDenomMetadataByQueryStringResponse is the response type for + the Query/DenomMetadata RPC + + method. Identical with QueryDenomMetadataResponse but receives + denom as query string in request. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: denom + description: denom is the coin denom to query the metadata for. + in: query + required: false + type: string + tags: + - Query /cosmos/bank/v1beta1/params: get: summary: Params queries the parameters of x/bank module. @@ -3930,6 +4231,7 @@ paths: type: object properties: params: + description: params provides the parameters of the bank module. type: object properties: send_enabled: @@ -3960,7 +4262,6 @@ paths: compatibility of genesis files. default_send_enabled: type: boolean - description: Params defines the parameters for the bank module. description: >- QueryParamsResponse defines the response type for querying x/bank parameters. @@ -9157,6 +9458,104 @@ paths: type: boolean tags: - Service + /cosmos/base/node/v1beta1/config: + get: + summary: Config queries for the operator configuration. + operationId: Config + responses: + '200': + description: A successful response. + schema: + type: object + properties: + minimum_gas_price: + type: string + pruning_keep_recent: + type: string + pruning_interval: + type: string + halt_height: + type: string + format: uint64 + description: >- + ConfigResponse defines the response structure for the Config gRPC + query. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Service + /cosmos/base/node/v1beta1/status: + get: + summary: Status queries for the node status. + operationId: Status + responses: + '200': + description: A successful response. + schema: + type: object + properties: + earliest_store_height: + type: string + format: uint64 + height: + type: string + format: uint64 + timestamp: + type: string + format: date-time + app_hash: + type: string + format: byte + validator_hash: + type: string + format: byte + description: >- + StateResponse defines the response structure for the status of a + node. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Service /cosmos/distribution/v1beta1/community_pool: get: summary: CommunityPool queries the community pool coins. @@ -12465,8 +12864,8 @@ paths: /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}: get: summary: >- - Deposit queries single deposit information based proposalID, - depositAddr. + Deposit queries single deposit information based on proposalID, + depositor address. operationId: Deposit responses: '200': @@ -14004,6 +14403,19 @@ paths: burn_vote_veto: type: boolean title: burn deposits if quorum with vote type no_veto is met + min_deposit_ratio: + type: string + description: >- + The ratio representing the proportion of the deposit value + minimum that must be met when making a deposit. + + Default value: 0.01. Meaning that for a chain with a + min_deposit of 100stake, a deposit of 1stake would be + + required. + + + Since: cosmos-sdk 0.50 description: >- QueryParamsResponse is the response type for the Query/Params RPC method. @@ -14502,6 +14914,7 @@ paths: the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/gov#proposal-3 title: type: string @@ -14519,6 +14932,10 @@ paths: type: boolean description: 'Since: cosmos-sdk 0.50' title: expedited defines if the proposal is expedited + failed_reason: + type: string + description: 'Since: cosmos-sdk 0.50' + title: failed_reason defines the reason why the proposal failed description: >- Proposal defines the core field members of a governance proposal. @@ -15122,6 +15539,7 @@ paths: the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/gov#proposal-3 title: type: string @@ -15139,6 +15557,10 @@ paths: type: boolean description: 'Since: cosmos-sdk 0.50' title: expedited defines if the proposal is expedited + failed_reason: + type: string + description: 'Since: cosmos-sdk 0.50' + title: failed_reason defines the reason why the proposal failed description: >- Proposal defines the core field members of a governance proposal. @@ -15681,7 +16103,7 @@ paths: /cosmos/gov/v1/proposals/{proposal_id}/deposits/{depositor}: get: summary: >- - Deposit queries single deposit information based proposalID, + Deposit queries single deposit information based on proposalID, depositAddr. operationId: GovV1Deposit responses: @@ -16223,8 +16645,7 @@ paths: metadata: type: string title: >- - metadata is any arbitrary metadata to attached to the - vote. + metadata is any arbitrary metadata attached to the vote. the recommended format of the metadata is to be found here: @@ -16565,8 +16986,7 @@ paths: metadata: type: string title: >- - metadata is any arbitrary metadata to attached to the - vote. + metadata is any arbitrary metadata attached to the vote. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#vote-5 @@ -17420,13 +17840,13 @@ paths: delegator_address: type: string description: >- - delegator_address is the bech32-encoded address of - the delegator. + delegator_address is the encoded address of the + delegator. validator_address: type: string description: >- - validator_address is the bech32-encoded address of - the validator. + validator_address is the encoded address of the + validator. shares: type: string description: shares define the delegation shares received. @@ -18213,12 +18633,12 @@ paths: delegator_address: type: string description: >- - delegator_address is the bech32-encoded address of the + delegator_address is the encoded address of the delegator. validator_address: type: string description: >- - validator_address is the bech32-encoded address of the + validator_address is the encoded address of the validator. entries: type: array @@ -22023,13 +22443,13 @@ paths: delegator_address: type: string description: >- - delegator_address is the bech32-encoded address of - the delegator. + delegator_address is the encoded address of the + delegator. validator_address: type: string description: >- - validator_address is the bech32-encoded address of - the validator. + validator_address is the encoded address of the + validator. shares: type: string description: shares define the delegation shares received. @@ -22361,12 +22781,12 @@ paths: delegator_address: type: string description: >- - delegator_address is the bech32-encoded address of the + delegator_address is the encoded address of the delegator. validator_address: type: string description: >- - validator_address is the bech32-encoded address of the + validator_address is the encoded address of the validator. shares: type: string @@ -22627,14 +23047,10 @@ paths: properties: delegator_address: type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. + description: delegator_address is the encoded address of the delegator. validator_address: type: string - description: >- - validator_address is the bech32-encoded address of the - validator. + description: validator_address is the encoded address of the validator. entries: type: array items: @@ -22916,12 +23332,12 @@ paths: delegator_address: type: string description: >- - delegator_address is the bech32-encoded address of the + delegator_address is the encoded address of the delegator. validator_address: type: string description: >- - validator_address is the bech32-encoded address of the + validator_address is the encoded address of the validator. entries: type: array @@ -28847,7 +29263,7 @@ paths: - Query /cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}: get: - summary: Allowance returns fee granted to the grantee by the granter. + summary: Allowance returns granted allwance to the grantee by the granter. operationId: Allowance responses: '200': @@ -29158,7 +29574,7 @@ paths: - Query /cosmos/feegrant/v1beta1/allowances/{grantee}: get: - summary: Allowances returns all the grants for address. + summary: Allowances returns all the grants for the given grantee address. operationId: Allowances responses: '200': @@ -33070,6 +33486,7 @@ paths: the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 version: type: string @@ -33586,6 +34003,7 @@ paths: the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 version: type: string @@ -34103,6 +34521,7 @@ paths: the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 version: type: string @@ -35551,6 +35970,7 @@ paths: the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/group#proposal-4 proposers: type: array @@ -36324,6 +36744,7 @@ paths: the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/group#proposal-4 proposers: type: array @@ -37823,6 +38244,425 @@ paths: type: boolean tags: - Query + /cosmos/circuit/v1/accounts: + get: + summary: Account returns account permissions. + operationId: CircuitAccounts + responses: + '200': + description: A successful response. + schema: + type: object + properties: + accounts: + type: array + items: + type: object + properties: + address: + type: string + permissions: + type: object + properties: + level: + description: >- + level is the level of permissions granted to this + account. + type: string + enum: + - LEVEL_NONE_UNSPECIFIED + - LEVEL_SOME_MSGS + - LEVEL_ALL_MSGS + - LEVEL_SUPER_ADMIN + default: LEVEL_NONE_UNSPECIFIED + limit_type_urls: + type: array + items: + type: string + description: >- + limit_type_urls is used with LEVEL_SOME_MSGS to + limit the lists of Msg type + + URLs that the account can trip. It is an error to + use limit_type_urls with + + a level other than LEVEL_SOME_MSGS. + description: >- + Permissions are the permissions that an account has to + trip + + or reset the circuit breaker. + title: >- + GenesisAccountPermissions is the account permissions for the + circuit breaker in genesis + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + AccountsResponse is the response type for the Query/Accounts RPC + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/circuit/v1/accounts/{address}: + get: + summary: Account returns account permissions. + operationId: CircuitAccount + responses: + '200': + description: A successful response. + schema: + type: object + properties: + permission: + type: object + properties: + level: + description: level is the level of permissions granted to this account. + type: string + enum: + - LEVEL_NONE_UNSPECIFIED + - LEVEL_SOME_MSGS + - LEVEL_ALL_MSGS + - LEVEL_SUPER_ADMIN + default: LEVEL_NONE_UNSPECIFIED + limit_type_urls: + type: array + items: + type: string + description: >- + limit_type_urls is used with LEVEL_SOME_MSGS to limit the + lists of Msg type + + URLs that the account can trip. It is an error to use + limit_type_urls with + + a level other than LEVEL_SOME_MSGS. + description: |- + Permissions are the permissions that an account has to trip + or reset the circuit breaker. + description: >- + AccountResponse is the response type for the Query/Account RPC + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: address + in: path + required: true + type: string + tags: + - Query + /cosmos/circuit/v1/disable_list: + get: + summary: DisabledList returns a list of disabled message urls + operationId: DisabledList + responses: + '200': + description: A successful response. + schema: + type: object + properties: + disabled_list: + type: array + items: + type: string + description: >- + DisabledListResponse is the response type for the + Query/DisabledList RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /cosmos/consensus/v1/params: + get: + summary: Params queries the parameters of x/consensus module. + operationId: ConsensusParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: >- + params are the tendermint consensus params stored in the + consensus module. + + Please note that `params.version` is not populated in this + response, it is + + tracked separately in the x/upgrade module. + type: object + properties: + block: + type: object + properties: + max_bytes: + type: string + format: int64 + title: |- + Max block size, in bytes. + Note: must be greater than 0 + max_gas: + type: string + format: int64 + title: |- + Max gas per block. + Note: must be greater or equal to -1 + description: BlockParams contains limits on the block size. + evidence: + type: object + properties: + max_age_num_blocks: + type: string + format: int64 + description: >- + Max age of evidence, in blocks. + + + The basic formula for calculating this is: + MaxAgeDuration / {average block + + time}. + max_age_duration: + type: string + description: >- + Max age of evidence, in time. + + + It should correspond with an app's "unbonding period" + or other similar + + mechanism for handling [Nothing-At-Stake + + attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). + max_bytes: + type: string + format: int64 + title: >- + This sets the maximum size of total evidence in bytes + that can be committed in a single block. + + and should fall comfortably under the max block bytes. + + Default is 1048576 or 1MB + description: >- + EvidenceParams determine how we handle evidence of + malfeasance. + validator: + type: object + properties: + pub_key_types: + type: array + items: + type: string + description: >- + ValidatorParams restrict the public key types validators + can use. + + NOTE: uses ABCI pubkey naming, not Amino names. + version: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + abci: + type: object + properties: + vote_extensions_enable_height: + type: string + format: int64 + description: >- + vote_extensions_enable_height configures the first + height during which + + vote extensions will be enabled. During this specified + height, and for all + + subsequent heights, precommit messages that do not + contain valid extension data + + will be considered invalid. Prior to this height, vote + extensions will not + + be used or accepted by validators on the network. + + + Once enabled, vote extensions will be created by the + application in ExtendVote, + + passed to the application for validation in + VerifyVoteExtension and given + + to the application to use when proposing a block + during PrepareProposal. + description: >- + ABCIParams configure functionality specific to the + Application Blockchain Interface. + description: >- + QueryParamsResponse defines the response type for querying + x/consensus parameters. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query definitions: cosmos.auth.v1beta1.AddressBytesToStringResponse: type: object @@ -39639,6 +40479,99 @@ definitions: description: >- QueryBalanceResponse is the response type for the Query/Balance RPC method. + cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse: + type: object + properties: + metadata: + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + denom represents the string name of the given denom unit + (e.g uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one must + + raise the base_denom to in order to equal the given + DenomUnit's denom + + 1 denom = 10^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a DenomUnit + of 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit with + exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + description: 'Since: cosmos-sdk 0.43' + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges (eg: ATOM). + This can + + be the same as the display. + + + Since: cosmos-sdk 0.43 + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains additional + information. Optional. + + + Since: cosmos-sdk 0.46 + uri_hash: + type: string + description: >- + URIHash is a sha256 hash of a document pointed by URI. It's used + to verify that + + the document didn't change. Optional. + + + Since: cosmos-sdk 0.46 + description: |- + Metadata represents a struct that describes + a basic token. + description: >- + QueryDenomMetadataByQueryStringResponse is the response type for the + Query/DenomMetadata RPC + + method. Identical with QueryDenomMetadataResponse but receives denom as + query string in request. cosmos.bank.v1beta1.QueryDenomMetadataResponse: type: object properties: @@ -39731,6 +40664,68 @@ definitions: Query/DenomMetadata RPC method. + cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse: + type: object + properties: + denom_owners: + type: array + items: + type: object + properties: + address: + type: string + description: address defines the address that owns a particular denomination. + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: >- + DenomOwner defines structure representing an account that owns or + holds a + + particular denominated token. It contains the account address and + account + + balance of the denominated token. + + + Since: cosmos-sdk 0.46 + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryDenomOwnersByQueryResponse defines the RPC response of a + DenomOwnersByQuery RPC query. + + + Since: cosmos-sdk 0.50.3 cosmos.bank.v1beta1.QueryDenomOwnersResponse: type: object properties: @@ -39913,6 +40908,7 @@ definitions: type: object properties: params: + description: params provides the parameters of the bank module. type: object properties: send_enabled: @@ -39943,7 +40939,6 @@ definitions: compatibility of genesis files. default_send_enabled: type: boolean - description: Params defines the parameters for the bank module. description: >- QueryParamsResponse defines the response type for querying x/bank parameters. @@ -46593,6 +47588,38 @@ definitions: application's state transition machine. + cosmos.base.node.v1beta1.ConfigResponse: + type: object + properties: + minimum_gas_price: + type: string + pruning_keep_recent: + type: string + pruning_interval: + type: string + halt_height: + type: string + format: uint64 + description: ConfigResponse defines the response structure for the Config gRPC query. + cosmos.base.node.v1beta1.StatusResponse: + type: object + properties: + earliest_store_height: + type: string + format: uint64 + height: + type: string + format: uint64 + timestamp: + type: string + format: date-time + app_hash: + type: string + format: byte + validator_hash: + type: string + format: byte + description: StateResponse defines the response structure for the status of a node. cosmos.base.v1beta1.DecCoin: type: object properties: @@ -48827,6 +49854,19 @@ definitions: burn_vote_veto: type: boolean title: burn deposits if quorum with vote type no_veto is met + min_deposit_ratio: + type: string + description: >- + The ratio representing the proportion of the deposit value minimum + that must be met when making a deposit. + + Default value: 0.01. Meaning that for a chain with a min_deposit of + 100stake, a deposit of 1stake would be + + required. + + + Since: cosmos-sdk 0.50 description: |- Params defines the parameters for the x/gov module. @@ -49075,9 +50115,8 @@ definitions: description: voting_end_time is the end time of voting on a proposal. metadata: type: string - title: >- + title: |- metadata is any arbitrary metadata attached to the proposal. - the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#proposal-3 title: @@ -49096,6 +50135,10 @@ definitions: type: boolean description: 'Since: cosmos-sdk 0.50' title: expedited defines if the proposal is expedited + failed_reason: + type: string + description: 'Since: cosmos-sdk 0.50' + title: failed_reason defines the reason why the proposal failed description: Proposal defines the core field members of a governance proposal. cosmos.gov.v1.ProposalStatus: type: string @@ -49412,6 +50455,19 @@ definitions: burn_vote_veto: type: boolean title: burn deposits if quorum with vote type no_veto is met + min_deposit_ratio: + type: string + description: >- + The ratio representing the proportion of the deposit value minimum + that must be met when making a deposit. + + Default value: 0.01. Meaning that for a chain with a min_deposit + of 100stake, a deposit of 1stake would be + + required. + + + Since: cosmos-sdk 0.50 description: QueryParamsResponse is the response type for the Query/Params RPC method. cosmos.gov.v1.QueryProposalResponse: type: object @@ -49673,9 +50729,8 @@ definitions: description: voting_end_time is the end time of voting on a proposal. metadata: type: string - title: >- + title: |- metadata is any arbitrary metadata attached to the proposal. - the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#proposal-3 title: @@ -49694,6 +50749,10 @@ definitions: type: boolean description: 'Since: cosmos-sdk 0.50' title: expedited defines if the proposal is expedited + failed_reason: + type: string + description: 'Since: cosmos-sdk 0.50' + title: failed_reason defines the reason why the proposal failed description: Proposal defines the core field members of a governance proposal. description: >- QueryProposalResponse is the response type for the Query/Proposal RPC @@ -49963,9 +51022,8 @@ definitions: description: voting_end_time is the end time of voting on a proposal. metadata: type: string - title: >- + title: |- metadata is any arbitrary metadata attached to the proposal. - the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#proposal-3 title: @@ -49984,6 +51042,10 @@ definitions: type: boolean description: 'Since: cosmos-sdk 0.50' title: expedited defines if the proposal is expedited + failed_reason: + type: string + description: 'Since: cosmos-sdk 0.50' + title: failed_reason defines the reason why the proposal failed description: Proposal defines the core field members of a governance proposal. description: proposals defines all the requested governance proposals. pagination: @@ -50070,7 +51132,7 @@ definitions: metadata: type: string title: >- - metadata is any arbitrary metadata to attached to the vote. + metadata is any arbitrary metadata attached to the vote. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#vote-5 @@ -50118,7 +51180,7 @@ definitions: metadata: type: string title: >- - metadata is any arbitrary metadata to attached to the vote. + metadata is any arbitrary metadata attached to the vote. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#vote-5 @@ -50216,7 +51278,7 @@ definitions: metadata: type: string title: >- - metadata is any arbitrary metadata to attached to the vote. + metadata is any arbitrary metadata attached to the vote. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#vote-5 @@ -50705,10 +51767,10 @@ definitions: properties: delegator_address: type: string - description: delegator_address is the bech32-encoded address of the delegator. + description: delegator_address is the encoded address of the delegator. validator_address: type: string - description: validator_address is the bech32-encoded address of the validator. + description: validator_address is the encoded address of the validator. shares: type: string description: shares define the delegation shares received. @@ -50724,10 +51786,10 @@ definitions: properties: delegator_address: type: string - description: delegator_address is the bech32-encoded address of the delegator. + description: delegator_address is the encoded address of the delegator. validator_address: type: string - description: validator_address is the bech32-encoded address of the validator. + description: validator_address is the encoded address of the validator. shares: type: string description: shares define the delegation shares received. @@ -51226,14 +52288,10 @@ definitions: properties: delegator_address: type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. + description: delegator_address is the encoded address of the delegator. validator_address: type: string - description: >- - validator_address is the bech32-encoded address of the - validator. + description: validator_address is the encoded address of the validator. shares: type: string description: shares define the delegation shares received. @@ -51282,14 +52340,10 @@ definitions: properties: delegator_address: type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. + description: delegator_address is the encoded address of the delegator. validator_address: type: string - description: >- - validator_address is the bech32-encoded address of the - validator. + description: validator_address is the encoded address of the validator. shares: type: string description: shares define the delegation shares received. @@ -51355,14 +52409,10 @@ definitions: properties: delegator_address: type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. + description: delegator_address is the encoded address of the delegator. validator_address: type: string - description: >- - validator_address is the bech32-encoded address of the - validator. + description: validator_address is the encoded address of the validator. entries: type: array items: @@ -52704,10 +53754,10 @@ definitions: properties: delegator_address: type: string - description: delegator_address is the bech32-encoded address of the delegator. + description: delegator_address is the encoded address of the delegator. validator_address: type: string - description: validator_address is the bech32-encoded address of the validator. + description: validator_address is the encoded address of the validator. entries: type: array items: @@ -52764,14 +53814,10 @@ definitions: properties: delegator_address: type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. + description: delegator_address is the encoded address of the delegator. validator_address: type: string - description: >- - validator_address is the bech32-encoded address of the - validator. + description: validator_address is the encoded address of the validator. shares: type: string description: shares define the delegation shares received. @@ -53147,14 +54193,10 @@ definitions: properties: delegator_address: type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. + description: delegator_address is the encoded address of the delegator. validator_address: type: string - description: >- - validator_address is the bech32-encoded address of the - validator. + description: validator_address is the encoded address of the validator. entries: type: array items: @@ -53831,10 +54873,10 @@ definitions: properties: delegator_address: type: string - description: delegator_address is the bech32-encoded address of the delegator. + description: delegator_address is the encoded address of the delegator. validator_address: type: string - description: validator_address is the bech32-encoded address of the validator. + description: validator_address is the encoded address of the validator. entries: type: array items: @@ -54853,13 +55895,12 @@ definitions: verified with raw bytes from Tx. - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some human-readable textual representation on top of the binary representation - from SIGN_MODE_DIRECT. It is currently experimental, and should be used - for testing purposes only, until Textual is fully released. Please follow - the tracking issue https://github.com/cosmos/cosmos-sdk/issues/11970. + from SIGN_MODE_DIRECT. + + Since: cosmos-sdk 0.50 - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not - require signers signing over other signers' `signer_info`. It also allows - for adding Tips in transactions. + require signers signing over other signers' `signer_info`. Since: cosmos-sdk 0.46 - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses @@ -56751,22 +57792,15 @@ definitions: human-readable textual representation on top of the binary representation - from SIGN_MODE_DIRECT. It is currently experimental, and should be - used + from SIGN_MODE_DIRECT. - for testing purposes only, until Textual is fully released. Please - follow - the tracking issue - https://github.com/cosmos/cosmos-sdk/issues/11970. + Since: cosmos-sdk 0.50 - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not - require signers signing over other signers' `signer_info`. It also - allows - - for adding Tips in transactions. + require signers signing over other signers' `signer_info`. Since: cosmos-sdk 0.46 @@ -56862,21 +57896,15 @@ definitions: human-readable textual representation on top of the binary representation - from SIGN_MODE_DIRECT. It is currently experimental, and should be - used + from SIGN_MODE_DIRECT. - for testing purposes only, until Textual is fully released. Please - follow - the tracking issue https://github.com/cosmos/cosmos-sdk/issues/11970. + Since: cosmos-sdk 0.50 - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not - require signers signing over other signers' `signer_info`. It also - allows - - for adding Tips in transactions. + require signers signing over other signers' `signer_info`. Since: cosmos-sdk 0.46 @@ -61916,9 +62944,8 @@ definitions: description: admin is the account address of the group admin. metadata: type: string - title: >- + title: |- metadata is any arbitrary metadata attached to the group policy. - the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 version: @@ -62131,9 +63158,8 @@ definitions: description: group_policy_address is the account address of group policy. metadata: type: string - title: >- + title: |- metadata is any arbitrary metadata attached to the proposal. - the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#proposal-4 proposers: @@ -62577,6 +63603,7 @@ definitions: metadata is any arbitrary metadata attached to the group policy. the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 version: type: string @@ -62816,6 +63843,7 @@ definitions: metadata is any arbitrary metadata attached to the group policy. the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 version: type: string @@ -63051,9 +64079,8 @@ definitions: description: admin is the account address of the group admin. metadata: type: string - title: >- + title: |- metadata is any arbitrary metadata attached to the group policy. - the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 version: @@ -63466,9 +64493,8 @@ definitions: description: group_policy_address is the account address of group policy. metadata: type: string - title: >- + title: |- metadata is any arbitrary metadata attached to the proposal. - the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#proposal-4 proposers: @@ -63774,9 +64800,8 @@ definitions: description: group_policy_address is the account address of group policy. metadata: type: string - title: >- + title: |- metadata is any arbitrary metadata attached to the proposal. - the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#proposal-4 proposers: @@ -64342,3 +65367,1003 @@ definitions: - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + cosmos.circuit.v1.AccountResponse: + type: object + properties: + permission: + type: object + properties: + level: + description: level is the level of permissions granted to this account. + type: string + enum: + - LEVEL_NONE_UNSPECIFIED + - LEVEL_SOME_MSGS + - LEVEL_ALL_MSGS + - LEVEL_SUPER_ADMIN + default: LEVEL_NONE_UNSPECIFIED + limit_type_urls: + type: array + items: + type: string + description: >- + limit_type_urls is used with LEVEL_SOME_MSGS to limit the lists of + Msg type + + URLs that the account can trip. It is an error to use + limit_type_urls with + + a level other than LEVEL_SOME_MSGS. + description: |- + Permissions are the permissions that an account has to trip + or reset the circuit breaker. + description: AccountResponse is the response type for the Query/Account RPC method. + cosmos.circuit.v1.AccountsResponse: + type: object + properties: + accounts: + type: array + items: + type: object + properties: + address: + type: string + permissions: + type: object + properties: + level: + description: level is the level of permissions granted to this account. + type: string + enum: + - LEVEL_NONE_UNSPECIFIED + - LEVEL_SOME_MSGS + - LEVEL_ALL_MSGS + - LEVEL_SUPER_ADMIN + default: LEVEL_NONE_UNSPECIFIED + limit_type_urls: + type: array + items: + type: string + description: >- + limit_type_urls is used with LEVEL_SOME_MSGS to limit the + lists of Msg type + + URLs that the account can trip. It is an error to use + limit_type_urls with + + a level other than LEVEL_SOME_MSGS. + description: |- + Permissions are the permissions that an account has to trip + or reset the circuit breaker. + title: >- + GenesisAccountPermissions is the account permissions for the circuit + breaker in genesis + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: AccountsResponse is the response type for the Query/Accounts RPC method. + cosmos.circuit.v1.DisabledListResponse: + type: object + properties: + disabled_list: + type: array + items: + type: string + description: >- + DisabledListResponse is the response type for the Query/DisabledList RPC + method. + cosmos.circuit.v1.GenesisAccountPermissions: + type: object + properties: + address: + type: string + permissions: + type: object + properties: + level: + description: level is the level of permissions granted to this account. + type: string + enum: + - LEVEL_NONE_UNSPECIFIED + - LEVEL_SOME_MSGS + - LEVEL_ALL_MSGS + - LEVEL_SUPER_ADMIN + default: LEVEL_NONE_UNSPECIFIED + limit_type_urls: + type: array + items: + type: string + description: >- + limit_type_urls is used with LEVEL_SOME_MSGS to limit the lists of + Msg type + + URLs that the account can trip. It is an error to use + limit_type_urls with + + a level other than LEVEL_SOME_MSGS. + description: |- + Permissions are the permissions that an account has to trip + or reset the circuit breaker. + title: >- + GenesisAccountPermissions is the account permissions for the circuit + breaker in genesis + cosmos.circuit.v1.Permissions: + type: object + properties: + level: + description: level is the level of permissions granted to this account. + type: string + enum: + - LEVEL_NONE_UNSPECIFIED + - LEVEL_SOME_MSGS + - LEVEL_ALL_MSGS + - LEVEL_SUPER_ADMIN + default: LEVEL_NONE_UNSPECIFIED + limit_type_urls: + type: array + items: + type: string + description: >- + limit_type_urls is used with LEVEL_SOME_MSGS to limit the lists of Msg + type + + URLs that the account can trip. It is an error to use limit_type_urls + with + + a level other than LEVEL_SOME_MSGS. + description: |- + Permissions are the permissions that an account has to trip + or reset the circuit breaker. + cosmos.circuit.v1.Permissions.Level: + type: string + enum: + - LEVEL_NONE_UNSPECIFIED + - LEVEL_SOME_MSGS + - LEVEL_ALL_MSGS + - LEVEL_SUPER_ADMIN + default: LEVEL_NONE_UNSPECIFIED + description: |- + Level is the permission level. + + - LEVEL_NONE_UNSPECIFIED: LEVEL_NONE_UNSPECIFIED indicates that the account will have no circuit + breaker permissions. + - LEVEL_SOME_MSGS: LEVEL_SOME_MSGS indicates that the account will have permission to + trip or reset the circuit breaker for some Msg type URLs. If this level + is chosen, a non-empty list of Msg type URLs must be provided in + limit_type_urls. + - LEVEL_ALL_MSGS: LEVEL_ALL_MSGS indicates that the account can trip or reset the circuit + breaker for Msg's of all type URLs. + - LEVEL_SUPER_ADMIN: LEVEL_SUPER_ADMIN indicates that the account can take all circuit breaker + actions and can grant permissions to other accounts. + cosmos.consensus.v1.QueryParamsResponse: + type: object + properties: + params: + description: >- + params are the tendermint consensus params stored in the consensus + module. + + Please note that `params.version` is not populated in this response, + it is + + tracked separately in the x/upgrade module. + type: object + properties: + block: + type: object + properties: + max_bytes: + type: string + format: int64 + title: |- + Max block size, in bytes. + Note: must be greater than 0 + max_gas: + type: string + format: int64 + title: |- + Max gas per block. + Note: must be greater or equal to -1 + description: BlockParams contains limits on the block size. + evidence: + type: object + properties: + max_age_num_blocks: + type: string + format: int64 + description: >- + Max age of evidence, in blocks. + + + The basic formula for calculating this is: MaxAgeDuration / + {average block + + time}. + max_age_duration: + type: string + description: >- + Max age of evidence, in time. + + + It should correspond with an app's "unbonding period" or other + similar + + mechanism for handling [Nothing-At-Stake + + attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). + max_bytes: + type: string + format: int64 + title: >- + This sets the maximum size of total evidence in bytes that can + be committed in a single block. + + and should fall comfortably under the max block bytes. + + Default is 1048576 or 1MB + description: EvidenceParams determine how we handle evidence of malfeasance. + validator: + type: object + properties: + pub_key_types: + type: array + items: + type: string + description: |- + ValidatorParams restrict the public key types validators can use. + NOTE: uses ABCI pubkey naming, not Amino names. + version: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + abci: + type: object + properties: + vote_extensions_enable_height: + type: string + format: int64 + description: >- + vote_extensions_enable_height configures the first height + during which + + vote extensions will be enabled. During this specified height, + and for all + + subsequent heights, precommit messages that do not contain + valid extension data + + will be considered invalid. Prior to this height, vote + extensions will not + + be used or accepted by validators on the network. + + + Once enabled, vote extensions will be created by the + application in ExtendVote, + + passed to the application for validation in + VerifyVoteExtension and given + + to the application to use when proposing a block during + PrepareProposal. + description: >- + ABCIParams configure functionality specific to the Application + Blockchain Interface. + description: >- + QueryParamsResponse defines the response type for querying x/consensus + parameters. + tendermint.types.ABCIParams: + type: object + properties: + vote_extensions_enable_height: + type: string + format: int64 + description: >- + vote_extensions_enable_height configures the first height during which + + vote extensions will be enabled. During this specified height, and for + all + + subsequent heights, precommit messages that do not contain valid + extension data + + will be considered invalid. Prior to this height, vote extensions will + not + + be used or accepted by validators on the network. + + + Once enabled, vote extensions will be created by the application in + ExtendVote, + + passed to the application for validation in VerifyVoteExtension and + given + + to the application to use when proposing a block during + PrepareProposal. + description: >- + ABCIParams configure functionality specific to the Application Blockchain + Interface. + tendermint.types.BlockParams: + type: object + properties: + max_bytes: + type: string + format: int64 + title: |- + Max block size, in bytes. + Note: must be greater than 0 + max_gas: + type: string + format: int64 + title: |- + Max gas per block. + Note: must be greater or equal to -1 + description: BlockParams contains limits on the block size. + tendermint.types.ConsensusParams: + type: object + properties: + block: + type: object + properties: + max_bytes: + type: string + format: int64 + title: |- + Max block size, in bytes. + Note: must be greater than 0 + max_gas: + type: string + format: int64 + title: |- + Max gas per block. + Note: must be greater or equal to -1 + description: BlockParams contains limits on the block size. + evidence: + type: object + properties: + max_age_num_blocks: + type: string + format: int64 + description: >- + Max age of evidence, in blocks. + + + The basic formula for calculating this is: MaxAgeDuration / + {average block + + time}. + max_age_duration: + type: string + description: >- + Max age of evidence, in time. + + + It should correspond with an app's "unbonding period" or other + similar + + mechanism for handling [Nothing-At-Stake + + attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). + max_bytes: + type: string + format: int64 + title: >- + This sets the maximum size of total evidence in bytes that can be + committed in a single block. + + and should fall comfortably under the max block bytes. + + Default is 1048576 or 1MB + description: EvidenceParams determine how we handle evidence of malfeasance. + validator: + type: object + properties: + pub_key_types: + type: array + items: + type: string + description: |- + ValidatorParams restrict the public key types validators can use. + NOTE: uses ABCI pubkey naming, not Amino names. + version: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + abci: + type: object + properties: + vote_extensions_enable_height: + type: string + format: int64 + description: >- + vote_extensions_enable_height configures the first height during + which + + vote extensions will be enabled. During this specified height, and + for all + + subsequent heights, precommit messages that do not contain valid + extension data + + will be considered invalid. Prior to this height, vote extensions + will not + + be used or accepted by validators on the network. + + + Once enabled, vote extensions will be created by the application + in ExtendVote, + + passed to the application for validation in VerifyVoteExtension + and given + + to the application to use when proposing a block during + PrepareProposal. + description: >- + ABCIParams configure functionality specific to the Application + Blockchain Interface. + description: |- + ConsensusParams contains consensus critical parameters that determine the + validity of blocks. + tendermint.types.EvidenceParams: + type: object + properties: + max_age_num_blocks: + type: string + format: int64 + description: >- + Max age of evidence, in blocks. + + + The basic formula for calculating this is: MaxAgeDuration / {average + block + + time}. + max_age_duration: + type: string + description: >- + Max age of evidence, in time. + + + It should correspond with an app's "unbonding period" or other similar + + mechanism for handling [Nothing-At-Stake + + attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). + max_bytes: + type: string + format: int64 + title: >- + This sets the maximum size of total evidence in bytes that can be + committed in a single block. + + and should fall comfortably under the max block bytes. + + Default is 1048576 or 1MB + description: EvidenceParams determine how we handle evidence of malfeasance. + tendermint.types.ValidatorParams: + type: object + properties: + pub_key_types: + type: array + items: + type: string + description: |- + ValidatorParams restrict the public key types validators can use. + NOTE: uses ABCI pubkey naming, not Amino names. + tendermint.types.VersionParams: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + cosmos.app.v1alpha1.Config: + type: object + properties: + modules: + type: array + items: + type: object + properties: + name: + type: string + description: >- + name is the unique name of the module within the app. It should + be a name + + that persists between different versions of a module so that + modules + + can be smoothly upgraded to new versions. + + + For example, for the module cosmos.bank.module.v1.Module, we may + chose + + to simply name the module "bank" in the app. When we upgrade to + + cosmos.bank.module.v2.Module, the app-specific name "bank" stays + the same + + and the framework knows that the v2 module should receive all + the same state + + that the v1 module had. Note: modules should provide info on + which versions + + they can migrate from in the ModuleDescriptor.can_migration_from + field. + config: + description: >- + config is the config object for the module. Module config + messages should + + define a ModuleDescriptor using the + cosmos.app.v1alpha1.is_module extension. + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + golang_bindings: + type: array + items: + type: object + properties: + interface_type: + type: string + title: >- + interface_type is the interface type which will be bound + to a specific implementation type + implementation: + type: string + title: >- + implementation is the implementing type which will be + supplied when an input of type interface is requested + description: >- + GolangBinding is an explicit interface type to implementing + type binding for dependency injection. + description: >- + golang_bindings specifies explicit interface to implementation + type bindings which + + depinject uses to resolve interface inputs to provider + functions. The scope of this + + field's configuration is module specific. + description: ModuleConfig is a module configuration for an app. + description: modules are the module configurations for the app. + golang_bindings: + type: array + items: + type: object + properties: + interface_type: + type: string + title: >- + interface_type is the interface type which will be bound to a + specific implementation type + implementation: + type: string + title: >- + implementation is the implementing type which will be supplied + when an input of type interface is requested + description: >- + GolangBinding is an explicit interface type to implementing type + binding for dependency injection. + description: >- + golang_bindings specifies explicit interface to implementation type + bindings which + + depinject uses to resolve interface inputs to provider functions. The + scope of this + + field's configuration is global (not module specific). + description: >- + Config represents the configuration for a Cosmos SDK ABCI app. + + It is intended that all state machine logic including the version of + + baseapp and tx handlers (and possibly even Tendermint) that an app needs + + can be described in a config object. For compatibility, the framework + should + + allow a mixture of declarative and imperative app wiring, however, apps + + that strive for the maximum ease of maintainability should be able to + describe + + their state machine with a config object alone. + cosmos.app.v1alpha1.GolangBinding: + type: object + properties: + interface_type: + type: string + title: >- + interface_type is the interface type which will be bound to a specific + implementation type + implementation: + type: string + title: >- + implementation is the implementing type which will be supplied when an + input of type interface is requested + description: >- + GolangBinding is an explicit interface type to implementing type binding + for dependency injection. + cosmos.app.v1alpha1.ModuleConfig: + type: object + properties: + name: + type: string + description: >- + name is the unique name of the module within the app. It should be a + name + + that persists between different versions of a module so that modules + + can be smoothly upgraded to new versions. + + + For example, for the module cosmos.bank.module.v1.Module, we may chose + + to simply name the module "bank" in the app. When we upgrade to + + cosmos.bank.module.v2.Module, the app-specific name "bank" stays the + same + + and the framework knows that the v2 module should receive all the same + state + + that the v1 module had. Note: modules should provide info on which + versions + + they can migrate from in the ModuleDescriptor.can_migration_from + field. + config: + description: >- + config is the config object for the module. Module config messages + should + + define a ModuleDescriptor using the cosmos.app.v1alpha1.is_module + extension. + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + golang_bindings: + type: array + items: + type: object + properties: + interface_type: + type: string + title: >- + interface_type is the interface type which will be bound to a + specific implementation type + implementation: + type: string + title: >- + implementation is the implementing type which will be supplied + when an input of type interface is requested + description: >- + GolangBinding is an explicit interface type to implementing type + binding for dependency injection. + description: >- + golang_bindings specifies explicit interface to implementation type + bindings which + + depinject uses to resolve interface inputs to provider functions. The + scope of this + + field's configuration is module specific. + description: ModuleConfig is a module configuration for an app. + cosmos.app.v1alpha1.QueryConfigResponse: + type: object + properties: + config: + description: config is the current app config. + type: object + properties: + modules: + type: array + items: + type: object + properties: + name: + type: string + description: >- + name is the unique name of the module within the app. It + should be a name + + that persists between different versions of a module so that + modules + + can be smoothly upgraded to new versions. + + + For example, for the module cosmos.bank.module.v1.Module, we + may chose + + to simply name the module "bank" in the app. When we upgrade + to + + cosmos.bank.module.v2.Module, the app-specific name "bank" + stays the same + + and the framework knows that the v2 module should receive + all the same state + + that the v1 module had. Note: modules should provide info on + which versions + + they can migrate from in the + ModuleDescriptor.can_migration_from field. + config: + description: >- + config is the config object for the module. Module config + messages should + + define a ModuleDescriptor using the + cosmos.app.v1alpha1.is_module extension. + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + golang_bindings: + type: array + items: + type: object + properties: + interface_type: + type: string + title: >- + interface_type is the interface type which will be + bound to a specific implementation type + implementation: + type: string + title: >- + implementation is the implementing type which will be + supplied when an input of type interface is requested + description: >- + GolangBinding is an explicit interface type to + implementing type binding for dependency injection. + description: >- + golang_bindings specifies explicit interface to + implementation type bindings which + + depinject uses to resolve interface inputs to provider + functions. The scope of this + + field's configuration is module specific. + description: ModuleConfig is a module configuration for an app. + description: modules are the module configurations for the app. + golang_bindings: + type: array + items: + type: object + properties: + interface_type: + type: string + title: >- + interface_type is the interface type which will be bound to + a specific implementation type + implementation: + type: string + title: >- + implementation is the implementing type which will be + supplied when an input of type interface is requested + description: >- + GolangBinding is an explicit interface type to implementing type + binding for dependency injection. + description: >- + golang_bindings specifies explicit interface to implementation + type bindings which + + depinject uses to resolve interface inputs to provider functions. + The scope of this + + field's configuration is global (not module specific). + description: QueryConfigRequest is the Query/Config response type. diff --git a/client/flags/flags.go b/client/flags/flags.go index a2d918edde9a..26a93a5e6e2f 100644 --- a/client/flags/flags.go +++ b/client/flags/flags.go @@ -35,8 +35,6 @@ const ( // SignModeDirectAux is the value of the --sign-mode flag for SIGN_MODE_DIRECT_AUX SignModeDirectAux = "direct-aux" // SignModeTextual is the value of the --sign-mode flag for SIGN_MODE_TEXTUAL. - // Choosing this flag will result in an error for now, as Textual should be - // used only for TESTING purposes for now. SignModeTextual = "textual" // SignModeEIP191 is the value of the --sign-mode flag for SIGN_MODE_EIP_191 SignModeEIP191 = "eip-191" @@ -76,6 +74,7 @@ const ( FlagOffset = "offset" FlagCountTotal = "count-total" FlagTimeoutHeight = "timeout-height" + FlagKeyAlgorithm = "algo" FlagKeyType = "key-type" FlagFeePayer = "fee-payer" FlagFeeGranter = "fee-granter" @@ -87,8 +86,9 @@ const ( // This differs from FlagOutputDocument that is used to set the output file. FlagOutput = "output" // Logging flags - FlagLogLevel = "log_level" - FlagLogFormat = "log_format" + FlagLogLevel = "log_level" + FlagLogFormat = "log_format" + FlagLogNoColor = "log_no_color" ) // List of supported output formats @@ -118,7 +118,9 @@ func AddQueryFlagsToCmd(cmd *cobra.Command) { func AddTxFlagsToCmd(cmd *cobra.Command) { f := cmd.Flags() f.StringP(FlagOutput, "o", OutputFormatJSON, "Output format (text|json)") - f.String(FlagFrom, "", "Name or address of private key with which to sign") + if cmd.Flag(FlagFrom) == nil { // avoid flag redefinition when it's already been added by AutoCLI + f.String(FlagFrom, "", "Name or address of private key with which to sign") + } f.Uint64P(FlagAccountNumber, "a", 0, "The account number of the signing account (offline mode only)") f.Uint64P(FlagSequence, "s", 0, "The sequence number of the signing account (offline mode only)") f.String(FlagNote, "", "Note to add a description to the transaction (previously --memo)") @@ -132,7 +134,7 @@ func AddTxFlagsToCmd(cmd *cobra.Command) { f.Bool(FlagGenerateOnly, false, "Build an unsigned transaction and write it to STDOUT (when enabled, the local Keybase only accessed when providing a key name)") f.Bool(FlagOffline, false, "Offline mode (does not allow any online functionality)") f.BoolP(FlagSkipConfirmation, "y", false, "Skip tx broadcasting prompt confirmation") - f.String(FlagSignMode, "", "Choose sign mode (direct|amino-json|direct-aux), this is an advanced feature") + f.String(FlagSignMode, "", "Choose sign mode (direct|amino-json|direct-aux|textual), this is an advanced feature") f.Uint64(FlagTimeoutHeight, 0, "Set a block timeout height to prevent the tx from being committed past a certain height") f.String(FlagFeePayer, "", "Fee payer pays fees for the transaction instead of deducting from the signer") f.String(FlagFeeGranter, "", "Fee granter grants fees for the transaction") diff --git a/client/grpc/cmtservice/autocli.go b/client/grpc/cmtservice/autocli.go new file mode 100644 index 000000000000..8fae4b915b49 --- /dev/null +++ b/client/grpc/cmtservice/autocli.go @@ -0,0 +1,71 @@ +package cmtservice + +import ( + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + cmtv1beta1 "cosmossdk.io/api/cosmos/base/tendermint/v1beta1" +) + +var CometBFTAutoCLIDescriptor = &autocliv1.ServiceCommandDescriptor{ + Service: cmtv1beta1.Service_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "GetNodeInfo", + Use: "node-info", + Short: "Query the current node info", + }, + { + RpcMethod: "GetSyncing", + Use: "syncing", + Short: "Query node syncing status", + }, + { + RpcMethod: "GetLatestBlock", + Use: "block-latest", + Short: "Query for the latest committed block", + }, + { + RpcMethod: "GetBlockByHeight", + Use: "block-by-height [height]", + Short: "Query for a committed block by height", + Long: "Query for a specific committed block using the CometBFT RPC `block_by_height` method", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "height"}}, + }, + { + RpcMethod: "GetLatestValidatorSet", + Use: "validator-set", + Alias: []string{"validator-set-latest", "comet-validator-set", "cometbft-validator-set", "tendermint-validator-set"}, + Short: "Query for the latest validator set", + }, + { + RpcMethod: "GetValidatorSetByHeight", + Use: "validator-set-by-height [height]", + Short: "Query for a validator set by height", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "height"}}, + }, + { + RpcMethod: "ABCIQuery", + Skip: true, + }, + }, +} + +// NewCometBFTCommands is a fake `appmodule.Module` to be considered as a module +// and be added in AutoCLI. +func NewCometBFTCommands() *cometModule { //nolint:revive // fake module and limiting import of core + return &cometModule{} +} + +type cometModule struct{} + +func (m cometModule) IsOnePerModuleType() {} +func (m cometModule) IsAppModule() {} + +func (m cometModule) Name() string { + return "comet" +} + +func (m cometModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: CometBFTAutoCLIDescriptor, + } +} diff --git a/client/grpc/cmtservice/block.go b/client/grpc/cmtservice/block.go index 2880b3f2aaab..f1cde440f912 100644 --- a/client/grpc/cmtservice/block.go +++ b/client/grpc/cmtservice/block.go @@ -5,9 +5,19 @@ import ( cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" coretypes "github.com/cometbft/cometbft/rpc/core/types" + "github.com/cosmos/cosmos-sdk/client" ) +func getBlockHeight(ctx context.Context, clientCtx client.Context) (int64, error) { + status, err := GetNodeStatus(ctx, clientCtx) + if err != nil { + return 0, err + } + height := status.SyncInfo.LatestBlockHeight + return height, nil +} + func getBlock(ctx context.Context, clientCtx client.Context, height *int64) (*coretypes.ResultBlock, error) { // get the node node, err := clientCtx.GetNode() diff --git a/client/grpc/cmtservice/service.go b/client/grpc/cmtservice/service.go index 8740c0d8f117..e26e65332806 100644 --- a/client/grpc/cmtservice/service.go +++ b/client/grpc/cmtservice/service.go @@ -11,9 +11,10 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/rpc" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + sdk "github.com/cosmos/cosmos-sdk/types" qtypes "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/version" ) @@ -48,7 +49,7 @@ func NewQueryServer( // GetSyncing implements ServiceServer.GetSyncing func (s queryServer) GetSyncing(ctx context.Context, _ *GetSyncingRequest) (*GetSyncingResponse, error) { - status, err := getNodeStatus(ctx, s.clientCtx) + status, err := GetNodeStatus(ctx, s.clientCtx) if err != nil { return nil, err } @@ -80,12 +81,12 @@ func (s queryServer) GetLatestBlock(ctx context.Context, _ *GetLatestBlockReques // GetBlockByHeight implements ServiceServer.GetBlockByHeight func (s queryServer) GetBlockByHeight(ctx context.Context, req *GetBlockByHeightRequest) (*GetBlockByHeightResponse, error) { - chainHeight, err := rpc.GetChainHeight(s.clientCtx) + blockHeight, err := getBlockHeight(ctx, s.clientCtx) if err != nil { return nil, err } - if req.Height > chainHeight { + if req.Height > blockHeight { return nil, status.Error(codes.InvalidArgument, "requested block height is bigger then the chain length") } @@ -108,7 +109,7 @@ func (s queryServer) GetLatestValidatorSet(ctx context.Context, req *GetLatestVa return nil, err } - return validatorsOutput(ctx, s.clientCtx, nil, page, limit) + return ValidatorsOutput(ctx, s.clientCtx, nil, page, limit) } func (m *GetLatestValidatorSetResponse) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { @@ -130,16 +131,16 @@ func (s queryServer) GetValidatorSetByHeight(ctx context.Context, req *GetValida return nil, err } - chainHeight, err := rpc.GetChainHeight(s.clientCtx) + blockHeight, err := getBlockHeight(ctx, s.clientCtx) if err != nil { return nil, status.Error(codes.Internal, "failed to parse chain height") } - if req.Height > chainHeight { + if req.Height > blockHeight { return nil, status.Error(codes.InvalidArgument, "requested block height is bigger then the chain length") } - r, err := validatorsOutput(ctx, s.clientCtx, &req.Height, page, limit) + r, err := ValidatorsOutput(ctx, s.clientCtx, &req.Height, page, limit) if err != nil { return nil, err } @@ -151,8 +152,8 @@ func (s queryServer) GetValidatorSetByHeight(ctx context.Context, req *GetValida }, nil } -func validatorsOutput(ctx context.Context, cctx client.Context, height *int64, page, limit int) (*GetLatestValidatorSetResponse, error) { - vs, err := rpc.GetValidators(ctx, cctx, height, &page, &limit) +func ValidatorsOutput(ctx context.Context, clientCtx client.Context, height *int64, page, limit int) (*GetLatestValidatorSetResponse, error) { + vs, err := getValidators(ctx, clientCtx, height, page, limit) if err != nil { return nil, err } @@ -161,18 +162,22 @@ func validatorsOutput(ctx context.Context, cctx client.Context, height *int64, p BlockHeight: vs.BlockHeight, Validators: make([]*Validator, len(vs.Validators)), Pagination: &qtypes.PageResponse{ - Total: vs.Total, + Total: uint64(vs.Total), }, } for i, v := range vs.Validators { - anyPub, err := codectypes.NewAnyWithValue(v.PubKey) + pk, err := cryptocodec.FromCmtPubKeyInterface(v.PubKey) + if err != nil { + return nil, err + } + anyPub, err := codectypes.NewAnyWithValue(pk) if err != nil { return nil, err } resp.Validators[i] = &Validator{ - Address: v.Address.String(), + Address: sdk.ConsAddress(v.Address).String(), ProposerPriority: v.ProposerPriority, PubKey: anyPub, VotingPower: v.VotingPower, @@ -184,7 +189,7 @@ func validatorsOutput(ctx context.Context, cctx client.Context, height *int64, p // GetNodeInfo implements ServiceServer.GetNodeInfo func (s queryServer) GetNodeInfo(ctx context.Context, _ *GetNodeInfoRequest) (*GetNodeInfoResponse, error) { - status, err := getNodeStatus(ctx, s.clientCtx) + status, err := GetNodeStatus(ctx, s.clientCtx) if err != nil { return nil, err } diff --git a/client/grpc/cmtservice/status.go b/client/grpc/cmtservice/status.go index 9f03a71a7672..ea32e00b79a8 100644 --- a/client/grpc/cmtservice/status.go +++ b/client/grpc/cmtservice/status.go @@ -8,7 +8,8 @@ import ( "github.com/cosmos/cosmos-sdk/client" ) -func getNodeStatus(ctx context.Context, clientCtx client.Context) (*coretypes.ResultStatus, error) { +// GetNodeStatus returns the status of the node. +func GetNodeStatus(ctx context.Context, clientCtx client.Context) (*coretypes.ResultStatus, error) { node, err := clientCtx.GetNode() if err != nil { return &coretypes.ResultStatus{}, err diff --git a/client/grpc/cmtservice/status_test.go b/client/grpc/cmtservice/status_test.go new file mode 100644 index 000000000000..74e3b3c2e5dc --- /dev/null +++ b/client/grpc/cmtservice/status_test.go @@ -0,0 +1,32 @@ +package cmtservice_test + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/server" + clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" + "github.com/cosmos/cosmos-sdk/testutil/network" +) + +func TestStatusCommand(t *testing.T) { + t.Skip() // flaky test + + cfg, err := network.DefaultConfigWithAppConfig(network.MinimumAppConfig()) + require.NoError(t, err) + + network, err := network.New(t, t.TempDir(), cfg) + require.NoError(t, err) + require.NoError(t, network.WaitForNextBlock()) + + val0 := network.Validators[0] + cmd := server.StatusCommand() + + out, err := clitestutil.ExecTestCLICmd(val0.ClientCtx, cmd, []string{}) + require.NoError(t, err) + + // Make sure the output has the validator moniker. + require.Contains(t, out.String(), fmt.Sprintf("\"moniker\":\"%s\"", val0.Moniker)) +} diff --git a/client/grpc/cmtservice/util.go b/client/grpc/cmtservice/util.go index 3572a6218533..de06162c8a1c 100644 --- a/client/grpc/cmtservice/util.go +++ b/client/grpc/cmtservice/util.go @@ -2,6 +2,7 @@ package cmtservice import ( cmtprototypes "github.com/cometbft/cometbft/proto/tendermint/types" + sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/client/grpc/cmtservice/validator.go b/client/grpc/cmtservice/validator.go new file mode 100644 index 000000000000..5b81d2bc4cac --- /dev/null +++ b/client/grpc/cmtservice/validator.go @@ -0,0 +1,17 @@ +package cmtservice + +import ( + "context" + + coretypes "github.com/cometbft/cometbft/rpc/core/types" + + "github.com/cosmos/cosmos-sdk/client" +) + +func getValidators(ctx context.Context, clientCtx client.Context, height *int64, page, limit int) (*coretypes.ResultValidators, error) { + node, err := clientCtx.GetNode() + if err != nil { + return nil, err + } + return node.Validators(ctx, height, &page, &limit) +} diff --git a/client/grpc/node/query.pb.go b/client/grpc/node/query.pb.go index 8e56808aa627..a2c96dc1ec2f 100644 --- a/client/grpc/node/query.pb.go +++ b/client/grpc/node/query.pb.go @@ -72,10 +72,10 @@ var xxx_messageInfo_ConfigRequest proto.InternalMessageInfo // ConfigResponse defines the response structure for the Config gRPC query. type ConfigResponse struct { - MinimumGasPrice string `protobuf:"bytes,1,opt,name=minimum_gas_price,json=minimumGasPrice,proto3" json:"minimum_gas_price,omitempty"` - // pruning settings + MinimumGasPrice string `protobuf:"bytes,1,opt,name=minimum_gas_price,json=minimumGasPrice,proto3" json:"minimum_gas_price,omitempty"` PruningKeepRecent string `protobuf:"bytes,2,opt,name=pruning_keep_recent,json=pruningKeepRecent,proto3" json:"pruning_keep_recent,omitempty"` PruningInterval string `protobuf:"bytes,3,opt,name=pruning_interval,json=pruningInterval,proto3" json:"pruning_interval,omitempty"` + HaltHeight uint64 `protobuf:"varint,4,opt,name=halt_height,json=haltHeight,proto3" json:"halt_height,omitempty"` } func (m *ConfigResponse) Reset() { *m = ConfigResponse{} } @@ -132,6 +132,13 @@ func (m *ConfigResponse) GetPruningInterval() string { return "" } +func (m *ConfigResponse) GetHaltHeight() uint64 { + if m != nil { + return m.HaltHeight + } + return 0 +} + // StateRequest defines the request structure for the status of a node. type StatusRequest struct { } @@ -258,39 +265,40 @@ func init() { } var fileDescriptor_8324226a07064341 = []byte{ - // 506 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0x6f, 0xd3, 0x3e, - 0x1c, 0xc5, 0x9b, 0xfe, 0xfa, 0xeb, 0x98, 0x61, 0x1d, 0xcb, 0x00, 0x95, 0x0a, 0x65, 0x55, 0x05, - 0xa2, 0x20, 0xcd, 0xd6, 0xca, 0x9d, 0xc3, 0x38, 0x6c, 0x88, 0x0b, 0x4a, 0x39, 0x71, 0x89, 0xdc, - 0xf4, 0xbb, 0xc4, 0x5a, 0x62, 0x7b, 0xb6, 0x53, 0x89, 0x2b, 0x12, 0xf7, 0x49, 0x1c, 0x10, 0xff, - 0x11, 0xc7, 0x49, 0x5c, 0x38, 0x01, 0x6a, 0xf9, 0x43, 0x50, 0x6c, 0x67, 0xa8, 0x87, 0x0d, 0x4e, - 0xb1, 0xdf, 0xfb, 0xd8, 0x79, 0x7a, 0x5f, 0xa3, 0x87, 0xa9, 0xd0, 0xa5, 0xd0, 0x64, 0x46, 0x35, - 0x10, 0x2e, 0xe6, 0x40, 0x16, 0x07, 0x33, 0x30, 0xf4, 0x80, 0x9c, 0x55, 0xa0, 0xde, 0x61, 0xa9, - 0x84, 0x11, 0x61, 0xdf, 0x51, 0xb8, 0xa6, 0x70, 0x4d, 0x61, 0x4f, 0x0d, 0x1e, 0x64, 0x42, 0x64, - 0x05, 0x10, 0x2a, 0x19, 0xa1, 0x9c, 0x0b, 0x43, 0x0d, 0x13, 0x5c, 0xbb, 0x73, 0x83, 0x3d, 0xef, - 0xda, 0xdd, 0xac, 0x3a, 0x21, 0x86, 0x95, 0xa0, 0x0d, 0x2d, 0xa5, 0x07, 0xee, 0x64, 0x22, 0x13, - 0x76, 0x49, 0xea, 0x95, 0x53, 0x47, 0xdb, 0x68, 0xeb, 0x85, 0xe0, 0x27, 0x2c, 0x8b, 0xe1, 0xac, - 0x02, 0x6d, 0x46, 0x9f, 0x02, 0xd4, 0x6b, 0x14, 0x2d, 0x05, 0xd7, 0x10, 0x3e, 0x45, 0x3b, 0x25, - 0xe3, 0xac, 0xac, 0xca, 0x24, 0xa3, 0x3a, 0x91, 0x8a, 0xa5, 0xd0, 0x0f, 0x86, 0xc1, 0x78, 0x33, - 0xde, 0xf6, 0xc6, 0x11, 0xd5, 0xaf, 0x6b, 0x39, 0xc4, 0x68, 0x57, 0xaa, 0x8a, 0x33, 0x9e, 0x25, - 0xa7, 0x00, 0x32, 0x51, 0x90, 0x02, 0x37, 0xfd, 0xb6, 0xa5, 0x77, 0xbc, 0xf5, 0x0a, 0x40, 0xc6, - 0xd6, 0x08, 0x9f, 0xa0, 0xdb, 0x0d, 0xcf, 0xb8, 0x01, 0xb5, 0xa0, 0x45, 0xff, 0x3f, 0x77, 0xb5, - 0xd7, 0x5f, 0x7a, 0xb9, 0x8e, 0x3a, 0x35, 0xd4, 0x54, 0xba, 0x89, 0xfa, 0x3d, 0x40, 0xbd, 0x46, - 0xf1, 0x51, 0x27, 0xe8, 0x2e, 0x50, 0x55, 0x30, 0xd0, 0x26, 0xd1, 0x46, 0x28, 0x48, 0x72, 0x60, - 0x59, 0x6e, 0x6c, 0xdc, 0x4e, 0xbc, 0xdb, 0x98, 0xd3, 0xda, 0x3b, 0xb6, 0x56, 0x78, 0x0f, 0x75, - 0x3d, 0xd4, 0xb6, 0x90, 0xdf, 0x85, 0xcf, 0xd1, 0xe6, 0x65, 0x87, 0x36, 0xd3, 0xcd, 0xc9, 0x00, - 0xbb, 0x96, 0x71, 0xd3, 0x32, 0x7e, 0xd3, 0x10, 0x87, 0x9d, 0xf3, 0x1f, 0x7b, 0x41, 0xfc, 0xe7, - 0x48, 0x78, 0x1f, 0xdd, 0xa0, 0x52, 0x26, 0x39, 0xd5, 0x79, 0xbf, 0x33, 0x0c, 0xc6, 0xb7, 0xe2, - 0x0d, 0x2a, 0xe5, 0x31, 0xd5, 0x79, 0xf8, 0x08, 0xf5, 0x16, 0xb4, 0x60, 0x73, 0x6a, 0x84, 0x72, - 0xc0, 0xff, 0x16, 0xd8, 0xba, 0x54, 0x6b, 0x6c, 0xf2, 0xb9, 0x8d, 0x36, 0xa6, 0xa0, 0x16, 0x75, - 0xb1, 0x1f, 0x02, 0xd4, 0x75, 0x73, 0x09, 0x1f, 0xe3, 0xab, 0xde, 0x08, 0x5e, 0x9b, 0xe5, 0x60, - 0xfc, 0x77, 0xd0, 0xf5, 0x36, 0x1a, 0xbf, 0xff, 0xfa, 0xeb, 0x63, 0x7b, 0x14, 0x0e, 0xc9, 0x95, - 0x8f, 0x34, 0x75, 0x3f, 0xaf, 0x73, 0xb8, 0xd2, 0xaf, 0xcb, 0xb1, 0x36, 0xa8, 0xeb, 0x72, 0xac, - 0xcf, 0xef, 0x5f, 0x72, 0x68, 0x7b, 0xe2, 0xf0, 0xe8, 0xcb, 0x32, 0x0a, 0x2e, 0x96, 0x51, 0xf0, - 0x73, 0x19, 0x05, 0xe7, 0xab, 0xa8, 0x75, 0xb1, 0x8a, 0x5a, 0xdf, 0x56, 0x51, 0xeb, 0xed, 0x7e, - 0xc6, 0x4c, 0x5e, 0xcd, 0x70, 0x2a, 0xca, 0xe6, 0x16, 0xf7, 0xd9, 0xd7, 0xf3, 0x53, 0x92, 0x16, - 0x0c, 0xb8, 0x21, 0x99, 0x92, 0xa9, 0xbd, 0x77, 0xd6, 0xb5, 0xb3, 0x7c, 0xf6, 0x3b, 0x00, 0x00, - 0xff, 0xff, 0x89, 0x73, 0x23, 0x6e, 0x9f, 0x03, 0x00, 0x00, + // 522 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0xc7, 0x97, 0x32, 0x3a, 0xe6, 0xb1, 0x8e, 0x79, 0x80, 0x4a, 0x85, 0xd2, 0xaa, 0x02, 0x51, + 0x90, 0x66, 0x6b, 0xe5, 0xce, 0x61, 0x1c, 0x36, 0xc4, 0x05, 0xa5, 0x9c, 0xb8, 0x44, 0x6e, 0xfa, + 0x96, 0x58, 0x4b, 0x6c, 0xcf, 0x76, 0x2a, 0x71, 0x45, 0xe2, 0x3e, 0x89, 0x13, 0xdf, 0x84, 0x8f, + 0xc0, 0x71, 0x12, 0x17, 0x4e, 0x80, 0x5a, 0x3e, 0x08, 0x8a, 0x9d, 0x0c, 0xf5, 0xb0, 0xc1, 0x29, + 0xf6, 0xff, 0xfd, 0xde, 0xcb, 0x7b, 0xef, 0x6f, 0xf4, 0x28, 0x91, 0xa6, 0x90, 0x86, 0x4e, 0x99, + 0x01, 0x2a, 0xe4, 0x0c, 0xe8, 0xfc, 0x60, 0x0a, 0x96, 0x1d, 0xd0, 0xb3, 0x12, 0xf4, 0x7b, 0xa2, + 0xb4, 0xb4, 0x12, 0x77, 0x3d, 0x45, 0x2a, 0x8a, 0x54, 0x14, 0xa9, 0xa9, 0xde, 0xc3, 0x54, 0xca, + 0x34, 0x07, 0xca, 0x14, 0xa7, 0x4c, 0x08, 0x69, 0x99, 0xe5, 0x52, 0x18, 0x9f, 0xd7, 0xeb, 0xd7, + 0x51, 0x77, 0x9b, 0x96, 0x27, 0xd4, 0xf2, 0x02, 0x8c, 0x65, 0x85, 0xaa, 0x81, 0xbb, 0xa9, 0x4c, + 0xa5, 0x3b, 0xd2, 0xea, 0xe4, 0xd5, 0xe1, 0x0e, 0xda, 0x7e, 0x29, 0xc5, 0x09, 0x4f, 0x23, 0x38, + 0x2b, 0xc1, 0xd8, 0xe1, 0x97, 0x00, 0x75, 0x1a, 0xc5, 0x28, 0x29, 0x0c, 0xe0, 0x67, 0x68, 0xb7, + 0xe0, 0x82, 0x17, 0x65, 0x11, 0xa7, 0xcc, 0xc4, 0x4a, 0xf3, 0x04, 0xba, 0xc1, 0x20, 0x18, 0x6d, + 0x46, 0x3b, 0x75, 0xe0, 0x88, 0x99, 0x37, 0x95, 0x8c, 0x09, 0xda, 0x53, 0xba, 0x14, 0x5c, 0xa4, + 0xf1, 0x29, 0x80, 0x8a, 0x35, 0x24, 0x20, 0x6c, 0xb7, 0xe5, 0xe8, 0xdd, 0x3a, 0xf4, 0x1a, 0x40, + 0x45, 0x2e, 0x80, 0x9f, 0xa2, 0x3b, 0x0d, 0xcf, 0x85, 0x05, 0x3d, 0x67, 0x79, 0xf7, 0x86, 0x2f, + 0x5d, 0xeb, 0xaf, 0x6a, 0x19, 0xf7, 0xd1, 0x56, 0xc6, 0x72, 0x1b, 0x67, 0xc0, 0xd3, 0xcc, 0x76, + 0xd7, 0x07, 0xc1, 0x68, 0x3d, 0x42, 0x95, 0x74, 0xec, 0x94, 0x6a, 0x96, 0x89, 0x65, 0xb6, 0x34, + 0xcd, 0x2c, 0x3f, 0x02, 0xd4, 0x69, 0x94, 0x7a, 0x96, 0x31, 0xba, 0x07, 0x4c, 0xe7, 0x1c, 0x8c, + 0x8d, 0x8d, 0x95, 0x1a, 0x9a, 0x72, 0x81, 0x2b, 0xb7, 0xd7, 0x04, 0x27, 0x55, 0xcc, 0xd7, 0xc5, + 0xf7, 0x51, 0xbb, 0x86, 0x5a, 0x0e, 0xaa, 0x6f, 0xf8, 0x05, 0xda, 0xbc, 0x5c, 0xb2, 0x6b, 0x7a, + 0x6b, 0xdc, 0x23, 0xde, 0x06, 0xd2, 0xd8, 0x40, 0xde, 0x36, 0xc4, 0xe1, 0xfa, 0xf9, 0xcf, 0x7e, + 0x10, 0xfd, 0x4d, 0xc1, 0x0f, 0xd0, 0x2d, 0xa6, 0x54, 0x9c, 0x31, 0x93, 0xb9, 0x69, 0x6e, 0x47, + 0x1b, 0x4c, 0xa9, 0x63, 0x66, 0x32, 0xfc, 0x18, 0x75, 0xe6, 0x2c, 0xe7, 0x33, 0x66, 0xa5, 0xf6, + 0xc0, 0x4d, 0x07, 0x6c, 0x5f, 0xaa, 0x15, 0x36, 0xfe, 0xdc, 0x42, 0x1b, 0x13, 0xd0, 0xf3, 0x6a, + 0xf3, 0x1f, 0x03, 0xd4, 0xf6, 0xc6, 0xe1, 0x27, 0xe4, 0xaa, 0x47, 0x44, 0x56, 0xcc, 0xee, 0x8d, + 0xfe, 0x0d, 0xfa, 0xbd, 0x0d, 0x47, 0x1f, 0xbe, 0xfd, 0xfe, 0xd4, 0x1a, 0xe2, 0x01, 0xbd, 0xf2, + 0x15, 0x27, 0xfe, 0xe7, 0x55, 0x1f, 0x7e, 0xe9, 0xd7, 0xf5, 0xb1, 0x62, 0xd4, 0x75, 0x7d, 0xac, + 0xfa, 0xf7, 0x3f, 0x7d, 0x18, 0x97, 0x71, 0x78, 0xf4, 0x75, 0x11, 0x06, 0x17, 0x8b, 0x30, 0xf8, + 0xb5, 0x08, 0x83, 0xf3, 0x65, 0xb8, 0x76, 0xb1, 0x0c, 0xd7, 0xbe, 0x2f, 0xc3, 0xb5, 0x77, 0xfb, + 0x29, 0xb7, 0x59, 0x39, 0x25, 0x89, 0x2c, 0x9a, 0x2a, 0xfe, 0xb3, 0x6f, 0x66, 0xa7, 0x34, 0xc9, + 0x39, 0x08, 0x4b, 0x53, 0xad, 0x12, 0x57, 0x77, 0xda, 0x76, 0x5e, 0x3e, 0xff, 0x13, 0x00, 0x00, + 0xff, 0xff, 0x0c, 0x93, 0xa1, 0xea, 0xc0, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -456,6 +464,11 @@ func (m *ConfigResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.HaltHeight != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.HaltHeight)) + i-- + dAtA[i] = 0x20 + } if len(m.PruningInterval) > 0 { i -= len(m.PruningInterval) copy(dAtA[i:], m.PruningInterval) @@ -598,6 +611,9 @@ func (m *ConfigResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } + if m.HaltHeight != 0 { + n += 1 + sovQuery(uint64(m.HaltHeight)) + } return n } @@ -818,6 +834,25 @@ func (m *ConfigResponse) Unmarshal(dAtA []byte) error { } m.PruningInterval = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HaltHeight", wireType) + } + m.HaltHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HaltHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) diff --git a/client/grpc/node/service.go b/client/grpc/node/service.go index 0d4f27a42932..144722a9cbfb 100644 --- a/client/grpc/node/service.go +++ b/client/grpc/node/service.go @@ -32,6 +32,7 @@ type queryServer struct { func NewQueryServer(clientCtx client.Context, cfg config.Config) ServiceServer { return queryServer{ clientCtx: clientCtx, + cfg: cfg, } } @@ -42,6 +43,7 @@ func (s queryServer) Config(ctx context.Context, _ *ConfigRequest) (*ConfigRespo MinimumGasPrice: sdkCtx.MinGasPrices().String(), PruningKeepRecent: s.cfg.PruningKeepRecent, PruningInterval: s.cfg.PruningInterval, + HaltHeight: s.cfg.HaltHeight, }, nil } diff --git a/client/grpc/node/service_test.go b/client/grpc/node/service_test.go index 2cbc07d3dda8..fc9ddbb5101e 100644 --- a/client/grpc/node/service_test.go +++ b/client/grpc/node/service_test.go @@ -11,11 +11,18 @@ import ( ) func TestServiceServer_Config(t *testing.T) { - svr := NewQueryServer(client.Context{}, *config.DefaultConfig()) + defaultCfg := config.DefaultConfig() + defaultCfg.PruningKeepRecent = "2000" + defaultCfg.PruningInterval = "10" + defaultCfg.HaltHeight = 100 + svr := NewQueryServer(client.Context{}, *defaultCfg) ctx := sdk.Context{}.WithMinGasPrices(sdk.NewDecCoins(sdk.NewInt64DecCoin("stake", 15))) resp, err := svr.Config(ctx, &ConfigRequest{}) require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, ctx.MinGasPrices().String(), resp.MinimumGasPrice) + require.Equal(t, defaultCfg.PruningKeepRecent, resp.PruningKeepRecent) + require.Equal(t, defaultCfg.PruningInterval, resp.PruningInterval) + require.Equal(t, defaultCfg.HaltHeight, resp.HaltHeight) } diff --git a/client/grpc_query.go b/client/grpc_query.go index 6ae3d9b8b869..493ffe1ae998 100644 --- a/client/grpc_query.go +++ b/client/grpc_query.go @@ -6,16 +6,15 @@ import ( "reflect" "strconv" - "google.golang.org/grpc/encoding" - - "github.com/cosmos/cosmos-sdk/codec" - - errorsmod "cosmossdk.io/errors" abci "github.com/cometbft/cometbft/abci/types" gogogrpc "github.com/cosmos/gogoproto/grpc" "google.golang.org/grpc" + "google.golang.org/grpc/encoding" "google.golang.org/grpc/metadata" + errorsmod "cosmossdk.io/errors" + + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" grpctypes "github.com/cosmos/cosmos-sdk/types/grpc" diff --git a/client/grpc_query_test.go b/client/grpc_query_test.go index 91e06375b4a7..284f6093023d 100644 --- a/client/grpc_query_test.go +++ b/client/grpc_query_test.go @@ -4,9 +4,6 @@ import ( "context" "testing" - "cosmossdk.io/depinject" - "cosmossdk.io/log" - sdkmath "cosmossdk.io/math" abci "github.com/cometbft/cometbft/abci/types" cmtjson "github.com/cometbft/cometbft/libs/json" dbm "github.com/cosmos/cosmos-db" @@ -14,6 +11,10 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/metadata" + "cosmossdk.io/depinject" + "cosmossdk.io/log" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -72,7 +73,7 @@ func (s *IntegrationTestSuite) SetupSuite() { acc := authtypes.NewBaseAccount(senderPrivKey.PubKey().Address().Bytes(), senderPrivKey.PubKey(), 0, 0) balance := types.Balance{ Address: acc.GetAddress().String(), - Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(s.genesisAccountBalance))), + Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(s.genesisAccountBalance))), } genesisState, err := sims.GenesisStateWithValSet(cdc, app.DefaultGenesis(), valSet, []authtypes.GenesisAccount{acc}, balance) @@ -128,7 +129,7 @@ func (s *IntegrationTestSuite) TestGRPCQuery() { ) s.Require().NoError(err) bal := res.GetBalance() - s.Equal(sdk.NewCoin(denom, sdkmath.NewInt(s.genesisAccountBalance)), *bal) + s.Equal(sdk.NewCoin(denom, math.NewInt(s.genesisAccountBalance)), *bal) } func TestIntegrationTestSuite(t *testing.T) { diff --git a/client/keys/add.go b/client/keys/add.go index 4392f90bf25f..b64db8afdc10 100644 --- a/client/keys/add.go +++ b/client/keys/add.go @@ -3,9 +3,12 @@ package keys import ( "bufio" "bytes" + "encoding/base64" "encoding/json" "errors" "fmt" + "io" + "os" "sort" "github.com/cosmos/go-bip39" @@ -15,6 +18,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/input" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" @@ -23,15 +27,17 @@ import ( ) const ( - flagInteractive = "interactive" - flagRecover = "recover" - flagNoBackup = "no-backup" - flagCoinType = "coin-type" - flagAccount = "account" - flagIndex = "index" - flagMultisig = "multisig" - flagNoSort = "nosort" - flagHDPath = "hd-path" + flagInteractive = "interactive" + flagRecover = "recover" + flagNoBackup = "no-backup" + flagCoinType = "coin-type" + flagAccount = "account" + flagIndex = "index" + flagMultisig = "multisig" + flagNoSort = "nosort" + flagHDPath = "hd-path" + flagPubKeyBase64 = "pubkey-base64" + flagMnemonicSrc = "source" // DefaultKeyPass contains the default key password for genesis transactions DefaultKeyPass = "12345678" @@ -54,6 +60,11 @@ local keystore. Use the --pubkey flag to add arbitrary public keys to the keystore for constructing multisig transactions. +Use the --source flag to import mnemonic from a file in recover or interactive mode. +Example: + + keys add testing --recover --source ./mnemonic.txt + You can create and store a multisig key by passing the list of key names stored in a keyring and the minimum number of signatures required through --multisig-threshold. The keys are sorted by address, unless the flag --nosort is set. @@ -69,6 +80,7 @@ Example: f.Int(flagMultiSigThreshold, 1, "K out of N required signatures. For use in conjunction with --multisig") f.Bool(flagNoSort, false, "Keys passed to --multisig are taken in the order they're supplied") f.String(FlagPublicKey, "", "Parse a public key in JSON format and saves key info to file.") + f.String(flagPubKeyBase64, "", "Parse a public key in base64 format and saves key info.") f.BoolP(flagInteractive, "i", false, "Interactively prompt user for BIP39 passphrase and mnemonic") f.Bool(flags.FlagUseLedger, false, "Store a local reference to a private key on a Ledger device") f.Bool(flagRecover, false, "Provide seed phrase to recover existing key instead of creating") @@ -79,10 +91,11 @@ Example: f.Uint32(flagAccount, 0, "Account number for HD derivation (less than equal 2147483647)") f.Uint32(flagIndex, 0, "Address index number for HD derivation (less than equal 2147483647)") f.String(flags.FlagKeyType, string(hd.Secp256k1Type), "Key signing algorithm to generate keys for") + f.String(flagMnemonicSrc, "", "Import mnemonic from a file (only usable when recover or interactive is passed)") // support old flags name for backwards compatibility f.SetNormalizeFunc(func(f *pflag.FlagSet, name string) pflag.NormalizedName { - if name == "algo" { + if name == flags.FlagKeyAlgorithm { name = flags.FlagKeyType } @@ -189,6 +202,10 @@ func runAddCmd(ctx client.Context, cmd *cobra.Command, args []string, inBuf *buf } pubKey, _ := cmd.Flags().GetString(FlagPublicKey) + pubKeyBase64, _ := cmd.Flags().GetString(flagPubKeyBase64) + if pubKey != "" && pubKeyBase64 != "" { + return fmt.Errorf(`flags %s and %s cannot be used simultaneously`, FlagPublicKey, flagPubKeyBase64) + } if pubKey != "" { var pk cryptotypes.PubKey if err = ctx.Codec.UnmarshalInterfaceJSON([]byte(pubKey), &pk); err != nil { @@ -202,6 +219,38 @@ func runAddCmd(ctx client.Context, cmd *cobra.Command, args []string, inBuf *buf return printCreate(cmd, k, false, "", outputFormat) } + if pubKeyBase64 != "" { + b64, err := base64.StdEncoding.DecodeString(pubKeyBase64) + if err != nil { + return err + } + + var pk cryptotypes.PubKey + // create an empty pubkey in order to get the algo TypeUrl. + tempAny, err := codectypes.NewAnyWithValue(algo.Generate()([]byte{}).PubKey()) + if err != nil { + return err + } + + jsonPub, err := json.Marshal(struct { + Type string `json:"@type,omitempty"` + Key string `json:"key,omitempty"` + }{tempAny.TypeUrl, string(b64)}) + if err != nil { + return fmt.Errorf("failed to JSON marshal typeURL and base64 key: %w", err) + } + + if err = ctx.Codec.UnmarshalInterfaceJSON(jsonPub, &pk); err != nil { + return err + } + + k, err := kb.SaveOfflineKey(name, pk) + if err != nil { + return fmt.Errorf("failed to save offline key: %w", err) + } + + return printCreate(cmd, k, false, "", outputFormat) + } coinType, _ := cmd.Flags().GetUint32(flagCoinType) account, _ := cmd.Flags().GetUint32(flagAccount) @@ -230,19 +279,34 @@ func runAddCmd(ctx client.Context, cmd *cobra.Command, args []string, inBuf *buf var mnemonic, bip39Passphrase string recoverFlag, _ := cmd.Flags().GetBool(flagRecover) + mnemonicSrc, _ := cmd.Flags().GetString(flagMnemonicSrc) if recoverFlag { - mnemonic, err = input.GetString("Enter your bip39 mnemonic", inBuf) - if err != nil { - return err + if mnemonicSrc != "" { + mnemonic, err = readMnemonicFromFile(mnemonicSrc) + if err != nil { + return err + } + } else { + mnemonic, err = input.GetString("Enter your bip39 mnemonic", inBuf) + if err != nil { + return err + } } if !bip39.IsMnemonicValid(mnemonic) { return errors.New("invalid mnemonic") } } else if interactive { - mnemonic, err = input.GetString("Enter your bip39 mnemonic, or hit enter to generate one.", inBuf) - if err != nil { - return err + if mnemonicSrc != "" { + mnemonic, err = readMnemonicFromFile(mnemonicSrc) + if err != nil { + return err + } + } else { + mnemonic, err = input.GetString("Enter your bip39 mnemonic, or hit enter to generate one.", inBuf) + if err != nil { + return err + } } if !bip39.IsMnemonicValid(mnemonic) && mnemonic != "" { @@ -337,3 +401,17 @@ func printCreate(cmd *cobra.Command, k *keyring.Record, showMnemonic bool, mnemo return nil } + +func readMnemonicFromFile(filePath string) (string, error) { + file, err := os.Open(filePath) + if err != nil { + return "", err + } + defer file.Close() + + bz, err := io.ReadAll(file) + if err != nil { + return "", err + } + return string(bz), nil +} diff --git a/client/keys/add_ledger_test.go b/client/keys/add_ledger_test.go index 289200e3fe29..797c0452dfbb 100644 --- a/client/keys/add_ledger_test.go +++ b/client/keys/add_ledger_test.go @@ -38,7 +38,7 @@ func Test_runAddCmdLedgerWithCustomCoinType(t *testing.T) { config.SetBech32PrefixForConsensusNode(bech32PrefixConsAddr, bech32PrefixConsPub) cmd := AddKeyCommand() - cmd.Flags().AddFlagSet(Commands("home").PersistentFlags()) + cmd.Flags().AddFlagSet(Commands().PersistentFlags()) // Prepare a keybase kbHome := t.TempDir() @@ -91,7 +91,7 @@ func Test_runAddCmdLedgerWithCustomCoinType(t *testing.T) { func Test_runAddCmdLedger(t *testing.T) { cmd := AddKeyCommand() - cmd.Flags().AddFlagSet(Commands("home").PersistentFlags()) + cmd.Flags().AddFlagSet(Commands().PersistentFlags()) mockIn := testutil.ApplyMockIODiscardOutErr(cmd) kbHome := t.TempDir() @@ -166,7 +166,7 @@ func Test_runAddCmdLedgerDryRun(t *testing.T) { tt := tt t.Run(tt.name, func(t *testing.T) { cmd := AddKeyCommand() - cmd.Flags().AddFlagSet(Commands("home").PersistentFlags()) + cmd.Flags().AddFlagSet(Commands().PersistentFlags()) kbHome := t.TempDir() mockIn := testutil.ApplyMockIODiscardOutErr(cmd) diff --git a/client/keys/add_test.go b/client/keys/add_test.go index f275d001ab38..ea02eb6b539f 100644 --- a/client/keys/add_test.go +++ b/client/keys/add_test.go @@ -7,6 +7,7 @@ import ( "io" "testing" + "github.com/cosmos/go-bip39" "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/client" @@ -17,12 +18,11 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - "github.com/cosmos/go-bip39" ) func Test_runAddCmdBasic(t *testing.T) { cmd := AddKeyCommand() - cmd.Flags().AddFlagSet(Commands("home").PersistentFlags()) + cmd.Flags().AddFlagSet(Commands().PersistentFlags()) mockIn := testutil.ApplyMockIODiscardOutErr(cmd) kbHome := t.TempDir() @@ -41,7 +41,7 @@ func Test_runAddCmdBasic(t *testing.T) { cmd.SetArgs([]string{ "keyname1", - fmt.Sprintf("--%s=%s", flags.FlagHome, kbHome), + fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, kbHome), fmt.Sprintf("--%s=%s", flags.FlagOutput, flags.OutputFormatText), fmt.Sprintf("--%s=%s", flags.FlagKeyType, hd.Secp256k1Type), fmt.Sprintf("--%s=%s", flags.FlagKeyringBackend, keyring.BackendTest), @@ -54,7 +54,7 @@ func Test_runAddCmdBasic(t *testing.T) { cmd.SetArgs([]string{ "keyname2", - fmt.Sprintf("--%s=%s", flags.FlagHome, kbHome), + fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, kbHome), fmt.Sprintf("--%s=%s", flags.FlagOutput, flags.OutputFormatText), fmt.Sprintf("--%s=%s", flags.FlagKeyType, hd.Secp256k1Type), fmt.Sprintf("--%s=%s", flags.FlagKeyringBackend, keyring.BackendTest), @@ -68,7 +68,7 @@ func Test_runAddCmdBasic(t *testing.T) { cmd.SetArgs([]string{ "keyname4", - fmt.Sprintf("--%s=%s", flags.FlagHome, kbHome), + fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, kbHome), fmt.Sprintf("--%s=%s", flags.FlagOutput, flags.OutputFormatText), fmt.Sprintf("--%s=%s", flags.FlagKeyType, hd.Secp256k1Type), fmt.Sprintf("--%s=%s", flags.FlagKeyringBackend, keyring.BackendTest), @@ -79,7 +79,7 @@ func Test_runAddCmdBasic(t *testing.T) { cmd.SetArgs([]string{ "keyname5", - fmt.Sprintf("--%s=%s", flags.FlagHome, kbHome), + fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, kbHome), fmt.Sprintf("--%s=true", flags.FlagDryRun), fmt.Sprintf("--%s=%s", flags.FlagOutput, flags.OutputFormatText), fmt.Sprintf("--%s=%s", flags.FlagKeyType, hd.Secp256k1Type), @@ -122,6 +122,7 @@ func Test_runAddCmdBasic(t *testing.T) { func Test_runAddCmdDryRun(t *testing.T) { pubkey1 := `{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AtObiFVE4s+9+RX5SP8TN9r2mxpoaT4eGj9CJfK7VRzN"}` pubkey2 := `{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A/se1vkqgdQ7VJQCM4mxN+L+ciGhnnJ4XYsQCRBMrdRi"}` + b64Pubkey := "QWhnOHhpdXBJcGZ2UlR2ak5la1ExclROUThTOW96YjdHK2RYQmFLVjl4aUo=" cdc := moduletestutil.MakeTestEncodingConfig().Codec testData := []struct { @@ -181,12 +182,30 @@ func Test_runAddCmdDryRun(t *testing.T) { }, added: false, }, + { + name: "base64 pubkey account is added", + args: []string{ + "testkey", + fmt.Sprintf("--%s=%s", flags.FlagDryRun, "false"), + fmt.Sprintf("--%s=%s", flagPubKeyBase64, b64Pubkey), + }, + added: true, + }, + { + name: "base64 pubkey account is not added with dry run", + args: []string{ + "testkey", + fmt.Sprintf("--%s=%s", flags.FlagDryRun, "true"), + fmt.Sprintf("--%s=%s", flagPubKeyBase64, b64Pubkey), + }, + added: false, + }, } for _, tt := range testData { tt := tt t.Run(tt.name, func(t *testing.T) { cmd := AddKeyCommand() - cmd.Flags().AddFlagSet(Commands("home").PersistentFlags()) + cmd.Flags().AddFlagSet(Commands().PersistentFlags()) kbHome := t.TempDir() mockIn := testutil.ApplyMockIODiscardOutErr(cmd) @@ -232,7 +251,7 @@ func Test_runAddCmdDryRun(t *testing.T) { func TestAddRecoverFileBackend(t *testing.T) { cmd := AddKeyCommand() - cmd.Flags().AddFlagSet(Commands("home").PersistentFlags()) + cmd.Flags().AddFlagSet(Commands().PersistentFlags()) cdc := moduletestutil.MakeTestEncodingConfig().Codec mockIn := testutil.ApplyMockIODiscardOutErr(cmd) @@ -243,7 +262,7 @@ func TestAddRecoverFileBackend(t *testing.T) { cmd.SetArgs([]string{ "keyname1", - fmt.Sprintf("--%s=%s", flags.FlagHome, kbHome), + fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, kbHome), fmt.Sprintf("--%s=%s", flags.FlagOutput, flags.OutputFormatText), fmt.Sprintf("--%s=%s", flags.FlagKeyType, hd.Secp256k1Type), fmt.Sprintf("--%s=%s", flags.FlagKeyringBackend, keyring.BackendFile), diff --git a/client/keys/delete_test.go b/client/keys/delete_test.go index 49f897aece41..29246b1095dd 100644 --- a/client/keys/delete_test.go +++ b/client/keys/delete_test.go @@ -21,7 +21,7 @@ func Test_runDeleteCmd(t *testing.T) { // Now add a temporary keybase kbHome := t.TempDir() cmd := DeleteKeyCommand() - cmd.Flags().AddFlagSet(Commands(kbHome).PersistentFlags()) + cmd.Flags().AddFlagSet(Commands().PersistentFlags()) mockIn := testutil.ApplyMockIODiscardOutErr(cmd) yesF, _ := cmd.Flags().GetBool(flagYes) @@ -36,7 +36,7 @@ func Test_runDeleteCmd(t *testing.T) { path := sdk.GetConfig().GetFullBIP44Path() cdc := moduletestutil.MakeTestEncodingConfig().Codec - cmd.SetArgs([]string{"blah", fmt.Sprintf("--%s=%s", flags.FlagHome, kbHome)}) + cmd.SetArgs([]string{"blah", fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, kbHome)}) kb, err := keyring.New(sdk.KeyringServiceName(), keyring.BackendTest, kbHome, mockIn, cdc) require.NoError(t, err) @@ -59,7 +59,7 @@ func Test_runDeleteCmd(t *testing.T) { // User confirmation missing cmd.SetArgs([]string{ fakeKeyName1, - fmt.Sprintf("--%s=%s", flags.FlagHome, kbHome), + fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, kbHome), fmt.Sprintf("--%s=%s", flags.FlagKeyringBackend, keyring.BackendTest), }) err = cmd.Execute() @@ -72,7 +72,7 @@ func Test_runDeleteCmd(t *testing.T) { // Now there is a confirmation cmd.SetArgs([]string{ fakeKeyName1, - fmt.Sprintf("--%s=%s", flags.FlagHome, kbHome), + fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, kbHome), fmt.Sprintf("--%s=true", flagYes), fmt.Sprintf("--%s=%s", flags.FlagKeyringBackend, keyring.BackendTest), }) @@ -86,7 +86,7 @@ func Test_runDeleteCmd(t *testing.T) { cmd.SetArgs([]string{ fakeKeyName2, - fmt.Sprintf("--%s=%s", flags.FlagHome, kbHome), + fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, kbHome), fmt.Sprintf("--%s=true", flagYes), fmt.Sprintf("--%s=%s", flags.FlagKeyringBackend, keyring.BackendTest), }) diff --git a/client/keys/export_test.go b/client/keys/export_test.go index cd4dc98049c0..d7e4126f6a7c 100644 --- a/client/keys/export_test.go +++ b/client/keys/export_test.go @@ -9,14 +9,13 @@ import ( "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/crypto/hd" + "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/testdata" - moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/crypto/keyring" sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" ) func Test_runExportCmd(t *testing.T) { @@ -73,12 +72,12 @@ func Test_runExportCmd(t *testing.T) { kbHome := t.TempDir() defaultArgs := []string{ "keyname1", - fmt.Sprintf("--%s=%s", flags.FlagHome, kbHome), + fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, kbHome), fmt.Sprintf("--%s=%s", flags.FlagKeyringBackend, tc.keyringBackend), } cmd := ExportKeyCommand() - cmd.Flags().AddFlagSet(Commands("home").PersistentFlags()) + cmd.Flags().AddFlagSet(Commands().PersistentFlags()) cmd.SetArgs(append(defaultArgs, tc.extraArgs...)) mockIn, mockOut := testutil.ApplyMockIO(cmd) diff --git a/client/keys/import.go b/client/keys/import.go index a9d5c185acb7..98ccb6547ff0 100644 --- a/client/keys/import.go +++ b/client/keys/import.go @@ -2,12 +2,16 @@ package keys import ( "bufio" + "fmt" "os" "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/input" + "github.com/cosmos/cosmos-sdk/crypto/hd" + "github.com/cosmos/cosmos-sdk/version" ) // ImportKeyCommand imports private keys from a keyfile. @@ -38,3 +42,22 @@ func ImportKeyCommand() *cobra.Command { }, } } + +func ImportKeyHexCommand() *cobra.Command { + cmd := &cobra.Command{ + Use: "import-hex ", + Short: "Import private keys into the local keybase", + Long: fmt.Sprintf("Import hex encoded private key into the local keybase.\nSupported key-types can be obtained with:\n%s list-key-types", version.AppName), + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + keyType, _ := cmd.Flags().GetString(flags.FlagKeyType) + return clientCtx.Keyring.ImportPrivKeyHex(args[0], args[1], keyType) + }, + } + cmd.Flags().String(flags.FlagKeyType, string(hd.Secp256k1Type), "private key signing algorithm kind") + return cmd +} diff --git a/client/keys/import_test.go b/client/keys/import_test.go index d9b9d0fee79f..0cff5065d82c 100644 --- a/client/keys/import_test.go +++ b/client/keys/import_test.go @@ -76,11 +76,16 @@ HbP+c6JmeJy9JXe2rbbF1QtCX1gLqGcDQPBXiCtFvP7/8wTZtVOPj8vREzhZ9ElO for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { cmd := ImportKeyCommand() - cmd.Flags().AddFlagSet(Commands("home").PersistentFlags()) + cmd.Flags().AddFlagSet(Commands().PersistentFlags()) mockIn := testutil.ApplyMockIODiscardOutErr(cmd) // Now add a temporary keybase - kbHome := t.TempDir() + kbHome := filepath.Join(t.TempDir(), fmt.Sprintf("kbhome-%s", tc.name)) + // Create dir, otherwise os.WriteFile will fail + if _, err := os.Stat(kbHome); os.IsNotExist(err) { + err = os.MkdirAll(kbHome, 0o700) + require.NoError(t, err) + } kb, err := keyring.New(sdk.KeyringServiceName(), tc.keyringBackend, kbHome, nil, cdc) require.NoError(t, err) @@ -115,3 +120,60 @@ HbP+c6JmeJy9JXe2rbbF1QtCX1gLqGcDQPBXiCtFvP7/8wTZtVOPj8vREzhZ9ElO }) } } + +func Test_runImportHexCmd(t *testing.T) { + cdc := moduletestutil.MakeTestEncodingConfig().Codec + testCases := []struct { + name string + keyringBackend string + hexKey string + keyType string + expectError bool + }{ + { + name: "test backend success", + keyringBackend: keyring.BackendTest, + hexKey: "0xa3e57952e835ed30eea86a2993ac2a61c03e74f2085b3635bd94aa4d7ae0cfdf", + keyType: "secp256k1", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + cmd := ImportKeyHexCommand() + cmd.Flags().AddFlagSet(Commands().PersistentFlags()) + mockIn := testutil.ApplyMockIODiscardOutErr(cmd) + + // Now add a temporary keybase + kbHome := filepath.Join(t.TempDir(), fmt.Sprintf("kbhome-%s", tc.name)) + kb, err := keyring.New(sdk.KeyringServiceName(), tc.keyringBackend, kbHome, nil, cdc) + require.NoError(t, err) + + clientCtx := client.Context{}. + WithKeyringDir(kbHome). + WithKeyring(kb). + WithInput(mockIn). + WithCodec(cdc) + ctx := context.WithValue(context.Background(), client.ClientContextKey, &clientCtx) + + t.Cleanup(cleanupKeys(t, kb, "keyname1")) + + defer func() { + _ = os.RemoveAll(kbHome) + }() + + cmd.SetArgs([]string{ + "keyname1", tc.hexKey, + fmt.Sprintf("--%s=%s", flags.FlagKeyType, tc.keyType), + fmt.Sprintf("--%s=%s", flags.FlagKeyringBackend, tc.keyringBackend), + }) + + err = cmd.ExecuteContext(ctx) + if tc.expectError { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } +} diff --git a/client/keys/list.go b/client/keys/list.go index e3b3e4f8aea5..4d7140c605ab 100644 --- a/client/keys/list.go +++ b/client/keys/list.go @@ -1,10 +1,10 @@ package keys import ( - "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" ) const flagListNames = "list-names" diff --git a/client/keys/list_test.go b/client/keys/list_test.go index 9fd0b70fb276..21f00cd0d445 100644 --- a/client/keys/list_test.go +++ b/client/keys/list_test.go @@ -31,7 +31,7 @@ func cleanupKeys(t *testing.T, kb keyring.Keyring, keys ...string) func() { func Test_runListCmd(t *testing.T) { cmd := ListKeysCmd() - cmd.Flags().AddFlagSet(Commands("home").PersistentFlags()) + cmd.Flags().AddFlagSet(Commands().PersistentFlags()) kbHome1 := t.TempDir() kbHome2 := t.TempDir() @@ -62,7 +62,7 @@ func Test_runListCmd(t *testing.T) { tt := tt t.Run(tt.name, func(t *testing.T) { cmd.SetArgs([]string{ - fmt.Sprintf("--%s=%s", flags.FlagHome, tt.kbDir), + fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, tt.kbDir), fmt.Sprintf("--%s=false", flagListNames), }) @@ -71,7 +71,7 @@ func Test_runListCmd(t *testing.T) { } cmd.SetArgs([]string{ - fmt.Sprintf("--%s=%s", flags.FlagHome, tt.kbDir), + fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, tt.kbDir), fmt.Sprintf("--%s=true", flagListNames), }) diff --git a/client/keys/migrate.go b/client/keys/migrate.go index 0a9fc78e2143..b2e192dffb93 100644 --- a/client/keys/migrate.go +++ b/client/keys/migrate.go @@ -18,8 +18,6 @@ Otherwise, we try to deserialize it using Amino into LegacyInfo. If this attempt LegacyInfo to Protobuf serialization format and overwrite the keyring entry. If any error occurred, it will be outputted in CLI and migration will be continued until all keys in the keyring DB are exhausted. See https://github.com/cosmos/cosmos-sdk/pull/9695 for more details. - -It is recommended to run in 'dry-run' mode first to verify all key migration material. `, Args: cobra.NoArgs, RunE: runMigrateCmd, diff --git a/client/keys/migrate_test.go b/client/keys/migrate_test.go index 8878f61755c0..bacbbacc7419 100644 --- a/client/keys/migrate_test.go +++ b/client/keys/migrate_test.go @@ -61,7 +61,7 @@ func (s *MigrateTestSuite) Test_runListAndShowCmd() { // run test simd keys list - to see that the migrated key is there cmd := ListKeysCmd() - cmd.Flags().AddFlagSet(Commands("home").PersistentFlags()) + cmd.Flags().AddFlagSet(Commands().PersistentFlags()) mockIn := testutil.ApplyMockIODiscardOutErr(cmd) kb, err := keyring.New(s.appName, keyring.BackendTest, s.dir, mockIn, s.cdc) @@ -75,7 +75,7 @@ func (s *MigrateTestSuite) Test_runListAndShowCmd() { ctx := context.WithValue(context.Background(), client.ClientContextKey, &clientCtx) cmd.SetArgs([]string{ - fmt.Sprintf("--%s=%s", flags.FlagHome, s.dir), + fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, s.dir), fmt.Sprintf("--%s=false", flagListNames), }) diff --git a/client/keys/output_test.go b/client/keys/output_test.go index 88ca42f9b152..fc8e4bf3214c 100644 --- a/client/keys/output_test.go +++ b/client/keys/output_test.go @@ -4,12 +4,11 @@ import ( "fmt" "testing" + "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - - "github.com/stretchr/testify/require" - "github.com/cosmos/cosmos-sdk/crypto/keyring" kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" @@ -45,6 +44,30 @@ func TestBech32KeysOutput(t *testing.T) { require.Equal(t, "{Name:multisig Type:multi Address:cosmos1nf8lf6n4wa43rzmdzwe6hkrnw5guekhqt595cw PubKey:{\"@type\":\"/cosmos.crypto.multisig.LegacyAminoPubKey\",\"threshold\":1,\"public_keys\":[{\"@type\":\"/cosmos.crypto.secp256k1.PubKey\",\"key\":\"AurroA7jvfPd1AadmmOvWM2rJSwipXfRf8yD6pLbA2DJ\"}]} Mnemonic:}", fmt.Sprintf("%+v", out)) } +// TestBech32KeysOutputNestedMsig tests that the output of a nested multisig key is correct +func TestBech32KeysOutputNestedMsig(t *testing.T) { + sk := secp256k1.PrivKey{Key: []byte{154, 49, 3, 117, 55, 232, 249, 20, 205, 216, 102, 7, 136, 72, 177, 2, 131, 202, 234, 81, 31, 208, 46, 244, 179, 192, 167, 163, 142, 117, 246, 13}} + tmpKey := sk.PubKey() + nestedMultiSig := kmultisig.NewLegacyAminoPubKey(1, []types.PubKey{tmpKey}) + multisigPk := kmultisig.NewLegacyAminoPubKey(2, []types.PubKey{tmpKey, nestedMultiSig}) + k, err := keyring.NewMultiRecord("multisig", multisigPk) + require.NotNil(t, k) + require.NoError(t, err) + + pubKey, err := k.GetPubKey() + require.NoError(t, err) + + accAddr := sdk.AccAddress(pubKey.Address()) + expectedOutput, err := NewKeyOutput(k.Name, k.GetType(), accAddr, multisigPk) + require.NoError(t, err) + + out, err := MkAccKeyOutput(k) + require.NoError(t, err) + + require.Equal(t, expectedOutput, out) + require.Equal(t, "{Name:multisig Type:multi Address:cosmos1nffp6v2j7wva4y4975exlrv8x5vh39axxt3swz PubKey:{\"@type\":\"/cosmos.crypto.multisig.LegacyAminoPubKey\",\"threshold\":2,\"public_keys\":[{\"@type\":\"/cosmos.crypto.secp256k1.PubKey\",\"key\":\"AurroA7jvfPd1AadmmOvWM2rJSwipXfRf8yD6pLbA2DJ\"},{\"@type\":\"/cosmos.crypto.multisig.LegacyAminoPubKey\",\"threshold\":1,\"public_keys\":[{\"@type\":\"/cosmos.crypto.secp256k1.PubKey\",\"key\":\"AurroA7jvfPd1AadmmOvWM2rJSwipXfRf8yD6pLbA2DJ\"}]}]} Mnemonic:}", fmt.Sprintf("%+v", out)) +} + func TestProtoMarshalJSON(t *testing.T) { require := require.New(t) pubkeys := generatePubKeys(3) diff --git a/client/keys/rename_test.go b/client/keys/rename_test.go index 40d7d579330b..8df5d641ba05 100644 --- a/client/keys/rename_test.go +++ b/client/keys/rename_test.go @@ -21,7 +21,7 @@ func Test_runRenameCmd(t *testing.T) { // temp keybase kbHome := t.TempDir() cmd := RenameKeyCommand() - cmd.Flags().AddFlagSet(Commands(kbHome).PersistentFlags()) + cmd.Flags().AddFlagSet(Commands().PersistentFlags()) mockIn := testutil.ApplyMockIODiscardOutErr(cmd) yesF, _ := cmd.Flags().GetBool(flagYes) @@ -47,7 +47,7 @@ func Test_runRenameCmd(t *testing.T) { ctx := context.WithValue(context.Background(), client.ClientContextKey, &clientCtx) // rename a key 'blah' which doesnt exist - cmd.SetArgs([]string{"blah", "blaah", fmt.Sprintf("--%s=%s", flags.FlagHome, kbHome)}) + cmd.SetArgs([]string{"blah", "blaah", fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, kbHome)}) err = cmd.ExecuteContext(ctx) require.Error(t, err) require.EqualError(t, err, "blah.info: key not found") @@ -56,7 +56,7 @@ func Test_runRenameCmd(t *testing.T) { cmd.SetArgs([]string{ fakeKeyName1, "nokey", - fmt.Sprintf("--%s=%s", flags.FlagHome, kbHome), + fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, kbHome), fmt.Sprintf("--%s=%s", flags.FlagKeyringBackend, keyring.BackendTest), }) err = cmd.Execute() @@ -70,7 +70,7 @@ func Test_runRenameCmd(t *testing.T) { cmd.SetArgs([]string{ fakeKeyName1, fakeKeyName2, - fmt.Sprintf("--%s=%s", flags.FlagHome, kbHome), + fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, kbHome), fmt.Sprintf("--%s=true", flagYes), fmt.Sprintf("--%s=%s", flags.FlagKeyringBackend, keyring.BackendTest), }) @@ -100,7 +100,7 @@ func Test_runRenameCmd(t *testing.T) { cmd.SetArgs([]string{ fakeKeyName1, fakeKeyName2, - fmt.Sprintf("--%s=%s", flags.FlagHome, kbHome), + fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, kbHome), fmt.Sprintf("--%s=true", flagYes), fmt.Sprintf("--%s=%s", flags.FlagKeyringBackend, keyring.BackendTest), }) diff --git a/client/keys/root.go b/client/keys/root.go index 92fd3ae2e339..9dee7bd48e3a 100644 --- a/client/keys/root.go +++ b/client/keys/root.go @@ -8,7 +8,7 @@ import ( // Commands registers a sub-tree of commands to interact with // local private key storage. -func Commands(defaultNodeHome string) *cobra.Command { +func Commands() *cobra.Command { cmd := &cobra.Command{ Use: "keys", Short: "Manage your application's keys", @@ -41,6 +41,7 @@ The pass backend requires GnuPG: https://gnupg.org/ AddKeyCommand(), ExportKeyCommand(), ImportKeyCommand(), + ImportKeyHexCommand(), ListKeysCmd(), ListKeyTypesCmd(), ShowKeysCmd(), @@ -50,7 +51,6 @@ The pass backend requires GnuPG: https://gnupg.org/ MigrateCommand(), ) - cmd.PersistentFlags().String(flags.FlagHome, defaultNodeHome, "The application home directory") cmd.PersistentFlags().String(flags.FlagOutput, "text", "Output format (text|json)") flags.AddKeyringFlags(cmd.PersistentFlags()) diff --git a/client/keys/root_test.go b/client/keys/root_test.go index 20b3f1a23472..85009c221d06 100644 --- a/client/keys/root_test.go +++ b/client/keys/root_test.go @@ -7,9 +7,9 @@ import ( ) func TestCommands(t *testing.T) { - rootCommands := Commands("home") + rootCommands := Commands() assert.Assert(t, rootCommands != nil) // Commands are registered - assert.Equal(t, 11, len(rootCommands.Commands())) + assert.Equal(t, 12, len(rootCommands.Commands())) } diff --git a/client/keys/show.go b/client/keys/show.go index c65a000409d1..53ffa82ac8fd 100644 --- a/client/keys/show.go +++ b/client/keys/show.go @@ -44,9 +44,9 @@ consisting of all the keys provided by name and multisig threshold.`, } f := cmd.Flags() f.String(FlagBechPrefix, sdk.PrefixAccount, "The Bech32 prefix encoding for a key (acc|val|cons)") - f.BoolP(FlagAddress, "a", false, "Output the address only (overrides --output)") - f.BoolP(FlagPublicKey, "p", false, "Output the public key only (overrides --output)") - f.BoolP(FlagDevice, "d", false, "Output the address in a ledger device") + f.BoolP(FlagAddress, "a", false, "Output the address only (cannot be used with --output)") + f.BoolP(FlagPublicKey, "p", false, "Output the public key only (cannot be used with --output)") + f.BoolP(FlagDevice, "d", false, "Output the address in a ledger device (cannot be used with --pubkey)") f.Int(flagMultiSigThreshold, 1, "K out of N required signatures") return cmd diff --git a/client/keys/show_test.go b/client/keys/show_test.go index 7a180c1a10c5..59d3b2a3247c 100644 --- a/client/keys/show_test.go +++ b/client/keys/show_test.go @@ -49,7 +49,7 @@ func Test_showKeysCmd(t *testing.T) { func Test_runShowCmd(t *testing.T) { cmd := ShowKeysCmd() - cmd.Flags().AddFlagSet(Commands("home").PersistentFlags()) + cmd.Flags().AddFlagSet(Commands().PersistentFlags()) mockIn := testutil.ApplyMockIODiscardOutErr(cmd) kbHome := t.TempDir() @@ -87,7 +87,7 @@ func Test_runShowCmd(t *testing.T) { // Now try single key cmd.SetArgs([]string{ fakeKeyName1, - fmt.Sprintf("--%s=%s", flags.FlagHome, kbHome), + fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, kbHome), fmt.Sprintf("--%s=", FlagBechPrefix), fmt.Sprintf("--%s=%s", flags.FlagKeyringBackend, keyring.BackendTest), }) @@ -95,7 +95,7 @@ func Test_runShowCmd(t *testing.T) { cmd.SetArgs([]string{ fakeKeyName1, - fmt.Sprintf("--%s=%s", flags.FlagHome, kbHome), + fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, kbHome), fmt.Sprintf("--%s=%s", FlagBechPrefix, sdk.PrefixAccount), fmt.Sprintf("--%s=%s", flags.FlagKeyringBackend, keyring.BackendTest), }) @@ -110,7 +110,7 @@ func Test_runShowCmd(t *testing.T) { require.NoError(t, err) cmd.SetArgs([]string{ addr.String(), - fmt.Sprintf("--%s=%s", flags.FlagHome, kbHome), + fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, kbHome), fmt.Sprintf("--%s=%s", FlagBechPrefix, sdk.PrefixAccount), fmt.Sprintf("--%s=%s", flags.FlagKeyringBackend, keyring.BackendTest), }) @@ -120,7 +120,7 @@ func Test_runShowCmd(t *testing.T) { // Now try multisig key - set bech to acc cmd.SetArgs([]string{ fakeKeyName1, fakeKeyName2, - fmt.Sprintf("--%s=%s", flags.FlagHome, kbHome), + fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, kbHome), fmt.Sprintf("--%s=%s", FlagBechPrefix, sdk.PrefixAccount), fmt.Sprintf("--%s=0", flagMultiSigThreshold), fmt.Sprintf("--%s=%s", flags.FlagKeyringBackend, keyring.BackendTest), @@ -129,7 +129,7 @@ func Test_runShowCmd(t *testing.T) { cmd.SetArgs([]string{ fakeKeyName1, fakeKeyName2, - fmt.Sprintf("--%s=%s", flags.FlagHome, kbHome), + fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, kbHome), fmt.Sprintf("--%s=%s", FlagBechPrefix, sdk.PrefixAccount), fmt.Sprintf("--%s=2", flagMultiSigThreshold), fmt.Sprintf("--%s=%s", flags.FlagKeyringBackend, keyring.BackendTest), @@ -139,7 +139,7 @@ func Test_runShowCmd(t *testing.T) { // Now try multisig key - set bech to acc + threshold=2 cmd.SetArgs([]string{ fakeKeyName1, fakeKeyName2, - fmt.Sprintf("--%s=%s", flags.FlagHome, kbHome), + fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, kbHome), fmt.Sprintf("--%s=acc", FlagBechPrefix), fmt.Sprintf("--%s=true", FlagDevice), fmt.Sprintf("--%s=2", flagMultiSigThreshold), @@ -149,7 +149,7 @@ func Test_runShowCmd(t *testing.T) { cmd.SetArgs([]string{ fakeKeyName1, fakeKeyName2, - fmt.Sprintf("--%s=%s", flags.FlagHome, kbHome), + fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, kbHome), fmt.Sprintf("--%s=val", FlagBechPrefix), fmt.Sprintf("--%s=true", FlagDevice), fmt.Sprintf("--%s=2", flagMultiSigThreshold), @@ -159,7 +159,7 @@ func Test_runShowCmd(t *testing.T) { cmd.SetArgs([]string{ fakeKeyName1, fakeKeyName2, - fmt.Sprintf("--%s=%s", flags.FlagHome, kbHome), + fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, kbHome), fmt.Sprintf("--%s=val", FlagBechPrefix), fmt.Sprintf("--%s=true", FlagDevice), fmt.Sprintf("--%s=2", flagMultiSigThreshold), diff --git a/client/prompt_validation_test.go b/client/prompt_validation_test.go index eba30c21c441..488aa03e5414 100644 --- a/client/prompt_validation_test.go +++ b/client/prompt_validation_test.go @@ -3,8 +3,9 @@ package client_test import ( "testing" - "github.com/cosmos/cosmos-sdk/client" "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/client" ) func TestValidatePromptNotEmpty(t *testing.T) { diff --git a/client/pruning/main.go b/client/pruning/main.go index c9442d3df909..51dc5f9c2162 100644 --- a/client/pruning/main.go +++ b/client/pruning/main.go @@ -4,13 +4,13 @@ import ( "fmt" "path/filepath" + dbm "github.com/cosmos/cosmos-db" "github.com/spf13/cobra" "github.com/spf13/viper" "cosmossdk.io/log" pruningtypes "cosmossdk.io/store/pruning/types" "cosmossdk.io/store/rootmulti" - dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/server" @@ -21,41 +21,50 @@ const FlagAppDBBackend = "app-db-backend" // Cmd prunes the sdk root multi store history versions based on the pruning options // specified by command flags. -func Cmd(appCreator servertypes.AppCreator) *cobra.Command { +func Cmd(appCreator servertypes.AppCreator, defaultNodeHome string) *cobra.Command { cmd := &cobra.Command{ - Use: "prune", + Use: "prune [pruning-method]", Short: "Prune app history states by keeping the recent heights and deleting old heights", Long: `Prune app history states by keeping the recent heights and deleting old heights. - The pruning option is provided via the '--pruning' flag or alternatively with '--pruning-keep-recent' - - For '--pruning' the options are as follows: - - default: the last 362880 states are kept - nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) - everything: 2 latest states will be kept - custom: allow pruning options to be manually specified through 'pruning-keep-recent'. - besides pruning options, database home directory and database backend type should also be specified via flags - '--home' and '--app-db-backend'. - valid app-db-backend type includes 'goleveldb', 'rocksdb', 'pebbledb'. - `, - Example: "prune --home './' --app-db-backend 'goleveldb' --pruning 'custom' --pruning-keep-recent 100", - RunE: func(cmd *cobra.Command, _ []string) error { - vp := viper.New() +The pruning option is provided via the 'pruning' argument or alternatively with '--pruning-keep-recent' - // Bind flags to the Context's Viper so we can get pruning options. +- default: the last 362880 states are kept +- nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) +- everything: 2 latest states will be kept +- custom: allow pruning options to be manually specified through 'pruning-keep-recent' + +Note: When the --app-db-backend flag is not specified, the default backend type is 'goleveldb'. +Supported app-db-backend types include 'goleveldb', 'rocksdb', 'pebbledb'.`, + Example: "prune custom --pruning-keep-recent 100 --app-db-backend 'goleveldb'", + Args: cobra.RangeArgs(0, 1), + RunE: func(cmd *cobra.Command, args []string) error { + // bind flags to the Context's Viper so we can get pruning options. + vp := viper.New() if err := vp.BindPFlags(cmd.Flags()); err != nil { return err } + + // use the first argument if present to set the pruning method + if len(args) > 0 { + vp.Set(server.FlagPruning, args[0]) + } else { + vp.Set(server.FlagPruning, pruningtypes.PruningOptionDefault) + } pruningOptions, err := server.GetPruningOptionsFromFlags(vp) if err != nil { return err } - fmt.Printf("get pruning options from command flags, strategy: %v, keep-recent: %v\n", + + cmd.Printf("get pruning options from command flags, strategy: %v, keep-recent: %v\n", pruningOptions.Strategy, pruningOptions.KeepRecent, ) home := vp.GetString(flags.FlagHome) + if home == "" { + home = defaultNodeHome + } + db, err := openDB(home, server.GetAppDBBackend(vp)) if err != nil { return err @@ -76,23 +85,20 @@ func Cmd(appCreator servertypes.AppCreator) *cobra.Command { } pruningHeight := latestHeight - int64(pruningOptions.KeepRecent) - fmt.Printf( - "pruning heights up to %v\n", - pruningHeight, - ) + cmd.Printf("pruning heights up to %v\n", pruningHeight) err = rootMultiStore.PruneStores(pruningHeight) if err != nil { return err } - fmt.Printf("successfully pruned the application root multi stores\n") + + cmd.Println("successfully pruned the application root multi stores") return nil }, } - cmd.Flags().String(flags.FlagHome, "", "The database home directory") + cmd.Flags().String(flags.FlagHome, defaultNodeHome, "The application home directory") cmd.Flags().String(FlagAppDBBackend, "", "The type of database for application and snapshots databases") - cmd.Flags().String(server.FlagPruning, pruningtypes.PruningOptionDefault, "Pruning strategy (default|nothing|everything|custom)") cmd.Flags().Uint64(server.FlagPruningKeepRecent, 0, "Number of recent heights to keep on disk (ignored if pruning is not 'custom')") cmd.Flags().Uint64(server.FlagPruningInterval, 10, `Height interval at which pruned heights are removed from disk (ignored if pruning is not 'custom'), diff --git a/client/rpc/block.go b/client/rpc/block.go index 93c710a857c5..d1b99d722942 100644 --- a/client/rpc/block.go +++ b/client/rpc/block.go @@ -6,10 +6,10 @@ import ( "fmt" "time" - "github.com/cosmos/cosmos-sdk/client" - cmt "github.com/cometbft/cometbft/proto/tendermint/types" coretypes "github.com/cometbft/cometbft/rpc/core/types" + + "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/client/rpc/rpc_test.go b/client/rpc/rpc_test.go index 3bd9c39ec867..bffdbf927d0e 100644 --- a/client/rpc/rpc_test.go +++ b/client/rpc/rpc_test.go @@ -11,8 +11,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/metadata" - "github.com/cosmos/cosmos-sdk/client/rpc" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/cosmos/cosmos-sdk/testutil/network" "github.com/cosmos/cosmos-sdk/testutil/testdata" "github.com/cosmos/cosmos-sdk/types/address" @@ -44,17 +42,6 @@ func (s *IntegrationTestSuite) TearDownSuite() { s.network.Cleanup() } -func (s *IntegrationTestSuite) TestStatusCommand() { - val0 := s.network.Validators[0] - cmd := rpc.StatusCommand() - - out, err := clitestutil.ExecTestCLICmd(val0.ClientCtx, cmd, []string{}) - s.Require().NoError(err) - - // Make sure the output has the validator moniker. - s.Require().Contains(out.String(), fmt.Sprintf("\"moniker\":\"%s\"", val0.Moniker)) -} - func (s *IntegrationTestSuite) TestCLIQueryConn() { s.T().Skip("data race in comet is causing this to fail") var header metadata.MD diff --git a/client/rpc/status.go b/client/rpc/status.go deleted file mode 100644 index c27d83d68526..000000000000 --- a/client/rpc/status.go +++ /dev/null @@ -1,89 +0,0 @@ -package rpc - -import ( - "context" - - "github.com/spf13/cobra" - - "github.com/cometbft/cometbft/p2p" - coretypes "github.com/cometbft/cometbft/rpc/core/types" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" -) - -// ValidatorInfo is info about the node's validator, same as CometBFT, -// except that we use our own PubKey. -type validatorInfo struct { - Address []byte - PubKey cryptotypes.PubKey - VotingPower int64 -} - -// ResultStatus is node's info, same as CometBFT, except that we use our own -// PubKey. -type resultStatus struct { - NodeInfo p2p.DefaultNodeInfo - SyncInfo coretypes.SyncInfo - ValidatorInfo validatorInfo -} - -// StatusCommand returns the command to return the status of the network. -func StatusCommand() *cobra.Command { - cmd := &cobra.Command{ - Use: "status", - Short: "Query remote node for status", - RunE: func(cmd *cobra.Command, _ []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - status, err := getNodeStatus(clientCtx) - if err != nil { - return err - } - - var pk cryptotypes.PubKey - // `status` has TM pubkeys, we need to convert them to our pubkeys. - if status.ValidatorInfo.PubKey != nil { - pk, err = cryptocodec.FromCmtPubKeyInterface(status.ValidatorInfo.PubKey) - if err != nil { - return err - } - } - statusWithPk := resultStatus{ - NodeInfo: status.NodeInfo, - SyncInfo: status.SyncInfo, - ValidatorInfo: validatorInfo{ - Address: status.ValidatorInfo.Address, - PubKey: pk, - VotingPower: status.ValidatorInfo.VotingPower, - }, - } - - output, err := clientCtx.LegacyAmino.MarshalJSON(statusWithPk) - if err != nil { - return err - } - - cmd.Println(string(output)) - return nil - }, - } - - cmd.Flags().StringP(flags.FlagNode, "n", "tcp://localhost:26657", "Node to connect to") - - return cmd -} - -func getNodeStatus(clientCtx client.Context) (*coretypes.ResultStatus, error) { - node, err := clientCtx.GetNode() - if err != nil { - return &coretypes.ResultStatus{}, err - } - - return node.Status(context.Background()) -} diff --git a/client/rpc/tx.go b/client/rpc/tx.go new file mode 100644 index 000000000000..429dff59caa2 --- /dev/null +++ b/client/rpc/tx.go @@ -0,0 +1,226 @@ +package rpc + +import ( + "context" + "encoding/hex" + "encoding/json" + "fmt" + "io" + "strings" + "time" + + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + coretypes "github.com/cometbft/cometbft/rpc/core/types" + tmtypes "github.com/cometbft/cometbft/types" + "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/version" +) + +const TimeoutFlag = "timeout" + +func newTxResponseCheckTx(res *coretypes.ResultBroadcastTxCommit) *sdk.TxResponse { + if res == nil { + return nil + } + + var txHash string + if res.Hash != nil { + txHash = res.Hash.String() + } + + parsedLogs, _ := sdk.ParseABCILogs(res.CheckTx.Log) + + return &sdk.TxResponse{ + Height: res.Height, + TxHash: txHash, + Codespace: res.CheckTx.Codespace, + Code: res.CheckTx.Code, + Data: strings.ToUpper(hex.EncodeToString(res.CheckTx.Data)), + RawLog: res.CheckTx.Log, + Logs: parsedLogs, + Info: res.CheckTx.Info, + GasWanted: res.CheckTx.GasWanted, + GasUsed: res.CheckTx.GasUsed, + Events: res.CheckTx.Events, + } +} + +func newTxResponseDeliverTx(res *coretypes.ResultBroadcastTxCommit) *sdk.TxResponse { + if res == nil { + return nil + } + + var txHash string + if res.Hash != nil { + txHash = res.Hash.String() + } + + parsedLogs, _ := sdk.ParseABCILogs(res.TxResult.Log) + + return &sdk.TxResponse{ + Height: res.Height, + TxHash: txHash, + Codespace: res.TxResult.Codespace, + Code: res.TxResult.Code, + Data: strings.ToUpper(hex.EncodeToString(res.TxResult.Data)), + RawLog: res.TxResult.Log, + Logs: parsedLogs, + Info: res.TxResult.Info, + GasWanted: res.TxResult.GasWanted, + GasUsed: res.TxResult.GasUsed, + Events: res.TxResult.Events, + } +} + +func newResponseFormatBroadcastTxCommit(res *coretypes.ResultBroadcastTxCommit) *sdk.TxResponse { + if res == nil { + return nil + } + + if !res.CheckTx.IsOK() { + return newTxResponseCheckTx(res) + } + + return newTxResponseDeliverTx(res) +} + +// QueryEventForTxCmd is an alias for WaitTxCmd, kept for backwards compatibility. +func QueryEventForTxCmd() *cobra.Command { + return WaitTxCmd() +} + +// WaitTx returns a CLI command that waits for a transaction with the given hash to be included in a block. +func WaitTxCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "wait-tx [hash]", + Aliases: []string{"event-query-tx-for"}, + Short: "Wait for a transaction to be included in a block", + Long: `Subscribes to a CometBFT WebSocket connection and waits for a transaction event with the given hash.`, + Example: fmt.Sprintf(`By providing the transaction hash: +$ %[1]s q wait-tx [hash] + +Or, by piping a "tx" command: +$ %[1]s tx [flags] | %[1]s q wait-tx +`, version.AppName), + Args: cobra.MaximumNArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + timeout, err := cmd.Flags().GetDuration(TimeoutFlag) + if err != nil { + return err + } + + c, err := rpchttp.New(clientCtx.NodeURI, "/websocket") + if err != nil { + return err + } + if err := c.Start(); err != nil { + return err + } + defer c.Stop() //nolint:errcheck // ignore stop error + + ctx, cancel := context.WithTimeout(context.Background(), timeout) + defer cancel() + + var hash []byte + if len(args) == 0 { + // read hash from stdin + in, err := io.ReadAll(cmd.InOrStdin()) + if err != nil { + return err + } + hashByt, err := parseHashFromInput(in) + if err != nil { + return err + } + + hash = hashByt + } else { + // read hash from args + hashByt, err := hex.DecodeString(args[0]) + if err != nil { + return err + } + + hash = hashByt + } + + // subscribe to websocket events + query := fmt.Sprintf("%s='%s' AND %s='%X'", tmtypes.EventTypeKey, tmtypes.EventTx, tmtypes.TxHashKey, hash) + const subscriber = "subscriber" + eventCh, err := c.Subscribe(ctx, subscriber, query) + if err != nil { + return fmt.Errorf("failed to subscribe to tx: %w", err) + } + defer c.UnsubscribeAll(context.Background(), subscriber) //nolint:errcheck // ignore unsubscribe error + + // return immediately if tx is already included in a block + res, err := c.Tx(ctx, hash, false) + if err == nil { + // tx already included in a block + res := &coretypes.ResultBroadcastTxCommit{ + TxResult: res.TxResult, + Hash: res.Hash, + Height: res.Height, + } + return clientCtx.PrintProto(newResponseFormatBroadcastTxCommit(res)) + } + + // tx not yet included in a block, wait for event on websocket + select { + case evt := <-eventCh: + if txe, ok := evt.Data.(tmtypes.EventDataTx); ok { + res := &coretypes.ResultBroadcastTxCommit{ + TxResult: txe.Result, + Hash: tmtypes.Tx(txe.Tx).Hash(), + Height: txe.Height, + } + return clientCtx.PrintProto(newResponseFormatBroadcastTxCommit(res)) + } + case <-ctx.Done(): + return errors.ErrLogic.Wrapf("timed out waiting for transaction %X to be included in a block", hash) + } + return nil + }, + } + + cmd.Flags().Duration(TimeoutFlag, 15*time.Second, "The maximum time to wait for the transaction to be included in a block") + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +func parseHashFromInput(in []byte) ([]byte, error) { + // The content of in is expected to be the result of a tx command which should be using GenerateOrBroadcastTxCLI. + // That outputs a sdk.TxResponse as either the json or yaml. As json, we can't unmarshal it back into that struct, + // though, because the height field ends up quoted which confuses json.Unmarshal (because it's for an int64 field). + + // Try to find the txhash from json ouptut. + resultTx := make(map[string]json.RawMessage) + if err := json.Unmarshal(in, &resultTx); err == nil && len(resultTx["txhash"]) > 0 { + // input was JSON, return the hash + hash := strings.Trim(strings.TrimSpace(string(resultTx["txhash"])), `"`) + if len(hash) > 0 { + return hex.DecodeString(hash) + } + } + + // Try to find the txhash from yaml output. + lines := strings.Split(string(in), "\n") + for _, line := range lines { + if strings.HasPrefix(line, "txhash:") { + hash := strings.TrimSpace(line[len("txhash:"):]) + return hex.DecodeString(hash) + } + } + return nil, fmt.Errorf("txhash not found") +} diff --git a/client/rpc/validators.go b/client/rpc/validators.go index 55c2262a8881..7facee4259d4 100644 --- a/client/rpc/validators.go +++ b/client/rpc/validators.go @@ -1,24 +1,16 @@ package rpc import ( - "context" - "fmt" "strconv" - "strings" - cmttypes "github.com/cometbft/cometbft/types" "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" "github.com/cosmos/cosmos-sdk/types/query" ) -// TODO these next two functions feel kinda hacky based on their placement - // ValidatorCommand returns the validator set for a given height func ValidatorCommand() *cobra.Command { cmd := &cobra.Command{ @@ -49,12 +41,12 @@ func ValidatorCommand() *cobra.Command { page, _ := cmd.Flags().GetInt(flags.FlagPage) limit, _ := cmd.Flags().GetInt(flags.FlagLimit) - result, err := GetValidators(cmd.Context(), clientCtx, height, &page, &limit) + response, err := cmtservice.ValidatorsOutput(cmd.Context(), clientCtx, height, page, limit) if err != nil { return err } - return clientCtx.PrintObjectLegacy(result) + return clientCtx.PrintProto(response) }, } @@ -65,84 +57,3 @@ func ValidatorCommand() *cobra.Command { return cmd } - -// Validator output -type ValidatorOutput struct { - Address sdk.ConsAddress `json:"address"` - PubKey cryptotypes.PubKey `json:"pub_key"` - ProposerPriority int64 `json:"proposer_priority"` - VotingPower int64 `json:"voting_power"` -} - -// Validators at a certain height output in bech32 format -type ResultValidatorsOutput struct { - BlockHeight int64 `json:"block_height"` - Validators []ValidatorOutput `json:"validators"` - Total uint64 `json:"total"` -} - -func (rvo ResultValidatorsOutput) String() string { - var b strings.Builder - - fmt.Fprintf(&b, "block height: %d\n", rvo.BlockHeight) - fmt.Fprintf(&b, "total count: %d\n", rvo.Total) - - for _, val := range rvo.Validators { - fmt.Fprintf(&b, ` - Address: %s - Pubkey: %s - ProposerPriority: %d - VotingPower: %d - `, - val.Address, val.PubKey, val.ProposerPriority, val.VotingPower, - ) - } - - return b.String() -} - -func validatorOutput(validator *cmttypes.Validator) (ValidatorOutput, error) { - pk, err := cryptocodec.FromCmtPubKeyInterface(validator.PubKey) - if err != nil { - return ValidatorOutput{}, err - } - - return ValidatorOutput{ - Address: sdk.ConsAddress(validator.Address), - PubKey: pk, - ProposerPriority: validator.ProposerPriority, - VotingPower: validator.VotingPower, - }, nil -} - -// GetValidators from client -func GetValidators(ctx context.Context, clientCtx client.Context, height *int64, page, limit *int) (ResultValidatorsOutput, error) { - // get the node - node, err := clientCtx.GetNode() - if err != nil { - return ResultValidatorsOutput{}, err - } - - validatorsRes, err := node.Validators(ctx, height, page, limit) - if err != nil { - return ResultValidatorsOutput{}, err - } - - total := validatorsRes.Total - if validatorsRes.Total < 0 { - total = 0 - } - out := ResultValidatorsOutput{ - BlockHeight: validatorsRes.BlockHeight, - Validators: make([]ValidatorOutput, len(validatorsRes.Validators)), - Total: uint64(total), - } - for i := 0; i < len(validatorsRes.Validators); i++ { - out.Validators[i], err = validatorOutput(validatorsRes.Validators[i]) - if err != nil { - return out, err - } - } - - return out, nil -} diff --git a/client/snapshot/cmd.go b/client/snapshot/cmd.go index 14388bc8d05e..af7853eb2354 100644 --- a/client/snapshot/cmd.go +++ b/client/snapshot/cmd.go @@ -1,8 +1,9 @@ package snapshot import ( - servertypes "github.com/cosmos/cosmos-sdk/server/types" "github.com/spf13/cobra" + + servertypes "github.com/cosmos/cosmos-sdk/server/types" ) // Cmd returns the snapshots group command diff --git a/client/snapshot/delete.go b/client/snapshot/delete.go index 0259032e1134..3bf322982925 100644 --- a/client/snapshot/delete.go +++ b/client/snapshot/delete.go @@ -3,8 +3,9 @@ package snapshot import ( "strconv" - "github.com/cosmos/cosmos-sdk/server" "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/server" ) func DeleteSnapshotCmd() *cobra.Command { diff --git a/client/snapshot/dump.go b/client/snapshot/dump.go index 72dadbc57254..99cfe3d2d7c3 100644 --- a/client/snapshot/dump.go +++ b/client/snapshot/dump.go @@ -9,8 +9,9 @@ import ( "os" "strconv" - "github.com/cosmos/cosmos-sdk/server" "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/server" ) // DumpArchiveCmd returns a command to dump the snapshot as portable archive format diff --git a/client/snapshot/export.go b/client/snapshot/export.go index b6b083dff7e5..87c5f02e91c9 100644 --- a/client/snapshot/export.go +++ b/client/snapshot/export.go @@ -1,10 +1,12 @@ package snapshot import ( + "github.com/spf13/cobra" + "cosmossdk.io/log" + "github.com/cosmos/cosmos-sdk/server" servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/spf13/cobra" ) // ExportSnapshotCmd returns a command to take a snapshot of the application state diff --git a/client/snapshot/list.go b/client/snapshot/list.go index 78612bf916ee..501bfd7c5291 100644 --- a/client/snapshot/list.go +++ b/client/snapshot/list.go @@ -3,8 +3,9 @@ package snapshot import ( "fmt" - "github.com/cosmos/cosmos-sdk/server" "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/server" ) // ListSnapshotsCmd returns the command to list local snapshots diff --git a/client/snapshot/load.go b/client/snapshot/load.go index 0e6d012aa772..ba37d214061e 100644 --- a/client/snapshot/load.go +++ b/client/snapshot/load.go @@ -10,10 +10,11 @@ import ( "reflect" "strconv" - "github.com/cosmos/cosmos-sdk/server" "github.com/spf13/cobra" snapshottypes "cosmossdk.io/store/snapshots/types" + + "github.com/cosmos/cosmos-sdk/server" ) const SnapshotFileName = "_snapshot" diff --git a/client/snapshot/restore.go b/client/snapshot/restore.go index 5d3f45099297..e1833da6b7af 100644 --- a/client/snapshot/restore.go +++ b/client/snapshot/restore.go @@ -4,10 +4,11 @@ import ( "path/filepath" "strconv" - "cosmossdk.io/log" + dbm "github.com/cosmos/cosmos-db" "github.com/spf13/cobra" - dbm "github.com/cosmos/cosmos-db" + "cosmossdk.io/log" + "github.com/cosmos/cosmos-sdk/server" servertypes "github.com/cosmos/cosmos-sdk/server/types" ) diff --git a/client/tx/aux_builder.go b/client/tx/aux_builder.go index 813d90f872af..be9616ae759e 100644 --- a/client/tx/aux_builder.go +++ b/client/tx/aux_builder.go @@ -6,10 +6,10 @@ import ( "github.com/cosmos/gogoproto/proto" "google.golang.org/protobuf/types/known/anypb" - basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" txsigning "cosmossdk.io/x/tx/signing" "cosmossdk.io/x/tx/signing/aminojson" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -129,12 +129,6 @@ func (b *AuxTxBuilder) SetSignMode(mode signing.SignMode) error { return nil } -// SetTip sets an optional tip in the AuxSignerData. -func (b *AuxTxBuilder) SetTip(tip *tx.Tip) { - b.checkEmptyFields() - b.auxSignerData.SignDoc.Tip = tip -} - // SetSignature sets the aux signer's signature in the AuxSignerData. func (b *AuxTxBuilder) SetSignature(sig []byte) { b.checkEmptyFields() @@ -213,11 +207,7 @@ func (b *AuxTxBuilder) GetSignBytes() ([]byte, error) { handler := aminojson.NewSignModeHandler(aminojson.SignModeHandlerOptions{ FileResolver: proto.HybridResolver, }) - legacyTip := b.auxSignerData.SignDoc.Tip - tip := &txv1beta1.Tip{ - Amount: make([]*basev1beta1.Coin, len(legacyTip.Amount)), - Tipper: legacyTip.Tipper, - } + auxBody := &txv1beta1.TxBody{ Messages: body.Messages, Memo: body.Memo, @@ -229,12 +219,7 @@ func (b *AuxTxBuilder) GetSignBytes() ([]byte, error) { ExtensionOptions: nil, NonCriticalExtensionOptions: nil, } - for i, coin := range legacyTip.Amount { - tip.Amount[i] = &basev1beta1.Coin{ - Denom: coin.Denom, - Amount: coin.Amount.String(), - } - } + signBz, err = handler.GetSignBytes( context.Background(), txsigning.SignerData{ @@ -253,7 +238,6 @@ func (b *AuxTxBuilder) GetSignBytes() ([]byte, error) { // over empty fees. // ref: https://github.com/cosmos/cosmos-sdk/pull/10348 Fee: &txv1beta1.Fee{}, - Tip: tip, }, }, ) diff --git a/client/tx/aux_builder_test.go b/client/tx/aux_builder_test.go index 9a967192e50b..f34902b9a998 100644 --- a/client/tx/aux_builder_test.go +++ b/client/tx/aux_builder_test.go @@ -15,6 +15,21 @@ import ( typestx "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/bank" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" +) + +const ( + memo = "waboom" + timeoutHeight = uint64(5) +) + +var ( + _, pub1, addr1 = testdata.KeyTestPubAddr() + _, _, addr2 = testdata.KeyTestPubAddr() + rawSig = []byte("dummy") + msg1 = banktypes.NewMsgSend(addr1, addr2, sdk.NewCoins(sdk.NewInt64Coin("wack", 2))) + + chainID = "test-chain" ) func TestAuxTxBuilder(t *testing.T) { @@ -84,25 +99,11 @@ func TestAuxTxBuilder(t *testing.T) { }, true, "got unknown sign mode SIGN_MODE_UNSPECIFIED", }, - { - "GetSignBytes tipper should not be nil (if tip is set)", - func() error { - require.NoError(t, b.SetMsgs(msg1)) - require.NoError(t, b.SetPubKey(pub1)) - b.SetTip(&typestx.Tip{}) - require.NoError(t, b.SetSignMode(signing.SignMode_SIGN_MODE_DIRECT_AUX)) - - _, err := b.GetSignBytes() - return err - }, - true, "tipper cannot be empty", - }, { "GetSignBytes works for DIRECT_AUX", func() error { require.NoError(t, b.SetMsgs(msg1)) require.NoError(t, b.SetPubKey(pub1)) - b.SetTip(tip) require.NoError(t, b.SetSignMode(signing.SignMode_SIGN_MODE_DIRECT_AUX)) _, err := b.GetSignBytes() @@ -115,7 +116,6 @@ func TestAuxTxBuilder(t *testing.T) { func() error { require.NoError(t, b.SetMsgs(msg1)) require.NoError(t, b.SetPubKey(pub1)) - b.SetTip(tip) require.NoError(t, b.SetSignMode(signing.SignMode_SIGN_MODE_DIRECT_AUX)) _, err := b.GetSignBytes() @@ -131,7 +131,6 @@ func TestAuxTxBuilder(t *testing.T) { func() error { require.NoError(t, b.SetMsgs(msg1)) require.NoError(t, b.SetPubKey(pub1)) - b.SetTip(tip) b.SetAddress(addr1.String()) require.NoError(t, b.SetSignMode(signing.SignMode_SIGN_MODE_DIRECT_AUX)) @@ -153,7 +152,6 @@ func TestAuxTxBuilder(t *testing.T) { b.SetChainID(chainID) require.NoError(t, b.SetMsgs(msg1)) require.NoError(t, b.SetPubKey(pub1)) - b.SetTip(tip) b.SetAddress(addr1.String()) err := b.SetSignMode(signing.SignMode_SIGN_MODE_DIRECT_AUX) require.NoError(t, err) @@ -176,7 +174,6 @@ func TestAuxTxBuilder(t *testing.T) { func() error { require.NoError(t, b.SetMsgs(msg1)) require.NoError(t, b.SetPubKey(pub1)) - b.SetTip(tip) b.SetAddress(addr1.String()) err := b.SetSignMode(signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON) require.NoError(t, err) @@ -196,7 +193,6 @@ func TestAuxTxBuilder(t *testing.T) { b.SetChainID(chainID) require.NoError(t, b.SetMsgs(msg1)) require.NoError(t, b.SetPubKey(pub1)) - b.SetTip(tip) b.SetAddress(addr1.String()) err := b.SetSignMode(signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON) require.NoError(t, err) @@ -250,7 +246,6 @@ func checkCorrectData(t *testing.T, cdc codec.Codec, auxSignerData typestx.AuxSi require.Equal(t, chainID, auxSignerData.SignDoc.ChainId) require.Equal(t, msgAny, body.GetMessages()[0]) require.Equal(t, pkAny, auxSignerData.SignDoc.PublicKey) - require.Equal(t, tip, auxSignerData.SignDoc.Tip) require.Equal(t, signMode, auxSignerData.Mode) require.Equal(t, rawSig, auxSignerData.Sig) } diff --git a/client/tx/factory.go b/client/tx/factory.go index 082921fe4b40..1404139aea60 100644 --- a/client/tx/factory.go +++ b/client/tx/factory.go @@ -6,19 +6,19 @@ import ( "os" "strings" - "cosmossdk.io/math" + "github.com/cosmos/go-bip39" "github.com/spf13/pflag" - "github.com/cosmos/go-bip39" + "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keyring" + "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" ) @@ -34,11 +34,11 @@ type Factory struct { timeoutHeight uint64 gasAdjustment float64 chainID string + fromName string offline bool generateOnly bool memo string fees sdk.Coins - tip *tx.Tip feeGranter sdk.AccAddress feePayer sdk.AccAddress gasPrices sdk.DecCoins @@ -50,10 +50,8 @@ type Factory struct { // NewFactoryCLI creates a new Factory. func NewFactoryCLI(clientCtx client.Context, flagSet *pflag.FlagSet) (Factory, error) { - signModeStr := clientCtx.SignModeStr - signMode := signing.SignMode_SIGN_MODE_UNSPECIFIED - switch signModeStr { + switch clientCtx.SignModeStr { case flags.SignModeDirect: signMode = signing.SignMode_SIGN_MODE_DIRECT case flags.SignModeLegacyAminoJSON: @@ -88,6 +86,7 @@ func NewFactoryCLI(clientCtx client.Context, flagSet *pflag.FlagSet) (Factory, e accountRetriever: clientCtx.AccountRetriever, keybase: clientCtx.Keyring, chainID: clientCtx.ChainID, + fromName: clientCtx.FromName, offline: clientCtx.Offline, generateOnly: clientCtx.GenerateOnly, gas: gasSetting.Gas, @@ -105,11 +104,6 @@ func NewFactoryCLI(clientCtx client.Context, flagSet *pflag.FlagSet) (Factory, e feesStr, _ := flagSet.GetString(flags.FlagFees) f = f.WithFees(feesStr) - tipsStr, _ := flagSet.GetString(flags.FlagTip) - // Add tips to factory. The tipper is necessarily the Msg signer, i.e. - // the from address. - f = f.WithTips(tipsStr, clientCtx.FromAddress.String()) - gasPricesStr, _ := flagSet.GetString(flags.FlagGasPrices) f = f.WithGasPrices(gasPricesStr) @@ -129,6 +123,7 @@ func (f Factory) Fees() sdk.Coins { return f.fees } func (f Factory) GasPrices() sdk.DecCoins { return f.gasPrices } func (f Factory) AccountRetriever() client.AccountRetriever { return f.accountRetriever } func (f Factory) TimeoutHeight() uint64 { return f.timeoutHeight } +func (f Factory) FromName() string { return f.fromName } // SimulateAndExecute returns the option to simulate and then execute the transaction // using the gas from the simulation results @@ -169,20 +164,6 @@ func (f Factory) WithFees(fees string) Factory { return f } -// WithTips returns a copy of the Factory with an updated tip. -func (f Factory) WithTips(tip, tipper string) Factory { - parsedTips, err := sdk.ParseCoinsNormalized(tip) - if err != nil { - panic(err) - } - - f.tip = &tx.Tip{ - Tipper: tipper, - Amount: parsedTips, - } - return f -} - // WithGasPrices returns a copy of the Factory with updated gas prices. func (f Factory) WithGasPrices(gasPrices string) Factory { parsedGasPrices, err := sdk.ParseDecCoins(gasPrices) @@ -200,6 +181,13 @@ func (f Factory) WithKeybase(keybase keyring.Keyring) Factory { return f } +// WithFromName returns a copy of the Factory with updated fromName +// fromName will be use for building a simulation tx. +func (f Factory) WithFromName(fromName string) Factory { + f.fromName = fromName + return f +} + // WithSequence returns a copy of the Factory with an updated sequence number. func (f Factory) WithSequence(sequence uint64) Factory { f.sequence = sequence @@ -287,7 +275,7 @@ func (f Factory) PreprocessTx(keyname string, builder client.TxBuilder) error { // Example to add dynamic fee extension options: // // extOpt := ethermint.ExtensionOptionDynamicFeeTx{ -// MaxPriorityPrice: sdk.NewInt(1000000), +// MaxPriorityPrice: math.NewInt(1000000), // } // // extBytes, _ := extOpt.Marshal() @@ -310,10 +298,10 @@ func (f Factory) WithExtensionOptions(extOpts ...*codectypes.Any) Factory { func (f Factory) BuildUnsignedTx(msgs ...sdk.Msg) (client.TxBuilder, error) { if f.offline && f.generateOnly { if f.chainID != "" { - return nil, fmt.Errorf("chain ID cannot be used when offline and generate-only flags are set") + return nil, errors.New("chain ID cannot be used when offline and generate-only flags are set") } } else if f.chainID == "" { - return nil, fmt.Errorf("chain ID required but not specified") + return nil, errors.New("chain ID required but not specified") } fees := f.fees @@ -391,7 +379,12 @@ func (f Factory) PrintUnsignedTx(clientCtx client.Context, msgs ...sdk.Msg) erro return err } - json, err := clientCtx.TxConfig.TxJSONEncoder()(unsignedTx.GetTx()) + encoder := f.txConfig.TxJSONEncoder() + if encoder == nil { + return errors.New("cannot print unsigned tx: tx json encoder is nil") + } + + json, err := encoder(unsignedTx.GetTx()) if err != nil { return err } @@ -416,17 +409,20 @@ func (f Factory) BuildSimTx(msgs ...sdk.Msg) ([]byte, error) { // Create an empty signature literal as the ante handler will populate with a // sentinel pubkey. sig := signing.SignatureV2{ - PubKey: pk, - Data: &signing.SingleSignatureData{ - SignMode: f.signMode, - }, + PubKey: pk, + Data: f.getSimSignatureData(pk), Sequence: f.Sequence(), } if err := txb.SetSignatures(sig); err != nil { return nil, err } - return f.txConfig.TxEncoder()(txb.GetTx()) + encoder := f.txConfig.TxEncoder() + if encoder == nil { + return nil, fmt.Errorf("cannot simulate tx: tx encoder is nil") + } + + return encoder(txb.GetTx()) } // getSimPK gets the public key to use for building a simulation tx. @@ -440,16 +436,13 @@ func (f Factory) getSimPK() (cryptotypes.PubKey, error) { pk cryptotypes.PubKey = &secp256k1.PubKey{} // use default public key type ) - // Use the first element from the list of keys in order to generate a valid - // pubkey that supports multiple algorithms. if f.simulateAndExecute && f.keybase != nil { - records, _ := f.keybase.List() - if len(records) == 0 { - return nil, errors.New("cannot build signature for simulation, key records slice is empty") + record, err := f.keybase.Key(f.fromName) + if err != nil { + return nil, err } - // take the first record just for simulation purposes - pk, ok = records[0].PubKey.GetCachedValue().(cryptotypes.PubKey) + pk, ok = record.PubKey.GetCachedValue().(cryptotypes.PubKey) if !ok { return nil, errors.New("cannot build signature for simulation, failed to convert proto Any to public key") } @@ -458,6 +451,26 @@ func (f Factory) getSimPK() (cryptotypes.PubKey, error) { return pk, nil } +// getSimSignatureData based on the pubKey type gets the correct SignatureData type +// to use for building a simulation tx. +func (f Factory) getSimSignatureData(pk cryptotypes.PubKey) signing.SignatureData { + multisigPubKey, ok := pk.(*multisig.LegacyAminoPubKey) + if !ok { + return &signing.SingleSignatureData{SignMode: f.signMode} + } + + multiSignatureData := make([]signing.SignatureData, 0, multisigPubKey.Threshold) + for i := uint32(0); i < multisigPubKey.Threshold; i++ { + multiSignatureData = append(multiSignatureData, &signing.SingleSignatureData{ + SignMode: f.SignMode(), + }) + } + + return &signing.MultiSignatureData{ + Signatures: multiSignatureData, + } +} + // Prepare ensures the account defined by ctx.GetFromAddress() exists and // if the account number and/or the account sequence number are zero (not set), // they will be queried for and set on the provided Factory. diff --git a/client/tx/factory_test.go b/client/tx/factory_test.go index 7a8c4cc2dd46..402d178a98dc 100644 --- a/client/tx/factory_test.go +++ b/client/tx/factory_test.go @@ -1,34 +1,119 @@ -package tx_test +package tx import ( "testing" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/tx" "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + "github.com/cosmos/cosmos-sdk/crypto/hd" + "github.com/cosmos/cosmos-sdk/crypto/keyring" + "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + "github.com/cosmos/cosmos-sdk/types/tx/signing" ) -func TestFactoryPrepate(t *testing.T) { +func TestFactoryPrepare(t *testing.T) { t.Parallel() - factory := tx.Factory{} + factory := Factory{} clientCtx := client.Context{} output, err := factory.Prepare(clientCtx.WithOffline(true)) require.NoError(t, err) require.Equal(t, output, factory) - factory = tx.Factory{}.WithAccountRetriever(client.MockAccountRetriever{ReturnAccNum: 10, ReturnAccSeq: 1}).WithAccountNumber(5) + factory = Factory{}.WithAccountRetriever(client.MockAccountRetriever{ReturnAccNum: 10, ReturnAccSeq: 1}).WithAccountNumber(5) output, err = factory.Prepare(clientCtx.WithFrom("foo")) require.NoError(t, err) require.NotEqual(t, output, factory) require.Equal(t, output.AccountNumber(), uint64(5)) require.Equal(t, output.Sequence(), uint64(1)) - factory = tx.Factory{}.WithAccountRetriever(client.MockAccountRetriever{ReturnAccNum: 10, ReturnAccSeq: 1}) + factory = Factory{}.WithAccountRetriever(client.MockAccountRetriever{ReturnAccNum: 10, ReturnAccSeq: 1}) output, err = factory.Prepare(clientCtx.WithFrom("foo")) require.NoError(t, err) require.NotEqual(t, output, factory) require.Equal(t, output.AccountNumber(), uint64(10)) require.Equal(t, output.Sequence(), uint64(1)) } + +func TestFactory_getSimPKType(t *testing.T) { + // setup keyring + registry := codectypes.NewInterfaceRegistry() + cryptocodec.RegisterInterfaces(registry) + k := keyring.NewInMemory(codec.NewProtoCodec(registry)) + + tests := []struct { + name string + fromName string + genKey func(fromName string, k keyring.Keyring) error + wantType types.PubKey + }{ + { + name: "simple key", + fromName: "testKey", + genKey: func(fromName string, k keyring.Keyring) error { + _, err := k.NewAccount(fromName, testdata.TestMnemonic, "", "", hd.Secp256k1) + return err + }, + wantType: (*secp256k1.PubKey)(nil), + }, + { + name: "multisig key", + fromName: "multiKey", + genKey: func(fromName string, k keyring.Keyring) error { + pk := multisig.NewLegacyAminoPubKey(1, []types.PubKey{&multisig.LegacyAminoPubKey{}}) + _, err := k.SaveMultisig(fromName, pk) + return err + }, + wantType: (*multisig.LegacyAminoPubKey)(nil), + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.genKey(tt.fromName, k) + require.NoError(t, err) + f := Factory{ + keybase: k, + fromName: tt.fromName, + simulateAndExecute: true, + } + got, err := f.getSimPK() + require.NoError(t, err) + require.IsType(t, tt.wantType, got) + }) + } +} + +func TestFactory_getSimSignatureData(t *testing.T) { + tests := []struct { + name string + pk types.PubKey + wantType any + }{ + { + name: "simple pubkey", + pk: &secp256k1.PubKey{}, + wantType: (*signing.SingleSignatureData)(nil), + }, + { + name: "multisig pubkey", + pk: &multisig.LegacyAminoPubKey{}, + wantType: (*signing.MultiSignatureData)(nil), + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := Factory{}.getSimSignatureData(tt.pk) + require.IsType(t, tt.wantType, got) + }) + } +} diff --git a/client/tx/legacy_test.go b/client/tx/legacy_test.go deleted file mode 100644 index 2e337088cf2f..000000000000 --- a/client/tx/legacy_test.go +++ /dev/null @@ -1,23 +0,0 @@ -package tx_test - -import ( - "github.com/cosmos/cosmos-sdk/testutil/testdata" - "github.com/cosmos/cosmos-sdk/types" - typestx "github.com/cosmos/cosmos-sdk/types/tx" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" -) - -const ( - memo = "waboom" - timeoutHeight = uint64(5) -) - -var ( - _, pub1, addr1 = testdata.KeyTestPubAddr() - _, _, addr2 = testdata.KeyTestPubAddr() - rawSig = []byte("dummy") - msg1 = banktypes.NewMsgSend(addr1, addr2, types.NewCoins(types.NewInt64Coin("wack", 2))) - - chainID = "test-chain" - tip = &typestx.Tip{Tipper: addr1.String(), Amount: testdata.NewTestFeeAmount()} -) diff --git a/client/tx/tx.go b/client/tx/tx.go index d9446906c42a..f71111829627 100644 --- a/client/tx/tx.go +++ b/client/tx/tx.go @@ -100,9 +100,14 @@ func BroadcastTx(clientCtx client.Context, txf Factory, msgs ...sdk.Msg) error { } if !clientCtx.SkipConfirm { - txBytes, err := clientCtx.TxConfig.TxJSONEncoder()(tx.GetTx()) + encoder := txf.txConfig.TxJSONEncoder() + if encoder == nil { + return errors.New("failed to encode transaction: tx json encoder is nil") + } + + txBytes, err := encoder(tx.GetTx()) if err != nil { - return err + return fmt.Errorf("failed to encode transaction: %w", err) } if err := clientCtx.PrintRaw(json.RawMessage(txBytes)); err != nil { @@ -121,8 +126,7 @@ func BroadcastTx(clientCtx client.Context, txf Factory, msgs ...sdk.Msg) error { } } - err = Sign(clientCtx.CmdContext, txf, clientCtx.GetFromName(), tx, true) - if err != nil { + if err = Sign(clientCtx.CmdContext, txf, clientCtx.FromName, tx, true); err != nil { return err } @@ -318,9 +322,7 @@ func Sign(ctx context.Context, txf Factory, name string, txBuilder client.TxBuil return err } - bytesToSign, err := authsigning.GetSignBytesAdapter( - ctx, txf.txConfig.SignModeHandler(), - signMode, signerData, txBuilder.GetTx()) + bytesToSign, err := authsigning.GetSignBytesAdapter(ctx, txf.txConfig.SignModeHandler(), signMode, signerData, txBuilder.GetTx()) if err != nil { return err } @@ -393,13 +395,6 @@ func makeAuxSignerData(clientCtx client.Context, f Factory, msgs ...sdk.Msg) (tx return tx.AuxSignerData{}, err } - if f.tip != nil { - if _, err := sdk.AccAddressFromBech32(f.tip.Tipper); err != nil { - return tx.AuxSignerData{}, sdkerrors.ErrInvalidAddress.Wrap("tipper must be a bech32 address") - } - b.SetTip(f.tip) - } - err = b.SetSignMode(f.SignMode()) if err != nil { return tx.AuxSignerData{}, err diff --git a/client/tx/tx_test.go b/client/tx/tx_test.go index 386a2391e04c..c234739293a5 100644 --- a/client/tx/tx_test.go +++ b/client/tx/tx_test.go @@ -1,4 +1,4 @@ -package tx_test +package tx import ( "context" @@ -9,10 +9,7 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/grpc" - sdkmath "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/hd" @@ -82,7 +79,7 @@ func TestCalculateGas(t *testing.T) { defaultSignMode, err := signing.APISignModeToInternal(txCfg.SignModeHandler().DefaultMode()) require.NoError(t, err) - txf := tx.Factory{}. + txf := Factory{}. WithChainID("test-chain"). WithTxConfig(txCfg).WithSignMode(defaultSignMode) @@ -91,7 +88,7 @@ func TestCalculateGas(t *testing.T) { gasUsed: tc.args.mockGasUsed, wantErr: tc.args.mockWantErr, } - simRes, gotAdjusted, err := tx.CalculateGas(mockClientCtx, txf.WithGasAdjustment(stc.args.adjustment)) + simRes, gotAdjusted, err := CalculateGas(mockClientCtx, txf.WithGasAdjustment(stc.args.adjustment)) if stc.expPass { require.NoError(t, err) require.Equal(t, simRes.GasInfo.GasUsed, stc.wantEstimate) @@ -105,8 +102,8 @@ func TestCalculateGas(t *testing.T) { } } -func mockTxFactory(txCfg client.TxConfig) tx.Factory { - return tx.Factory{}. +func mockTxFactory(txCfg client.TxConfig) Factory { + return Factory{}. WithTxConfig(txCfg). WithAccountNumber(50). WithSequence(23). @@ -197,7 +194,7 @@ func TestMnemonicInMemo(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - txf := tx.Factory{}. + txf := Factory{}. WithTxConfig(txConfig). WithAccountNumber(50). WithSequence(23). @@ -268,7 +265,7 @@ func TestSign(t *testing.T) { testCases := []struct { name string - txf tx.Factory + txf Factory txb client.TxBuilder from string overwrite bool @@ -355,7 +352,7 @@ func TestSign(t *testing.T) { var prevSigs []signingtypes.SignatureV2 for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - err = tx.Sign(context.TODO(), tc.txf, tc.from, tc.txb, tc.overwrite) + err = Sign(context.TODO(), tc.txf, tc.from, tc.txb, tc.overwrite) if len(tc.expectedPKs) == 0 { requireT.Error(err) } else { @@ -371,6 +368,8 @@ func TestSign(t *testing.T) { } func TestPreprocessHook(t *testing.T) { + _, _, addr2 := testdata.KeyTestPubAddr() + txConfig, cdc := newTestTxConfig() requireT := require.New(t) path := hd.CreateHDPath(118, 0, 0).String() @@ -388,22 +387,12 @@ func TestPreprocessHook(t *testing.T) { extAny, err := codectypes.NewAnyWithValue(extVal) requireT.NoError(err) - coin := sdk.Coin{ - Denom: "atom", - Amount: sdkmath.NewInt(20), - } - newTip := &txtypes.Tip{ - Amount: sdk.Coins{coin}, - Tipper: "galaxy", - } - preprocessHook := client.PreprocessTxFn(func(chainID string, key keyring.KeyType, tx client.TxBuilder) error { extensionBuilder, ok := tx.(authtx.ExtensionOptionsTxBuilder) requireT.True(ok) // Set new extension and tip extensionBuilder.SetExtensionOptions(extAny) - tx.SetTip(newTip) return nil }) @@ -420,7 +409,7 @@ func TestPreprocessHook(t *testing.T) { txb, err := txfDirect.BuildUnsignedTx(msg1, msg2) requireT.NoError(err) - err = tx.Sign(context.TODO(), txfDirect, from, txb, false) + err = Sign(context.TODO(), txfDirect, from, txb, false) requireT.NoError(err) // Run preprocessing @@ -435,9 +424,6 @@ func TestPreprocessHook(t *testing.T) { opt := hasExtOptsTx.GetExtensionOptions()[0] requireT.Equal(opt, extAny) - - tip := txb.GetTx().GetTip() - requireT.Equal(tip, newTip) } func testSigners(require *require.Assertions, tr signing.Tx, pks ...cryptotypes.PubKey) []signingtypes.SignatureV2 { diff --git a/client/tx_config.go b/client/tx_config.go index 655e19cbeba7..4dd1caa01396 100644 --- a/client/tx_config.go +++ b/client/tx_config.go @@ -2,6 +2,7 @@ package client import ( txsigning "cosmossdk.io/x/tx/signing" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx" @@ -46,7 +47,6 @@ type ( SetFeeAmount(amount sdk.Coins) SetFeePayer(feePayer sdk.AccAddress) SetGasLimit(limit uint64) - SetTip(tip *tx.Tip) SetTimeoutHeight(height uint64) SetFeeGranter(feeGranter sdk.AccAddress) AddAuxSignerData(tx.AuxSignerData) error diff --git a/client/v2/CHANGELOG.md b/client/v2/CHANGELOG.md index 0c3c9d03857f..572d7817418a 100644 --- a/client/v2/CHANGELOG.md +++ b/client/v2/CHANGELOG.md @@ -35,3 +35,64 @@ Ref: https://keepachangelog.com/en/1.0.0/ # Changelog ## [Unreleased] + +### Improvements + +* [#22443](https://github.com/cosmos/cosmos-sdk/pull/22443) Add keyring flags in query commands. +* [#21936](https://github.com/cosmos/cosmos-sdk/pull/21936) Print possible enum values in error message after an invalid input was provided. + +### Bug Fixes + +* [#21809](https://github.com/cosmos/cosmos-sdk/pull/21809) Correctly handle enhanced sub commands. + +## [v2.0.0-beta.5] - 2024-09-18 + +### Improvements + +* [#21712](https://github.com/cosmos/cosmos-sdk/pull/21712) Marshal `type` field as proto message url in queries instead of amino name. + +## [v2.0.0-beta.4] - 2024-07-16 + +### Bug Fixes + +* [#20964](https://github.com/cosmos/cosmos-sdk/pull/20964) Fix `GetNodeHomeDirectory` helper in `client/v2/helpers` to respect the `(PREFIX)_HOME` environment variable. + +## [v2.0.0-beta.3] - 2024-07-15 + +### Features + +* [#20771](https://github.com/cosmos/cosmos-sdk/pull/20771) Add `GetNodeHomeDirectory` helper in `client/v2/helpers`. + +## [v2.0.0-beta.2] - 2024-06-19 + +### Features + +* [#19039](https://github.com/cosmos/cosmos-sdk/pull/19039) Add support for pubkey in autocli. + +### Improvements + +* [#19646](https://github.com/cosmos/cosmos-sdk/pull/19646) Use keyring from command context. +* (deps) [#19810](https://github.com/cosmos/cosmos-sdk/pull/19810) Upgrade SDK version due to prometheus breaking change. +* (deps) [#19810](https://github.com/cosmos/cosmos-sdk/pull/19810) Bump `cosmossdk.io/store` to v1.1.0. +* [#20083](https://github.com/cosmos/cosmos-sdk/pull/20083) Integrate latest version of cosmos-proto and improve version filtering. +* [#19618](https://github.com/cosmos/cosmos-sdk/pull/19618) Marshal enum as string in queries. +* [#19060](https://github.com/cosmos/cosmos-sdk/pull/19060) Use client context from root (or enhanced) command in autocli commands. + * Note, the given command must have a `client.Context` in its context. +* [#19216](https://github.com/cosmos/cosmos-sdk/pull/19216) Do not overwrite TxConfig, use directly the one provided in context. TxConfig should always be set in the `client.Context` in `root.go` of an app. +* [#20266](https://github.com/cosmos/cosmos-sdk/pull/20266) Add ability to override the short description in AutoCLI-generated top-level commands. + +### Bug Fixes + +* [#19976](https://github.com/cosmos/cosmos-sdk/pull/19976) Add encoder for `cosmos.base.v1beta1.DecCoin`. +* [#19377](https://github.com/cosmos/cosmos-sdk/pull/19377) Partly fix comment parsing in autocli. +* [#19060](https://github.com/cosmos/cosmos-sdk/pull/19060) Simplify key flag parsing logic in flag handler. +* [#20033](https://github.com/cosmos/cosmos-sdk/pull/20033) Respect output format from client ctx. + +### API Breaking Changes + +* [#19646](https://github.com/cosmos/cosmos-sdk/pull/19646) Remove keyring from `autocli.AppOptions` and `flag.Builder` options. + +## [v2.0.0-beta.1] - 2023-11-07 + +This is the first tagged version of client/v2. +It depends on the Cosmos SDK v0.50 release and fully supports AutoCLI. diff --git a/client/v2/Makefile b/client/v2/Makefile index 6868d1941a36..1b4bb0cbe7f6 100644 --- a/client/v2/Makefile +++ b/client/v2/Makefile @@ -1,2 +1,2 @@ codegen: - @(cd internal; buf generate) + @(cd internal; buf generate) \ No newline at end of file diff --git a/client/v2/README.md b/client/v2/README.md index 6ad3c31e9dde..06410452d638 100644 --- a/client/v2/README.md +++ b/client/v2/README.md @@ -1,7 +1,215 @@ +--- +sidebar_position: 1 +--- + # AutoCLI -The `autocli` package is a Go library for generating CLIs (command line interfaces) for Cosmos SDK-based applications. +:::note Synopsis +This document details how to build CLI and REST interfaces for a module. Examples from various Cosmos SDK modules are included. +::: + +:::note Pre-requisite Readings + +* [CLI](https://docs.cosmos.network/main/core/cli) + +::: + +The `autocli` (also known as `client/v2`) package is a [Go library](https://pkg.go.dev/cosmossdk.io/client/v2/autocli) for generating CLI (command line interface) interfaces for Cosmos SDK-based applications. It provides a simple way to add CLI commands to your application by generating them automatically based on your gRPC service definitions. Autocli generates CLI commands and flags directly from your protobuf messages, including options, input parameters, and output parameters. This means that you can easily add a CLI interface to your application without having to manually create and manage commands. + +## Overview + +`autocli` generates CLI commands and flags for each method defined in your gRPC service. By default, it generates commands for each gRPC services. The commands are named based on the name of the service method. + +For example, given the following protobuf definition for a service: + +```protobuf +service MyService { + rpc MyMethod(MyRequest) returns (MyResponse) {} +} +``` + +For instance, `autocli` would generate a command named `my-method` for the `MyMethod` method. The command will have flags for each field in the `MyRequest` message. + +It is possible to customize the generation of transactions and queries by defining options for each service. + +## Application Wiring + +Here are the steps to use AutoCLI: + +1. Ensure your app's modules implements the `appmodule.AppModule` interface. +2. (optional) Configure how behave `autocli` command generation, by implementing the `func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions` method on the module. +3. Use the `autocli.AppOptions` struct to specify the modules you defined. If you are using `depinject`, it can automatically create an instance of `autocli.AppOptions` based on your app's configuration. +4. Use the `EnhanceRootCommand()` method provided by `autocli` to add the CLI commands for the specified modules to your root command. + +:::tip +AutoCLI is additive only, meaning _enhancing_ the root command will only add subcommands that are not already registered. This means that you can use AutoCLI alongside other custom commands within your app. +::: + +Here's an example of how to use `autocli` in your app: + +``` go +// Define your app's modules +testModules := map[string]appmodule.AppModule{ + "testModule": &TestModule{}, +} + +// Define the autocli AppOptions +autoCliOpts := autocli.AppOptions{ + Modules: testModules, +} + +// Create the root command +rootCmd := &cobra.Command{ + Use: "app", +} + +if err := appOptions.EnhanceRootCommand(rootCmd); err != nil { + return err +} + +// Run the root command +if err := rootCmd.Execute(); err != nil { + return err +} +``` + +### Keyring + +`autocli` uses a keyring for key name resolving names and signing transactions. + +:::tip +AutoCLI provides a better UX than normal CLI as it allows to resolve key names directly from the keyring in all transactions and commands. + +```sh + q bank balances alice + tx bank send alice bob 1000denom +``` + +::: + +The keyring used for resolving names and signing transactions is provided via the `client.Context`. +The keyring is then converted to the `client/v2/autocli/keyring` interface. +If no keyring is provided, the `autocli` generated command will not be able to sign transactions, but will still be able to query the chain. + +:::tip +The Cosmos SDK keyring and Hubl keyring both implement the `client/v2/autocli/keyring` interface, thanks to the following wrapper: + +```go +keyring.NewAutoCLIKeyring(kb) +``` + +::: + +## Signing + +`autocli` supports signing transactions with the keyring. +The [`cosmos.msg.v1.signer` protobuf annotation](https://docs.cosmos.network/main/build/building-modules/protobuf-annotations) defines the signer field of the message. +This field is automatically filled when using the `--from` flag or defining the signer as a positional argument. + +:::warning +AutoCLI currently supports only one signer per transaction. +::: + +## Module Wiring & Customization + +The `AutoCLIOptions()` method on your module allows to specify custom commands, sub-commands or flags for each service, as it was a `cobra.Command` instance, within the `RpcCommandOptions` struct. Defining such options will customize the behavior of the `autocli` command generation, which by default generates a command for each method in your gRPC service. + +```go +*autocliv1.RpcCommandOptions{ + RpcMethod: "Params", // The name of the gRPC service + Use: "params", // Command usage that is displayed in the help + Short: "Query the parameters of the governance process", // Short description of the command + Long: "Query the parameters of the governance process. Specify specific param types (voting|tallying|deposit) to filter results.", // Long description of the command + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "params_type", Optional: true}, // Transform a flag into a positional argument + }, +} +``` + +### Specifying Subcommands + +By default, `autocli` generates a command for each method in your gRPC service. However, you can specify subcommands to group related commands together. To specify subcommands, use the `autocliv1.ServiceCommandDescriptor` struct. + +This example shows how to use the `autocliv1.ServiceCommandDescriptor` struct to group related commands together and specify subcommands in your gRPC service by defining an instance of `autocliv1.ModuleOptions` in your `autocli.go`. + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-beta.0/x/gov/autocli.go#L94-L97 +``` + +### Positional Arguments + +By default `autocli` generates a flag for each field in your protobuf message. However, you can choose to use positional arguments instead of flags for certain fields. + +To add positional arguments to a command, use the `autocliv1.PositionalArgDescriptor` struct, as seen in the example below. Specify the `ProtoField` parameter, which is the name of the protobuf field that should be used as the positional argument. In addition, if the parameter is a variable-length argument, you can specify the `Varargs` parameter as `true`. This can only be applied to the last positional parameter, and the `ProtoField` must be a repeated field. + +Here's an example of how to define a positional argument for the `Account` method of the `auth` service: + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-beta.0/x/auth/autocli.go#L25-L30 +``` + +Then the command can be used as follows, instead of having to specify the `--address` flag: + +```bash + query auth account cosmos1abcd...xyz +``` + +### Customising Flag Names + +By default, `autocli` generates flag names based on the names of the fields in your protobuf message. However, you can customise the flag names by providing a `FlagOptions`. This parameter allows you to specify custom names for flags based on the names of the message fields. + +For example, if you have a message with the fields `test` and `test1`, you can use the following naming options to customise the flags: + +``` go +autocliv1.RpcCommandOptions{ + FlagOptions: map[string]*autocliv1.FlagOptions{ + "test": { Name: "custom_name", }, + "test1": { Name: "other_name", }, + }, +} +``` + +`FlagsOptions` is defined like sub commands in the `AutoCLIOptions()` method on your module. + +### Combining AutoCLI with Other Commands Within A Module + +AutoCLI can be used alongside other commands within a module. For example, the `gov` module uses AutoCLI to generate commands for the `query` subcommand, but also defines custom commands for the `proposer` subcommands. + +In order to enable this behavior, set in `AutoCLIOptions()` the `EnhanceCustomCommand` field to `true`, for the command type (queries and/or transactions) you want to enhance. + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/fa4d87ef7e6d87aaccc94c337ffd2fe90fcb7a9d/x/gov/autocli.go#L98 +``` + +If not set to true, `AutoCLI` will not generate commands for the module if there are already commands registered for the module (when `GetTxCmd()` or `GetTxCmd()` are defined). + +### Skip a command + +AutoCLI automatically skips unsupported commands when [`cosmos_proto.method_added_in` protobuf annotation](https://docs.cosmos.network/main/build/building-modules/protobuf-annotations) is present. + +Additionally, a command can be manually skipped using the `autocliv1.RpcCommandOptions`: + +```go +*autocliv1.RpcCommandOptions{ + RpcMethod: "Params", // The name of the gRPC service + Skip: true, +} +``` + +### Use AutoCLI for non module commands + +It is possible to use `AutoCLI` for non module commands. The trick is still to implement the `appmodule.Module` interface and append it to the `appOptions.ModuleOptions` map. + +For example, here is how the SDK does it for `cometbft` gRPC commands: + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/client/v2.0.0-beta.1/client/grpc/cmtservice/autocli.go#L52-L71 +``` + +## Summary + +`autocli` let you generate CLI to your Cosmos SDK-based applications without any cobra boilerplate. It allows you to easily generate CLI commands and flags from your protobuf messages, and provides many options for customising the behavior of your CLI application. -Read more about in it the Cosmos SDK documentation: +To further enhance your CLI experience with Cosmos SDK-based blockchains, you can use `hubl`. `hubl` is a tool that allows you to query any Cosmos SDK-based blockchain using the new AutoCLI feature of the Cosmos SDK. With `hubl`, you can easily configure a new chain and query modules with just a few simple commands. -* https://docs.cosmos.network/main/building-modules/autocli \ No newline at end of file +For more information on `hubl`, including how to configure a new chain and query a module, see the [Hubl documentation](https://docs.cosmos.network/main/tooling/hubl). diff --git a/client/v2/autocli/app.go b/client/v2/autocli/app.go index 0172b4c3e8cf..607f9052d25c 100644 --- a/client/v2/autocli/app.go +++ b/client/v2/autocli/app.go @@ -1,7 +1,9 @@ package autocli import ( - "errors" + "github.com/spf13/cobra" + "google.golang.org/grpc" + "google.golang.org/protobuf/reflect/protoregistry" autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" "cosmossdk.io/client/v2/autocli/flag" @@ -10,9 +12,8 @@ import ( "cosmossdk.io/depinject" "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/spf13/cobra" - "google.golang.org/grpc" + sdkflags "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/runtime" ) // AppOptions are autocli options for an app. These options can be built via depinject based on an app config. Ex: @@ -36,7 +37,12 @@ type AppOptions struct { ModuleOptions map[string]*autocliv1.ModuleOptions `optional:"true"` // AddressCodec is the address codec to use for the app. - AddressCodec address.Codec + AddressCodec address.Codec + ValidatorAddressCodec runtime.ValidatorAddressCodec + ConsensusAddressCodec runtime.ConsensusAddressCodec + + // ClientCtx contains the necessary information needed to execute the commands. + ClientCtx client.Context } // EnhanceRootCommand enhances the provided root command with autocli AppOptions, @@ -57,21 +63,28 @@ type AppOptions struct { func (appOptions AppOptions) EnhanceRootCommand(rootCmd *cobra.Command) error { builder := &Builder{ Builder: flag.Builder{ - AddressCodec: appOptions.AddressCodec, + TypeResolver: protoregistry.GlobalTypes, + FileResolver: appOptions.ClientCtx.InterfaceRegistry, + AddressCodec: appOptions.AddressCodec, + ValidatorAddressCodec: appOptions.ValidatorAddressCodec, + ConsensusAddressCodec: appOptions.ConsensusAddressCodec, }, GetClientConn: func(cmd *cobra.Command) (grpc.ClientConnInterface, error) { return client.GetClientQueryContext(cmd) }, - AddQueryConnFlags: flags.AddQueryFlagsToCmd, - AddTxConnFlags: flags.AddTxFlagsToCmd, + AddQueryConnFlags: func(c *cobra.Command) { + sdkflags.AddQueryFlagsToCmd(c) + sdkflags.AddKeyringFlags(c.Flags()) + }, + AddTxConnFlags: sdkflags.AddTxFlagsToCmd, } return appOptions.EnhanceRootCommandWithBuilder(rootCmd, builder) } func (appOptions AppOptions) EnhanceRootCommandWithBuilder(rootCmd *cobra.Command, builder *Builder) error { - if builder.AddressCodec == nil { - return errors.New("address codec is required in builder") + if err := builder.ValidateAndComplete(); err != nil { + return err } // extract any custom commands from modules @@ -94,11 +107,11 @@ func (appOptions AppOptions) EnhanceRootCommandWithBuilder(rootCmd *cobra.Comman } if queryCmd := findSubCommand(rootCmd, "query"); queryCmd != nil { - if err := builder.enhanceCommandCommon(queryCmd, appOptions, customQueryCmds, enhanceQuery); err != nil { + if err := builder.enhanceCommandCommon(queryCmd, queryCmdType, appOptions, customQueryCmds); err != nil { return err } } else { - queryCmd, err := builder.BuildQueryCommand(appOptions, customQueryCmds, enhanceQuery) + queryCmd, err := builder.BuildQueryCommand(rootCmd.Context(), appOptions, customQueryCmds) if err != nil { return err } @@ -107,11 +120,11 @@ func (appOptions AppOptions) EnhanceRootCommandWithBuilder(rootCmd *cobra.Comman } if msgCmd := findSubCommand(rootCmd, "tx"); msgCmd != nil { - if err := builder.enhanceCommandCommon(msgCmd, appOptions, customMsgCmds, enhanceMsg); err != nil { + if err := builder.enhanceCommandCommon(msgCmd, msgCmdType, appOptions, customMsgCmds); err != nil { return err } } else { - subCmd, err := builder.BuildMsgCommand(appOptions, customMsgCmds, enhanceMsg) + subCmd, err := builder.BuildMsgCommand(rootCmd.Context(), appOptions, customMsgCmds) if err != nil { return err } diff --git a/client/v2/autocli/builder.go b/client/v2/autocli/builder.go index 5766c5aa8770..81604f0d810b 100644 --- a/client/v2/autocli/builder.go +++ b/client/v2/autocli/builder.go @@ -16,7 +16,13 @@ type Builder struct { // from a given context. GetClientConn func(*cobra.Command) (grpc.ClientConnInterface, error) + // AddQueryConnFlags and AddTxConnFlags are functions that add flags to query and transaction commands AddQueryConnFlags func(*cobra.Command) + AddTxConnFlags func(*cobra.Command) +} - AddTxConnFlags func(*cobra.Command) +// ValidateAndComplete the builder fields. +// It returns an error if any of the required fields are missing. +func (b *Builder) ValidateAndComplete() error { + return b.Builder.ValidateAndComplete() } diff --git a/client/v2/autocli/common.go b/client/v2/autocli/common.go index 301cb43204be..5c32f16ca32a 100644 --- a/client/v2/autocli/common.go +++ b/client/v2/autocli/common.go @@ -1,17 +1,25 @@ package autocli import ( - "context" "fmt" + "strings" - autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" - "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" - "golang.org/x/exp/maps" "google.golang.org/protobuf/reflect/protoreflect" "sigs.k8s.io/yaml" + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + "cosmossdk.io/client/v2/internal/flags" "cosmossdk.io/client/v2/internal/util" + + "github.com/cosmos/cosmos-sdk/client" +) + +type cmdType int + +const ( + queryCmdType cmdType = iota + msgCmdType ) func (b *Builder) buildMethodCommandCommon(descriptor protoreflect.MethodDescriptor, options *autocliv1.RpcCommandOptions, exec func(cmd *cobra.Command, input protoreflect.Message) error) (*cobra.Command, error) { @@ -20,9 +28,9 @@ func (b *Builder) buildMethodCommandCommon(descriptor protoreflect.MethodDescrip options = &autocliv1.RpcCommandOptions{} } - long := options.Long - if long == "" { - long = util.DescriptorDocs(descriptor) + short := options.Short + if short == "" { + short = fmt.Sprintf("Execute the %s RPC method", descriptor.Name()) } inputDesc := descriptor.Input() @@ -34,30 +42,58 @@ func (b *Builder) buildMethodCommandCommon(descriptor protoreflect.MethodDescrip } cmd := &cobra.Command{ - Use: use, - Long: long, - Short: options.Short, - Example: options.Example, - Aliases: options.Alias, - SuggestFor: options.SuggestFor, - Deprecated: options.Deprecated, - Version: options.Version, + SilenceUsage: false, + Use: use, + Long: options.Long, + Short: short, + Example: options.Example, + Aliases: options.Alias, + SuggestFor: options.SuggestFor, + Deprecated: options.Deprecated, + Version: options.Version, } - cmd.SetContext(context.Background()) - binder, err := b.AddMessageFlags(cmd.Context(), cmd.Flags(), inputType, options) + // we need to use a pointer to the context as the correct context is set in the RunE function + // however we need to set the flags before the RunE function is called + ctx := cmd.Context() + binder, err := b.AddMessageFlags(&ctx, cmd.Flags(), inputType, options) if err != nil { return nil, err } - cmd.Args = binder.CobraArgs cmd.RunE = func(cmd *cobra.Command, args []string) error { + ctx = cmd.Context() + input, err := binder.BuildMessage(args) if err != nil { return err } + // signer related logic, triggers only when there is a signer defined + if binder.SignerInfo.FieldName != "" { + if binder.SignerInfo.IsFlag { + // the client context uses the from flag to determine the signer. + // this sets the signer flags to the from flag value if a custom signer flag is set. + // marks the custom flag as required. + if binder.SignerInfo.FlagName != flags.FlagFrom { + if err := cmd.MarkFlagRequired(binder.SignerInfo.FlagName); err != nil { + return err + } + + if err := cmd.Flags().Set(flags.FlagFrom, cmd.Flag(binder.SignerInfo.FlagName).Value.String()); err != nil { + return err + } + } + } else { + // if the signer is not a flag, it is a positional argument + // we need to get the correct positional arguments + if err := cmd.Flags().Set(flags.FlagFrom, args[binder.SignerInfo.PositionalArgIndex]); err != nil { + return err + } + } + } + return exec(cmd, input) } @@ -70,55 +106,78 @@ func (b *Builder) buildMethodCommandCommon(descriptor protoreflect.MethodDescrip // automatically fill in missing commands. func (b *Builder) enhanceCommandCommon( cmd *cobra.Command, + cmdType cmdType, appOptions AppOptions, customCmds map[string]*cobra.Command, - buildModuleCommand enhanceCommandFunc, ) error { moduleOptions := appOptions.ModuleOptions if len(moduleOptions) == 0 { - moduleOptions = map[string]*autocliv1.ModuleOptions{} - for name, module := range appOptions.Modules { + moduleOptions = make(map[string]*autocliv1.ModuleOptions) + } + for name, module := range appOptions.Modules { + if _, ok := moduleOptions[name]; !ok { if module, ok := module.(HasAutoCLIConfig); ok { moduleOptions[name] = module.AutoCLIOptions() + } else { + moduleOptions[name] = nil } } } - modules := append(maps.Keys(appOptions.Modules), maps.Keys(moduleOptions)...) - for _, moduleName := range modules { + for moduleName, modOpts := range moduleOptions { + hasModuleOptions := modOpts != nil + // if we have an existing command skip adding one here - if findSubCommand(cmd, moduleName) != nil { + if subCmd := findSubCommand(cmd, moduleName); subCmd != nil { + if hasModuleOptions { // check if we need to enhance the existing command + if err := enhanceCustomCmd(b, subCmd, cmdType, modOpts); err != nil { + return err + } + } + continue } // if we have a custom command use that instead of generating one - if custom := customCmds[moduleName]; custom != nil { - // custom commands get added lower down + if custom, ok := customCmds[moduleName]; ok { + if hasModuleOptions { // check if we need to enhance the existing command + if err := enhanceCustomCmd(b, custom, cmdType, modOpts); err != nil { + return err + } + } + cmd.AddCommand(custom) continue } - // check for autocli options - modOpts := moduleOptions[moduleName] - if modOpts == nil { + // if we don't have module options, skip adding a command as we don't have anything to add + if !hasModuleOptions { continue } - if err := buildModuleCommand(b, moduleName, cmd, modOpts); err != nil { - return err + switch cmdType { + case queryCmdType: + if err := enhanceQuery(b, moduleName, cmd, modOpts); err != nil { + return err + } + case msgCmdType: + if err := enhanceMsg(b, moduleName, cmd, modOpts); err != nil { + return err + } } } return nil } -type enhanceCommandFunc func(builder *Builder, moduleName string, cmd *cobra.Command, modOpts *autocliv1.ModuleOptions) error - // enhanceQuery enhances the provided query command with the autocli commands for a module. func enhanceQuery(builder *Builder, moduleName string, cmd *cobra.Command, modOpts *autocliv1.ModuleOptions) error { - queryCmdDesc := modOpts.Query - if queryCmdDesc != nil { - subCmd := topLevelCmd(moduleName, fmt.Sprintf("Querying commands for the %s module", moduleName)) + if queryCmdDesc := modOpts.Query; queryCmdDesc != nil { + short := queryCmdDesc.Short + if short == "" { + short = fmt.Sprintf("Querying commands for the %s module", moduleName) + } + subCmd := topLevelCmd(cmd.Context(), moduleName, short) if err := builder.AddQueryServiceCommands(subCmd, queryCmdDesc); err != nil { return err } @@ -131,9 +190,12 @@ func enhanceQuery(builder *Builder, moduleName string, cmd *cobra.Command, modOp // enhanceMsg enhances the provided msg command with the autocli commands for a module. func enhanceMsg(builder *Builder, moduleName string, cmd *cobra.Command, modOpts *autocliv1.ModuleOptions) error { - txCmdDesc := modOpts.Tx - if txCmdDesc != nil { - subCmd := topLevelCmd(moduleName, fmt.Sprintf("Transactions commands for the %s module", moduleName)) + if txCmdDesc := modOpts.Tx; txCmdDesc != nil { + short := txCmdDesc.Short + if short == "" { + short = fmt.Sprintf("Transactions commands for the %s module", moduleName) + } + subCmd := topLevelCmd(cmd.Context(), moduleName, short) if err := builder.AddMsgServiceCommands(subCmd, txCmdDesc); err != nil { return err } @@ -144,19 +206,49 @@ func enhanceMsg(builder *Builder, moduleName string, cmd *cobra.Command, modOpts return nil } +// enhanceCustomCmd enhances the provided custom query or msg command autocli commands for a module. +func enhanceCustomCmd(builder *Builder, cmd *cobra.Command, cmdType cmdType, modOpts *autocliv1.ModuleOptions) error { + switch cmdType { + case queryCmdType: + if modOpts.Query != nil && modOpts.Query.EnhanceCustomCommand { + if err := builder.AddQueryServiceCommands(cmd, modOpts.Query); err != nil { + return err + } + } + case msgCmdType: + if modOpts.Tx != nil && modOpts.Tx.EnhanceCustomCommand { + if err := builder.AddMsgServiceCommands(cmd, modOpts.Tx); err != nil { + return err + } + } + } + + return nil +} + // outOrStdoutFormat formats the output based on the output flag and writes it to the command's output stream. func (b *Builder) outOrStdoutFormat(cmd *cobra.Command, out []byte) error { + clientCtx := client.Context{} + if v := cmd.Context().Value(client.ClientContextKey); v != nil { + clientCtx = *(v.(*client.Context)) + } + flagSet := cmd.Flags() + if clientCtx.OutputFormat == "" || flagSet.Changed(flags.FlagOutput) { + output, _ := flagSet.GetString(flags.FlagOutput) + clientCtx = clientCtx.WithOutputFormat(output) + } + var err error - outputType := cmd.Flag(flags.FlagOutput) + outputType := clientCtx.OutputFormat // if the output type is text, convert the json to yaml // if output type is json or nil, default to json - if outputType != nil && outputType.Value.String() == flags.OutputFormatText { + if outputType == flags.OutputFormatText { out, err = yaml.JSONToYAML(out) if err != nil { return err } } - _, err = fmt.Fprintln(cmd.OutOrStdout(), string(out)) - return err + cmd.Println(strings.TrimSpace(string(out))) + return nil } diff --git a/client/v2/autocli/common_test.go b/client/v2/autocli/common_test.go index 4f605a4f48dc..bcd14360428f 100644 --- a/client/v2/autocli/common_test.go +++ b/client/v2/autocli/common_test.go @@ -9,17 +9,33 @@ import ( "github.com/spf13/cobra" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" + "google.golang.org/protobuf/reflect/protoregistry" "gotest.tools/v3/assert" + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" reflectionv2alpha1 "cosmossdk.io/api/cosmos/base/reflection/v2alpha1" - "github.com/cosmos/cosmos-sdk/client/flags" - addresscodec "github.com/cosmos/cosmos-sdk/codec/address" - "cosmossdk.io/client/v2/autocli/flag" "cosmossdk.io/client/v2/internal/testpb" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" + sdkkeyring "github.com/cosmos/cosmos-sdk/crypto/keyring" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/bank" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" ) -func testExecCommon(t *testing.T, buildModuleCommand func(string, *Builder) (*cobra.Command, error), args ...string) *testClientConn { +type fixture struct { + conn *testClientConn + b *Builder + clientCtx client.Context +} + +func initFixture(t *testing.T) *fixture { + t.Helper() + home := t.TempDir() server := grpc.NewServer() testpb.RegisterQueryServer(server, &testEchoServer{}) reflectionv2alpha1.RegisterReflectionServiceServer(server, &testReflectionServer{}) @@ -34,22 +50,32 @@ func testExecCommon(t *testing.T, buildModuleCommand func(string, *Builder) (*co clientConn, err := grpc.Dial(listener.Addr().String(), grpc.WithTransportCredentials(insecure.NewCredentials())) assert.NilError(t, err) - defer func() { - err := clientConn.Close() - if err != nil { - panic(err) - } - }() - conn := &testClientConn{ - ClientConn: clientConn, - t: t, - out: &bytes.Buffer{}, - errorOut: &bytes.Buffer{}, - } + encodingConfig := moduletestutil.MakeTestEncodingConfig(bank.AppModuleBasic{}) + kr, err := sdkkeyring.New(sdk.KeyringServiceName(), sdkkeyring.BackendMemory, home, nil, encodingConfig.Codec) + assert.NilError(t, err) + + interfaceRegistry := encodingConfig.Codec.InterfaceRegistry() + banktypes.RegisterInterfaces(interfaceRegistry) + + clientCtx := client.Context{}. + WithKeyring(kr). + WithKeyringDir(home). + WithHomeDir(home). + WithViper(""). + WithInterfaceRegistry(interfaceRegistry). + WithTxConfig(encodingConfig.TxConfig). + WithAccountRetriever(client.MockAccountRetriever{}). + WithChainID("autocli-test") + + conn := &testClientConn{ClientConn: clientConn} b := &Builder{ Builder: flag.Builder{ - AddressCodec: addresscodec.NewBech32Codec("cosmos"), + TypeResolver: protoregistry.GlobalTypes, + FileResolver: protoregistry.GlobalFiles, + AddressCodec: addresscodec.NewBech32Codec("cosmos"), + ValidatorAddressCodec: addresscodec.NewBech32Codec("cosmosvaloper"), + ConsensusAddressCodec: addresscodec.NewBech32Codec("cosmosvalcons"), }, GetClientConn: func(*cobra.Command) (grpc.ClientConnInterface, error) { return conn, nil @@ -57,15 +83,25 @@ func testExecCommon(t *testing.T, buildModuleCommand func(string, *Builder) (*co AddQueryConnFlags: flags.AddQueryFlagsToCmd, AddTxConnFlags: flags.AddTxFlagsToCmd, } + assert.NilError(t, b.ValidateAndComplete()) + + return &fixture{ + conn: conn, + b: b, + clientCtx: clientCtx, + } +} + +func runCmd(fixture *fixture, command func(moduleName string, f *fixture) (*cobra.Command, error), args ...string) (*bytes.Buffer, error) { + out := &bytes.Buffer{} + cmd, err := command("test", fixture) + if err != nil { + return out, err + } - cmd, err := buildModuleCommand("test", b) - assert.NilError(t, err) - assert.NilError(t, err) cmd.SetArgs(args) - cmd.SetOut(conn.out) - cmd.SetErr(conn.errorOut) - cmd.Execute() - return conn + cmd.SetOut(out) + return out, cmd.Execute() } type testReflectionServer struct { @@ -81,3 +117,104 @@ func (t testReflectionServer) GetConfigurationDescriptor(_ context.Context, clie } var _ reflectionv2alpha1.ReflectionServiceServer = testReflectionServer{} + +type testClientConn struct { + *grpc.ClientConn + lastRequest interface{} + lastResponse interface{} +} + +func (t *testClientConn) Invoke(ctx context.Context, method string, args, reply interface{}, opts ...grpc.CallOption) error { + err := t.ClientConn.Invoke(ctx, method, args, reply, opts...) + t.lastRequest = args + t.lastResponse = reply + return err +} + +type testEchoServer struct { + testpb.UnimplementedQueryServer +} + +func (t testEchoServer) Echo(_ context.Context, request *testpb.EchoRequest) (*testpb.EchoResponse, error) { + return &testpb.EchoResponse{Request: request}, nil +} + +var _ testpb.QueryServer = testEchoServer{} + +func TestEnhanceCommand(t *testing.T) { + b := &Builder{} + // Test that the command has a subcommand + cmd := &cobra.Command{Use: "test"} + cmd.AddCommand(&cobra.Command{Use: "test"}) + + for i := 0; i < 2; i++ { + cmdTp := cmdType(i) + + appOptions := AppOptions{ + ModuleOptions: map[string]*autocliv1.ModuleOptions{ + "test": {}, + }, + } + + err := b.enhanceCommandCommon(cmd, cmdTp, appOptions, map[string]*cobra.Command{}) + assert.NilError(t, err) + + cmd = &cobra.Command{Use: "test"} + + appOptions = AppOptions{ + ModuleOptions: map[string]*autocliv1.ModuleOptions{}, + } + customCommands := map[string]*cobra.Command{ + "test2": {Use: "test"}, + } + err = b.enhanceCommandCommon(cmd, cmdTp, appOptions, customCommands) + assert.NilError(t, err) + + cmd = &cobra.Command{Use: "test"} + appOptions = AppOptions{ + ModuleOptions: map[string]*autocliv1.ModuleOptions{ + "test": {Tx: nil}, + }, + } + err = b.enhanceCommandCommon(cmd, cmdTp, appOptions, map[string]*cobra.Command{}) + assert.NilError(t, err) + } +} + +func TestErrorBuildCommand(t *testing.T) { + fixture := initFixture(t) + b := fixture.b + b.AddQueryConnFlags = nil + b.AddTxConnFlags = nil + + commandDescriptor := &autocliv1.ServiceCommandDescriptor{ + Service: testpb.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Send", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + { + ProtoField: "un-existent-proto-field", + }, + }, + }, + }, + } + + appOptions := AppOptions{ + ModuleOptions: map[string]*autocliv1.ModuleOptions{ + "test": { + Query: commandDescriptor, + Tx: commandDescriptor, + }, + }, + } + + _, err := b.BuildMsgCommand(context.Background(), appOptions, nil) + assert.ErrorContains(t, err, "can't find field un-existent-proto-field") + + appOptions.ModuleOptions["test"].Tx = &autocliv1.ServiceCommandDescriptor{Service: "un-existent-service"} + appOptions.ModuleOptions["test"].Query = &autocliv1.ServiceCommandDescriptor{Service: "un-existent-service"} + _, err = b.BuildMsgCommand(context.Background(), appOptions, nil) + assert.ErrorContains(t, err, "can't find service un-existent-service") +} diff --git a/client/v2/autocli/flag/address.go b/client/v2/autocli/flag/address.go index 5b5243528a74..58108d094990 100644 --- a/client/v2/autocli/flag/address.go +++ b/client/v2/autocli/flag/address.go @@ -6,22 +6,42 @@ import ( "google.golang.org/protobuf/reflect/protoreflect" + "cosmossdk.io/client/v2/autocli/keyring" "cosmossdk.io/core/address" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdkkeyring "github.com/cosmos/cosmos-sdk/crypto/keyring" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" ) type addressStringType struct{} -func (a addressStringType) NewValue(ctx context.Context, b *Builder) Value { - return &addressValue{addressCodec: b.AddressCodec} +func (a addressStringType) NewValue(ctx *context.Context, b *Builder) Value { + return &addressValue{addressCodec: b.AddressCodec, ctx: ctx} } func (a addressStringType) DefaultValue() string { return "" } +type validatorAddressStringType struct{} + +func (a validatorAddressStringType) NewValue(ctx *context.Context, b *Builder) Value { + return &addressValue{addressCodec: b.ValidatorAddressCodec, ctx: ctx} +} + +func (a validatorAddressStringType) DefaultValue() string { + return "" +} + type addressValue struct { - value string + ctx *context.Context addressCodec address.Codec + + value string } func (a addressValue) Get(protoreflect.Value) (protoreflect.Value, error) { @@ -32,11 +52,24 @@ func (a addressValue) String() string { return a.value } -// Set implements the flag.Value interface for addressValue it only supports bech32 addresses. +// Set implements the flag.Value interface for addressValue. func (a *addressValue) Set(s string) error { - _, err := a.addressCodec.StringToBytes(s) + // we get the keyring on set, as in NewValue the context is the parent context (before RunE) + keyring := getKeyringFromCtx(a.ctx) + addr, err := keyring.LookupAddressByKeyName(s) + if err == nil { + addrStr, err := a.addressCodec.BytesToString(addr) + if err != nil { + return fmt.Errorf("invalid account address got from keyring: %w", err) + } + + a.value = addrStr + return nil + } + + _, err = a.addressCodec.StringToBytes(s) if err != nil { - return fmt.Errorf("invalid bech32 account address: %w", err) + return fmt.Errorf("invalid account address or key name: %w", err) } a.value = s @@ -45,5 +78,89 @@ func (a *addressValue) Set(s string) error { } func (a addressValue) Type() string { - return "bech32 account address key name" + return "account address or key name" +} + +type consensusAddressStringType struct{} + +func (a consensusAddressStringType) NewValue(ctx *context.Context, b *Builder) Value { + return &consensusAddressValue{ + addressValue: addressValue{ + addressCodec: b.ConsensusAddressCodec, + ctx: ctx, + }, + } +} + +func (a consensusAddressStringType) DefaultValue() string { + return "" +} + +type consensusAddressValue struct { + addressValue +} + +func (a consensusAddressValue) Get(protoreflect.Value) (protoreflect.Value, error) { + return protoreflect.ValueOfString(a.value), nil +} + +func (a consensusAddressValue) String() string { + return a.value +} + +func (a *consensusAddressValue) Set(s string) error { + // we get the keyring on set, as in NewValue the context is the parent context (before RunE) + keyring := getKeyringFromCtx(a.ctx) + addr, err := keyring.LookupAddressByKeyName(s) + if err == nil { + addrStr, err := a.addressCodec.BytesToString(addr) + if err != nil { + return fmt.Errorf("invalid consensus address got from keyring: %w", err) + } + + a.value = addrStr + return nil + } + + _, err = a.addressCodec.StringToBytes(s) + if err == nil { + a.value = s + return nil + } + + // fallback to pubkey parsing + registry := types.NewInterfaceRegistry() + cryptocodec.RegisterInterfaces(registry) + cdc := codec.NewProtoCodec(registry) + + var pk cryptotypes.PubKey + err2 := cdc.UnmarshalInterfaceJSON([]byte(s), &pk) + if err2 != nil { + return fmt.Errorf("input isn't a pubkey (%w) or is an invalid account address (%w)", err, err2) + } + + a.value, err = a.addressCodec.BytesToString(pk.Address()) + if err != nil { + return fmt.Errorf("invalid pubkey address: %w", err) + } + + return nil +} + +func getKeyringFromCtx(ctx *context.Context) keyring.Keyring { + dctx := *ctx + if dctx != nil { + if clientCtx := dctx.Value(client.ClientContextKey); clientCtx != nil { + k, err := sdkkeyring.NewAutoCLIKeyring(clientCtx.(*client.Context).Keyring) + if err != nil { + panic(fmt.Errorf("failed to create keyring: %w", err)) + } + + return k + } else if k := dctx.Value(keyring.KeyringContextKey); k != nil { + return k.(*keyring.KeyringImpl) + } + } + + return keyring.NoKeyring{} } diff --git a/client/v2/autocli/flag/binary.go b/client/v2/autocli/flag/binary.go index 901b400eb92d..7bd1c23293f7 100644 --- a/client/v2/autocli/flag/binary.go +++ b/client/v2/autocli/flag/binary.go @@ -14,7 +14,7 @@ type binaryType struct{} var _ Value = (*fileBinaryValue)(nil) -func (f binaryType) NewValue(_ context.Context, _ *Builder) Value { +func (f binaryType) NewValue(*context.Context, *Builder) Value { return &fileBinaryValue{} } diff --git a/client/v2/autocli/flag/builder.go b/client/v2/autocli/flag/builder.go index 1d9ec4f09a2c..e5f40a728c99 100644 --- a/client/v2/autocli/flag/builder.go +++ b/client/v2/autocli/flag/builder.go @@ -1,11 +1,33 @@ package flag import ( + "context" + "errors" + "fmt" + "strconv" + + cosmos_proto "github.com/cosmos/cosmos-proto" + "github.com/spf13/cobra" + "github.com/spf13/pflag" + "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protodesc" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + msgv1 "cosmossdk.io/api/cosmos/msg/v1" + "cosmossdk.io/client/v2/internal/flags" + "cosmossdk.io/client/v2/internal/util" "cosmossdk.io/core/address" + + "github.com/cosmos/cosmos-sdk/runtime" +) + +const ( + AddressStringScalarType = "cosmos.AddressString" + ValidatorAddressStringScalarType = "cosmos.ValidatorAddressString" + ConsensusAddressStringScalarType = "cosmos.ConsensusAddressString" + PubkeyScalarType = "cosmos.Pubkey" ) // Builder manages options for building pflag flags for protobuf messages. @@ -19,13 +41,18 @@ type Builder struct { // FileResolver specifies how protobuf file descriptors will be resolved. If it is // nil protoregistry.GlobalFiles will be used. - FileResolver protodesc.Resolver + FileResolver interface { + protodesc.Resolver + RangeFiles(func(protoreflect.FileDescriptor) bool) + } messageFlagTypes map[protoreflect.FullName]Type scalarFlagTypes map[string]Type - // AddressCodec is the address codec used for the address flag - AddressCodec address.Codec + // Address Codecs are the address codecs to use for client/v2. + AddressCodec address.Codec + ValidatorAddressCodec runtime.ValidatorAddressCodec + ConsensusAddressCodec runtime.ConsensusAddressCodec } func (b *Builder) init() { @@ -38,16 +65,401 @@ func (b *Builder) init() { if b.scalarFlagTypes == nil { b.scalarFlagTypes = map[string]Type{} - b.scalarFlagTypes["cosmos.AddressString"] = addressStringType{} + b.scalarFlagTypes[AddressStringScalarType] = addressStringType{} + b.scalarFlagTypes[ValidatorAddressStringScalarType] = validatorAddressStringType{} + b.scalarFlagTypes[ConsensusAddressStringScalarType] = consensusAddressStringType{} + b.scalarFlagTypes[PubkeyScalarType] = pubkeyType{} } } +// ValidateAndComplete the flag builder fields. +// It returns an error if any of the required fields are missing. +// If the keyring is nil, it will be set to a no keyring. +func (b *Builder) ValidateAndComplete() error { + if b.AddressCodec == nil { + return errors.New("address codec is required in flag builder") + } + + if b.ValidatorAddressCodec == nil { + return errors.New("validator address codec is required in flag builder") + } + + if b.ConsensusAddressCodec == nil { + return errors.New("consensus address codec is required in flag builder") + } + + if b.TypeResolver == nil { + return errors.New("type resolver is required in flag builder") + } + + if b.FileResolver == nil { + return errors.New("file resolver is required in flag builder") + } + + return nil +} + +// DefineMessageFlagType allows to extend custom protobuf message type handling for flags (and positional arguments). func (b *Builder) DefineMessageFlagType(messageName protoreflect.FullName, flagType Type) { b.init() b.messageFlagTypes[messageName] = flagType } +// DefineScalarFlagType allows to extend custom scalar type handling for flags (and positional arguments). func (b *Builder) DefineScalarFlagType(scalarName string, flagType Type) { b.init() b.scalarFlagTypes[scalarName] = flagType } + +// AddMessageFlags adds flags for each field in the message to the flag set. +func (b *Builder) AddMessageFlags(ctx *context.Context, flagSet *pflag.FlagSet, messageType protoreflect.MessageType, commandOptions *autocliv1.RpcCommandOptions) (*MessageBinder, error) { + return b.addMessageFlags(ctx, flagSet, messageType, commandOptions, namingOptions{}) +} + +// addMessageFlags adds flags for each field in the message to the flag set. +func (b *Builder) addMessageFlags(ctx *context.Context, flagSet *pflag.FlagSet, messageType protoreflect.MessageType, commandOptions *autocliv1.RpcCommandOptions, options namingOptions) (*MessageBinder, error) { + messageBinder := &MessageBinder{ + messageType: messageType, + // positional args are also parsed using a FlagSet so that we can reuse all the same parsers + positionalFlagSet: pflag.NewFlagSet("positional", pflag.ContinueOnError), + } + + fields := messageType.Descriptor().Fields() + signerFieldName := GetSignerFieldName(messageType.Descriptor()) + + isPositional := map[string]bool{} + + positionalArgsLen := len(commandOptions.PositionalArgs) + for i, arg := range commandOptions.PositionalArgs { + isPositional[arg.ProtoField] = true + + // verify if a positional field is a signer field + if arg.ProtoField == signerFieldName { + messageBinder.SignerInfo = SignerInfo{ + PositionalArgIndex: i, + FieldName: arg.ProtoField, + } + } + + if arg.Optional && arg.Varargs { + return nil, fmt.Errorf("positional argument %s can't be both optional and varargs", arg.ProtoField) + } + + if arg.Varargs { + if i != positionalArgsLen-1 { + return nil, fmt.Errorf("varargs positional argument %s must be the last argument", arg.ProtoField) + } + + messageBinder.hasVarargs = true + } + + if arg.Optional { + if i != positionalArgsLen-1 { + return nil, fmt.Errorf("optional positional argument %s must be the last argument", arg.ProtoField) + } + + messageBinder.hasOptional = true + } + + field := fields.ByName(protoreflect.Name(arg.ProtoField)) + if field == nil { + return nil, fmt.Errorf("can't find field %s on %s", arg.ProtoField, messageType.Descriptor().FullName()) + } + + _, hasValue, err := b.addFieldFlag( + ctx, + messageBinder.positionalFlagSet, + field, + &autocliv1.FlagOptions{Name: fmt.Sprintf("%d", i)}, + namingOptions{}, + ) + if err != nil { + return nil, err + } + + messageBinder.positionalArgs = append(messageBinder.positionalArgs, fieldBinding{ + field: field, + hasValue: hasValue, + }) + } + + switch { + case messageBinder.hasVarargs: + messageBinder.CobraArgs = cobra.MinimumNArgs(positionalArgsLen - 1) + messageBinder.mandatoryArgUntil = positionalArgsLen - 1 + case messageBinder.hasOptional: + messageBinder.CobraArgs = cobra.RangeArgs(positionalArgsLen-1, positionalArgsLen) + messageBinder.mandatoryArgUntil = positionalArgsLen - 1 + default: + messageBinder.CobraArgs = cobra.ExactArgs(positionalArgsLen) + messageBinder.mandatoryArgUntil = positionalArgsLen + } + + // validate flag options + for name, opts := range commandOptions.FlagOptions { + if fields.ByName(protoreflect.Name(name)) == nil { + return nil, fmt.Errorf("can't find field %s on %s specified as a flag", name, messageType.Descriptor().FullName()) + } + + // verify if a flag is a signer field + if name == signerFieldName { + messageBinder.SignerInfo = SignerInfo{ + FieldName: name, + IsFlag: true, + FlagName: opts.Name, + } + } + } + + // if signer has not been specified as positional arguments, + // add it as `--from` flag (instead of --field-name flags) + if signerFieldName != "" && messageBinder.SignerInfo == (SignerInfo{}) { + if commandOptions.FlagOptions == nil { + commandOptions.FlagOptions = make(map[string]*autocliv1.FlagOptions) + } + + commandOptions.FlagOptions[signerFieldName] = &autocliv1.FlagOptions{ + Name: flags.FlagFrom, + Usage: "Name or address with which to sign the message", + Shorthand: "f", + } + + messageBinder.SignerInfo = SignerInfo{ + FieldName: signerFieldName, + IsFlag: true, + FlagName: flags.FlagFrom, + } + } + + // define all other fields as flags + flagOptsByFlagName := map[string]*autocliv1.FlagOptions{} + for i := 0; i < fields.Len(); i++ { + field := fields.Get(i) + fieldName := string(field.Name()) + + // skips positional args and signer field if already set + if isPositional[fieldName] || + (fieldName == signerFieldName && messageBinder.SignerInfo.FlagName == flags.FlagFrom) { + continue + } + + flagOpts := commandOptions.FlagOptions[fieldName] + name, hasValue, err := b.addFieldFlag(ctx, flagSet, field, flagOpts, options) + flagOptsByFlagName[name] = flagOpts + if err != nil { + return nil, err + } + + messageBinder.flagBindings = append(messageBinder.flagBindings, fieldBinding{ + hasValue: hasValue, + field: field, + }) + } + + flagSet.VisitAll(func(flag *pflag.Flag) { + opts := flagOptsByFlagName[flag.Name] + if opts != nil { + // This is a bit of hacking around the pflag API, but + // we need to set these options here using Flag.VisitAll because the flag + // constructors that pflag gives us (StringP, Int32P, etc.) do not + // actually return the *Flag instance + flag.Deprecated = opts.Deprecated + flag.ShorthandDeprecated = opts.ShorthandDeprecated + flag.Hidden = opts.Hidden + } + }) + + return messageBinder, nil +} + +// bindPageRequest create a flag for pagination +func (b *Builder) bindPageRequest(ctx *context.Context, flagSet *pflag.FlagSet, field protoreflect.FieldDescriptor) (HasValue, error) { + return b.addMessageFlags( + ctx, + flagSet, + util.ResolveMessageType(b.TypeResolver, field.Message()), + &autocliv1.RpcCommandOptions{}, + namingOptions{Prefix: "page-"}, + ) +} + +// namingOptions specifies internal naming options for flags. +type namingOptions struct { + // Prefix is a prefix to prepend to all flags. + Prefix string +} + +// addFieldFlag adds a flag for the provided field to the flag set. +func (b *Builder) addFieldFlag(ctx *context.Context, flagSet *pflag.FlagSet, field protoreflect.FieldDescriptor, opts *autocliv1.FlagOptions, options namingOptions) (name string, hasValue HasValue, err error) { + if opts == nil { + opts = &autocliv1.FlagOptions{} + } + + if field.Kind() == protoreflect.MessageKind && field.Message().FullName() == "cosmos.base.query.v1beta1.PageRequest" { + hasValue, err := b.bindPageRequest(ctx, flagSet, field) + return "", hasValue, err + } + + name = opts.Name + if name == "" { + name = options.Prefix + util.DescriptorKebabName(field) + } + + usage := opts.Usage + shorthand := opts.Shorthand + defaultValue := opts.DefaultValue + + if typ := b.resolveFlagType(field); typ != nil { + if defaultValue == "" { + defaultValue = typ.DefaultValue() + } + + val := typ.NewValue(ctx, b) + flagSet.AddFlag(&pflag.Flag{ + Name: name, + Shorthand: shorthand, + Usage: usage, + DefValue: defaultValue, + Value: val, + }) + return name, val, nil + } + + // use the built-in pflag StringP, Int32P, etc. functions + var val HasValue + + if field.IsList() { + val = bindSimpleListFlag(flagSet, field.Kind(), name, shorthand, usage) + } else if field.IsMap() { + keyKind := field.MapKey().Kind() + valKind := field.MapValue().Kind() + val = bindSimpleMapFlag(flagSet, keyKind, valKind, name, shorthand, usage) + } else { + val = bindSimpleFlag(flagSet, field.Kind(), name, shorthand, usage) + } + + // This is a bit of hacking around the pflag API, but the + // defaultValue is set in this way because this is much easier than trying + // to parse the string into the types that StringSliceP, Int32P, etc. + if defaultValue != "" { + err = flagSet.Set(name, defaultValue) + } + + return name, val, err +} + +func (b *Builder) resolveFlagType(field protoreflect.FieldDescriptor) Type { + typ := b.resolveFlagTypeBasic(field) + if field.IsList() { + if typ != nil { + return compositeListType{simpleType: typ} + } + return nil + } + if field.IsMap() { + keyKind := field.MapKey().Kind() + valType := b.resolveFlagType(field.MapValue()) + if valType != nil { + switch keyKind { + case protoreflect.StringKind: + ct := new(compositeMapType[string]) + ct.keyValueResolver = func(s string) (string, error) { return s, nil } + ct.valueType = valType + ct.keyType = "string" + return ct + case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: + ct := new(compositeMapType[int32]) + ct.keyValueResolver = func(s string) (int32, error) { + i, err := strconv.ParseInt(s, 10, 32) + return int32(i), err + } + ct.valueType = valType + ct.keyType = "int32" + return ct + case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: + ct := new(compositeMapType[int64]) + ct.keyValueResolver = func(s string) (int64, error) { + i, err := strconv.ParseInt(s, 10, 64) + return i, err + } + ct.valueType = valType + ct.keyType = "int64" + return ct + case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: + ct := new(compositeMapType[uint32]) + ct.keyValueResolver = func(s string) (uint32, error) { + i, err := strconv.ParseUint(s, 10, 32) + return uint32(i), err + } + ct.valueType = valType + ct.keyType = "uint32" + return ct + case protoreflect.Uint64Kind, protoreflect.Fixed64Kind: + ct := new(compositeMapType[uint64]) + ct.keyValueResolver = func(s string) (uint64, error) { + i, err := strconv.ParseUint(s, 10, 64) + return i, err + } + ct.valueType = valType + ct.keyType = "uint64" + return ct + case protoreflect.BoolKind: + ct := new(compositeMapType[bool]) + ct.keyValueResolver = strconv.ParseBool + ct.valueType = valType + ct.keyType = "bool" + return ct + } + return nil + + } + return nil + } + + return typ +} + +func (b *Builder) resolveFlagTypeBasic(field protoreflect.FieldDescriptor) Type { + scalar, ok := GetScalarType(field) + if ok { + b.init() + if typ, ok := b.scalarFlagTypes[scalar]; ok { + return typ + } + } + + switch field.Kind() { + case protoreflect.BytesKind: + return binaryType{} + case protoreflect.EnumKind: + return enumType{enum: field.Enum()} + case protoreflect.MessageKind: + b.init() + if flagType, ok := b.messageFlagTypes[field.Message().FullName()]; ok { + return flagType + } + return jsonMessageFlagType{ + messageDesc: field.Message(), + } + default: + return nil + } +} + +// GetScalarType gets scalar type of a field. +func GetScalarType(field protoreflect.FieldDescriptor) (string, bool) { + scalar := proto.GetExtension(field.Options(), cosmos_proto.E_Scalar) + scalarStr, ok := scalar.(string) + return scalarStr, ok +} + +// GetSignerFieldName gets signer field name of a message. +// AutoCLI supports only one signer field per message. +func GetSignerFieldName(descriptor protoreflect.MessageDescriptor) string { + signersFields := proto.GetExtension(descriptor.Options(), msgv1.E_Signer).([]string) + if len(signersFields) == 0 { + return "" + } + + return signersFields[0] +} diff --git a/client/v2/autocli/flag/coin.go b/client/v2/autocli/flag/coin.go index f2abd593ed56..57c0e85983e4 100644 --- a/client/v2/autocli/flag/coin.go +++ b/client/v2/autocli/flag/coin.go @@ -2,10 +2,13 @@ package flag import ( "context" + "fmt" + "strings" + + "google.golang.org/protobuf/reflect/protoreflect" basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" "cosmossdk.io/core/coins" - "google.golang.org/protobuf/reflect/protoreflect" ) type coinType struct{} @@ -14,7 +17,7 @@ type coinValue struct { value *basev1beta1.Coin } -func (c coinType) NewValue(_ context.Context, _ *Builder) Value { +func (c coinType) NewValue(*context.Context, *Builder) Value { return &coinValue{} } @@ -35,6 +38,10 @@ func (c *coinValue) String() string { } func (c *coinValue) Set(stringValue string) error { + if strings.Contains(stringValue, ",") { + return fmt.Errorf("coin flag must be a single coin, specific multiple coins with multiple flags or spaces") + } + coin, err := coins.ParseCoin(stringValue) if err != nil { return err diff --git a/client/v2/autocli/flag/duration.go b/client/v2/autocli/flag/duration.go index cf9fe67af495..df02cba700f7 100644 --- a/client/v2/autocli/flag/duration.go +++ b/client/v2/autocli/flag/duration.go @@ -10,7 +10,7 @@ import ( type durationType struct{} -func (d durationType) NewValue(context.Context, *Builder) Value { +func (d durationType) NewValue(*context.Context, *Builder) Value { return &durationValue{} } diff --git a/client/v2/autocli/flag/enum.go b/client/v2/autocli/flag/enum.go index 8b555d9232ec..db3f57627511 100644 --- a/client/v2/autocli/flag/enum.go +++ b/client/v2/autocli/flag/enum.go @@ -14,7 +14,7 @@ type enumType struct { enum protoreflect.EnumDescriptor } -func (b enumType) NewValue(context.Context, *Builder) Value { +func (b enumType) NewValue(*context.Context, *Builder) Value { val := &enumValue{ enum: b.enum, valMap: map[string]protoreflect.EnumValueDescriptor{}, @@ -58,7 +58,12 @@ func (e enumValue) String() string { func (e *enumValue) Set(s string) error { valDesc, ok := e.valMap[s] if !ok { - return fmt.Errorf("%s is not a valid value for enum %s", s, e.enum.FullName()) + var validValues []string + for k := range e.valMap { + validValues = append(validValues, k) + } + + return fmt.Errorf("%s is not a valid value for enum %s. Valid values are: %s", s, e.enum.FullName(), strings.Join(validValues, ", ")) } e.value = valDesc.Number() return nil diff --git a/client/v2/autocli/flag/field.go b/client/v2/autocli/flag/field.go deleted file mode 100644 index 19f0abd8b1d1..000000000000 --- a/client/v2/autocli/flag/field.go +++ /dev/null @@ -1,181 +0,0 @@ -package flag - -import ( - "context" - "strconv" - - "github.com/spf13/pflag" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" - - autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" - cosmos_proto "github.com/cosmos/cosmos-proto" - - "cosmossdk.io/client/v2/internal/util" -) - -// namingOptions specifies internal naming options for flags. -type namingOptions struct { - // Prefix is a prefix to prepend to all flags. - Prefix string -} - -// addFieldFlag adds a flag for the provided field to the flag set. -func (b *Builder) addFieldFlag(ctx context.Context, flagSet *pflag.FlagSet, field protoreflect.FieldDescriptor, opts *autocliv1.FlagOptions, options namingOptions) (name string, hasValue HasValue, err error) { - if opts == nil { - opts = &autocliv1.FlagOptions{} - } - - if field.Kind() == protoreflect.MessageKind && field.Message().FullName() == "cosmos.base.query.v1beta1.PageRequest" { - hasValue, err := b.bindPageRequest(ctx, flagSet, field) - return "", hasValue, err - } - - name = opts.Name - if name == "" { - name = options.Prefix + util.DescriptorKebabName(field) - } - - usage := opts.Usage - if usage == "" { - usage = util.DescriptorDocs(field) - } - - shorthand := opts.Shorthand - defaultValue := opts.DefaultValue - - if typ := b.resolveFlagType(field); typ != nil { - if defaultValue == "" { - defaultValue = typ.DefaultValue() - } - - val := typ.NewValue(ctx, b) - flagSet.AddFlag(&pflag.Flag{ - Name: name, - Shorthand: shorthand, - Usage: usage, - DefValue: defaultValue, - Value: val, - }) - return name, val, nil - } - - // use the built-in pflag StringP, Int32P, etc. functions - var val HasValue - - if field.IsList() { - val = bindSimpleListFlag(flagSet, field.Kind(), name, shorthand, usage) - } else if field.IsMap() { - keyKind := field.MapKey().Kind() - valKind := field.MapValue().Kind() - val = bindSimpleMapFlag(flagSet, keyKind, valKind, name, shorthand, usage) - } else { - val = bindSimpleFlag(flagSet, field.Kind(), name, shorthand, usage) - } - - // This is a bit of hacking around the pflag API, but the - // defaultValue is set in this way because this is much easier than trying - // to parse the string into the types that StringSliceP, Int32P, etc. expect - if defaultValue != "" { - err = flagSet.Set(name, defaultValue) - } - return name, val, err -} - -func (b *Builder) resolveFlagType(field protoreflect.FieldDescriptor) Type { - typ := b.resolveFlagTypeBasic(field) - if field.IsList() { - if typ != nil { - return compositeListType{simpleType: typ} - } - return nil - } - if field.IsMap() { - keyKind := field.MapKey().Kind() - valType := b.resolveFlagType(field.MapValue()) - if valType != nil { - switch keyKind { - case protoreflect.StringKind: - ct := new(compositeMapType[string]) - ct.keyValueResolver = func(s string) (string, error) { return s, nil } - ct.valueType = valType - ct.keyType = "string" - return ct - case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: - ct := new(compositeMapType[int32]) - ct.keyValueResolver = func(s string) (int32, error) { - i, err := strconv.ParseInt(s, 10, 32) - return int32(i), err - } - ct.valueType = valType - ct.keyType = "int32" - return ct - case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: - ct := new(compositeMapType[int64]) - ct.keyValueResolver = func(s string) (int64, error) { - i, err := strconv.ParseInt(s, 10, 64) - return i, err - } - ct.valueType = valType - ct.keyType = "int64" - return ct - case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: - ct := new(compositeMapType[uint32]) - ct.keyValueResolver = func(s string) (uint32, error) { - i, err := strconv.ParseUint(s, 10, 32) - return uint32(i), err - } - ct.valueType = valType - ct.keyType = "uint32" - return ct - case protoreflect.Uint64Kind, protoreflect.Fixed64Kind: - ct := new(compositeMapType[uint64]) - ct.keyValueResolver = func(s string) (uint64, error) { - i, err := strconv.ParseUint(s, 10, 64) - return i, err - } - ct.valueType = valType - ct.keyType = "uint64" - return ct - case protoreflect.BoolKind: - ct := new(compositeMapType[bool]) - ct.keyValueResolver = strconv.ParseBool - ct.valueType = valType - ct.keyType = "bool" - return ct - } - return nil - - } - return nil - } - - return typ -} - -func (b *Builder) resolveFlagTypeBasic(field protoreflect.FieldDescriptor) Type { - scalar := proto.GetExtension(field.Options(), cosmos_proto.E_Scalar) - if scalar != nil { - b.init() - if typ, ok := b.scalarFlagTypes[scalar.(string)]; ok { - return typ - } - } - - switch field.Kind() { - case protoreflect.BytesKind: - return binaryType{} - case protoreflect.EnumKind: - return enumType{enum: field.Enum()} - case protoreflect.MessageKind: - b.init() - if flagType, ok := b.messageFlagTypes[field.Message().FullName()]; ok { - return flagType - } - return jsonMessageFlagType{ - messageDesc: field.Message(), - } - default: - return nil - } -} diff --git a/client/v2/autocli/flag/value.go b/client/v2/autocli/flag/interface.go similarity index 69% rename from client/v2/autocli/flag/value.go rename to client/v2/autocli/flag/interface.go index e42c524d7859..1d983c09c630 100644 --- a/client/v2/autocli/flag/value.go +++ b/client/v2/autocli/flag/interface.go @@ -1,10 +1,21 @@ package flag import ( + "context" + "github.com/spf13/pflag" "google.golang.org/protobuf/reflect/protoreflect" ) +// Type specifies a custom flag type. +type Type interface { + // NewValue returns a new pflag.Value which must also implement either SimpleValue or ListValue. + NewValue(*context.Context, *Builder) Value + + // DefaultValue is the default value for this type. + DefaultValue() string +} + // Value represents a single pflag.Value value. type Value interface { pflag.Value diff --git a/client/v2/autocli/flag/message_json.go b/client/v2/autocli/flag/json_message.go similarity index 95% rename from client/v2/autocli/flag/message_json.go rename to client/v2/autocli/flag/json_message.go index 4e93792aaf23..437388994ee9 100644 --- a/client/v2/autocli/flag/message_json.go +++ b/client/v2/autocli/flag/json_message.go @@ -20,7 +20,7 @@ type jsonMessageFlagType struct { messageDesc protoreflect.MessageDescriptor } -func (j jsonMessageFlagType) NewValue(_ context.Context, builder *Builder) Value { +func (j jsonMessageFlagType) NewValue(_ *context.Context, builder *Builder) Value { return &jsonMessageFlagValue{ messageType: util.ResolveMessageType(builder.TypeResolver, j.messageDesc), jsonMarshalOptions: protojson.MarshalOptions{Resolver: builder.TypeResolver}, diff --git a/client/v2/autocli/flag/list.go b/client/v2/autocli/flag/list.go index 72f84c8be3ee..d30f2992ebd9 100644 --- a/client/v2/autocli/flag/list.go +++ b/client/v2/autocli/flag/list.go @@ -52,7 +52,7 @@ type compositeListType struct { simpleType Type } -func (t compositeListType) NewValue(ctx context.Context, opts *Builder) Value { +func (t compositeListType) NewValue(ctx *context.Context, opts *Builder) Value { return &compositeListValue{ simpleType: t.simpleType, values: nil, @@ -68,7 +68,7 @@ func (t compositeListType) DefaultValue() string { type compositeListValue struct { simpleType Type values []protoreflect.Value - ctx context.Context + ctx *context.Context opts *Builder } diff --git a/client/v2/autocli/flag/map.go b/client/v2/autocli/flag/map.go index 66b30e0a7800..a5d70c7f7fce 100644 --- a/client/v2/autocli/flag/map.go +++ b/client/v2/autocli/flag/map.go @@ -8,6 +8,8 @@ import ( "github.com/cockroachdb/errors" "github.com/spf13/pflag" "google.golang.org/protobuf/reflect/protoreflect" + + "cosmossdk.io/client/v2/autocli/flag/maps" ) func bindSimpleMapFlag(flagSet *pflag.FlagSet, keyKind, valueKind protoreflect.Kind, name, shorthand, usage string) HasValue { @@ -18,126 +20,126 @@ func bindSimpleMapFlag(flagSet *pflag.FlagSet, keyKind, valueKind protoreflect.K val := flagSet.StringToStringP(name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfString) case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: - val := StringToInt32P(flagSet, name, shorthand, nil, usage) + val := maps.StringToInt32P(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfInt32) case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: val := flagSet.StringToInt64P(name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfInt64) case protoreflect.Uint32Kind: - val := StringToUint32P(flagSet, name, shorthand, nil, usage) + val := maps.StringToUint32P(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfUint32) case protoreflect.Uint64Kind: - val := StringToUint64P(flagSet, name, shorthand, nil, usage) + val := maps.StringToUint64P(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfUint64) case protoreflect.BoolKind: - val := StringToBoolP(flagSet, name, shorthand, nil, usage) + val := maps.StringToBoolP(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfBool) } case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: switch valueKind { case protoreflect.StringKind: - val := Int32ToStringP(flagSet, name, shorthand, nil, usage) + val := maps.Int32ToStringP(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfString) case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: - val := Int32ToInt32P(flagSet, name, shorthand, nil, usage) + val := maps.Int32ToInt32P(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfInt32) case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: - val := Int32ToInt64P(flagSet, name, shorthand, nil, usage) + val := maps.Int32ToInt64P(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfInt64) case protoreflect.Uint32Kind: - val := Int32ToUint32P(flagSet, name, shorthand, nil, usage) + val := maps.Int32ToUint32P(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfUint32) case protoreflect.Uint64Kind: - val := Int32ToUint64P(flagSet, name, shorthand, nil, usage) + val := maps.Int32ToUint64P(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfUint64) case protoreflect.BoolKind: - val := Int32ToBoolP(flagSet, name, shorthand, nil, usage) + val := maps.Int32ToBoolP(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfBool) } case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: switch valueKind { case protoreflect.StringKind: - val := Int64ToStringP(flagSet, name, shorthand, nil, usage) + val := maps.Int64ToStringP(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfString) case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: - val := Int64ToInt32P(flagSet, name, shorthand, nil, usage) + val := maps.Int64ToInt32P(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfInt32) case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: - val := Int64ToInt64P(flagSet, name, shorthand, nil, usage) + val := maps.Int64ToInt64P(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfInt64) case protoreflect.Uint32Kind: - val := Int64ToUint32P(flagSet, name, shorthand, nil, usage) + val := maps.Int64ToUint32P(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfUint32) case protoreflect.Uint64Kind: - val := Int64ToUint64P(flagSet, name, shorthand, nil, usage) + val := maps.Int64ToUint64P(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfUint64) case protoreflect.BoolKind: - val := Int64ToBoolP(flagSet, name, shorthand, nil, usage) + val := maps.Int64ToBoolP(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfBool) } case protoreflect.Uint32Kind: switch valueKind { case protoreflect.StringKind: - val := Uint32ToStringP(flagSet, name, shorthand, nil, usage) + val := maps.Uint32ToStringP(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfString) case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: - val := Uint32ToInt32P(flagSet, name, shorthand, nil, usage) + val := maps.Uint32ToInt32P(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfInt32) case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: - val := Uint32ToInt64P(flagSet, name, shorthand, nil, usage) + val := maps.Uint32ToInt64P(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfInt64) case protoreflect.Uint32Kind: - val := Uint32ToUint32P(flagSet, name, shorthand, nil, usage) + val := maps.Uint32ToUint32P(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfUint32) case protoreflect.Uint64Kind: - val := Uint32ToUint64P(flagSet, name, shorthand, nil, usage) + val := maps.Uint32ToUint64P(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfUint64) case protoreflect.BoolKind: - val := Uint32ToBoolP(flagSet, name, shorthand, nil, usage) + val := maps.Uint32ToBoolP(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfBool) } case protoreflect.Uint64Kind: switch valueKind { case protoreflect.StringKind: - val := Uint64ToStringP(flagSet, name, shorthand, nil, usage) + val := maps.Uint64ToStringP(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfString) case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: - val := Uint64ToInt32P(flagSet, name, shorthand, nil, usage) + val := maps.Uint64ToInt32P(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfInt32) case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: - val := Uint64ToInt64P(flagSet, name, shorthand, nil, usage) + val := maps.Uint64ToInt64P(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfInt64) case protoreflect.Uint32Kind: - val := Uint64ToUint32P(flagSet, name, shorthand, nil, usage) + val := maps.Uint64ToUint32P(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfUint32) case protoreflect.Uint64Kind: - val := Uint64ToUint64P(flagSet, name, shorthand, nil, usage) + val := maps.Uint64ToUint64P(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfUint64) case protoreflect.BoolKind: - val := Uint64ToBoolP(flagSet, name, shorthand, nil, usage) + val := maps.Uint64ToBoolP(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfBool) } case protoreflect.BoolKind: switch valueKind { case protoreflect.StringKind: - val := BoolToStringP(flagSet, name, shorthand, nil, usage) + val := maps.BoolToStringP(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfString) case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: - val := BoolToInt32P(flagSet, name, shorthand, nil, usage) + val := maps.BoolToInt32P(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfInt32) case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: - val := BoolToInt64P(flagSet, name, shorthand, nil, usage) + val := maps.BoolToInt64P(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfInt64) case protoreflect.Uint32Kind: - val := BoolToUint32P(flagSet, name, shorthand, nil, usage) + val := maps.BoolToUint32P(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfUint32) case protoreflect.Uint64Kind: - val := BoolToUint64P(flagSet, name, shorthand, nil, usage) + val := maps.BoolToUint64P(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfUint64) case protoreflect.BoolKind: - val := BoolToBoolP(flagSet, name, shorthand, nil, usage) + val := maps.BoolToBoolP(flagSet, name, shorthand, nil, usage) return newMapValue(val, protoreflect.ValueOfBool) } @@ -178,7 +180,7 @@ type compositeMapValue[T comparable] struct { keyType string valueType Type values map[T]protoreflect.Value - ctx context.Context + ctx *context.Context opts *Builder } @@ -186,7 +188,7 @@ func (m compositeMapType[T]) DefaultValue() string { return "" } -func (m compositeMapType[T]) NewValue(ctx context.Context, opts *Builder) Value { +func (m compositeMapType[T]) NewValue(ctx *context.Context, opts *Builder) Value { return &compositeMapValue[T]{ keyValueResolver: m.keyValueResolver, valueType: m.valueType, diff --git a/client/v2/autocli/flag/map_types.go b/client/v2/autocli/flag/maps/generic.go similarity index 98% rename from client/v2/autocli/flag/map_types.go rename to client/v2/autocli/flag/maps/generic.go index 8fc0397cbc6f..3d610bf9a062 100644 --- a/client/v2/autocli/flag/map_types.go +++ b/client/v2/autocli/flag/maps/generic.go @@ -1,4 +1,4 @@ -package flag +package maps import ( "strings" diff --git a/client/v2/autocli/flag/map_bool_to_value.go b/client/v2/autocli/flag/maps/map_bool_to_value.go similarity index 99% rename from client/v2/autocli/flag/map_bool_to_value.go rename to client/v2/autocli/flag/maps/map_bool_to_value.go index 5f9406db34f1..aae8a7d6f9b0 100644 --- a/client/v2/autocli/flag/map_bool_to_value.go +++ b/client/v2/autocli/flag/maps/map_bool_to_value.go @@ -1,4 +1,4 @@ -package flag +package maps import ( "strconv" diff --git a/client/v2/autocli/flag/map_int32_to_value.go b/client/v2/autocli/flag/maps/map_int32_to_value.go similarity index 99% rename from client/v2/autocli/flag/map_int32_to_value.go rename to client/v2/autocli/flag/maps/map_int32_to_value.go index a2af9d380797..c10adf739963 100644 --- a/client/v2/autocli/flag/map_int32_to_value.go +++ b/client/v2/autocli/flag/maps/map_int32_to_value.go @@ -1,4 +1,4 @@ -package flag +package maps import ( "strconv" diff --git a/client/v2/autocli/flag/map_int64_to_value.go b/client/v2/autocli/flag/maps/map_int64_to_value.go similarity index 99% rename from client/v2/autocli/flag/map_int64_to_value.go rename to client/v2/autocli/flag/maps/map_int64_to_value.go index 06bd46770ed5..9d85ef964d4c 100644 --- a/client/v2/autocli/flag/map_int64_to_value.go +++ b/client/v2/autocli/flag/maps/map_int64_to_value.go @@ -1,4 +1,4 @@ -package flag +package maps import ( "strconv" diff --git a/client/v2/autocli/flag/map_string_to_value.go b/client/v2/autocli/flag/maps/map_string_to_value.go similarity index 98% rename from client/v2/autocli/flag/map_string_to_value.go rename to client/v2/autocli/flag/maps/map_string_to_value.go index 914835bb8670..aff2fd94ba34 100644 --- a/client/v2/autocli/flag/map_string_to_value.go +++ b/client/v2/autocli/flag/maps/map_string_to_value.go @@ -1,4 +1,4 @@ -package flag +package maps import ( "strconv" diff --git a/client/v2/autocli/flag/map_uint32_to_value.go b/client/v2/autocli/flag/maps/map_uint32_to_value.go similarity index 99% rename from client/v2/autocli/flag/map_uint32_to_value.go rename to client/v2/autocli/flag/maps/map_uint32_to_value.go index ae5edc5ab461..c346cd335102 100644 --- a/client/v2/autocli/flag/map_uint32_to_value.go +++ b/client/v2/autocli/flag/maps/map_uint32_to_value.go @@ -1,4 +1,4 @@ -package flag +package maps import ( "strconv" diff --git a/client/v2/autocli/flag/map_uint64_to_value.go b/client/v2/autocli/flag/maps/map_uint64_to_value.go similarity index 99% rename from client/v2/autocli/flag/map_uint64_to_value.go rename to client/v2/autocli/flag/maps/map_uint64_to_value.go index a53be1864ca3..e5e4318b5bf1 100644 --- a/client/v2/autocli/flag/map_uint64_to_value.go +++ b/client/v2/autocli/flag/maps/map_uint64_to_value.go @@ -1,4 +1,4 @@ -package flag +package maps import ( "strconv" diff --git a/client/v2/autocli/flag/message.go b/client/v2/autocli/flag/messager_binder.go similarity index 64% rename from client/v2/autocli/flag/message.go rename to client/v2/autocli/flag/messager_binder.go index 6d07e3564a07..46a28baa285a 100644 --- a/client/v2/autocli/flag/message.go +++ b/client/v2/autocli/flag/messager_binder.go @@ -8,16 +8,31 @@ import ( "google.golang.org/protobuf/reflect/protoreflect" ) +// SignerInfo contains information about the signer field. +// That field is special because it needs to be known for signing. +// This struct keeps track of the field name and whether it is a flag. +// IsFlag and PositionalArgIndex are mutually exclusive. +type SignerInfo struct { + PositionalArgIndex int + IsFlag bool + + FieldName string + FlagName string // flag name (always set if IsFlag is true) +} + // MessageBinder binds multiple flags in a flag set to a protobuf message. type MessageBinder struct { - CobraArgs cobra.PositionalArgs + CobraArgs cobra.PositionalArgs + SignerInfo SignerInfo positionalFlagSet *pflag.FlagSet positionalArgs []fieldBinding - hasVarargs bool + flagBindings []fieldBinding + messageType protoreflect.MessageType - flagBindings []fieldBinding - messageType protoreflect.MessageType + hasVarargs bool + hasOptional bool + mandatoryArgUntil int } // BuildMessage builds and returns a new message for the bound flags. @@ -32,21 +47,19 @@ func (m MessageBinder) Bind(msg protoreflect.Message, positionalArgs []string) e // first set positional args in the positional arg flag set n := len(positionalArgs) for i := range m.positionalArgs { - if i >= n { - panic("unexpected: validate args should have caught this") + if i == n { + break } name := fmt.Sprintf("%d", i) - if i == n-1 && m.hasVarargs { + if i == m.mandatoryArgUntil && m.hasVarargs { for _, v := range positionalArgs[i:] { - err := m.positionalFlagSet.Set(name, v) - if err != nil { + if err := m.positionalFlagSet.Set(name, v); err != nil { return err } } } else { - err := m.positionalFlagSet.Set(name, positionalArgs[i]) - if err != nil { + if err := m.positionalFlagSet.Set(name, positionalArgs[i]); err != nil { return err } } @@ -54,16 +67,14 @@ func (m MessageBinder) Bind(msg protoreflect.Message, positionalArgs []string) e // bind positional arg values to the message for _, arg := range m.positionalArgs { - err := arg.bind(msg) - if err != nil { + if err := arg.bind(msg); err != nil { return err } } // bind flag values to the message for _, binding := range m.flagBindings { - err := binding.bind(msg) - if err != nil { + if err := binding.bind(msg); err != nil { return err } } @@ -88,12 +99,14 @@ func (f fieldBinding) bind(msg protoreflect.Message) error { if err != nil { return err } - kind := f.field.Kind() - if !(field.IsList() || - field.IsMap() || - kind == protoreflect.MessageKind || - kind == protoreflect.GroupKind) { + + if field.IsMap() { + return nil + } + + if msg.IsValid() && val.IsValid() { msg.Set(f.field, val) } + return nil } diff --git a/client/v2/autocli/flag/pagination.go b/client/v2/autocli/flag/pagination.go deleted file mode 100644 index 31d5316251c7..000000000000 --- a/client/v2/autocli/flag/pagination.go +++ /dev/null @@ -1,21 +0,0 @@ -package flag - -import ( - "context" - - autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" - "github.com/spf13/pflag" - "google.golang.org/protobuf/reflect/protoreflect" - - "cosmossdk.io/client/v2/internal/util" -) - -func (b *Builder) bindPageRequest(ctx context.Context, flagSet *pflag.FlagSet, field protoreflect.FieldDescriptor) (HasValue, error) { - return b.addMessageFlags( - ctx, - flagSet, - util.ResolveMessageType(b.TypeResolver, field.Message()), - &autocliv1.RpcCommandOptions{}, - namingOptions{Prefix: "page-"}, - ) -} diff --git a/client/v2/autocli/flag/pubkey.go b/client/v2/autocli/flag/pubkey.go new file mode 100644 index 000000000000..adc07956f690 --- /dev/null +++ b/client/v2/autocli/flag/pubkey.go @@ -0,0 +1,60 @@ +package flag + +import ( + "context" + "fmt" + + "google.golang.org/protobuf/reflect/protoreflect" + + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" +) + +type pubkeyType struct{} + +func (a pubkeyType) NewValue(_ *context.Context, _ *Builder) Value { + return &pubkeyValue{} +} + +func (a pubkeyType) DefaultValue() string { + return "" +} + +type pubkeyValue struct { + value *types.Any +} + +func (a pubkeyValue) Get(protoreflect.Value) (protoreflect.Value, error) { + return protoreflect.ValueOf(a.value), nil +} + +func (a pubkeyValue) String() string { + return a.value.String() +} + +func (a *pubkeyValue) Set(s string) error { + registry := types.NewInterfaceRegistry() + cryptocodec.RegisterInterfaces(registry) + cdc := codec.NewProtoCodec(registry) + + var pk cryptotypes.PubKey + err := cdc.UnmarshalInterfaceJSON([]byte(s), &pk) + if err != nil { + return fmt.Errorf("input isn't a pubkey: %w", err) + } + + any, err := types.NewAnyWithValue(pk) + if err != nil { + return fmt.Errorf("error converting to any type") + } + + a.value = any + + return nil +} + +func (a pubkeyValue) Type() string { + return "pubkey" +} diff --git a/client/v2/autocli/flag/register.go b/client/v2/autocli/flag/register.go deleted file mode 100644 index a3a525b34374..000000000000 --- a/client/v2/autocli/flag/register.go +++ /dev/null @@ -1,111 +0,0 @@ -package flag - -import ( - "context" - "fmt" - - autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" - "github.com/spf13/cobra" - "github.com/spf13/pflag" - "google.golang.org/protobuf/reflect/protoreflect" -) - -func (b *Builder) AddMessageFlags(ctx context.Context, flagSet *pflag.FlagSet, messageType protoreflect.MessageType, commandOptions *autocliv1.RpcCommandOptions) (*MessageBinder, error) { - return b.addMessageFlags(ctx, flagSet, messageType, commandOptions, namingOptions{}) -} - -// AddMessageFlags adds flags for each field in the message to the flag set. -func (b *Builder) addMessageFlags(ctx context.Context, flagSet *pflag.FlagSet, messageType protoreflect.MessageType, commandOptions *autocliv1.RpcCommandOptions, options namingOptions) (*MessageBinder, error) { - fields := messageType.Descriptor().Fields() - numFields := fields.Len() - handler := &MessageBinder{ - messageType: messageType, - } - - isPositional := map[string]bool{} - hasVarargs := false - n := len(commandOptions.PositionalArgs) - // positional args are also parsed using a FlagSet so that we can reuse all the same parsers - handler.positionalFlagSet = pflag.NewFlagSet("positional", pflag.ContinueOnError) - for i, arg := range commandOptions.PositionalArgs { - isPositional[arg.ProtoField] = true - - field := fields.ByName(protoreflect.Name(arg.ProtoField)) - if field == nil { - return nil, fmt.Errorf("can't find field %s on %s", arg.ProtoField, messageType.Descriptor().FullName()) - } - - if arg.Varargs { - if i != n-1 { - return nil, fmt.Errorf("varargs positional argument %s must be the last argument", arg.ProtoField) - } - - hasVarargs = true - } - - _, hasValue, err := b.addFieldFlag( - ctx, - handler.positionalFlagSet, - field, - &autocliv1.FlagOptions{Name: fmt.Sprintf("%d", i)}, - namingOptions{}, - ) - if err != nil { - return nil, err - } - - handler.positionalArgs = append(handler.positionalArgs, fieldBinding{ - field: field, - hasValue: hasValue, - }) - } - - if hasVarargs { - handler.CobraArgs = cobra.MinimumNArgs(n) - handler.hasVarargs = true - } else { - handler.CobraArgs = cobra.ExactArgs(n) - } - - // validate flag options - for name := range commandOptions.FlagOptions { - if fields.ByName(protoreflect.Name(name)) == nil { - return nil, fmt.Errorf("can't find field %s on %s specified as a flag", name, messageType.Descriptor().FullName()) - } - } - - flagOptsByFlagName := map[string]*autocliv1.FlagOptions{} - for i := 0; i < numFields; i++ { - field := fields.Get(i) - if isPositional[string(field.Name())] { - continue - } - - flagOpts := commandOptions.FlagOptions[string(field.Name())] - name, hasValue, err := b.addFieldFlag(ctx, flagSet, field, flagOpts, options) - flagOptsByFlagName[name] = flagOpts - if err != nil { - return nil, err - } - - handler.flagBindings = append(handler.flagBindings, fieldBinding{ - hasValue: hasValue, - field: field, - }) - } - - flagSet.VisitAll(func(flag *pflag.Flag) { - opts := flagOptsByFlagName[flag.Name] - if opts != nil { - // This is a bit of hacking around the pflag API, but - // we need to set these options here using Flag.VisitAll because the flag - // constructors that pflag gives us (StringP, Int32P, etc.) do not - // actually return the *Flag instance - flag.Deprecated = opts.Deprecated - flag.ShorthandDeprecated = opts.ShorthandDeprecated - flag.Hidden = opts.Hidden - } - }) - - return handler, nil -} diff --git a/client/v2/autocli/flag/timestamp.go b/client/v2/autocli/flag/timestamp.go index c759c70f2178..d77f0293bd97 100644 --- a/client/v2/autocli/flag/timestamp.go +++ b/client/v2/autocli/flag/timestamp.go @@ -10,7 +10,7 @@ import ( type timestampType struct{} -func (t timestampType) NewValue(context.Context, *Builder) Value { +func (t timestampType) NewValue(*context.Context, *Builder) Value { return ×tampValue{} } diff --git a/client/v2/autocli/flag/type.go b/client/v2/autocli/flag/type.go deleted file mode 100644 index a0e79b553d90..000000000000 --- a/client/v2/autocli/flag/type.go +++ /dev/null @@ -1,15 +0,0 @@ -package flag - -import ( - "context" -) - -// Type specifies a custom flag type. -type Type interface { - // NewValue returns a new pflag.Value which must also implement either - // SimpleValue or ListValue. - NewValue(context.Context, *Builder) Value - - // DefaultValue is the default value for this type. - DefaultValue() string -} diff --git a/client/v2/autocli/interface.go b/client/v2/autocli/interface.go index edcb5226094f..df31817287c3 100644 --- a/client/v2/autocli/interface.go +++ b/client/v2/autocli/interface.go @@ -1,9 +1,9 @@ package autocli import ( - autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" "github.com/spf13/cobra" + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" "cosmossdk.io/core/appmodule" ) diff --git a/client/v2/autocli/keyring/interface.go b/client/v2/autocli/keyring/interface.go new file mode 100644 index 000000000000..fa448bd20599 --- /dev/null +++ b/client/v2/autocli/keyring/interface.go @@ -0,0 +1,23 @@ +package keyring + +import ( + signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" + + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" +) + +// Keyring is an interface used for signing transactions. +// It aims to be simplistic and easy to use. +type Keyring interface { + // List returns the names of all keys stored in the keyring. + List() ([]string, error) + + // LookupAddressByKeyName returns the address of the key with the given name. + LookupAddressByKeyName(name string) ([]byte, error) + + // GetPubKey returns the public key of the key with the given name. + GetPubKey(name string) (cryptotypes.PubKey, error) + + // Sign signs the given bytes with the key with the given name. + Sign(name string, msg []byte, signMode signingv1beta1.SignMode) ([]byte, error) +} diff --git a/client/v2/autocli/keyring/keyring.go b/client/v2/autocli/keyring/keyring.go new file mode 100644 index 000000000000..601163aac690 --- /dev/null +++ b/client/v2/autocli/keyring/keyring.go @@ -0,0 +1,48 @@ +package keyring + +import ( + "context" + + signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" + + "github.com/cosmos/cosmos-sdk/crypto/types" +) + +// KeyringContextKey is the key used to store the keyring in the context. +// The keyring must be wrapped using the KeyringImpl. +var KeyringContextKey struct{} + +var _ Keyring = &KeyringImpl{} + +type KeyringImpl struct { //nolint:revive // stuttering is fine + k Keyring +} + +// NewKeyringInContext returns a new context with the keyring set. +func NewKeyringInContext(ctx context.Context, k Keyring) context.Context { + return context.WithValue(ctx, KeyringContextKey, NewKeyringImpl(k)) +} + +func NewKeyringImpl(k Keyring) *KeyringImpl { + return &KeyringImpl{k: k} +} + +// GetPubKey implements Keyring. +func (k *KeyringImpl) GetPubKey(name string) (types.PubKey, error) { + return k.k.GetPubKey(name) +} + +// List implements Keyring. +func (k *KeyringImpl) List() ([]string, error) { + return k.k.List() +} + +// LookupAddressByKeyName implements Keyring. +func (k *KeyringImpl) LookupAddressByKeyName(name string) ([]byte, error) { + return k.k.LookupAddressByKeyName(name) +} + +// Sign implements Keyring. +func (k *KeyringImpl) Sign(name string, msg []byte, signMode signingv1beta1.SignMode) ([]byte, error) { + return k.k.Sign(name, msg, signMode) +} diff --git a/client/v2/autocli/keyring/no_keyring.go b/client/v2/autocli/keyring/no_keyring.go new file mode 100644 index 000000000000..e14267cee5e3 --- /dev/null +++ b/client/v2/autocli/keyring/no_keyring.go @@ -0,0 +1,31 @@ +package keyring + +import ( + "errors" + + signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" + + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" +) + +var _ Keyring = NoKeyring{} + +var errNoKeyring = errors.New("no keyring configured") + +type NoKeyring struct{} + +func (k NoKeyring) List() ([]string, error) { + return nil, errNoKeyring +} + +func (k NoKeyring) LookupAddressByKeyName(name string) ([]byte, error) { + return nil, errNoKeyring +} + +func (k NoKeyring) GetPubKey(name string) (cryptotypes.PubKey, error) { + return nil, errNoKeyring +} + +func (k NoKeyring) Sign(name string, msg []byte, signMode signingv1beta1.SignMode) ([]byte, error) { + return nil, errNoKeyring +} diff --git a/client/v2/autocli/msg.go b/client/v2/autocli/msg.go index 704d4e3c08b6..322fa6b26228 100644 --- a/client/v2/autocli/msg.go +++ b/client/v2/autocli/msg.go @@ -1,22 +1,29 @@ package autocli import ( + "context" "fmt" - autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" - "github.com/cockroachdb/errors" "github.com/spf13/cobra" - "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" + "google.golang.org/protobuf/types/dynamicpb" + + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + "cosmossdk.io/client/v2/autocli/flag" + "cosmossdk.io/client/v2/internal/util" + + "github.com/cosmos/cosmos-sdk/client" + clienttx "github.com/cosmos/cosmos-sdk/client/tx" ) // BuildMsgCommand builds the msg commands for all the provided modules. If a custom command is provided for a // module, this is used instead of any automatically generated CLI commands. This allows apps to a fully dynamic client // with a more customized experience if a binary with custom commands is downloaded. -func (b *Builder) BuildMsgCommand(appOptions AppOptions, customCmds map[string]*cobra.Command, buildModuleCommand enhanceCommandFunc) (*cobra.Command, error) { - msgCmd := topLevelCmd("tx", "Transaction subcommands") - if err := b.enhanceCommandCommon(msgCmd, appOptions, customCmds, enhanceMsg); err != nil { +func (b *Builder) BuildMsgCommand(ctx context.Context, appOptions AppOptions, customCmds map[string]*cobra.Command) (*cobra.Command, error) { + msgCmd := topLevelCmd(ctx, "tx", "Transaction subcommands") + + if err := b.enhanceCommandCommon(msgCmd, msgCmdType, appOptions, customCmds); err != nil { return nil, err } @@ -28,13 +35,23 @@ func (b *Builder) BuildMsgCommand(appOptions AppOptions, customCmds map[string]* // order to add auto-generated commands to an existing command. func (b *Builder) AddMsgServiceCommands(cmd *cobra.Command, cmdDescriptor *autocliv1.ServiceCommandDescriptor) error { for cmdName, subCmdDescriptor := range cmdDescriptor.SubCommands { - subCmd := topLevelCmd(cmdName, fmt.Sprintf("Tx commands for the %s service", subCmdDescriptor.Service)) + subCmd := findSubCommand(cmd, cmdName) + if subCmd == nil { + short := subCmdDescriptor.Short + if short == "" { + short = fmt.Sprintf("Tx commands for the %s service", subCmdDescriptor.Service) + } + subCmd = topLevelCmd(cmd.Context(), cmdName, short) + } + // Add recursive sub-commands if there are any. This is used for nested services. - err := b.AddMsgServiceCommands(subCmd, subCmdDescriptor) - if err != nil { + if err := b.AddMsgServiceCommands(subCmd, subCmdDescriptor); err != nil { return err } - cmd.AddCommand(subCmd) + + if !subCmdDescriptor.EnhanceCustomCommand { + cmd.AddCommand(subCmd) + } } if cmdDescriptor.Service == "" { @@ -42,14 +59,9 @@ func (b *Builder) AddMsgServiceCommands(cmd *cobra.Command, cmdDescriptor *autoc return nil } - resolver := b.FileResolver - if b.FileResolver == nil { - resolver = protoregistry.GlobalFiles - } - - descriptor, err := resolver.FindDescriptorByName(protoreflect.FullName(cmdDescriptor.Service)) + descriptor, err := b.FileResolver.FindDescriptorByName(protoreflect.FullName(cmdDescriptor.Service)) if err != nil { - return errors.Errorf("can't find service %s: %v", cmdDescriptor.Service, err) + return fmt.Errorf("can't find service %s: %w", cmdDescriptor.Service, err) } service := descriptor.(protoreflect.ServiceDescriptor) methods := service.Methods() @@ -76,14 +88,22 @@ func (b *Builder) AddMsgServiceCommands(cmd *cobra.Command, cmdDescriptor *autoc continue } + if !util.IsSupportedVersion(methodDescriptor) { + continue + } + methodCmd, err := b.BuildMsgMethodCommand(methodDescriptor, methodOpts) if err != nil { return err } - if methodCmd != nil { - cmd.AddCommand(methodCmd) + if findSubCommand(cmd, methodCmd.Name()) != nil { + // do not overwrite existing commands + // we do not display a warning because you may want to overwrite an autocli command + continue } + + cmd.AddCommand(methodCmd) } return nil @@ -91,26 +111,60 @@ func (b *Builder) AddMsgServiceCommands(cmd *cobra.Command, cmdDescriptor *autoc // BuildMsgMethodCommand returns a command that outputs the JSON representation of the message. func (b *Builder) BuildMsgMethodCommand(descriptor protoreflect.MethodDescriptor, options *autocliv1.RpcCommandOptions) (*cobra.Command, error) { - jsonMarshalOptions := protojson.MarshalOptions{ - Indent: " ", - UseProtoNames: true, - UseEnumNumbers: false, - EmitUnpopulated: true, - Resolver: b.TypeResolver, - } - - cmd, err := b.buildMethodCommandCommon(descriptor, options, func(cmd *cobra.Command, input protoreflect.Message) error { - bz, err := jsonMarshalOptions.Marshal(input.Interface()) + execFunc := func(cmd *cobra.Command, input protoreflect.Message) error { + clientCtx, err := client.GetClientTxContext(cmd) if err != nil { return err } - return b.outOrStdoutFormat(cmd, bz) - }) + clientCtx = clientCtx.WithCmdContext(cmd.Context()) + clientCtx = clientCtx.WithOutput(cmd.OutOrStdout()) + + fd := input.Descriptor().Fields().ByName(protoreflect.Name(flag.GetSignerFieldName(input.Descriptor()))) + addressCodec := b.Builder.AddressCodec + + // set signer to signer field if empty + if addr := input.Get(fd).String(); addr == "" { + scalarType, ok := flag.GetScalarType(fd) + if ok { + // override address codec if validator or consensus address + switch scalarType { + case flag.ValidatorAddressStringScalarType: + addressCodec = b.Builder.ValidatorAddressCodec + case flag.ConsensusAddressStringScalarType: + addressCodec = b.Builder.ConsensusAddressCodec + } + } + + signerFromFlag := clientCtx.GetFromAddress() + signer, err := addressCodec.BytesToString(signerFromFlag.Bytes()) + if err != nil { + return fmt.Errorf("failed to set signer on message, got %v: %w", signerFromFlag, err) + } + + input.Set(fd, protoreflect.ValueOfString(signer)) + } + + // AutoCLI uses protov2 messages, while the SDK only supports proto v1 messages. + // Here we use dynamicpb, to create a proto v1 compatible message. + // The SDK codec will handle protov2 -> protov1 (marshal) + msg := dynamicpb.NewMessage(input.Descriptor()) + proto.Merge(msg, input.Interface()) + + return clienttx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + } + + cmd, err := b.buildMethodCommandCommon(descriptor, options, execFunc) + if err != nil { + return nil, err + } if b.AddTxConnFlags != nil { b.AddTxConnFlags(cmd) } - return cmd, err + // silence usage only for inner txs & queries commands + cmd.SilenceUsage = true + + return cmd, nil } diff --git a/client/v2/autocli/msg_test.go b/client/v2/autocli/msg_test.go index b58393da8b19..612207b6a42e 100644 --- a/client/v2/autocli/msg_test.go +++ b/client/v2/autocli/msg_test.go @@ -1,288 +1,183 @@ package autocli import ( + "context" "fmt" - "strings" "testing" "github.com/spf13/cobra" - "google.golang.org/protobuf/encoding/protojson" "gotest.tools/v3/assert" "gotest.tools/v3/golden" autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" "cosmossdk.io/client/v2/internal/testpb" -) -var buildModuleMsgCommand = func(moduleName string, b *Builder) (*cobra.Command, error) { - cmd := topLevelCmd(moduleName, fmt.Sprintf("Transactions commands for the %s module", moduleName)) + "github.com/cosmos/cosmos-sdk/client" +) - err := b.AddMsgServiceCommands(cmd, testCmdMsgDesc) +var buildModuleMsgCommand = func(moduleName string, f *fixture) (*cobra.Command, error) { + ctx := context.WithValue(context.Background(), client.ClientContextKey, &f.clientCtx) + cmd := topLevelCmd(ctx, moduleName, fmt.Sprintf("Transactions commands for the %s module", moduleName)) + err := f.b.AddMsgServiceCommands(cmd, bankAutoCLI) return cmd, err } -var testCmdMsgDesc = &autocliv1.ServiceCommandDescriptor{ - Service: testpb.Msg_ServiceDesc.ServiceName, +func buildCustomModuleMsgCommand(cmdDescriptor *autocliv1.ServiceCommandDescriptor) func(moduleName string, f *fixture) (*cobra.Command, error) { + return func(moduleName string, f *fixture) (*cobra.Command, error) { + ctx := context.WithValue(context.Background(), client.ClientContextKey, &f.clientCtx) + cmd := topLevelCmd(ctx, moduleName, fmt.Sprintf("Transactions commands for the %s module", moduleName)) + err := f.b.AddMsgServiceCommands(cmd, cmdDescriptor) + return cmd, err + } +} + +var bankAutoCLI = &autocliv1.ServiceCommandDescriptor{ + Service: bankv1beta1.Msg_ServiceDesc.ServiceName, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { - RpcMethod: "Send", - Use: "send [pos1] [pos2] [pos3...]", - Version: "1.0", - Alias: []string{"s"}, - SuggestFor: []string{"send"}, - Example: "send 1 abc {}", - Short: "send msg the value provided by the user", - Long: "send msg the value provided by the user as a proto JSON object with populated with the provided fields and positional arguments", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{ - { - ProtoField: "positional1", - }, - { - ProtoField: "positional2", - }, - { - ProtoField: "positional3_varargs", - Varargs: true, - }, - }, - FlagOptions: map[string]*autocliv1.FlagOptions{ - "u32": { - Name: "uint32", - Shorthand: "u", - Usage: "some random uint32", - }, - "i32": { - Usage: "some random int32", - DefaultValue: "3", - }, - "u64": { - Usage: "some random uint64", - DefaultValue: "5", - }, - "deprecated_field": { - Deprecated: "don't use this", - }, - "shorthand_deprecated_field": { - Shorthand: "d", - Deprecated: "bad idea", - }, - "hidden_bool": { - Hidden: true, - }, - }, - }, - }, - SubCommands: map[string]*autocliv1.ServiceCommandDescriptor{ - // we test the sub-command functionality using the same service with different options - "deprecatedmsg": { - Service: testpb.Msg_ServiceDesc.ServiceName, - RpcCommandOptions: []*autocliv1.RpcCommandOptions{ - { - RpcMethod: "Send", - Deprecated: "dont use this", - Short: "deprecated subcommand", - }, - }, - }, - "skipmsg": { - Service: testpb.Msg_ServiceDesc.ServiceName, - RpcCommandOptions: []*autocliv1.RpcCommandOptions{ - { - RpcMethod: "Send", - Skip: true, - Short: "skip subcommand", - }, - }, + RpcMethod: "Send", + Use: "send [from_key_or_address] [to_address] [amount] [flags]", + Short: "Send coins from one account to another", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "from_address"}, {ProtoField: "to_address"}, {ProtoField: "amount"}}, }, }, + EnhanceCustomCommand: true, } -func TestMsgOptions(t *testing.T) { - conn := testExecCommon(t, - buildModuleMsgCommand, - "send", "5", "6", "1foo", - "--uint32", "7", - "--u64", "8", +func TestMsg(t *testing.T) { + fixture := initFixture(t) + out, err := runCmd(fixture, buildModuleMsgCommand, "send", + "cosmos1y74p8wyy4enfhfn342njve6cjmj5c8dtl6emdk", "cosmos1y74p8wyy4enfhfn342njve6cjmj5c8dtl6emdk", "1foo", + "--generate-only", "--output", "json", ) - response := conn.out.String() - var output testpb.MsgRequest - err := protojson.Unmarshal([]byte(response), &output) assert.NilError(t, err) - assert.Equal(t, output.GetU32(), uint32(7)) - assert.Equal(t, output.GetPositional1(), int32(5)) - assert.Equal(t, output.GetPositional2(), "6") -} + golden.Assert(t, out.String(), "msg-output.golden") -func TestMsgOutputFormat(t *testing.T) { - conn := testExecCommon(t, buildModuleMsgCommand, - "send", "5", "6", "1foo", + out, err = runCmd(fixture, buildCustomModuleMsgCommand(&autocliv1.ServiceCommandDescriptor{ + Service: bankv1beta1.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Send", + Use: "send [from_key_or_address] [to_address] [amount] [flags]", + Short: "Send coins from one account to another", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "from_address"}, {ProtoField: "to_address"}, {ProtoField: "amount"}}, + }, + }, + EnhanceCustomCommand: true, + }), "send", + "cosmos1y74p8wyy4enfhfn342njve6cjmj5c8dtl6emdk", "cosmos1y74p8wyy4enfhfn342njve6cjmj5c8dtl6emdk", "1foo", + "--generate-only", "--output", "json", ) - assert.Assert(t, strings.Contains(conn.out.String(), "{")) - conn = testExecCommon(t, buildModuleMsgCommand, - "send", "5", "6", "1foo", - "--output", "text", - ) - - assert.Assert(t, strings.Contains(conn.out.String(), "positional1: 5")) -} + assert.NilError(t, err) + golden.Assert(t, out.String(), "msg-output.golden") -func TestMsgOptionsError(t *testing.T) { - conn := testExecCommon(t, buildModuleMsgCommand, - "send", "5", - "--uint32", "7", - "--u64", "8", + out, err = runCmd(fixture, buildCustomModuleMsgCommand(&autocliv1.ServiceCommandDescriptor{ + Service: bankv1beta1.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Send", + Use: "send [from_key_or_address] [to_address] [amount] [flags]", + Short: "Send coins from one account to another", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "to_address"}, {ProtoField: "amount"}}, + // from_address should be automatically added + }, + }, + EnhanceCustomCommand: true, + }), "send", + "cosmos1y74p8wyy4enfhfn342njve6cjmj5c8dtl6emdk", "1foo", + "--from", "cosmos1y74p8wyy4enfhfn342njve6cjmj5c8dtl6emdk", + "--generate-only", + "--output", "json", ) + assert.NilError(t, err) + golden.Assert(t, out.String(), "msg-output.golden") - assert.Assert(t, strings.Contains(conn.errorOut.String(), "requires at least 3 arg")) - - conn = testExecCommon(t, buildModuleMsgCommand, - "send", "5", "6", `{"denom":"foo","amount":"1"}`, - "--uint32", "7", - "--u64", "abc", + out, err = runCmd(fixture, buildCustomModuleMsgCommand(&autocliv1.ServiceCommandDescriptor{ + Service: bankv1beta1.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Send", + Use: "send [from_key_or_address] [to_address] [amount] [flags]", + Short: "Send coins from one account to another", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "to_address"}, {ProtoField: "amount"}}, + FlagOptions: map[string]*autocliv1.FlagOptions{ + "from_address": {Name: "sender"}, // use a custom flag for signer + }, + }, + }, + EnhanceCustomCommand: true, + }), "send", + "cosmos1y74p8wyy4enfhfn342njve6cjmj5c8dtl6emdk", "1foo", + "--sender", "cosmos1y74p8wyy4enfhfn342njve6cjmj5c8dtl6emdk", + "--generate-only", + "--output", "json", ) - assert.Assert(t, strings.Contains(conn.errorOut.String(), "invalid argument ")) + assert.NilError(t, err) + golden.Assert(t, out.String(), "msg-output.golden") } -func TestDeprecatedMsg(t *testing.T) { - conn := testExecCommon(t, buildModuleMsgCommand, "send", - "1", "abc", `{"denom":"foo","amount":"1"}`, - "--deprecated-field", "foo") - assert.Assert(t, strings.Contains(conn.out.String(), "--deprecated-field has been deprecated")) +func TestMsgOptionsError(t *testing.T) { + fixture := initFixture(t) - conn = testExecCommon(t, buildModuleMsgCommand, "send", - "1", "abc", `{"denom":"foo","amount":"1"}`, - "-d", "foo") - assert.Assert(t, strings.Contains(conn.out.String(), "--shorthand-deprecated-field has been deprecated")) -} + _, err := runCmd(fixture, buildModuleMsgCommand, + "send", "5", + ) + assert.ErrorContains(t, err, "accepts 3 arg(s)") -func TestEverythingMsg(t *testing.T) { - conn := testExecCommon(t, buildModuleMsgCommand, - "send", - "1", - "abc", - "1234foo", - "4321foo", - "--output", "json", - "--a-bool", - "--an-enum", "two", - "--a-message", `{"bar":"abc", "baz":-3}`, - "--duration", "4h3s", - "--uint32", "27", - "--u64", "3267246890", - "--i32", "-253", - "--i64", "-234602347", - "--str", "def", - "--timestamp", "2019-01-02T00:01:02Z", - "--a-coin", "10000000foo", - "--an-address", "cosmos1y74p8wyy4enfhfn342njve6cjmj5c8dtl6emdk", - "--bz", "c2RncXdlZndkZ3NkZw==", - "--page-count-total", - "--page-key", "MTIzNTQ4N3NnaGRhcw==", - "--page-limit", "1000", - "--page-offset", "10", - "--page-reverse", - "--bools", "true", - "--bools", "false,false,true", - "--enums", "one", - "--enums", "five", - "--enums", "two", - "--strings", "abc", - "--strings", "xyz", - "--strings", "xyz,qrs", - "--durations", "3s", - "--durations", "5s", - "--durations", "10h", - "--some-messages", "{}", - "--some-messages", `{"bar":"baz"}`, - "--some-messages", `{"baz":-1}`, - "--uints", "1,2,3", - "--uints", "4", + _, err = runCmd(fixture, buildModuleMsgCommand, + "send", "foo", "bar", "invalid", ) - response := conn.out.String() - var output testpb.MsgRequest - err := protojson.Unmarshal([]byte(response), &output) - assert.NilError(t, err) - assert.Equal(t, output.GetU32(), uint32(27)) - assert.Equal(t, output.GetU64(), uint64(3267246890)) - assert.Equal(t, output.GetPositional1(), int32(1)) - assert.Equal(t, output.GetPositional2(), "abc") - assert.Equal(t, output.GetABool(), true) - assert.Equal(t, output.GetAnEnum(), testpb.Enum_ENUM_TWO) + assert.ErrorContains(t, err, "invalid argument") } func TestHelpMsg(t *testing.T) { - conn := testExecCommon(t, buildModuleMsgCommand, "-h") - golden.Assert(t, conn.out.String(), "help-toplevel-msg.golden") + fixture := initFixture(t) - conn = testExecCommon(t, buildModuleMsgCommand, "send", "-h") - golden.Assert(t, conn.out.String(), "help-echo-msg.golden") + out, err := runCmd(fixture, buildModuleMsgCommand, "-h") + assert.NilError(t, err) + golden.Assert(t, out.String(), "help-toplevel-msg.golden") - conn = testExecCommon(t, buildModuleMsgCommand, "deprecatedmsg", "send", "-h") - golden.Assert(t, conn.out.String(), "help-deprecated-msg.golden") + out, err = runCmd(fixture, buildModuleMsgCommand, "send", "-h") + assert.NilError(t, err) + golden.Assert(t, out.String(), "help-echo-msg.golden") } -func TestBuildMsgCommand(t *testing.T) { +func TestBuildCustomMsgCommand(t *testing.T) { b := &Builder{} customCommandCalled := false appOptions := AppOptions{ ModuleOptions: map[string]*autocliv1.ModuleOptions{ "test": { - Tx: testCmdMsgDesc, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: testpb.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{}, + }, }, }, } - cmd, err := b.BuildMsgCommand(appOptions, map[string]*cobra.Command{ + cmd, err := b.BuildMsgCommand(context.Background(), appOptions, map[string]*cobra.Command{ "test": {Use: "test", Run: func(cmd *cobra.Command, args []string) { customCommandCalled = true }}, - }, enhanceMsg) + }) assert.NilError(t, err) cmd.SetArgs([]string{"test", "tx"}) assert.NilError(t, cmd.Execute()) assert.Assert(t, customCommandCalled) } -func TestErrorBuildMsgCommand(t *testing.T) { - b := &Builder{} - - commandDescriptor := &autocliv1.ServiceCommandDescriptor{ - Service: testpb.Msg_ServiceDesc.ServiceName, - RpcCommandOptions: []*autocliv1.RpcCommandOptions{ - { - RpcMethod: "Send", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{ - { - ProtoField: "un-existent-proto-field", - }, - }, - }, - }, - } - - appOptions := AppOptions{ - ModuleOptions: map[string]*autocliv1.ModuleOptions{ - "test": { - Tx: commandDescriptor, - }, - }, - } - - _, err := b.BuildMsgCommand(appOptions, nil, enhanceMsg) - assert.ErrorContains(t, err, "can't find field un-existent-proto-field") - - nonExistentService := &autocliv1.ServiceCommandDescriptor{Service: "un-existent-service"} - appOptions.ModuleOptions["test"].Tx = nonExistentService - _, err = b.BuildMsgCommand(appOptions, nil, enhanceMsg) - assert.ErrorContains(t, err, "can't find service un-existent-service") -} - func TestNotFoundErrorsMsg(t *testing.T) { - b := &Builder{} + fixture := initFixture(t) + b := fixture.b + b.AddQueryConnFlags = nil + b.AddTxConnFlags = nil + buildModuleMsgCommand := func(moduleName string, cmdDescriptor *autocliv1.ServiceCommandDescriptor) (*cobra.Command, error) { - cmd := topLevelCmd(moduleName, fmt.Sprintf("Transactions commands for the %s module", moduleName)) + cmd := topLevelCmd(context.Background(), moduleName, fmt.Sprintf("Transactions commands for the %s module", moduleName)) err := b.AddMsgServiceCommands(cmd, cmdDescriptor) return cmd, err @@ -326,38 +221,3 @@ func TestNotFoundErrorsMsg(t *testing.T) { }) assert.ErrorContains(t, err, "can't find field un-existent-flag") } - -func TestEnhanceMessageCommand(t *testing.T) { - b := &Builder{} - // Test that the command has a subcommand - cmd := &cobra.Command{Use: "test"} - cmd.AddCommand(&cobra.Command{Use: "test"}) - - appOptions := AppOptions{ - ModuleOptions: map[string]*autocliv1.ModuleOptions{ - "test": {}, - }, - } - - err := b.enhanceCommandCommon(cmd, appOptions, map[string]*cobra.Command{}, enhanceMsg) - assert.NilError(t, err) - - cmd = &cobra.Command{Use: "test"} - - appOptions.ModuleOptions = map[string]*autocliv1.ModuleOptions{} - customCommands := map[string]*cobra.Command{ - "test2": {Use: "test"}, - } - err = b.enhanceCommandCommon(cmd, appOptions, customCommands, enhanceMsg) - assert.NilError(t, err) - - cmd = &cobra.Command{Use: "test"} - appOptions = AppOptions{ - ModuleOptions: map[string]*autocliv1.ModuleOptions{ - "test": {Tx: nil}, - }, - } - customCommands = map[string]*cobra.Command{} - err = b.enhanceCommandCommon(cmd, appOptions, customCommands, enhanceMsg) - assert.NilError(t, err) -} diff --git a/client/v2/autocli/query.go b/client/v2/autocli/query.go index 3fd10ea525dd..dcb41bbfa25a 100644 --- a/client/v2/autocli/query.go +++ b/client/v2/autocli/query.go @@ -1,26 +1,33 @@ package autocli import ( + "context" "fmt" + "io" + "strings" + "time" autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + "cosmossdk.io/math" + "cosmossdk.io/x/tx/signing/aminojson" "github.com/cockroachdb/errors" "github.com/spf13/cobra" - "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" + "cosmossdk.io/client/v2/internal/flags" "cosmossdk.io/client/v2/internal/util" + + sdk "github.com/cosmos/cosmos-sdk/types" ) // BuildQueryCommand builds the query commands for all the provided modules. If a custom command is provided for a // module, this is used instead of any automatically generated CLI commands. This allows apps to a fully dynamic client // with a more customized experience if a binary with custom commands is downloaded. -func (b *Builder) BuildQueryCommand(appOptions AppOptions, customCmds map[string]*cobra.Command, enhanceQuery enhanceCommandFunc) (*cobra.Command, error) { - queryCmd := topLevelCmd("query", "Querying subcommands") +func (b *Builder) BuildQueryCommand(ctx context.Context, appOptions AppOptions, customCmds map[string]*cobra.Command) (*cobra.Command, error) { + queryCmd := topLevelCmd(ctx, "query", "Querying subcommands") queryCmd.Aliases = []string{"q"} - if err := b.enhanceCommandCommon(queryCmd, appOptions, customCmds, enhanceQuery); err != nil { + if err := b.enhanceCommandCommon(queryCmd, queryCmdType, appOptions, customCmds); err != nil { return nil, err } @@ -32,13 +39,22 @@ func (b *Builder) BuildQueryCommand(appOptions AppOptions, customCmds map[string // order to add auto-generated commands to an existing command. func (b *Builder) AddQueryServiceCommands(cmd *cobra.Command, cmdDescriptor *autocliv1.ServiceCommandDescriptor) error { for cmdName, subCmdDesc := range cmdDescriptor.SubCommands { - subCmd := topLevelCmd(cmdName, fmt.Sprintf("Querying commands for the %s service", subCmdDesc.Service)) - err := b.AddQueryServiceCommands(subCmd, subCmdDesc) - if err != nil { + subCmd := findSubCommand(cmd, cmdName) + if subCmd == nil { + short := subCmdDesc.Short + if short == "" { + short = fmt.Sprintf("Querying commands for the %s service", subCmdDesc.Service) + } + subCmd = topLevelCmd(cmd.Context(), cmdName, short) + } + + if err := b.AddQueryServiceCommands(subCmd, subCmdDesc); err != nil { return err } - cmd.AddCommand(subCmd) + if !subCmdDesc.EnhanceCustomCommand { + cmd.AddCommand(subCmd) + } } // skip empty command descriptors @@ -46,11 +62,7 @@ func (b *Builder) AddQueryServiceCommands(cmd *cobra.Command, cmdDescriptor *aut return nil } - resolver := b.FileResolver - if resolver == nil { - resolver = protoregistry.GlobalFiles - } - descriptor, err := resolver.FindDescriptorByName(protoreflect.FullName(cmdDescriptor.Service)) + descriptor, err := b.FileResolver.FindDescriptorByName(protoreflect.FullName(cmdDescriptor.Service)) if err != nil { return errors.Errorf("can't find service %s: %v", cmdDescriptor.Service, err) } @@ -68,8 +80,7 @@ func (b *Builder) AddQueryServiceCommands(cmd *cobra.Command, cmdDescriptor *aut } } - n := methods.Len() - for i := 0; i < n; i++ { + for i := 0; i < methods.Len(); i++ { methodDescriptor := methods.Get(i) methodOpts, ok := rpcOptMap[methodDescriptor.Name()] if !ok { @@ -80,11 +91,21 @@ func (b *Builder) AddQueryServiceCommands(cmd *cobra.Command, cmdDescriptor *aut continue } - methodCmd, err := b.BuildQueryMethodCommand(methodDescriptor, methodOpts) + if !util.IsSupportedVersion(methodDescriptor) { + continue + } + + methodCmd, err := b.BuildQueryMethodCommand(cmd.Context(), methodDescriptor, methodOpts) if err != nil { return err } + if findSubCommand(cmd, methodCmd.Name()) != nil { + // do not overwrite existing commands + // we do not display a warning because you may want to overwrite an autocli command + continue + } + cmd.AddCommand(methodCmd) } @@ -93,17 +114,18 @@ func (b *Builder) AddQueryServiceCommands(cmd *cobra.Command, cmdDescriptor *aut // BuildQueryMethodCommand creates a gRPC query command for the given service method. This can be used to auto-generate // just a single command for a single service rpc method. -func (b *Builder) BuildQueryMethodCommand(descriptor protoreflect.MethodDescriptor, options *autocliv1.RpcCommandOptions) (*cobra.Command, error) { +func (b *Builder) BuildQueryMethodCommand(ctx context.Context, descriptor protoreflect.MethodDescriptor, options *autocliv1.RpcCommandOptions) (*cobra.Command, error) { getClientConn := b.GetClientConn serviceDescriptor := descriptor.Parent().(protoreflect.ServiceDescriptor) methodName := fmt.Sprintf("/%s/%s", serviceDescriptor.FullName(), descriptor.Name()) outputType := util.ResolveMessageType(b.TypeResolver, descriptor.Output()) - jsonMarshalOptions := protojson.MarshalOptions{ - Indent: " ", - UseProtoNames: true, - UseEnumNumbers: false, - EmitUnpopulated: true, - Resolver: b.TypeResolver, + encoderOptions := aminojson.EncoderOptions{ + Indent: " ", + EnumAsString: true, + DoNotSortFields: true, + AminoNameAsTypeURL: true, + TypeResolver: b.TypeResolver, + FileResolver: b.FileResolver, } cmd, err := b.buildMethodCommandCommon(descriptor, options, func(cmd *cobra.Command, input protoreflect.Message) error { @@ -113,15 +135,18 @@ func (b *Builder) BuildQueryMethodCommand(descriptor protoreflect.MethodDescript } output := outputType.New() - ctx := cmd.Context() - err = clientConn.Invoke(ctx, methodName, input.Interface(), output.Interface()) - if err != nil { + if err := clientConn.Invoke(cmd.Context(), methodName, input.Interface(), output.Interface()); err != nil { return err } - bz, err := jsonMarshalOptions.Marshal(output.Interface()) + if noIndent, _ := cmd.Flags().GetBool(flags.FlagNoIndent); noIndent { + encoderOptions.Indent = "" + } + + enc := encoder(aminojson.NewEncoder(encoderOptions)) + bz, err := enc.Marshal(output.Interface()) if err != nil { - return err + return fmt.Errorf("cannot marshal response %v: %w", output.Interface(), err) } err = b.outOrStdoutFormat(cmd, bz) @@ -133,7 +158,77 @@ func (b *Builder) BuildQueryMethodCommand(descriptor protoreflect.MethodDescript if b.AddQueryConnFlags != nil { b.AddQueryConnFlags(cmd) + + cmd.Flags().BoolP(flags.FlagNoIndent, "", false, "Do not indent JSON output") + } + + // silence usage only for inner txs & queries commands + if cmd != nil { + cmd.SilenceUsage = true } return cmd, nil } + +func encoder(encoder aminojson.Encoder) aminojson.Encoder { + return encoder.DefineTypeEncoding("google.protobuf.Duration", func(_ *aminojson.Encoder, msg protoreflect.Message, w io.Writer) error { + var ( + secondsName protoreflect.Name = "seconds" + nanosName protoreflect.Name = "nanos" + ) + + fields := msg.Descriptor().Fields() + secondsField := fields.ByName(secondsName) + if secondsField == nil { + return fmt.Errorf("expected seconds field") + } + + seconds := msg.Get(secondsField).Int() + + nanosField := fields.ByName(nanosName) + if nanosField == nil { + return fmt.Errorf("expected nanos field") + } + + nanos := msg.Get(nanosField).Int() + + _, err := fmt.Fprintf(w, `"%s"`, (time.Duration(seconds)*time.Second + (time.Duration(nanos) * time.Nanosecond)).String()) + return err + }).DefineTypeEncoding("cosmos.base.v1beta1.DecCoin", func(_ *aminojson.Encoder, msg protoreflect.Message, w io.Writer) error { + var ( + denomName protoreflect.Name = "denom" + amountName protoreflect.Name = "amount" + ) + + fields := msg.Descriptor().Fields() + denomField := fields.ByName(denomName) + if denomField == nil { + return fmt.Errorf("expected denom field") + } + + denom := msg.Get(denomField).String() + + amountField := fields.ByName(amountName) + if amountField == nil { + return fmt.Errorf("expected amount field") + } + + amount := msg.Get(amountField).String() + decimalPlace := len(amount) - math.LegacyPrecision + if decimalPlace > 0 { + amount = amount[:decimalPlace] + "." + amount[decimalPlace:] + } else if decimalPlace == 0 { + amount = "0." + amount + } else { + amount = "0." + strings.Repeat("0", -decimalPlace) + amount + } + + amountDec, err := math.LegacyNewDecFromStr(amount) + if err != nil { + return fmt.Errorf("invalid amount: %s: %w", amount, err) + } + + _, err = fmt.Fprintf(w, `"%s"`, sdk.NewDecCoinFromDec(denom, amountDec)) // TODO(@julienrbrt): Eventually remove this SDK dependency + return err + }) +} diff --git a/client/v2/autocli/query_test.go b/client/v2/autocli/query_test.go index 635060b3f961..c949ea021a0a 100644 --- a/client/v2/autocli/query_test.go +++ b/client/v2/autocli/query_test.go @@ -1,27 +1,49 @@ package autocli import ( - "bytes" "context" "fmt" "os" "strings" "testing" + "time" - autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" "github.com/spf13/cobra" - "google.golang.org/grpc" "google.golang.org/protobuf/testing/protocmp" + "google.golang.org/protobuf/types/known/durationpb" + "google.golang.org/protobuf/types/known/timestamppb" "gotest.tools/v3/assert" "gotest.tools/v3/golden" + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + queryv1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" + basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" "cosmossdk.io/client/v2/internal/testpb" + + "github.com/cosmos/cosmos-sdk/client" ) -var buildModuleQueryCommand = func(moduleName string, b *Builder) (*cobra.Command, error) { - cmd := topLevelCmd(moduleName, fmt.Sprintf("Querying commands for the %s module", moduleName)) +var buildModuleQueryCommand = func(moduleName string, f *fixture) (*cobra.Command, error) { + ctx := context.WithValue(context.Background(), client.ClientContextKey, &f.clientCtx) + cmd := topLevelCmd(ctx, moduleName, fmt.Sprintf("Querying commands for the %s module", moduleName)) + + err := f.b.AddQueryServiceCommands(cmd, testCmdDesc) + return cmd, err +} + +var buildModuleQueryCommandOptional = func(moduleName string, f *fixture) (*cobra.Command, error) { + ctx := context.WithValue(context.Background(), client.ClientContextKey, &f.clientCtx) + cmd := topLevelCmd(ctx, moduleName, fmt.Sprintf("Querying commands for the %s module", moduleName)) + + err := f.b.AddQueryServiceCommands(cmd, testCmdDescOptional) + return cmd, err +} + +var buildModuleVargasOptional = func(moduleName string, f *fixture) (*cobra.Command, error) { + ctx := context.WithValue(context.Background(), client.ClientContextKey, &f.clientCtx) + cmd := topLevelCmd(ctx, moduleName, fmt.Sprintf("Querying commands for the %s module", moduleName)) - err := b.AddQueryServiceCommands(cmd, testCmdDesc) + err := f.b.AddQueryServiceCommands(cmd, testCmdDescInvalidOptAndVargas) return cmd, err } @@ -117,21 +139,155 @@ var testCmdDesc = &autocliv1.ServiceCommandDescriptor{ }, } +var testCmdDescOptional = &autocliv1.ServiceCommandDescriptor{ + Service: testpb.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Echo", + Use: "echo [pos1] [pos2] [pos3...]", + Version: "1.0", + Alias: []string{"e"}, + SuggestFor: []string{"eco"}, + Example: "echo 1 abc {}", + Short: "echo echos the value provided by the user", + Long: "echo echos the value provided by the user as a proto JSON object with populated with the provided fields and positional arguments", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + { + ProtoField: "positional1", + }, + { + ProtoField: "positional2", + Optional: true, + }, + }, + }, + }, +} + +var testCmdDescInvalidOptAndVargas = &autocliv1.ServiceCommandDescriptor{ + Service: testpb.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Echo", + Use: "echo [pos1] [pos2] [pos3...]", + Version: "1.0", + Alias: []string{"e"}, + SuggestFor: []string{"eco"}, + Example: "echo 1 abc {}", + Short: "echo echos the value provided by the user", + Long: "echo echos the value provided by the user as a proto JSON object with populated with the provided fields and positional arguments", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + { + ProtoField: "positional1", + }, + { + ProtoField: "positional2", + Optional: true, + }, + { + ProtoField: "positional3_varargs", + Varargs: true, + }, + }, + }, + }, +} + func TestCoin(t *testing.T) { - conn := testExecCommon(t, buildModuleQueryCommand, + fixture := initFixture(t) + + _, err := runCmd(fixture, buildModuleQueryCommand, + "echo", + "1", + "abc", + "1234foo,4321bar", + "100uatom", + "--a-coin", "100000foo", + ) + assert.ErrorContains(t, err, "coin flag must be a single coin, specific multiple coins with multiple flags or spaces") + + _, err = runCmd(fixture, buildModuleQueryCommand, "echo", "1", "abc", "1234foo", "4321bar", + "100uatom", "--a-coin", "100000foo", - "--duration", "4h3s", + "--coins", "100000bar", + "--coins", "100uatom", ) - assert.DeepEqual(t, conn.lastRequest, conn.lastResponse.(*testpb.EchoResponse).Request, protocmp.Transform()) + assert.NilError(t, err) + assert.DeepEqual(t, fixture.conn.lastRequest, fixture.conn.lastResponse.(*testpb.EchoResponse).Request, protocmp.Transform()) + expectedResp := &testpb.EchoResponse{ + Request: &testpb.EchoRequest{ + Positional1: 1, + Positional2: "abc", + Positional3Varargs: []*basev1beta1.Coin{ + {Amount: "1234", Denom: "foo"}, + {Amount: "4321", Denom: "bar"}, + {Amount: "100", Denom: "uatom"}, + }, + ACoin: &basev1beta1.Coin{ + Amount: "100000", + Denom: "foo", + }, + Coins: []*basev1beta1.Coin{ + {Amount: "100000", Denom: "bar"}, + {Amount: "100", Denom: "uatom"}, + }, + Page: &queryv1beta1.PageRequest{}, + I32: 3, + U64: 5, + }, + } + assert.DeepEqual(t, fixture.conn.lastResponse.(*testpb.EchoResponse), expectedResp, protocmp.Transform()) +} + +func TestOptional(t *testing.T) { + fixture := initFixture(t) + + _, err := runCmd(fixture, buildModuleQueryCommandOptional, + "echo", + "1", + "abc", + ) + assert.NilError(t, err) + request := fixture.conn.lastRequest.(*testpb.EchoRequest) + assert.Equal(t, request.Positional2, "abc") + assert.DeepEqual(t, fixture.conn.lastRequest, fixture.conn.lastResponse.(*testpb.EchoResponse).Request, protocmp.Transform()) + + _, err = runCmd(fixture, buildModuleQueryCommandOptional, + "echo", + "1", + ) + assert.NilError(t, err) + + request = fixture.conn.lastRequest.(*testpb.EchoRequest) + assert.Equal(t, request.Positional2, "") + assert.DeepEqual(t, fixture.conn.lastRequest, fixture.conn.lastResponse.(*testpb.EchoResponse).Request, protocmp.Transform()) + + _, err = runCmd(fixture, buildModuleQueryCommandOptional, + "echo", + "1", + "abc", + "extra-arg", + ) + assert.ErrorContains(t, err, "accepts between 1 and 2 arg(s), received 3") + + _, err = runCmd(fixture, buildModuleVargasOptional, + "echo", + "1", + "abc", + "extra-arg", + ) + assert.ErrorContains(t, err, "optional positional argument positional2 must be the last argument") } func TestMap(t *testing.T) { - conn := testExecCommon(t, buildModuleQueryCommand, + fixture := initFixture(t) + + _, err := runCmd(fixture, buildModuleQueryCommand, "echo", "1", "abc", @@ -143,9 +299,10 @@ func TestMap(t *testing.T) { "--map-string-coin", "sec=100000bar", "--map-string-coin", "multi=100000bar,flag=100000foo", ) - assert.DeepEqual(t, conn.lastRequest, conn.lastResponse.(*testpb.EchoResponse).Request, protocmp.Transform()) + assert.NilError(t, err) + assert.DeepEqual(t, fixture.conn.lastRequest, fixture.conn.lastResponse.(*testpb.EchoResponse).Request, protocmp.Transform()) - conn = testExecCommon(t, buildModuleQueryCommand, + _, err = runCmd(fixture, buildModuleQueryCommand, "echo", "1", "abc", @@ -155,9 +312,9 @@ func TestMap(t *testing.T) { "--map-string-coin", "baz,100000foo", "--map-string-coin", "sec=100000bar", ) - assert.Equal(t, "Error: invalid argument \"baz,100000foo\" for \"--map-string-coin\" flag: invalid format, expected key=value\n", conn.errorOut.String()) + assert.ErrorContains(t, err, "invalid argument \"baz,100000foo\" for \"--map-string-coin\" flag: invalid format, expected key=value") - conn = testExecCommon(t, buildModuleQueryCommand, + _, err = runCmd(fixture, buildModuleQueryCommand, "echo", "1", "abc", @@ -167,9 +324,9 @@ func TestMap(t *testing.T) { "--map-string-coin", "baz=100000foo", "--map-string-coin", "sec=100000bar", ) - assert.Equal(t, "Error: invalid argument \"bar=not-unint32\" for \"--map-string-uint32\" flag: strconv.ParseUint: parsing \"not-unint32\": invalid syntax\n", conn.errorOut.String()) + assert.ErrorContains(t, err, "invalid argument \"bar=not-unint32\" for \"--map-string-uint32\" flag: strconv.ParseUint: parsing \"not-unint32\": invalid syntax") - conn = testExecCommon(t, buildModuleQueryCommand, + _, err = runCmd(fixture, buildModuleQueryCommand, "echo", "1", "abc", @@ -179,25 +336,15 @@ func TestMap(t *testing.T) { "--map-string-coin", "baz=100000foo", "--map-string-coin", "sec=100000bar", ) - assert.Equal(t, "Error: invalid argument \"bar=123.9\" for \"--map-string-uint32\" flag: strconv.ParseUint: parsing \"123.9\": invalid syntax\n", conn.errorOut.String()) -} - -func TestMapError(t *testing.T) { - conn := testExecCommon(t, buildModuleQueryCommand, - "echo", - "1", - "abc", - "1234foo", - "4321bar", - "--map-string-uint32", "bar=123", - "--map-string-coin", "baz=100000foo", - "--map-string-coin", "sec=100000bar", - ) - assert.DeepEqual(t, conn.lastRequest, conn.lastResponse.(*testpb.EchoResponse).Request, protocmp.Transform()) + assert.ErrorContains(t, err, "invalid argument \"bar=123.9\" for \"--map-string-uint32\" flag: strconv.ParseUint: parsing \"123.9\": invalid syntax") } +// TestEveything tests all the different types of flags are correctly read and as well as correctly returned +// This tests the flag binding and the message building func TestEverything(t *testing.T) { - conn := testExecCommon(t, buildModuleQueryCommand, + fixture := initFixture(t) + + _, err := runCmd(fixture, buildModuleQueryCommand, "echo", "1", "abc", @@ -215,6 +362,8 @@ func TestEverything(t *testing.T) { "--timestamp", "2019-01-02T00:01:02Z", "--a-coin", "100000foo", "--an-address", "cosmos1y74p8wyy4enfhfn342njve6cjmj5c8dtl6emdk", + "--a-validator-address", "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", + "--a-consensus-address", "cosmosvalcons16vm0nx49eam4q0xasdnwdzsdl6ymgyjt757sgr", "--bz", "c2RncXdlZndkZ3NkZw==", "--page-count-total", "--page-key", "MTIzNTQ4N3NnaGRhcw==", @@ -238,35 +387,119 @@ func TestEverything(t *testing.T) { "--uints", "1,2,3", "--uints", "4", ) - assert.DeepEqual(t, conn.lastRequest, conn.lastResponse.(*testpb.EchoResponse).Request, protocmp.Transform()) + assert.NilError(t, err) + + expectedResp := &testpb.EchoResponse{ + Request: &testpb.EchoRequest{ + Positional1: 1, + Positional2: "abc", + Positional3Varargs: []*basev1beta1.Coin{ + {Amount: "123.123123124", Denom: "foo"}, + {Amount: "4321", Denom: "bar"}, + }, + ABool: true, + AnEnum: testpb.Enum_ENUM_ONE, + AMessage: &testpb.AMessage{ + Bar: "abc", + Baz: -3, + }, + Duration: durationpb.New(4*time.Hour + 3*time.Second), + U32: 27, + U64: 3267246890, + I32: -253, + I64: -234602347, + Str: "def", + Timestamp: ×tamppb.Timestamp{ + Seconds: 1546387262, + }, + ACoin: &basev1beta1.Coin{ + Amount: "100000", + Denom: "foo", + }, + AnAddress: "cosmos1y74p8wyy4enfhfn342njve6cjmj5c8dtl6emdk", + AValidatorAddress: "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", + AConsensusAddress: "cosmosvalcons16vm0nx49eam4q0xasdnwdzsdl6ymgyjt757sgr", + Bz: []byte("sdgqwefwdgsdg"), + Page: &queryv1beta1.PageRequest{ + CountTotal: true, + Key: []byte("1235487sghdas"), + Limit: 1000, + Offset: 10, + Reverse: true, + }, + Bools: []bool{true, false, false, true}, + Enums: []testpb.Enum{testpb.Enum_ENUM_ONE, testpb.Enum_ENUM_FIVE, testpb.Enum_ENUM_TWO}, + Strings: []string{ + "abc", + "xyz", + "xyz", + "qrs", + }, + Durations: []*durationpb.Duration{ + durationpb.New(3 * time.Second), + durationpb.New(5 * time.Second), + durationpb.New(10 * time.Hour), + }, + SomeMessages: []*testpb.AMessage{ + {}, + {Bar: "baz"}, + {Baz: -1}, + }, + Uints: []uint32{1, 2, 3, 4}, + }, + } + + assert.DeepEqual(t, fixture.conn.lastRequest, fixture.conn.lastResponse.(*testpb.EchoResponse).Request, protocmp.Transform()) + assert.DeepEqual(t, fixture.conn.lastResponse.(*testpb.EchoResponse), expectedResp, protocmp.Transform()) +} + +func TestPubKeyParsingConsensusAddress(t *testing.T) { + fixture := initFixture(t) + + _, err := runCmd(fixture, buildModuleQueryCommand, + "echo", + "1", "abc", "1foo", + "--a-consensus-address", "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"j8qdbR+AlH/V6aBTCSWXRvX3JUESF2bV+SEzndBhF0o=\"}", + "-u", "27", // shorthand + ) + assert.NilError(t, err) + assert.DeepEqual(t, fixture.conn.lastRequest, fixture.conn.lastResponse.(*testpb.EchoResponse).Request, protocmp.Transform()) } func TestJSONParsing(t *testing.T) { - conn := testExecCommon(t, buildModuleQueryCommand, + fixture := initFixture(t) + + _, err := runCmd(fixture, buildModuleQueryCommand, "echo", "1", "abc", "1foo", "--some-messages", `{"bar":"baz"}`, "-u", "27", // shorthand ) - assert.DeepEqual(t, conn.lastRequest, conn.lastResponse.(*testpb.EchoResponse).Request, protocmp.Transform()) + assert.NilError(t, err) + assert.DeepEqual(t, fixture.conn.lastRequest, fixture.conn.lastResponse.(*testpb.EchoResponse).Request, protocmp.Transform()) - conn = testExecCommon(t, buildModuleQueryCommand, + _, err = runCmd(fixture, buildModuleQueryCommand, "echo", "1", "abc", "1foo", "--some-messages", "testdata/some_message.json", "-u", "27", // shorthand ) - assert.DeepEqual(t, conn.lastRequest, conn.lastResponse.(*testpb.EchoResponse).Request, protocmp.Transform()) + assert.NilError(t, err) + assert.DeepEqual(t, fixture.conn.lastRequest, fixture.conn.lastResponse.(*testpb.EchoResponse).Request, protocmp.Transform()) } func TestOptions(t *testing.T) { - conn := testExecCommon(t, buildModuleQueryCommand, + fixture := initFixture(t) + + _, err := runCmd(fixture, buildModuleQueryCommand, "echo", "1", "abc", "123foo", "-u", "27", // shorthand "--u64", "5", // no opt default value ) - lastReq := conn.lastRequest.(*testpb.EchoRequest) + assert.NilError(t, err) + + lastReq := fixture.conn.lastRequest.(*testpb.EchoRequest) assert.Equal(t, uint32(27), lastReq.U32) // shorthand got set assert.Equal(t, int32(3), lastReq.I32) // default value got set assert.Equal(t, uint64(5), lastReq.U64) // no opt default value got set @@ -322,87 +555,104 @@ func TestBinaryFlag(t *testing.T) { } // Run test cases + fixture := initFixture(t) for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { - conn := testExecCommon(t, buildModuleQueryCommand, + _, err := runCmd(fixture, buildModuleQueryCommand, "echo", - "1", "abc", `{"denom":"foo","amount":"1"}`, + "1", "abc", `100foo`, "--bz", tc.input, ) - errorOut := conn.errorOut.String() - if errorOut == "" { - lastReq := conn.lastRequest.(*testpb.EchoRequest) - assert.DeepEqual(t, tc.expected, lastReq.Bz) + if tc.hasError { + assert.ErrorContains(t, err, tc.err) } else { - assert.Assert(t, strings.Contains(conn.errorOut.String(), tc.err)) + assert.NilError(t, err) + lastReq := fixture.conn.lastRequest.(*testpb.EchoRequest) + assert.DeepEqual(t, tc.expected, lastReq.Bz) } }) } } func TestAddressValidation(t *testing.T) { - conn := testExecCommon(t, buildModuleQueryCommand, + t.Skip() // TODO(@julienrbrt) re-able with better keyring instiantiation + + fixture := initFixture(t) + + _, err := runCmd(fixture, buildModuleQueryCommand, "echo", "1", "abc", "1foo", "--an-address", "cosmos1y74p8wyy4enfhfn342njve6cjmj5c8dtl6emdk", ) - assert.Equal(t, "", conn.errorOut.String()) + assert.NilError(t, err) - conn = testExecCommon(t, buildModuleQueryCommand, + _, err = runCmd(fixture, buildModuleQueryCommand, "echo", "1", "abc", "1foo", - "--an-address", "regen1y74p8wyy4enfhfn342njve6cjmj5c8dtl6emdk", + "--an-address", "regen1y74p8wyy4enfhfn342njve6cjmj5c8dtlqj7ule2", ) - assert.Assert(t, strings.Contains(conn.errorOut.String(), "Error: invalid argument")) + assert.ErrorContains(t, err, "invalid account address") - conn = testExecCommon(t, buildModuleQueryCommand, + _, err = runCmd(fixture, buildModuleQueryCommand, "echo", "1", "abc", "1foo", "--an-address", "cosmps1BAD_ENCODING", ) - assert.Assert(t, strings.Contains(conn.errorOut.String(), "Error: invalid argument")) + assert.ErrorContains(t, err, "invalid account address") } func TestOutputFormat(t *testing.T) { - conn := testExecCommon(t, buildModuleQueryCommand, + fixture := initFixture(t) + + out, err := runCmd(fixture, buildModuleQueryCommand, "echo", "1", "abc", "1foo", "--output", "json", ) - assert.Assert(t, strings.Contains(conn.out.String(), "{")) - conn = testExecCommon(t, buildModuleQueryCommand, + assert.NilError(t, err) + assert.Assert(t, strings.Contains(out.String(), "{")) + + out, err = runCmd(fixture, buildModuleQueryCommand, "echo", "1", "abc", "1foo", "--output", "text", ) - fmt.Println(conn.out.String()) - assert.Assert(t, strings.Contains(conn.out.String(), " positional1: 1")) + assert.NilError(t, err) + assert.Assert(t, strings.Contains(out.String(), " positional1: 1")) } -func TestHelp(t *testing.T) { - conn := testExecCommon(t, buildModuleQueryCommand, "-h") - golden.Assert(t, conn.out.String(), "help-toplevel.golden") +func TestHelpQuery(t *testing.T) { + fixture := initFixture(t) - conn = testExecCommon(t, buildModuleQueryCommand, "echo", "-h") - golden.Assert(t, conn.out.String(), "help-echo.golden") + out, err := runCmd(fixture, buildModuleQueryCommand, "-h") + assert.NilError(t, err) + golden.Assert(t, out.String(), "help-toplevel.golden") + + out, err = runCmd(fixture, buildModuleQueryCommand, "echo", "-h") + assert.NilError(t, err) + golden.Assert(t, out.String(), "help-echo.golden") - conn = testExecCommon(t, buildModuleQueryCommand, "deprecatedecho", "echo", "-h") - golden.Assert(t, conn.out.String(), "help-deprecated.golden") + out, err = runCmd(fixture, buildModuleQueryCommand, "deprecatedecho", "echo", "-h") + assert.NilError(t, err) + golden.Assert(t, out.String(), "help-deprecated.golden") - conn = testExecCommon(t, buildModuleQueryCommand, "skipecho", "-h") - golden.Assert(t, conn.out.String(), "help-skip.golden") + out, err = runCmd(fixture, buildModuleQueryCommand, "skipecho", "-h") + assert.NilError(t, err) + golden.Assert(t, out.String(), "help-skip.golden") } -func TestDeprecated(t *testing.T) { - conn := testExecCommon(t, buildModuleQueryCommand, "echo", - "1", "abc", `{}`, - "--deprecated-field", "foo") - assert.Assert(t, strings.Contains(conn.out.String(), "--deprecated-field has been deprecated")) +func TestDeprecatedQuery(t *testing.T) { + fixture := initFixture(t) - conn = testExecCommon(t, buildModuleQueryCommand, "echo", - "1", "abc", `{}`, - "-s", "foo") - assert.Assert(t, strings.Contains(conn.out.String(), "--shorthand-deprecated-field has been deprecated")) + out, err := runCmd(fixture, buildModuleQueryCommand, "echo", + "1", "abc", "--deprecated-field", "foo") + assert.NilError(t, err) + assert.Assert(t, strings.Contains(out.String(), "--deprecated-field has been deprecated")) + + out, err = runCmd(fixture, buildModuleQueryCommand, "echo", + "1", "abc", "-s", "foo") + assert.NilError(t, err) + assert.Assert(t, strings.Contains(out.String(), "--shorthand-deprecated-field has been deprecated")) } func TestBuildCustomQueryCommand(t *testing.T) { @@ -417,23 +667,25 @@ func TestBuildCustomQueryCommand(t *testing.T) { }, } - cmd, err := b.BuildQueryCommand(appOptions, map[string]*cobra.Command{ + cmd, err := b.BuildQueryCommand(context.Background(), appOptions, map[string]*cobra.Command{ "test": {Use: "test", Run: func(cmd *cobra.Command, args []string) { customCommandCalled = true }}, - }, enhanceQuery) + }) assert.NilError(t, err) cmd.SetArgs([]string{"test", "query"}) assert.NilError(t, cmd.Execute()) assert.Assert(t, customCommandCalled) } -func TestNotFoundErrors(t *testing.T) { - b := &Builder{} - - buildModuleQueryCommand := func(moduleName string, cmdDescriptor *autocliv1.ServiceCommandDescriptor) (*cobra.Command, error) { - cmd := topLevelCmd("query", "Querying subcommands") +func TestNotFoundErrorsQuery(t *testing.T) { + fixture := initFixture(t) + b := fixture.b + b.AddQueryConnFlags = nil + b.AddTxConnFlags = nil + buildModuleQueryCommand := func(_ string, cmdDescriptor *autocliv1.ServiceCommandDescriptor) (*cobra.Command, error) { + cmd := topLevelCmd(context.Background(), "query", "Querying subcommands") err := b.AddMsgServiceCommands(cmd, cmdDescriptor) return cmd, err } @@ -480,28 +732,10 @@ func TestNotFoundErrors(t *testing.T) { assert.ErrorContains(t, err, "can't find field baz") } -type testClientConn struct { - *grpc.ClientConn - t *testing.T - lastRequest interface{} - lastResponse interface{} - out *bytes.Buffer - errorOut *bytes.Buffer -} - -func (t *testClientConn) Invoke(ctx context.Context, method string, args, reply interface{}, opts ...grpc.CallOption) error { - err := t.ClientConn.Invoke(ctx, method, args, reply, opts...) - t.lastRequest = args - t.lastResponse = reply - return err -} - -type testEchoServer struct { - testpb.UnimplementedQueryServer -} +func TestDurationMarshal(t *testing.T) { + fixture := initFixture(t) -func (t testEchoServer) Echo(_ context.Context, request *testpb.EchoRequest) (*testpb.EchoResponse, error) { - return &testpb.EchoResponse{Request: request}, nil + out, err := runCmd(fixture, buildModuleQueryCommand, "echo", "1", "abc", "--duration", "1s") + assert.NilError(t, err) + assert.Assert(t, strings.Contains(out.String(), "duration: 1s")) } - -var _ testpb.QueryServer = testEchoServer{} diff --git a/client/v2/autocli/testdata/bank_example.yaml b/client/v2/autocli/testdata/bank_example.yaml deleted file mode 100644 index 6fb937482d28..000000000000 --- a/client/v2/autocli/testdata/bank_example.yaml +++ /dev/null @@ -1,28 +0,0 @@ -tx: - service: cosmos.bank.v1beta1.Msg - rpc_command_options: - - rpc_method: Send - use: send [from_key_or_address] [to_address] [amount...] - positional_args: - - proto_field: from_address - - proto_field: to_address - - proto_field: amount - varargs: true -query: - service: cosmos.bank.v1beta1.Query - rpc_command_options: - - rpc_method: Balance - use: balance [address] [denom] - positional_args: - - proto_field: address - - proto_field: denom - - rpc_method: SupplyOf - # this is a contrived example of how to customize flag options - # we would likely prefer positional args here, but this demonstrates usage - use: supply-of --denom [denom] - flag_options: - # flag_options is a map of proto field names to customization options - denom: - shorthand: d - usage: the denom to query - diff --git a/client/v2/autocli/testdata/help-deprecated-msg.golden b/client/v2/autocli/testdata/help-deprecated-msg.golden deleted file mode 100644 index 810a532a6036..000000000000 --- a/client/v2/autocli/testdata/help-deprecated-msg.golden +++ /dev/null @@ -1,63 +0,0 @@ -Command "send" is deprecated, dont use this -deprecated subcommand - -Usage: - test deprecatedmsg send [flags] - -Flags: - --a-bool - --a-coin cosmos.base.v1beta1.Coin - --a-message testpb.AMessage (json) - -a, --account-number uint The account number of the signing account (offline mode only) - --an-address bech32 account address key name - --an-enum Enum (unspecified | one | two | five | neg-three) (default unspecified) - --aux Generate aux signer data instead of sending a tx - --bools bools (default []) - -b, --broadcast-mode string Transaction broadcasting mode (sync|async) (default "sync") - --bz binary - --chain-id string The network chain ID - --deprecated-field string - --dry-run ignore the --gas flag and perform a simulation of a transaction, but don't broadcast it (when enabled, the local Keybase is not accessible) - --duration duration - --durations duration (repeated) - --enums Enum (unspecified | one | two | five | neg-three) (repeated) - --fee-granter string Fee granter grants fees for the transaction - --fee-payer string Fee payer pays fees for the transaction instead of deducting from the signer - --fees string Fees to pay along with transaction; eg: 10uatom - --from string Name or address of private key with which to sign - --gas string gas limit to set per-transaction; set to "auto" to calculate sufficient gas automatically. Note: "auto" option doesn't always report accurate results. Set a valid coin value to adjust the result. Can be used instead of "fees". (default 200000) - --gas-adjustment float adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored (default 1) - --gas-prices string Gas prices in decimal format to determine the transaction fee (e.g. 0.1uatom) - --generate-only Build an unsigned transaction and write it to STDOUT (when enabled, the local Keybase only accessed when providing a key name) - -h, --help help for send - --hidden-bool - --i32 int32 - --i64 int - --keyring-backend string Select keyring's backend (os|file|kwallet|pass|test|memory) (default "os") - --keyring-dir string The client Keyring directory; if omitted, the default 'home' directory will be used - --ledger Use a connected Ledger device - --node string : to CometBFT rpc interface for this chain (default "tcp://localhost:26657") - --note string Note to add a description to the transaction (previously --memo) - --offline Offline mode (does not allow any online functionality) - -o, --output string Output format (text|json) (default "json") - --page-count-total - --page-key binary - --page-limit uint - --page-offset uint - --page-reverse - --positional1 int32 - --positional2 string - --positional3-varargs cosmos.base.v1beta1.Coin (repeated) - -s, --sequence uint The sequence number of the signing account (offline mode only) - --shorthand-deprecated-field string - --sign-mode string Choose sign mode (direct|amino-json|direct-aux), this is an advanced feature - --some-messages testpb.AMessage (json) (repeated) - --str string - --strings strings - --timeout-height uint Set a block timeout height to prevent the tx from being committed past a certain height - --timestamp timestamp (RFC 3339) - --tip string Tip is the amount that is going to be transferred to the fee payer on the target chain. This flag is only valid when used with --aux, and is ignored if the target chain didn't enable the TipDecorator - --u32 uint32 - --u64 uint - --uints uints (default []) - -y, --yes Skip tx broadcasting prompt confirmation diff --git a/client/v2/autocli/testdata/help-deprecated.golden b/client/v2/autocli/testdata/help-deprecated.golden index c958a689f8dc..94586620952a 100644 --- a/client/v2/autocli/testdata/help-deprecated.golden +++ b/client/v2/autocli/testdata/help-deprecated.golden @@ -1,15 +1,20 @@ Command "echo" is deprecated, don't use this +Execute the Echo RPC method + Usage: test deprecatedecho echo [flags] Flags: --a-bool --a-coin cosmos.base.v1beta1.Coin + --a-consensus-address account address or key name --a-message testpb.AMessage (json) - --an-address bech32 account address key name + --a-validator-address account address or key name + --an-address account address or key name --an-enum Enum (unspecified | one | two | five | neg-three) (default unspecified) --bools bools (default []) --bz binary + --coins cosmos.base.v1beta1.Coin (repeated) --deprecated-field string --duration duration --durations duration (repeated) @@ -24,6 +29,7 @@ Flags: --map-string-coin map[string]cosmos.base.v1beta1.Coin --map-string-string stringToString (default []) --map-string-uint32 stringToUint32 + --no-indent Do not indent JSON output --node string : to CometBFT RPC interface for this chain (default "tcp://localhost:26657") -o, --output string Output format (text|json) (default "text") --page-count-total diff --git a/client/v2/autocli/testdata/help-echo-msg.golden b/client/v2/autocli/testdata/help-echo-msg.golden index b029bd2efe20..7bfc86445b56 100644 --- a/client/v2/autocli/testdata/help-echo-msg.golden +++ b/client/v2/autocli/testdata/help-echo-msg.golden @@ -1,65 +1,32 @@ -send msg the value provided by the user as a proto JSON object with populated with the provided fields and positional arguments +Send coins from one account to another Usage: - test send [pos1] [pos2] [pos3...] [flags] - -Aliases: - send, s - -Examples: -send 1 abc {} + test send [from_key_or_address] [to_address] [amount] [flags] Flags: - --a-bool - --a-coin cosmos.base.v1beta1.Coin - --a-message testpb.AMessage (json) - -a, --account-number uint The account number of the signing account (offline mode only) - --an-address bech32 account address key name - --an-enum Enum (unspecified | one | two | five | neg-three) (default unspecified) - --aux Generate aux signer data instead of sending a tx - --bools bools (default []) - -b, --broadcast-mode string Transaction broadcasting mode (sync|async) (default "sync") - --bz binary - --chain-id string The network chain ID - --deprecated-field string (DEPRECATED: don't use this) - --dry-run ignore the --gas flag and perform a simulation of a transaction, but don't broadcast it (when enabled, the local Keybase is not accessible) - --duration duration - --durations duration (repeated) - --enums Enum (unspecified | one | two | five | neg-three) (repeated) - --fee-granter string Fee granter grants fees for the transaction - --fee-payer string Fee payer pays fees for the transaction instead of deducting from the signer - --fees string Fees to pay along with transaction; eg: 10uatom - --from string Name or address of private key with which to sign - --gas string gas limit to set per-transaction; set to "auto" to calculate sufficient gas automatically. Note: "auto" option doesn't always report accurate results. Set a valid coin value to adjust the result. Can be used instead of "fees". (default 200000) - --gas-adjustment float adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored (default 1) - --gas-prices string Gas prices in decimal format to determine the transaction fee (e.g. 0.1uatom) - --generate-only Build an unsigned transaction and write it to STDOUT (when enabled, the local Keybase only accessed when providing a key name) - -h, --help help for send - --i32 int32 some random int32 - --i64 int - --keyring-backend string Select keyring's backend (os|file|kwallet|pass|test|memory) (default "os") - --keyring-dir string The client Keyring directory; if omitted, the default 'home' directory will be used - --ledger Use a connected Ledger device - --node string : to CometBFT rpc interface for this chain (default "tcp://localhost:26657") - --note string Note to add a description to the transaction (previously --memo) - --offline Offline mode (does not allow any online functionality) - -o, --output string Output format (text|json) (default "json") - --page-count-total - --page-key binary - --page-limit uint - --page-offset uint - --page-reverse - -s, --sequence uint The sequence number of the signing account (offline mode only) - -d, --shorthand-deprecated-field string (DEPRECATED: bad idea) - --sign-mode string Choose sign mode (direct|amino-json|direct-aux), this is an advanced feature - --some-messages testpb.AMessage (json) (repeated) - --str string - --strings strings - --timeout-height uint Set a block timeout height to prevent the tx from being committed past a certain height - --timestamp timestamp (RFC 3339) - --tip string Tip is the amount that is going to be transferred to the fee payer on the target chain. This flag is only valid when used with --aux, and is ignored if the target chain didn't enable the TipDecorator - --u64 uint some random uint64 - -u, --uint32 uint32 some random uint32 - --uints uints (default []) - -v, --version version for send - -y, --yes Skip tx broadcasting prompt confirmation + -a, --account-number uint The account number of the signing account (offline mode only) + --aux Generate aux signer data instead of sending a tx + -b, --broadcast-mode string Transaction broadcasting mode (sync|async) (default "sync") + --chain-id string The network chain ID + --dry-run ignore the --gas flag and perform a simulation of a transaction, but don't broadcast it (when enabled, the local Keybase is not accessible) + --fee-granter string Fee granter grants fees for the transaction + --fee-payer string Fee payer pays fees for the transaction instead of deducting from the signer + --fees string Fees to pay along with transaction; eg: 10uatom + --from string Name or address of private key with which to sign + --gas string gas limit to set per-transaction; set to "auto" to calculate sufficient gas automatically. Note: "auto" option doesn't always report accurate results. Set a valid coin value to adjust the result. Can be used instead of "fees". (default 200000) + --gas-adjustment float adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored (default 1) + --gas-prices string Gas prices in decimal format to determine the transaction fee (e.g. 0.1uatom) + --generate-only Build an unsigned transaction and write it to STDOUT (when enabled, the local Keybase only accessed when providing a key name) + -h, --help help for send + --keyring-backend string Select keyring's backend (os|file|kwallet|pass|test|memory) (default "os") + --keyring-dir string The client Keyring directory; if omitted, the default 'home' directory will be used + --ledger Use a connected Ledger device + --node string : to CometBFT rpc interface for this chain (default "tcp://localhost:26657") + --note string Note to add a description to the transaction (previously --memo) + --offline Offline mode (does not allow any online functionality) + -o, --output string Output format (text|json) (default "json") + -s, --sequence uint The sequence number of the signing account (offline mode only) + --sign-mode string Choose sign mode (direct|amino-json|direct-aux|textual), this is an advanced feature + --timeout-height uint Set a block timeout height to prevent the tx from being committed past a certain height + --tip string Tip is the amount that is going to be transferred to the fee payer on the target chain. This flag is only valid when used with --aux, and is ignored if the target chain didn't enable the TipDecorator + -y, --yes Skip tx broadcasting prompt confirmation diff --git a/client/v2/autocli/testdata/help-echo.golden b/client/v2/autocli/testdata/help-echo.golden index 0be9c1de589c..2b3fe024a89c 100644 --- a/client/v2/autocli/testdata/help-echo.golden +++ b/client/v2/autocli/testdata/help-echo.golden @@ -12,11 +12,14 @@ echo 1 abc {} Flags: --a-bool --a-coin cosmos.base.v1beta1.Coin some random coin + --a-consensus-address account address or key name --a-message testpb.AMessage (json) - --an-address bech32 account address key name + --a-validator-address account address or key name + --an-address account address or key name --an-enum Enum (unspecified | one | two | five | neg-three) (default unspecified) --bools bools (default []) --bz binary some bytes + --coins cosmos.base.v1beta1.Coin (repeated) --deprecated-field string (DEPRECATED: don't use this) --duration duration some random duration --durations duration (repeated) @@ -30,6 +33,7 @@ Flags: --map-string-coin map[string]cosmos.base.v1beta1.Coin some map of string to coin --map-string-string stringToString some map of string to string (default []) --map-string-uint32 stringToUint32 some map of string to int32 + --no-indent Do not indent JSON output --node string : to CometBFT RPC interface for this chain (default "tcp://localhost:26657") -o, --output string Output format (text|json) (default "text") --page-count-total diff --git a/client/v2/autocli/testdata/help-toplevel-msg.golden b/client/v2/autocli/testdata/help-toplevel-msg.golden index 0eac1e006f1f..f4afbd999bb4 100644 --- a/client/v2/autocli/testdata/help-toplevel-msg.golden +++ b/client/v2/autocli/testdata/help-toplevel-msg.golden @@ -5,11 +5,13 @@ Usage: test [command] Available Commands: - completion Generate the autocompletion script for the specified shell - deprecatedmsg Tx commands for the testpb.Msg service - help Help about any command - send send msg the value provided by the user - skipmsg Tx commands for the testpb.Msg service + burn Execute the Burn RPC method + completion Generate the autocompletion script for the specified shell + help Help about any command + multi-send Execute the MultiSend RPC method + send Send coins from one account to another + set-send-enabled Execute the SetSendEnabled RPC method + update-params Execute the UpdateParams RPC method Flags: -h, --help help for test diff --git a/client/v2/autocli/testdata/help.golden b/client/v2/autocli/testdata/help.golden index 197f4f9aee91..c8fe6bbffb2a 100644 --- a/client/v2/autocli/testdata/help.golden +++ b/client/v2/autocli/testdata/help.golden @@ -10,30 +10,30 @@ Examples: echo 1 abc {} Flags: - --a-bool - --a-coin cosmos.base.v1beta1.Coin (json) - --a-message testpb.AMessage (json) - --an-address bech32 account address key name + --a-bool + --a-coin cosmos.base.v1beta1.Coin (json) + --a-message testpb.AMessage (json) + --an-address bech32 account address key name --an-enum Enum (unspecified | one | two | five | neg-three) (default unspecified) --bools bools (default []) - --bz bytesBase64 + --bz bytesBase64 --deprecated-field string (DEPRECATED: don't use this) - --duration duration - --durations duration (repeated) - --enums Enum (unspecified | one | two | five | neg-three) (repeated) + --duration duration + --durations duration (repeated) + --enums Enum (unspecified | one | two | five | neg-three) (repeated) -h, --help help for echo --i32 int32 some random int32 - --i64 int - --page-count-total - --page-key bytesBase64 - --page-limit uint - --page-offset uint - --page-reverse + --i64 int + --page-count-total + --page-key bytesBase64 + --page-limit uint + --page-offset uint + --page-reverse -s, --shorthand-deprecated-field string (DEPRECATED: bad idea) - --some-messages testpb.AMessage (json) (repeated) - --str string - --strings strings - --timestamp timestamp (RFC 3339) + --some-messages testpb.AMessage (json) (repeated) + --str string + --strings strings + --timestamp timestamp (RFC 3339) --u64 uint[=5] some random uint64 -u, --uint32 uint32 some random uint32 --uints uints (default []) diff --git a/client/v2/autocli/testdata/msg-output.golden b/client/v2/autocli/testdata/msg-output.golden new file mode 100644 index 000000000000..73bddd4ad8ae --- /dev/null +++ b/client/v2/autocli/testdata/msg-output.golden @@ -0,0 +1 @@ +{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"cosmos1y74p8wyy4enfhfn342njve6cjmj5c8dtl6emdk","to_address":"cosmos1y74p8wyy4enfhfn342njve6cjmj5c8dtl6emdk","amount":[{"denom":"foo","amount":"1"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""},"tip":null},"signatures":[]} diff --git a/client/v2/autocli/util.go b/client/v2/autocli/util.go index 8ca8c39a0fa3..96276543e7db 100644 --- a/client/v2/autocli/util.go +++ b/client/v2/autocli/util.go @@ -1,22 +1,30 @@ package autocli import ( + "context" "strings" + "github.com/spf13/cobra" "google.golang.org/protobuf/reflect/protoreflect" "cosmossdk.io/client/v2/internal/strcase" - "github.com/spf13/cobra" ) // findSubCommand finds a sub-command of the provided command whose Use // string is or begins with the provided subCmdName. +// It verifies the command's aliases as well. func findSubCommand(cmd *cobra.Command, subCmdName string) *cobra.Command { for _, subCmd := range cmd.Commands() { use := subCmd.Use if use == subCmdName || strings.HasPrefix(use, subCmdName+" ") { return subCmd } + + for _, alias := range subCmd.Aliases { + if alias == subCmdName || strings.HasPrefix(alias, subCmdName+" ") { + return subCmd + } + } } return nil } @@ -24,14 +32,17 @@ func findSubCommand(cmd *cobra.Command, subCmdName string) *cobra.Command { // topLevelCmd creates a new top-level command with the provided name and // description. The command will have DisableFlagParsing set to false and // SuggestionsMinimumDistance set to 2. -func topLevelCmd(use, short string) *cobra.Command { - return &cobra.Command{ +func topLevelCmd(ctx context.Context, use, short string) *cobra.Command { + cmd := &cobra.Command{ Use: use, Short: short, DisableFlagParsing: false, SuggestionsMinimumDistance: 2, RunE: validateCmd, } + cmd.SetContext(ctx) + + return cmd } func protoNameToCliName(name protoreflect.Name) string { diff --git a/client/v2/go.mod b/client/v2/go.mod index 536e0c287081..13e4e54c3605 100644 --- a/client/v2/go.mod +++ b/client/v2/go.mod @@ -1,130 +1,157 @@ module cosmossdk.io/client/v2 -go 1.20 +go 1.21 require ( - cosmossdk.io/api v0.4.2 - cosmossdk.io/core v0.8.0 - cosmossdk.io/depinject v1.0.0-alpha.3 - github.com/cockroachdb/errors v1.9.1 - github.com/cosmos/cosmos-proto v1.0.0-beta.3 - github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20230606190835-3e18f4088b2c - github.com/spf13/cobra v1.7.0 + cosmossdk.io/api v0.7.5 + cosmossdk.io/core v0.11.0 + cosmossdk.io/depinject v1.0.0-alpha.4 + cosmossdk.io/math v1.3.0 + cosmossdk.io/x/tx v0.13.5 + github.com/cockroachdb/errors v1.11.3 + github.com/cosmos/cosmos-proto v1.0.0-beta.5 + github.com/cosmos/cosmos-sdk v0.50.6 + github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 - golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 - google.golang.org/grpc v1.55.0 - google.golang.org/protobuf v1.30.0 - gotest.tools/v3 v3.4.0 - sigs.k8s.io/yaml v1.3.0 + google.golang.org/grpc v1.63.2 + google.golang.org/protobuf v1.34.2 + gotest.tools/v3 v3.5.1 + sigs.k8s.io/yaml v1.4.0 ) require ( - cosmossdk.io/collections v0.1.0 // indirect - cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741 // indirect - cosmossdk.io/log v1.1.0 // indirect - cosmossdk.io/math v1.0.1 // indirect - cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c // indirect - cosmossdk.io/x/tx v0.8.0 // indirect + cosmossdk.io/collections v0.4.0 // indirect + cosmossdk.io/errors v1.0.1 // indirect + cosmossdk.io/log v1.4.1 // indirect + cosmossdk.io/store v1.1.0 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect + github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect - github.com/armon/go-metrics v0.4.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect + github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230606202032-d96868fd481e // indirect - github.com/cockroachdb/redact v1.1.4 // indirect - github.com/cometbft/cometbft v0.38.0-rc1 // indirect - github.com/cometbft/cometbft-db v0.7.0 // indirect + github.com/cockroachdb/pebble v1.1.1 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/cometbft/cometbft v0.38.12 // indirect + github.com/cometbft/cometbft-db v0.11.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-db v1.0.0 // indirect + github.com/cosmos/cosmos-db v1.0.2 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect - github.com/cosmos/gogoproto v1.4.10 // indirect - github.com/cosmos/iavl v1.0.0-beta.2 // indirect - github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.13.0 // indirect + github.com/cosmos/gogogateway v1.2.0 // indirect + github.com/cosmos/gogoproto v1.7.0 // indirect + github.com/cosmos/iavl v1.1.2 // indirect + github.com/cosmos/ics23/go v0.11.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/danieljoos/wincred v1.1.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect + github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect - github.com/emicklei/dot v1.4.2 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/getsentry/sentry-go v0.21.0 // indirect + github.com/dvsekhvalnov/jose2go v1.6.0 // indirect + github.com/emicklei/dot v1.6.1 // indirect + github.com/fatih/color v1.15.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect + github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.1.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/glog v1.2.0 // indirect + github.com/golang/mock v1.6.0 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect - github.com/gorilla/websocket v1.5.0 // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/google/orderedcode v0.0.1 // indirect + github.com/gorilla/handlers v1.5.1 // indirect + github.com/gorilla/mux v1.8.0 // indirect + github.com/gorilla/websocket v1.5.3 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect + github.com/hashicorp/go-metrics v0.5.3 // indirect + github.com/hashicorp/go-plugin v1.5.2 // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect - github.com/iancoleman/strcase v0.2.0 // indirect + github.com/huandu/skiplist v1.2.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect + github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.16.5 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.0 // indirect + github.com/lib/pq v1.10.7 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/minio/highwayhash v1.0.2 // indirect + github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect - github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect + github.com/oklog/run v1.1.0 // indirect + github.com/pelletier/go-toml/v2 v2.2.2 // indirect + github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.15.1 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.20.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect - github.com/rs/zerolog v1.29.1 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rs/cors v1.11.1 // indirect + github.com/rs/zerolog v1.33.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/cast v1.5.1 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/spf13/viper v1.16.0 // indirect - github.com/stretchr/testify v1.8.4 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect + github.com/spf13/viper v1.19.0 // indirect + github.com/stretchr/testify v1.9.0 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tidwall/btree v1.6.0 // indirect - github.com/zondax/hid v0.9.1 // indirect - github.com/zondax/ledger-go v0.14.1 // indirect - go.etcd.io/bbolt v1.3.6 // indirect - golang.org/x/crypto v0.9.0 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect - google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect + github.com/tidwall/btree v1.7.0 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect + go.etcd.io/bbolt v1.3.10 // indirect + go.uber.org/multierr v1.10.0 // indirect + golang.org/x/crypto v0.26.0 // indirect + golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - pgregory.net/rapid v0.6.2 // indirect + nhooyr.io/websocket v1.8.6 // indirect + pgregory.net/rapid v1.1.0 // indirect ) diff --git a/client/v2/go.sum b/client/v2/go.sum index abecbe5339c2..dd81d4298b26 100644 --- a/client/v2/go.sum +++ b/client/v2/go.sum @@ -1,58 +1,23 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.4.2 h1:lQBMl4xINnMnBOR/tQLtjlDnR4exr4e6/SfHR8PILE0= -cosmossdk.io/api v0.4.2/go.mod h1:qrVgOp7DIeAXa+Tt5dDjOC47bZCDrwx8ZHxrmy7STNE= -cosmossdk.io/collections v0.1.0 h1:nzJGeiq32KnZroSrhB6rPifw4I85Cgmzw/YAmr4luv8= -cosmossdk.io/collections v0.1.0/go.mod h1:xbauc0YsbUF8qKMVeBZl0pFCunxBIhKN/WlxpZ3lBuo= -cosmossdk.io/core v0.8.0 h1:LcJnu52E1a8f8E317VfQ1xK/RZe+IuhMNQAjnDLh25M= -cosmossdk.io/core v0.8.0/go.mod h1:LF6VLOv2DdCiaHxYVmr0MZcZpaSM9ZgvyrQSYTeg6D0= -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.0.20230524212735-6cabb6aa5741 h1:BCRz06fvddw7cKGiEGDiSox3qMsjQ97f92K+PDZDHdc= -cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741/go.mod h1:TB05o6YXkZkzsc+6bZFAV5kZRBtoCU9tUkbeMIqEg0w= -cosmossdk.io/log v1.1.0 h1:v0ogPHYeTzPcBTcPR1A3j1hkei4pZama8kz8LKlCMv0= -cosmossdk.io/log v1.1.0/go.mod h1:6zjroETlcDs+mm62gd8Ig7mZ+N+fVOZS91V17H+M4N4= -cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c h1:A+FMPW9GtfcPBDQNtFeDFN27h1SAP6OVjnGgPLlYXmI= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c/go.mod h1:RbYGvXCbz8uNBCXrwS9Z8SyydeWi+W5x5MZ33muyzMw= -cosmossdk.io/x/tx v0.8.0 h1:gLiGRL/Fy7fs6dd0IX8jOf0PrVr56/SG6XVMGQjyvJU= -cosmossdk.io/x/tx v0.8.0/go.mod h1:T9uEumGNgKU61gJYRv1t3uzQwLnASpJGmSE229HM3xA= +cosmossdk.io/api v0.7.5 h1:eMPTReoNmGUm8DeiQL9DyM8sYDjEhWzL1+nLbI9DqtQ= +cosmossdk.io/api v0.7.5/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= +cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= +cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= +cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= +cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= +cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= +cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= +cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= +cosmossdk.io/store v1.1.0 h1:LnKwgYMc9BInn9PhpTFEQVbL9UK475G2H911CGGnWHk= +cosmossdk.io/store v1.1.0/go.mod h1:oZfW/4Fc/zYqu3JmQcQdUJ3fqu5vnYTn3LZFFy8P8ng= +cosmossdk.io/x/tx v0.13.5 h1:FdnU+MdmFWn1pTsbfU0OCf2u6mJ8cqc1H4OMG418MLw= +cosmossdk.io/x/tx v0.13.5/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= @@ -60,213 +25,280 @@ github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMb github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= +github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= -github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= -github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= +github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= +github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ= +github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c= +github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= +github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= +github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/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.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= +github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= +github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230606202032-d96868fd481e h1:6QuLTQCQZueVNzoYYUuFfaRgBOpj6gIwQA1PZT2rfWM= -github.com/cockroachdb/pebble v0.0.0-20230606202032-d96868fd481e/go.mod h1:TkdVsGYRqtULUppt2RbC+YaKtTHnHoWa2apfFrSKABw= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/redact v1.1.4 h1:Y0XrVI2FAyofNyGveodTN//qdpPtFKcKTeCBsK3AHAQ= -github.com/cockroachdb/redact v1.1.4/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/cometbft/cometbft v0.38.0-rc1 h1:ph6smlqX82aH+d72KuxDHqu29M7LyusSp/obfGsGX/w= -github.com/cometbft/cometbft v0.38.0-rc1/go.mod h1:5Jz0Z8YsHSf0ZaAqGvi/ifioSdVFPtEGrm8Y9T/993k= -github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= -github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= +github.com/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= +github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/cometbft/cometbft v0.38.12 h1:OWsLZN2KcSSFe8bet9xCn07VwhBnavPea3VyPnNq1bg= +github.com/cometbft/cometbft v0.38.12/go.mod h1:GPHp3/pehPqgX1930HmK1BpBLZPxB75v/dZg8Viwy+o= +github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= +github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= +github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= -github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= -github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= -github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20230606190835-3e18f4088b2c h1:KTJHQdxejm4kRSS42LHzChCqMq/T8pOb5yxX9KBCMTU= -github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20230606190835-3e18f4088b2c/go.mod h1:rDJWzXPqx4zgC0OGcdMdQQlfgu7iR68UFuMfoUEWJhU= +github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= +github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/cosmos-sdk v0.50.6 h1:efR3MsvMHX5sxS3be+hOobGk87IzlZbSpsI2x/Vw3hk= +github.com/cosmos/cosmos-sdk v0.50.6/go.mod h1:lVkRY6cdMJ0fG3gp8y4hFrsKZqF4z7y0M2UXFb9Yt40= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cosmos/iavl v1.0.0-beta.2 h1:XOsIM80Yyml/KifCXEYOy9tWCXwMAbLa91n6pReW07Y= -github.com/cosmos/iavl v1.0.0-beta.2/go.mod h1:EA97dJ07TBktRlG/iGzK6g1eCXNj1q3MGoFYkVzrwHE= -github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= -github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= -github.com/cosmos/ledger-cosmos-go v0.13.0 h1:ex0CvCxToSR7j5WjrghPu2Bu9sSXKikjnVvUryNnx4s= -github.com/cosmos/ledger-cosmos-go v0.13.0/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= +github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= +github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= +github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= +github.com/cosmos/iavl v1.1.2 h1:zL9FK7C4L/P4IF1Dm5fIwz0WXCnn7Bp1M2FxH0ayM7Y= +github.com/cosmos/iavl v1.1.2/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= +github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= +github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew 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/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= +github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= 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.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= -github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/emicklei/dot v1.4.2 h1:UbK6gX4yvrpHKlxuUQicwoAis4zl8Dzwit9SnbBAXWw= -github.com/emicklei/dot v1.4.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= +github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= +github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -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/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= 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/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.21.0 h1:c9l5F1nPF30JIppulk4veau90PK6Smu3abgVtVQWon4= -github.com/getsentry/sentry-go v0.21.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= -github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= +github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= +github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= +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= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +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/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= 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= @@ -278,12 +310,12 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 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/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -292,193 +324,261 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a 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.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= +github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-plugin v1.4.10 h1:xUbmA4jC6Dq163/fWcp8P3JuHilrHHMLNRxzGQJ9hNk= +github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= +github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= +github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= +github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= +github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +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.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= -github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= -github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= -github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= -github.com/linxGnu/grocksdb v1.8.0 h1:H4L/LhP7GOMf1j17oQAElHgVlbEje2h14A8Tz9cM2BE= -github.com/linxGnu/grocksdb v1.8.0/go.mod h1:09CeBborffXhXdNpEcOeZrLKEnRtrZFEpFdPNI9Zjjg= +github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= +github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= +github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= +github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= 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/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce h1:/pEpMk55wH0X+E5zedGEMOdLuWmV8P4+4W3+LZaM6kg= -github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= +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.10.3/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.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= +github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 h1:W04oB3d0J01W5jgYRGKsV8LCM6g9EkCvPkZcmFuy0OE= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -486,81 +586,113 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.20.1 h1:IMJXHOD6eARkQpxo8KkhgEVFlBNm+nkrFUyGlIu7Na8= +github.com/prometheus/client_golang v1.20.1/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= 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/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +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.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= 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= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= +github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/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/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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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= @@ -570,412 +702,271 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= -github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= -github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= -github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= -go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.10 h1:+BqfJTcCzTItrop8mq/lbzL8wSGtj94UO/3U31shqG0= +go.etcd.io/bbolt v1.3.10/go.mod h1:bK3UQLPJZly7IlNmV7uVHJDxfe5aK9Ll93e/74Y9oEQ= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= 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= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 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/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/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-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-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-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 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.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/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-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -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= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= 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= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 h1:x1vNwUhVOcsYoKyEGCZBH694SBmmBjA2EfauFVEI2+M= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a h1:HiYVD+FGJkTo+9zj1gqz0anapsa1JxjiSrN+BJKyUmE= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 h1:rIo7ocm2roD9DcFIX67Ym8icoGCKSARAiPljFhh5suQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2/go.mod h1:O1cOfN1Cy6QEYr7VxtjOyP5AdAuR0aJ/MYZaaof623Y= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= @@ -988,51 +979,52 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= -pgregory.net/rapid v0.6.2 h1:ErW5sL+UKtfBfUTsWHDCoeB+eZKLKMxrSd1VJY6W4bw= -pgregory.net/rapid v0.6.2/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/client/v2/helpers/home.go b/client/v2/helpers/home.go new file mode 100644 index 000000000000..af3fc2886673 --- /dev/null +++ b/client/v2/helpers/home.go @@ -0,0 +1,48 @@ +package helpers + +import ( + "os" + "path/filepath" + "strings" +) + +// EnvPrefix is the prefix for environment variables that are used by the CLI. +// It should match the one used for viper in the CLI. +var EnvPrefix = "" + +// GetNodeHomeDirectory gets the home directory of the node (where the config is located). +// It parses the home flag if set if the `(PREFIX)_HOME` environment variable if set (and ignores name). +// When no prefix is set, it reads the `NODE_HOME` environment variable. +// Otherwise, it returns the default home directory given its name. +func GetNodeHomeDirectory(name string) (string, error) { + // get the home directory from the flag + args := os.Args + for i := 0; i < len(args); i++ { + if args[i] == "--home" && i+1 < len(args) { + return filepath.Clean(args[i+1]), nil + } else if strings.HasPrefix(args[i], "--home=") { + return filepath.Clean(args[i][7:]), nil + } + } + + // get the home directory from the environment variable + // to not clash with the $HOME system variable, when no prefix is set + // we check the NODE_HOME environment variable + homeDir, envHome := "", "HOME" + if len(EnvPrefix) > 0 { + homeDir = os.Getenv(EnvPrefix + "_" + envHome) + } else { + homeDir = os.Getenv("NODE_" + envHome) + } + if homeDir != "" { + return filepath.Clean(homeDir), nil + } + + // get user home directory + userHomeDir, err := os.UserHomeDir() + if err != nil { + return "", err + } + + return filepath.Join(userHomeDir, name), nil +} diff --git a/client/v2/internal/buf.lock b/client/v2/internal/buf.lock index 696956596bf8..ca09fbb4fad6 100644 --- a/client/v2/internal/buf.lock +++ b/client/v2/internal/buf.lock @@ -4,16 +4,30 @@ deps: - remote: buf.build owner: cosmos repository: cosmos-proto - commit: 1935555c206d4afb9e94615dfd0fad31 + commit: 04467658e59e44bbb22fe568206e1f70 + digest: shake256:73a640bd60e0c523b0f8237ff34eab67c45a38b64bbbde1d80224819d272dbf316ac183526bd245f994af6608b025f5130483d0133c5edd385531326b5990466 - remote: buf.build owner: cosmos repository: cosmos-sdk - commit: b7797ff7f3814399b0c5d52e1b8227ed + commit: 05419252bcc241ea8023acf1ed4cadc5 + digest: shake256:1e54a48c19a8b59d35e0a7efa76402939f515f2d8005df099856f24c37c20a52800308f025abb8cffcd014d437b49707388aaca4865d9d063d8f25d5d4eb77d5 - remote: buf.build owner: cosmos repository: gogo-proto - commit: 6652e3443c3b4504bb3bf82e73a7e409 + commit: 88ef6483f90f478fb938c37dde52ece3 + digest: shake256:89c45df2aa11e0cff97b0d695436713db3d993d76792e9f8dc1ae90e6ab9a9bec55503d48ceedd6b86069ab07d3041b32001b2bfe0227fa725dd515ff381e5ba - remote: buf.build owner: googleapis repository: googleapis - commit: 62f35d8aed1149c291d606d958a7ce32 + commit: 7e6f6e774e29406da95bd61cdcdbc8bc + digest: shake256:fe43dd2265ea0c07d76bd925eeba612667cf4c948d2ce53d6e367e1b4b3cb5fa69a51e6acb1a6a50d32f894f054a35e6c0406f6808a483f2752e10c866ffbf73 + - remote: buf.build + owner: protocolbuffers + repository: wellknowntypes + commit: 657250e6a39648cbb169d079a60bd9ba + digest: shake256:00de25001b8dd2e29d85fc4bcc3ede7aed886d76d67f5e0f7a9b320b90f871d3eb73507d50818d823a0512f3f8db77a11c043685528403e31ff3fef18323a9fb + - remote: buf.build + owner: tendermint + repository: tendermint + commit: 33ed361a90514289beabf3189e1d7665 + digest: shake256:038267e06294714fd883610626554b04a127b576b4e253befb4206cb72d5d3c1eeccacd4b9ec8e3fb891f7c14e1cb0f770c077d2989638995b0a61c85afedb1d diff --git a/client/v2/internal/flags/flags.go b/client/v2/internal/flags/flags.go new file mode 100644 index 000000000000..cd50a96be87b --- /dev/null +++ b/client/v2/internal/flags/flags.go @@ -0,0 +1,19 @@ +package flags + +// This defines flag names that can be used in autocli. +const ( + // FlagFrom is the flag to set the from address with which to sign the transaction. + FlagFrom = "from" + + // FlagOutput is the flag to set the output format. + FlagOutput = "output" + + // FlagNoIndent is the flag to not indent the output. + FlagNoIndent = "no-indent" +) + +// List of supported output formats +const ( + OutputFormatJSON = "json" + OutputFormatText = "text" +) diff --git a/client/v2/internal/strcase/kebab_test.go b/client/v2/internal/strcase/kebab_test.go index 71e2300e31b2..1c82f3ab3bcd 100644 --- a/client/v2/internal/strcase/kebab_test.go +++ b/client/v2/internal/strcase/kebab_test.go @@ -3,8 +3,9 @@ package strcase_test import ( "testing" - "cosmossdk.io/client/v2/internal/strcase" "gotest.tools/v3/assert" + + "cosmossdk.io/client/v2/internal/strcase" ) func toKebab(t testing.TB) { diff --git a/client/v2/internal/testpb/msg.proto b/client/v2/internal/testpb/msg.proto index f11c1d3cad46..a1360175d0a1 100644 --- a/client/v2/internal/testpb/msg.proto +++ b/client/v2/internal/testpb/msg.proto @@ -11,7 +11,13 @@ import "testpb/query.proto"; service Msg { // Send a request and returns the request as a response. - rpc Send(MsgRequest) returns (MsgResponse); + rpc Send(MsgRequest) returns (MsgResponse) { + option (cosmos_proto.method_added_in) = "cosmos-sdk v0.50.0"; + }; + + rpc Clawback(MsgClawbackRequest) returns (MsgClawbackResponse) { + option (cosmos_proto.method_added_in) = "cosmos-sdk v0.51.0"; + } } message MsgRequest { @@ -44,8 +50,13 @@ message MsgRequest { string deprecated_field = 30; string shorthand_deprecated_field = 31; bool hidden_bool = 32; + string a_validator_address = 33 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; } message MsgResponse { MsgRequest request = 1; } + +message MsgClawbackRequest {} + +message MsgClawbackResponse {} \ No newline at end of file diff --git a/client/v2/internal/testpb/msg.pulsar.go b/client/v2/internal/testpb/msg.pulsar.go index d0f23082d2dd..29fd89007a3d 100644 --- a/client/v2/internal/testpb/msg.pulsar.go +++ b/client/v2/internal/testpb/msg.pulsar.go @@ -382,6 +382,7 @@ var ( fd_MsgRequest_deprecated_field protoreflect.FieldDescriptor fd_MsgRequest_shorthand_deprecated_field protoreflect.FieldDescriptor fd_MsgRequest_hidden_bool protoreflect.FieldDescriptor + fd_MsgRequest_a_validator_address protoreflect.FieldDescriptor ) func init() { @@ -413,6 +414,7 @@ func init() { fd_MsgRequest_deprecated_field = md_MsgRequest.Fields().ByName("deprecated_field") fd_MsgRequest_shorthand_deprecated_field = md_MsgRequest.Fields().ByName("shorthand_deprecated_field") fd_MsgRequest_hidden_bool = md_MsgRequest.Fields().ByName("hidden_bool") + fd_MsgRequest_a_validator_address = md_MsgRequest.Fields().ByName("a_validator_address") } var _ protoreflect.Message = (*fastReflection_MsgRequest)(nil) @@ -636,6 +638,12 @@ func (x *fastReflection_MsgRequest) Range(f func(protoreflect.FieldDescriptor, p return } } + if x.AValidatorAddress != "" { + value := protoreflect.ValueOfString(x.AValidatorAddress) + if !f(fd_MsgRequest_a_validator_address, value) { + return + } + } } // Has reports whether a field is populated. @@ -703,6 +711,8 @@ func (x *fastReflection_MsgRequest) Has(fd protoreflect.FieldDescriptor) bool { return x.ShorthandDeprecatedField != "" case "testpb.MsgRequest.hidden_bool": return x.HiddenBool != false + case "testpb.MsgRequest.a_validator_address": + return x.AValidatorAddress != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.MsgRequest")) @@ -771,6 +781,8 @@ func (x *fastReflection_MsgRequest) Clear(fd protoreflect.FieldDescriptor) { x.ShorthandDeprecatedField = "" case "testpb.MsgRequest.hidden_bool": x.HiddenBool = false + case "testpb.MsgRequest.a_validator_address": + x.AValidatorAddress = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.MsgRequest")) @@ -886,6 +898,9 @@ func (x *fastReflection_MsgRequest) Get(descriptor protoreflect.FieldDescriptor) case "testpb.MsgRequest.hidden_bool": value := x.HiddenBool return protoreflect.ValueOfBool(value) + case "testpb.MsgRequest.a_validator_address": + value := x.AValidatorAddress + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.MsgRequest")) @@ -972,6 +987,8 @@ func (x *fastReflection_MsgRequest) Set(fd protoreflect.FieldDescriptor, value p x.ShorthandDeprecatedField = value.Interface().(string) case "testpb.MsgRequest.hidden_bool": x.HiddenBool = value.Bool() + case "testpb.MsgRequest.a_validator_address": + x.AValidatorAddress = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.MsgRequest")) @@ -1087,6 +1104,8 @@ func (x *fastReflection_MsgRequest) Mutable(fd protoreflect.FieldDescriptor) pro panic(fmt.Errorf("field shorthand_deprecated_field of message testpb.MsgRequest is not mutable")) case "testpb.MsgRequest.hidden_bool": panic(fmt.Errorf("field hidden_bool of message testpb.MsgRequest is not mutable")) + case "testpb.MsgRequest.a_validator_address": + panic(fmt.Errorf("field a_validator_address of message testpb.MsgRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.MsgRequest")) @@ -1164,6 +1183,8 @@ func (x *fastReflection_MsgRequest) NewField(fd protoreflect.FieldDescriptor) pr return protoreflect.ValueOfString("") case "testpb.MsgRequest.hidden_bool": return protoreflect.ValueOfBool(false) + case "testpb.MsgRequest.a_validator_address": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.MsgRequest")) @@ -1342,6 +1363,10 @@ func (x *fastReflection_MsgRequest) ProtoMethods() *protoiface.Methods { if x.HiddenBool { n += 3 } + l = len(x.AValidatorAddress) + if l > 0 { + n += 2 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1371,6 +1396,15 @@ func (x *fastReflection_MsgRequest) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.AValidatorAddress) > 0 { + i -= len(x.AValidatorAddress) + copy(dAtA[i:], x.AValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AValidatorAddress))) + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0x8a + } if x.HiddenBool { i-- if x.HiddenBool { @@ -2604,6 +2638,38 @@ func (x *fastReflection_MsgRequest) ProtoMethods() *protoiface.Methods { } } x.HiddenBool = bool(v != 0) + case 33: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AValidatorAddress", 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.AValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -3074,161 +3140,874 @@ func (x *fastReflection_MsgResponse) ProtoMethods() *protoiface.Methods { } } -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: testpb/msg.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) +var ( + md_MsgClawbackRequest protoreflect.MessageDescriptor ) -type MsgRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func init() { + file_testpb_msg_proto_init() + md_MsgClawbackRequest = File_testpb_msg_proto.Messages().ByName("MsgClawbackRequest") +} - // u32 is an uint32 - U32 uint32 `protobuf:"varint,1,opt,name=u32,proto3" json:"u32,omitempty"` - U64 uint64 `protobuf:"varint,2,opt,name=u64,proto3" json:"u64,omitempty"` - Str string `protobuf:"bytes,3,opt,name=str,proto3" json:"str,omitempty"` - Bz []byte `protobuf:"bytes,4,opt,name=bz,proto3" json:"bz,omitempty"` - Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Duration *durationpb.Duration `protobuf:"bytes,6,opt,name=duration,proto3" json:"duration,omitempty"` - I32 int32 `protobuf:"varint,7,opt,name=i32,proto3" json:"i32,omitempty"` - I64 int64 `protobuf:"varint,10,opt,name=i64,proto3" json:"i64,omitempty"` - ABool bool `protobuf:"varint,15,opt,name=a_bool,json=aBool,proto3" json:"a_bool,omitempty"` - AnEnum Enum `protobuf:"varint,16,opt,name=an_enum,json=anEnum,proto3,enum=testpb.Enum" json:"an_enum,omitempty"` - AMessage *AMessage `protobuf:"bytes,17,opt,name=a_message,json=aMessage,proto3" json:"a_message,omitempty"` - ACoin *v1beta1.Coin `protobuf:"bytes,18,opt,name=a_coin,json=aCoin,proto3" json:"a_coin,omitempty"` - AnAddress string `protobuf:"bytes,19,opt,name=an_address,json=anAddress,proto3" json:"an_address,omitempty"` - Page *v1beta11.PageRequest `protobuf:"bytes,20,opt,name=page,proto3" json:"page,omitempty"` - Bools []bool `protobuf:"varint,21,rep,packed,name=bools,proto3" json:"bools,omitempty"` - Uints []uint32 `protobuf:"varint,22,rep,packed,name=uints,proto3" json:"uints,omitempty"` - Strings []string `protobuf:"bytes,23,rep,name=strings,proto3" json:"strings,omitempty"` - Enums []Enum `protobuf:"varint,24,rep,packed,name=enums,proto3,enum=testpb.Enum" json:"enums,omitempty"` - Durations []*durationpb.Duration `protobuf:"bytes,25,rep,name=durations,proto3" json:"durations,omitempty"` - SomeMessages []*AMessage `protobuf:"bytes,26,rep,name=some_messages,json=someMessages,proto3" json:"some_messages,omitempty"` - Positional1 int32 `protobuf:"varint,27,opt,name=positional1,proto3" json:"positional1,omitempty"` - Positional2 string `protobuf:"bytes,28,opt,name=positional2,proto3" json:"positional2,omitempty"` - Positional3Varargs []*v1beta1.Coin `protobuf:"bytes,29,rep,name=positional3_varargs,json=positional3Varargs,proto3" json:"positional3_varargs,omitempty"` - DeprecatedField string `protobuf:"bytes,30,opt,name=deprecated_field,json=deprecatedField,proto3" json:"deprecated_field,omitempty"` - ShorthandDeprecatedField string `protobuf:"bytes,31,opt,name=shorthand_deprecated_field,json=shorthandDeprecatedField,proto3" json:"shorthand_deprecated_field,omitempty"` - HiddenBool bool `protobuf:"varint,32,opt,name=hidden_bool,json=hiddenBool,proto3" json:"hidden_bool,omitempty"` +var _ protoreflect.Message = (*fastReflection_MsgClawbackRequest)(nil) + +type fastReflection_MsgClawbackRequest MsgClawbackRequest + +func (x *MsgClawbackRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgClawbackRequest)(x) } -func (x *MsgRequest) Reset() { - *x = MsgRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_testpb_msg_proto_msgTypes[0] +func (x *MsgClawbackRequest) slowProtoReflect() protoreflect.Message { + mi := &file_testpb_msg_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } + return mi.MessageOf(x) } -func (x *MsgRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} +var _fastReflection_MsgClawbackRequest_messageType fastReflection_MsgClawbackRequest_messageType +var _ protoreflect.MessageType = fastReflection_MsgClawbackRequest_messageType{} -func (*MsgRequest) ProtoMessage() {} +type fastReflection_MsgClawbackRequest_messageType struct{} -// Deprecated: Use MsgRequest.ProtoReflect.Descriptor instead. -func (*MsgRequest) Descriptor() ([]byte, []int) { - return file_testpb_msg_proto_rawDescGZIP(), []int{0} +func (x fastReflection_MsgClawbackRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgClawbackRequest)(nil) +} +func (x fastReflection_MsgClawbackRequest_messageType) New() protoreflect.Message { + return new(fastReflection_MsgClawbackRequest) +} +func (x fastReflection_MsgClawbackRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgClawbackRequest } -func (x *MsgRequest) GetU32() uint32 { - if x != nil { - return x.U32 - } - return 0 +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgClawbackRequest) Descriptor() protoreflect.MessageDescriptor { + return md_MsgClawbackRequest } -func (x *MsgRequest) GetU64() uint64 { - if x != nil { - return x.U64 - } - return 0 +// 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_MsgClawbackRequest) Type() protoreflect.MessageType { + return _fastReflection_MsgClawbackRequest_messageType } -func (x *MsgRequest) GetStr() string { - if x != nil { - return x.Str - } - return "" +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgClawbackRequest) New() protoreflect.Message { + return new(fastReflection_MsgClawbackRequest) } -func (x *MsgRequest) GetBz() []byte { - if x != nil { - return x.Bz - } - return nil +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgClawbackRequest) Interface() protoreflect.ProtoMessage { + return (*MsgClawbackRequest)(x) } -func (x *MsgRequest) GetTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.Timestamp - } - return nil +// 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_MsgClawbackRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } -func (x *MsgRequest) GetDuration() *durationpb.Duration { - if x != nil { - return x.Duration +// 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_MsgClawbackRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.MsgClawbackRequest")) + } + panic(fmt.Errorf("message testpb.MsgClawbackRequest does not contain field %s", fd.FullName())) } - return nil } -func (x *MsgRequest) GetI32() int32 { - if x != nil { - return x.I32 +// 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_MsgClawbackRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.MsgClawbackRequest")) + } + panic(fmt.Errorf("message testpb.MsgClawbackRequest does not contain field %s", fd.FullName())) } - return 0 } -func (x *MsgRequest) GetI64() int64 { - if x != nil { - return x.I64 +// 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_MsgClawbackRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.MsgClawbackRequest")) + } + panic(fmt.Errorf("message testpb.MsgClawbackRequest does not contain field %s", descriptor.FullName())) } - return 0 } -func (x *MsgRequest) GetABool() bool { - if x != nil { - return x.ABool +// 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_MsgClawbackRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.MsgClawbackRequest")) + } + panic(fmt.Errorf("message testpb.MsgClawbackRequest does not contain field %s", fd.FullName())) } - return false } -func (x *MsgRequest) GetAnEnum() Enum { - if x != nil { - return x.AnEnum +// 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_MsgClawbackRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.MsgClawbackRequest")) + } + panic(fmt.Errorf("message testpb.MsgClawbackRequest does not contain field %s", fd.FullName())) } - return Enum_ENUM_UNSPECIFIED } -func (x *MsgRequest) GetAMessage() *AMessage { - if x != nil { - return x.AMessage +// 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_MsgClawbackRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.MsgClawbackRequest")) + } + panic(fmt.Errorf("message testpb.MsgClawbackRequest does not contain field %s", fd.FullName())) } - return nil } -func (x *MsgRequest) GetACoin() *v1beta1.Coin { - if x != nil { - return x.ACoin +// 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_MsgClawbackRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in testpb.MsgClawbackRequest", d.FullName())) } - return nil + panic("unreachable") } -func (x *MsgRequest) GetAnAddress() string { - if x != nil { - return x.AnAddress - } +// 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_MsgClawbackRequest) 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_MsgClawbackRequest) 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_MsgClawbackRequest) 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_MsgClawbackRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgClawbackRequest) + 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().(*MsgClawbackRequest) + 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().(*MsgClawbackRequest) + 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: MsgClawbackRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgClawbackRequest: 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_MsgClawbackResponse protoreflect.MessageDescriptor +) + +func init() { + file_testpb_msg_proto_init() + md_MsgClawbackResponse = File_testpb_msg_proto.Messages().ByName("MsgClawbackResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgClawbackResponse)(nil) + +type fastReflection_MsgClawbackResponse MsgClawbackResponse + +func (x *MsgClawbackResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgClawbackResponse)(x) +} + +func (x *MsgClawbackResponse) slowProtoReflect() protoreflect.Message { + mi := &file_testpb_msg_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgClawbackResponse_messageType fastReflection_MsgClawbackResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgClawbackResponse_messageType{} + +type fastReflection_MsgClawbackResponse_messageType struct{} + +func (x fastReflection_MsgClawbackResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgClawbackResponse)(nil) +} +func (x fastReflection_MsgClawbackResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgClawbackResponse) +} +func (x fastReflection_MsgClawbackResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgClawbackResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgClawbackResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgClawbackResponse +} + +// 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_MsgClawbackResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgClawbackResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgClawbackResponse) New() protoreflect.Message { + return new(fastReflection_MsgClawbackResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgClawbackResponse) Interface() protoreflect.ProtoMessage { + return (*MsgClawbackResponse)(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_MsgClawbackResponse) 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_MsgClawbackResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.MsgClawbackResponse")) + } + panic(fmt.Errorf("message testpb.MsgClawbackResponse 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_MsgClawbackResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.MsgClawbackResponse")) + } + panic(fmt.Errorf("message testpb.MsgClawbackResponse 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_MsgClawbackResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.MsgClawbackResponse")) + } + panic(fmt.Errorf("message testpb.MsgClawbackResponse 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_MsgClawbackResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.MsgClawbackResponse")) + } + panic(fmt.Errorf("message testpb.MsgClawbackResponse 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_MsgClawbackResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.MsgClawbackResponse")) + } + panic(fmt.Errorf("message testpb.MsgClawbackResponse 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_MsgClawbackResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.MsgClawbackResponse")) + } + panic(fmt.Errorf("message testpb.MsgClawbackResponse 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_MsgClawbackResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in testpb.MsgClawbackResponse", 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_MsgClawbackResponse) 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_MsgClawbackResponse) 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_MsgClawbackResponse) 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_MsgClawbackResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgClawbackResponse) + 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().(*MsgClawbackResponse) + 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().(*MsgClawbackResponse) + 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: MsgClawbackResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgClawbackResponse: 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, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: testpb/msg.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) +) + +type MsgRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // u32 is an uint32 + U32 uint32 `protobuf:"varint,1,opt,name=u32,proto3" json:"u32,omitempty"` + U64 uint64 `protobuf:"varint,2,opt,name=u64,proto3" json:"u64,omitempty"` + Str string `protobuf:"bytes,3,opt,name=str,proto3" json:"str,omitempty"` + Bz []byte `protobuf:"bytes,4,opt,name=bz,proto3" json:"bz,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Duration *durationpb.Duration `protobuf:"bytes,6,opt,name=duration,proto3" json:"duration,omitempty"` + I32 int32 `protobuf:"varint,7,opt,name=i32,proto3" json:"i32,omitempty"` + I64 int64 `protobuf:"varint,10,opt,name=i64,proto3" json:"i64,omitempty"` + ABool bool `protobuf:"varint,15,opt,name=a_bool,json=aBool,proto3" json:"a_bool,omitempty"` + AnEnum Enum `protobuf:"varint,16,opt,name=an_enum,json=anEnum,proto3,enum=testpb.Enum" json:"an_enum,omitempty"` + AMessage *AMessage `protobuf:"bytes,17,opt,name=a_message,json=aMessage,proto3" json:"a_message,omitempty"` + ACoin *v1beta1.Coin `protobuf:"bytes,18,opt,name=a_coin,json=aCoin,proto3" json:"a_coin,omitempty"` + AnAddress string `protobuf:"bytes,19,opt,name=an_address,json=anAddress,proto3" json:"an_address,omitempty"` + Page *v1beta11.PageRequest `protobuf:"bytes,20,opt,name=page,proto3" json:"page,omitempty"` + Bools []bool `protobuf:"varint,21,rep,packed,name=bools,proto3" json:"bools,omitempty"` + Uints []uint32 `protobuf:"varint,22,rep,packed,name=uints,proto3" json:"uints,omitempty"` + Strings []string `protobuf:"bytes,23,rep,name=strings,proto3" json:"strings,omitempty"` + Enums []Enum `protobuf:"varint,24,rep,packed,name=enums,proto3,enum=testpb.Enum" json:"enums,omitempty"` + Durations []*durationpb.Duration `protobuf:"bytes,25,rep,name=durations,proto3" json:"durations,omitempty"` + SomeMessages []*AMessage `protobuf:"bytes,26,rep,name=some_messages,json=someMessages,proto3" json:"some_messages,omitempty"` + Positional1 int32 `protobuf:"varint,27,opt,name=positional1,proto3" json:"positional1,omitempty"` + Positional2 string `protobuf:"bytes,28,opt,name=positional2,proto3" json:"positional2,omitempty"` + Positional3Varargs []*v1beta1.Coin `protobuf:"bytes,29,rep,name=positional3_varargs,json=positional3Varargs,proto3" json:"positional3_varargs,omitempty"` + DeprecatedField string `protobuf:"bytes,30,opt,name=deprecated_field,json=deprecatedField,proto3" json:"deprecated_field,omitempty"` + ShorthandDeprecatedField string `protobuf:"bytes,31,opt,name=shorthand_deprecated_field,json=shorthandDeprecatedField,proto3" json:"shorthand_deprecated_field,omitempty"` + HiddenBool bool `protobuf:"varint,32,opt,name=hidden_bool,json=hiddenBool,proto3" json:"hidden_bool,omitempty"` + AValidatorAddress string `protobuf:"bytes,33,opt,name=a_validator_address,json=aValidatorAddress,proto3" json:"a_validator_address,omitempty"` +} + +func (x *MsgRequest) Reset() { + *x = MsgRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_testpb_msg_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRequest) ProtoMessage() {} + +// Deprecated: Use MsgRequest.ProtoReflect.Descriptor instead. +func (*MsgRequest) Descriptor() ([]byte, []int) { + return file_testpb_msg_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgRequest) GetU32() uint32 { + if x != nil { + return x.U32 + } + return 0 +} + +func (x *MsgRequest) GetU64() uint64 { + if x != nil { + return x.U64 + } + return 0 +} + +func (x *MsgRequest) GetStr() string { + if x != nil { + return x.Str + } + return "" +} + +func (x *MsgRequest) GetBz() []byte { + if x != nil { + return x.Bz + } + return nil +} + +func (x *MsgRequest) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *MsgRequest) GetDuration() *durationpb.Duration { + if x != nil { + return x.Duration + } + return nil +} + +func (x *MsgRequest) GetI32() int32 { + if x != nil { + return x.I32 + } + return 0 +} + +func (x *MsgRequest) GetI64() int64 { + if x != nil { + return x.I64 + } + return 0 +} + +func (x *MsgRequest) GetABool() bool { + if x != nil { + return x.ABool + } + return false +} + +func (x *MsgRequest) GetAnEnum() Enum { + if x != nil { + return x.AnEnum + } + return Enum_ENUM_UNSPECIFIED +} + +func (x *MsgRequest) GetAMessage() *AMessage { + if x != nil { + return x.AMessage + } + return nil +} + +func (x *MsgRequest) GetACoin() *v1beta1.Coin { + if x != nil { + return x.ACoin + } + return nil +} + +func (x *MsgRequest) GetAnAddress() string { + if x != nil { + return x.AnAddress + } return "" } @@ -3323,6 +4102,13 @@ func (x *MsgRequest) GetHiddenBool() bool { return false } +func (x *MsgRequest) GetAValidatorAddress() string { + if x != nil { + return x.AValidatorAddress + } + return "" +} + type MsgResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3358,6 +4144,58 @@ func (x *MsgResponse) GetRequest() *MsgRequest { return nil } +type MsgClawbackRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgClawbackRequest) Reset() { + *x = MsgClawbackRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_testpb_msg_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgClawbackRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgClawbackRequest) ProtoMessage() {} + +// Deprecated: Use MsgClawbackRequest.ProtoReflect.Descriptor instead. +func (*MsgClawbackRequest) Descriptor() ([]byte, []int) { + return file_testpb_msg_proto_rawDescGZIP(), []int{2} +} + +type MsgClawbackResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgClawbackResponse) Reset() { + *x = MsgClawbackResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_testpb_msg_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgClawbackResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgClawbackResponse) ProtoMessage() {} + +// Deprecated: Use MsgClawbackResponse.ProtoReflect.Descriptor instead. +func (*MsgClawbackResponse) Descriptor() ([]byte, []int) { + return file_testpb_msg_proto_rawDescGZIP(), []int{3} +} + var File_testpb_msg_proto protoreflect.FileDescriptor var file_testpb_msg_proto_rawDesc = []byte{ @@ -3374,7 +4212,7 @@ var file_testpb_msg_proto_rawDesc = []byte{ 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xef, 0x07, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x52, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc2, 0x08, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x33, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x75, 0x33, 0x32, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x36, 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x75, 0x36, 0x34, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x74, 0x72, @@ -3437,23 +4275,39 @@ var file_testpb_msg_proto_rawDesc = []byte{ 0x68, 0x6f, 0x72, 0x74, 0x68, 0x61, 0x6e, 0x64, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x20, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x68, 0x69, - 0x64, 0x64, 0x65, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x22, 0x3b, 0x0a, 0x0b, 0x4d, 0x73, 0x67, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, - 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0x36, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x2f, 0x0a, 0x04, - 0x53, 0x65, 0x6e, 0x64, 0x12, 0x12, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x4d, 0x73, - 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, - 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x86, 0x01, - 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x42, 0x08, 0x4d, 0x73, - 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x32, - 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, - 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0xca, - 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0xe2, 0x02, 0x12, 0x54, 0x65, 0x73, 0x74, 0x70, - 0x62, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, - 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x64, 0x65, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x51, 0x0a, 0x13, 0x61, 0x5f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x21, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x11, 0x61, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3b, 0x0a, 0x0b, 0x4d, + 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x65, + 0x73, 0x74, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, + 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x43, + 0x6c, 0x61, 0x77, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x15, + 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x61, 0x77, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xab, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x47, 0x0a, + 0x04, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x12, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x4d, + 0x73, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, + 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, + 0xca, 0xb4, 0x2d, 0x12, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x76, + 0x30, 0x2e, 0x35, 0x30, 0x2e, 0x30, 0x12, 0x5b, 0x0a, 0x08, 0x43, 0x6c, 0x61, 0x77, 0x62, 0x61, + 0x63, 0x6b, 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x43, + 0x6c, 0x61, 0x77, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, + 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x61, 0x77, 0x62, + 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0xca, 0xb4, 0x2d, + 0x12, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x76, 0x30, 0x2e, 0x35, + 0x31, 0x2e, 0x30, 0x42, 0x86, 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x73, 0x74, + 0x70, 0x62, 0x42, 0x08, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, + 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x54, + 0x65, 0x73, 0x74, 0x70, 0x62, 0xca, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0xe2, 0x02, + 0x12, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3468,33 +4322,37 @@ func file_testpb_msg_proto_rawDescGZIP() []byte { return file_testpb_msg_proto_rawDescData } -var file_testpb_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_testpb_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_testpb_msg_proto_goTypes = []interface{}{ (*MsgRequest)(nil), // 0: testpb.MsgRequest (*MsgResponse)(nil), // 1: testpb.MsgResponse - (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 3: google.protobuf.Duration - (Enum)(0), // 4: testpb.Enum - (*AMessage)(nil), // 5: testpb.AMessage - (*v1beta1.Coin)(nil), // 6: cosmos.base.v1beta1.Coin - (*v1beta11.PageRequest)(nil), // 7: cosmos.base.query.v1beta1.PageRequest + (*MsgClawbackRequest)(nil), // 2: testpb.MsgClawbackRequest + (*MsgClawbackResponse)(nil), // 3: testpb.MsgClawbackResponse + (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 5: google.protobuf.Duration + (Enum)(0), // 6: testpb.Enum + (*AMessage)(nil), // 7: testpb.AMessage + (*v1beta1.Coin)(nil), // 8: cosmos.base.v1beta1.Coin + (*v1beta11.PageRequest)(nil), // 9: cosmos.base.query.v1beta1.PageRequest } var file_testpb_msg_proto_depIdxs = []int32{ - 2, // 0: testpb.MsgRequest.timestamp:type_name -> google.protobuf.Timestamp - 3, // 1: testpb.MsgRequest.duration:type_name -> google.protobuf.Duration - 4, // 2: testpb.MsgRequest.an_enum:type_name -> testpb.Enum - 5, // 3: testpb.MsgRequest.a_message:type_name -> testpb.AMessage - 6, // 4: testpb.MsgRequest.a_coin:type_name -> cosmos.base.v1beta1.Coin - 7, // 5: testpb.MsgRequest.page:type_name -> cosmos.base.query.v1beta1.PageRequest - 4, // 6: testpb.MsgRequest.enums:type_name -> testpb.Enum - 3, // 7: testpb.MsgRequest.durations:type_name -> google.protobuf.Duration - 5, // 8: testpb.MsgRequest.some_messages:type_name -> testpb.AMessage - 6, // 9: testpb.MsgRequest.positional3_varargs:type_name -> cosmos.base.v1beta1.Coin + 4, // 0: testpb.MsgRequest.timestamp:type_name -> google.protobuf.Timestamp + 5, // 1: testpb.MsgRequest.duration:type_name -> google.protobuf.Duration + 6, // 2: testpb.MsgRequest.an_enum:type_name -> testpb.Enum + 7, // 3: testpb.MsgRequest.a_message:type_name -> testpb.AMessage + 8, // 4: testpb.MsgRequest.a_coin:type_name -> cosmos.base.v1beta1.Coin + 9, // 5: testpb.MsgRequest.page:type_name -> cosmos.base.query.v1beta1.PageRequest + 6, // 6: testpb.MsgRequest.enums:type_name -> testpb.Enum + 5, // 7: testpb.MsgRequest.durations:type_name -> google.protobuf.Duration + 7, // 8: testpb.MsgRequest.some_messages:type_name -> testpb.AMessage + 8, // 9: testpb.MsgRequest.positional3_varargs:type_name -> cosmos.base.v1beta1.Coin 0, // 10: testpb.MsgResponse.request:type_name -> testpb.MsgRequest 0, // 11: testpb.Msg.Send:input_type -> testpb.MsgRequest - 1, // 12: testpb.Msg.Send:output_type -> testpb.MsgResponse - 12, // [12:13] is the sub-list for method output_type - 11, // [11:12] is the sub-list for method input_type + 2, // 12: testpb.Msg.Clawback:input_type -> testpb.MsgClawbackRequest + 1, // 13: testpb.Msg.Send:output_type -> testpb.MsgResponse + 3, // 14: testpb.Msg.Clawback:output_type -> testpb.MsgClawbackResponse + 13, // [13:15] is the sub-list for method output_type + 11, // [11:13] is the sub-list for method input_type 11, // [11:11] is the sub-list for extension type_name 11, // [11:11] is the sub-list for extension extendee 0, // [0:11] is the sub-list for field type_name @@ -3531,6 +4389,30 @@ func file_testpb_msg_proto_init() { return nil } } + file_testpb_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgClawbackRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_testpb_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgClawbackResponse); 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{ @@ -3538,7 +4420,7 @@ func file_testpb_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_testpb_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 4, NumExtensions: 0, NumServices: 1, }, diff --git a/client/v2/internal/testpb/msg_grpc.pb.go b/client/v2/internal/testpb/msg_grpc.pb.go index 4d8c24526e4b..ebcfba150bb9 100644 --- a/client/v2/internal/testpb/msg_grpc.pb.go +++ b/client/v2/internal/testpb/msg_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: testpb/msg.proto @@ -18,12 +18,18 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + Msg_Send_FullMethodName = "/testpb.Msg/Send" + Msg_Clawback_FullMethodName = "/testpb.Msg/Clawback" +) + // MsgClient is the client API for Msg 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 MsgClient interface { // Send a request and returns the request as a response. Send(ctx context.Context, in *MsgRequest, opts ...grpc.CallOption) (*MsgResponse, error) + Clawback(ctx context.Context, in *MsgClawbackRequest, opts ...grpc.CallOption) (*MsgClawbackResponse, error) } type msgClient struct { @@ -36,7 +42,16 @@ func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { func (c *msgClient) Send(ctx context.Context, in *MsgRequest, opts ...grpc.CallOption) (*MsgResponse, error) { out := new(MsgResponse) - err := c.cc.Invoke(ctx, "/testpb.Msg/Send", in, out, opts...) + err := c.cc.Invoke(ctx, Msg_Send_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) Clawback(ctx context.Context, in *MsgClawbackRequest, opts ...grpc.CallOption) (*MsgClawbackResponse, error) { + out := new(MsgClawbackResponse) + err := c.cc.Invoke(ctx, Msg_Clawback_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -49,6 +64,7 @@ func (c *msgClient) Send(ctx context.Context, in *MsgRequest, opts ...grpc.CallO type MsgServer interface { // Send a request and returns the request as a response. Send(context.Context, *MsgRequest) (*MsgResponse, error) + Clawback(context.Context, *MsgClawbackRequest) (*MsgClawbackResponse, error) mustEmbedUnimplementedMsgServer() } @@ -59,6 +75,9 @@ type UnimplementedMsgServer struct { func (UnimplementedMsgServer) Send(context.Context, *MsgRequest) (*MsgResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Send not implemented") } +func (UnimplementedMsgServer) Clawback(context.Context, *MsgClawbackRequest) (*MsgClawbackResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Clawback not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -82,7 +101,7 @@ func _Msg_Send_Handler(srv interface{}, ctx context.Context, dec func(interface{ } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/testpb.Msg/Send", + FullMethod: Msg_Send_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).Send(ctx, req.(*MsgRequest)) @@ -90,6 +109,24 @@ func _Msg_Send_Handler(srv interface{}, ctx context.Context, dec func(interface{ return interceptor(ctx, in, info, handler) } +func _Msg_Clawback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgClawbackRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Clawback(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_Clawback_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Clawback(ctx, req.(*MsgClawbackRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -101,6 +138,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "Send", Handler: _Msg_Send_Handler, }, + { + MethodName: "Clawback", + Handler: _Msg_Clawback_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "testpb/msg.proto", diff --git a/client/v2/internal/testpb/query.proto b/client/v2/internal/testpb/query.proto index 5e2a5171e45a..9215823f7572 100644 --- a/client/v2/internal/testpb/query.proto +++ b/client/v2/internal/testpb/query.proto @@ -40,12 +40,16 @@ message EchoRequest { string positional2 = 28; repeated cosmos.base.v1beta1.Coin positional3_varargs = 29; - string deprecated_field = 30; - string shorthand_deprecated_field = 31; - bool hidden_bool = 32; - map map_string_string = 33; - map map_string_uint32 = 34; - map map_string_coin = 35; + string deprecated_field = 30; + string shorthand_deprecated_field = 31; + bool hidden_bool = 32; + map map_string_string = 33; + map map_string_uint32 = 34; + map map_string_coin = 35; + string a_validator_address = 36 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + string a_consensus_address = 37 [(cosmos_proto.scalar) = "cosmos.ConsensusAddressString"]; + + repeated cosmos.base.v1beta1.Coin coins = 38; } enum Enum { diff --git a/client/v2/internal/testpb/query.pulsar.go b/client/v2/internal/testpb/query.pulsar.go index 7baf83be9f3a..53f899b395ca 100644 --- a/client/v2/internal/testpb/query.pulsar.go +++ b/client/v2/internal/testpb/query.pulsar.go @@ -18,148 +18,616 @@ import ( sync "sync" ) -var _ protoreflect.List = (*_EchoRequest_21_list)(nil) +var ( + md_AMessage protoreflect.MessageDescriptor + fd_AMessage_bar protoreflect.FieldDescriptor + fd_AMessage_baz protoreflect.FieldDescriptor +) -type _EchoRequest_21_list struct { - list *[]bool +func init() { + file_testpb_query_proto_init() + md_AMessage = File_testpb_query_proto.Messages().ByName("AMessage") + fd_AMessage_bar = md_AMessage.Fields().ByName("bar") + fd_AMessage_baz = md_AMessage.Fields().ByName("baz") } -func (x *_EchoRequest_21_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} +var _ protoreflect.Message = (*fastReflection_AMessage)(nil) -func (x *_EchoRequest_21_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBool((*x.list)[i]) -} +type fastReflection_AMessage AMessage -func (x *_EchoRequest_21_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bool() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue +func (x *AMessage) ProtoReflect() protoreflect.Message { + return (*fastReflection_AMessage)(x) } -func (x *_EchoRequest_21_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bool() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) +func (x *AMessage) slowProtoReflect() protoreflect.Message { + mi := &file_testpb_query_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (x *_EchoRequest_21_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message EchoRequest at list field Bools as it is not of Message kind")) -} +var _fastReflection_AMessage_messageType fastReflection_AMessage_messageType +var _ protoreflect.MessageType = fastReflection_AMessage_messageType{} -func (x *_EchoRequest_21_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} +type fastReflection_AMessage_messageType struct{} -func (x *_EchoRequest_21_list) NewElement() protoreflect.Value { - v := false - return protoreflect.ValueOfBool(v) +func (x fastReflection_AMessage_messageType) Zero() protoreflect.Message { + return (*fastReflection_AMessage)(nil) } - -func (x *_EchoRequest_21_list) IsValid() bool { - return x.list != nil +func (x fastReflection_AMessage_messageType) New() protoreflect.Message { + return new(fastReflection_AMessage) } - -var _ protoreflect.List = (*_EchoRequest_22_list)(nil) - -type _EchoRequest_22_list struct { - list *[]uint32 +func (x fastReflection_AMessage_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AMessage } -func (x *_EchoRequest_22_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AMessage) Descriptor() protoreflect.MessageDescriptor { + return md_AMessage } -func (x *_EchoRequest_22_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfUint32((*x.list)[i]) +// 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_AMessage) Type() protoreflect.MessageType { + return _fastReflection_AMessage_messageType } -func (x *_EchoRequest_22_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := (uint32)(valueUnwrapped) - (*x.list)[i] = concreteValue +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AMessage) New() protoreflect.Message { + return new(fastReflection_AMessage) } -func (x *_EchoRequest_22_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := (uint32)(valueUnwrapped) - *x.list = append(*x.list, concreteValue) +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AMessage) Interface() protoreflect.ProtoMessage { + return (*AMessage)(x) } -func (x *_EchoRequest_22_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message EchoRequest at list field Uints as it is not of Message kind")) +// 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_AMessage) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Bar != "" { + value := protoreflect.ValueOfString(x.Bar) + if !f(fd_AMessage_bar, value) { + return + } + } + if x.Baz != int32(0) { + value := protoreflect.ValueOfInt32(x.Baz) + if !f(fd_AMessage_baz, value) { + return + } + } } -func (x *_EchoRequest_22_list) Truncate(n int) { - *x.list = (*x.list)[:n] +// 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_AMessage) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "testpb.AMessage.bar": + return x.Bar != "" + case "testpb.AMessage.baz": + return x.Baz != int32(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) + } + panic(fmt.Errorf("message testpb.AMessage does not contain field %s", fd.FullName())) + } } -func (x *_EchoRequest_22_list) NewElement() protoreflect.Value { - v := uint32(0) - return protoreflect.ValueOfUint32(v) +// 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_AMessage) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "testpb.AMessage.bar": + x.Bar = "" + case "testpb.AMessage.baz": + x.Baz = int32(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) + } + panic(fmt.Errorf("message testpb.AMessage does not contain field %s", fd.FullName())) + } } -func (x *_EchoRequest_22_list) IsValid() bool { - return x.list != nil +// 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_AMessage) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "testpb.AMessage.bar": + value := x.Bar + return protoreflect.ValueOfString(value) + case "testpb.AMessage.baz": + value := x.Baz + return protoreflect.ValueOfInt32(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) + } + panic(fmt.Errorf("message testpb.AMessage does not contain field %s", descriptor.FullName())) + } } -var _ protoreflect.List = (*_EchoRequest_23_list)(nil) +// 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_AMessage) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "testpb.AMessage.bar": + x.Bar = value.Interface().(string) + case "testpb.AMessage.baz": + x.Baz = int32(value.Int()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) + } + panic(fmt.Errorf("message testpb.AMessage does not contain field %s", fd.FullName())) + } +} -type _EchoRequest_23_list struct { - list *[]string +// 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_AMessage) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "testpb.AMessage.bar": + panic(fmt.Errorf("field bar of message testpb.AMessage is not mutable")) + case "testpb.AMessage.baz": + panic(fmt.Errorf("field baz of message testpb.AMessage is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) + } + panic(fmt.Errorf("message testpb.AMessage does not contain field %s", fd.FullName())) + } } -func (x *_EchoRequest_23_list) Len() int { - if x.list == nil { - return 0 +// 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_AMessage) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "testpb.AMessage.bar": + return protoreflect.ValueOfString("") + case "testpb.AMessage.baz": + return protoreflect.ValueOfInt32(int32(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) + } + panic(fmt.Errorf("message testpb.AMessage does not contain field %s", fd.FullName())) } - return len(*x.list) } -func (x *_EchoRequest_23_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) +// 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_AMessage) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in testpb.AMessage", d.FullName())) + } + panic("unreachable") } -func (x *_EchoRequest_23_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue +// 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_AMessage) GetUnknown() protoreflect.RawFields { + return x.unknownFields } -func (x *_EchoRequest_23_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) +// 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_AMessage) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields } -func (x *_EchoRequest_23_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message EchoRequest at list field Strings as it is not of Message kind")) +// 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_AMessage) IsValid() bool { + return x != nil } -func (x *_EchoRequest_23_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} +// 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_AMessage) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AMessage) + 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.Bar) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Baz != 0 { + n += 1 + runtime.Sov(uint64(x.Baz)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } -func (x *_EchoRequest_23_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*AMessage) + 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.Baz != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Baz)) + i-- + dAtA[i] = 0x10 + } + if len(x.Bar) > 0 { + i -= len(x.Bar) + copy(dAtA[i:], x.Bar) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bar))) + 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().(*AMessage) + 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: AMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AMessage: 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 Bar", 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.Bar = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Baz", wireType) + } + x.Baz = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Baz |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } -func (x *_EchoRequest_23_list) IsValid() bool { - return x.list != nil + 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 = (*_EchoRequest_24_list)(nil) +var _ protoreflect.List = (*_EchoRequest_21_list)(nil) -type _EchoRequest_24_list struct { - list *[]Enum +type _EchoRequest_21_list struct { + list *[]bool +} + +func (x *_EchoRequest_21_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_EchoRequest_21_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfBool((*x.list)[i]) +} + +func (x *_EchoRequest_21_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Bool() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_EchoRequest_21_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Bool() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_EchoRequest_21_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message EchoRequest at list field Bools as it is not of Message kind")) +} + +func (x *_EchoRequest_21_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_EchoRequest_21_list) NewElement() protoreflect.Value { + v := false + return protoreflect.ValueOfBool(v) +} + +func (x *_EchoRequest_21_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_EchoRequest_22_list)(nil) + +type _EchoRequest_22_list struct { + list *[]uint32 +} + +func (x *_EchoRequest_22_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_EchoRequest_22_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfUint32((*x.list)[i]) +} + +func (x *_EchoRequest_22_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Uint() + concreteValue := (uint32)(valueUnwrapped) + (*x.list)[i] = concreteValue +} + +func (x *_EchoRequest_22_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Uint() + concreteValue := (uint32)(valueUnwrapped) + *x.list = append(*x.list, concreteValue) +} + +func (x *_EchoRequest_22_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message EchoRequest at list field Uints as it is not of Message kind")) +} + +func (x *_EchoRequest_22_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_EchoRequest_22_list) NewElement() protoreflect.Value { + v := uint32(0) + return protoreflect.ValueOfUint32(v) +} + +func (x *_EchoRequest_22_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_EchoRequest_23_list)(nil) + +type _EchoRequest_23_list struct { + list *[]string +} + +func (x *_EchoRequest_23_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_EchoRequest_23_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_EchoRequest_23_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_EchoRequest_23_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_EchoRequest_23_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message EchoRequest at list field Strings as it is not of Message kind")) +} + +func (x *_EchoRequest_23_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_EchoRequest_23_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_EchoRequest_23_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_EchoRequest_24_list)(nil) + +type _EchoRequest_24_list struct { + list *[]Enum } func (x *_EchoRequest_24_list) Len() int { @@ -609,6 +1077,57 @@ func (x *_EchoRequest_35_map) IsValid() bool { return x.m != nil } +var _ protoreflect.List = (*_EchoRequest_38_list)(nil) + +type _EchoRequest_38_list struct { + list *[]*v1beta1.Coin +} + +func (x *_EchoRequest_38_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_EchoRequest_38_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_EchoRequest_38_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_EchoRequest_38_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_EchoRequest_38_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_EchoRequest_38_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_EchoRequest_38_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_EchoRequest_38_list) IsValid() bool { + return x.list != nil +} + var ( md_EchoRequest protoreflect.MessageDescriptor fd_EchoRequest_u32 protoreflect.FieldDescriptor @@ -640,6 +1159,9 @@ var ( fd_EchoRequest_map_string_string protoreflect.FieldDescriptor fd_EchoRequest_map_string_uint32 protoreflect.FieldDescriptor fd_EchoRequest_map_string_coin protoreflect.FieldDescriptor + fd_EchoRequest_a_validator_address protoreflect.FieldDescriptor + fd_EchoRequest_a_consensus_address protoreflect.FieldDescriptor + fd_EchoRequest_coins protoreflect.FieldDescriptor ) func init() { @@ -674,6 +1196,9 @@ func init() { fd_EchoRequest_map_string_string = md_EchoRequest.Fields().ByName("map_string_string") fd_EchoRequest_map_string_uint32 = md_EchoRequest.Fields().ByName("map_string_uint32") fd_EchoRequest_map_string_coin = md_EchoRequest.Fields().ByName("map_string_coin") + fd_EchoRequest_a_validator_address = md_EchoRequest.Fields().ByName("a_validator_address") + fd_EchoRequest_a_consensus_address = md_EchoRequest.Fields().ByName("a_consensus_address") + fd_EchoRequest_coins = md_EchoRequest.Fields().ByName("coins") } var _ protoreflect.Message = (*fastReflection_EchoRequest)(nil) @@ -685,7 +1210,7 @@ func (x *EchoRequest) ProtoReflect() protoreflect.Message { } func (x *EchoRequest) slowProtoReflect() protoreflect.Message { - mi := &file_testpb_query_proto_msgTypes[0] + mi := &file_testpb_query_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -915,6 +1440,24 @@ func (x *fastReflection_EchoRequest) Range(f func(protoreflect.FieldDescriptor, return } } + if x.AValidatorAddress != "" { + value := protoreflect.ValueOfString(x.AValidatorAddress) + if !f(fd_EchoRequest_a_validator_address, value) { + return + } + } + if x.AConsensusAddress != "" { + value := protoreflect.ValueOfString(x.AConsensusAddress) + if !f(fd_EchoRequest_a_consensus_address, value) { + return + } + } + if len(x.Coins) != 0 { + value := protoreflect.ValueOfList(&_EchoRequest_38_list{list: &x.Coins}) + if !f(fd_EchoRequest_coins, value) { + return + } + } } // Has reports whether a field is populated. @@ -988,6 +1531,12 @@ func (x *fastReflection_EchoRequest) Has(fd protoreflect.FieldDescriptor) bool { return len(x.MapStringUint32) != 0 case "testpb.EchoRequest.map_string_coin": return len(x.MapStringCoin) != 0 + case "testpb.EchoRequest.a_validator_address": + return x.AValidatorAddress != "" + case "testpb.EchoRequest.a_consensus_address": + return x.AConsensusAddress != "" + case "testpb.EchoRequest.coins": + return len(x.Coins) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoRequest")) @@ -1062,6 +1611,12 @@ func (x *fastReflection_EchoRequest) Clear(fd protoreflect.FieldDescriptor) { x.MapStringUint32 = nil case "testpb.EchoRequest.map_string_coin": x.MapStringCoin = nil + case "testpb.EchoRequest.a_validator_address": + x.AValidatorAddress = "" + case "testpb.EchoRequest.a_consensus_address": + x.AConsensusAddress = "" + case "testpb.EchoRequest.coins": + x.Coins = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoRequest")) @@ -1195,6 +1750,18 @@ func (x *fastReflection_EchoRequest) Get(descriptor protoreflect.FieldDescriptor } mapValue := &_EchoRequest_35_map{m: &x.MapStringCoin} return protoreflect.ValueOfMap(mapValue) + case "testpb.EchoRequest.a_validator_address": + value := x.AValidatorAddress + return protoreflect.ValueOfString(value) + case "testpb.EchoRequest.a_consensus_address": + value := x.AConsensusAddress + return protoreflect.ValueOfString(value) + case "testpb.EchoRequest.coins": + if len(x.Coins) == 0 { + return protoreflect.ValueOfList(&_EchoRequest_38_list{}) + } + listValue := &_EchoRequest_38_list{list: &x.Coins} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoRequest")) @@ -1293,6 +1860,14 @@ func (x *fastReflection_EchoRequest) Set(fd protoreflect.FieldDescriptor, value mv := value.Map() cmv := mv.(*_EchoRequest_35_map) x.MapStringCoin = *cmv.m + case "testpb.EchoRequest.a_validator_address": + x.AValidatorAddress = value.Interface().(string) + case "testpb.EchoRequest.a_consensus_address": + x.AConsensusAddress = value.Interface().(string) + case "testpb.EchoRequest.coins": + lv := value.List() + clv := lv.(*_EchoRequest_38_list) + x.Coins = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoRequest")) @@ -1398,6 +1973,12 @@ func (x *fastReflection_EchoRequest) Mutable(fd protoreflect.FieldDescriptor) pr } value := &_EchoRequest_35_map{m: &x.MapStringCoin} return protoreflect.ValueOfMap(value) + case "testpb.EchoRequest.coins": + if x.Coins == nil { + x.Coins = []*v1beta1.Coin{} + } + value := &_EchoRequest_38_list{list: &x.Coins} + return protoreflect.ValueOfList(value) case "testpb.EchoRequest.u32": panic(fmt.Errorf("field u32 of message testpb.EchoRequest is not mutable")) case "testpb.EchoRequest.u64": @@ -1426,6 +2007,10 @@ func (x *fastReflection_EchoRequest) Mutable(fd protoreflect.FieldDescriptor) pr panic(fmt.Errorf("field shorthand_deprecated_field of message testpb.EchoRequest is not mutable")) case "testpb.EchoRequest.hidden_bool": panic(fmt.Errorf("field hidden_bool of message testpb.EchoRequest is not mutable")) + case "testpb.EchoRequest.a_validator_address": + panic(fmt.Errorf("field a_validator_address of message testpb.EchoRequest is not mutable")) + case "testpb.EchoRequest.a_consensus_address": + panic(fmt.Errorf("field a_consensus_address of message testpb.EchoRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoRequest")) @@ -1512,6 +2097,13 @@ func (x *fastReflection_EchoRequest) NewField(fd protoreflect.FieldDescriptor) p case "testpb.EchoRequest.map_string_coin": m := make(map[string]*v1beta1.Coin) return protoreflect.ValueOfMap(&_EchoRequest_35_map{m: &m}) + case "testpb.EchoRequest.a_validator_address": + return protoreflect.ValueOfString("") + case "testpb.EchoRequest.a_consensus_address": + return protoreflect.ValueOfString("") + case "testpb.EchoRequest.coins": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_EchoRequest_38_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoRequest")) @@ -1758,6 +2350,20 @@ func (x *fastReflection_EchoRequest) ProtoMethods() *protoiface.Methods { } } } + l = len(x.AValidatorAddress) + if l > 0 { + n += 2 + l + runtime.Sov(uint64(l)) + } + l = len(x.AConsensusAddress) + if l > 0 { + n += 2 + l + runtime.Sov(uint64(l)) + } + if len(x.Coins) > 0 { + for _, e := range x.Coins { + l = options.Size(e) + n += 2 + l + runtime.Sov(uint64(l)) + } + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1787,6 +2393,42 @@ func (x *fastReflection_EchoRequest) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.Coins) > 0 { + for iNdEx := len(x.Coins) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Coins[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] = 0x2 + i-- + dAtA[i] = 0xb2 + } + } + if len(x.AConsensusAddress) > 0 { + i -= len(x.AConsensusAddress) + copy(dAtA[i:], x.AConsensusAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AConsensusAddress))) + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0xaa + } + if len(x.AValidatorAddress) > 0 { + i -= len(x.AValidatorAddress) + copy(dAtA[i:], x.AValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AValidatorAddress))) + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0xa2 + } if len(x.MapStringCoin) > 0 { MaRsHaLmAp := func(k string, v *v1beta1.Coin) (protoiface.MarshalOutput, error) { baseI := i @@ -3423,532 +4065,115 @@ func (x *fastReflection_EchoRequest) ProtoMethods() *protoiface.Methods { 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.MapStringCoin == nil { - x.MapStringCoin = make(map[string]*v1beta1.Coin) - } - var mapkey string - var mapvalue *v1beta1.Coin - 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 = &v1beta1.Coin{} - 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.MapStringCoin[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, - } -} - -var ( - md_AMessage protoreflect.MessageDescriptor - fd_AMessage_bar protoreflect.FieldDescriptor - fd_AMessage_baz protoreflect.FieldDescriptor -) - -func init() { - file_testpb_query_proto_init() - md_AMessage = File_testpb_query_proto.Messages().ByName("AMessage") - fd_AMessage_bar = md_AMessage.Fields().ByName("bar") - fd_AMessage_baz = md_AMessage.Fields().ByName("baz") -} - -var _ protoreflect.Message = (*fastReflection_AMessage)(nil) - -type fastReflection_AMessage AMessage - -func (x *AMessage) ProtoReflect() protoreflect.Message { - return (*fastReflection_AMessage)(x) -} - -func (x *AMessage) slowProtoReflect() protoreflect.Message { - mi := &file_testpb_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_AMessage_messageType fastReflection_AMessage_messageType -var _ protoreflect.MessageType = fastReflection_AMessage_messageType{} - -type fastReflection_AMessage_messageType struct{} - -func (x fastReflection_AMessage_messageType) Zero() protoreflect.Message { - return (*fastReflection_AMessage)(nil) -} -func (x fastReflection_AMessage_messageType) New() protoreflect.Message { - return new(fastReflection_AMessage) -} -func (x fastReflection_AMessage_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AMessage -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_AMessage) Descriptor() protoreflect.MessageDescriptor { - return md_AMessage -} - -// 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_AMessage) Type() protoreflect.MessageType { - return _fastReflection_AMessage_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_AMessage) New() protoreflect.Message { - return new(fastReflection_AMessage) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_AMessage) Interface() protoreflect.ProtoMessage { - return (*AMessage)(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_AMessage) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Bar != "" { - value := protoreflect.ValueOfString(x.Bar) - if !f(fd_AMessage_bar, value) { - return - } - } - if x.Baz != int32(0) { - value := protoreflect.ValueOfInt32(x.Baz) - if !f(fd_AMessage_baz, 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_AMessage) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testpb.AMessage.bar": - return x.Bar != "" - case "testpb.AMessage.baz": - return x.Baz != int32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) - } - panic(fmt.Errorf("message testpb.AMessage 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_AMessage) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testpb.AMessage.bar": - x.Bar = "" - case "testpb.AMessage.baz": - x.Baz = int32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) - } - panic(fmt.Errorf("message testpb.AMessage 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_AMessage) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testpb.AMessage.bar": - value := x.Bar - return protoreflect.ValueOfString(value) - case "testpb.AMessage.baz": - value := x.Baz - return protoreflect.ValueOfInt32(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) - } - panic(fmt.Errorf("message testpb.AMessage 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_AMessage) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testpb.AMessage.bar": - x.Bar = value.Interface().(string) - case "testpb.AMessage.baz": - x.Baz = int32(value.Int()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) - } - panic(fmt.Errorf("message testpb.AMessage 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_AMessage) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testpb.AMessage.bar": - panic(fmt.Errorf("field bar of message testpb.AMessage is not mutable")) - case "testpb.AMessage.baz": - panic(fmt.Errorf("field baz of message testpb.AMessage is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) - } - panic(fmt.Errorf("message testpb.AMessage 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_AMessage) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testpb.AMessage.bar": - return protoreflect.ValueOfString("") - case "testpb.AMessage.baz": - return protoreflect.ValueOfInt32(int32(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) - } - panic(fmt.Errorf("message testpb.AMessage 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_AMessage) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testpb.AMessage", 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_AMessage) 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_AMessage) 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_AMessage) 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_AMessage) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AMessage) - 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.Bar) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Baz != 0 { - n += 1 + runtime.Sov(uint64(x.Baz)) - } - 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().(*AMessage) - 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.Baz != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Baz)) - i-- - dAtA[i] = 0x10 - } - if len(x.Bar) > 0 { - i -= len(x.Bar) - copy(dAtA[i:], x.Bar) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bar))) - 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().(*AMessage) - 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 postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - if iNdEx >= l { + if postIndex > 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 + if x.MapStringCoin == nil { + x.MapStringCoin = make(map[string]*v1beta1.Coin) } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + var mapkey string + var mapvalue *v1beta1.Coin + 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 = &v1beta1.Coin{} + 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.MapStringCoin[mapkey] = mapvalue + iNdEx = postIndex + case 36: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Bar", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AValidatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3976,13 +4201,13 @@ func (x *fastReflection_AMessage) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Bar = string(dAtA[iNdEx:postIndex]) + x.AValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Baz", wireType) + case 37: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AConsensusAddress", wireType) } - x.Baz = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -3992,11 +4217,58 @@ func (x *fastReflection_AMessage) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.Baz |= int32(b&0x7F) << shift + 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.AConsensusAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 38: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Coins", 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.Coins = append(x.Coins, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Coins[len(x.Coins)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -4535,6 +4807,49 @@ func (Enum) EnumDescriptor() ([]byte, []int) { return file_testpb_query_proto_rawDescGZIP(), []int{0} } +type AMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bar string `protobuf:"bytes,1,opt,name=bar,proto3" json:"bar,omitempty"` + Baz int32 `protobuf:"varint,2,opt,name=baz,proto3" json:"baz,omitempty"` +} + +func (x *AMessage) Reset() { + *x = AMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_testpb_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AMessage) ProtoMessage() {} + +// Deprecated: Use AMessage.ProtoReflect.Descriptor instead. +func (*AMessage) Descriptor() ([]byte, []int) { + return file_testpb_query_proto_rawDescGZIP(), []int{0} +} + +func (x *AMessage) GetBar() string { + if x != nil { + return x.Bar + } + return "" +} + +func (x *AMessage) GetBaz() int32 { + if x != nil { + return x.Baz + } + return 0 +} + type EchoRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4570,12 +4885,15 @@ type EchoRequest struct { MapStringString map[string]string `protobuf:"bytes,33,rep,name=map_string_string,json=mapStringString,proto3" json:"map_string_string,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` MapStringUint32 map[string]uint32 `protobuf:"bytes,34,rep,name=map_string_uint32,json=mapStringUint32,proto3" json:"map_string_uint32,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` MapStringCoin map[string]*v1beta1.Coin `protobuf:"bytes,35,rep,name=map_string_coin,json=mapStringCoin,proto3" json:"map_string_coin,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + AValidatorAddress string `protobuf:"bytes,36,opt,name=a_validator_address,json=aValidatorAddress,proto3" json:"a_validator_address,omitempty"` + AConsensusAddress string `protobuf:"bytes,37,opt,name=a_consensus_address,json=aConsensusAddress,proto3" json:"a_consensus_address,omitempty"` + Coins []*v1beta1.Coin `protobuf:"bytes,38,rep,name=coins,proto3" json:"coins,omitempty"` } func (x *EchoRequest) Reset() { *x = EchoRequest{} if protoimpl.UnsafeEnabled { - mi := &file_testpb_query_proto_msgTypes[0] + mi := &file_testpb_query_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4589,7 +4907,7 @@ func (*EchoRequest) ProtoMessage() {} // Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead. func (*EchoRequest) Descriptor() ([]byte, []int) { - return file_testpb_query_proto_rawDescGZIP(), []int{0} + return file_testpb_query_proto_rawDescGZIP(), []int{1} } func (x *EchoRequest) GetU32() uint32 { @@ -4795,47 +5113,25 @@ func (x *EchoRequest) GetMapStringCoin() map[string]*v1beta1.Coin { return nil } -type AMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Bar string `protobuf:"bytes,1,opt,name=bar,proto3" json:"bar,omitempty"` - Baz int32 `protobuf:"varint,2,opt,name=baz,proto3" json:"baz,omitempty"` -} - -func (x *AMessage) Reset() { - *x = AMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_testpb_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *EchoRequest) GetAValidatorAddress() string { + if x != nil { + return x.AValidatorAddress } + return "" } -func (x *AMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AMessage) ProtoMessage() {} - -// Deprecated: Use AMessage.ProtoReflect.Descriptor instead. -func (*AMessage) Descriptor() ([]byte, []int) { - return file_testpb_query_proto_rawDescGZIP(), []int{1} -} - -func (x *AMessage) GetBar() string { +func (x *EchoRequest) GetAConsensusAddress() string { if x != nil { - return x.Bar + return x.AConsensusAddress } return "" } -func (x *AMessage) GetBaz() int32 { +func (x *EchoRequest) GetCoins() []*v1beta1.Coin { if x != nil { - return x.Baz + return x.Coins } - return 0 + return nil } type EchoResponse struct { @@ -4888,7 +5184,10 @@ var file_testpb_query_proto_rawDesc = []byte{ 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd1, 0x0b, 0x0a, 0x0b, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2e, 0x0a, 0x08, 0x41, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x10, 0x0a, 0x03, 0x62, 0x61, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x62, + 0x61, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x61, 0x7a, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x03, 0x62, 0x61, 0x7a, 0x22, 0xa8, 0x0d, 0x0a, 0x0b, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x33, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x75, 0x33, 0x32, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x36, 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x75, 0x36, 0x34, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x74, 0x72, 0x18, @@ -4967,47 +5266,58 @@ var file_testpb_query_proto_rawDesc = []byte{ 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x69, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x43, - 0x6f, 0x69, 0x6e, 0x1a, 0x42, 0x0a, 0x14, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42, 0x0a, 0x14, 0x4d, 0x61, 0x70, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5b, 0x0a, 0x12, 0x4d, - 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x69, 0x6e, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2e, 0x0a, 0x08, 0x41, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x61, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x62, 0x61, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x61, 0x7a, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x03, 0x62, 0x61, 0x7a, 0x22, 0x3d, 0x0a, 0x0c, 0x45, 0x63, 0x68, 0x6f, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, - 0x70, 0x62, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2a, 0x64, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, - 0x14, 0x0a, 0x10, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x4f, 0x4e, - 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x54, 0x57, 0x4f, 0x10, - 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x46, 0x49, 0x56, 0x45, 0x10, 0x05, - 0x12, 0x1b, 0x0a, 0x0e, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x4e, 0x45, 0x47, 0x5f, 0x54, 0x48, 0x52, - 0x45, 0x45, 0x10, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x32, 0x3a, 0x0a, - 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x31, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x13, - 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x63, 0x68, - 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x88, 0x01, 0x0a, 0x0a, 0x63, 0x6f, - 0x6d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x32, 0x2f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0xa2, 0x02, - 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0xca, 0x02, 0x06, - 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0xe2, 0x02, 0x12, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, 0x54, 0x65, - 0x73, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x69, 0x6e, 0x12, 0x51, 0x0a, 0x13, 0x61, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x11, 0x61, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x51, 0x0a, 0x13, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x25, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x11, 0x61, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, + 0x75, 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x63, 0x6f, 0x69, + 0x6e, 0x73, 0x18, 0x26, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, + 0x6f, 0x69, 0x6e, 0x52, 0x05, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x1a, 0x42, 0x0a, 0x14, 0x4d, 0x61, + 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42, + 0x0a, 0x14, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x55, 0x69, 0x6e, 0x74, 0x33, + 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x1a, 0x5b, 0x0a, 0x12, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x43, + 0x6f, 0x69, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x3d, 0x0a, 0x0c, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2d, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2a, 0x64, + 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, + 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x4e, + 0x55, 0x4d, 0x5f, 0x54, 0x57, 0x4f, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x4e, 0x55, 0x4d, + 0x5f, 0x46, 0x49, 0x56, 0x45, 0x10, 0x05, 0x12, 0x1b, 0x0a, 0x0e, 0x45, 0x4e, 0x55, 0x4d, 0x5f, + 0x4e, 0x45, 0x47, 0x5f, 0x54, 0x48, 0x52, 0x45, 0x45, 0x10, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x01, 0x32, 0x3a, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x31, 0x0a, + 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x45, + 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x74, 0x65, 0x73, + 0x74, 0x70, 0x62, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0x88, 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x42, + 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, + 0x65, 0x73, 0x74, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x54, 0x65, + 0x73, 0x74, 0x70, 0x62, 0xca, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0xe2, 0x02, 0x12, + 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -5026,8 +5336,8 @@ var file_testpb_query_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_testpb_query_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_testpb_query_proto_goTypes = []interface{}{ (Enum)(0), // 0: testpb.Enum - (*EchoRequest)(nil), // 1: testpb.EchoRequest - (*AMessage)(nil), // 2: testpb.AMessage + (*AMessage)(nil), // 1: testpb.AMessage + (*EchoRequest)(nil), // 2: testpb.EchoRequest (*EchoResponse)(nil), // 3: testpb.EchoResponse nil, // 4: testpb.EchoRequest.MapStringStringEntry nil, // 5: testpb.EchoRequest.MapStringUint32Entry @@ -5041,25 +5351,26 @@ var file_testpb_query_proto_depIdxs = []int32{ 7, // 0: testpb.EchoRequest.timestamp:type_name -> google.protobuf.Timestamp 8, // 1: testpb.EchoRequest.duration:type_name -> google.protobuf.Duration 0, // 2: testpb.EchoRequest.an_enum:type_name -> testpb.Enum - 2, // 3: testpb.EchoRequest.a_message:type_name -> testpb.AMessage + 1, // 3: testpb.EchoRequest.a_message:type_name -> testpb.AMessage 9, // 4: testpb.EchoRequest.a_coin:type_name -> cosmos.base.v1beta1.Coin 10, // 5: testpb.EchoRequest.page:type_name -> cosmos.base.query.v1beta1.PageRequest 0, // 6: testpb.EchoRequest.enums:type_name -> testpb.Enum 8, // 7: testpb.EchoRequest.durations:type_name -> google.protobuf.Duration - 2, // 8: testpb.EchoRequest.some_messages:type_name -> testpb.AMessage + 1, // 8: testpb.EchoRequest.some_messages:type_name -> testpb.AMessage 9, // 9: testpb.EchoRequest.positional3_varargs:type_name -> cosmos.base.v1beta1.Coin 4, // 10: testpb.EchoRequest.map_string_string:type_name -> testpb.EchoRequest.MapStringStringEntry 5, // 11: testpb.EchoRequest.map_string_uint32:type_name -> testpb.EchoRequest.MapStringUint32Entry 6, // 12: testpb.EchoRequest.map_string_coin:type_name -> testpb.EchoRequest.MapStringCoinEntry - 1, // 13: testpb.EchoResponse.request:type_name -> testpb.EchoRequest - 9, // 14: testpb.EchoRequest.MapStringCoinEntry.value:type_name -> cosmos.base.v1beta1.Coin - 1, // 15: testpb.Query.Echo:input_type -> testpb.EchoRequest - 3, // 16: testpb.Query.Echo:output_type -> testpb.EchoResponse - 16, // [16:17] is the sub-list for method output_type - 15, // [15:16] is the sub-list for method input_type - 15, // [15:15] is the sub-list for extension type_name - 15, // [15:15] is the sub-list for extension extendee - 0, // [0:15] is the sub-list for field type_name + 9, // 13: testpb.EchoRequest.coins:type_name -> cosmos.base.v1beta1.Coin + 2, // 14: testpb.EchoResponse.request:type_name -> testpb.EchoRequest + 9, // 15: testpb.EchoRequest.MapStringCoinEntry.value:type_name -> cosmos.base.v1beta1.Coin + 2, // 16: testpb.Query.Echo:input_type -> testpb.EchoRequest + 3, // 17: testpb.Query.Echo:output_type -> testpb.EchoResponse + 17, // [17:18] is the sub-list for method output_type + 16, // [16:17] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name } func init() { file_testpb_query_proto_init() } @@ -5069,7 +5380,7 @@ func file_testpb_query_proto_init() { } if !protoimpl.UnsafeEnabled { file_testpb_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EchoRequest); i { + switch v := v.(*AMessage); i { case 0: return &v.state case 1: @@ -5081,7 +5392,7 @@ func file_testpb_query_proto_init() { } } file_testpb_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AMessage); i { + switch v := v.(*EchoRequest); i { case 0: return &v.state case 1: diff --git a/client/v2/internal/testpb/query_grpc.pb.go b/client/v2/internal/testpb/query_grpc.pb.go index 56d177ddc86f..9f444b76c729 100644 --- a/client/v2/internal/testpb/query_grpc.pb.go +++ b/client/v2/internal/testpb/query_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: testpb/query.proto @@ -18,6 +18,10 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + Query_Echo_FullMethodName = "/testpb.Query/Echo" +) + // 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. @@ -36,7 +40,7 @@ func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { func (c *queryClient) Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) { out := new(EchoResponse) - err := c.cc.Invoke(ctx, "/testpb.Query/Echo", in, out, opts...) + err := c.cc.Invoke(ctx, Query_Echo_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -82,7 +86,7 @@ func _Query_Echo_Handler(srv interface{}, ctx context.Context, dec func(interfac } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/testpb.Query/Echo", + FullMethod: Query_Echo_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Echo(ctx, req.(*EchoRequest)) diff --git a/client/v2/internal/util/util.go b/client/v2/internal/util/util.go index d37c023a8706..ed82d3973c30 100644 --- a/client/v2/internal/util/util.go +++ b/client/v2/internal/util/util.go @@ -1,6 +1,12 @@ package util import ( + "regexp" + "runtime/debug" + "strings" + + cosmos_proto "github.com/cosmos/cosmos-proto" + "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" "google.golang.org/protobuf/types/dynamicpb" @@ -8,19 +14,17 @@ import ( "cosmossdk.io/client/v2/internal/strcase" ) +// get build info to verify later if comment is supported +// this is a hack in because of the global api module package +// later versions unsupported by the current version can be added +var buildInfo, _ = debug.ReadBuildInfo() + +// DescriptorName returns the name of the descriptor in kebab case. func DescriptorKebabName(descriptor protoreflect.Descriptor) string { return strcase.ToKebab(string(descriptor.Name())) } -func DescriptorDocs(descriptor protoreflect.Descriptor) string { - return descriptor.ParentFile().SourceLocations().ByDescriptor(descriptor).LeadingComments -} - func ResolveMessageType(resolver protoregistry.MessageTypeResolver, descriptor protoreflect.MessageDescriptor) protoreflect.MessageType { - if resolver == nil { - resolver = protoregistry.GlobalTypes - } - typ, err := resolver.FindMessageByName(descriptor.FullName()) if err == nil { return typ @@ -28,3 +32,65 @@ func ResolveMessageType(resolver protoregistry.MessageTypeResolver, descriptor p return dynamicpb.NewMessageType(descriptor) } + +// IsSupportedVersion is used to determine in which version of a module / sdk a rpc was introduced. +// It returns false if the rpc has comment for an higher version than the current one. +// It returns true if the method descriptor contains no annotation. +func IsSupportedVersion(methodDesc protoreflect.MethodDescriptor) bool { + return isSupportedVersion(methodDesc, buildInfo) +} + +// isSupportedVersion is used to determine in which version of a module / sdk a rpc was introduced. +// It returns false if the rpc has comment for an higher version than the current one. +// It returns true if the method descriptor contains no annotation. +// It takes a buildInfo as argument to be able to test it. +func isSupportedVersion(methodDesc protoreflect.MethodDescriptor, buildInfo *debug.BuildInfo) bool { + hasVersion := proto.HasExtension(methodDesc.Options(), cosmos_proto.E_MethodAddedIn) + if !hasVersion || buildInfo == nil || len(buildInfo.Deps) == 0 { + return true + } + + version := proto.GetExtension(methodDesc.Options(), cosmos_proto.E_MethodAddedIn).(string) + moduleName, version := parseVersion(version) + if moduleName == "" || version == "" { + return true // if no comment consider it's supported + } + + for _, dep := range buildInfo.Deps { + if !strings.Contains(dep.Path, moduleName) { + continue + } + + return version <= dep.Version + } + + // if cannot find the module consider it isn't supported + // for instance the x/gov module wasn't extracted in v0.50 + // so it isn't present in the build info, however, that means + // it isn't supported in v0.50. + return false +} + +var sinceCommentRegex = regexp.MustCompile(`(\S+) (\S+)`) + +// parseVersion parses the `cosmos-sdk v0.xx` comment on rpc. +func parseVersion(input string) (string, string) { + var ( + moduleName string + version string + ) + + input = strings.ToLower(input) + input = strings.ReplaceAll(input, "cosmos sdk", "cosmos-sdk") + + matches := sinceCommentRegex.FindStringSubmatch(input) + if len(matches) >= 3 { + moduleName, version = strings.TrimPrefix(matches[1], "x/"), matches[2] + + if !strings.HasPrefix(version, "v") { + version = "v" + version + } + } + + return moduleName, version +} diff --git a/client/v2/internal/util/util_test.go b/client/v2/internal/util/util_test.go new file mode 100644 index 000000000000..60a713ed2143 --- /dev/null +++ b/client/v2/internal/util/util_test.go @@ -0,0 +1,125 @@ +package util + +import ( + "runtime/debug" + "testing" + + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" + + _ "cosmossdk.io/client/v2/internal/testpb" +) + +func TestIsSupportedVersion(t *testing.T) { + mockBuildInfo := &debug.BuildInfo{ + Deps: []*debug.Module{ + { + Path: "github.com/cosmos/cosmos-sdk", + Version: "v0.50.0", + }, + { + Path: "cosmossdk.io/feegrant", + Version: "v0.1.0", + }, + }, + } + + cases := []struct { + messageName string + expected bool + }{ + { + messageName: "testpb.Msg.Send", + expected: true, + }, + { + messageName: "testpb.Query.Echo", + expected: true, + }, + { + messageName: "testpb.Msg.Clawback", + expected: false, + }, + } + + for _, tc := range cases { + t.Run(tc.messageName, func(t *testing.T) { + desc, err := protoregistry.GlobalFiles.FindDescriptorByName(protoreflect.FullName(tc.messageName)) + if err != nil { + t.Fatal(err) + } + + methodDesc := desc.(protoreflect.MethodDescriptor) + isSupported := isSupportedVersion(methodDesc, mockBuildInfo) + if isSupported != tc.expected { + t.Errorf("expected %v, got %v for %s", tc.expected, isSupported, methodDesc.FullName()) + } + }) + } +} + +func TestParseVersion(t *testing.T) { + cases := []struct { + input string + expectedModuleName string + expectedVersion string + }{ + { + input: "", + expectedModuleName: "", + expectedVersion: "", + }, + { + input: "Cosmos SDK 0.50", + expectedModuleName: "cosmos-sdk", + expectedVersion: "v0.50", + }, + { + input: "cosmos sdk 0.50", + expectedModuleName: "cosmos-sdk", + expectedVersion: "v0.50", + }, + { + input: "Cosmos-SDK 0.50", + expectedModuleName: "cosmos-sdk", + expectedVersion: "v0.50", + }, + { + input: "cosmos-sdk v0.50", + expectedModuleName: "cosmos-sdk", + expectedVersion: "v0.50", + }, + { + input: "cosmos-sdk v0.50.1", + expectedModuleName: "cosmos-sdk", + expectedVersion: "v0.50.1", + }, + { + input: "cosmos-sdk 0.47.0-veronica", + expectedModuleName: "cosmos-sdk", + expectedVersion: "v0.47.0-veronica", + }, + { + input: "x/feegrant v0.1.0", + expectedModuleName: "feegrant", + expectedVersion: "v0.1.0", + }, + { + input: "x/feegrant 0.1", + expectedModuleName: "feegrant", + expectedVersion: "v0.1", + }, + } + + for _, tc := range cases { + t.Run(tc.input, func(t *testing.T) { + moduleName, version := parseVersion(tc.input) + if moduleName != tc.expectedModuleName { + t.Errorf("expected module name %s, got %s", tc.expectedModuleName, moduleName) + } + if version != tc.expectedVersion { + t.Errorf("expected version %s, got %s", tc.expectedVersion, version) + } + }) + } +} diff --git a/codec/address/bech32_codec.go b/codec/address/bech32_codec.go index aaac921f35e2..45e9d2c01177 100644 --- a/codec/address/bech32_codec.go +++ b/codec/address/bech32_codec.go @@ -46,6 +46,10 @@ func (bc Bech32Codec) StringToBytes(text string) ([]byte, error) { // BytesToString decodes bytes to text func (bc Bech32Codec) BytesToString(bz []byte) (string, error) { + if len(bz) == 0 { + return "", nil + } + text, err := bech32.ConvertAndEncode(bc.Bech32Prefix, bz) if err != nil { return "", err diff --git a/codec/bench_test.go b/codec/bench_test.go index cb3c821213e1..d5b5fa132dc9 100644 --- a/codec/bench_test.go +++ b/codec/bench_test.go @@ -3,24 +3,35 @@ package codec_test import ( "testing" - bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" "github.com/stretchr/testify/require" protov2 "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/dynamicpb" + bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" + codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" ) +type bankSendWrapper struct { + *banktypes.MsgSend +} + +func (msg bankSendWrapper) GetSigners() []sdk.AccAddress { + fromAddress, _ := sdk.AccAddressFromBech32(msg.FromAddress) + return []sdk.AccAddress{fromAddress} +} + func BenchmarkLegacyGetSigners(b *testing.B) { _, _, addr := testdata.KeyTestPubAddr() - msg := &banktypes.MsgSend{ + msg := bankSendWrapper{&banktypes.MsgSend{ FromAddress: addr.String(), ToAddress: "", Amount: nil, - } + }} b.ResetTimer() for i := 0; i < b.N; i++ { diff --git a/codec/collections.go b/codec/collections.go index 2904475c8b60..cded358c5cc9 100644 --- a/codec/collections.go +++ b/codec/collections.go @@ -4,12 +4,13 @@ import ( "fmt" "reflect" + "github.com/cosmos/gogoproto/proto" gogotypes "github.com/cosmos/gogoproto/types" + "google.golang.org/protobuf/encoding/protojson" + protov2 "google.golang.org/protobuf/proto" "cosmossdk.io/collections" collcodec "cosmossdk.io/collections/codec" - - "github.com/cosmos/gogoproto/proto" ) // BoolValue implements a ValueCodec that saves the bool value @@ -52,10 +53,13 @@ type protoMessage[T any] interface { // CollValue inits a collections.ValueCodec for a generic gogo protobuf message. func CollValue[T any, PT protoMessage[T]](cdc BinaryCodec) collcodec.ValueCodec[T] { - return &collValue[T, PT]{cdc.(Codec)} + return &collValue[T, PT]{cdc.(Codec), proto.MessageName(PT(new(T)))} } -type collValue[T any, PT protoMessage[T]] struct{ cdc Codec } +type collValue[T any, PT protoMessage[T]] struct { + cdc Codec + messageName string +} func (c collValue[T, PT]) Encode(value T) ([]byte, error) { return c.cdc.Marshal(PT(&value)) @@ -80,7 +84,52 @@ func (c collValue[T, PT]) Stringify(value T) string { } func (c collValue[T, PT]) ValueType() string { - return "gogoproto/" + proto.MessageName(PT(new(T))) + return "github.com/cosmos/gogoproto/" + c.messageName +} + +type protoMessageV2[T any] interface { + *T + protov2.Message +} + +// CollValueV2 is used for protobuf values of the newest google.golang.org/protobuf API. +func CollValueV2[T any, PT protoMessageV2[T]]() collcodec.ValueCodec[PT] { + return &collValue2[T, PT]{ + messageName: string(PT(new(T)).ProtoReflect().Descriptor().FullName()), + } +} + +type collValue2[T any, PT protoMessageV2[T]] struct { + messageName string +} + +func (c collValue2[T, PT]) Encode(value PT) ([]byte, error) { + protov2MarshalOpts := protov2.MarshalOptions{Deterministic: true} + return protov2MarshalOpts.Marshal(value) +} + +func (c collValue2[T, PT]) Decode(b []byte) (PT, error) { + var value T + err := protov2.Unmarshal(b, PT(&value)) + return &value, err +} + +func (c collValue2[T, PT]) EncodeJSON(value PT) ([]byte, error) { + return protojson.Marshal(value) +} + +func (c collValue2[T, PT]) DecodeJSON(b []byte) (PT, error) { + var value T + err := protojson.Unmarshal(b, PT(&value)) + return &value, err +} + +func (c collValue2[T, PT]) Stringify(value PT) string { + return fmt.Sprintf("%v", value) +} + +func (c collValue2[T, PT]) ValueType() string { + return "google.golang.org/protobuf/" + c.messageName } // CollInterfaceValue instantiates a new collections.ValueCodec for a generic diff --git a/codec/collections_test.go b/codec/collections_test.go index 9e8ef18afa18..5aff0e0e06df 100644 --- a/codec/collections_test.go +++ b/codec/collections_test.go @@ -3,14 +3,17 @@ package codec_test import ( "testing" - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/testutil/testdata" - + gogotypes "github.com/cosmos/gogoproto/types" + "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/require" + "google.golang.org/protobuf/testing/protocmp" + "google.golang.org/protobuf/types/known/wrapperspb" "cosmossdk.io/collections/colltest" + + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - gogotypes "github.com/cosmos/gogoproto/types" + "github.com/cosmos/cosmos-sdk/testutil/testdata" ) func TestCollectionsCorrectness(t *testing.T) { @@ -21,6 +24,28 @@ func TestCollectionsCorrectness(t *testing.T) { }) }) + t.Run("CollValueV2", func(t *testing.T) { + // NOTE: we cannot use colltest.TestValueCodec because protov2 has different + // compare semantics than protov1. We need to use protocmp.Transform() alongside + // cmp to ensure equality. + encoder := codec.CollValueV2[wrapperspb.UInt64Value]() + value := &wrapperspb.UInt64Value{Value: 500} + encodedValue, err := encoder.Encode(value) + require.NoError(t, err) + decodedValue, err := encoder.Decode(encodedValue) + require.NoError(t, err) + require.True(t, cmp.Equal(value, decodedValue, protocmp.Transform()), "encoding and decoding produces different values") + + encodedJSONValue, err := encoder.EncodeJSON(value) + require.NoError(t, err) + decodedJSONValue, err := encoder.DecodeJSON(encodedJSONValue) + require.NoError(t, err) + require.True(t, cmp.Equal(value, decodedJSONValue, protocmp.Transform()), "encoding and decoding produces different values") + require.NotEmpty(t, encoder.ValueType()) + + _ = encoder.Stringify(value) + }) + t.Run("BoolValue", func(t *testing.T) { colltest.TestValueCodec(t, codec.BoolValue, true) colltest.TestValueCodec(t, codec.BoolValue, false) diff --git a/codec/legacy/amino_msg_test.go b/codec/legacy/amino_msg_test.go index c38317020e76..ac13f5a1b8c9 100644 --- a/codec/legacy/amino_msg_test.go +++ b/codec/legacy/amino_msg_test.go @@ -4,10 +4,11 @@ import ( "strings" "testing" + "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/legacy" "github.com/cosmos/cosmos-sdk/testutil/testdata" - "github.com/stretchr/testify/require" ) func TestRegisterAminoMsg(t *testing.T) { diff --git a/codec/proto_codec.go b/codec/proto_codec.go index b66c0f348a09..11fa7859c1c1 100644 --- a/codec/proto_codec.go +++ b/codec/proto_codec.go @@ -2,7 +2,6 @@ package codec import ( "encoding/binary" - "encoding/json" "errors" "fmt" "strings" @@ -24,9 +23,9 @@ import ( // ProtoCodecMarshaler defines an interface for codecs that utilize Protobuf for both // binary and JSON encoding. +// Deprecated: Use Codec instead. type ProtoCodecMarshaler interface { Codec - InterfaceRegistry() types.InterfaceRegistry } // ProtoCodec defines a codec that utilizes Protobuf for both binary and JSON @@ -35,10 +34,7 @@ type ProtoCodec struct { interfaceRegistry types.InterfaceRegistry } -var ( - _ Codec = &ProtoCodec{} - _ ProtoCodecMarshaler = &ProtoCodec{} -) +var _ Codec = (*ProtoCodec)(nil) // NewProtoCodec returns a reference to a new ProtoCodec func NewProtoCodec(interfaceRegistry types.InterfaceRegistry) *ProtoCodec { @@ -194,27 +190,7 @@ func (pc *ProtoCodec) MarshalAminoJSON(msg gogoproto.Message) ([]byte, error) { if err != nil { return nil, err } - jsonBytes, err := encoder.Marshal(protoMsg) - if err != nil { - return nil, err - } - // TODO: remove this sort once https://github.com/cosmos/cosmos-sdk/issues/2350#issuecomment-1542715157 lands - // the encoder should be rendering in lexical order - return sortJSON(jsonBytes) -} - -// sortJSON sorts the JSON keys of the given JSON encoded byte slice. -func sortJSON(toSortJSON []byte) ([]byte, error) { - var c interface{} - err := json.Unmarshal(toSortJSON, &c) - if err != nil { - return nil, err - } - js, err := json.Marshal(c) - if err != nil { - return nil, err - } - return js, nil + return encoder.Marshal(protoMsg) } // UnmarshalJSON implements JSONCodec.UnmarshalJSON method, @@ -369,7 +345,8 @@ type grpcProtoCodec struct { func (g grpcProtoCodec) Marshal(v interface{}) ([]byte, error) { switch m := v.(type) { case proto.Message: - return proto.Marshal(m) + protov2MarshalOpts := proto.MarshalOptions{Deterministic: true} + return protov2MarshalOpts.Marshal(m) case gogoproto.Message: return g.cdc.Marshal(m) default: diff --git a/codec/proto_codec_test.go b/codec/proto_codec_test.go index d5ade07f6e0a..95236a472d92 100644 --- a/codec/proto_codec_test.go +++ b/codec/proto_codec_test.go @@ -5,9 +5,6 @@ import ( "reflect" "testing" - bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" - basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" - "cosmossdk.io/x/tx/signing" "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" @@ -16,6 +13,11 @@ import ( protov2 "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoregistry" + bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" + basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + sdkmath "cosmossdk.io/math" + "cosmossdk.io/x/tx/signing" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" @@ -190,7 +192,7 @@ func TestGetSigners(t *testing.T) { testAddr2 := sdk.AccAddress("test2") testAddrStr2 := testAddr2.String() - msgSendV1 := banktypes.NewMsgSend(testAddr, testAddr2, sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(1)))) + msgSendV1 := banktypes.NewMsgSend(testAddr, testAddr2, sdk.NewCoins(sdk.NewCoin("foo", sdkmath.NewInt(1)))) msgSendV2 := &bankv1beta1.MsgSend{ FromAddress: testAddrStr, ToAddress: testAddrStr2, diff --git a/codec/testutil/codec.go b/codec/testutil/codec.go index 971994c3d731..4887aa2727b5 100644 --- a/codec/testutil/codec.go +++ b/codec/testutil/codec.go @@ -1,9 +1,10 @@ package testutil import ( - "cosmossdk.io/x/tx/signing" "github.com/cosmos/gogoproto/proto" + "cosmossdk.io/x/tx/signing" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/address" codectypes "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/codec/types/any.go b/codec/types/any.go index 334bed746380..bef5441fd170 100644 --- a/codec/types/any.go +++ b/codec/types/any.go @@ -4,6 +4,7 @@ import ( fmt "fmt" "github.com/cosmos/gogoproto/proto" + protov2 "google.golang.org/protobuf/proto" errorsmod "cosmossdk.io/errors" @@ -63,13 +64,22 @@ func NewAnyWithValue(v proto.Message) (*Any, error) { return nil, errorsmod.Wrap(sdkerrors.ErrPackAny, "Expecting non nil value to create a new Any") } - bz, err := proto.Marshal(v) + var ( + bz []byte + err error + ) + if msg, ok := v.(protov2.Message); ok { + protov2MarshalOpts := protov2.MarshalOptions{Deterministic: true} + bz, err = protov2MarshalOpts.Marshal(msg) + } else { + bz, err = proto.Marshal(v) + } if err != nil { return nil, err } return &Any{ - TypeUrl: "/" + proto.MessageName(v), + TypeUrl: MsgTypeURL(v), Value: bz, cachedValue: v, }, nil @@ -94,8 +104,18 @@ func UnsafePackAny(x interface{}) *Any { // the packed value so that it can be retrieved from GetCachedValue without // unmarshaling func (any *Any) pack(x proto.Message) error { - any.TypeUrl = "/" + proto.MessageName(x) - bz, err := proto.Marshal(x) + any.TypeUrl = MsgTypeURL(x) + + var ( + bz []byte + err error + ) + if msg, ok := x.(protov2.Message); ok { + protov2MarshalOpts := protov2.MarshalOptions{Deterministic: true} + bz, err = protov2MarshalOpts.Marshal(msg) + } else { + bz, err = proto.Marshal(x) + } if err != nil { return err } diff --git a/codec/types/compat.go b/codec/types/compat.go index 3b669385624f..080ca321c72e 100644 --- a/codec/types/compat.go +++ b/codec/types/compat.go @@ -7,7 +7,6 @@ import ( "github.com/cosmos/gogoproto/jsonpb" "github.com/cosmos/gogoproto/proto" - amino "github.com/tendermint/go-amino" ) diff --git a/codec/types/interface_registry.go b/codec/types/interface_registry.go index 50a5ca01c126..daf08a00401c 100644 --- a/codec/types/interface_registry.go +++ b/codec/types/interface_registry.go @@ -187,7 +187,7 @@ func (registry *interfaceRegistry) EnsureRegistered(impl interface{}) error { // same typeURL. func (registry *interfaceRegistry) RegisterImplementations(iface interface{}, impls ...proto.Message) { for _, impl := range impls { - typeURL := "/" + proto.MessageName(impl) + typeURL := MsgTypeURL(impl) registry.registerImpl(iface, typeURL, impl) } } diff --git a/codec/types/util.go b/codec/types/util.go new file mode 100644 index 000000000000..b29fb33b5034 --- /dev/null +++ b/codec/types/util.go @@ -0,0 +1,15 @@ +package types + +import ( + "github.com/cosmos/gogoproto/proto" + protov2 "google.golang.org/protobuf/proto" +) + +// MsgTypeURL returns the TypeURL of a `sdk.Msg`. +func MsgTypeURL(msg proto.Message) string { + if m, ok := msg.(protov2.Message); ok { + return "/" + string(m.ProtoReflect().Descriptor().FullName()) + } + + return "/" + proto.MessageName(msg) +} diff --git a/codec/unknownproto/unknown_fields.go b/codec/unknownproto/unknown_fields.go index 320afc4a657a..9dda4e629b4b 100644 --- a/codec/unknownproto/unknown_fields.go +++ b/codec/unknownproto/unknown_fields.go @@ -12,8 +12,9 @@ import ( "github.com/cosmos/gogoproto/jsonpb" "github.com/cosmos/gogoproto/proto" - "github.com/cosmos/gogoproto/protoc-gen-gogo/descriptor" "google.golang.org/protobuf/encoding/protowire" + protov2 "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/descriptorpb" "github.com/cosmos/cosmos-sdk/codec/types" ) @@ -68,7 +69,7 @@ func RejectUnknownFields(bz []byte, msg proto.Message, allowUnknownNonCriticals Type: reflect.ValueOf(msg).Type().String(), TagNum: tagNum, GotWireType: wireType, - WantWireType: protowire.Type(fieldDescProto.WireType()), + WantWireType: toProtowireType(fieldDescProto.GetType()), } } @@ -101,14 +102,14 @@ func RejectUnknownFields(bz []byte, msg proto.Message, allowUnknownNonCriticals bz = bz[n:] // An unknown but non-critical field or just a scalar type (aka *INT and BYTES like). - if fieldDescProto == nil || fieldDescProto.IsScalar() { + if fieldDescProto == nil || isScalar(fieldDescProto) { continue } protoMessageName := fieldDescProto.GetTypeName() if protoMessageName == "" { switch typ := fieldDescProto.GetType(); typ { - case descriptor.FieldDescriptorProto_TYPE_STRING, descriptor.FieldDescriptorProto_TYPE_BYTES: + case descriptorpb.FieldDescriptorProto_TYPE_STRING, descriptorpb.FieldDescriptorProto_TYPE_BYTES: // At this point only TYPE_STRING is expected to be unregistered, since FieldDescriptorProto.IsScalar() returns false for // TYPE_BYTES and TYPE_STRING as per // https://github.com/cosmos/gogoproto/blob/5628607bb4c51c3157aacc3a50f0ab707582b805/protoc-gen-gogo/descriptor/descriptor.go#L95-L118 @@ -199,68 +200,68 @@ func protoMessageForTypeName(protoMessageName string) (proto.Message, error) { // checks is a mapping of protowire.Type to supported descriptor.FieldDescriptorProto_Type. // it is implemented this way so as to have constant time lookups and avoid the overhead // from O(n) walking of switch. The change to using this mapping boosts throughput by about 200%. -var checks = [...]map[descriptor.FieldDescriptorProto_Type]bool{ +var checks = [...]map[descriptorpb.FieldDescriptorProto_Type]bool{ // "0 Varint: int32, int64, uint32, uint64, sint32, sint64, bool, enum" 0: { - descriptor.FieldDescriptorProto_TYPE_INT32: true, - descriptor.FieldDescriptorProto_TYPE_INT64: true, - descriptor.FieldDescriptorProto_TYPE_UINT32: true, - descriptor.FieldDescriptorProto_TYPE_UINT64: true, - descriptor.FieldDescriptorProto_TYPE_SINT32: true, - descriptor.FieldDescriptorProto_TYPE_SINT64: true, - descriptor.FieldDescriptorProto_TYPE_BOOL: true, - descriptor.FieldDescriptorProto_TYPE_ENUM: true, + descriptorpb.FieldDescriptorProto_TYPE_INT32: true, + descriptorpb.FieldDescriptorProto_TYPE_INT64: true, + descriptorpb.FieldDescriptorProto_TYPE_UINT32: true, + descriptorpb.FieldDescriptorProto_TYPE_UINT64: true, + descriptorpb.FieldDescriptorProto_TYPE_SINT32: true, + descriptorpb.FieldDescriptorProto_TYPE_SINT64: true, + descriptorpb.FieldDescriptorProto_TYPE_BOOL: true, + descriptorpb.FieldDescriptorProto_TYPE_ENUM: true, }, // "1 64-bit: fixed64, sfixed64, double" 1: { - descriptor.FieldDescriptorProto_TYPE_FIXED64: true, - descriptor.FieldDescriptorProto_TYPE_SFIXED64: true, - descriptor.FieldDescriptorProto_TYPE_DOUBLE: true, + descriptorpb.FieldDescriptorProto_TYPE_FIXED64: true, + descriptorpb.FieldDescriptorProto_TYPE_SFIXED64: true, + descriptorpb.FieldDescriptorProto_TYPE_DOUBLE: true, }, // "2 Length-delimited: string, bytes, embedded messages, packed repeated fields" 2: { - descriptor.FieldDescriptorProto_TYPE_STRING: true, - descriptor.FieldDescriptorProto_TYPE_BYTES: true, - descriptor.FieldDescriptorProto_TYPE_MESSAGE: true, + descriptorpb.FieldDescriptorProto_TYPE_STRING: true, + descriptorpb.FieldDescriptorProto_TYPE_BYTES: true, + descriptorpb.FieldDescriptorProto_TYPE_MESSAGE: true, // The following types can be packed repeated. // ref: "Only repeated fields of primitive numeric types (types which use the varint, 32-bit, or 64-bit wire types) can be declared "packed"." // ref: https://developers.google.com/protocol-buffers/docs/encoding#packed - descriptor.FieldDescriptorProto_TYPE_INT32: true, - descriptor.FieldDescriptorProto_TYPE_INT64: true, - descriptor.FieldDescriptorProto_TYPE_UINT32: true, - descriptor.FieldDescriptorProto_TYPE_UINT64: true, - descriptor.FieldDescriptorProto_TYPE_SINT32: true, - descriptor.FieldDescriptorProto_TYPE_SINT64: true, - descriptor.FieldDescriptorProto_TYPE_BOOL: true, - descriptor.FieldDescriptorProto_TYPE_ENUM: true, - descriptor.FieldDescriptorProto_TYPE_FIXED64: true, - descriptor.FieldDescriptorProto_TYPE_SFIXED64: true, - descriptor.FieldDescriptorProto_TYPE_DOUBLE: true, + descriptorpb.FieldDescriptorProto_TYPE_INT32: true, + descriptorpb.FieldDescriptorProto_TYPE_INT64: true, + descriptorpb.FieldDescriptorProto_TYPE_UINT32: true, + descriptorpb.FieldDescriptorProto_TYPE_UINT64: true, + descriptorpb.FieldDescriptorProto_TYPE_SINT32: true, + descriptorpb.FieldDescriptorProto_TYPE_SINT64: true, + descriptorpb.FieldDescriptorProto_TYPE_BOOL: true, + descriptorpb.FieldDescriptorProto_TYPE_ENUM: true, + descriptorpb.FieldDescriptorProto_TYPE_FIXED64: true, + descriptorpb.FieldDescriptorProto_TYPE_SFIXED64: true, + descriptorpb.FieldDescriptorProto_TYPE_DOUBLE: true, }, // "3 Start group: groups (deprecated)" 3: { - descriptor.FieldDescriptorProto_TYPE_GROUP: true, + descriptorpb.FieldDescriptorProto_TYPE_GROUP: true, }, // "4 End group: groups (deprecated)" 4: { - descriptor.FieldDescriptorProto_TYPE_GROUP: true, + descriptorpb.FieldDescriptorProto_TYPE_GROUP: true, }, // "5 32-bit: fixed32, sfixed32, float" 5: { - descriptor.FieldDescriptorProto_TYPE_FIXED32: true, - descriptor.FieldDescriptorProto_TYPE_SFIXED32: true, - descriptor.FieldDescriptorProto_TYPE_FLOAT: true, + descriptorpb.FieldDescriptorProto_TYPE_FIXED32: true, + descriptorpb.FieldDescriptorProto_TYPE_SFIXED32: true, + descriptorpb.FieldDescriptorProto_TYPE_FLOAT: true, }, } // canEncodeType returns true if the wireType is suitable for encoding the descriptor type. // See https://developers.google.com/protocol-buffers/docs/encoding#structure. -func canEncodeType(wireType protowire.Type, descType descriptor.FieldDescriptorProto_Type) bool { +func canEncodeType(wireType protowire.Type, descType descriptorpb.FieldDescriptorProto_Type) bool { if iwt := int(wireType); iwt < 0 || iwt >= len(checks) { return false } @@ -330,11 +331,11 @@ func (twt *errUnknownField) Error() string { var _ error = (*errUnknownField)(nil) var ( - protoFileToDesc = make(map[string]*descriptor.FileDescriptorProto) + protoFileToDesc = make(map[string]*descriptorpb.FileDescriptorProto) protoFileToDescMu sync.RWMutex ) -func unnestDesc(mdescs []*descriptor.DescriptorProto, indices []int) *descriptor.DescriptorProto { +func unnestDesc(mdescs []*descriptorpb.DescriptorProto, indices []int) *descriptorpb.DescriptorProto { mdesc := mdescs[indices[0]] for _, index := range indices[1:] { mdesc = mdesc.NestedType[index] @@ -342,9 +343,9 @@ func unnestDesc(mdescs []*descriptor.DescriptorProto, indices []int) *descriptor return mdesc } -// Invoking descriptor.ForMessage(proto.Message.(Descriptor).Descriptor()) is incredibly slow +// Invoking descriptorpb.ForMessage(proto.Message.(Descriptor).Descriptor()) is incredibly slow // for every single message, thus the need for a hand-rolled custom version that's performant and cacheable. -func extractFileDescMessageDesc(desc descriptorIface) (*descriptor.FileDescriptorProto, *descriptor.DescriptorProto, error) { +func extractFileDescMessageDesc(desc descriptorIface) (*descriptorpb.FileDescriptorProto, *descriptorpb.DescriptorProto, error) { gzippedPb, indices := desc.Descriptor() protoFileToDescMu.RLock() @@ -365,8 +366,8 @@ func extractFileDescMessageDesc(desc descriptorIface) (*descriptor.FileDescripto return nil, nil, err } - fdesc := new(descriptor.FileDescriptorProto) - if err := proto.Unmarshal(protoBlob, fdesc); err != nil { + fdesc := new(descriptorpb.FileDescriptorProto) + if err := protov2.Unmarshal(protoBlob, fdesc); err != nil { return nil, nil, err } @@ -380,8 +381,8 @@ func extractFileDescMessageDesc(desc descriptorIface) (*descriptor.FileDescripto } type descriptorMatch struct { - cache map[int32]*descriptor.FieldDescriptorProto - desc *descriptor.DescriptorProto + cache map[int32]*descriptorpb.FieldDescriptorProto + desc *descriptorpb.DescriptorProto } var ( @@ -390,7 +391,7 @@ var ( ) // getDescriptorInfo retrieves the mapping of field numbers to their respective field descriptors. -func getDescriptorInfo(desc descriptorIface, msg proto.Message) (map[int32]*descriptor.FieldDescriptorProto, *descriptor.DescriptorProto, error) { +func getDescriptorInfo(desc descriptorIface, msg proto.Message) (map[int32]*descriptorpb.FieldDescriptorProto, *descriptorpb.DescriptorProto, error) { key := reflect.ValueOf(msg).Type() descprotoCacheMu.RLock() @@ -407,7 +408,7 @@ func getDescriptorInfo(desc descriptorIface, msg proto.Message) (map[int32]*desc return nil, nil, err } - tagNumToTypeIndex := make(map[int32]*descriptor.FieldDescriptorProto) + tagNumToTypeIndex := make(map[int32]*descriptorpb.FieldDescriptorProto) for _, field := range md.Field { tagNumToTypeIndex[field.GetNumber()] = field } @@ -441,3 +442,68 @@ func (d DefaultAnyResolver) Resolve(typeURL string) (proto.Message, error) { } return reflect.New(mt.Elem()).Interface().(proto.Message), nil } + +// toProtowireType converts a descriptorpb.FieldDescriptorProto_Type to a protowire.Type. +func toProtowireType(fieldType descriptorpb.FieldDescriptorProto_Type) protowire.Type { + switch fieldType { + // varint encoded + case descriptorpb.FieldDescriptorProto_TYPE_INT64, + descriptorpb.FieldDescriptorProto_TYPE_UINT64, + descriptorpb.FieldDescriptorProto_TYPE_INT32, + descriptorpb.FieldDescriptorProto_TYPE_UINT32, + descriptorpb.FieldDescriptorProto_TYPE_BOOL, + descriptorpb.FieldDescriptorProto_TYPE_ENUM, + descriptorpb.FieldDescriptorProto_TYPE_SINT32, + descriptorpb.FieldDescriptorProto_TYPE_SINT64: + return protowire.VarintType + + // fixed64 encoded + case descriptorpb.FieldDescriptorProto_TYPE_DOUBLE, + descriptorpb.FieldDescriptorProto_TYPE_FIXED64, + descriptorpb.FieldDescriptorProto_TYPE_SFIXED64: + return protowire.Fixed64Type + + // fixed32 encoded + case descriptorpb.FieldDescriptorProto_TYPE_FLOAT, + descriptorpb.FieldDescriptorProto_TYPE_FIXED32, + descriptorpb.FieldDescriptorProto_TYPE_SFIXED32: + return protowire.Fixed32Type + + // bytes encoded + case descriptorpb.FieldDescriptorProto_TYPE_STRING, + descriptorpb.FieldDescriptorProto_TYPE_BYTES, + descriptorpb.FieldDescriptorProto_TYPE_MESSAGE, + descriptorpb.FieldDescriptorProto_TYPE_GROUP: + return protowire.BytesType + default: + panic(fmt.Sprintf("unknown field type %s", fieldType)) + } +} + +// isScalar defines whether a field is a scalar type. +// Copied from gogo/protobuf/protoc-gen-gogo +// https://github.com/gogo/protobuf/blob/b03c65ea87cdc3521ede29f62fe3ce239267c1bc/protoc-gen-gogo/descriptor/descriptor.go#L95 +func isScalar(field *descriptorpb.FieldDescriptorProto) bool { + if field.Type == nil { + return false + } + switch *field.Type { + case descriptorpb.FieldDescriptorProto_TYPE_DOUBLE, + descriptorpb.FieldDescriptorProto_TYPE_FLOAT, + descriptorpb.FieldDescriptorProto_TYPE_INT64, + descriptorpb.FieldDescriptorProto_TYPE_UINT64, + descriptorpb.FieldDescriptorProto_TYPE_INT32, + descriptorpb.FieldDescriptorProto_TYPE_FIXED64, + descriptorpb.FieldDescriptorProto_TYPE_FIXED32, + descriptorpb.FieldDescriptorProto_TYPE_BOOL, + descriptorpb.FieldDescriptorProto_TYPE_UINT32, + descriptorpb.FieldDescriptorProto_TYPE_ENUM, + descriptorpb.FieldDescriptorProto_TYPE_SFIXED32, + descriptorpb.FieldDescriptorProto_TYPE_SFIXED64, + descriptorpb.FieldDescriptorProto_TYPE_SINT32, + descriptorpb.FieldDescriptorProto_TYPE_SINT64: + return true + default: + return false + } +} diff --git a/codec/unknownproto/unknown_fields_test.go b/codec/unknownproto/unknown_fields_test.go index 1a8fd0affd7e..7f2228e58436 100644 --- a/codec/unknownproto/unknown_fields_test.go +++ b/codec/unknownproto/unknown_fields_test.go @@ -4,9 +4,8 @@ import ( "reflect" "testing" - "github.com/stretchr/testify/require" - "github.com/cosmos/gogoproto/proto" + "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" diff --git a/codec/yaml_test.go b/codec/yaml_test.go index 8601f35b0c16..6d9445fe97b9 100644 --- a/codec/yaml_test.go +++ b/codec/yaml_test.go @@ -3,10 +3,9 @@ package codec_test import ( "testing" - "github.com/cosmos/cosmos-sdk/codec" - "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" ) diff --git a/collections/collections_test.go b/collections/collections_test.go index a85e0ecd2cda..f9a799fbf2ed 100644 --- a/collections/collections_test.go +++ b/collections/collections_test.go @@ -5,10 +5,10 @@ import ( "math" "testing" - "cosmossdk.io/core/store" db "github.com/cosmos/cosmos-db" - "github.com/stretchr/testify/require" + + "cosmossdk.io/core/store" ) type testStore struct { diff --git a/collections/colltest/codec.go b/collections/colltest/codec.go index dddd2df0d026..c0bb5038199c 100644 --- a/collections/colltest/codec.go +++ b/collections/colltest/codec.go @@ -6,11 +6,10 @@ import ( "reflect" "testing" - "cosmossdk.io/collections/codec" + "github.com/stretchr/testify/require" "cosmossdk.io/collections" - - "github.com/stretchr/testify/require" + "cosmossdk.io/collections/codec" ) // TestKeyCodec asserts the correct behavior of a KeyCodec over the type T. diff --git a/collections/colltest/store.go b/collections/colltest/store.go index 56231ffb199e..d29c3c8729aa 100644 --- a/collections/colltest/store.go +++ b/collections/colltest/store.go @@ -3,8 +3,9 @@ package colltest import ( "context" - "cosmossdk.io/core/store" db "github.com/cosmos/cosmos-db" + + "cosmossdk.io/core/store" ) type contextStoreKey struct{} diff --git a/collections/genesis_test.go b/collections/genesis_test.go index 9ff95c83c16a..3d7fd3c54955 100644 --- a/collections/genesis_test.go +++ b/collections/genesis_test.go @@ -6,8 +6,9 @@ import ( "io" "testing" - "cosmossdk.io/core/appmodule" "github.com/stretchr/testify/require" + + "cosmossdk.io/core/appmodule" ) func TestDefaultGenesis(t *testing.T) { diff --git a/collections/go.mod b/collections/go.mod index a4a84a773aca..18118e1500f4 100644 --- a/collections/go.mod +++ b/collections/go.mod @@ -1,53 +1,53 @@ module cosmossdk.io/collections -go 1.20 +go 1.21 require ( - cosmossdk.io/core v0.8.0 - github.com/cosmos/cosmos-db v1.0.0 - github.com/stretchr/testify v1.8.4 - pgregory.net/rapid v0.6.2 + cosmossdk.io/core v0.11.0 + github.com/cosmos/cosmos-db v1.0.2 + github.com/stretchr/testify v1.9.0 + pgregory.net/rapid v1.1.0 ) require ( - cosmossdk.io/api v0.4.2 // indirect - cosmossdk.io/depinject v1.0.0-alpha.3 // indirect + cosmossdk.io/api v0.7.5 // indirect + cosmossdk.io/depinject v1.0.0-alpha.4 // indirect github.com/DataDog/zstd v1.5.5 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/cockroachdb/errors v1.9.1 // indirect + github.com/cockroachdb/errors v1.11.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230525220056-bb4fc9527b3b // indirect - github.com/cockroachdb/redact v1.1.4 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect + github.com/cockroachdb/pebble v1.1.0 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/getsentry/sentry-go v0.21.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/klauspost/compress v1.16.5 // indirect + github.com/klauspost/compress v1.17.7 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/linxGnu/grocksdb v1.7.16 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/linxGnu/grocksdb v1.8.12 // indirect github.com/onsi/gomega v1.20.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.15.1 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.0 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect - github.com/spf13/cast v1.5.1 // indirect + github.com/prometheus/client_golang v1.18.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.47.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect - google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect - google.golang.org/grpc v1.55.0 // indirect - google.golang.org/protobuf v1.30.0 // indirect + golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c // indirect + google.golang.org/grpc v1.58.3 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/collections/go.sum b/collections/go.sum index fd119d9a369a..8932e2415bc5 100644 --- a/collections/go.sum +++ b/collections/go.sum @@ -1,203 +1,90 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cosmossdk.io/api v0.4.2 h1:lQBMl4xINnMnBOR/tQLtjlDnR4exr4e6/SfHR8PILE0= -cosmossdk.io/api v0.4.2/go.mod h1:qrVgOp7DIeAXa+Tt5dDjOC47bZCDrwx8ZHxrmy7STNE= -cosmossdk.io/core v0.8.0 h1:LcJnu52E1a8f8E317VfQ1xK/RZe+IuhMNQAjnDLh25M= -cosmossdk.io/core v0.8.0/go.mod h1:LF6VLOv2DdCiaHxYVmr0MZcZpaSM9ZgvyrQSYTeg6D0= -cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= -cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= +cosmossdk.io/api v0.7.5 h1:eMPTReoNmGUm8DeiQL9DyM8sYDjEhWzL1+nLbI9DqtQ= +cosmossdk.io/api v0.7.5/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= +cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZazG8= +github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230525220056-bb4fc9527b3b h1:LCs8gDhg6vt8A3dN7AEJxmCoETZ4qkySoVJVm3rcSJk= -github.com/cockroachdb/pebble v0.0.0-20230525220056-bb4fc9527b3b/go.mod h1:TkdVsGYRqtULUppt2RbC+YaKtTHnHoWa2apfFrSKABw= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/redact v1.1.4 h1:Y0XrVI2FAyofNyGveodTN//qdpPtFKcKTeCBsK3AHAQ= -github.com/cockroachdb/redact v1.1.4/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -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-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= -github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= -github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= -github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cockroachdb/pebble v1.1.0 h1:pcFh8CdCIt2kmEpK0OIatq67Ln9uGDYY3d5XnE0LJG4= +github.com/cockroachdb/pebble v1.1.0/go.mod h1:sEHm5NOXxyiAoKWhoFxT8xMgd/f3RA6qUqQ1BXKrh2E= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= +github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= +github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= github.com/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 v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= 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/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.21.0 h1:c9l5F1nPF30JIppulk4veau90PK6Smu3abgVtVQWon4= -github.com/getsentry/sentry-go v0.21.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= -github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= -github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= 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/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 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.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= 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/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.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.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -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/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= 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.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= -github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= -github.com/linxGnu/grocksdb v1.7.16 h1:Q2co1xrpdkr5Hx3Fp+f+f7fRGhQFQhvi/+226dtLmA8= -github.com/linxGnu/grocksdb v1.7.16/go.mod h1:JkS7pl5qWpGpuVb3bPqTz8nC12X3YtPZT+Xq7+QfQo4= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= -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/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= +github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= 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.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= @@ -209,245 +96,123 @@ github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAl github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= 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/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -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/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/procfs v0.10.0 h1:UkG7GPYkO4UZyLnyXjaWYcgOSONqwdBqFUT95ugmt6I= -github.com/prometheus/procfs v0.10.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= +github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= +github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.47.0 h1:p5Cz0FNHo7SnWOmWmoRozVcjEp0bIVU8cV7OShpjL1k= +github.com/prometheus/common v0.47.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/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/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= -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/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= 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.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -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-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= 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/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/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-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-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-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-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/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= 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-20190222072716-a9d3bda3a223/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-20190813064441-fde4db37ae7a/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-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/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.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 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/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= 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= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c h1:jHkCUWkseRf+W+edG5hMzr/Uh1xkDREY4caybAq4dpY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0= +google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= +google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= 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.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= 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.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -pgregory.net/rapid v0.6.2 h1:ErW5sL+UKtfBfUTsWHDCoeB+eZKLKMxrSd1VJY6W4bw= -pgregory.net/rapid v0.6.2/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= diff --git a/collections/indexed_map_test.go b/collections/indexed_map_test.go index 9af4dd74b7e6..ea883cb92e66 100644 --- a/collections/indexed_map_test.go +++ b/collections/indexed_map_test.go @@ -3,10 +3,11 @@ package collections_test import ( "testing" + "github.com/stretchr/testify/require" + "cosmossdk.io/collections" "cosmossdk.io/collections/colltest" "cosmossdk.io/collections/indexes" - "github.com/stretchr/testify/require" ) type company struct { diff --git a/collections/indexes/helpers_test.go b/collections/indexes/helpers_test.go index 469aa38dba33..87901e486a5f 100644 --- a/collections/indexes/helpers_test.go +++ b/collections/indexes/helpers_test.go @@ -3,8 +3,9 @@ package indexes import ( "testing" - "cosmossdk.io/collections" "github.com/stretchr/testify/require" + + "cosmossdk.io/collections" ) func TestHelpers(t *testing.T) { diff --git a/collections/indexes/indexes_test.go b/collections/indexes/indexes_test.go index a2754ae7d416..352ffb690fc0 100644 --- a/collections/indexes/indexes_test.go +++ b/collections/indexes/indexes_test.go @@ -3,8 +3,9 @@ package indexes import ( "context" - "cosmossdk.io/core/store" db "github.com/cosmos/cosmos-db" + + "cosmossdk.io/core/store" ) // TODO remove this when we add testStore to core/store. diff --git a/collections/indexes/multi_test.go b/collections/indexes/multi_test.go index ed11195bf0f4..428b880bfb71 100644 --- a/collections/indexes/multi_test.go +++ b/collections/indexes/multi_test.go @@ -3,8 +3,9 @@ package indexes import ( "testing" - "cosmossdk.io/collections" "github.com/stretchr/testify/require" + + "cosmossdk.io/collections" ) func TestMultiIndex(t *testing.T) { diff --git a/collections/indexes/reverse_pair_test.go b/collections/indexes/reverse_pair_test.go index 15f0b996677a..e4036aaaafdd 100644 --- a/collections/indexes/reverse_pair_test.go +++ b/collections/indexes/reverse_pair_test.go @@ -3,8 +3,9 @@ package indexes import ( "testing" - "cosmossdk.io/collections" "github.com/stretchr/testify/require" + + "cosmossdk.io/collections" ) type ( diff --git a/collections/indexes/unique_test.go b/collections/indexes/unique_test.go index f3a174fc3981..54e46c962e1e 100644 --- a/collections/indexes/unique_test.go +++ b/collections/indexes/unique_test.go @@ -3,8 +3,9 @@ package indexes import ( "testing" - "cosmossdk.io/collections" "github.com/stretchr/testify/require" + + "cosmossdk.io/collections" ) func TestUniqueIndex(t *testing.T) { diff --git a/collections/item.go b/collections/item.go index 155cb729aa24..1b36bf46dad6 100644 --- a/collections/item.go +++ b/collections/item.go @@ -37,7 +37,7 @@ func (i Item[V]) Set(ctx context.Context, value V) error { } // Has reports whether the item exists in the store or not. -// Returns an error in case +// Returns an error in case encoding fails. func (i Item[V]) Has(ctx context.Context) (bool, error) { return (Map[noKey, V])(i).Has(ctx, noKey{}) } diff --git a/collections/iter.go b/collections/iter.go index 38a21a22a353..c728f1994187 100644 --- a/collections/iter.go +++ b/collections/iter.go @@ -6,7 +6,6 @@ import ( "fmt" "cosmossdk.io/collections/codec" - "cosmossdk.io/core/store" ) diff --git a/collections/map.go b/collections/map.go index 9ada53c494cc..525110cdf9c5 100644 --- a/collections/map.go +++ b/collections/map.go @@ -5,7 +5,6 @@ import ( "fmt" "cosmossdk.io/collections/codec" - "cosmossdk.io/core/store" ) diff --git a/collections/schema.go b/collections/schema.go index 806f350e6b7b..e05058f144c1 100644 --- a/collections/schema.go +++ b/collections/schema.go @@ -8,7 +8,6 @@ import ( "strings" "cosmossdk.io/core/appmodule" - "cosmossdk.io/core/store" ) diff --git a/contrib/devtools/Dockerfile b/contrib/devtools/Dockerfile index 3a38f5f14857..1959385c89a0 100644 --- a/contrib/devtools/Dockerfile +++ b/contrib/devtools/Dockerfile @@ -2,8 +2,8 @@ # docker build --pull --rm -f "contrib/devtools/Dockerfile" -t cosmossdk-proto:latest "contrib/devtools" # docker run --rm -v $(pwd):/workspace --workdir /workspace cosmossdk-proto sh ./scripts/protocgen.sh -FROM bufbuild/buf:1.20.0 as BUILDER -FROM golang:1.20-alpine +FROM bufbuild/buf:1.24.0 as BUILDER +FROM golang:1.21-alpine RUN apk add --no-cache \ nodejs \ @@ -11,7 +11,8 @@ RUN apk add --no-cache \ git \ make \ clang-extra-tools \ - g++ + g++ \ + jq RUN npm install -g swagger-combine diff --git a/contrib/images/simd-dlv/Dockerfile b/contrib/images/simd-dlv/Dockerfile index 55b591c7bd8b..11c61245fc68 100644 --- a/contrib/images/simd-dlv/Dockerfile +++ b/contrib/images/simd-dlv/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20-alpine AS build +FROM golang:1.21-alpine AS build RUN apk add build-base git linux-headers libc-dev RUN go install github.com/go-delve/delve/cmd/dlv@latest @@ -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 tools/rosetta/go.mod tools/rosetta/go.sum /work/tools/rosetta/ COPY collections/go.mod collections/go.sum /work/collections/ COPY store/go.mod store/go.sum /work/store/ COPY log/go.mod log/go.sum /work/log/ diff --git a/contrib/images/simd-env/Dockerfile b/contrib/images/simd-env/Dockerfile index 3b1b4521f79a..b01c06710766 100644 --- a/contrib/images/simd-env/Dockerfile +++ b/contrib/images/simd-env/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20-alpine AS build +FROM golang:1.21-alpine AS build RUN apk add build-base git linux-headers @@ -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 tools/rosetta/go.mod tools/rosetta/go.sum /work/tools/rosetta/ COPY collections/go.mod collections/go.sum /work/collections/ COPY store/go.mod store/go.sum /work/store/ COPY log/go.mod log/go.sum /work/log/ diff --git a/contrib/rosetta/README.md b/contrib/rosetta/README.md deleted file mode 100644 index 77955b1b4394..000000000000 --- a/contrib/rosetta/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# rosetta - -This directory contains the files required to run the rosetta CI. It builds `simapp` based on the current codebase. - -## docker-compose.yaml - -Builds: - -* cosmos-sdk simapp node, with prefixed data directory, keys etc. This is required to test historical balances. -* faucet is required so we can test construction API, it was literally impossible to put there a deterministic address to request funds for -* rosetta is the rosetta node used by rosetta-cli to interact with the cosmos-sdk app -* test_rosetta runs the rosetta-cli test against construction API and data API - -## configuration - -Contains the required files to set up rosetta cli and make it work against its workflows - -## Rosetta-ci - -Contains the files for a deterministic network, with fixed keys and some actions on there, to test parsing of msgs and historical balances. This image is used to run a simapp node and to run the rosetta server and the rosetta-cli. -Whenever [rosetta-cli](https://github.com/coinbase/rosetta-cli) releases a new version, rosetta-ci/Dockerfile should be updated to reflect the new version. - -## Notes - -* Keyring password is 12345678 -* data.sh creates node data, it's required in case consensus breaking changes are made to quickly recreate replicable node data for rosetta diff --git a/contrib/rosetta/configuration/bootstrap.json b/contrib/rosetta/configuration/bootstrap.json deleted file mode 100644 index ddf504179711..000000000000 --- a/contrib/rosetta/configuration/bootstrap.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "account_identifier": { - "address":"cosmos1f3d3s7jjy5zune554w7fnhrhyuxhll7s7rps0h" - }, - "currency":{ - "symbol":"stake", - "decimals":0 - }, - "value": "999990000000" - } -] \ No newline at end of file diff --git a/contrib/rosetta/configuration/data.sh b/contrib/rosetta/configuration/data.sh deleted file mode 100644 index 017b2e642f9c..000000000000 --- a/contrib/rosetta/configuration/data.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh - -set -e - -wait_simd() { - timeout 30 sh -c 'until nc -z $0 $1; do sleep 1; done' localhost 9090 -} -# this script is used to recreate the data dir -echo clearing /root/.simapp -rm -rf /root/.simapp/* -echo initting new chain -# init config files -simd init simd --chain-id testing - -# create accounts -simd keys add fd --keyring-backend=test - -addr=$(simd keys show fd -a --keyring-backend=test) -val_addr=$(simd keys show fd --keyring-backend=test --bech val -a) - -# give the accounts some money -simd genesis add-genesis-account "$addr" 1000000000000stake --keyring-backend=test - -# save configs for the daemon -simd genesis gentx fd 10000000stake --chain-id testing --keyring-backend=test - -# input genTx to the genesis file -simd genesis collect-gentxs -# verify genesis file is fine -simd genesis validate-genesis -echo changing network settings -sed -i 's/127.0.0.1/0.0.0.0/g' /root/.simapp/config/config.toml - -# start simd -echo starting simd... -simd start --pruning=nothing & -pid=$! -echo simd started with PID $pid - -echo awaiting for simd to be ready -wait_simd -echo simd is ready -sleep 10 - - -# send transaction to deterministic address -echo sending transaction with addr $addr -simd tx bank send "$addr" cosmos19g9cm8ymzchq2qkcdv3zgqtwayj9asv3hjv5u5 100stake --yes --keyring-backend=test --chain-id=testing - -sleep 10 - -echo stopping simd... -kill -9 $pid - -echo zipping data dir and saving to /tmp/data.tar.gz - -tar -czvf /tmp/data.tar.gz /root/.simapp - -echo new address for bootstrap.json "$addr" "$val_addr" diff --git a/contrib/rosetta/configuration/faucet.py b/contrib/rosetta/configuration/faucet.py deleted file mode 100644 index 44536a84bb3b..000000000000 --- a/contrib/rosetta/configuration/faucet.py +++ /dev/null @@ -1,25 +0,0 @@ -from http.server import HTTPServer, BaseHTTPRequestHandler -import subprocess - -import os - - -class SimpleHTTPRequestHandler(BaseHTTPRequestHandler): - - def do_POST(self): - try: - content_len = int(self.headers.get('Content-Length')) - addr = self.rfile.read(content_len).decode("utf-8") - print("sending funds to " + addr) - subprocess.call(['sh', './send_funds.sh', addr]) - self.send_response(200) - self.end_headers() - except Exception as e: - print("failed " + str(e)) - os._exit(1) - - -if __name__ == "__main__": - print("starting faucet server...") - httpd = HTTPServer(('0.0.0.0', 8000), SimpleHTTPRequestHandler) - httpd.serve_forever() diff --git a/contrib/rosetta/configuration/rosetta.json b/contrib/rosetta/configuration/rosetta.json deleted file mode 100644 index 5802c3c90dff..000000000000 --- a/contrib/rosetta/configuration/rosetta.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "network": { - "blockchain": "app", - "network": "network" - }, - "online_url": "http://rosetta:8080", - "data_directory": "", - "http_timeout": 300, - "max_retries": 5, - "retry_elapsed_time": 0, - "max_online_connections": 0, - "max_sync_concurrency": 0, - "tip_delay": 60, - "log_configuration": true, - "construction": { - "offline_url": "http://rosetta:8080", - "max_offline_connections": 0, - "stale_depth": 0, - "broadcast_limit": 0, - "ignore_broadcast_failures": false, - "clear_broadcasts": false, - "broadcast_behind_tip": false, - "block_broadcast_limit": 0, - "rebroadcast_all": false, - "constructor_dsl_file": "transfer.ros", - "end_conditions": { - "create_account": 1, - "transfer": 1 - } - }, - "data": { - "active_reconciliation_concurrency": 0, - "inactive_reconciliation_concurrency": 0, - "inactive_reconciliation_frequency": 0, - "log_blocks": false, - "log_transactions": false, - "log_balance_changes": false, - "log_reconciliations": false, - "ignore_reconciliation_error": false, - "exempt_accounts": "", - "bootstrap_balances": "bootstrap.json", - "interesting_accounts": "", - "reconciliation_disabled": false, - "inactive_discrepancy_search_disabled": false, - "balance_tracking_disabled": false, - "coin_tracking_disabled": false, - "end_conditions": { - "tip": true - } - } -} \ No newline at end of file diff --git a/contrib/rosetta/configuration/run_tests.sh b/contrib/rosetta/configuration/run_tests.sh deleted file mode 100755 index c53f89ff88a4..000000000000 --- a/contrib/rosetta/configuration/run_tests.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -set -e - -wait_for_rosetta() { - timeout 30 sh -c 'until nc -z $0 $1; do sleep 1; done' rosetta 8080 -} - -echo "waiting for rosetta instance to be up" -wait_for_rosetta - -echo "checking data API" -rosetta-cli check:data --configuration-file ./config/rosetta.json - -echo "checking construction API" -rosetta-cli check:construction --configuration-file ./config/rosetta.json - diff --git a/contrib/rosetta/configuration/send_funds.sh b/contrib/rosetta/configuration/send_funds.sh deleted file mode 100644 index 3a897539d225..000000000000 --- a/contrib/rosetta/configuration/send_funds.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -set -e -addr=$(simd keys show fd -a --keyring-backend=test) -echo "12345678" | simd tx bank send "$addr" "$1" 100stake --chain-id="testing" --node tcp://cosmos:26657 --yes --keyring-backend=test \ No newline at end of file diff --git a/contrib/rosetta/configuration/transfer.ros b/contrib/rosetta/configuration/transfer.ros deleted file mode 100644 index 201a8ab7c449..000000000000 --- a/contrib/rosetta/configuration/transfer.ros +++ /dev/null @@ -1,105 +0,0 @@ -request_funds(1){ - find_account{ - currency = {"symbol":"stake", "decimals":0}; - random_account = find_balance({ - "minimum_balance":{ - "value": "0", - "currency": {{currency}} - }, - "create_limit":1 - }); - }, - send_funds{ - account_identifier = {{random_account.account_identifier}}; - address = {{account_identifier.address}}; - idk = http_request({ - "method": "POST", - "url": "http:\/\/faucet:8000", - "timeout": 10, - "body": {{random_account.account_identifier.address}} - }); - }, - // Create a separate scenario to request funds so that - // the address we are using to request funds does not - // get rolled back if funds do not yet exist. - request{ - loaded_account = find_balance({ - "account_identifier": {{random_account.account_identifier}}, - "minimum_balance":{ - "value": "50", - "currency": {{currency}} - } - }); - } -} -create_account(1){ - create{ - network = {"network":"network", "blockchain":"app"}; - key = generate_key({"curve_type": "secp256k1"}); - account = derive({ - "network_identifier": {{network}}, - "public_key": {{key.public_key}} - }); - // If the account is not saved, the key will be lost! - save_account({ - "account_identifier": {{account.account_identifier}}, - "keypair": {{key}} - }); - } -} -transfer(3){ - transfer{ - transfer.network = {"network":"network", "blockchain":"app"}; - currency = {"symbol":"stake", "decimals":0}; - sender = find_balance({ - "minimum_balance":{ - "value": "100", - "currency": {{currency}} - } - }); - acc_identifier = {{sender.account_identifier}}; - sender_address = {{acc_identifier.address}}; - // Set the recipient_amount as some value <= sender.balance-max_fee - max_fee = "0"; - fee_amount = "1"; - fee_value = 0 - {{fee_amount}}; - available_amount = {{sender.balance.value}} - {{max_fee}}; - recipient_amount = random_number({"minimum": "1", "maximum": {{available_amount}}}); - print_message({"recipient_amount":{{recipient_amount}}}); - // Find recipient and construct operations - sender_amount = 0 - {{recipient_amount}}; - recipient = find_balance({ - "not_account_identifier":[{{sender.account_identifier}}], - "minimum_balance":{ - "value": "0", - "currency": {{currency}} - }, - "create_limit": 100, - "create_probability": 50 - }); - transfer.confirmation_depth = "1"; - recipient_account_identifier = {{recipient.account_identifier}}; - recipient_address = {{recipient_account_identifier.address}}; - transfer.operations = [ - { - "operation_identifier":{"index":0}, - "type":"/cosmos.bank.v1beta1.MsgSend", - "account":{{sender.account_identifier}}, - "metadata": { - "amount": [ - { - "amount": {{recipient_amount}}, - "denom": {{currency.symbol}} - } - ], - "from_address": {{sender_address}}, - "to_address": {{recipient_address}} - } - } - ]; - transfer.preprocess_metadata = { - "gas_price": "1stake", - "gas_limit": 250000 - }; - } -} diff --git a/contrib/rosetta/docker-compose.yaml b/contrib/rosetta/docker-compose.yaml deleted file mode 100644 index c5c4cc3eb12d..000000000000 --- a/contrib/rosetta/docker-compose.yaml +++ /dev/null @@ -1,45 +0,0 @@ -version: "3" - -services: - cosmos: - image: rosetta-ci:latest - command: ["simd", "start", "--pruning", "nothing", "--grpc.enable", "true", "--grpc.address", "0.0.0.0:9090", "--grpc-web.enable", "true"] - ports: - - 9090:9090 - - 26657:26657 - logging: - driver: "none" - - rosetta: - image: rosetta-ci:latest - depends_on: - - "cosmos" - command: [ - "simd", - "rosetta", - "--blockchain", "app", - "--network", "network", - "--tendermint", "cosmos:26657", - "--grpc", "cosmos:9090", - "--addr", ":8080", - ] - ports: - - 8080:8080 - - faucet: - image: rosetta-ci:latest - working_dir: /rosetta - command: ["python3", "faucet.py"] - expose: - - 8080 - - test_rosetta: - image: rosetta-ci:latest - depends_on: - - "cosmos" - - "rosetta" - - "faucet" - volumes: - - ./configuration:/rosetta/config:z - command: ["./config/run_tests.sh"] - working_dir: /rosetta diff --git a/contrib/rosetta/rosetta-ci/Dockerfile b/contrib/rosetta/rosetta-ci/Dockerfile deleted file mode 100644 index 165d0d0f0aa8..000000000000 --- a/contrib/rosetta/rosetta-ci/Dockerfile +++ /dev/null @@ -1,42 +0,0 @@ -FROM golang:1.20-alpine as build - -RUN apk add git tar gcc libc-dev --no-cache - -ARG ROSETTA_VERSION="v0.10.0" - -# build rosetta CLI -WORKDIR /rosetta -RUN git clone https://github.com/coinbase/rosetta-cli . && \ - git checkout tags/$ROSETTA_VERSION && \ - go build -o rosetta-cli ./main.go - -# prepare node data -WORKDIR /node -COPY ./contrib/rosetta/rosetta-ci/data.tar.gz data.tar.gz -RUN tar -zxvf data.tar.gz -C . - -# build simd -WORKDIR /simd -COPY . ./ -RUN cd simapp && go build -o simd ./simd/ - -FROM alpine -RUN apk add gcc git libc-dev python3 --no-cache - -ENV PATH=$PATH:/bin -# Set GENESIS_HASH env needed for api correctness -ENV GENESIS_HASH "01331100220a94b9acc0ceef697a6db44ba70fc61e9e6c24802974a0b6cba29b" - -COPY --from=build /rosetta/rosetta-cli /bin/rosetta-cli -COPY --from=build /simd/simapp/simd/simd /bin/simd - -WORKDIR /rosetta -COPY ./contrib/rosetta/configuration ./ -RUN chmod +x run_tests.sh && \ - chmod +x send_funds.sh && \ - chmod +x faucet.py - -COPY --from=build /node/root /root/ -WORKDIR /root/.simapp - -RUN chmod -R 0777 ./ diff --git a/contrib/rosetta/rosetta-ci/data.tar.gz b/contrib/rosetta/rosetta-ci/data.tar.gz deleted file mode 100644 index 96fef01975f5..000000000000 Binary files a/contrib/rosetta/rosetta-ci/data.tar.gz and /dev/null differ diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index ac6434ff22de..9f75d72639e2 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -36,6 +36,27 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +## [v0.11.2](https://github.com/cosmos/cosmos-sdk/releases/tag/core%2Fv0.11.2) + +* [#21298](https://github.com/cosmos/cosmos-sdk/pull/21298) Backport [#19265](https://github.com/cosmos/cosmos-sdk/pull/19265) to core. +* [#21298](https://github.com/cosmos/cosmos-sdk/pull/21298) Clean-up after depinject upgrade. + +## [v0.11.1](https://github.com/cosmos/cosmos-sdk/releases/tag/core%2Fv0.11.1) + +* [#21022](https://github.com/cosmos/cosmos-sdk/pull/21022) Upgrade depinject to v1.0.0. + +## [v0.11.0](https://github.com/cosmos/cosmos-sdk/releases/tag/core%2Fv0.11.0) + +* [#17468](https://github.com/cosmos/cosmos-sdk/pull/17468) Add `appmodule.HasPreBlocker` interface. + +## [v0.10.0](https://github.com/cosmos/cosmos-sdk/releases/tag/core%2Fv0.10.0) + +* [#17383](https://github.com/cosmos/cosmos-sdk/pull/17383) Add `appmoduke.UpgradeModule` interface. + +## [v0.9.0](https://github.com/cosmos/cosmos-sdk/releases/tag/core%2Fv0.9.0) + +* [#16739](https://github.com/cosmos/cosmos-sdk/pull/16739) Add `AppHash` to header.Info. + ## [v0.8.0](https://github.com/cosmos/cosmos-sdk/releases/tag/core%2Fv0.8.0) * [#15519](https://github.com/cosmos/cosmos-sdk/pull/15519) Update `comet.VoteInfo` for CometBFT v0.38. diff --git a/core/appconfig/config.go b/core/appconfig/config.go index 808c0cdc8aaa..670565018dc5 100644 --- a/core/appconfig/config.go +++ b/core/appconfig/config.go @@ -1,125 +1,18 @@ package appconfig import ( - "fmt" - "strings" - - "github.com/cosmos/cosmos-proto/anyutil" - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" - "google.golang.org/protobuf/types/known/anypb" - "sigs.k8s.io/yaml" - - appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" - - "cosmossdk.io/depinject" - - "cosmossdk.io/core/internal" + depinjectappconfig "cosmossdk.io/depinject/appconfig" ) // LoadJSON loads an app config in JSON format. -func LoadJSON(bz []byte) depinject.Config { - config := &appv1alpha1.Config{} - err := protojson.Unmarshal(bz, config) - if err != nil { - return depinject.Error(err) - } - - return Compose(config) -} +var LoadJSON = depinjectappconfig.LoadJSON // LoadYAML loads an app config in YAML format. -func LoadYAML(bz []byte) depinject.Config { - j, err := yaml.YAMLToJSON(bz) - if err != nil { - return depinject.Error(err) - } - - return LoadJSON(j) -} +var LoadYAML = depinjectappconfig.LoadYAML // WrapAny marshals a proto message into a proto Any instance -func WrapAny(config protoreflect.ProtoMessage) *anypb.Any { - cfg, err := anyutil.New(config) - if err != nil { - panic(err) - } - - return cfg -} +var WrapAny = depinjectappconfig.WrapAny // Compose composes a v1alpha1 app config into a container option by resolving // the required modules and composing their options. -func Compose(appConfig *appv1alpha1.Config) depinject.Config { - opts := []depinject.Config{ - depinject.Supply(appConfig), - } - - for _, module := range appConfig.Modules { - if module.Name == "" { - return depinject.Error(fmt.Errorf("module is missing name")) - } - - if module.Config == nil { - return depinject.Error(fmt.Errorf("module %q is missing a config object", module.Name)) - } - - msgType, err := protoregistry.GlobalTypes.FindMessageByURL(module.Config.TypeUrl) - if err != nil { - return depinject.Error(err) - } - - modules, err := internal.ModulesByProtoMessageName() - if err != nil { - return depinject.Error(err) - } - - init, ok := modules[msgType.Descriptor().FullName()] - if !ok { - modDesc := proto.GetExtension(msgType.Descriptor().Options(), appv1alpha1.E_Module).(*appv1alpha1.ModuleDescriptor) - if modDesc == nil { - return depinject.Error(fmt.Errorf("no module registered for type URL %s and that protobuf type does not have the option %s\n\n%s", - module.Config.TypeUrl, appv1alpha1.E_Module.TypeDescriptor().FullName(), dumpRegisteredModules(modules))) - } - - return depinject.Error(fmt.Errorf("no module registered for type URL %s, did you forget to import %s: find more information on how to make a module ready for app wiring: https://docs.cosmos.network/main/building-modules/depinject\n\n%s", - module.Config.TypeUrl, modDesc.GoImport, dumpRegisteredModules(modules))) - } - - config := init.ConfigProtoMessage.ProtoReflect().Type().New().Interface() - err = anypb.UnmarshalTo(module.Config, config, proto.UnmarshalOptions{}) - if err != nil { - return depinject.Error(err) - } - - opts = append(opts, depinject.Supply(config)) - - for _, provider := range init.Providers { - opts = append(opts, depinject.ProvideInModule(module.Name, provider)) - } - - for _, invoker := range init.Invokers { - opts = append(opts, depinject.InvokeInModule(module.Name, invoker)) - } - - for _, binding := range module.GolangBindings { - opts = append(opts, depinject.BindInterfaceInModule(module.Name, binding.InterfaceType, binding.Implementation)) - } - } - - for _, binding := range appConfig.GolangBindings { - opts = append(opts, depinject.BindInterface(binding.InterfaceType, binding.Implementation)) - } - - return depinject.Configs(opts...) -} - -func dumpRegisteredModules(modules map[protoreflect.FullName]*internal.ModuleInitializer) string { - var mods []string - for name := range modules { - mods = append(mods, " "+string(name)) - } - return fmt.Sprintf("registered modules are:\n%s", strings.Join(mods, "\n")) -} +var Compose = depinjectappconfig.Compose diff --git a/core/appconfig/config_test.go b/core/appconfig/config_test.go deleted file mode 100644 index 4466981f85bb..000000000000 --- a/core/appconfig/config_test.go +++ /dev/null @@ -1,224 +0,0 @@ -package appconfig_test - -import ( - "bytes" - "fmt" - "io" - "reflect" - "sort" - "testing" - - "gotest.tools/v3/assert" - - "cosmossdk.io/depinject" - - "cosmossdk.io/core/appconfig" - "cosmossdk.io/core/appmodule" - "cosmossdk.io/core/internal" - "cosmossdk.io/core/internal/testpb" -) - -func expectContainerErrorContains(t *testing.T, option depinject.Config, contains string) { - t.Helper() - err := depinject.Inject(option) - assert.ErrorContains(t, err, contains) -} - -func TestCompose(t *testing.T) { - opt := appconfig.LoadJSON([]byte(`{"modules":[{}]}`)) - expectContainerErrorContains(t, opt, "module is missing name") - - opt = appconfig.LoadJSON([]byte(`{"modules":[{"name": "a"}]}`)) - expectContainerErrorContains(t, opt, `module "a" is missing a config object`) - - opt = appconfig.LoadYAML([]byte(` -modules: -- name: a - config: - "@type": testpb.ModuleFoo -`)) - expectContainerErrorContains(t, opt, `unable to resolve`) - - opt = appconfig.LoadYAML([]byte(` -modules: -- name: a - config: - "@type": cosmos.app.v1alpha1.Config # this is not actually a module config type! -`)) - expectContainerErrorContains(t, opt, "does not have the option cosmos.app.v1alpha1.module") - expectContainerErrorContains(t, opt, "registered modules are") - expectContainerErrorContains(t, opt, "testpb.TestModuleA") - - opt = appconfig.LoadYAML([]byte(` -modules: -- name: a - config: - "@type": testpb.TestUnregisteredModule -`)) - expectContainerErrorContains(t, opt, "did you forget to import cosmossdk.io/core/internal/testpb") - expectContainerErrorContains(t, opt, "registered modules are") - expectContainerErrorContains(t, opt, "testpb.TestModuleA") - - var app App - opt = appconfig.LoadYAML([]byte(` -modules: -- name: runtime - config: - "@type": testpb.TestRuntimeModule -- name: a - config: - "@type": testpb.TestModuleA -- name: b - config: - "@type": testpb.TestModuleB -`)) - assert.NilError(t, depinject.Inject(opt, &app)) - buf := &bytes.Buffer{} - app(buf) - const expected = `got store key a -got store key b -running module handler a -result: hello -running module handler b -result: goodbye -` - assert.Equal(t, expected, buf.String()) - - opt = appconfig.LoadYAML([]byte(` -golang_bindings: - - interfaceType: interfaceType/package.name - implementation: implementationType/package.name - - interfaceType: interfaceType/package.nameTwo - implementation: implementationType/package.nameTwo -modules: - - name: a - config: - "@type": testpb.TestModuleA - golang_bindings: - - interfaceType: interfaceType/package.name - implementation: implementationType/package.name - - interfaceType: interfaceType/package.nameTwo - implementation: implementationType/package.nameTwo -`)) - assert.NilError(t, depinject.Inject(opt)) - - // module registration failures: - appmodule.Register(&testpb.TestNoModuleOptionModule{}) - opt = appconfig.LoadYAML([]byte(` -modules: -- name: a - config: - "@type": testpb.TestNoGoImportModule -`)) - expectContainerErrorContains(t, opt, "module should have the option cosmos.app.v1alpha1.module") - - internal.ModuleRegistry = map[reflect.Type]*internal.ModuleInitializer{} // reset module registry - appmodule.Register(&testpb.TestNoGoImportModule{}) - opt = appconfig.LoadYAML([]byte(` -modules: -- name: a - config: - "@type": testpb.TestNoGoImportModule -`)) - expectContainerErrorContains(t, opt, "module should have ModuleDescriptor.go_import specified") -} - -// -// Test Module Initialization Logic -// - -func init() { - appmodule.Register(&testpb.TestRuntimeModule{}, - appmodule.Provide(ProvideRuntimeState, ProvideStoreKey, ProvideApp), - ) - - appmodule.Register(&testpb.TestModuleA{}, - appmodule.Provide(ProvideModuleA), - ) - - appmodule.Register(&testpb.TestModuleB{}, - appmodule.Provide(ProvideModuleB), - ) -} - -func ProvideRuntimeState() *RuntimeState { - return &RuntimeState{} -} - -func ProvideStoreKey(key depinject.ModuleKey, state *RuntimeState) StoreKey { - sk := StoreKey{name: key.Name()} - state.storeKeys = append(state.storeKeys, sk) - return sk -} - -func ProvideApp(state *RuntimeState, handlers map[string]Handler) App { - return func(w io.Writer) { - sort.Slice(state.storeKeys, func(i, j int) bool { - return state.storeKeys[i].name < state.storeKeys[j].name - }) - - for _, key := range state.storeKeys { - _, _ = fmt.Fprintf(w, "got store key %s\n", key.name) - } - - var modNames []string - for modName := range handlers { - modNames = append(modNames, modName) - } - - sort.Strings(modNames) - for _, name := range modNames { - _, _ = fmt.Fprintf(w, "running module handler %s\n", name) - _, _ = fmt.Fprintf(w, "result: %s\n", handlers[name].DoSomething()) - } - } -} - -type App func(writer io.Writer) - -type RuntimeState struct { - storeKeys []StoreKey -} - -type StoreKey struct{ name string } - -type Handler struct { - DoSomething func() string -} - -func (h Handler) IsOnePerModuleType() {} - -func ProvideModuleA(key StoreKey) (KeeperA, Handler) { - return keeperA{key: key}, Handler{DoSomething: func() string { - return "hello" - }} -} - -type keeperA struct { - key StoreKey -} - -type KeeperA interface { - Foo() -} - -func (k keeperA) Foo() {} - -func ProvideModuleB(key StoreKey, a KeeperA) (KeeperB, Handler) { - return keeperB{key: key, a: a}, Handler{ - DoSomething: func() string { - return "goodbye" - }, - } -} - -type keeperB struct { - key StoreKey - a KeeperA -} - -type KeeperB interface { - isKeeperB() -} - -func (k keeperB) isKeeperB() {} diff --git a/core/appmodule/genesis.go b/core/appmodule/genesis.go index 77940ce5fee3..7f955a467749 100644 --- a/core/appmodule/genesis.go +++ b/core/appmodule/genesis.go @@ -7,6 +7,7 @@ import ( // HasGenesis is the extension interface that modules should implement to handle // genesis data and state initialization. +// WARNING: This interface is experimental and may change at any time. type HasGenesis interface { AppModule diff --git a/core/appmodule/module.go b/core/appmodule/module.go index a701a307c974..61714b32bb13 100644 --- a/core/appmodule/module.go +++ b/core/appmodule/module.go @@ -3,8 +3,9 @@ package appmodule import ( "context" - "cosmossdk.io/depinject" "google.golang.org/grpc" + + "cosmossdk.io/depinject" ) // AppModule is a tag interface for app module implementations to use as a basis @@ -51,6 +52,22 @@ type HasPrecommit interface { Precommit(context.Context) error } +// ResponsePreBlock represents the response from the PreBlock method. +// It can modify consensus parameters in storage and signal the caller through the return value. +// When it returns ConsensusParamsChanged=true, the caller must refresh the consensus parameter in the finalize context. +// The new context (ctx) must be passed to all the other lifecycle methods. +type ResponsePreBlock interface { + IsConsensusParamsChanged() bool +} + +// HasPreBlocker is the extension interface that modules should implement to run +// custom logic before BeginBlock. +type HasPreBlocker interface { + AppModule + // PreBlock is method that will be run before BeginBlock. + PreBlock(context.Context) (ResponsePreBlock, error) +} + // HasBeginBlocker is the extension interface that modules should implement to run // custom logic before transaction processing in a block. type HasBeginBlocker interface { @@ -70,3 +87,10 @@ type HasEndBlocker interface { // a block. EndBlock(context.Context) error } + +// UpgradeModule is the extension interface that upgrade module should implement to differentiate +// it from other modules, migration handler need ensure the upgrade module's migration is executed +// before the rest of the modules. +type UpgradeModule interface { + IsUpgradeModule() +} diff --git a/core/appmodule/option.go b/core/appmodule/option.go index 951bfc6e2d7c..1926ec36e950 100644 --- a/core/appmodule/option.go +++ b/core/appmodule/option.go @@ -1,37 +1,19 @@ package appmodule import ( - "cosmossdk.io/core/internal" + depinjectappconfig "cosmossdk.io/depinject/appconfig" ) // Option is a functional option for implementing modules. -type Option interface { - apply(*internal.ModuleInitializer) error -} - -type funcOption func(initializer *internal.ModuleInitializer) error - -func (f funcOption) apply(initializer *internal.ModuleInitializer) error { - return f(initializer) -} +type Option = depinjectappconfig.Option // Provide registers providers with the dependency injection system that will be // run within the module scope. See cosmossdk.io/depinject for // documentation on the dependency injection system. -func Provide(providers ...interface{}) Option { - return funcOption(func(initializer *internal.ModuleInitializer) error { - initializer.Providers = append(initializer.Providers, providers...) - return nil - }) -} +var Provide = depinjectappconfig.Provide // Invoke registers invokers to run with depinject. Each invoker will be called // at the end of dependency graph configuration in the order in which it was defined. Invokers may not define output // parameters, although they may return an error, and all of their input parameters will be marked as optional so that // invokers impose no additional constraints on the dependency graph. Invoker functions should nil-check all inputs. -func Invoke(invokers ...interface{}) Option { - return funcOption(func(initializer *internal.ModuleInitializer) error { - initializer.Invokers = append(initializer.Invokers, invokers...) - return nil - }) -} +var Invoke = depinjectappconfig.Invoke diff --git a/core/appmodule/register.go b/core/appmodule/register.go index 56004dbb863c..8475365a8450 100644 --- a/core/appmodule/register.go +++ b/core/appmodule/register.go @@ -1,11 +1,7 @@ package appmodule import ( - "reflect" - - "google.golang.org/protobuf/proto" - - "cosmossdk.io/core/internal" + depinjectappconfig "cosmossdk.io/depinject/appconfig" ) // Register registers a module with the global module registry. The provided @@ -17,18 +13,4 @@ import ( // Protobuf message types used for module configuration should define the // cosmos.app.v1alpha.module option and must explicitly specify go_package // to make debugging easier for users. -func Register(msg proto.Message, options ...Option) { - ty := reflect.TypeOf(msg) - init := &internal.ModuleInitializer{ - ConfigProtoMessage: msg, - ConfigGoType: ty, - } - internal.ModuleRegistry[ty] = init - - for _, option := range options { - init.Error = option.apply(init) - if init.Error != nil { - return - } - } -} +var Register = depinjectappconfig.RegisterModule diff --git a/core/coins/format.go b/core/coins/format.go index 315c96d78f46..c23a25dc2612 100644 --- a/core/coins/format.go +++ b/core/coins/format.go @@ -84,6 +84,12 @@ func FormatCoins(coins []*basev1beta1.Coin, metadata []*bankv1beta1.Metadata) (s if err != nil { return "", err } + + // If a coin contains a comma, return an error given that the output + // could be misinterpreted by the user as 2 different coins. + if strings.Contains(formatted[i], ",") { + return "", fmt.Errorf("coin %s contains a comma", formatted[i]) + } } if len(coins) == 0 { diff --git a/core/coins/format_test.go b/core/coins/format_test.go index f17d449791f2..994be1a82925 100644 --- a/core/coins/format_test.go +++ b/core/coins/format_test.go @@ -5,10 +5,11 @@ import ( "os" "testing" + "github.com/stretchr/testify/require" + bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" "cosmossdk.io/core/coins" - "github.com/stretchr/testify/require" ) // coinsJsonTest is the type of test cases in the coin.json file. diff --git a/core/genesis/source_test.go b/core/genesis/source_test.go index 3efdfb4d54d5..cff1a3bde467 100644 --- a/core/genesis/source_test.go +++ b/core/genesis/source_test.go @@ -24,6 +24,7 @@ func TestSource(t *testing.T) { } func expectJSON(t *testing.T, source appmodule.GenesisSource, field, contents string) { + t.Helper() r, err := source(field) require.NoError(t, err) bz, err := io.ReadAll(r) diff --git a/core/go.mod b/core/go.mod index 963f84c662f9..add03bb25c5a 100644 --- a/core/go.mod +++ b/core/go.mod @@ -3,34 +3,32 @@ module cosmossdk.io/core go 1.20 require ( - cosmossdk.io/api v0.4.2 - cosmossdk.io/depinject v1.0.0-alpha.3 - cosmossdk.io/math v1.0.1 + cosmossdk.io/api v0.7.0 + cosmossdk.io/depinject v1.0.0 + cosmossdk.io/math v1.1.2 github.com/cosmos/cosmos-db v1.0.0 - github.com/cosmos/cosmos-proto v1.0.0-beta.3 - github.com/stretchr/testify v1.8.4 - google.golang.org/grpc v1.55.0 - google.golang.org/protobuf v1.30.0 - gotest.tools/v3 v3.4.0 - sigs.k8s.io/yaml v1.3.0 + github.com/stretchr/testify v1.9.0 + google.golang.org/grpc v1.64.1 + google.golang.org/protobuf v1.34.2 ) require ( github.com/DataDog/zstd v1.5.5 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/cockroachdb/errors v1.9.1 // indirect + github.com/cockroachdb/errors v1.11.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/pebble v0.0.0-20230525220056-bb4fc9527b3b // indirect - github.com/cockroachdb/redact v1.1.4 // indirect - github.com/cosmos/gogoproto v1.4.10 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect + github.com/cosmos/gogoproto v1.5.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/getsentry/sentry-go v0.21.0 // indirect + github.com/getsentry/sentry-go v0.23.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/klauspost/compress v1.16.5 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect @@ -38,18 +36,23 @@ require ( github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.15.1 // indirect + github.com/prometheus/client_golang v1.16.0 // indirect github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.0 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect + github.com/prometheus/procfs v0.10.1 // indirect + github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/spf13/cast v1.5.1 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect - google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + github.com/tendermint/go-amino v0.16.0 // indirect + golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect + golang.org/x/net v0.27.0 // indirect + golang.org/x/sys v0.22.0 // indirect + golang.org/x/text v0.16.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) + +// Version tagged too early and incompatible with v0.50 (latest at the time of tagging) +retract v0.12.0 diff --git a/core/go.sum b/core/go.sum index 39b0d149e12b..0e5ade90807e 100644 --- a/core/go.sum +++ b/core/go.sum @@ -1,205 +1,92 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cosmossdk.io/api v0.4.2 h1:lQBMl4xINnMnBOR/tQLtjlDnR4exr4e6/SfHR8PILE0= -cosmossdk.io/api v0.4.2/go.mod h1:qrVgOp7DIeAXa+Tt5dDjOC47bZCDrwx8ZHxrmy7STNE= -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/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= +cosmossdk.io/api v0.7.0 h1:QsEMIWuv9xWDbF2HZnW4Lpu1/SejCztPu0LQx7t6MN4= +cosmossdk.io/api v0.7.0/go.mod h1:kJFAEMLN57y0viszHDPLMmieF0471o5QAwwApa+270M= +cosmossdk.io/depinject v1.0.0 h1:dQaTu6+O6askNXO06+jyeUAnF2/ssKwrrszP9t5q050= +cosmossdk.io/depinject v1.0.0/go.mod h1:zxK/h3HgHoA/eJVtiSsoaRaRA2D5U4cJ5thIG4ssbB8= +cosmossdk.io/math v1.1.2 h1:ORZetZCTyWkI5GlZ6CZS28fMHi83ZYf+A2vVnHNzZBM= +cosmossdk.io/math v1.1.2/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZazG8= +github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= github.com/cockroachdb/pebble v0.0.0-20230525220056-bb4fc9527b3b h1:LCs8gDhg6vt8A3dN7AEJxmCoETZ4qkySoVJVm3rcSJk= github.com/cockroachdb/pebble v0.0.0-20230525220056-bb4fc9527b3b/go.mod h1:TkdVsGYRqtULUppt2RbC+YaKtTHnHoWa2apfFrSKABw= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/redact v1.1.4 h1:Y0XrVI2FAyofNyGveodTN//qdpPtFKcKTeCBsK3AHAQ= -github.com/cockroachdb/redact v1.1.4/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -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/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= -github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= -github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/gogoproto v1.5.0 h1:SDVwzEqZDDBoslaeZg+dGE55hdzHfgUA40pEanMh52o= +github.com/cosmos/gogoproto v1.5.0/go.mod h1:iUM31aofn3ymidYG6bUR5ZFrk+Om8p5s754eMUcyp8I= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= github.com/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 v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= 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/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.21.0 h1:c9l5F1nPF30JIppulk4veau90PK6Smu3abgVtVQWon4= -github.com/getsentry/sentry-go v0.21.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= -github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= -github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= +github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= 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/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= 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.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= 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/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.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.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -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/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= 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.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/linxGnu/grocksdb v1.7.16 h1:Q2co1xrpdkr5Hx3Fp+f+f7fRGhQFQhvi/+226dtLmA8= github.com/linxGnu/grocksdb v1.7.16/go.mod h1:JkS7pl5qWpGpuVb3bPqTz8nC12X3YtPZT+Xq7+QfQo4= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= -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/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= 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.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= @@ -210,233 +97,118 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= -github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -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/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= +github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/procfs v0.10.0 h1:UkG7GPYkO4UZyLnyXjaWYcgOSONqwdBqFUT95ugmt6I= -github.com/prometheus/procfs v0.10.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= +github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= +github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= -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.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= +github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= +github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -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-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= 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/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/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-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-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-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-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/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= 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-20190222072716-a9d3bda3a223/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-20190813064441-fde4db37ae7a/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-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/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-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/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.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 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/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= 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= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5 h1:SbSDUWW1PAO24TNpLdeheoYPd7kllICcLU52x6eD4kQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= +google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= 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.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= 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-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= 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= @@ -444,15 +216,8 @@ 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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/core/header/service.go b/core/header/service.go index 982b9a049c15..cce7e6de30c5 100644 --- a/core/header/service.go +++ b/core/header/service.go @@ -16,4 +16,5 @@ type Info struct { Hash []byte // Hash returns the hash of the block header Time time.Time // Time returns the time of the block ChainID string // ChainId returns the chain ID of the block + AppHash []byte // AppHash used in the current block header } diff --git a/core/internal/buf.gen.yaml b/core/internal/buf.gen.yaml deleted file mode 100644 index f4e31b03e8ae..000000000000 --- a/core/internal/buf.gen.yaml +++ /dev/null @@ -1,11 +0,0 @@ -version: v1 -managed: - enabled: true - go_package_prefix: - default: cosmossdk.io/core/internal - override: - buf.build/cosmos/cosmos-sdk: cosmossdk.io/api -plugins: - - name: go-pulsar - out: . - opt: paths=source_relative diff --git a/core/internal/buf.yaml b/core/internal/buf.yaml deleted file mode 100644 index ac1df238ebec..000000000000 --- a/core/internal/buf.yaml +++ /dev/null @@ -1,9 +0,0 @@ -version: v1 -lint: - use: - - DEFAULT - except: - - PACKAGE_VERSION_SUFFIX -breaking: - ignore: - - testpb diff --git a/core/internal/registry.go b/core/internal/registry.go deleted file mode 100644 index ce8dbb203f17..000000000000 --- a/core/internal/registry.go +++ /dev/null @@ -1,58 +0,0 @@ -package internal - -import ( - "fmt" - "reflect" - - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" - - appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" -) - -// ModuleRegistry is the registry of module initializers indexed by their golang -// type to avoid any issues with protobuf descriptor initialization. -var ModuleRegistry = map[reflect.Type]*ModuleInitializer{} - -// ModuleInitializer describes how to initialize a module. -type ModuleInitializer struct { - ConfigGoType reflect.Type - ConfigProtoMessage proto.Message - Error error - Providers []interface{} - Invokers []interface{} -} - -// ModulesByProtoMessageName should be used to retrieve modules by their protobuf name. -// This is done lazily after module registration to deal with non-deterministic issues -// that can occur with respect to protobuf descriptor initialization. -func ModulesByProtoMessageName() (map[protoreflect.FullName]*ModuleInitializer, error) { - res := map[protoreflect.FullName]*ModuleInitializer{} - - for _, initializer := range ModuleRegistry { - descriptor := initializer.ConfigProtoMessage.ProtoReflect().Descriptor() - fullName := descriptor.FullName() - if _, ok := res[fullName]; ok { - return nil, fmt.Errorf("duplicate module registratio for %s", fullName) - } - - modDesc := proto.GetExtension(descriptor.Options(), appv1alpha1.E_Module).(*appv1alpha1.ModuleDescriptor) - if modDesc == nil { - return nil, fmt.Errorf( - "protobuf type %s registered as a module should have the option %s", - fullName, - appv1alpha1.E_Module.TypeDescriptor().FullName()) - } - - if modDesc.GoImport == "" { - return nil, fmt.Errorf( - "protobuf type %s registered as a module should have ModuleDescriptor.go_import specified", - fullName, - ) - } - - res[fullName] = initializer - } - - return res, nil -} diff --git a/core/internal/testpb/test.proto b/core/internal/testpb/test.proto deleted file mode 100644 index fe6535a2d44a..000000000000 --- a/core/internal/testpb/test.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package testpb; - -import "cosmos/app/v1alpha1/module.proto"; - -message TestRuntimeModule { - option (cosmos.app.v1alpha1.module) = { - go_import: "cosmossdk.io/core/internal/testpb" - }; -} - -message TestModuleA { - option (cosmos.app.v1alpha1.module) = { - go_import: "cosmossdk.io/core/internal/testpb" - }; -} - -message TestModuleB { - option (cosmos.app.v1alpha1.module) = { - go_import: "cosmossdk.io/core/internal/testpb" - }; -} - -message TestUnregisteredModule { - option (cosmos.app.v1alpha1.module) = { - go_import: "cosmossdk.io/core/internal/testpb" - }; -} - -message TestNoModuleOptionModule {} - -message TestNoGoImportModule { - option (cosmos.app.v1alpha1.module) = { - }; -} diff --git a/core/internal/testpb/test.pulsar.go b/core/internal/testpb/test.pulsar.go deleted file mode 100644 index 90dcab61cc2b..000000000000 --- a/core/internal/testpb/test.pulsar.go +++ /dev/null @@ -1,2483 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package testpb - -import ( - _ "cosmossdk.io/api/cosmos/app/v1alpha1" - 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" - sync "sync" -) - -var ( - md_TestRuntimeModule protoreflect.MessageDescriptor -) - -func init() { - file_testpb_test_proto_init() - md_TestRuntimeModule = File_testpb_test_proto.Messages().ByName("TestRuntimeModule") -} - -var _ protoreflect.Message = (*fastReflection_TestRuntimeModule)(nil) - -type fastReflection_TestRuntimeModule TestRuntimeModule - -func (x *TestRuntimeModule) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestRuntimeModule)(x) -} - -func (x *TestRuntimeModule) slowProtoReflect() protoreflect.Message { - mi := &file_testpb_test_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_TestRuntimeModule_messageType fastReflection_TestRuntimeModule_messageType -var _ protoreflect.MessageType = fastReflection_TestRuntimeModule_messageType{} - -type fastReflection_TestRuntimeModule_messageType struct{} - -func (x fastReflection_TestRuntimeModule_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestRuntimeModule)(nil) -} -func (x fastReflection_TestRuntimeModule_messageType) New() protoreflect.Message { - return new(fastReflection_TestRuntimeModule) -} -func (x fastReflection_TestRuntimeModule_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestRuntimeModule -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestRuntimeModule) Descriptor() protoreflect.MessageDescriptor { - return md_TestRuntimeModule -} - -// 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_TestRuntimeModule) Type() protoreflect.MessageType { - return _fastReflection_TestRuntimeModule_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestRuntimeModule) New() protoreflect.Message { - return new(fastReflection_TestRuntimeModule) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestRuntimeModule) Interface() protoreflect.ProtoMessage { - return (*TestRuntimeModule)(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_TestRuntimeModule) 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_TestRuntimeModule) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestRuntimeModule")) - } - panic(fmt.Errorf("message testpb.TestRuntimeModule 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_TestRuntimeModule) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestRuntimeModule")) - } - panic(fmt.Errorf("message testpb.TestRuntimeModule 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_TestRuntimeModule) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestRuntimeModule")) - } - panic(fmt.Errorf("message testpb.TestRuntimeModule 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_TestRuntimeModule) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestRuntimeModule")) - } - panic(fmt.Errorf("message testpb.TestRuntimeModule 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_TestRuntimeModule) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestRuntimeModule")) - } - panic(fmt.Errorf("message testpb.TestRuntimeModule 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_TestRuntimeModule) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestRuntimeModule")) - } - panic(fmt.Errorf("message testpb.TestRuntimeModule 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_TestRuntimeModule) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testpb.TestRuntimeModule", 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_TestRuntimeModule) 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_TestRuntimeModule) 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_TestRuntimeModule) 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_TestRuntimeModule) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestRuntimeModule) - 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().(*TestRuntimeModule) - 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().(*TestRuntimeModule) - 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: TestRuntimeModule: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestRuntimeModule: 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_TestModuleA protoreflect.MessageDescriptor -) - -func init() { - file_testpb_test_proto_init() - md_TestModuleA = File_testpb_test_proto.Messages().ByName("TestModuleA") -} - -var _ protoreflect.Message = (*fastReflection_TestModuleA)(nil) - -type fastReflection_TestModuleA TestModuleA - -func (x *TestModuleA) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestModuleA)(x) -} - -func (x *TestModuleA) slowProtoReflect() protoreflect.Message { - mi := &file_testpb_test_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_TestModuleA_messageType fastReflection_TestModuleA_messageType -var _ protoreflect.MessageType = fastReflection_TestModuleA_messageType{} - -type fastReflection_TestModuleA_messageType struct{} - -func (x fastReflection_TestModuleA_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestModuleA)(nil) -} -func (x fastReflection_TestModuleA_messageType) New() protoreflect.Message { - return new(fastReflection_TestModuleA) -} -func (x fastReflection_TestModuleA_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestModuleA -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestModuleA) Descriptor() protoreflect.MessageDescriptor { - return md_TestModuleA -} - -// 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_TestModuleA) Type() protoreflect.MessageType { - return _fastReflection_TestModuleA_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestModuleA) New() protoreflect.Message { - return new(fastReflection_TestModuleA) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestModuleA) Interface() protoreflect.ProtoMessage { - return (*TestModuleA)(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_TestModuleA) 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_TestModuleA) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestModuleA")) - } - panic(fmt.Errorf("message testpb.TestModuleA 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_TestModuleA) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestModuleA")) - } - panic(fmt.Errorf("message testpb.TestModuleA 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_TestModuleA) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestModuleA")) - } - panic(fmt.Errorf("message testpb.TestModuleA 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_TestModuleA) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestModuleA")) - } - panic(fmt.Errorf("message testpb.TestModuleA 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_TestModuleA) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestModuleA")) - } - panic(fmt.Errorf("message testpb.TestModuleA 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_TestModuleA) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestModuleA")) - } - panic(fmt.Errorf("message testpb.TestModuleA 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_TestModuleA) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testpb.TestModuleA", 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_TestModuleA) 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_TestModuleA) 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_TestModuleA) 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_TestModuleA) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestModuleA) - 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().(*TestModuleA) - 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().(*TestModuleA) - 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: TestModuleA: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestModuleA: 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_TestModuleB protoreflect.MessageDescriptor -) - -func init() { - file_testpb_test_proto_init() - md_TestModuleB = File_testpb_test_proto.Messages().ByName("TestModuleB") -} - -var _ protoreflect.Message = (*fastReflection_TestModuleB)(nil) - -type fastReflection_TestModuleB TestModuleB - -func (x *TestModuleB) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestModuleB)(x) -} - -func (x *TestModuleB) slowProtoReflect() protoreflect.Message { - mi := &file_testpb_test_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_TestModuleB_messageType fastReflection_TestModuleB_messageType -var _ protoreflect.MessageType = fastReflection_TestModuleB_messageType{} - -type fastReflection_TestModuleB_messageType struct{} - -func (x fastReflection_TestModuleB_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestModuleB)(nil) -} -func (x fastReflection_TestModuleB_messageType) New() protoreflect.Message { - return new(fastReflection_TestModuleB) -} -func (x fastReflection_TestModuleB_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestModuleB -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestModuleB) Descriptor() protoreflect.MessageDescriptor { - return md_TestModuleB -} - -// 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_TestModuleB) Type() protoreflect.MessageType { - return _fastReflection_TestModuleB_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestModuleB) New() protoreflect.Message { - return new(fastReflection_TestModuleB) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestModuleB) Interface() protoreflect.ProtoMessage { - return (*TestModuleB)(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_TestModuleB) 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_TestModuleB) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestModuleB")) - } - panic(fmt.Errorf("message testpb.TestModuleB 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_TestModuleB) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestModuleB")) - } - panic(fmt.Errorf("message testpb.TestModuleB 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_TestModuleB) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestModuleB")) - } - panic(fmt.Errorf("message testpb.TestModuleB 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_TestModuleB) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestModuleB")) - } - panic(fmt.Errorf("message testpb.TestModuleB 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_TestModuleB) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestModuleB")) - } - panic(fmt.Errorf("message testpb.TestModuleB 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_TestModuleB) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestModuleB")) - } - panic(fmt.Errorf("message testpb.TestModuleB 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_TestModuleB) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testpb.TestModuleB", 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_TestModuleB) 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_TestModuleB) 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_TestModuleB) 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_TestModuleB) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestModuleB) - 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().(*TestModuleB) - 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().(*TestModuleB) - 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: TestModuleB: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestModuleB: 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_TestUnregisteredModule protoreflect.MessageDescriptor -) - -func init() { - file_testpb_test_proto_init() - md_TestUnregisteredModule = File_testpb_test_proto.Messages().ByName("TestUnregisteredModule") -} - -var _ protoreflect.Message = (*fastReflection_TestUnregisteredModule)(nil) - -type fastReflection_TestUnregisteredModule TestUnregisteredModule - -func (x *TestUnregisteredModule) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestUnregisteredModule)(x) -} - -func (x *TestUnregisteredModule) slowProtoReflect() protoreflect.Message { - mi := &file_testpb_test_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TestUnregisteredModule_messageType fastReflection_TestUnregisteredModule_messageType -var _ protoreflect.MessageType = fastReflection_TestUnregisteredModule_messageType{} - -type fastReflection_TestUnregisteredModule_messageType struct{} - -func (x fastReflection_TestUnregisteredModule_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestUnregisteredModule)(nil) -} -func (x fastReflection_TestUnregisteredModule_messageType) New() protoreflect.Message { - return new(fastReflection_TestUnregisteredModule) -} -func (x fastReflection_TestUnregisteredModule_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestUnregisteredModule -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestUnregisteredModule) Descriptor() protoreflect.MessageDescriptor { - return md_TestUnregisteredModule -} - -// 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_TestUnregisteredModule) Type() protoreflect.MessageType { - return _fastReflection_TestUnregisteredModule_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestUnregisteredModule) New() protoreflect.Message { - return new(fastReflection_TestUnregisteredModule) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestUnregisteredModule) Interface() protoreflect.ProtoMessage { - return (*TestUnregisteredModule)(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_TestUnregisteredModule) 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_TestUnregisteredModule) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestUnregisteredModule")) - } - panic(fmt.Errorf("message testpb.TestUnregisteredModule 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_TestUnregisteredModule) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestUnregisteredModule")) - } - panic(fmt.Errorf("message testpb.TestUnregisteredModule 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_TestUnregisteredModule) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestUnregisteredModule")) - } - panic(fmt.Errorf("message testpb.TestUnregisteredModule 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_TestUnregisteredModule) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestUnregisteredModule")) - } - panic(fmt.Errorf("message testpb.TestUnregisteredModule 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_TestUnregisteredModule) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestUnregisteredModule")) - } - panic(fmt.Errorf("message testpb.TestUnregisteredModule 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_TestUnregisteredModule) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestUnregisteredModule")) - } - panic(fmt.Errorf("message testpb.TestUnregisteredModule 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_TestUnregisteredModule) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testpb.TestUnregisteredModule", 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_TestUnregisteredModule) 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_TestUnregisteredModule) 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_TestUnregisteredModule) 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_TestUnregisteredModule) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestUnregisteredModule) - 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().(*TestUnregisteredModule) - 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().(*TestUnregisteredModule) - 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: TestUnregisteredModule: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestUnregisteredModule: 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_TestNoModuleOptionModule protoreflect.MessageDescriptor -) - -func init() { - file_testpb_test_proto_init() - md_TestNoModuleOptionModule = File_testpb_test_proto.Messages().ByName("TestNoModuleOptionModule") -} - -var _ protoreflect.Message = (*fastReflection_TestNoModuleOptionModule)(nil) - -type fastReflection_TestNoModuleOptionModule TestNoModuleOptionModule - -func (x *TestNoModuleOptionModule) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestNoModuleOptionModule)(x) -} - -func (x *TestNoModuleOptionModule) slowProtoReflect() protoreflect.Message { - mi := &file_testpb_test_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TestNoModuleOptionModule_messageType fastReflection_TestNoModuleOptionModule_messageType -var _ protoreflect.MessageType = fastReflection_TestNoModuleOptionModule_messageType{} - -type fastReflection_TestNoModuleOptionModule_messageType struct{} - -func (x fastReflection_TestNoModuleOptionModule_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestNoModuleOptionModule)(nil) -} -func (x fastReflection_TestNoModuleOptionModule_messageType) New() protoreflect.Message { - return new(fastReflection_TestNoModuleOptionModule) -} -func (x fastReflection_TestNoModuleOptionModule_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestNoModuleOptionModule -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestNoModuleOptionModule) Descriptor() protoreflect.MessageDescriptor { - return md_TestNoModuleOptionModule -} - -// 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_TestNoModuleOptionModule) Type() protoreflect.MessageType { - return _fastReflection_TestNoModuleOptionModule_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestNoModuleOptionModule) New() protoreflect.Message { - return new(fastReflection_TestNoModuleOptionModule) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestNoModuleOptionModule) Interface() protoreflect.ProtoMessage { - return (*TestNoModuleOptionModule)(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_TestNoModuleOptionModule) 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_TestNoModuleOptionModule) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestNoModuleOptionModule")) - } - panic(fmt.Errorf("message testpb.TestNoModuleOptionModule 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_TestNoModuleOptionModule) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestNoModuleOptionModule")) - } - panic(fmt.Errorf("message testpb.TestNoModuleOptionModule 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_TestNoModuleOptionModule) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestNoModuleOptionModule")) - } - panic(fmt.Errorf("message testpb.TestNoModuleOptionModule 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_TestNoModuleOptionModule) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestNoModuleOptionModule")) - } - panic(fmt.Errorf("message testpb.TestNoModuleOptionModule 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_TestNoModuleOptionModule) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestNoModuleOptionModule")) - } - panic(fmt.Errorf("message testpb.TestNoModuleOptionModule 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_TestNoModuleOptionModule) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestNoModuleOptionModule")) - } - panic(fmt.Errorf("message testpb.TestNoModuleOptionModule 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_TestNoModuleOptionModule) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testpb.TestNoModuleOptionModule", 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_TestNoModuleOptionModule) 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_TestNoModuleOptionModule) 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_TestNoModuleOptionModule) 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_TestNoModuleOptionModule) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestNoModuleOptionModule) - 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().(*TestNoModuleOptionModule) - 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().(*TestNoModuleOptionModule) - 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: TestNoModuleOptionModule: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestNoModuleOptionModule: 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_TestNoGoImportModule protoreflect.MessageDescriptor -) - -func init() { - file_testpb_test_proto_init() - md_TestNoGoImportModule = File_testpb_test_proto.Messages().ByName("TestNoGoImportModule") -} - -var _ protoreflect.Message = (*fastReflection_TestNoGoImportModule)(nil) - -type fastReflection_TestNoGoImportModule TestNoGoImportModule - -func (x *TestNoGoImportModule) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestNoGoImportModule)(x) -} - -func (x *TestNoGoImportModule) slowProtoReflect() protoreflect.Message { - mi := &file_testpb_test_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_TestNoGoImportModule_messageType fastReflection_TestNoGoImportModule_messageType -var _ protoreflect.MessageType = fastReflection_TestNoGoImportModule_messageType{} - -type fastReflection_TestNoGoImportModule_messageType struct{} - -func (x fastReflection_TestNoGoImportModule_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestNoGoImportModule)(nil) -} -func (x fastReflection_TestNoGoImportModule_messageType) New() protoreflect.Message { - return new(fastReflection_TestNoGoImportModule) -} -func (x fastReflection_TestNoGoImportModule_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestNoGoImportModule -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestNoGoImportModule) Descriptor() protoreflect.MessageDescriptor { - return md_TestNoGoImportModule -} - -// 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_TestNoGoImportModule) Type() protoreflect.MessageType { - return _fastReflection_TestNoGoImportModule_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestNoGoImportModule) New() protoreflect.Message { - return new(fastReflection_TestNoGoImportModule) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestNoGoImportModule) Interface() protoreflect.ProtoMessage { - return (*TestNoGoImportModule)(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_TestNoGoImportModule) 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_TestNoGoImportModule) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestNoGoImportModule")) - } - panic(fmt.Errorf("message testpb.TestNoGoImportModule 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_TestNoGoImportModule) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestNoGoImportModule")) - } - panic(fmt.Errorf("message testpb.TestNoGoImportModule 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_TestNoGoImportModule) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestNoGoImportModule")) - } - panic(fmt.Errorf("message testpb.TestNoGoImportModule 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_TestNoGoImportModule) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestNoGoImportModule")) - } - panic(fmt.Errorf("message testpb.TestNoGoImportModule 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_TestNoGoImportModule) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestNoGoImportModule")) - } - panic(fmt.Errorf("message testpb.TestNoGoImportModule 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_TestNoGoImportModule) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestNoGoImportModule")) - } - panic(fmt.Errorf("message testpb.TestNoGoImportModule 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_TestNoGoImportModule) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testpb.TestNoGoImportModule", 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_TestNoGoImportModule) 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_TestNoGoImportModule) 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_TestNoGoImportModule) 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_TestNoGoImportModule) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestNoGoImportModule) - 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().(*TestNoGoImportModule) - 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().(*TestNoGoImportModule) - 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: TestNoGoImportModule: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestNoGoImportModule: 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, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: testpb/test.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) -) - -type TestRuntimeModule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *TestRuntimeModule) Reset() { - *x = TestRuntimeModule{} - if protoimpl.UnsafeEnabled { - mi := &file_testpb_test_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestRuntimeModule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestRuntimeModule) ProtoMessage() {} - -// Deprecated: Use TestRuntimeModule.ProtoReflect.Descriptor instead. -func (*TestRuntimeModule) Descriptor() ([]byte, []int) { - return file_testpb_test_proto_rawDescGZIP(), []int{0} -} - -type TestModuleA struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *TestModuleA) Reset() { - *x = TestModuleA{} - if protoimpl.UnsafeEnabled { - mi := &file_testpb_test_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestModuleA) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestModuleA) ProtoMessage() {} - -// Deprecated: Use TestModuleA.ProtoReflect.Descriptor instead. -func (*TestModuleA) Descriptor() ([]byte, []int) { - return file_testpb_test_proto_rawDescGZIP(), []int{1} -} - -type TestModuleB struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *TestModuleB) Reset() { - *x = TestModuleB{} - if protoimpl.UnsafeEnabled { - mi := &file_testpb_test_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestModuleB) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestModuleB) ProtoMessage() {} - -// Deprecated: Use TestModuleB.ProtoReflect.Descriptor instead. -func (*TestModuleB) Descriptor() ([]byte, []int) { - return file_testpb_test_proto_rawDescGZIP(), []int{2} -} - -type TestUnregisteredModule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *TestUnregisteredModule) Reset() { - *x = TestUnregisteredModule{} - if protoimpl.UnsafeEnabled { - mi := &file_testpb_test_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestUnregisteredModule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestUnregisteredModule) ProtoMessage() {} - -// Deprecated: Use TestUnregisteredModule.ProtoReflect.Descriptor instead. -func (*TestUnregisteredModule) Descriptor() ([]byte, []int) { - return file_testpb_test_proto_rawDescGZIP(), []int{3} -} - -type TestNoModuleOptionModule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *TestNoModuleOptionModule) Reset() { - *x = TestNoModuleOptionModule{} - if protoimpl.UnsafeEnabled { - mi := &file_testpb_test_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestNoModuleOptionModule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestNoModuleOptionModule) ProtoMessage() {} - -// Deprecated: Use TestNoModuleOptionModule.ProtoReflect.Descriptor instead. -func (*TestNoModuleOptionModule) Descriptor() ([]byte, []int) { - return file_testpb_test_proto_rawDescGZIP(), []int{4} -} - -type TestNoGoImportModule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *TestNoGoImportModule) Reset() { - *x = TestNoGoImportModule{} - if protoimpl.UnsafeEnabled { - mi := &file_testpb_test_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestNoGoImportModule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestNoGoImportModule) ProtoMessage() {} - -// Deprecated: Use TestNoGoImportModule.ProtoReflect.Descriptor instead. -func (*TestNoGoImportModule) Descriptor() ([]byte, []int) { - return file_testpb_test_proto_rawDescGZIP(), []int{5} -} - -var File_testpb_test_proto protoreflect.FileDescriptor - -var file_testpb_test_proto_rawDesc = []byte{ - 0x0a, 0x11, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x1a, 0x20, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3e, 0x0a, - 0x11, 0x54, 0x65, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4d, 0x6f, 0x64, 0x75, - 0x6c, 0x65, 0x3a, 0x29, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x23, 0x0a, 0x21, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x22, 0x38, 0x0a, - 0x0b, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x3a, 0x29, 0xba, 0xc0, - 0x96, 0xda, 0x01, 0x23, 0x0a, 0x21, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, - 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x22, 0x38, 0x0a, 0x0b, 0x54, 0x65, 0x73, 0x74, 0x4d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x42, 0x3a, 0x29, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x23, 0x0a, 0x21, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, - 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, - 0x62, 0x22, 0x43, 0x0a, 0x16, 0x54, 0x65, 0x73, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x65, 0x64, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x29, 0xba, 0xc0, 0x96, - 0xda, 0x01, 0x23, 0x0a, 0x21, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, - 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, - 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x22, 0x1a, 0x0a, 0x18, 0x54, 0x65, 0x73, 0x74, 0x4e, 0x6f, - 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x75, - 0x6c, 0x65, 0x22, 0x1e, 0x0a, 0x14, 0x54, 0x65, 0x73, 0x74, 0x4e, 0x6f, 0x47, 0x6f, 0x49, 0x6d, - 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x06, 0xba, 0xc0, 0x96, 0xda, - 0x01, 0x00, 0x42, 0x72, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, - 0x42, 0x09, 0x54, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x21, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, - 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0xca, - 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0xe2, 0x02, 0x12, 0x54, 0x65, 0x73, 0x74, 0x70, - 0x62, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, - 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_testpb_test_proto_rawDescOnce sync.Once - file_testpb_test_proto_rawDescData = file_testpb_test_proto_rawDesc -) - -func file_testpb_test_proto_rawDescGZIP() []byte { - file_testpb_test_proto_rawDescOnce.Do(func() { - file_testpb_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_testpb_test_proto_rawDescData) - }) - return file_testpb_test_proto_rawDescData -} - -var file_testpb_test_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_testpb_test_proto_goTypes = []interface{}{ - (*TestRuntimeModule)(nil), // 0: testpb.TestRuntimeModule - (*TestModuleA)(nil), // 1: testpb.TestModuleA - (*TestModuleB)(nil), // 2: testpb.TestModuleB - (*TestUnregisteredModule)(nil), // 3: testpb.TestUnregisteredModule - (*TestNoModuleOptionModule)(nil), // 4: testpb.TestNoModuleOptionModule - (*TestNoGoImportModule)(nil), // 5: testpb.TestNoGoImportModule -} -var file_testpb_test_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_testpb_test_proto_init() } -func file_testpb_test_proto_init() { - if File_testpb_test_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_testpb_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestRuntimeModule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_testpb_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestModuleA); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_testpb_test_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestModuleB); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_testpb_test_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestUnregisteredModule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_testpb_test_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestNoModuleOptionModule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_testpb_test_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestNoGoImportModule); 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_testpb_test_proto_rawDesc, - NumEnums: 0, - NumMessages: 6, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_testpb_test_proto_goTypes, - DependencyIndexes: file_testpb_test_proto_depIdxs, - MessageInfos: file_testpb_test_proto_msgTypes, - }.Build() - File_testpb_test_proto = out.File - file_testpb_test_proto_rawDesc = nil - file_testpb_test_proto_goTypes = nil - file_testpb_test_proto_depIdxs = nil -} diff --git a/crypto/armor.go b/crypto/armor.go index ee858f43f4e5..aab662161c1a 100644 --- a/crypto/armor.go +++ b/crypto/armor.go @@ -8,10 +8,10 @@ import ( "github.com/cometbft/cometbft/crypto" "golang.org/x/crypto/argon2" + "golang.org/x/crypto/chacha20poly1305" "golang.org/x/crypto/openpgp/armor" //nolint:staticcheck //TODO: remove this dependency errorsmod "cosmossdk.io/errors" - "golang.org/x/crypto/chacha20poly1305" "github.com/cosmos/cosmos-sdk/codec/legacy" "github.com/cosmos/cosmos-sdk/crypto/keys/bcrypt" diff --git a/crypto/armor_test.go b/crypto/armor_test.go index 0533aec90837..f774165ae4d8 100644 --- a/crypto/armor_test.go +++ b/crypto/armor_test.go @@ -8,16 +8,15 @@ import ( "testing" cmtcrypto "github.com/cometbft/cometbft/crypto" - "github.com/cosmos/cosmos-sdk/crypto/xsalsa20symmetric" - - _ "github.com/cosmos/cosmos-sdk/runtime" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "cosmossdk.io/core/address" "cosmossdk.io/depinject" "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/codec" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/codec/legacy" "github.com/cosmos/cosmos-sdk/crypto" "github.com/cosmos/cosmos-sdk/crypto/hd" @@ -25,6 +24,8 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/bcrypt" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/crypto/xsalsa20symmetric" + "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil/configurator" "github.com/cosmos/cosmos-sdk/types" ) @@ -81,7 +82,11 @@ func TestArmorUnarmorPubKey(t *testing.T) { err := depinject.Inject(depinject.Configs( configurator.NewAppConfig(), - depinject.Supply(log.NewNopLogger()), + depinject.Supply(log.NewNopLogger(), + func() address.Codec { return addresscodec.NewBech32Codec("cosmos") }, + func() runtime.ValidatorAddressCodec { return addresscodec.NewBech32Codec("cosmosvaloper") }, + func() runtime.ConsensusAddressCodec { return addresscodec.NewBech32Codec("cosmosvalcons") }, + ), ), &cdc) require.NoError(t, err) diff --git a/crypto/keyring/autocli.go b/crypto/keyring/autocli.go new file mode 100644 index 000000000000..0dd91ff60a43 --- /dev/null +++ b/crypto/keyring/autocli.go @@ -0,0 +1,86 @@ +package keyring + +import ( + signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" + + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" +) + +// autoCLIKeyring represents the keyring interface used by the AutoCLI. +// It purposely does not import the AutoCLI package to avoid circular dependencies. +type autoCLIKeyring interface { + // List returns the names of all keys stored in the keyring. + List() ([]string, error) + + // LookupAddressByKeyName returns the address of the key with the given name. + LookupAddressByKeyName(name string) ([]byte, error) + + // GetPubKey returns the public key of the key with the given name. + GetPubKey(name string) (cryptotypes.PubKey, error) + + // Sign signs the given bytes with the key with the given name. + Sign(name string, msg []byte, signMode signingv1beta1.SignMode) ([]byte, error) +} + +// NewAutoCLIKeyring wraps the SDK keyring and make it compatible with the AutoCLI keyring interfaces. +func NewAutoCLIKeyring(kr Keyring) (autoCLIKeyring, error) { + return &autoCLIKeyringAdapter{kr}, nil +} + +type autoCLIKeyringAdapter struct { + Keyring +} + +func (a *autoCLIKeyringAdapter) List() ([]string, error) { + list, err := a.Keyring.List() + if err != nil { + return nil, err + } + + names := make([]string, len(list)) + for i, key := range list { + names[i] = key.Name + } + + return names, nil +} + +// LookupAddressByKeyName returns the address of a key stored in the keyring +func (a *autoCLIKeyringAdapter) LookupAddressByKeyName(name string) ([]byte, error) { + record, err := a.Keyring.Key(name) + if err != nil { + return nil, err + } + + addr, err := record.GetAddress() + if err != nil { + return nil, err + } + + return addr, nil +} + +func (a *autoCLIKeyringAdapter) GetPubKey(name string) (cryptotypes.PubKey, error) { + record, err := a.Keyring.Key(name) + if err != nil { + return nil, err + } + + return record.GetPubKey() +} + +func (a *autoCLIKeyringAdapter) Sign(name string, msg []byte, signMode signingv1beta1.SignMode) ([]byte, error) { + record, err := a.Keyring.Key(name) + if err != nil { + return nil, err + } + + sdkSignMode, err := authsigning.APISignModeToInternal(signMode) + if err != nil { + return nil, err + } + + signBytes, _, err := a.Keyring.Sign(record.Name, msg, sdkSignMode) + return signBytes, err +} diff --git a/crypto/keyring/doc.go b/crypto/keyring/doc.go index a3bc8d8824ac..87a9e0908b36 100644 --- a/crypto/keyring/doc.go +++ b/crypto/keyring/doc.go @@ -33,6 +33,8 @@ // https://github.com/KDE/kwallet // pass This backend uses the pass command line utility to store and retrieve keys: // https://www.passwordstore.org/ +// keyctl This backend leverages the Linux's kernel security key management system +// to store cryptographic keys securely in memory. This is available on Linux only. // test This backend stores keys insecurely to disk. It does not prompt for a password to // be unlocked and it should be used only for testing purposes. // memory Same instance as returned by NewInMemory. This backend uses a transient storage. Keys diff --git a/crypto/keyring/keyring.go b/crypto/keyring/keyring.go index 8610cbf1473d..6598aa88738f 100644 --- a/crypto/keyring/keyring.go +++ b/crypto/keyring/keyring.go @@ -12,13 +12,11 @@ import ( "github.com/99designs/keyring" "github.com/cockroachdb/errors" - "github.com/cosmos/go-bip39" + "golang.org/x/crypto/bcrypt" errorsmod "cosmossdk.io/errors" - "golang.org/x/crypto/bcrypt" - "github.com/cosmos/cosmos-sdk/client/input" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto" @@ -47,6 +45,8 @@ const ( // temporary pass phrase for exporting a key during a key rename passPhrase = "temp" + // prefix for exported hex private keys + hexPrefix = "0x" ) var ( @@ -117,7 +117,8 @@ type Signer interface { type Importer interface { // ImportPrivKey imports ASCII armored passphrase-encrypted private keys. ImportPrivKey(uid, armor, passphrase string) error - + // ImportPrivKeyHex imports hex encoded keys. + ImportPrivKeyHex(uid, privKey, algoStr string) error // ImportPubKey imports ASCII armored public keys. ImportPubKey(uid, armor string) error } @@ -142,23 +143,6 @@ type Exporter interface { // Option overrides keyring configuration options. type Option func(options *Options) -// Options define the options of the Keyring. -type Options struct { - // supported signing algorithms for keyring - SupportedAlgos SigningAlgoList - // supported signing algorithms for Ledger - SupportedAlgosLedger SigningAlgoList - // define Ledger Derivation function - LedgerDerivation func() (ledger.SECP256K1, error) - // define Ledger key generation function - LedgerCreateKey func([]byte) types.PubKey - // define Ledger app name - LedgerAppName string - // indicate whether Ledger should skip DER Conversion on signature, - // depending on which format (DER or BER) the Ledger app returns signatures - LedgerSigSkipDERConv bool -} - // NewInMemory creates a transient keyring useful for testing // purposes and on-the-fly key generation. // Keybase options can be applied when generating this new Keybase. @@ -175,7 +159,7 @@ func NewInMemoryWithKeyring(kr keyring.Keyring, cdc codec.Codec, opts ...Option) // New creates a new instance of a keyring. // Keyring options can be applied when generating the new instance. // Available backends are "os", "file", "kwallet", "memory", "pass", "test". -func New( +func newKeyringGeneric( appName, backend, rootDir string, userInput io.Reader, cdc codec.Codec, opts ...Option, ) (Keyring, error) { var ( @@ -337,6 +321,29 @@ func (ks keystore) ImportPrivKey(uid, armor, passphrase string) error { return nil } +func (ks keystore) ImportPrivKeyHex(uid, privKey, algoStr string) error { + if _, err := ks.Key(uid); err == nil { + return errorsmod.Wrap(ErrOverwriteKey, uid) + } + if privKey[:2] == hexPrefix { + privKey = privKey[2:] + } + decodedPriv, err := hex.DecodeString(privKey) + if err != nil { + return err + } + algo, err := NewSigningAlgoFromString(algoStr, ks.options.SupportedAlgos) + if err != nil { + return err + } + priv := algo.Generate()(decodedPriv) + _, err = ks.writeLocalKey(uid, priv) + if err != nil { + return err + } + return nil +} + func (ks keystore) ImportPubKey(uid, armor string) error { if _, err := ks.Key(uid); err == nil { return errorsmod.Wrap(ErrOverwriteKey, uid) @@ -610,6 +617,14 @@ func SignWithLedger(k *Record, msg []byte, signMode signing.SignMode) (sig []byt if err != nil { return } + ledgerPubKey := priv.PubKey() + pubKey, err := k.GetPubKey() + if err != nil { + return nil, nil, err + } + if !pubKey.Equals(ledgerPubKey) { + return nil, nil, fmt.Errorf("the public key that the user attempted to sign with does not match the public key on the ledger device. %v does not match %v", pubKey.String(), ledgerPubKey.String()) + } switch signMode { case signing.SignMode_SIGN_MODE_TEXTUAL: @@ -892,7 +907,7 @@ func (ks keystore) MigrateAll() ([]*Record, error) { rec, err := ks.migrate(key) if err != nil { - fmt.Printf("migrate err for key %s: %q\n", key, err) + fmt.Fprintf(os.Stderr, "migrate err for key %s: %q\n", key, err) continue } @@ -962,7 +977,7 @@ func (ks keystore) migrate(key string) (*Record, error) { return nil, errorsmod.Wrap(err, "unable to set keyring.Item") } - fmt.Printf("Successfully migrated key %s.\n", key) + fmt.Fprintf(os.Stderr, "Successfully migrated key %s.\n", key) return k, nil } diff --git a/crypto/keyring/keyring_ledger_test.go b/crypto/keyring/keyring_ledger_test.go index ca1b79bfbf99..0b123bd20eae 100644 --- a/crypto/keyring/keyring_ledger_test.go +++ b/crypto/keyring/keyring_ledger_test.go @@ -8,9 +8,13 @@ import ( "testing" "github.com/cockroachdb/errors" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/crypto/hd" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/crypto/ledger" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" ) @@ -133,3 +137,65 @@ func TestAltKeyring_SaveLedgerKey(t *testing.T) { path := ledgerInfo.GetPath() require.Equal(t, "m/44'/118'/3'/0/1", path.String()) } + +func TestSignWithLedger(t *testing.T) { + // Create two distinct Ledger records: recordA and recordB. + // RecordA is added to the Ledger but recordB is not added. + pathA := hd.NewFundraiserParams(0, types.CoinType, 0) + privA, _, err := ledger.NewPrivKeySecp256k1(*pathA, "cosmos") + require.NoError(t, err) + recordA, err := NewLedgerRecord("ledgerA", privA.PubKey(), pathA) + require.NoError(t, err) + pubA, err := recordA.GetPubKey() + require.NoError(t, err) + + pathB := hd.NewFundraiserParams(0, types.CoinType, 1) + // privB won't be added to the Ledger because it doesn't use ledger.NewPrivKeySecp256k1 + privB := secp256k1.GenPrivKey() + recordB, err := NewLedgerRecord("ledgerB", privB.PubKey(), pathB) + require.NoError(t, err) + pubB, err := recordB.GetPubKey() + require.NoError(t, err) + + require.NotEqual(t, pubA, pubB) + type testCase struct { + name string + record *Record + msg []byte + wantSig []byte + wantPub cryptotypes.PubKey + wantErr bool + wantErrContains string + } + testCases := []testCase{ + { + name: "ordinary ledger tx", + record: recordA, + msg: []byte("msg"), + wantSig: []byte{0xfb, 0x93, 0x1b, 0xb9, 0x75, 0x25, 0xe7, 0x99, 0x64, 0xc2, 0x78, 0xf7, 0x94, 0x9a, 0x63, 0x83, 0xe2, 0x59, 0x76, 0x48, 0x1d, 0x2, 0xbc, 0xc2, 0x83, 0x21, 0x24, 0x4b, 0x95, 0x99, 0x25, 0x8b, 0x30, 0x38, 0x6, 0x61, 0x79, 0x9a, 0x9e, 0x8, 0x98, 0xfd, 0x34, 0xc6, 0x7e, 0x47, 0x4d, 0x5f, 0xe, 0xf3, 0xc3, 0xe7, 0xdd, 0xe3, 0x89, 0x80, 0xda, 0x8b, 0x48, 0x15, 0x34, 0xce, 0xdf, 0x1c}, + wantPub: pubA, + wantErr: false, + }, + { + name: "want error when the public key the user attempted to sign with doesn't match the public key on the ledger", + record: recordB, + msg: []byte("msg"), + wantSig: []byte(nil), + wantPub: nil, + wantErr: true, + wantErrContains: "the public key that the user attempted to sign with does not match the public key on the ledger device", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + sig, pub, err := SignWithLedger(tc.record, tc.msg, signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON) + assert.Equal(t, tc.wantSig, sig) + assert.Equal(t, tc.wantPub, pub) + if tc.wantErr { + assert.Error(t, err) + assert.Contains(t, err.Error(), tc.wantErrContains) + } + }) + } +} diff --git a/crypto/keyring/keyring_linux.go b/crypto/keyring/keyring_linux.go new file mode 100644 index 000000000000..7db47961bab1 --- /dev/null +++ b/crypto/keyring/keyring_linux.go @@ -0,0 +1,84 @@ +//go:build linux +// +build linux + +package keyring + +import ( + "fmt" + "io" + + "github.com/99designs/keyring" + + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/crypto/ledger" + "github.com/cosmos/cosmos-sdk/crypto/types" +) + +// Linux-only backend options. +const BackendKeyctl = "keyctl" + +func KeyctlScopeUser(options *Options) { setKeyctlScope(options, "user") } +func KeyctlScopeUserSession(options *Options) { setKeyctlScope(options, "usersession") } +func KeyctlScopeSession(options *Options) { setKeyctlScope(options, "session") } +func KeyctlScopeProcess(options *Options) { setKeyctlScope(options, "process") } +func KeyctlScopeThread(options *Options) { setKeyctlScope(options, "thread") } + +// Options define the options of the Keyring. +type Options struct { + // supported signing algorithms for keyring + SupportedAlgos SigningAlgoList + // supported signing algorithms for Ledger + SupportedAlgosLedger SigningAlgoList + // define Ledger Derivation function + LedgerDerivation func() (ledger.SECP256K1, error) + // define Ledger key generation function + LedgerCreateKey func([]byte) types.PubKey + // define Ledger app name + LedgerAppName string + // indicate whether Ledger should skip DER Conversion on signature, + // depending on which format (DER or BER) the Ledger app returns signatures + LedgerSigSkipDERConv bool + // KeyctlScope defines the scope of the keyctl's keyring. + KeyctlScope string +} + +func newKeyctlBackendConfig(appName, _ string, _ io.Reader, opts ...Option) keyring.Config { + options := Options{ + KeyctlScope: keyctlDefaultScope, // currently "process" + } + + for _, optionFn := range opts { + optionFn(&options) + } + + return keyring.Config{ + AllowedBackends: []keyring.BackendType{keyring.KeyCtlBackend}, + ServiceName: appName, + KeyCtlScope: options.KeyctlScope, + } +} + +// New creates a new instance of a keyring. +// Keyring options can be applied when generating the new instance. +// Available backends are "os", "file", "kwallet", "memory", "pass", "test", "keyctl". +func New( + appName, backend, rootDir string, userInput io.Reader, cdc codec.Codec, opts ...Option, +) (Keyring, error) { + if backend != BackendKeyctl { + return newKeyringGeneric(appName, backend, rootDir, userInput, cdc, opts...) + } + + db, err := keyring.Open(newKeyctlBackendConfig(appName, "", userInput, opts...)) + if err != nil { + return nil, fmt.Errorf("couldn't open keyring for %q: %w", appName, err) + } + + return newKeystore(db, cdc, backend, opts...), nil +} + +func setKeyctlScope(options *Options, scope string) { options.KeyctlScope = scope } + +// this is private as it is meant to be here for SDK devs convenience +// as the user does not need to pick any default when he wants to +// initialize keyctl with the default scope. +const keyctlDefaultScope = "process" diff --git a/crypto/keyring/keyring_linux_test.go b/crypto/keyring/keyring_linux_test.go new file mode 100644 index 000000000000..a6695b6b9471 --- /dev/null +++ b/crypto/keyring/keyring_linux_test.go @@ -0,0 +1,51 @@ +//go:build linux +// +build linux + +package keyring + +import ( + "errors" + "io" + "strings" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/codec" +) + +func TestNewKeyctlKeyring(t *testing.T) { + cdc := getCodec() + + tests := []struct { + name string + appName string + backend string + dir string + userInput io.Reader + cdc codec.Codec + expectedErr error + }{ + { + name: "keyctl backend", + appName: "cosmos", + backend: BackendKeyctl, + dir: t.TempDir(), + userInput: strings.NewReader(""), + cdc: cdc, + expectedErr: nil, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + kr, err := New(tt.appName, tt.backend, tt.dir, tt.userInput, tt.cdc) + if tt.expectedErr == nil { + require.NoError(t, err) + } else { + require.Error(t, err) + require.Nil(t, kr) + require.True(t, errors.Is(err, tt.expectedErr)) + } + }) + } +} diff --git a/crypto/keyring/keyring_other.go b/crypto/keyring/keyring_other.go new file mode 100644 index 000000000000..9c25a1e954e2 --- /dev/null +++ b/crypto/keyring/keyring_other.go @@ -0,0 +1,35 @@ +//go:build !linux +// +build !linux + +package keyring + +import ( + "io" + + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/crypto/ledger" + "github.com/cosmos/cosmos-sdk/crypto/types" +) + +// Options define the options of the Keyring. +type Options struct { + // supported signing algorithms for keyring + SupportedAlgos SigningAlgoList + // supported signing algorithms for Ledger + SupportedAlgosLedger SigningAlgoList + // define Ledger Derivation function + LedgerDerivation func() (ledger.SECP256K1, error) + // define Ledger key generation function + LedgerCreateKey func([]byte) types.PubKey + // define Ledger app name + LedgerAppName string + // indicate whether Ledger should skip DER Conversion on signature, + // depending on which format (DER or BER) the Ledger app returns signatures + LedgerSigSkipDERConv bool +} + +func New( + appName, backend, rootDir string, userInput io.Reader, cdc codec.Codec, opts ...Option, +) (Keyring, error) { + return newKeyringGeneric(appName, backend, rootDir, userInput, cdc, opts...) +} diff --git a/crypto/keyring/keyring_test.go b/crypto/keyring/keyring_test.go index e89b0ff24652..05d58981d7b4 100644 --- a/crypto/keyring/keyring_test.go +++ b/crypto/keyring/keyring_test.go @@ -564,7 +564,65 @@ func TestImportPrivKey(t *testing.T) { } } -func TestExportImportPrivKey(t *testing.T) { +func TestImportPrivKeyHex(t *testing.T) { + cdc := getCodec() + tests := []struct { + name string + uid string + backend string + hexKey string + algo string + expectedErr error + }{ + { + name: "correct import", + uid: "hexImport", + backend: BackendTest, + hexKey: "0xa3e57952e835ed30eea86a2993ac2a61c03e74f2085b3635bd94aa4d7ae0cfdf", + algo: "secp256k1", + expectedErr: nil, + }, + { + name: "correct import without prefix", + uid: "hexImport", + backend: BackendTest, + hexKey: "a3e57952e835ed30eea86a2993ac2a61c03e74f2085b3635bd94aa4d7ae0cfdf", + algo: "secp256k1", + expectedErr: nil, + }, + { + name: "wrong hex length", + uid: "hexImport", + backend: BackendTest, + hexKey: "0xae57952e835ed30eea86a2993ac2a61c03e74f2085b3635bd94aa4d7ae0cfdf", + algo: "secp256k1", + expectedErr: hex.ErrLength, + }, + { + name: "unsupported algo", + uid: "hexImport", + backend: BackendTest, + hexKey: "0xa3e57952e835ed30eea86a2993ac2a61c03e74f2085b3635bd94aa4d7ae0cfdf", + algo: "notSupportedAlgo", + expectedErr: ErrUnsupportedSigningAlgo, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + kb, err := New("TestExport", tt.backend, t.TempDir(), nil, cdc) + require.NoError(t, err) + err = kb.ImportPrivKeyHex(tt.uid, tt.hexKey, tt.algo) + if tt.expectedErr == nil { + require.NoError(t, err) + } else { + require.Error(t, err) + require.True(t, errors.Is(err, tt.expectedErr)) + } + }) + } +} + +func TestExportImportPrivKeyArmor(t *testing.T) { cdc := getCodec() tests := []struct { name string diff --git a/crypto/keyring/migration_test.go b/crypto/keyring/migration_test.go index 1e07fd16772e..a8ddee925acb 100644 --- a/crypto/keyring/migration_test.go +++ b/crypto/keyring/migration_test.go @@ -7,11 +7,10 @@ import ( "github.com/99designs/keyring" "github.com/stretchr/testify/suite" - "github.com/cosmos/cosmos-sdk/codec/legacy" - "github.com/cosmos/cosmos-sdk/crypto/hd" - errorsmod "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/codec/legacy" + "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" diff --git a/crypto/keyring/record_test.go b/crypto/keyring/record_test.go index 2ec0401d87ff..fdc5c661e563 100644 --- a/crypto/keyring/record_test.go +++ b/crypto/keyring/record_test.go @@ -4,13 +4,12 @@ import ( "strings" "testing" - "github.com/cosmos/cosmos-sdk/codec" "github.com/stretchr/testify/suite" + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" ) diff --git a/crypto/keys/bcrypt/bcrypt.go b/crypto/keys/bcrypt/bcrypt.go index 9badc4670cd1..f4f62d500cf7 100644 --- a/crypto/keys/bcrypt/bcrypt.go +++ b/crypto/keys/bcrypt/bcrypt.go @@ -8,6 +8,7 @@ package bcrypt // The code is a port of Provos and Mazières's C implementation. + import ( "crypto/subtle" "errors" diff --git a/crypto/keys/multisig/multisig_test.go b/crypto/keys/multisig/multisig_test.go index 9c02fe6e1550..3fa46e35d0b6 100644 --- a/crypto/keys/multisig/multisig_test.go +++ b/crypto/keys/multisig/multisig_test.go @@ -6,10 +6,12 @@ import ( "github.com/stretchr/testify/require" + "cosmossdk.io/core/address" "cosmossdk.io/depinject" "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/codec" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/codec/legacy" "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" @@ -17,7 +19,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/crypto/types/multisig" - _ "github.com/cosmos/cosmos-sdk/runtime" + "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil/configurator" "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" @@ -359,7 +361,11 @@ func TestDisplay(t *testing.T) { err := depinject.Inject( depinject.Configs( configurator.NewAppConfig(), - depinject.Supply(log.NewNopLogger()), + depinject.Supply(log.NewNopLogger(), + func() address.Codec { return addresscodec.NewBech32Codec("cosmos") }, + func() runtime.ValidatorAddressCodec { return addresscodec.NewBech32Codec("cosmosvaloper") }, + func() runtime.ConsensusAddressCodec { return addresscodec.NewBech32Codec("cosmosvalcons") }, + ), ), &cdc) require.NoError(err) bz, err := cdc.MarshalInterfaceJSON(msig) diff --git a/crypto/keys/secp256k1/secp256k1.go b/crypto/keys/secp256k1/secp256k1.go index a4860fbb9240..c9c4864339b2 100644 --- a/crypto/keys/secp256k1/secp256k1.go +++ b/crypto/keys/secp256k1/secp256k1.go @@ -8,11 +8,12 @@ import ( "io" "math/big" - errorsmod "cosmossdk.io/errors" "github.com/cometbft/cometbft/crypto" secp256k1 "github.com/decred/dcrd/dcrec/secp256k1/v4" "golang.org/x/crypto/ripemd160" //nolint: staticcheck // keep around for backwards compatibility + errorsmod "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/codec" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/types/errors" diff --git a/crypto/keys/secp256k1/secp256k1_nocgo.go b/crypto/keys/secp256k1/secp256k1_nocgo.go index db66325f0bf4..fff3ba5e0544 100644 --- a/crypto/keys/secp256k1/secp256k1_nocgo.go +++ b/crypto/keys/secp256k1/secp256k1_nocgo.go @@ -6,10 +6,9 @@ package secp256k1 import ( "errors" + "github.com/cometbft/cometbft/crypto" secp256k1 "github.com/decred/dcrd/dcrec/secp256k1/v4" "github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa" - - "github.com/cometbft/cometbft/crypto" ) // Sign creates an ECDSA signature on curve Secp256k1, using SHA256 on the msg. diff --git a/crypto/keys/secp256r1/privkey.go b/crypto/keys/secp256r1/privkey.go index c6702111c738..3080dec21785 100644 --- a/crypto/keys/secp256r1/privkey.go +++ b/crypto/keys/secp256r1/privkey.go @@ -1,10 +1,14 @@ package secp256r1 import ( + "encoding/base64" + "github.com/cosmos/cosmos-sdk/crypto/keys/internal/ecdsa" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" ) +var _ customProtobufType = (*ecdsaSK)(nil) + // GenPrivKey generates a new secp256r1 private key. It uses operating system randomness. func GenPrivKey() (*PrivKey, error) { key, err := ecdsa.GenPrivKey(secp256r1) @@ -52,6 +56,27 @@ type ecdsaSK struct { ecdsa.PrivKey } +// Marshal implements customProtobufType. +func (sk ecdsaSK) Marshal() ([]byte, error) { + return sk.PrivKey.Bytes(), nil +} + +// MarshalJSON implements customProtobufType. +func (sk ecdsaSK) MarshalJSON() ([]byte, error) { + b64 := base64.StdEncoding.EncodeToString(sk.PrivKey.Bytes()) + return []byte("\"" + b64 + "\""), nil +} + +// UnmarshalJSON implements customProtobufType. +func (sk *ecdsaSK) UnmarshalJSON(data []byte) error { + bz, err := base64.StdEncoding.DecodeString(string(data[1 : len(data)-1])) + if err != nil { + return err + } + + return sk.PrivKey.Unmarshal(bz, secp256r1, fieldSize) +} + // Size implements proto.Marshaler interface func (sk *ecdsaSK) Size() int { if sk == nil { diff --git a/crypto/keys/secp256r1/privkey_internal_test.go b/crypto/keys/secp256r1/privkey_internal_test.go index 902ee6dafbf8..52ea3239dac6 100644 --- a/crypto/keys/secp256r1/privkey_internal_test.go +++ b/crypto/keys/secp256r1/privkey_internal_test.go @@ -113,3 +113,14 @@ func (suite *SKSuite) TestSize() { var nilPk *ecdsaSK require.Equal(0, nilPk.Size(), "nil value must have zero size") } + +func (suite *SKSuite) TestJson() { + require := suite.Require() + asd := suite.sk.(*PrivKey) + bz, err := asd.Secret.MarshalJSON() + require.NoError(err) + + sk := &ecdsaSK{} + require.NoError(sk.UnmarshalJSON(bz)) + require.Equal(suite.sk.(*PrivKey).Secret, sk) +} diff --git a/crypto/keys/secp256r1/pubkey.go b/crypto/keys/secp256r1/pubkey.go index cacec514c3d7..fea06f73f201 100644 --- a/crypto/keys/secp256r1/pubkey.go +++ b/crypto/keys/secp256r1/pubkey.go @@ -1,6 +1,8 @@ package secp256r1 import ( + "encoding/base64" + cmtcrypto "github.com/cometbft/cometbft/crypto" "github.com/cosmos/gogoproto/proto" @@ -8,6 +10,20 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" ) +// customProtobufType is here to make sure that ecdsaPK and ecdsaSK implement the +// gogoproto customtype interface. +type customProtobufType interface { + Marshal() ([]byte, error) + MarshalTo(data []byte) (n int, err error) + Unmarshal(data []byte) error + Size() int + + MarshalJSON() ([]byte, error) + UnmarshalJSON(data []byte) error +} + +var _ customProtobufType = (*ecdsaPK)(nil) + // String implements proto.Message interface. func (m *PubKey) String() string { return m.Key.String(name) @@ -49,6 +65,28 @@ type ecdsaPK struct { ecdsa.PubKey } +// Marshal implements customProtobufType. +func (pk ecdsaPK) Marshal() ([]byte, error) { + return pk.PubKey.Bytes(), nil +} + +// MarshalJSON implements customProtobufType. +func (pk ecdsaPK) MarshalJSON() ([]byte, error) { + b64 := base64.StdEncoding.EncodeToString(pk.PubKey.Bytes()) + return []byte("\"" + b64 + "\""), nil +} + +// UnmarshalJSON implements customProtobufType. +func (pk *ecdsaPK) UnmarshalJSON(data []byte) error { + // the string is quoted so we need to remove them + bz, err := base64.StdEncoding.DecodeString(string(data[1 : len(data)-1])) + if err != nil { + return err + } + + return pk.PubKey.Unmarshal(bz, secp256r1, pubKeySize) +} + // Size implements proto.Marshaler interface func (pk *ecdsaPK) Size() int { if pk == nil { diff --git a/crypto/keys/secp256r1/pubkey_internal_test.go b/crypto/keys/secp256r1/pubkey_internal_test.go index d3d2ed3823eb..77f4a66e5114 100644 --- a/crypto/keys/secp256r1/pubkey_internal_test.go +++ b/crypto/keys/secp256r1/pubkey_internal_test.go @@ -126,3 +126,14 @@ func (suite *PKSuite) TestSize() { var nilPk *ecdsaPK require.Equal(0, nilPk.Size(), "nil value must have zero size") } + +func (suite *PKSuite) TestJson() { + require := suite.Require() + + bz, err := suite.pk.Key.MarshalJSON() + require.NoError(err) + + pk := &ecdsaPK{} + require.NoError(pk.UnmarshalJSON(bz)) + require.Equal(suite.pk.Key, pk) +} diff --git a/crypto/xsalsa20symmetric/symmetric_test.go b/crypto/xsalsa20symmetric/symmetric_test.go index 0a7431671877..e80d48449890 100644 --- a/crypto/xsalsa20symmetric/symmetric_test.go +++ b/crypto/xsalsa20symmetric/symmetric_test.go @@ -6,7 +6,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "golang.org/x/crypto/bcrypt" ) diff --git a/depinject/binding_test.go b/depinject/binding_test.go index 0aee332d9775..f00e350ce0e9 100644 --- a/depinject/binding_test.go +++ b/depinject/binding_test.go @@ -5,10 +5,9 @@ import ( "reflect" "testing" - "github.com/stretchr/testify/require" - "github.com/regen-network/gocuke" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "cosmossdk.io/depinject" ) diff --git a/depinject/container_test.go b/depinject/container_test.go index cf9394a56b11..43010004cc35 100644 --- a/depinject/container_test.go +++ b/depinject/container_test.go @@ -744,3 +744,50 @@ func TestConditionalDebugging(t *testing.T) { require.Empty(t, logs) require.True(t, success) } + +type TestFuncTypesInputs struct { + depinject.In + + DuckReturner func() Duck `optional:"true"` +} + +type smallMallard struct{} + +func (smallMallard) quack() {} + +func DuckProvider(in TestFuncTypesInputs) Duck { + if in.DuckReturner != nil { + return in.DuckReturner() + } + return Mallard{} +} + +func TestFuncTypes(t *testing.T) { + var duckReturnerFactory func() Duck + err := depinject.Inject( + depinject.Supply(func() Duck { return smallMallard{} }), + &duckReturnerFactory) + require.NoError(t, err) + _, ok := duckReturnerFactory().(smallMallard) + require.True(t, ok) + + var duck Duck + err = depinject.Inject( + depinject.Configs( + depinject.Supply(func() Duck { return smallMallard{} }), + depinject.Provide(DuckProvider), + ), + &duck) + _, ok = duck.(smallMallard) + require.True(t, ok) + require.NoError(t, err) + + err = depinject.Inject( + depinject.Configs( + depinject.Provide(DuckProvider), + ), + &duck) + _, ok = duck.(Mallard) + require.True(t, ok) + require.NoError(t, err) +} diff --git a/depinject/go.mod b/depinject/go.mod index 385c8a4dd8a4..e8d8a756263a 100644 --- a/depinject/go.mod +++ b/depinject/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/depinject go 1.20 require ( - github.com/cockroachdb/errors v1.9.1 + github.com/cockroachdb/errors v1.10.0 github.com/regen-network/gocuke v0.6.2 github.com/stretchr/testify v1.8.4 golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e @@ -13,23 +13,23 @@ require ( require ( github.com/alecthomas/participle/v2 v2.0.0-alpha7 // indirect github.com/cockroachdb/apd/v3 v3.1.0 // indirect - github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f // indirect - github.com/cockroachdb/redact v1.1.3 // indirect + github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect + github.com/cockroachdb/redact v1.1.5 // indirect github.com/cucumber/common/gherkin/go/v22 v22.0.0 // indirect github.com/cucumber/common/messages/go/v17 v17.1.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/getsentry/sentry-go v0.12.0 // indirect + github.com/getsentry/sentry-go v0.21.0 // indirect github.com/gofrs/uuid v4.2.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/google/go-cmp v0.5.8 // indirect - github.com/kr/pretty v0.3.0 // indirect + github.com/google/go-cmp v0.5.9 // indirect + github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.6 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/rogpeppe/go-internal v1.8.1 // indirect - golang.org/x/sys v0.5.0 // indirect - gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect + github.com/rogpeppe/go-internal v1.10.0 // indirect + golang.org/x/sys v0.9.0 // indirect + golang.org/x/text v0.10.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect pgregory.net/rapid v0.6.2 // indirect ) diff --git a/depinject/go.sum b/depinject/go.sum index 16b450b19f55..96c803d5e794 100644 --- a/depinject/go.sum +++ b/depinject/go.sum @@ -1,34 +1,15 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= github.com/alecthomas/participle/v2 v2.0.0-alpha7/go.mod h1:NumScqsC42o9x+dGj8/YqsIfhrIQjFEOFovxotbBirA= github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1 h1:GDQdwm/gAcJcLAKQQZGOJ4knlw+7rfEQQcmwTbt4p5E= github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= github.com/cockroachdb/apd/v3 v3.1.0/go.mod h1:6qgPBMXjATAdD/VefbRP9NoSLKjbB4LCoA7gN4LpHs4= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f h1:6jduT9Hfc0njg5jJ1DdKCFPdMBrp/mdZfCpa5h+WM74= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -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/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cockroachdb/errors v1.10.0 h1:lfxS8zZz1+OjtV4MtNWgboi/W5tyLEB6VQZBXN+0VUU= +github.com/cockroachdb/errors v1.10.0/go.mod h1:lknhIsEVQ9Ss/qKDBQS/UqFSvPQjOwNq2qyKAxtHRqE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= github.com/cucumber/common/gherkin/go/v22 v22.0.0/go.mod h1:3mJT10B2GGn3MvVPd3FwR7m2u4tLhSRhWUqJU4KN4Fg= @@ -37,329 +18,84 @@ github.com/cucumber/common/messages/go/v17 v17.1.1/go.mod h1:bpGxb57tDE385Rb2Eoh 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 v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/getsentry/sentry-go v0.12.0 h1:era7g0re5iY13bHSdN/xMkyV+5zZppjRVQhZrXCaEIk= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= -github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/getsentry/sentry-go v0.21.0 h1:c9l5F1nPF30JIppulk4veau90PK6Smu3abgVtVQWon4= +github.com/getsentry/sentry-go v0.21.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -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.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -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/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.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/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -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/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 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.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/lib/pq v1.10.6 h1:jbk+ZieJ0D7EVGJYpL9QTz7/YW6UHbmdnZWYyK5cdBs= github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= -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/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= -github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= github.com/regen-network/gocuke v0.6.2/go.mod h1:zYaqIHZobHyd0xOrHGPQjbhGJsuZ1oElx150u2o1xuk= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/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/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -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-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 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/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 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/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/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-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/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/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -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-20190222072716-a9d3bda3a223/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-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= +golang.org/x/sys v0.9.0/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.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= +golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= 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/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -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.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= 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-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= -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.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= pgregory.net/rapid v0.6.2 h1:ErW5sL+UKtfBfUTsWHDCoeB+eZKLKMxrSd1VJY6W4bw= pgregory.net/rapid v0.6.2/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= diff --git a/docs/.gitignore b/docs/.gitignore index baff39bd9e55..28443e3b7b15 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -2,7 +2,8 @@ /node_modules # Production -/build +build +!docs/build # Generated files .docusaurus @@ -17,11 +18,13 @@ docs/docs/rfc docs/docs/tooling/01-cosmovisor.md docs/docs/tooling/02-confix.md docs/docs/tooling/03-hubl.md +docs/docs/core/17-autocli.md docs/docs/packages/01-depinject.md docs/docs/packages/02-collections.md docs/docs/packages/03-orm.md -docs/run-node/04-rosetta.md -docs/migrations/02-upgrading.md +docs/user/run-node/04-rosetta.md +docs/build/migrations/02-upgrading.md +docs/learn/advanced/17-autocli.md # Misc .DS_Store @@ -32,4 +35,4 @@ docs/migrations/02-upgrading.md npm-debug.log* yarn-debug.log* -yarn-error.log* \ No newline at end of file +yarn-error.log* diff --git a/docs/architecture/README.md b/docs/architecture/README.md index 8a5c5f307c35..db466599ab0c 100644 --- a/docs/architecture/README.md +++ b/docs/architecture/README.md @@ -92,3 +92,4 @@ When writing ADRs, follow the same best practices for writing RFCs. When writing * [ADR 044: Guidelines for Updating Protobuf Definitions](./adr-044-protobuf-updates-guidelines.md) * [ADR 047: Extend Upgrade Plan](./adr-047-extend-upgrade-plan.md) * [ADR 053: Go Module Refactoring](./adr-053-go-module-refactoring.md) +* [ADR 068: Preblock](./adr-068-preblock.md) diff --git a/docs/architecture/_category_.json b/docs/architecture/_category_.json index 87ceb9374844..e0b1907a9bb4 100644 --- a/docs/architecture/_category_.json +++ b/docs/architecture/_category_.json @@ -1,5 +1,5 @@ { "label": "ADRs", - "position": 11, + "position": 6, "link": null } \ No newline at end of file diff --git a/docs/architecture/adr-013-metrics.md b/docs/architecture/adr-013-metrics.md index 33849b56caf0..b0808d462514 100644 --- a/docs/architecture/adr-013-metrics.md +++ b/docs/architecture/adr-013-metrics.md @@ -21,7 +21,7 @@ and is rich with ecosystem tooling. We must also aim to integrate metrics into the Cosmos SDK in the most seamless way possible such that metrics may be added or removed at will and without much friction. To do this, we will use the -[go-metrics](https://github.com/armon/go-metrics) library. +[go-metrics](https://github.com/hashicorp/go-metrics) library. Finally, operators may enable telemetry along with specific configuration options. If enabled, metrics will be exposed via `/metrics?format={text|prometheus}` via the API server. diff --git a/docs/architecture/adr-018-extendable-voting-period.md b/docs/architecture/adr-018-extendable-voting-period.md index ee238fc35ae8..5e8f058d12fa 100644 --- a/docs/architecture/adr-018-extendable-voting-period.md +++ b/docs/architecture/adr-018-extendable-voting-period.md @@ -6,7 +6,7 @@ ## Context -Currently the voting period for all governance proposals is the same. However, this is suboptimal as all governance proposals do not require the same time period. For more non-contentious proposals, they can be dealt with more efficently with a faster period, while more contentious or complex proposals may need a longer period for extended discussion/consideration. +Currently the voting period for all governance proposals is the same. However, this is suboptimal as all governance proposals do not require the same time period. For more non-contentious proposals, they can be dealt with more efficiently with a faster period, while more contentious or complex proposals may need a longer period for extended discussion/consideration. ## Decision diff --git a/docs/architecture/adr-020-protobuf-transaction-encoding.md b/docs/architecture/adr-020-protobuf-transaction-encoding.md index 4c30bb9ebe3d..b26f394bd5d8 100644 --- a/docs/architecture/adr-020-protobuf-transaction-encoding.md +++ b/docs/architecture/adr-020-protobuf-transaction-encoding.md @@ -277,7 +277,7 @@ We propose that field numbers with bit 11 set (for most use cases this is the range of 1024-2047) be considered non-critical fields that can safely be ignored if unknown. -To handle this we will need a unknown field filter that: +To handle this we will need an unknown field filter that: * always rejects unknown fields in unsigned content (i.e. top-level `Tx` and unsigned parts of `AuthInfo` if present based on the signing mode) diff --git a/docs/architecture/adr-023-protobuf-naming.md b/docs/architecture/adr-023-protobuf-naming.md index 4360befded06..a192dfce3264 100644 --- a/docs/architecture/adr-023-protobuf-naming.md +++ b/docs/architecture/adr-023-protobuf-naming.md @@ -191,7 +191,7 @@ is used in source code to denote modules, this is often unnecessary for .proto files as modules are the primary thing sub-packages are used for. Only items which are known to be used infrequently should have deep sub-package depths. -For the Cosmos SDK, it is recommended that that we simply write `cosmos.bank`, +For the Cosmos SDK, it is recommended that we simply write `cosmos.bank`, `cosmos.gov`, etc. rather than `cosmos.x.bank`. In practice, most non-module types can go straight in the `cosmos` package or we can introduce a `cosmos.base` package if needed. Note that this naming _will not_ change diff --git a/docs/architecture/adr-033-protobuf-inter-module-comm.md b/docs/architecture/adr-033-protobuf-inter-module-comm.md index ea634dac9748..28c69a910b23 100644 --- a/docs/architecture/adr-033-protobuf-inter-module-comm.md +++ b/docs/architecture/adr-033-protobuf-inter-module-comm.md @@ -20,7 +20,7 @@ service definitions defined in [ADR 021](./adr-021-protobuf-query-encoding.md) a ## Context -In the current Cosmos SDK documentation on the [Object-Capability Model](../core/10-ocap.md), it is stated that: +In the current Cosmos SDK documentation on the [Object-Capability Model](../../learn/advanced/10-ocap.md), it is stated that: > We assume that a thriving ecosystem of Cosmos SDK modules that are easy to compose into a blockchain application will contain faulty or malicious modules. diff --git a/docs/architecture/adr-038-state-listening.md b/docs/architecture/adr-038-state-listening.md index 81bfa5a712db..319d872be36e 100644 --- a/docs/architecture/adr-038-state-listening.md +++ b/docs/architecture/adr-038-state-listening.md @@ -568,9 +568,12 @@ func registerABCIListenerPlugin( exposeKeysStr := cast.ToStringSlice(appOpts.Get(keysKey)) exposedKeys := exposeStoreKeysSorted(exposeKeysStr, keys) bApp.cms.AddListeners(exposedKeys) - bApp.SetStreamingService(abciListener) - bApp.stopNodeOnABCIListenerErr = stopNodeOnErr - bApp.abciListenersAsync = async + app.SetStreamingManager( + storetypes.StreamingManager{ + ABCIListeners: []storetypes.ABCIListener{abciListener}, + StopNodeOnErr: stopNodeOnErr, + }, + ) } ``` diff --git a/docs/architecture/adr-063-core-module-api.md b/docs/architecture/adr-063-core-module-api.md index d5e0d06b7cbd..743dd5fee539 100644 --- a/docs/architecture/adr-063-core-module-api.md +++ b/docs/architecture/adr-063-core-module-api.md @@ -90,7 +90,7 @@ slower than more fast moving projects. ### Core Services The following "core services" are defined by the core API. All valid runtime module implementations should provide -implementations of these services to modules via both [dependency injection](./adr-057-app-wiring-1.md) and +implementations of these services to modules via both [dependency injection](./adr-057-app-wiring.md) and manual wiring. The individual services described below are all bundled in a convenient `appmodule.Service` "bundle service" so that for simplicity modules can declare a dependency on a single service. @@ -280,6 +280,17 @@ type HasGenesis interface { } ``` +#### Pre Blockers + +Modules that have functionality that runs before BeginBlock and should implement the has `HasPreBlocker` interfaces: + +```go +type HasPreBlocker interface { + AppModule + PreBlock(context.Context) error +} +``` + #### Begin and End Blockers Modules that have functionality that runs before transactions (begin blockers) or after transactions diff --git a/docs/architecture/adr-064-abci-2.0.md b/docs/architecture/adr-064-abci-2.0.md index 9a47180509c2..c0dc7f746e81 100644 --- a/docs/architecture/adr-064-abci-2.0.md +++ b/docs/architecture/adr-064-abci-2.0.md @@ -5,6 +5,8 @@ * 2023-01-17: Initial Draft (@alexanderbez) * 2023-04-06: Add upgrading section (@alexanderbez) * 2023-04-10: Simplify vote extension state persistence (@alexanderbez) +* 2023-07-07: Revise vote extension state persistence (@alexanderbez) +* 2023-08-24: Revise vote extension power calculations and staking interface (@davidterpay) ## Status @@ -105,10 +107,11 @@ type ExtendVoteHandler func(sdk.Context, abci.RequestExtendVote) abci.ResponseEx type VerifyVoteExtensionHandler func(sdk.Context, abci.RequestVerifyVoteExtension) abci.ResponseVerifyVoteExtension ``` -A new execution state, `voteExtensionState`, will be introduced and provided as -the `Context` that is supplied to both handlers. It will contain relevant metadata -such as the block height and block hash. Note, `voteExtensionState` is never -committed and will exist as ephemeral state only in the context of a single block. +An ephemeral context and state will be supplied to both handlers. The +context will contain relevant metadata such as the block height and block hash. +The state will be a cached version of the committed state of the application and +will be discarded after the execution of the handler, this means that both handlers +get a fresh state view and no changes made to it will be written. If an application decides to implement `ExtendVoteHandler`, it must return a non-nil `ResponseExtendVote.VoteExtension`. @@ -217,33 +220,37 @@ a default signature verification method which applications can use: ```go type ValidatorStore interface { - GetValidatorByConsAddr(sdk.Context, cryptotypes.Address) (cryptotypes.PubKey, error) + GetPubKeyByConsAddr(context.Context, sdk.ConsAddress) (cmtprotocrypto.PublicKey, error) } // ValidateVoteExtensions is a function that an application can execute in // ProcessProposal to verify vote extension signatures. func (app *BaseApp) ValidateVoteExtensions(ctx sdk.Context, currentHeight int64, extCommit abci.ExtendedCommitInfo) error { + votingPower := 0 + totalVotingPower := 0 + for _, vote := range extCommit.Votes { + totalVotingPower += vote.Validator.Power + if !vote.SignedLastBlock || len(vote.VoteExtension) == 0 { continue } - valConsAddr := cmtcrypto.Address(vote.Validator.Address) - - validator, err := app.validatorStore.GetValidatorByConsAddr(ctx, valConsAddr) - if err != nil { - return fmt.Errorf("failed to get validator %s for vote extension", valConsAddr) - } - - cmtPubKey, err := validator.CmtConsPublicKey() + valConsAddr := sdk.ConsAddress(vote.Validator.Address) + pubKeyProto, err := valStore.GetPubKeyByConsAddr(ctx, valConsAddr) if err != nil { - return fmt.Errorf("failed to convert public key: %w", err) + return fmt.Errorf("failed to get public key for validator %s: %w", valConsAddr, err) } if len(vote.ExtensionSignature) == 0 { return fmt.Errorf("received a non-empty vote extension with empty signature for validator %s", valConsAddr) } + cmtPubKey, err := cryptoenc.PubKeyFromProto(pubKeyProto) + if err != nil { + return fmt.Errorf("failed to convert validator %X public key: %w", valConsAddr, err) + } + cve := cmtproto.CanonicalVoteExtension{ Extension: vote.VoteExtension, Height: currentHeight - 1, // the vote extension was signed in the previous height @@ -260,8 +267,14 @@ func (app *BaseApp) ValidateVoteExtensions(ctx sdk.Context, currentHeight int64, return errors.New("received vote with invalid signature") } - return nil + votingPower += vote.Validator.Power } + + if (votingPower / totalVotingPower) < threshold { + return errors.New("not enough voting power for the vote extensions") + } + + return nil } ``` @@ -279,32 +292,22 @@ decision based on the vote extensions. #### Vote Extension Persistence In certain contexts, it may be useful or necessary for applications to persist -data derived from vote extensions. In order to facilitate this use case, we -propose to allow application developers to manually retrieve the `finalizeState` -context (see [`FinalizeBlock`](#finalizeblock-1) below). Using this context, -state can be directly written to `finalizeState`, which will be used during -`FinalizeBlock` and eventually committed to the application state. Note, since -`ProcessProposal` can timeout and thus require another round of consensus, we -will reset `finalizeState` in the beginning of `ProcessProposal`. +data derived from vote extensions. In order to facilitate this use case, we propose +to allow app developers to define a pre-Blocker hook which will be called +at the very beginning of `FinalizeBlock`, i.e. before `BeginBlock` (see below). -A `ProcessProposal` handler could look like the following: +Note, we cannot allow applications to directly write to the application state +during `ProcessProposal` because during replay, CometBFT will NOT call `ProcessProposal`, +which would result in an incomplete state view. ```go -func (h MyHandler) ProcessProposalHandler() sdk.ProcessProposalHandler { - return func(ctx sdk.Context, req abci.RequestProcessProposal) abci.ResponseProcessProposal { - for _, txBytes := range req.Txs { - _, err := h.app.ProcessProposalVerifyTx(txBytes) - if err != nil { - return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_REJECT} - } - } - - fCtx := h.app.GetFinalizeState() - - // Any state changes that occur on the provided fCtx WILL be written to state! - h.myKeeper.SetVoteExtResult(fCtx, ...) +func (a MyApp) PreBlocker(ctx sdk.Context, req *abci.RequestFinalizeBlock) error { + voteExts := GetVoteExtensions(ctx, req.Txs) - return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT} + // Process and perform some compute on vote extensions, storing any resulting + // state. + if err a.processVoteExtensions(ctx, voteExts); if err != nil { + return err } } ``` @@ -347,11 +350,20 @@ legacy ABCI types, e.g. `LegacyBeginBlockRequest` and `LegacyEndBlockRequest`. O we can come up with new types and names altogether. ```go -func (app *BaseApp) FinalizeBlock(req abci.RequestFinalizeBlock) abci.ResponseFinalizeBlock { - // merge any state changes from ProcessProposal into the FinalizeBlock state - app.MergeProcessProposalState() +func (app *BaseApp) FinalizeBlock(req abci.RequestFinalizeBlock) (*abci.ResponseFinalizeBlock, error) { + ctx := ... - beginBlockResp := app.beginBlock(ctx, req) + if app.preBlocker != nil { + ctx := app.finalizeBlockState.ctx + rsp, err := app.preBlocker(ctx, req) + if err != nil { + return nil, err + } + if rsp.ConsensusParamsChanged { + app.finalizeBlockState.ctx = ctx.WithConsensusParams(app.GetConsensusParams(ctx)) + } + } + beginBlockResp, err := app.beginBlock(req) appendBlockEventAttr(beginBlockResp.Events, "begin_block") txExecResults := make([]abci.ExecTxResult, 0, len(req.Txs)) @@ -360,7 +372,7 @@ func (app *BaseApp) FinalizeBlock(req abci.RequestFinalizeBlock) abci.ResponseFi txExecResults = append(txExecResults, result) } - endBlockResp := app.endBlock(ctx, req) + endBlockResp, err := app.endBlock(app.finalizeBlockState.ctx) appendBlockEventAttr(beginBlockResp.Events, "end_block") return abci.ResponseFinalizeBlock{ diff --git a/docs/architecture/adr-068-preblock.md b/docs/architecture/adr-068-preblock.md new file mode 100644 index 000000000000..86692c412c4d --- /dev/null +++ b/docs/architecture/adr-068-preblock.md @@ -0,0 +1,61 @@ +# ADR 068: Preblock + +## Changelog + +* Sept 13, 2023: Initial Draft + +## Status + +DRAFT + +## Abstract + +Introduce `PreBlock`, which runs before begin blocker other modules, and allows to modify consensus parameters, and the changes are visible to the following state machine logics. + +## Context + +When upgrading to sdk 0.47, the storage format for consensus parameters changed, but in the migration block, `ctx.ConsensusParams()` is always `nil`, because it fails to load the old format using new code, it's supposed to be migrated by the `x/upgrade` module first, but unfortunately, the migration happens in `BeginBlocker` handler, which runs after the `ctx` is initialized. +When we try to solve this, we find the `x/upgrade` module can't modify the context to make the consensus parameters visible for the other modules, the context is passed by value, and sdk team want to keep it that way, that's good for isolations between modules. + +## Alternatives + +The first alternative solution introduced a `MigrateModuleManager`, which only includes the `x/upgrade` module right now, and baseapp will run their `BeginBlocker`s before the other modules, and reload context's consensus parameters in between. + +## Decision + +Suggested this new lifecycle method. + +### `PreBlocker` + +There are two semantics around the new lifecycle method: + +- It runs before the `BeginBlocker` of all modules +- It can modify consensus parameters in storage, and signal the caller through the return value. + +When it returns `ConsensusParamsChanged=true`, the caller must refresh the consensus parameter in the finalize context: +``` +app.finalizeBlockState.ctx = app.finalizeBlockState.ctx.WithConsensusParams(app.GetConsensusParams()) +``` + +The new ctx must be passed to all the other lifecycle methods. + + +## Consequences + +### Backwards Compatibility + +### Positive + +### Negative + +### Neutral + +## Further Discussions + +## Test Cases + +## References +* [1] https://github.com/cosmos/cosmos-sdk/issues/16494 +* [2] https://github.com/cosmos/cosmos-sdk/pull/16583 +* [3] https://github.com/cosmos/cosmos-sdk/pull/17421 +* [4] https://github.com/cosmos/cosmos-sdk/pull/17713 diff --git a/docs/docs/README.md b/docs/docs/Introduction.md similarity index 60% rename from docs/docs/README.md rename to docs/docs/Introduction.md index 451a0bc1942e..e5fc4a77bd2b 100644 --- a/docs/docs/README.md +++ b/docs/docs/Introduction.md @@ -9,19 +9,19 @@ Cosmos SDK is the world’s most popular framework for building application-spec Read all about the SDK or dive straight into the code with tutorials. -* [**Introductions to the Cosmos SDK**](./intro/00-overview.md) - Learn about all the parts of the Cosmos SDK. +* [**Introductions to the Cosmos SDK**](learn/intro/00-overview.md) - Learn about all the parts of the Cosmos SDK. * [**SDK Tutorials**](https://tutorials.cosmos.network) - Build a complete blockchain application from scratch. ## Explore the SDK Get familiar with the SDK and explore its main concepts. -* [**Introduction**](./intro/00-overview.md) - High-level overview of the Cosmos SDK. -* [**Basics**](./basics/00-app-anatomy.md) - Anatomy of a blockchain, transaction lifecycle, accounts and more. -* [**Core Concepts**](./core/00-baseapp.md) - Read about the core concepts like baseapp, the store, or the server. -* [**Building Modules**](./building-modules/01-intro.md) - Discover how to build modules for the Cosmos SDK. -* [**Running a Node**](./run-node/00-keyring.md) - Running and interacting with nodes using the CLI and API. -* [**Modules**](./modules/README.md) - Explore existing modules to build your application with. +* [**Introduction**](learn/intro/00-overview.md) - High-level overview of the Cosmos SDK. +* [**Basics**](learn/beginner/00-app-anatomy.md) - Anatomy of a blockchain, transaction lifecycle, accounts and more. +* [**Core Concepts**](learn/advanced/00-baseapp.md) - Read about the core concepts like baseapp, the store, or the server. +* [**Building Modules**](build/building-modules/00-intro.md) - Discover how to build modules for the Cosmos SDK. +* [**Running a Node**](user/run-node/00-keyring.md) - Running and interacting with nodes using the CLI and API. +* [**Modules**](build/modules) - Explore existing modules to build your application with. ## Explore the Stack diff --git a/docs/docs/basics/_category_.json b/docs/docs/basics/_category_.json deleted file mode 100644 index 1f2b57293f6d..000000000000 --- a/docs/docs/basics/_category_.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "label": "Basics", - "position": 1, - "link": null -} \ No newline at end of file diff --git a/docs/docs/build/_category_.json b/docs/docs/build/_category_.json new file mode 100644 index 000000000000..9f3088236274 --- /dev/null +++ b/docs/docs/build/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "Build", + "position": 0, + "link": null +} \ No newline at end of file diff --git a/docs/docs/build/abci/00-introduction.md b/docs/docs/build/abci/00-introduction.md new file mode 100644 index 000000000000..5eef47e1c276 --- /dev/null +++ b/docs/docs/build/abci/00-introduction.md @@ -0,0 +1,51 @@ +# Introduction + +## What is ABCI? + +ABC, Application Blockchain Interface is the interface between CometBFT and the application, more information about ABCI can be found [here](https://docs.cometbft.com/v0.38/spec/abci/). Within the release of ABCI 2.0 for the 0.38 CometBFT release there were additional methods introduced. + +The 5 methods introduced during ABCI 2.0 are: + +* `PrepareProposal` +* `ProcessProposal` +* `ExtendVote` +* `VerifyVoteExtension` +* `FinalizeBlock` + + +## The Flow + +## PrepareProposal + +Based on their voting power, CometBFT chooses a block proposer and calls `PrepareProposal` on the block proposer's application (Cosmos SDK). The selected block proposer is responsible for collecting outstanding transactions from the mempool, adhering to the application's specifications. The application can enforce custom transaction ordering and incorporate additional transactions, potentially generated from vote extensions in the previous block. + +To perform this manipulation on the application side, a custom handler must be implemented. By default, the Cosmos SDK provides `PrepareProposalHandler`, used in conjunction with an application specific mempool. A custom handler can be written by application developer, if a noop handler provided, all transactions are considered valid. Please see [this](https://github.com/fatal-fruit/abci-workshop) tutorial for more information on custom handlers. + +Please note that vote extensions will only be available on the following height in which vote extensions are enabled. More information about vote extensions can be found [here](https://docs.cosmos.network/main/build/abci/03-vote-extensions.md). + +After creating the proposal, the proposer returns it to CometBFT. + +PrepareProposal CAN be non-deterministic. + +## ProcessProposal + +This method allows validators to perform application-specific checks on the block proposal and is called on all validators. This is an important step in the consensus process, as it ensures that the block is valid and meets the requirements of the application. For example, validators could check that the block contains all the required transactions or that the block does not create any invalid state transitions. + +The implementation of `ProcessProposal` MUST be deterministic. + +## ExtendVote and VerifyVoteExtensions + +These methods allow applications to extend the voting process by requiring validators to perform additional actions beyond simply validating blocks. + +If vote extensions are enabled, `ExtendVote` will be called on every validator and each one will return its vote extension which is in practice a bunch of bytes. As mentioned above this data (vote extension) can only be retrieved in the next block height during `PrepareProposal`. Additionally, this data can be arbitrary, but in the provided tutorials, it serves as an oracle or proof of transactions in the mempool. Essentially, vote extensions are processed and injected as transactions. Examples of use-cases for vote extensions include prices for a price oracle or encryption shares for an encrypted transaction mempool. `ExtendVote` CAN be non-deterministic. + +`VerifyVoteExtensions` is performed on every validator multiple times in order to verify other validators' vote extensions. This check is submitted to validate the integrity and validity of the vote extensions preventing malicious or invalid vote extensions. + +Additionally, applications must keep the vote extension data concise as it can degrade the performance of their chain, see testing results [here](https://docs.cometbft.com/v0.38/qa/cometbft-qa-38#vote-extensions-testbed). + +`VerifyVoteExtensions` MUST be deterministic. + + +## FinalizeBlock + +`FinalizeBlock` is then called and is responsible for updating the state of the blockchain and making the block available to users diff --git a/docs/docs/build/abci/01-prepare-proposal.md b/docs/docs/build/abci/01-prepare-proposal.md new file mode 100644 index 000000000000..b38243508573 --- /dev/null +++ b/docs/docs/build/abci/01-prepare-proposal.md @@ -0,0 +1,45 @@ +# Prepare Proposal + +`PrepareProposal` handles construction of the block, meaning that when a proposer +is preparing to propose a block, it requests the application to evaluate a +`RequestPrepareProposal`, which contains a series of transactions from CometBFT's +mempool. At this point, the application has complete control over the proposal. +It can modify, delete, and inject transactions from its own app-side mempool into +the proposal or even ignore all the transactions altogether. What the application +does with the transactions provided to it by `RequestPrepareProposal` has no +effect on CometBFT's mempool. + +Note, that the application defines the semantics of the `PrepareProposal` and it +MAY be non-deterministic and is only executed by the current block proposer. + +Now, reading mempool twice in the previous sentence is confusing, lets break it down. +CometBFT has a mempool that handles gossiping transactions to other nodes +in the network. The order of these transactions is determined by CometBFT's mempool, +using FIFO as the sole ordering mechanism. It's worth noting that the priority mempool +in Comet was removed or deprecated. +However, since the application is able to fully inspect +all transactions, it can provide greater control over transaction ordering. +Allowing the application to handle ordering enables the application to define how +it would like the block constructed. + +The Cosmos SDK defines the `DefaultProposalHandler` type, which provides applications with +`PrepareProposal` and `ProcessProposal` handlers. If you decide to implement your +own `PrepareProposal` handler, you must be sure to ensure that the transactions +selected DO NOT exceed the maximum block gas (if set) and the maximum bytes provided +by `req.MaxBytes`. + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/baseapp/abci_utils.go +``` + +This default implementation can be overridden by the application developer in +favor of a custom implementation in [`app.go`](./01-app-go-v2.md): + +```go +prepareOpt := func(app *baseapp.BaseApp) { +abciPropHandler := baseapp.NewDefaultProposalHandler(mempool, app) +app.SetPrepareProposal(abciPropHandler.PrepareProposalHandler()) +} + +baseAppOptions = append(baseAppOptions, prepareOpt) +``` \ No newline at end of file diff --git a/docs/docs/build/abci/02-process-proposal.md b/docs/docs/build/abci/02-process-proposal.md new file mode 100644 index 000000000000..815c093fe782 --- /dev/null +++ b/docs/docs/build/abci/02-process-proposal.md @@ -0,0 +1,32 @@ +# Process Proposal + +`ProcessProposal` handles the validation of a proposal from `PrepareProposal`, +which also includes a block header. Meaning, that after a block has been proposed +the other validators have the right to vote on a block. The validator in the +default implementation of `PrepareProposal` runs basic validity checks on each +transaction. + +Note, `ProcessProposal` MAY NOT be non-deterministic, i.e. it must be deterministic. +This means if `ProcessProposal` panics or fails and we reject, all honest validator +processes will prevote nil and the CometBFT round will proceed again until a valid +proposal is proposed. + +Here is the implementation of the default implementation: + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/baseapp/abci_utils.go#L153-L159 +``` + +Like `PrepareProposal` this implementation is the default and can be modified by +the application developer in [`app.go`](./01-app-go-v2.md). If you decide to implement +your own `ProcessProposal` handler, you must be sure to ensure that the transactions +provided in the proposal DO NOT exceed the maximum block gas and `maxtxbytes` (if set). + +```go +processOpt := func(app *baseapp.BaseApp) { +abciPropHandler := baseapp.NewDefaultProposalHandler(mempool, app) +app.SetProcessProposal(abciPropHandler.ProcessProposalHandler()) +} + +baseAppOptions = append(baseAppOptions, processOpt) +``` diff --git a/docs/docs/build/abci/03-vote-extensions.md b/docs/docs/build/abci/03-vote-extensions.md new file mode 100644 index 000000000000..758c1ae45db6 --- /dev/null +++ b/docs/docs/build/abci/03-vote-extensions.md @@ -0,0 +1,123 @@ +# Vote Extensions + +:::note Synopsis +This section describes how the application can define and use vote extensions +defined in ABCI++. +::: + +## Extend Vote + +ABCI++ allows an application to extend a pre-commit vote with arbitrary data. This +process does NOT have to be deterministic, and the data returned can be unique to the +validator process. The Cosmos SDK defines [`baseapp.ExtendVoteHandler`](https://github.com/cosmos/cosmos-sdk/blob/v0.50.1/types/abci.go#L26-L27): + +```go +type ExtendVoteHandler func(Context, *abci.RequestExtendVote) (*abci.ResponseExtendVote, error) +``` + +An application can set this handler in `app.go` via the `baseapp.SetExtendVoteHandler` +`BaseApp` option function. The `sdk.ExtendVoteHandler`, if defined, is called during +the `ExtendVote` ABCI method. Note, if an application decides to implement +`baseapp.ExtendVoteHandler`, it MUST return a non-nil `VoteExtension`. However, the vote +extension can be empty. See [here](https://github.com/cometbft/cometbft/blob/v0.38.0-rc1/spec/abci/abci++_methods.md#extendvote) +for more details. + +There are many decentralized censorship-resistant use cases for vote extensions. +For example, a validator may want to submit prices for a price oracle or encryption +shares for an encrypted transaction mempool. Note, an application should be careful +to consider the size of the vote extensions as they could increase latency in block +production. See [here](https://github.com/cometbft/cometbft/blob/v0.38.0-rc1/docs/qa/CometBFT-QA-38.md#vote-extensions-testbed) +for more details. + +Click [here](https://docs.cosmos.network/main/user/tutorials/vote-extensions) if you would like a walkthrough of how to implement vote extensions. + + +## Verify Vote Extension + +Similar to extending a vote, an application can also verify vote extensions from +other validators when validating their pre-commits. For a given vote extension, +this process MUST be deterministic. The Cosmos SDK defines [`sdk.VerifyVoteExtensionHandler`](https://github.com/cosmos/cosmos-sdk/blob/v0.50.1/types/abci.go#L29-L31): + +```go +type VerifyVoteExtensionHandler func(Context, *abci.RequestVerifyVoteExtension) (*abci.ResponseVerifyVoteExtension, error) +``` + +An application can set this handler in `app.go` via the `baseapp.SetVerifyVoteExtensionHandler` +`BaseApp` option function. The `sdk.VerifyVoteExtensionHandler`, if defined, is called +during the `VerifyVoteExtension` ABCI method. If an application defines a vote +extension handler, it should also define a verification handler. Note, not all +validators will share the same view of what vote extensions they verify depending +on how votes are propagated. See [here](https://github.com/cometbft/cometbft/blob/v0.38.0-rc1/spec/abci/abci++_methods.md#verifyvoteextension) +for more details. + +Additionally, please keep in mind that performance can be degraded if vote extensions are too big (https://docs.cometbft.com/v0.38/qa/cometbft-qa-38#vote-extensions-testbed), so we highly recommend a size validation in `VerifyVoteExtensions`. + + +## Vote Extension Propagation + +The agreed upon vote extensions at height `H` are provided to the proposing validator +at height `H+1` during `PrepareProposal`. As a result, the vote extensions are +not natively provided or exposed to the remaining validators during `ProcessProposal`. +As a result, if an application requires that the agreed upon vote extensions from +height `H` are available to all validators at `H+1`, the application must propagate +these vote extensions manually in the block proposal itself. This can be done by +"injecting" them into the block proposal, since the `Txs` field in `PrepareProposal` +is just a slice of byte slices. + +`FinalizeBlock` will ignore any byte slice that doesn't implement an `sdk.Tx`, so +any injected vote extensions will safely be ignored in `FinalizeBlock`. For more +details on propagation, see the [ABCI++ 2.0 ADR](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-064-abci-2.0.md#vote-extension-propagation--verification). + +### Recovery of injected Vote Extensions + +As stated before, vote extensions can be injected into a block proposal (along with +other transactions in the `Txs` field). The Cosmos SDK provides a pre-FinalizeBlock +hook to allow applications to recover vote extensions, perform any necessary +computation on them, and then store the results in the cached store. These results +will be available to the application during the subsequent `FinalizeBlock` call. + +An example of how a pre-FinalizeBlock hook could look like is shown below: + +```go +app.SetPreBlocker(func(ctx sdk.Context, req *abci.RequestFinalizeBlock) error { + allVEs := []VE{} // store all parsed vote extensions here + for _, tx := range req.Txs { + // define a custom function that tries to parse the tx as a vote extension + ve, ok := parseVoteExtension(tx) + if !ok { + continue + } + + allVEs = append(allVEs, ve) + } + + // perform any necessary computation on the vote extensions and store the result + // in the cached store + result := compute(allVEs) + err := storeVEResult(ctx, result) + if err != nil { + return err + } + + return nil +}) + +``` + +Then, in an app's module, the application can retrieve the result of the computation +of vote extensions from the cached store: + +```go +func (k Keeper) BeginBlocker(ctx context.Context) error { + // retrieve the result of the computation of vote extensions from the cached store + result, err := k.GetVEResult(ctx) + if err != nil { + return err + } + + // use the result of the computation of vote extensions + k.setSomething(result) + + return nil +} +``` diff --git a/docs/docs/core/_category_.json b/docs/docs/build/abci/_category_.json similarity index 56% rename from docs/docs/core/_category_.json rename to docs/docs/build/abci/_category_.json index 2a5703c287b9..d4ebb80c32a8 100644 --- a/docs/docs/core/_category_.json +++ b/docs/docs/build/abci/_category_.json @@ -1,5 +1,5 @@ { - "label": "Core Concepts", + "label": "ABCI", "position": 2, "link": null } \ No newline at end of file diff --git a/docs/docs/build/build.md b/docs/docs/build/build.md new file mode 100644 index 000000000000..3b86eb472b52 --- /dev/null +++ b/docs/docs/build/build.md @@ -0,0 +1,13 @@ +--- +sidebar_position: 0 +--- + +# Build + +* [Building Apps](./building-apps/00-app-go.md) - The documentation in this section will guide you through the process of developing your dApp using the Cosmos SDK framework. +* [Modules](./modules/README.md) - Information about the various modules available in the Cosmos SDK: Auth, Authz, Bank, Crisis, Distribution, Evidence, Feegrant, Governance, Mint, Params, Slashing, Staking, Upgrade, NFT, Consensus, Circuit, Genutil. +* [Migrations](./migrations/01-intro.md) - See what has been updated in each release the process of the transition between versions. +* [Packages](./packages/README.md) - Explore a curated collection of pre-built modules and functionalities, streamlining the development process. +* [Tooling](./tooling/README.md) - A suite of utilities designed to enhance the development workflow, optimizing the efficiency of Cosmos SDK-based projects. +* [ADR's](./architecture/README.md) - Provides a structured repository of key decisions made during the development process, which have been documented and offers rationale behind key decisions being made. +* [REST API](https://docs.cosmos.network/api) - A comprehensive reference for the application programming interfaces (APIs) provided by the SDK. diff --git a/docs/docs/building-apps/00-app-go.md b/docs/docs/build/building-apps/00-app-go.md similarity index 80% rename from docs/docs/building-apps/00-app-go.md rename to docs/docs/build/building-apps/00-app-go.md index f4af6dcfce3a..5a0524f3bbf7 100644 --- a/docs/docs/building-apps/00-app-go.md +++ b/docs/docs/build/building-apps/00-app-go.md @@ -10,5 +10,5 @@ For now please instead read the [tutorials](https://tutorials.cosmos.network) fo ## Complete `app.go` ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/app.go#L107-L738 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/app.go ``` diff --git a/docs/docs/building-apps/01-app-go-v2.md b/docs/docs/build/building-apps/01-app-go-v2.md similarity index 66% rename from docs/docs/building-apps/01-app-go-v2.md rename to docs/docs/build/building-apps/01-app-go-v2.md index d22b9b040216..8b64e55bfc45 100644 --- a/docs/docs/building-apps/01-app-go-v2.md +++ b/docs/docs/build/building-apps/01-app-go-v2.md @@ -11,9 +11,7 @@ Learn more about the rationale of App Wiring in [ADR-057](../architecture/adr-05 ::: -:::note - -### Pre-requisite Readings +:::note Pre-requisite Readings * [ADR 057: App Wiring](../architecture/adr-057-app-wiring.md) * [Depinject Documentation](../packages/01-depinject.md) @@ -30,29 +28,29 @@ The `app_config.go` file is the single place to configure all modules parameters 1. Create the `AppConfig` variable: ```go reference - https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/app_config.go#L91-L93 + https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/app_config.go#L103 ``` 2. Configure the `runtime` module: ```go reference - https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/app_config.go#L94-L158 + https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/app_config.go#L103-L167 ``` -3. Configure the modules defined in the `BeginBlocker` and `EndBlocker` and the `tx` module: +3. Configure the modules defined in the `PreBlocker`, `BeginBlocker` and `EndBlocker` and the `tx` module: ```go reference - https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/app_config.go#L159-L177 + https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/app_config.go#L112-L129 ``` ```go reference - https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/app_config.go#L192-L194 + https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/app_config.go#L200-L203 ``` ### Complete `app_config.go` ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/app_config.go#L52-L254 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/app_config.go ``` ### Alternative formats @@ -103,7 +101,7 @@ A more complete example of `app.yaml` can be found [here](https://github.com/cos In short `depinject` and the [`runtime` package](https://pkg.go.dev/github.com/cosmos/cosmos-sdk/runtime) abstract the wiring of the app, and the `AppBuilder` is the place where the app is constructed. [`runtime`](https://pkg.go.dev/github.com/cosmos/cosmos-sdk/runtime) takes care of registering the codecs, KV store, subspaces and instantiating `baseapp`. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/app_v2.go#L158-L291 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/app_v2.go#L101-L245 ``` :::warning @@ -117,9 +115,34 @@ In this case, use `depinject.Configs` for combining the extra configuration and More information on how work `depinject.Configs` and `depinject.Supply` can be found in the [`depinject` documentation](https://pkg.go.dev/cosmossdk.io/depinject). ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/app_v2.go#L186-L216 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/app_v2.go#L114-L146 ``` +### Registering non app wiring modules + +It is possible to combine app wiring / depinject enabled modules with non app wiring modules. +To do so, use the `app.RegisterModules` method to register the modules on your app, as well as `app.RegisterStores` for registering the extra stores needed. + +```go +// .... +app.App = appBuilder.Build(db, traceStore, baseAppOptions...) + +// register module manually +app.RegisterStores(storetypes.NewKVStoreKey(example.ModuleName)) +app.ExampleKeeper = examplekeeper.NewKeeper(app.appCodec, app.AccountKeeper.AddressCodec(), runtime.NewKVStoreService(app.GetKey(example.ModuleName)), authtypes.NewModuleAddress(govtypes.ModuleName).String()) +exampleAppModule := examplemodule.NewAppModule(app.ExampleKeeper) +if err := app.RegisterModules(&exampleAppModule); err != nil { + panic(err) +} + +// .... +``` + +:::warning +When using AutoCLI and combining app wiring and non app wiring modules. The AutoCLI options should be manually constructed instead of injected. +Otherwise it will miss the non depinject modules and not register their CLI. +::: + ### Complete `app_v2.go` :::tip @@ -127,5 +150,5 @@ Note that in the complete `SimApp` `app_v2.go` file, testing utilities are also ::: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/app_v2.go#L75-L395 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/app_v2.go ``` diff --git a/docs/docs/building-apps/02-app-mempool.md b/docs/docs/build/building-apps/02-app-mempool.md similarity index 90% rename from docs/docs/building-apps/02-app-mempool.md rename to docs/docs/build/building-apps/02-app-mempool.md index a8083f76f42b..630b94ba70ee 100644 --- a/docs/docs/building-apps/02-app-mempool.md +++ b/docs/docs/build/building-apps/02-app-mempool.md @@ -13,11 +13,9 @@ block building than previous versions. This change was enabled by [ABCI 1.0](https://github.com/cometbft/cometbft/blob/v0.37.0/spec/abci). Notably it introduces the `PrepareProposal` and `ProcessProposal` steps of ABCI++. -:::note +:::note Pre-requisite Readings -### Pre-requisite Readings - -* [BaseApp](../core/00-baseapp.md) +* [BaseApp](../../learn/advanced/00-baseapp.md) ::: @@ -44,10 +42,13 @@ Allowing the application to handle ordering enables the application to define ho it would like the block constructed. The Cosmos SDK defines the `DefaultProposalHandler` type, which provides applications with -`PrepareProposal` and `ProcessProposal` handlers. +`PrepareProposal` and `ProcessProposal` handlers. If you decide to implement your +own `PrepareProposal` handler, you must be sure to ensure that the transactions +selected DO NOT exceed the maximum block gas (if set) and the maximum bytes provided +by `req.MaxBytes`. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/baseapp/baseapp.go#L868-L916 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/baseapp/abci_utils.go ``` This default implementation can be overridden by the application developer in @@ -78,10 +79,13 @@ proposal is proposed. Here is the implementation of the default implementation: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/baseapp/baseapp.go#L927-L942 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/baseapp/abci_utils.go#L153-L159 ``` -Like `PrepareProposal` this implementation is the default and can be modified by the application developer in [`app.go`](./01-app-go-v2.md): +Like `PrepareProposal` this implementation is the default and can be modified by +the application developer in [`app.go`](./01-app-go-v2.md). If you decide to implement +your own `ProcessProposal` handler, you must be sure to ensure that the transactions +provided in the proposal DO NOT exceed the maximum block gas (if set). ```go processOpt := func(app *baseapp.BaseApp) { diff --git a/docs/docs/building-apps/03-app-upgrade.md b/docs/docs/build/building-apps/03-app-upgrade.md similarity index 92% rename from docs/docs/building-apps/03-app-upgrade.md rename to docs/docs/build/building-apps/03-app-upgrade.md index f90c7b385230..ef4e4bae785d 100644 --- a/docs/docs/building-apps/03-app-upgrade.md +++ b/docs/docs/build/building-apps/03-app-upgrade.md @@ -12,9 +12,7 @@ This document describes how to upgrade your application. If you are looking spec This section is currently incomplete. Track the progress of this document [here](https://github.com/cosmos/cosmos-sdk/issues/11504). ::: -:::note - -### Pre-requisite Reading +:::note Pre-requisite Readings * [`x/upgrade` Documentation](https://docs.cosmos.network/main/modules/upgrade) @@ -54,14 +52,20 @@ be a matter of minutes and not even require them to be awake at that time. ## Integrating With An App -Setup an upgrade Keeper for the app and then define a `BeginBlocker` that calls the upgrade -keeper's BeginBlocker method: +:::tip +The following is not required for users using `depinject`, this is abstracted for them. +::: + +In addition to basic module wiring, setup the upgrade Keeper for the app and then define a `PreBlocker` that calls the upgrade +keeper's PreBlocker method: ```go - func (app *myApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) (abci.ResponseBeginBlock, error) { - app.upgradeKeeper.BeginBlocker(ctx, req) - return abci.ResponseBeginBlock{}, nil - } +func (app *myApp) PreBlocker(ctx sdk.Context, req req.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) { + // For demonstration sake, the app PreBlocker only returns the upgrade module pre-blocker. + // In a real app, the module manager should call all pre-blockers + // return return app.ModuleManager.PreBlock(ctx, req) + return app.upgradeKeeper.PreBlocker(ctx, req) +} ``` The app must then integrate the upgrade keeper with its governance module as appropriate. The governance module @@ -76,7 +80,7 @@ module to know that the upgrade has been safely applied, a handler with the name Here is an example handler for an upgrade named "my-fancy-upgrade": ```go -app.upgradeKeeper.SetUpgradeHandler("my-fancy-upgrade", func(ctx sdk.Context, plan upgrade.Plan) { +app.upgradeKeeper.SetUpgradeHandler("my-fancy-upgrade", func(ctx context.Context, plan upgrade.Plan) { // Perform any migrations of the state store needed for this upgrade }) ``` @@ -90,7 +94,7 @@ Here is a sample code to set store migrations with an upgrade: ```go // this configures a no-op upgrade handler for the "my-fancy-upgrade" upgrade -app.UpgradeKeeper.SetUpgradeHandler("my-fancy-upgrade", func(ctx sdk.Context, plan upgrade.Plan) { +app.UpgradeKeeper.SetUpgradeHandler("my-fancy-upgrade", func(ctx context.Context, plan upgrade.Plan) { // upgrade changes here }) upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk() diff --git a/docs/docs/build/building-apps/04-vote-extensions.md b/docs/docs/build/building-apps/04-vote-extensions.md new file mode 100644 index 000000000000..d2f33aa0778b --- /dev/null +++ b/docs/docs/build/building-apps/04-vote-extensions.md @@ -0,0 +1,121 @@ +--- +sidebar_position: 1 +--- + +# Vote Extensions + +:::note Synopsis +This section describes how the application can define and use vote extensions +defined in ABCI++. +::: + +## Extend Vote + +ABCI++ allows an application to extend a pre-commit vote with arbitrary data. This +process does NOT have to be deterministic, and the data returned can be unique to the +validator process. The Cosmos SDK defines `baseapp.ExtendVoteHandler`: + +```go +type ExtendVoteHandler func(Context, *abci.RequestExtendVote) (*abci.ResponseExtendVote, error) +``` + +An application can set this handler in `app.go` via the `baseapp.SetExtendVoteHandler` +`BaseApp` option function. The `sdk.ExtendVoteHandler`, if defined, is called during +the `ExtendVote` ABCI method. Note, if an application decides to implement +`baseapp.ExtendVoteHandler`, it MUST return a non-nil `VoteExtension`. However, the vote +extension can be empty. See [here](https://github.com/cometbft/cometbft/blob/v0.38.0-rc1/spec/abci/abci++_methods.md#extendvote) +for more details. + +There are many decentralized censorship-resistant use cases for vote extensions. +For example, a validator may want to submit prices for a price oracle or encryption +shares for an encrypted transaction mempool. Note, an application should be careful +to consider the size of the vote extensions as they could increase latency in block +production. See [here](https://github.com/cometbft/cometbft/blob/v0.38.0-rc1/docs/qa/CometBFT-QA-38.md#vote-extensions-testbed) +for more details. + +## Verify Vote Extension + +Similar to extending a vote, an application can also verify vote extensions from +other validators when validating their pre-commits. For a given vote extension, +this process MUST be deterministic. The Cosmos SDK defines `sdk.VerifyVoteExtensionHandler`: + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/abci.go#L26-L27 +``` + +An application can set this handler in `app.go` via the `baseapp.SetVerifyVoteExtensionHandler` +`BaseApp` option function. The `sdk.VerifyVoteExtensionHandler`, if defined, is called +during the `VerifyVoteExtension` ABCI method. If an application defines a vote +extension handler, it should also define a verification handler. Note, not all +validators will share the same view of what vote extensions they verify depending +on how votes are propagated. See [here](https://github.com/cometbft/cometbft/blob/v0.38.0-rc1/spec/abci/abci++_methods.md#verifyvoteextension) +for more details. + +## Vote Extension Propagation + +The agreed upon vote extensions at height `H` are provided to the proposing validator +at height `H+1` during `PrepareProposal`. As a result, the vote extensions are +not natively provided or exposed to the remaining validators during `ProcessProposal`. +As a result, if an application requires that the agreed upon vote extensions from +height `H` are available to all validators at `H+1`, the application must propagate +these vote extensions manually in the block proposal itself. This can be done by +"injecting" them into the block proposal, since the `Txs` field in `PrepareProposal` +is just a slice of byte slices. + +`FinalizeBlock` will ignore any byte slice that doesn't implement an `sdk.Tx`, so +any injected vote extensions will safely be ignored in `FinalizeBlock`. For more +details on propagation, see the [ABCI++ 2.0 ADR](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-064-abci-2.0.md#vote-extension-propagation--verification). + +### Recovery of injected Vote Extensions + +As stated before, vote extensions can be injected into a block proposal (along with +other transactions in the `Txs` field). The Cosmos SDK provides a pre-FinalizeBlock +hook to allow applications to recover vote extensions, perform any necessary +computation on them, and then store the results in the cached store. These results +will be available to the application during the subsequent `FinalizeBlock` call. + +An example of how a pre-FinalizeBlock hook could look like is shown below: + +```go +app.SetPreBlocker(func(ctx sdk.Context, req *abci.RequestFinalizeBlock) error { + allVEs := []VE{} // store all parsed vote extensions here + for _, tx := range req.Txs { + // define a custom function that tries to parse the tx as a vote extension + ve, ok := parseVoteExtension(tx) + if !ok { + continue + } + + allVEs = append(allVEs, ve) + } + + // perform any necessary computation on the vote extensions and store the result + // in the cached store + result := compute(allVEs) + err := storeVEResult(ctx, result) + if err != nil { + return err + } + + return nil +}) + +``` + +Then, in an app's module, the application can retrieve the result of the computation +of vote extensions from the cached store: + +```go +func (k Keeper) BeginBlocker(ctx context.Context) error { + // retrieve the result of the computation of vote extensions from the cached store + result, err := k.GetVEResult(ctx) + if err != nil { + return err + } + + // use the result of the computation of vote extensions + k.setSomething(result) + + return nil +} +``` diff --git a/docs/docs/build/building-apps/05-app-testnet.md b/docs/docs/build/building-apps/05-app-testnet.md new file mode 100644 index 000000000000..c30ca0a6454e --- /dev/null +++ b/docs/docs/build/building-apps/05-app-testnet.md @@ -0,0 +1,235 @@ +--- +sidebar_position: 1 +--- + +# Application Testnets + +Building an application is complicated and requires a lot of testing. The Cosmos SDK provides a way to test your application in a real-world environment: a testnet. + +We allow developers to take the state from their mainnet and run tests against the state. This is useful for testing upgrade migrations, or for testing the application in a real-world environment. + +## Testnet Setup + +We will be breaking down the steps to create a testnet from mainnet state. + +```go + // InitSimAppForTestnet is broken down into two sections: + // Required Changes: Changes that, if not made, will cause the testnet to halt or panic + // Optional Changes: Changes to customize the testnet to one's liking (lower vote times, fund accounts, etc) + func InitSimAppForTestnet(app *SimApp, newValAddr bytes.HexBytes, newValPubKey crypto.PubKey, newOperatorAddress, upgradeToTrigger string) *SimApp { + ... + } +``` + +### Required Changes + +#### Staking + +When creating a testnet the important part is migrate the validator set from many validators to one or a few. This allows developers to spin up the chain without needing to replace validator keys. + +```go + ctx := app.BaseApp.NewUncachedContext(true, tmproto.Header{}) + pubkey := &ed25519.PubKey{Key: newValPubKey.Bytes()} + pubkeyAny, err := types.NewAnyWithValue(pubkey) + if err != nil { + tmos.Exit(err.Error()) + } + + // STAKING + // + + // Create Validator struct for our new validator. + _, bz, err := bech32.DecodeAndConvert(newOperatorAddress) + if err != nil { + tmos.Exit(err.Error()) + } + bech32Addr, err := bech32.ConvertAndEncode("simvaloper", bz) + if err != nil { + tmos.Exit(err.Error()) + } + newVal := stakingtypes.Validator{ + OperatorAddress: bech32Addr, + ConsensusPubkey: pubkeyAny, + Jailed: false, + Status: stakingtypes.Bonded, + Tokens: sdk.NewInt(900000000000000), + DelegatorShares: sdk.MustNewDecFromStr("10000000"), + Description: stakingtypes.Description{ + Moniker: "Testnet Validator", + }, + Commission: stakingtypes.Commission{ + CommissionRates: stakingtypes.CommissionRates{ + Rate: sdk.MustNewDecFromStr("0.05"), + MaxRate: sdk.MustNewDecFromStr("0.1"), + MaxChangeRate: sdk.MustNewDecFromStr("0.05"), + }, + }, + MinSelfDelegation: sdk.OneInt(), + } + + // Remove all validators from power store + stakingKey := app.GetKey(stakingtypes.ModuleName) + stakingStore := ctx.KVStore(stakingKey) + iterator := app.StakingKeeper.ValidatorsPowerStoreIterator(ctx) + for ; iterator.Valid(); iterator.Next() { + stakingStore.Delete(iterator.Key()) + } + iterator.Close() + + // Remove all valdiators from last validators store + iterator = app.StakingKeeper.LastValidatorsIterator(ctx) + for ; iterator.Valid(); iterator.Next() { + app.StakingKeeper.LastValidatorPower.Delete(iterator.Key()) + } + iterator.Close() + + // Add our validator to power and last validators store + app.StakingKeeper.SetValidator(ctx, newVal) + err = app.StakingKeeper.SetValidatorByConsAddr(ctx, newVal) + if err != nil { + panic(err) + } + app.StakingKeeper.SetValidatorByPowerIndex(ctx, newVal) + app.StakingKeeper.SetLastValidatorPower(ctx, newVal.GetOperator(), 0) + if err := app.StakingKeeper.Hooks().AfterValidatorCreated(ctx, newVal.GetOperator()); err != nil { + panic(err) + } +``` + +#### Distribution + +Since the validator set has changed, we need to update the distribution records for the new validator. + + +```go + // Initialize records for this validator across all distribution stores + app.DistrKeeper.ValidatorHistoricalRewards.Set(ctx, newVal.GetOperator(), 0, distrtypes.NewValidatorHistoricalRewards(sdk.DecCoins{}, 1)) + app.DistrKeeper.ValidatorCurrentRewards.Set(ctx, newVal.GetOperator(), distrtypes.NewValidatorCurrentRewards(sdk.DecCoins{}, 1)) + app.DistrKeeper.ValidatorAccumulatedCommission.Set(ctx, newVal.GetOperator(), distrtypes.InitialValidatorAccumulatedCommission()) + app.DistrKeeper.ValidatorOutstandingRewards.Set(ctx, newVal.GetOperator(), distrtypes.ValidatorOutstandingRewards{Rewards: sdk.DecCoins{}}) +``` + +#### Slashing + +We also need to set the validator signing info for the new validator. + +```go + // SLASHING + // + + // Set validator signing info for our new validator. + newConsAddr := sdk.ConsAddress(newValAddr.Bytes()) + newValidatorSigningInfo := slashingtypes.ValidatorSigningInfo{ + Address: newConsAddr.String(), + StartHeight: app.LastBlockHeight() - 1, + Tombstoned: false, + } + app.SlashingKeeper.ValidatorSigningInfo.Set(ctx, newConsAddr, newValidatorSigningInfo) +``` + +#### Bank + +It is useful to create new accounts for your testing purposes. This avoids the need to have the same key as you may have on mainnet. + +```go + // BANK + // + + defaultCoins := sdk.NewCoins(sdk.NewInt64Coin("ustake", 1000000000000)) + + localSimAppAccounts := []sdk.AccAddress{ + sdk.MustAccAddressFromBech32("cosmos12smx2wdlyttvyzvzg54y2vnqwq2qjateuf7thj"), + sdk.MustAccAddressFromBech32("cosmos1cyyzpxplxdzkeea7kwsydadg87357qnahakaks"), + sdk.MustAccAddressFromBech32("cosmos18s5lynnmx37hq4wlrw9gdn68sg2uxp5rgk26vv"), + sdk.MustAccAddressFromBech32("cosmos1qwexv7c6sm95lwhzn9027vyu2ccneaqad4w8ka"), + sdk.MustAccAddressFromBech32("cosmos14hcxlnwlqtq75ttaxf674vk6mafspg8xwgnn53"), + sdk.MustAccAddressFromBech32("cosmos12rr534cer5c0vj53eq4y32lcwguyy7nndt0u2t"), + sdk.MustAccAddressFromBech32("cosmos1nt33cjd5auzh36syym6azgc8tve0jlvklnq7jq"), + sdk.MustAccAddressFromBech32("cosmos10qfrpash5g2vk3hppvu45x0g860czur8ff5yx0"), + sdk.MustAccAddressFromBech32("cosmos1f4tvsdukfwh6s9swrc24gkuz23tp8pd3e9r5fa"), + sdk.MustAccAddressFromBech32("cosmos1myv43sqgnj5sm4zl98ftl45af9cfzk7nhjxjqh"), + sdk.MustAccAddressFromBech32("cosmos14gs9zqh8m49yy9kscjqu9h72exyf295afg6kgk"), + sdk.MustAccAddressFromBech32("cosmos1jllfytsz4dryxhz5tl7u73v29exsf80vz52ucc")} + + // Fund localSimApp accounts + for _, account := range localSimAppAccounts { + err := app.BankKeeper.MintCoins(ctx, minttypes.ModuleName, defaultCoins) + if err != nil { + tmos.Exit(err.Error()) + } + err = app.BankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, account, defaultCoins) + if err != nil { + tmos.Exit(err.Error()) + } + } +``` + +#### Upgrade + +If you would like to schedule an upgrade the below can be used. + +```go + // UPGRADE + // + + if upgradeToTrigger != "" { + upgradePlan := upgradetypes.Plan{ + Name: upgradeToTrigger, + Height: app.LastBlockHeight(), + } + err = app.UpgradeKeeper.ScheduleUpgrade(ctx, upgradePlan) + if err != nil { + panic(err) + } + } +``` + +### Optional Changes + +If you have custom modules that rely on specific state from the above modules and/or you would like to test your custom module, you will need to update the state of your custom module to reflect your needs + +## Running the Testnet + +Before we can run the testnet we must plug everything together. + +in `root.go`, in the `initRootCmd` function we add: + +```diff + server.AddCommands(rootCmd, simapp.DefaultNodeHome, newApp, createSimAppAndExport, addModuleInitFlags) + ++ server.AddTestnetCreatorCommand(rootCmd, simapp.DefaultNodeHome, newTestnetApp, addModuleInitFlags) +``` + +Next we will add a newTestnetApp helper function: + +```diff +// newTestnetApp starts by running the normal newApp method. From there, the app interface returned is modified in order +// for a testnet to be created from the provided app. +func newTestnetApp(logger log.Logger, db cometbftdb.DB, traceStore io.Writer, appOpts servertypes.AppOptions) servertypes.Application { + // Create an app and type cast to an SimApp + app := newApp(logger, db, traceStore, appOpts) + simApp, ok := app.(*simapp.SimApp) + if !ok { + panic("app created from newApp is not of type simApp") + } + + newValAddr, ok := appOpts.Get(server.KeyNewValAddr).(bytes.HexBytes) + if !ok { + panic("newValAddr is not of type bytes.HexBytes") + } + newValPubKey, ok := appOpts.Get(server.KeyUserPubKey).(crypto.PubKey) + if !ok { + panic("newValPubKey is not of type crypto.PubKey") + } + newOperatorAddress, ok := appOpts.Get(server.KeyNewOpAddr).(string) + if !ok { + panic("newOperatorAddress is not of type string") + } + upgradeToTrigger, ok := appOpts.Get(server.KeyTriggerTestnetUpgrade).(string) + if !ok { + panic("upgradeToTrigger is not of type string") + } + + // Make modifications to the normal SimApp required to run the network locally + return simapp.InitSimAppForTestnet(simApp, newValAddr, newValPubKey, newOperatorAddress, upgradeToTrigger) +} +``` diff --git a/docs/docs/building-apps/_category_.json b/docs/docs/build/building-apps/_category_.json similarity index 72% rename from docs/docs/building-apps/_category_.json rename to docs/docs/build/building-apps/_category_.json index de6617ddc10b..342732cce36e 100644 --- a/docs/docs/building-apps/_category_.json +++ b/docs/docs/build/building-apps/_category_.json @@ -1,5 +1,5 @@ { "label": "Building Apps", - "position": 4, + "position": 0, "link": null } \ No newline at end of file diff --git a/docs/docs/building-modules/01-intro.md b/docs/docs/build/building-modules/00-intro.md similarity index 80% rename from docs/docs/building-modules/01-intro.md rename to docs/docs/build/building-modules/00-intro.md index bb45d5d13252..4ac5462f376c 100644 --- a/docs/docs/building-modules/01-intro.md +++ b/docs/docs/build/building-modules/00-intro.md @@ -8,22 +8,20 @@ sidebar_position: 1 Modules define most of the logic of Cosmos SDK applications. Developers compose modules together using the Cosmos SDK to build their custom application-specific blockchains. This document outlines the basic concepts behind SDK modules and how to approach module management. ::: -:::note +:::note Pre-requisite Readings -### Pre-requisite Readings - -* [Anatomy of a Cosmos SDK application](../basics/00-app-anatomy.md) -* [Lifecycle of a Cosmos SDK transaction](../basics/01-tx-lifecycle.md) +* [Anatomy of a Cosmos SDK application](../../learn/beginner/00-app-anatomy.md) +* [Lifecycle of a Cosmos SDK transaction](../../learn/beginner/01-tx-lifecycle.md) ::: ## Role of Modules in a Cosmos SDK Application -The Cosmos SDK can be thought of as the Ruby-on-Rails of blockchain development. It comes with a core that provides the basic functionalities every blockchain application needs, like a [boilerplate implementation of the ABCI](../core/00-baseapp.md) to communicate with the underlying consensus engine, a [`multistore`](../core/04-store.md#multistore) to persist state, a [server](../core/03-node.md) to form a full-node and [interfaces](./09-module-interfaces.md) to handle queries. +The Cosmos SDK can be thought of as the Ruby-on-Rails of blockchain development. It comes with a core that provides the basic functionalities every blockchain application needs, like a [boilerplate implementation of the ABCI](../../learn/advanced/00-baseapp.md) to communicate with the underlying consensus engine, a [`multistore`](../../learn/advanced/04-store.md#multistore) to persist state, a [server](../../learn/advanced/03-node.md) to form a full-node and [interfaces](./09-module-interfaces.md) to handle queries. On top of this core, the Cosmos SDK enables developers to build modules that implement the business logic of their application. In other words, SDK modules implement the bulk of the logic of applications, while the core does the wiring and enables modules to be composed together. The end goal is to build a robust ecosystem of open-source Cosmos SDK modules, making it increasingly easier to build complex blockchain applications. -Cosmos SDK modules can be seen as little state-machines within the state-machine. They generally define a subset of the state using one or more `KVStore`s in the [main multistore](../core/04-store.md), as well as a subset of [message types](./02-messages-and-queries.md#messages). These messages are routed by one of the main components of Cosmos SDK core, [`BaseApp`](../core/00-baseapp.md), to a module Protobuf [`Msg` service](./03-msg-services.md) that defines them. +Cosmos SDK modules can be seen as little state-machines within the state-machine. They generally define a subset of the state using one or more `KVStore`s in the [main multistore](../../learn/advanced/04-store.md), as well as a subset of [message types](./02-messages-and-queries.md#messages). These messages are routed by one of the main components of Cosmos SDK core, [`BaseApp`](../../learn/advanced/00-baseapp.md), to a module Protobuf [`Msg` service](./03-msg-services.md) that defines them. ```text + @@ -72,21 +70,30 @@ Cosmos SDK modules can be seen as little state-machines within the state-machine As a result of this architecture, building a Cosmos SDK application usually revolves around writing modules to implement the specialized logic of the application and composing them with existing modules to complete the application. Developers will generally work on modules that implement logic needed for their specific use case that do not exist yet, and will use existing modules for more generic functionalities like staking, accounts, or token management. + +### Modules as Sudo + +Modules have the ability to perform actions that are not available to regular users. This is because modules are given sudo permissions by the state machine. Modules can reject another modules desire to execute a function but this logic must be explicit. Examples of this can be seen when modules create functions to modify parameters: + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/61da5d1c29c16a1eb5bb5488719fde604ec07b10/x/bank/keeper/msg_server.go#L147-L149 +``` + ## How to Approach Building Modules as a Developer While there are no definitive guidelines for writing modules, here are some important design principles developers should keep in mind when building them: * **Composability**: Cosmos SDK applications are almost always composed of multiple modules. This means developers need to carefully consider the integration of their module not only with the core of the Cosmos SDK, but also with other modules. The former is achieved by following standard design patterns outlined [here](#main-components-of-sdk-modules), while the latter is achieved by properly exposing the store(s) of the module via the [`keeper`](./06-keeper.md). -* **Specialization**: A direct consequence of the **composability** feature is that modules should be **specialized**. Developers should carefully establish the scope of their module and not batch multiple functionalities into the same module. This separation of concerns enables modules to be re-used in other projects and improves the upgradability of the application. **Specialization** also plays an important role in the [object-capabilities model](../core/10-ocap.md) of the Cosmos SDK. +* **Specialization**: A direct consequence of the **composability** feature is that modules should be **specialized**. Developers should carefully establish the scope of their module and not batch multiple functionalities into the same module. This separation of concerns enables modules to be re-used in other projects and improves the upgradability of the application. **Specialization** also plays an important role in the [object-capabilities model](../../learn/advanced/10-ocap.md) of the Cosmos SDK. * **Capabilities**: Most modules need to read and/or write to the store(s) of other modules. However, in an open-source environment, it is possible for some modules to be malicious. That is why module developers need to carefully think not only about how their module interacts with other modules, but also about how to give access to the module's store(s). The Cosmos SDK takes a capabilities-oriented approach to inter-module security. This means that each store defined by a module is accessed by a `key`, which is held by the module's [`keeper`](./06-keeper.md). This `keeper` defines how to access the store(s) and under what conditions. Access to the module's store(s) is done by passing a reference to the module's `keeper`. ## Main Components of Cosmos SDK Modules Modules are by convention defined in the `./x/` subfolder (e.g. the `bank` module will be defined in the `./x/bank` folder). They generally share the same core components: -* A [`keeper`](./06-keeper.md), used to access the module's store(s) and update the state. -* A [`Msg` service](./02-messages-and-queries.md#messages), used to process messages when they are routed to the module by [`BaseApp`](../core/00-baseapp.md#message-routing) and trigger state-transitions. -* A [query service](./04-query-services.md), used to process user queries when they are routed to the module by [`BaseApp`](../core/00-baseapp.md#query-routing). +* A [`keeper`](./06-keeper.md), used to access the module's store(s) and update the state. +* A [`Msg` service](./02-messages-and-queries.md#messages), used to process messages when they are routed to the module by [`BaseApp`](../../learn/advanced/00-baseapp.md#message-routing) and trigger state-transitions. +* A [query service](./04-query-services.md), used to process user queries when they are routed to the module by [`BaseApp`](../../learn/advanced/00-baseapp.md#query-routing). * Interfaces, for end users to query the subset of the state defined by the module and create `message`s of the custom types defined in the module. In addition to these components, modules implement the `AppModule` interface in order to be managed by the [`module manager`](./01-module-manager.md). diff --git a/docs/docs/build/building-modules/01-module-manager.md b/docs/docs/build/building-modules/01-module-manager.md new file mode 100644 index 000000000000..955c82ff2ae8 --- /dev/null +++ b/docs/docs/build/building-modules/01-module-manager.md @@ -0,0 +1,330 @@ +--- +sidebar_position: 1 +--- + +# Module Manager + +:::note Synopsis +Cosmos SDK modules need to implement the [`AppModule` interfaces](#application-module-interfaces), in order to be managed by the application's [module manager](#module-manager). The module manager plays an important role in [`message` and `query` routing](../../learn/advanced/00-baseapp.md#routing), and allows application developers to set the order of execution of a variety of functions like [`PreBlocker`](../../learn/beginner/00-app-anatomy#preblocker) and [`BeginBlocker` and `EndBlocker`](../../learn/beginner/00-app-anatomy.md#begingblocker-and-endblocker). +::: + +:::note Pre-requisite Readings + +* [Introduction to Cosmos SDK Modules](./00-intro.md) + +::: + +## Application Module Interfaces + +Application module interfaces exist to facilitate the composition of modules together to form a functional Cosmos SDK application. + +:::note + +It is recommended to implement interfaces from the [Core API](https://docs.cosmos.network/main/architecture/adr-063-core-module-api) `appmodule` package. This makes modules less dependent on the SDK. +For legacy reason modules can still implement interfaces from the SDK `module` package. +::: + +There are 2 main application module interfaces: + +* [`appmodule.AppModule` / `module.AppModule`](#appmodule) for inter-dependent module functionalities (except genesis-related functionalities). +* (legacy) [`module.AppModuleBasic`](#appmodulebasic) for independent module functionalities. New modules can use `module.CoreAppModuleBasicAdaptor` instead. + +The above interfaces are mostly embedding smaller interfaces (extension interfaces), that defines specific functionalities: + +* (legacy) `module.HasName`: Allows the module to provide its own name for legacy purposes. +* (legacy) [`module.HasGenesisBasics`](#modulehasgenesisbasics): The legacy interface for stateless genesis methods. +* [`module.HasGenesis`](#modulehasgenesis) for inter-dependent genesis-related module functionalities. +* [`module.HasABCIGenesis`](#modulehasabcigenesis) for inter-dependent genesis-related module functionalities. +* [`appmodule.HasGenesis` / `module.HasGenesis`](#appmodulehasgenesis): The extension interface for stateful genesis methods. +* [`appmodule.HasPreBlocker`](#haspreblocker): The extension interface that contains information about the `AppModule` and `PreBlock`. +* [`appmodule.HasBeginBlocker`](#hasbeginblocker): The extension interface that contains information about the `AppModule` and `BeginBlock`. +* [`appmodule.HasEndBlocker`](#hasendblocker): The extension interface that contains information about the `AppModule` and `EndBlock`. +* [`appmodule.HasPrecommit`](#hasprecommit): The extension interface that contains information about the `AppModule` and `Precommit`. +* [`appmodule.HasPrepareCheckState`](#haspreparecheckstate): The extension interface that contains information about the `AppModule` and `PrepareCheckState`. +* [`appmodule.HasService` / `module.HasServices`](#hasservices): The extension interface for modules to register services. +* [`module.HasABCIEndBlock`](#hasabciendblock): The extension interface that contains information about the `AppModule`, `EndBlock` and returns an updated validator set. +* (legacy) [`module.HasInvariants`](#hasinvariants): The extension interface for registering invariants. +* (legacy) [`module.HasConsensusVersion`](#hasconsensusversion): The extension interface for declaring a module consensus version. + +The `AppModuleBasic` interface exists to define independent methods of the module, i.e. those that do not depend on other modules in the application. This allows for the construction of the basic application structure early in the application definition, generally in the `init()` function of the [main application file](../../learn/beginner/00-app-anatomy.md#core-application-file). + +The `AppModule` interface exists to define inter-dependent module methods. Many modules need to interact with other modules, typically through [`keeper`s](./06-keeper.md), which means there is a need for an interface where modules list their `keeper`s and other methods that require a reference to another module's object. `AppModule` interface extension, such as `HasBeginBlocker` and `HasEndBlocker`, also enables the module manager to set the order of execution between module's methods like `BeginBlock` and `EndBlock`, which is important in cases where the order of execution between modules matters in the context of the application. + +The usage of extension interfaces allows modules to define only the functionalities they need. For example, a module that does not need an `EndBlock` does not need to define the `HasEndBlocker` interface and thus the `EndBlock` method. `AppModule` and `AppModuleGenesis` are voluntarily small interfaces, that can take advantage of the `Module` patterns without having to define many placeholder functions. + +### `AppModuleBasic` + +:::note +Use `module.CoreAppModuleBasicAdaptor` instead for creating an `AppModuleBasic` from an `appmodule.AppModule`. +::: + +The `AppModuleBasic` interface defines the independent methods modules need to implement. + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/module/module.go#L56-L66 +``` + +Let us go through the methods: + +* `RegisterLegacyAminoCodec(*codec.LegacyAmino)`: Registers the `amino` codec for the module, which is used to marshal and unmarshal structs to/from `[]byte` in order to persist them in the module's `KVStore`. +* `RegisterInterfaces(codectypes.InterfaceRegistry)`: Registers a module's interface types and their concrete implementations as `proto.Message`. +* `RegisterGRPCGatewayRoutes(client.Context, *runtime.ServeMux)`: Registers gRPC routes for the module. + +All the `AppModuleBasic` of an application are managed by the [`BasicManager`](#basicmanager). + +### `HasName` + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/module/module.go#L71-L73 +``` + +* `HasName` is an interface that has a method `Name()`. This method returns the name of the module as a `string`. + +### Genesis + +:::tip +For easily creating an `AppModule` that only has genesis functionalities, use `module.GenesisOnlyAppModule`. +::: + +#### `module.HasGenesisBasics` + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/module/module.go#L76-L79 +``` + +Let us go through the methods: + +* `DefaultGenesis(codec.JSONCodec)`: Returns a default [`GenesisState`](./08-genesis.md#genesisstate) for the module, marshalled to `json.RawMessage`. The default `GenesisState` need to be defined by the module developer and is primarily used for testing. +* `ValidateGenesis(codec.JSONCodec, client.TxEncodingConfig, json.RawMessage)`: Used to validate the `GenesisState` defined by a module, given in its `json.RawMessage` form. It will usually unmarshall the `json` before running a custom [`ValidateGenesis`](./08-genesis.md#validategenesis) function defined by the module developer. + +#### `module.HasGenesis` + +`HasGenesis` is an extension interface for allowing modules to implement genesis functionalities. + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/6ce2505/types/module/module.go#L184-L189 +``` + +#### `module.HasABCIGenesis` + +`HasABCIGenesis` is an extension interface for allowing modules to implement genesis functionalities and returns validator set updates. + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/6ce2505/types/module/module.go#L191-L196 +``` + +#### `appmodule.HasGenesis` + +:::warning +`appmodule.HasGenesis` is experimental and should be considered unstable, it is recommended to not use this interface at this time. +::: + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/6ce2505/core/appmodule/genesis.go#L8-L25 +``` + +### `AppModule` + +The `AppModule` interface defines a module. Modules can declare their functionalities by implementing extensions interfaces. +`AppModule`s are managed by the [module manager](#manager), which checks which extension interfaces are implemented by the module. + +#### `appmodule.AppModule` + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/6afece6/core/appmodule/module.go#L11-L20 +``` + +#### `module.AppModule` + +:::note +Previously the `module.AppModule` interface was containing all the methods that are defined in the extensions interfaces. This was leading to much boilerplate for modules that did not need all the functionalities. +::: + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/module/module.go#L195-L199 +``` + +### `HasInvariants` + +This interface defines one method. It allows to checks if a module can register invariants. + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/module/module.go#L202-L205 +``` + +* `RegisterInvariants(sdk.InvariantRegistry)`: Registers the [`invariants`](./07-invariants.md) of the module. If an invariant deviates from its predicted value, the [`InvariantRegistry`](./07-invariants.md#registry) triggers appropriate logic (most often the chain will be halted). + +### `HasServices` + +This interface defines one method. It allows to checks if a module can register invariants. + +#### `appmodule.HasService` + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/6afece6/core/appmodule/module.go#L22-L40 +``` + +#### `module.HasServices` + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/module/module.go#L208-L211 +``` + +* `RegisterServices(Configurator)`: Allows a module to register services. + +### `HasConsensusVersion` + +This interface defines one method for checking a module consensus version. + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/module/module.go#L214-L220 +``` + +* `ConsensusVersion() uint64`: Returns the consensus version of the module. + +### `HasPreBlocker` + +The `HasPreBlocker` is an extension interface from `appmodule.AppModule`. All modules that have an `PreBlock` method implement this interface. + +### `HasBeginBlocker` + +The `HasBeginBlocker` is an extension interface from `appmodule.AppModule`. All modules that have an `BeginBlock` method implement this interface. + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/core/appmodule/module.go#L56-L63 +``` + +* `BeginBlock(context.Context) error`: This method gives module developers the option to implement logic that is automatically triggered at the beginning of each block. + +### `HasEndBlocker` + +The `HasEndBlocker` is an extension interface from `appmodule.AppModule`. All modules that have an `EndBlock` method implement this interface. If a module need to return validator set updates (staking), they can use `HasABCIEndBlock` + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/core/appmodule/module.go#L66-L72 +``` + +* `EndBlock(context.Context) error`: This method gives module developers the option to implement logic that is automatically triggered at the end of each block. + +### `HasABCIEndBlock` + +The `HasABCIEndBlock` is an extension interface from `module.AppModule`. All modules that have an `EndBlock` which return validator set updates implement this interface. + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/module/module.go#L222-L225 +``` + +* `EndBlock(context.Context) ([]abci.ValidatorUpdate, error)`: This method gives module developers the option to inform the underlying consensus engine of validator set changes (e.g. the `staking` module). + +### `HasPrecommit` + +`HasPrecommit` is an extension interface from `appmodule.AppModule`. All modules that have a `Precommit` method implement this interface. + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/core/appmodule/module.go#L49-L52 +``` + +* `Precommit(context.Context)`: This method gives module developers the option to implement logic that is automatically triggered during [`Commit'](../../learn/advanced/00-baseapp.md#commit) of each block using the [`finalizeblockstate`](../../learn/advanced/00-baseapp.md#state-updates) of the block to be committed. Implement empty if no logic needs to be triggered during `Commit` of each block for this module. + +### `HasPrepareCheckState` + +`HasPrepareCheckState` is an extension interface from `appmodule.AppModule`. All modules that have a `PrepareCheckState` method implement this interface. + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/core/appmodule/module.go#L49-L52 +``` + +* `PrepareCheckState(context.Context)`: This method gives module developers the option to implement logic that is automatically triggered during [`Commit'](../../learn/advanced/00-baseapp.md#commit) of each block using the [`checkState`](../../learn/advanced/00-baseapp.md#state-updates) of the next block. Implement empty if no logic needs to be triggered during `Commit` of each block for this module. + +### Implementing the Application Module Interfaces + +Typically, the various application module interfaces are implemented in a file called `module.go`, located in the module's folder (e.g. `./x/module/module.go`). + +Almost every module needs to implement the `AppModuleBasic` and `AppModule` interfaces. If the module is only used for genesis, it will implement `AppModuleGenesis` instead of `AppModule`. The concrete type that implements the interface can add parameters that are required for the implementation of the various methods of the interface. For example, the `Route()` function often calls a `NewMsgServerImpl(k keeper)` function defined in `keeper/msg_server.go` and therefore needs to pass the module's [`keeper`](./06-keeper.md) as a parameter. + +```go +// example +type AppModule struct { + AppModuleBasic + keeper Keeper +} +``` + +In the example above, you can see that the `AppModule` concrete type references an `AppModuleBasic`, and not an `AppModuleGenesis`. That is because `AppModuleGenesis` only needs to be implemented in modules that focus on genesis-related functionalities. In most modules, the concrete `AppModule` type will have a reference to an `AppModuleBasic` and implement the two added methods of `AppModuleGenesis` directly in the `AppModule` type. + +If no parameter is required (which is often the case for `AppModuleBasic`), just declare an empty concrete type like so: + +```go +type AppModuleBasic struct{} +``` + +## Module Managers + +Module managers are used to manage collections of `AppModuleBasic` and `AppModule`. + +### `BasicManager` + +The `BasicManager` is a structure that lists all the `AppModuleBasic` of an application: + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/module/module.go#L82 +``` + +It implements the following methods: + +* `NewBasicManager(modules ...AppModuleBasic)`: Constructor function. It takes a list of the application's `AppModuleBasic` and builds a new `BasicManager`. This function is generally called in the `init()` function of [`app.go`](../../learn/beginner/00-app-anatomy.md#core-application-file) to quickly initialize the independent elements of the application's modules (click [here](https://github.com/cosmos/gaia/blob/main/app/app.go#L59-L74) to see an example). +* `NewBasicManagerFromManager(manager *Manager, customModuleBasics map[string]AppModuleBasic)`: Contructor function. It creates a new `BasicManager` from a `Manager`. The `BasicManager` will contain all `AppModuleBasic` from the `AppModule` manager using `CoreAppModuleBasicAdaptor` whenever possible. Module's `AppModuleBasic` can be overridden by passing a custom AppModuleBasic map +* `RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)`: Registers the [`codec.LegacyAmino`s](../../learn/advanced/05-encoding.md#amino) of each of the application's `AppModuleBasic`. This function is usually called early on in the [application's construction](../../learn/beginner/00-app-anatomy.md#constructor). +* `RegisterInterfaces(registry codectypes.InterfaceRegistry)`: Registers interface types and implementations of each of the application's `AppModuleBasic`. +* `DefaultGenesis(cdc codec.JSONCodec)`: Provides default genesis information for modules in the application by calling the [`DefaultGenesis(cdc codec.JSONCodec)`](./08-genesis.md#defaultgenesis) function of each module. It only calls the modules that implements the `HasGenesisBasics` interfaces. +* `ValidateGenesis(cdc codec.JSONCodec, txEncCfg client.TxEncodingConfig, genesis map[string]json.RawMessage)`: Validates the genesis information modules by calling the [`ValidateGenesis(codec.JSONCodec, client.TxEncodingConfig, json.RawMessage)`](./08-genesis.md#validategenesis) function of modules implementing the `HasGenesisBasics` interface. +* `RegisterGRPCGatewayRoutes(clientCtx client.Context, rtr *runtime.ServeMux)`: Registers gRPC routes for modules. +* `AddTxCommands(rootTxCmd *cobra.Command)`: Adds modules' transaction commands (defined as `GetTxCmd() *cobra.Command`) to the application's [`rootTxCommand`](../../learn/advanced/07-cli.md#transaction-commands). This function is usually called function from the `main.go` function of the [application's command-line interface](../../learn/advanced/07-cli.md). +* `AddQueryCommands(rootQueryCmd *cobra.Command)`: Adds modules' query commands (defined as `GetQueryCmd() *cobra.Command`) to the application's [`rootQueryCommand`](../../learn/advanced/07-cli.md#query-commands). This function is usually called function from the `main.go` function of the [application's command-line interface](../../learn/advanced/07-cli.md). + +### `Manager` + +The `Manager` is a structure that holds all the `AppModule` of an application, and defines the order of execution between several key components of these modules: + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/module/module.go#L267-L276 +``` + +The module manager is used throughout the application whenever an action on a collection of modules is required. It implements the following methods: + +* `NewManager(modules ...AppModule)`: Constructor function. It takes a list of the application's `AppModule`s and builds a new `Manager`. It is generally called from the application's main [constructor function](../../learn/beginner/00-app-anatomy.md#constructor-function). +* `SetOrderInitGenesis(moduleNames ...string)`: Sets the order in which the [`InitGenesis`](./08-genesis.md#initgenesis) function of each module will be called when the application is first started. This function is generally called from the application's main [constructor function](../../learn/beginner/00-app-anatomy.md#constructor-function). + To initialize modules successfully, module dependencies should be considered. For example, the `genutil` module must occur after `staking` module so that the pools are properly initialized with tokens from genesis accounts, the `genutils` module must also occur after `auth` so that it can access the params from auth, IBC's `capability` module should be initialized before all other modules so that it can initialize any capabilities. +* `SetOrderExportGenesis(moduleNames ...string)`: Sets the order in which the [`ExportGenesis`](./08-genesis.md#exportgenesis) function of each module will be called in case of an export. This function is generally called from the application's main [constructor function](../../learn/beginner/00-app-anatomy.md#constructor-function). +* `SetOrderPreBlockers(moduleNames ...string)`: Sets the order in which the `PreBlock()` function of each module will be called before `BeginBlock()` of all modules. This function is generally called from the application's main [constructor function](../../learn/beginner/00-app-anatomy.md#constructor-function). +* `SetOrderBeginBlockers(moduleNames ...string)`: Sets the order in which the `BeginBlock()` function of each module will be called at the beginning of each block. This function is generally called from the application's main [constructor function](../../learn/beginner/00-app-anatomy.md#constructor-function). +* `SetOrderEndBlockers(moduleNames ...string)`: Sets the order in which the `EndBlock()` function of each module will be called at the end of each block. This function is generally called from the application's main [constructor function](../../learn/beginner/00-app-anatomy.md#constructor-function). +* `SetOrderPrecommiters(moduleNames ...string)`: Sets the order in which the `Precommit()` function of each module will be called during commit of each block. This function is generally called from the application's main [constructor function](../../learn/beginner/00-app-anatomy.md#constructor-function). +* `SetOrderPrepareCheckStaters(moduleNames ...string)`: Sets the order in which the `PrepareCheckState()` function of each module will be called during commit of each block. This function is generally called from the application's main [constructor function](../../learn/beginner/00-app-anatomy.md#constructor-function). +* `SetOrderMigrations(moduleNames ...string)`: Sets the order of migrations to be run. If not set then migrations will be run with an order defined in `DefaultMigrationsOrder`. +* `RegisterInvariants(ir sdk.InvariantRegistry)`: Registers the [invariants](./07-invariants.md) of module implementing the `HasInvariants` interface. +* `RegisterServices(cfg Configurator)`: Registers the services of modules implementing the `HasServices` interface. +* `InitGenesis(ctx context.Context, cdc codec.JSONCodec, genesisData map[string]json.RawMessage)`: Calls the [`InitGenesis`](./08-genesis.md#initgenesis) function of each module when the application is first started, in the order defined in `OrderInitGenesis`. Returns an `abci.ResponseInitChain` to the underlying consensus engine, which can contain validator updates. +* `ExportGenesis(ctx context.Context, cdc codec.JSONCodec)`: Calls the [`ExportGenesis`](./08-genesis.md#exportgenesis) function of each module, in the order defined in `OrderExportGenesis`. The export constructs a genesis file from a previously existing state, and is mainly used when a hard-fork upgrade of the chain is required. +* `ExportGenesisForModules(ctx context.Context, cdc codec.JSONCodec, modulesToExport []string)`: Behaves the same as `ExportGenesis`, except takes a list of modules to export. +* `BeginBlock(ctx context.Context) error`: At the beginning of each block, this function is called from [`BaseApp`](../../learn/advanced/00-baseapp.md#beginblock) and, in turn, calls the [`BeginBlock`](./06-beginblock-endblock.md) function of each modules implementing the `appmodule.HasBeginBlocker` interface, in the order defined in `OrderBeginBlockers`. It creates a child [context](../../learn/advanced/02-context.md) with an event manager to aggregate [events](../../learn/advanced/08-events.md) emitted from each modules. +* `EndBlock(ctx context.Context) error`: At the end of each block, this function is called from [`BaseApp`](../../learn/advanced/00-baseapp.md#endblock) and, in turn, calls the [`EndBlock`](./06-beginblock-endblock.md) function of each modules implementing the `appmodule.HasEndBlocker` interface, in the order defined in `OrderEndBlockers`. It creates a child [context](../../learn/advanced/02-context.md) with an event manager to aggregate [events](../../learn/advanced/08-events.md) emitted from all modules. The function returns an `abci` which contains the aforementioned events, as well as validator set updates (if any). +* `EndBlock(context.Context) ([]abci.ValidatorUpdate, error)`: At the end of each block, this function is called from [`BaseApp`](../../learn/advanced/00-baseapp.md#endblock) and, in turn, calls the [`EndBlock`](./06-beginblock-endblock.md) function of each modules implementing the `module.HasABCIEndBlock` interface, in the order defined in `OrderEndBlockers`. It creates a child [context](../../learn/advanced/02-context.md) with an event manager to aggregate [events](../../learn/advanced/08-events.md) emitted from all modules. The function returns an `abci` which contains the aforementioned events, as well as validator set updates (if any). +* `Precommit(ctx context.Context)`: During [`Commit`](../../learn/advanced/00-baseapp.md#commit), this function is called from `BaseApp` immediately before the [`deliverState`](../../learn/advanced/00-baseapp.md#state-updates) is written to the underlying [`rootMultiStore`](../../learn/advanced/04-store.md#commitmultistore) and, in turn calls the `Precommit` function of each modules implementing the `HasPrecommit` interface, in the order defined in `OrderPrecommiters`. It creates a child [context](../../learn/advanced/02-context.md) where the underlying `CacheMultiStore` is that of the newly committed block's [`finalizeblockstate`](../../learn/advanced/00-baseapp.md#state-updates). +* `PrepareCheckState(ctx context.Context)`: During [`Commit`](../../learn/advanced/00-baseapp.md#commit), this function is called from `BaseApp` immediately after the [`deliverState`](../../learn/advanced/00-baseapp.md#state-updates) is written to the underlying [`rootMultiStore`](../../learn/advanced/04-store.md#commitmultistore) and, in turn calls the `PrepareCheckState` function of each module implementing the `HasPrepareCheckState` interface, in the order defined in `OrderPrepareCheckStaters`. It creates a child [context](../../learn/advanced/02-context.md) where the underlying `CacheMultiStore` is that of the next block's [`checkState`](../../learn/advanced/00-baseapp.md#state-updates). Writes to this state will be present in the [`checkState`](../../learn/advanced/00-baseapp.md#state-updates) of the next block, and therefore this method can be used to prepare the `checkState` for the next block. + +Here's an example of a concrete integration within an `simapp`: + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/app.go#L411-L434 +``` + +This is the same example from `runtime` (the package that powers app di): + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/runtime/module.go#L61 +``` + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/runtime/module.go#L82 +``` diff --git a/docs/docs/building-modules/02-messages-and-queries.md b/docs/docs/build/building-modules/02-messages-and-queries.md similarity index 62% rename from docs/docs/building-modules/02-messages-and-queries.md rename to docs/docs/build/building-modules/02-messages-and-queries.md index e2cb642ee6ef..573c35cd770e 100644 --- a/docs/docs/building-modules/02-messages-and-queries.md +++ b/docs/docs/build/building-modules/02-messages-and-queries.md @@ -8,29 +8,22 @@ sidebar_position: 1 `Msg`s and `Queries` are the two primary objects handled by modules. Most of the core components defined in a module, like `Msg` services, `keeper`s and `Query` services, exist to process `message`s and `queries`. ::: -:::note +:::note Pre-requisite Readings -### Pre-requisite Readings - -* [Introduction to Cosmos SDK Modules](./01-intro.md) +* [Introduction to Cosmos SDK Modules](./00-intro.md) ::: ## Messages -`Msg`s are objects whose end-goal is to trigger state-transitions. They are wrapped in [transactions](../core/01-transactions.md), which may contain one or more of them. +`Msg`s are objects whose end-goal is to trigger state-transitions. They are wrapped in [transactions](../../learn/advanced/01-transactions.md), which may contain one or more of them. -When a transaction is relayed from the underlying consensus engine to the Cosmos SDK application, it is first decoded by [`BaseApp`](../core/00-baseapp.md). Then, each message contained in the transaction is extracted and routed to the appropriate module via `BaseApp`'s `MsgServiceRouter` so that it can be processed by the module's [`Msg` service](./03-msg-services.md). For a more detailed explanation of the lifecycle of a transaction, click [here](../basics/01-tx-lifecycle.md). +When a transaction is relayed from the underlying consensus engine to the Cosmos SDK application, it is first decoded by [`BaseApp`](../../learn/advanced/00-baseapp.md). Then, each message contained in the transaction is extracted and routed to the appropriate module via `BaseApp`'s `MsgServiceRouter` so that it can be processed by the module's [`Msg` service](./03-msg-services.md). For a more detailed explanation of the lifecycle of a transaction, click [here](../../learn/beginner/01-tx-lifecycle.md). ### `Msg` Services -Defining Protobuf `Msg` services is the recommended way to handle messages. A Protobuf `Msg` service should be created for each module, typically in `tx.proto` (see more info about [conventions and naming](../core/05-encoding.md#faq)). It must have an RPC service method defined for each message in the module. - -See an example of a `Msg` service definition from `x/bank` module: +Defining Protobuf `Msg` services is the recommended way to handle messages. A Protobuf `Msg` service should be created for each module, typically in `tx.proto` (see more info about [conventions and naming](../../learn/advanced/05-encoding.md#faq)). It must have an RPC service method defined for each message in the module. -```protobuf reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/bank/v1beta1/tx.proto#L13-L36 -``` Each `Msg` service method must have exactly one argument, which must implement the `sdk.Msg` interface, and a Protobuf response. The naming convention is to call the RPC argument `Msg` and the RPC response `MsgResponse`. For example: @@ -38,47 +31,65 @@ Each `Msg` service method must have exactly one argument, which must implement t rpc Send(MsgSend) returns (MsgSendResponse); ``` -`sdk.Msg` interface is a simplified version of the Amino `LegacyMsg` interface described [below](#legacy-amino-msgs) with the `GetSigners()` method. For backwards compatibility with [Amino `LegacyMsg`s](#legacy-amino-msgs), existing `LegacyMsg` types should be used as the request parameter for `service` RPC definitions. Newer `sdk.Msg` types, which only support `service` definitions, should use canonical `Msg...` name. - -The Cosmos SDK uses Protobuf definitions to generate client and server code: +See an example of a `Msg` service definition from `x/bank` module: -* `MsgServer` interface defines the server API for the `Msg` service and its implementation is described as part of the [`Msg` services](./03-msg-services.md) documentation. -* Structures are generated for all RPC request and response types. +```protobuf reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/proto/cosmos/bank/v1beta1/tx.proto#L13-L36 +``` -A `RegisterMsgServer` method is also generated and should be used to register the module's `MsgServer` implementation in `RegisterServices` method from the [`AppModule` interface](./01-module-manager.md#appmodule). +### `sdk.Msg` Interface -In order for clients (CLI and grpc-gateway) to have these URLs registered, the Cosmos SDK provides the function `RegisterMsgServiceDesc(registry codectypes.InterfaceRegistry, sd *grpc.ServiceDesc)` that should be called inside module's [`RegisterInterfaces`](01-module-manager.md#appmodulebasic) method, using the proto-generated `&_Msg_serviceDesc` as `*grpc.ServiceDesc` argument. +`sdk.Msg` is a alias of `proto.Message`. -### Legacy Amino `LegacyMsg`s +To attach a `ValidateBasic()` method to a message then you must add methods to the type adhereing to the `HasValidateBasic`. -The following way of defining messages is deprecated and using [`Msg` services](#msg-services) is preferred. +```go reference +https://github.com/cosmos/cosmos-sdk/blob/9c1e8b247cd47b5d3decda6e86fbc3bc996ee5d7/types/tx_msg.go#L84-L88 +``` -Amino `LegacyMsg`s can be defined as protobuf messages. The messages definition usually includes a list of parameters needed to process the message that will be provided by end-users when they want to create a new transaction containing said message. +In 0.50+ signers from the `GetSigners()` call is automated via a protobuf annotation. -A `LegacyMsg` is typically accompanied by a standard constructor function, that is called from one of the [module's interface](./09-module-interfaces.md). `message`s also need to implement the `sdk.Msg` interface: +Read more about the signer field [here](./05-protobuf-annotations.md). -```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/tx_msg.go#L14-L26 +```protobuf reference +https://github.com/cosmos/cosmos-sdk/blob/e6848d99b55a65d014375b295bdd7f9641aac95e/proto/cosmos/bank/v1beta1/tx.proto#L40 ``` -It extends `proto.Message` and contains the following methods: +If there is a need for custom signers then there is an alternative path which can be taken. A function which returns `signing.CustomGetSigner` for a specific message can be defined. -* `GetSignBytes() []byte`: Return the canonical byte representation of the message. Used to generate a signature. -* `GetSigners() []AccAddress`: Return the list of signers. The Cosmos SDK will make sure that each `message` contained in a transaction is signed by all the signers listed in the list returned by this method. +```go +func ProvideBankSendTransactionGetSigners() signing.CustomGetSigner { -```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/auth/migrations/legacytx/stdsign.go#L20-L36 + // Extract the signer from the signature. + signer, err := coretypes.LatestSigner(Tx).Sender(ethTx) + if err != nil { + return nil, err + } + + // Return the signer in the required format. + return [][]byte{signer.Bytes()}, nil +} ``` -See an example implementation of a `message` from the `gov` module: +When using dependency injection (depinject) this can be provided to the application via the provide method. -```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/gov/types/v1/msgs.go#L121-L153 +```go +depinject.Provide(banktypes.ProvideBankSendTransactionGetSigners) ``` +The Cosmos SDK uses Protobuf definitions to generate client and server code: + +* `MsgServer` interface defines the server API for the `Msg` service and its implementation is described as part of the [`Msg` services](./03-msg-services.md) documentation. +* Structures are generated for all RPC request and response types. + +A `RegisterMsgServer` method is also generated and should be used to register the module's `MsgServer` implementation in `RegisterServices` method from the [`AppModule` interface](./01-module-manager.md#appmodule). + +In order for clients (CLI and grpc-gateway) to have these URLs registered, the Cosmos SDK provides the function `RegisterMsgServiceDesc(registry codectypes.InterfaceRegistry, sd *grpc.ServiceDesc)` that should be called inside module's [`RegisterInterfaces`](01-module-manager.md#appmodulebasic) method, using the proto-generated `&_Msg_serviceDesc` as `*grpc.ServiceDesc` argument. + + ## Queries -A `query` is a request for information made by end-users of applications through an interface and processed by a full-node. A `query` is received by a full-node through its consensus engine and relayed to the application via the ABCI. It is then routed to the appropriate module via `BaseApp`'s `QueryRouter` so that it can be processed by the module's query service (./04-query-services.md). For a deeper look at the lifecycle of a `query`, click [here](../basics/02-query-lifecycle.md). +A `query` is a request for information made by end-users of applications through an interface and processed by a full-node. A `query` is received by a full-node through its consensus engine and relayed to the application via the ABCI. It is then routed to the appropriate module via `BaseApp`'s `QueryRouter` so that it can be processed by the module's query service (./04-query-services.md). For a deeper look at the lifecycle of a `query`, click [here](../../learn/beginner/02-query-lifecycle.md). ### gRPC Queries @@ -87,7 +98,7 @@ Queries should be defined using [Protobuf services](https://developers.google.co Here's an example of such a `Query` service definition: ```protobuf reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/auth/v1beta1/query.proto#L14-L89 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/proto/cosmos/auth/v1beta1/query.proto#L14-L89 ``` As `proto.Message`s, generated `Response` types implement by default `String()` method of [`fmt.Stringer`](https://pkg.go.dev/fmt#Stringer). @@ -104,14 +115,14 @@ queryCategory/queryRoute/queryType/arg1/arg2/... where: -* `queryCategory` is the category of the `query`, typically `custom` for module queries. It is used to differentiate between different kinds of queries within `BaseApp`'s [`Query` method](../core/00-baseapp.md#query). -* `queryRoute` is used by `BaseApp`'s [`queryRouter`](../core/00-baseapp.md#query-routing) to map the `query` to its module. Usually, `queryRoute` should be the name of the module. +* `queryCategory` is the category of the `query`, typically `custom` for module queries. It is used to differentiate between different kinds of queries within `BaseApp`'s [`Query` method](../../learn/advanced/00-baseapp.md#query). +* `queryRoute` is used by `BaseApp`'s [`queryRouter`](../../learn/advanced/00-baseapp.md#query-routing) to map the `query` to its module. Usually, `queryRoute` should be the name of the module. * `queryType` is used by the module's [`querier`](./04-query-services.md#legacy-queriers) to map the `query` to the appropriate `querier function` within the module. * `args` are the actual arguments needed to process the `query`. They are filled out by the end-user. Note that for bigger queries, you might prefer passing arguments in the `Data` field of the request `req` instead of the `path`. The `path` for each `query` must be defined by the module developer in the module's [command-line interface file](./09-module-interfaces.md#query-commands).Overall, there are 3 mains components module developers need to implement in order to make the subset of the state defined by their module queryable: -* A [`querier`](./04-query-services.md#legacy-queriers), to process the `query` once it has been [routed to the module](../core/00-baseapp.md#query-routing). +* A [`querier`](./04-query-services.md#legacy-queriers), to process the `query` once it has been [routed to the module](../../learn/advanced/00-baseapp.md#query-routing). * [Query commands](./09-module-interfaces.md#query-commands) in the module's CLI file, where the `path` for each `query` is specified. * `query` return types. Typically defined in a file `types/querier.go`, they specify the result type of each of the module's `queries`. These custom types must implement the `String()` method of [`fmt.Stringer`](https://pkg.go.dev/fmt#Stringer). @@ -122,5 +133,5 @@ Store queries query directly for store keys. They use `clientCtx.QueryABCI(req a See following examples: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/baseapp/abci.go#L881-L902 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/baseapp/abci.go#L864-L894 ``` diff --git a/docs/docs/building-modules/03-msg-services.md b/docs/docs/build/building-modules/03-msg-services.md similarity index 75% rename from docs/docs/building-modules/03-msg-services.md rename to docs/docs/build/building-modules/03-msg-services.md index c1c57b3f1fef..421e53deca3a 100644 --- a/docs/docs/building-modules/03-msg-services.md +++ b/docs/docs/build/building-modules/03-msg-services.md @@ -5,12 +5,10 @@ sidebar_position: 1 # `Msg` Services :::note Synopsis -A Protobuf `Msg` service processes [messages](./02-messages-and-queries.md#messages). Protobuf `Msg` services are specific to the module in which they are defined, and only process messages defined within the said module. They are called from `BaseApp` during [`DeliverTx`](../core/00-baseapp.md#delivertx). +A Protobuf `Msg` service processes [messages](./02-messages-and-queries.md#messages). Protobuf `Msg` services are specific to the module in which they are defined, and only process messages defined within the said module. They are called from `BaseApp` during [`DeliverTx`](../../learn/advanced/00-baseapp.md#delivertx). ::: -:::note - -### Pre-requisite Readings +:::note Pre-requisite Readings * [Module Manager](./01-module-manager.md) * [Messages and Queries](./02-messages-and-queries.md) @@ -26,19 +24,19 @@ As further described in [ADR 031](../architecture/adr-031-msg-service.md), this Protobuf generates a `MsgServer` interface based on a definition of `Msg` service. It is the role of the module developer to implement this interface, by implementing the state transition logic that should happen upon receival of each `sdk.Msg`. As an example, here is the generated `MsgServer` interface for `x/bank`, which exposes two `sdk.Msg`s: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/bank/types/tx.pb.go#L550-L568 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/bank/types/tx.pb.go#L550-L568 ``` When possible, the existing module's [`Keeper`](./06-keeper.md) should implement `MsgServer`, otherwise a `msgServer` struct that embeds the `Keeper` can be created, typically in `./keeper/msg_server.go`: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/bank/keeper/msg_server.go#L15-L17 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/bank/keeper/msg_server.go#L17-L19 ``` -`msgServer` methods can retrieve the `sdk.Context` from the `context.Context` parameter method using the `sdk.UnwrapSDKContext`: +`msgServer` methods can retrieve the `context.Context` from the `context.Context` parameter method using the `sdk.UnwrapSDKContext`: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/bank/keeper/msg_server.go#L28 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/bank/keeper/msg_server.go#L56 ``` `sdk.Msg` processing usually follows these 3 steps: @@ -73,7 +71,7 @@ After the validation is successful, the `msgServer` method uses the [`keeper`](. ### Events -Before returning, `msgServer` methods generally emit one or more [events](../core/08-events.md) by using the `EventManager` held in the `ctx`. Use the new `EmitTypedEvent` function that uses protobuf-based event types: +Before returning, `msgServer` methods generally emit one or more [events](../../learn/advanced/08-events.md) by using the `EventManager` held in the `ctx`. Use the new `EmitTypedEvent` function that uses protobuf-based event types: ```go ctx.EventManager().EmitTypedEvent( @@ -92,18 +90,18 @@ ctx.EventManager().EmitEvent( ) ``` -These events are relayed back to the underlying consensus engine and can be used by service providers to implement services around the application. Click [here](../core/08-events.md) to learn more about events. +These events are relayed back to the underlying consensus engine and can be used by service providers to implement services around the application. Click [here](../../learn/advanced/08-events.md) to learn more about events. -The invoked `msgServer` method returns a `proto.Message` response and an `error`. These return values are then wrapped into an `*sdk.Result` or an `error` using `sdk.WrapServiceResult(ctx sdk.Context, res proto.Message, err error)`: +The invoked `msgServer` method returns a `proto.Message` response and an `error`. These return values are then wrapped into an `*sdk.Result` or an `error` using `sdk.WrapServiceResult(ctx context.Context, res proto.Message, err error)`: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/baseapp/msg_service_router.go#L131 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/baseapp/msg_service_router.go#L160 ``` This method takes care of marshaling the `res` parameter to protobuf and attaching any events on the `ctx.EventManager()` to the `sdk.Result`. ```protobuf reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/base/abci/v1beta1/abci.proto#L88-L109 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/proto/cosmos/base/abci/v1beta1/abci.proto#L93-L113 ``` This diagram shows a typical structure of a Protobuf `Msg` service, and how the message propagates through the module. @@ -112,10 +110,10 @@ This diagram shows a typical structure of a Protobuf `Msg` service, and how the ## Telemetry -New [telemetry metrics](../core/09-telemetry.md) can be created from `msgServer` methods when handling messages. +New [telemetry metrics](../../learn/advanced/09-telemetry.md) can be created from `msgServer` methods when handling messages. This is an example from the `x/auth/vesting` module: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/auth/vesting/msg_server.go#L68-L80 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/auth/vesting/msg_server.go#L76-L88 ``` diff --git a/docs/docs/building-modules/04-query-services.md b/docs/docs/build/building-modules/04-query-services.md similarity index 91% rename from docs/docs/building-modules/04-query-services.md rename to docs/docs/build/building-modules/04-query-services.md index cedeb092844c..a787a0c22b6f 100644 --- a/docs/docs/building-modules/04-query-services.md +++ b/docs/docs/build/building-modules/04-query-services.md @@ -5,12 +5,10 @@ sidebar_position: 1 # Query Services :::note Synopsis -A Protobuf Query service processes [`queries`](./02-messages-and-queries.md#queries). Query services are specific to the module in which they are defined, and only process `queries` defined within said module. They are called from `BaseApp`'s [`Query` method](../core/00-baseapp.md#query). +A Protobuf Query service processes [`queries`](./02-messages-and-queries.md#queries). Query services are specific to the module in which they are defined, and only process `queries` defined within said module. They are called from `BaseApp`'s [`Query` method](../../learn/advanced/00-baseapp.md#query). ::: -:::note - -### Pre-requisite Readings +:::note Pre-requisite Readings * [Module Manager](./01-module-manager.md) * [Messages and Queries](./02-messages-and-queries.md) @@ -30,13 +28,13 @@ type QueryServer interface { } ``` -These custom queries methods should be implemented by a module's keeper, typically in `./keeper/grpc_query.go`. The first parameter of these methods is a generic `context.Context`. Therefore, the Cosmos SDK provides a function `sdk.UnwrapSDKContext` to retrieve the `sdk.Context` from the provided +These custom queries methods should be implemented by a module's keeper, typically in `./keeper/grpc_query.go`. The first parameter of these methods is a generic `context.Context`. Therefore, the Cosmos SDK provides a function `sdk.UnwrapSDKContext` to retrieve the `context.Context` from the provided `context.Context`. Here's an example implementation for the bank module: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/bank/keeper/grpc_query.go +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/bank/keeper/grpc_query.go ``` ### Calling queries from the State Machine diff --git a/docs/docs/build/building-modules/05-protobuf-annotations.md b/docs/docs/build/building-modules/05-protobuf-annotations.md new file mode 100644 index 000000000000..5240112e9054 --- /dev/null +++ b/docs/docs/build/building-modules/05-protobuf-annotations.md @@ -0,0 +1,133 @@ +--- +sidebar_position: 1 +--- + +# ProtocolBuffer Annotations + +This document explains the various protobuf scalars that have been added to make working with protobuf easier for Cosmos SDK application developers + +## Signer + +Signer specifies which field should be used to determine the signer of a message for the Cosmos SDK. This field can be used for clients as well to infer which field should be used to determine the signer of a message. + +Read more about the signer field [here](./02-messages-and-queries.md). + +```protobuf reference +https://github.com/cosmos/cosmos-sdk/blob/e6848d99b55a65d014375b295bdd7f9641aac95e/proto/cosmos/bank/v1beta1/tx.proto#L40 +``` + +```proto +option (cosmos.msg.v1.signer) = "from_address"; +``` + +## Scalar + +The scalar type defines a way for clients to understand how to construct protobuf messages according to what is expected by the module and sdk. + +```proto +(cosmos_proto.scalar) = "cosmos.AddressString" +``` + +Example of account address string scalar: + +```proto reference +https://github.com/cosmos/cosmos-sdk/blob/e6848d99b55a65d014375b295bdd7f9641aac95e/proto/cosmos/bank/v1beta1/tx.proto#L46 +``` + +Example of validator address string scalar: + +```proto reference +https://github.com/cosmos/cosmos-sdk/blob/e8f28bf5db18b8d6b7e0d94b542ce4cf48fed9d6/proto/cosmos/distribution/v1beta1/query.proto#L87 +``` + +Example of Decimals scalar: + +```proto reference +https://github.com/cosmos/cosmos-sdk/blob/e8f28bf5db18b8d6b7e0d94b542ce4cf48fed9d6/proto/cosmos/distribution/v1beta1/distribution.proto#L26 +``` + +Example of Int scalar: + +```proto reference +https://github.com/cosmos/cosmos-sdk/blob/e8f28bf5db18b8d6b7e0d94b542ce4cf48fed9d6/proto/cosmos/gov/v1/gov.proto#L137 +``` + +There are a few options for what can be provided as a scalar: `cosmos.AddressString`, `cosmos.ValidatorAddressString`, `cosmos.ConsensusAddressString`, `cosmos.Int`, `cosmos.Dec`. + +## Implements_Interface + +Implement interface is used to provide information to client tooling like [telescope](https://github.com/cosmology-tech/telescope) on how to encode and decode protobuf messages. + +```proto +option (cosmos_proto.implements_interface) = "cosmos.auth.v1beta1.AccountI"; +``` + +## Method,Field,Message Added In + +`method_added_in`, `field_added_in` and `message_added_in` are annotations to denotate to clients that a field has been supported in a later version. This is useful when new methods or fields are added in later versions and that the client needs to be aware of what it can call. + +The annotation should be worded as follow: + +```proto +option (cosmos_proto.method_added_in) = "cosmos-sdk v0.50.1"; +option (cosmos_proto.method_added_in) = "x/epochs v1.0.0"; +option (cosmos_proto.method_added_in) = "simapp v24.0.0"; +``` + +## Amino + +The amino codec was removed in `v0.50+`, this means there is not a need register `legacyAminoCodec`. To replace the amino codec, Amino protobuf annotations are used to provide information to the amino codec on how to encode and decode protobuf messages. + +:::note +Amino annotations are only used for backwards compatibility with amino. New modules are not required use amino annotations. +::: + +The below annotations are used to provide information to the amino codec on how to encode and decode protobuf messages in a backwards compatible manner. + +### Name + +Name specifies the amino name that would show up for the user in order for them see which message they are signing. + +```proto +option (amino.name) = "cosmos-sdk/BaseAccount"; +``` + +```proto reference +https://github.com/cosmos/cosmos-sdk/blob/e8f28bf5db18b8d6b7e0d94b542ce4cf48fed9d6/proto/cosmos/bank/v1beta1/tx.proto#L41 +``` + +### Field_Name + +Field name specifies the amino name that would show up for the user in order for them see which field they are signing. + +```proto +uint64 height = 1 [(amino.field_name) = "public_key"]; +``` + +```proto reference +https://github.com/cosmos/cosmos-sdk/blob/e8f28bf5db18b8d6b7e0d94b542ce4cf48fed9d6/proto/cosmos/distribution/v1beta1/distribution.proto#L166 +``` + +### Dont_OmitEmpty + +Dont omitempty specifies that the field should not be omitted when encoding to amino. + +```proto +repeated cosmos.base.v1beta1.Coin amount = 3 [(amino.dont_omitempty) = true]; +``` + +```proto reference +https://github.com/cosmos/cosmos-sdk/blob/e8f28bf5db18b8d6b7e0d94b542ce4cf48fed9d6/proto/cosmos/bank/v1beta1/bank.proto#L56 +``` + +### Encoding + +Encoding instructs the amino json marshaler how to encode certain fields that may differ from the standard encoding behaviour. The most common example of this is how `repeated cosmos.base.v1beta1.Coin` is encoded when using the amino json encoding format. The `legacy_coins` option tells the json marshaler [how to encode a null slice](https://github.com/cosmos/cosmos-sdk/blob/e8f28bf5db18b8d6b7e0d94b542ce4cf48fed9d6/x/tx/signing/aminojson/json_marshal.go#L65) of `cosmos.base.v1beta1.Coin`. + +```proto +(amino.encoding) = "legacy_coins", +``` + +```proto reference +https://github.com/cosmos/cosmos-sdk/blob/e8f28bf5db18b8d6b7e0d94b542ce4cf48fed9d6/proto/cosmos/bank/v1beta1/genesis.proto#L23 +``` diff --git a/docs/docs/build/building-modules/06-beginblock-endblock.md b/docs/docs/build/building-modules/06-beginblock-endblock.md new file mode 100644 index 000000000000..a8eafdf67be7 --- /dev/null +++ b/docs/docs/build/building-modules/06-beginblock-endblock.md @@ -0,0 +1,47 @@ +--- +sidebar_position: 1 +--- + +# BeginBlocker and EndBlocker + +:::note Synopsis +`BeginBlocker` and `EndBlocker` are optional methods module developers can implement in their module. They will be triggered at the beginning and at the end of each block respectively, when the [`BeginBlock`](../../learn/advanced/00-baseapp.md#beginblock) and [`EndBlock`](../../learn/advanced/00-baseapp.md#endblock) ABCI messages are received from the underlying consensus engine. +::: + +:::note Pre-requisite Readings + +* [Module Manager](./01-module-manager.md) + +::: + +## BeginBlocker and EndBlocker + +`BeginBlocker` and `EndBlocker` are a way for module developers to add automatic execution of logic to their module. This is a powerful tool that should be used carefully, as complex automatic functions can slow down or even halt the chain. + +In 0.47.0, Prepare and Process Proposal were added that allow app developers to do arbitrary work at those phases, but they do not influence the work that will be done in BeginBlock. If an application required `BeginBlock` to execute prior to any sort of work is done then this is not possible today (0.50.0). + +When needed, `BeginBlocker` and `EndBlocker` are implemented as part of the [`HasBeginBlocker`, `HasABCIEndBlocker` and `EndBlocker` interfaces](./01-module-manager.md#appmodule). This means either can be left-out if not required. The `BeginBlock` and `EndBlock` methods of the interface implemented in `module.go` generally defer to `BeginBlocker` and `EndBlocker` methods respectively, which are usually implemented in `abci.go`. + +The actual implementation of `BeginBlocker` and `EndBlocker` in `abci.go` are very similar to that of a [`Msg` service](./03-msg-services.md): + +* They generally use the [`keeper`](./06-keeper.md) and [`ctx`](../../learn/advanced/02-context.md) to retrieve information about the latest state. +* If needed, they use the `keeper` and `ctx` to trigger state-transitions. +* If needed, they can emit [`events`](../../learn/advanced/08-events.md) via the `ctx`'s `EventManager`. + +A specific type of `EndBlocker` is available to return validator updates to the underlying consensus engine in the form of an [`[]abci.ValidatorUpdates`](https://docs.cometbft.com/v0.37/spec/abci/abci++_methods#endblock). This is the preferred way to implement custom validator changes. + +It is possible for developers to define the order of execution between the `BeginBlocker`/`EndBlocker` functions of each of their application's modules via the module's manager `SetOrderBeginBlocker`/`SetOrderEndBlocker` methods. For more on the module manager, click [here](./01-module-manager.md#manager). + +See an example implementation of `BeginBlocker` from the `distribution` module: + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/distribution/abci.go#L14-L38 +``` + +and an example implementation of `EndBlocker` from the `staking` module: + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/staking/keeper/abci.go#L22-L27 +``` + + diff --git a/docs/docs/building-modules/06-keeper.md b/docs/docs/build/building-modules/06-keeper.md similarity index 63% rename from docs/docs/building-modules/06-keeper.md rename to docs/docs/build/building-modules/06-keeper.md index 7f8f4457556f..399ec648cac8 100644 --- a/docs/docs/building-modules/06-keeper.md +++ b/docs/docs/build/building-modules/06-keeper.md @@ -8,11 +8,9 @@ sidebar_position: 1 `Keeper`s refer to a Cosmos SDK abstraction whose role is to manage access to the subset of the state defined by various modules. `Keeper`s are module-specific, i.e. the subset of state defined by a module can only be accessed by a `keeper` defined in said module. If a module needs to access the subset of state defined by another module, a reference to the second module's internal `keeper` needs to be passed to the first one. This is done in `app.go` during the instantiation of module keepers. ::: -:::note +:::note Pre-requisite Readings -### Pre-requisite Readings - -* [Introduction to Cosmos SDK Modules](./01-intro.md) +* [Introduction to Cosmos SDK Modules](./00-intro.md) ::: @@ -20,9 +18,9 @@ sidebar_position: 1 The Cosmos SDK is a framework that makes it easy for developers to build complex decentralized applications from scratch, mainly by composing modules together. As the ecosystem of open-source modules for the Cosmos SDK expands, it will become increasingly likely that some of these modules contain vulnerabilities, as a result of the negligence or malice of their developer. -The Cosmos SDK adopts an [object-capabilities-based approach](../core/10-ocap.md) to help developers better protect their application from unwanted inter-module interactions, and `keeper`s are at the core of this approach. A `keeper` can be considered quite literally to be the gatekeeper of a module's store(s). Each store (typically an [`IAVL` Store](../core/04-store.md#iavl-store)) defined within a module comes with a `storeKey`, which grants unlimited access to it. The module's `keeper` holds this `storeKey` (which should otherwise remain unexposed), and defines [methods](#implementing-methods) for reading and writing to the store(s). +The Cosmos SDK adopts an [object-capabilities-based approach](../../learn/advanced/10-ocap.md) to help developers better protect their application from unwanted inter-module interactions, and `keeper`s are at the core of this approach. A `keeper` can be considered quite literally to be the gatekeeper of a module's store(s). Each store (typically an [`IAVL` Store](../../learn/advanced/04-store.md#iavl-store)) defined within a module comes with a `storeKey`, which grants unlimited access to it. The module's `keeper` holds this `storeKey` (which should otherwise remain unexposed), and defines [methods](#implementing-methods) for reading and writing to the store(s). -The core idea behind the object-capabilities approach is to only reveal what is necessary to get the work done. In practice, this means that instead of handling permissions of modules through access-control lists, module `keeper`s are passed a reference to the specific instance of the other modules' `keeper`s that they need to access (this is done in the [application's constructor function](../basics/00-app-anatomy.md#constructor-function)). As a consequence, a module can only interact with the subset of state defined in another module via the methods exposed by the instance of the other module's `keeper`. This is a great way for developers to control the interactions that their own module can have with modules developed by external developers. +The core idea behind the object-capabilities approach is to only reveal what is necessary to get the work done. In practice, this means that instead of handling permissions of modules through access-control lists, module `keeper`s are passed a reference to the specific instance of the other modules' `keeper`s that they need to access (this is done in the [application's constructor function](../../learn/beginner/00-app-anatomy.md#constructor-function)). As a consequence, a module can only interact with the subset of state defined in another module via the methods exposed by the instance of the other module's `keeper`. This is a great way for developers to control the interactions that their own module can have with modules developed by external developers. ## Type Definition @@ -43,16 +41,17 @@ type Keeper struct { For example, here is the type definition of the `keeper` from the `staking` module: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/staking/keeper/keeper.go#L23-L31 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/staking/keeper/keeper.go#L23-L31 ``` Let us go through the different parameters: * An expected `keeper` is a `keeper` external to a module that is required by the internal `keeper` of said module. External `keeper`s are listed in the internal `keeper`'s type definition as interfaces. These interfaces are themselves defined in an `expected_keepers.go` file in the root of the module's folder. In this context, interfaces are used to reduce the number of dependencies, as well as to facilitate the maintenance of the module itself. -* `storeKey`s grant access to the store(s) of the [multistore](../core/04-store.md) managed by the module. They should always remain unexposed to external modules. -* `cdc` is the [codec](../core/05-encoding.md) used to marshall and unmarshall structs to/from `[]byte`. The `cdc` can be any of `codec.BinaryCodec`, `codec.JSONCodec` or `codec.Codec` based on your requirements. It can be either a proto or amino codec as long as they implement these interfaces. The authority listed is a module account or user account that has the right to change module level parameters. Previously this was handled by the param module, which has been deprecated. +* `storeKey`s grant access to the store(s) of the [multistore](../../learn/advanced/04-store.md) managed by the module. They should always remain unexposed to external modules. +* `cdc` is the [codec](../../learn/advanced/05-encoding.md) used to marshall and unmarshall structs to/from `[]byte`. The `cdc` can be any of `codec.BinaryCodec`, `codec.JSONCodec` or `codec.Codec` based on your requirements. It can be either a proto or amino codec as long as they implement these interfaces. +* The authority listed is a module account or user account that has the right to change module level parameters. Previously this was handled by the param module, which has been deprecated. -Of course, it is possible to define different types of internal `keeper`s for the same module (e.g. a read-only `keeper`). Each type of `keeper` comes with its own constructor function, which is called from the [application's constructor function](../basics/00-app-anatomy.md). This is where `keeper`s are instantiated, and where developers make sure to pass correct instances of modules' `keeper`s to other modules that require them. +Of course, it is possible to define different types of internal `keeper`s for the same module (e.g. a read-only `keeper`). Each type of `keeper` comes with its own constructor function, which is called from the [application's constructor function](../../learn/beginner/00-app-anatomy.md). This is where `keeper`s are instantiated, and where developers make sure to pass correct instances of modules' `keeper`s to other modules that require them. ## Implementing Methods @@ -61,7 +60,7 @@ Of course, it is possible to define different types of internal `keeper`s for th Typically, a *getter* method will have the following signature ```go -func (k Keeper) Get(ctx sdk.Context, key string) returnType +func (k Keeper) Get(ctx context.Context, key string) returnType ``` and the method will go through the following steps: @@ -73,7 +72,7 @@ and the method will go through the following steps: Similarly, a *setter* method will have the following signature ```go -func (k Keeper) Set(ctx sdk.Context, key string, value valueType) +func (k Keeper) Set(ctx context.Context, key string, value valueType) ``` and the method will go through the following steps: @@ -82,12 +81,12 @@ and the method will go through the following steps: 2. Marshal `value` to `[]byte` using the codec `cdc`. 3. Set the encoded value in the store at location `key` using the `Set(key []byte, value []byte)` method of the store. -For more, see an example of `keeper`'s [methods implementation from the `staking` module](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/staking/keeper/keeper.go). +For more, see an example of `keeper`'s [methods implementation from the `staking` module](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/staking/keeper/keeper.go). -The [module `KVStore`](../core/04-store.md#kvstore-and-commitkvstore-interfaces) also provides an `Iterator()` method which returns an `Iterator` object to iterate over a domain of keys. +The [module `KVStore`](../../learn/advanced/04-store.md#kvstore-and-commitkvstore-interfaces) also provides an `Iterator()` method which returns an `Iterator` object to iterate over a domain of keys. This is an example from the `auth` module to iterate accounts: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/auth/keeper/account.go#L94-L108 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/auth/keeper/account.go ``` diff --git a/docs/docs/building-modules/07-invariants.md b/docs/docs/build/building-modules/07-invariants.md similarity index 84% rename from docs/docs/building-modules/07-invariants.md rename to docs/docs/build/building-modules/07-invariants.md index 4c53169d4277..018796f716a6 100644 --- a/docs/docs/building-modules/07-invariants.md +++ b/docs/docs/build/building-modules/07-invariants.md @@ -8,9 +8,7 @@ sidebar_position: 1 An invariant is a property of the application that should always be true. In the context of the Cosmos SDK, an `Invariant` is a function that checks for a particular invariant. These functions are useful to detect bugs early on and act upon them to limit their potential consequences (e.g. by halting the chain). They are also useful in the development process of the application to detect bugs via simulations. ::: -:::note - -### Pre-requisite Readings +:::note Pre-requisite Readings * [Keepers](./06-keeper.md) @@ -21,7 +19,7 @@ An invariant is a property of the application that should always be true. In the An `Invariant` is a function that checks for a particular invariant within a module. Module `Invariant`s must follow the `Invariant` type: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/invariant.go#L9 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/invariant.go#L9 ``` The `string` return value is the invariant message, which can be used when printing logs, and the `bool` return value is the actual result of the invariant check. @@ -32,7 +30,7 @@ In practice, each module implements `Invariant`s in a `keeper/invariants.go` fil // Example for an Invariant that checks balance-related invariants func BalanceInvariants(k Keeper) sdk.Invariant { - return func(ctx sdk.Context) (string, bool) { + return func(ctx context.Context) (string, bool) { // Implement checks for balance-related invariants } } @@ -46,7 +44,7 @@ Additionally, module developers should generally implement an `AllInvariants` fu func AllInvariants(k Keeper) sdk.Invariant { - return func(ctx sdk.Context) (string, bool) { + return func(ctx context.Context) (string, bool) { res, stop := BalanceInvariants(k)(ctx) if stop { return res, stop @@ -60,10 +58,10 @@ func AllInvariants(k Keeper) sdk.Invariant { Finally, module developers need to implement the `RegisterInvariants` method as part of the [`AppModule` interface](./01-module-manager.md#appmodule). Indeed, the `RegisterInvariants` method of the module, implemented in the `module/module.go` file, typically only defers the call to a `RegisterInvariants` method implemented in the `keeper/invariants.go` file. The `RegisterInvariants` method registers a route for each `Invariant` function in the [`InvariantRegistry`](#invariant-registry): ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/staking/keeper/invariants.go#L12-L22 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/staking/keeper/invariants.go#L12-L22 ``` -For more, see an example of [`Invariant`s implementation from the `staking` module](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/staking/keeper/invariants.go). +For more, see an example of [`Invariant`s implementation from the `staking` module](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/staking/keeper/invariants.go). ## Invariant Registry @@ -72,21 +70,21 @@ The `InvariantRegistry` is a registry where the `Invariant`s of all the modules At its core, the `InvariantRegistry` is defined in the Cosmos SDK as an interface: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/invariant.go#L14-L17 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/invariant.go#L14-L17 ``` Typically, this interface is implemented in the `keeper` of a specific module. The most used implementation of an `InvariantRegistry` can be found in the `crisis` module: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/crisis/keeper/keeper.go#L57-L61 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/crisis/keeper/keeper.go#L48-L50 ``` -The `InvariantRegistry` is therefore typically instantiated by instantiating the `keeper` of the `crisis` module in the [application's constructor function](../basics/00-app-anatomy.md#constructor-function). +The `InvariantRegistry` is therefore typically instantiated by instantiating the `keeper` of the `crisis` module in the [application's constructor function](../../learn/beginner/00-app-anatomy.md#constructor-function). `Invariant`s can be checked manually via [`message`s](./02-messages-and-queries.md), but most often they are checked automatically at the end of each block. Here is an example from the `crisis` module: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/crisis/abci.go#L12-L21 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/crisis/abci.go#L13-L23 ``` In both cases, if one of the `Invariant`s returns false, the `InvariantRegistry` can trigger special logic (e.g. have the application panic and print the `Invariant`s message in the log). diff --git a/docs/docs/building-modules/08-genesis.md b/docs/docs/build/building-modules/08-genesis.md similarity index 66% rename from docs/docs/building-modules/08-genesis.md rename to docs/docs/build/building-modules/08-genesis.md index 2221097bff63..7abb21fb6577 100644 --- a/docs/docs/building-modules/08-genesis.md +++ b/docs/docs/build/building-modules/08-genesis.md @@ -8,9 +8,7 @@ sidebar_position: 1 Modules generally handle a subset of the state and, as such, they need to define the related subset of the genesis file as well as methods to initialize, verify and export it. ::: -:::note - -### Pre-requisite Readings +:::note Pre-requisite Readings * [Module Manager](./01-module-manager.md) * [Keepers](./06-keeper.md) @@ -19,12 +17,12 @@ Modules generally handle a subset of the state and, as such, they need to define ## Type Definition -The subset of the genesis state defined from a given module is generally defined in a `genesis.proto` file ([more info](../core/05-encoding.md#gogoproto) on how to define protobuf messages). The struct defining the module's subset of the genesis state is usually called `GenesisState` and contains all the module-related values that need to be initialized during the genesis process. +The subset of the genesis state defined from a given module is generally defined in a `genesis.proto` file ([more info](../../learn/advanced/05-encoding.md#gogoproto) on how to define protobuf messages). The struct defining the module's subset of the genesis state is usually called `GenesisState` and contains all the module-related values that need to be initialized during the genesis process. See an example of `GenesisState` protobuf message definition from the `auth` module: ```protobuf reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/auth/v1beta1/genesis.proto +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/proto/cosmos/auth/v1beta1/genesis.proto ``` Next we present the main genesis-related methods that need to be implemented by module developers in order for their module to be used in Cosmos SDK applications. @@ -34,7 +32,7 @@ Next we present the main genesis-related methods that need to be implemented by The `DefaultGenesis()` method is a simple method that calls the constructor function for `GenesisState` with the default value for each parameter. See an example from the `auth` module: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/auth/module.go#L55-L59 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/auth/module.go#L63-L67 ``` ### `ValidateGenesis` @@ -42,7 +40,7 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/auth/module.go#L55-L59 The `ValidateGenesis(data GenesisState)` method is called to verify that the provided `genesisState` is correct. It should perform validity checks on each of the parameters listed in `GenesisState`. See an example from the `auth` module: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/auth/types/genesis.go#L61-L74 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/auth/types/genesis.go#L62-L75 ``` ## Other Genesis Methods @@ -51,14 +49,14 @@ Other than the methods related directly to `GenesisState`, module developers are ### `InitGenesis` -The `InitGenesis` method is executed during [`InitChain`](../core/00-baseapp.md#initchain) when the application is first started. Given a `GenesisState`, it initializes the subset of the state managed by the module by using the module's [`keeper`](./06-keeper.md) setter function on each parameter within the `GenesisState`. +The `InitGenesis` method is executed during [`InitChain`](../../learn/advanced/00-baseapp.md#initchain) when the application is first started. Given a `GenesisState`, it initializes the subset of the state managed by the module by using the module's [`keeper`](./06-keeper.md) setter function on each parameter within the `GenesisState`. -The [module manager](./01-module-manager.md#manager) of the application is responsible for calling the `InitGenesis` method of each of the application's modules in order. This order is set by the application developer via the manager's `SetOrderGenesisMethod`, which is called in the [application's constructor function](../basics/00-app-anatomy.md#constructor-function). +The [module manager](./01-module-manager.md#manager) of the application is responsible for calling the `InitGenesis` method of each of the application's modules in order. This order is set by the application developer via the manager's `SetOrderGenesisMethod`, which is called in the [application's constructor function](../../learn/beginner/00-app-anatomy.md#constructor-function). See an example of `InitGenesis` from the `auth` module: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/auth/keeper/genesis.go#L8-L35 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/auth/keeper/genesis.go#L8-L35 ``` ### `ExportGenesis` @@ -68,7 +66,7 @@ The `ExportGenesis` method is executed whenever an export of the state is made. See an example of `ExportGenesis` from the `auth` module. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/auth/keeper/genesis.go#L37-L49 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/auth/keeper/genesis.go#L37-L49 ``` ### GenesisTxHandler @@ -76,5 +74,5 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/auth/keeper/genesis.go#L `GenesisTxHandler` is a way for modules to submit state transitions prior to the first block. This is used by `x/genutil` to submit the genesis transactions for the validators to be added to staking. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/core/genesis/txhandler.go#L3-L6 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/core/genesis/txhandler.go#L3-L6 ``` diff --git a/docs/docs/building-modules/09-module-interfaces.md b/docs/docs/build/building-modules/09-module-interfaces.md similarity index 78% rename from docs/docs/building-modules/09-module-interfaces.md rename to docs/docs/build/building-modules/09-module-interfaces.md index 4059e9a87753..4552baef240e 100644 --- a/docs/docs/building-modules/09-module-interfaces.md +++ b/docs/docs/build/building-modules/09-module-interfaces.md @@ -8,28 +8,26 @@ sidebar_position: 1 This document details how to build CLI and REST interfaces for a module. Examples from various Cosmos SDK modules are included. ::: -:::note +:::note Pre-requisite Readings -### Pre-requisite Readings - -* [Building Modules Intro](./01-intro.md) +* [Building Modules Intro](./00-intro.md) ::: ## CLI -One of the main interfaces for an application is the [command-line interface](../core/07-cli.md). This entrypoint adds commands from the application's modules enabling end-users to create [**messages**](./02-messages-and-queries.md#messages) wrapped in transactions and [**queries**](./02-messages-and-queries.md#queries). The CLI files are typically found in the module's `./client/cli` folder. +One of the main interfaces for an application is the [command-line interface](../../learn/advanced/07-cli.md). This entrypoint adds commands from the application's modules enabling end-users to create [**messages**](./02-messages-and-queries.md#messages) wrapped in transactions and [**queries**](./02-messages-and-queries.md#queries). The CLI files are typically found in the module's `./client/cli` folder. ### Transaction Commands -In order to create messages that trigger state changes, end-users must create [transactions](../core/01-transactions.md) that wrap and deliver the messages. A transaction command creates a transaction that includes one or more messages. +In order to create messages that trigger state changes, end-users must create [transactions](../../learn/advanced/01-transactions.md) that wrap and deliver the messages. A transaction command creates a transaction that includes one or more messages. Transaction commands typically have their own `tx.go` file that lives within the module's `./client/cli` folder. The commands are specified in getter functions and the name of the function should include the name of the command. Here is an example from the `x/bank` module: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/bank/client/cli/tx.go#L35-L71 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/bank/client/cli/tx.go#L37-L76 ``` In the example, `NewSendTxCmd()` creates and returns the transaction command for a transaction that wraps and delivers `MsgSend`. `MsgSend` is the message used to send tokens from one account to another. @@ -48,24 +46,29 @@ In general, the getter function does the following: * **Adds transaction flags:** All transaction commands must add a set of transaction [flags](#flags). The transaction flags are used to collect additional information from the user (e.g. the amount of fees the user is willing to pay). The transaction flags are added to the constructed command using `AddTxFlagsToCmd(cmd)`. * **Returns the command:** Finally, the transaction command is returned. -Each module must implement `NewTxCmd()`, which aggregates all of the transaction commands of the module. Here is an example from the `x/bank` module: +Each module can implement `NewTxCmd()`, which aggregates all of the transaction commands of the module. Here is an example from the `x/bank` module: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/bank/client/cli/tx.go#L17-L33 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/bank/client/cli/tx.go#L20-L35 ``` -Each module must also implement the `GetTxCmd()` method for `AppModuleBasic` that simply returns `NewTxCmd()`. This allows the root command to easily aggregate all of the transaction commands for each module. Here is an example: +Each module then can also implement a `GetTxCmd()` method that simply returns `NewTxCmd()`. This allows the root command to easily aggregate all of the transaction commands for each module. Here is an example: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/bank/module.go#L79-L82 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/bank/module.go#L84-L86 ``` ### Query Commands +:::warning +This section is being rewritten. Refer to [AutoCLI](https://docs.cosmos.network/main/core/autocli) while this section is being updated. +::: + + ## gRPC @@ -143,7 +146,7 @@ In order to do that, modules must implement `RegisterGRPCGatewayRoutes(clientCtx Here's an example from the `x/auth` module: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/auth/module.go#L71-L76 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/auth/module.go#L71-L76 ``` ## gRPC-gateway REST @@ -153,9 +156,9 @@ Applications need to support web services that use HTTP requests (e.g. a web wal Modules that want to expose REST queries should add `google.api.http` annotations to their `rpc` methods, such as in the example below from the `x/auth` module: ```protobuf reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/auth/v1beta1/query.proto#L14-L89 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/proto/cosmos/auth/v1beta1/query.proto#L14-L89 ``` -gRPC gateway is started in-process along with the application and CometBFT. It can be enabled or disabled by setting gRPC Configuration `enable` in [`app.toml`](../run-node/02-interact-node.md#configuring-the-node-using-apptoml). +gRPC gateway is started in-process along with the application and CometBFT. It can be enabled or disabled by setting gRPC Configuration `enable` in [`app.toml`](../run-node/01-run-node.md#configuring-the-node-using-apptoml-and-configtoml). -The Cosmos SDK provides a command for generating [Swagger](https://swagger.io/) documentation (`protoc-gen-swagger`). Setting `swagger` in [`app.toml`](../run-node/02-interact-node.md#configuring-the-node-using-apptoml) defines if swagger documentation should be automatically registered. +The Cosmos SDK provides a command for generating [Swagger](https://swagger.io/) documentation (`protoc-gen-swagger`). Setting `swagger` in [`app.toml`](../run-node/01-run-node.md#configuring-the-node-using-apptoml-and-configtoml) defines if swagger documentation should be automatically registered. diff --git a/docs/docs/building-modules/11-structure.md b/docs/docs/build/building-modules/11-structure.md similarity index 97% rename from docs/docs/building-modules/11-structure.md rename to docs/docs/build/building-modules/11-structure.md index e0d742171540..71a5b3cc2fc7 100644 --- a/docs/docs/building-modules/11-structure.md +++ b/docs/docs/build/building-modules/11-structure.md @@ -80,7 +80,7 @@ x/{module_name} * `keeper/`: The module's `Keeper` and `MsgServer` implementation. * `module/`: The module's `AppModule` and `AppModuleBasic` implementation. * `abci.go`: The module's `BeginBlocker` and `EndBlocker` implementations (this file is only required if `BeginBlocker` and/or `EndBlocker` need to be defined). - * `autocli.go`: The module [autocli](./10-autocli.md) options. + * `autocli.go`: The module [autocli](https://docs.cosmos.network/main/core/autocli) options. * `simulation/`: The module's [simulation](./14-simulator.md) package defines functions used by the blockchain simulator application (`simapp`). * `REAMDE.md`: The module's specification documents outlining important concepts, state storage structure, and message and event type definitions. Learn more how to write module specs in the [spec guidelines](../spec/SPEC_MODULE.md). * The root directory includes type definitions for messages, events, and genesis state, including the type definitions generated by Protocol Buffers. diff --git a/docs/docs/building-modules/12-errors.md b/docs/docs/build/building-modules/12-errors.md similarity index 92% rename from docs/docs/building-modules/12-errors.md rename to docs/docs/build/building-modules/12-errors.md index 969ce6e75f4e..214ab70e8803 100644 --- a/docs/docs/building-modules/12-errors.md +++ b/docs/docs/build/building-modules/12-errors.md @@ -21,7 +21,7 @@ Registration of errors is handled via the [`errors` package](https://github.com/ Example: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/distribution/types/errors.go#L1-L21 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/distribution/types/errors.go ``` Each custom module error must provide the codespace, which is typically the module name @@ -43,7 +43,7 @@ execution. Example: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/bank/keeper/keeper.go#L141-L182 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/bank/keeper/keeper.go#L141-L182 ``` Regardless if an error is wrapped or not, the Cosmos SDK's `errors` package provides a function to determine if diff --git a/docs/docs/building-modules/13-upgrade.md b/docs/docs/build/building-modules/13-upgrade.md similarity index 78% rename from docs/docs/building-modules/13-upgrade.md rename to docs/docs/build/building-modules/13-upgrade.md index 18484c68c658..908a6a06eeb0 100644 --- a/docs/docs/building-modules/13-upgrade.md +++ b/docs/docs/build/building-modules/13-upgrade.md @@ -5,14 +5,12 @@ sidebar_position: 1 # Upgrading Modules :::note Synopsis -[In-Place Store Migrations](../core/15-upgrade.md) allow your modules to upgrade to new versions that include breaking changes. This document outlines how to build modules to take advantage of this functionality. +[In-Place Store Migrations](../../learn/advanced/15-upgrade.md) allow your modules to upgrade to new versions that include breaking changes. This document outlines how to build modules to take advantage of this functionality. ::: -:::note +:::note Pre-requisite Readings -### Pre-requisite Readings - -* [In-Place Store Migration](../core/15-upgrade.md) +* [In-Place Store Migration](../../learn/advanced/15-upgrade.md) ::: @@ -48,7 +46,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { Since these migrations are functions that need access to a Keeper's store, use a wrapper around the keepers called `Migrator` as shown in this example: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/bank/keeper/migrations.go#L11-L35 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/bank/keeper/migrations.go ``` ## Writing Migration Scripts @@ -62,4 +60,4 @@ func (m Migrator) Migrate1to2(ctx sdk.Context) error { } ``` -To see example code of changes that were implemented in a migration of balance keys, check out [migrateBalanceKeys](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/bank/migrations/v2/store.go#L52-L73). For context, this code introduced migrations of the bank store that updated addresses to be prefixed by their length in bytes as outlined in [ADR-028](../architecture/adr-028-public-key-addresses.md). +To see example code of changes that were implemented in a migration of balance keys, check out [migrateBalanceKeys](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/bank/migrations/v2/store.go#L55-L76). For context, this code introduced migrations of the bank store that updated addresses to be prefixed by their length in bytes as outlined in [ADR-028](../architecture/adr-028-public-key-addresses.md). diff --git a/docs/docs/building-modules/14-simulator.md b/docs/docs/build/building-modules/14-simulator.md similarity index 86% rename from docs/docs/building-modules/14-simulator.md rename to docs/docs/build/building-modules/14-simulator.md index 7eed92011556..f7b9b84546e7 100644 --- a/docs/docs/building-modules/14-simulator.md +++ b/docs/docs/build/building-modules/14-simulator.md @@ -4,11 +4,9 @@ sidebar_position: 1 # Module Simulation -:::note +:::note Pre-requisite Readings -### Pre-requisite Readings - -* [Cosmos Blockchain Simulator](../core/12-simulation.md) +* [Cosmos Blockchain Simulator](../../learn/advanced/12-simulation.md) ::: ## Synopsis @@ -19,7 +17,6 @@ integrated with the application `SimulationManager`. * [Simulation package](#simulation-package) * [Store decoders](#store-decoders) * [Randomized genesis](#randomized-genesis) - * [Randomized parameter changes](#randomized-parameter-changes) * [Random weighted operations](#random-weighted-operations) * [Random proposal contents](#random-proposal-contents) * [Registering simulation functions](#registering-simulation-functions) @@ -39,7 +36,7 @@ for the key-value pairs from the stores to be decoded (_i.e_ unmarshalled) to their corresponding types. In particular, it matches the key to a concrete type and then unmarshals the value from the `KVPair` to the type provided. -You can use the example [here](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/distribution/simulation/decoder.go) from the distribution module to implement your store decoders. +You can use the example [here](https://github.com/cosmos/cosmos-sdk/blob/v/x/distribution/simulation/decoder.go) from the distribution module to implement your store decoders. ### Randomized genesis @@ -50,13 +47,13 @@ Once the module genesis parameter are generated randomly (or with the key and values defined in a `params` file), they are marshaled to JSON format and added to the app genesis JSON to use it on the simulations. -You can check an example on how to create the randomized genesis [here](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/staking/simulation/genesis.go). +You can check an example on how to create the randomized genesis [here](https://github.com/cosmos/cosmos-sdk/blob/v/x/staking/simulation/genesis.go). ### Randomized parameter changes The simulator is able to test parameter changes at random. The simulator package from each module must contain a `RandomizedParams` func that will simulate parameter changes of the module throughout the simulations lifespan. -You can see how an example of what is needed to fully test parameter changes [here](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/staking/simulation/params.go) +You can see how an example of what is needed to fully test parameter changes [here](https://github.com/cosmos/cosmos-sdk/blob/v/x/staking/simulation/params.go) ### Random weighted operations @@ -64,13 +61,13 @@ Operations are one of the crucial parts of the Cosmos SDK simulation. They are t (`Msg`) that are simulated with random field values. The sender of the operation is also assigned randomly. -Operations on the simulation are simulated using the full [transaction cycle](../core/01-transactions.md) of a +Operations on the simulation are simulated using the full [transaction cycle](../../learn/advanced/01-transactions.md) of a `ABCI` application that exposes the `BaseApp`. Shown below is how weights are set: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/staking/simulation/operations.go#L19-L86 +https://github.com/cosmos/cosmos-sdk/blob/release/v0.50.x/x/staking/simulation/operations.go#L19-L86 ``` As you can see, the weights are predefined in this case. Options exist to override this behavior with different weights. One option is to use `*rand.Rand` to define a random weight for the operation, or you can inject your own predefined weights. @@ -78,7 +75,7 @@ As you can see, the weights are predefined in this case. Options exist to overri Here is how one can override the above package `simappparams`. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/Makefile#L293-L299 +https://github.com/cosmos/cosmos-sdk/blob/release/v0.50.x/Makefile#L293-L299 ``` For the last test a tool called [runsim](https://github.com/cosmos/tools/tree/master/cmd/runsim) is used, this is used to parallelize go test instances, provide info to Github and slack integrations to provide information to your team on how the simulations are running. @@ -94,7 +91,7 @@ them to be used on the parameters. Now that all the required functions are defined, we need to integrate them into the module pattern within the `module.go`: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/distribution/module.go#L180-L203 +https://github.com/cosmos/cosmos-sdk/blob/release/v0.50.x/x/distribution/module.go#L180-L203 ``` ## App Simulator manager diff --git a/docs/docs/building-modules/15-depinject.md b/docs/docs/build/building-modules/15-depinject.md similarity index 65% rename from docs/docs/building-modules/15-depinject.md rename to docs/docs/build/building-modules/15-depinject.md index fc793f04b780..f277e5b1db79 100644 --- a/docs/docs/building-modules/15-depinject.md +++ b/docs/docs/build/building-modules/15-depinject.md @@ -4,9 +4,7 @@ sidebar_position: 1 # Modules depinject-ready -:::note - -### Pre-requisite Readings +:::note Pre-requisite Readings * [Depinject Documentation](../packages/01-depinject.md) @@ -32,25 +30,25 @@ A chain developer can then use the module by following these two steps: The module available configuration is defined in a Protobuf file, located at `{moduleName}/module/v1/module.proto`. ```protobuf reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/group/module/v1/module.proto +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/proto/cosmos/group/module/v1/module.proto ``` * `go_import` must point to the Go package of the custom module. * Message fields define the module configuration. That configuration can be set in the `app_config.go` / `app.yaml` file for a chain developer to configure the module. - Taking `group` as example, a chain developer is able to decide, thanks to `uint64 max_metadata_len`, what the maximum metatada length allowed for a group porposal is. + Taking `group` as example, a chain developer is able to decide, thanks to `uint64 max_metadata_len`, what the maximum metadata length allowed for a group proposal is. ```go reference - https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/app_config.go#L226-L230 + https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/app_config.go#L228-L234 ``` -That message is generated using [`pulsar`](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/scripts/protocgen-pulsar.sh) (by running `make proto-gen`). -In the case of the `group` module, this file is generated here: https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/api/cosmos/group/module/v1/module.pulsar.go. +That message is generated using [`pulsar`](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/scripts/protocgen-pulsar.sh) (by running `make proto-gen`). +In the case of the `group` module, this file is generated here: https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/api/cosmos/group/module/v1/module.pulsar.go. The part that is relevant for the module configuration is: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/api/cosmos/group/module/v1/module.pulsar.go#L515-L527 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/api/cosmos/group/module/v1/module.pulsar.go#L515-L527 ``` :::note @@ -68,46 +66,46 @@ All methods, structs and their fields must be public for `depinject`. 1. Import the module configuration generated package: - ```go reference - https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/group/module/module.go#L12-L14 - ``` + ```go reference + https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/group/module/module.go#L12-L14 + ``` - Define an `init()` function for defining the `providers` of the module configuration: - This registers the module configuration message and the wiring of the module. + Define an `init()` function for defining the `providers` of the module configuration: + This registers the module configuration message and the wiring of the module. - ```go reference - https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/group/module/module.go#L199-L204 - ``` + ```go reference + https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/group/module/module.go#L194-L199 + ``` 2. Ensure that the module implements the `appmodule.AppModule` interface: - ```go reference - https://github.com/cosmos/cosmos-sdk/blob/v0.47.0/x/group/module/module.go#L58-L64 - ``` + ```go reference + https://github.com/cosmos/cosmos-sdk/blob/v0.47.0/x/group/module/module.go#L58-L64 + ``` 3. Define a struct that inherits `depinject.In` and define the module inputs (i.e. module dependencies): * `depinject` provides the right dependencies to the module. * `depinject` also checks that all dependencies are provided. - :::tip - For making a dependency optional, add the `optional:"true"` struct tag. - ::: + :::tip + For making a dependency optional, add the `optional:"true"` struct tag. + ::: - ```go reference - https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/group/module/module.go#L206-L216 - ``` + ```go reference + https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/group/module/module.go#L201-L211 + ``` 4. Define the module outputs with a public struct that inherits `depinject.Out`: The module outputs are the dependencies that the module provides to other modules. It is usually the module itself and its keeper. - ```go reference - https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/group/module/module.go#L218-L223 - ``` + ```go reference + https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/group/module/module.go#L213-L218 + ``` 5. Create a function named `ProvideModule` (as called in 1.) and use the inputs for instantiating the module outputs. ```go reference - https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/group/module/module.go#L225-L235 + https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/group/module/module.go#L220-L235 ``` The `ProvideModule` function should return an instance of `cosmossdk.io/core/appmodule.AppModule` which implements @@ -116,7 +114,7 @@ one or more app module extension interfaces for initializing the module. Following is the complete app wiring configuration for `group`: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/group/module/module.go#L195-L235 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/group/module/module.go#L194-L235 ``` The module is now ready to be used with `depinject` by a chain developer. diff --git a/docs/docs/building-modules/16-testing.md b/docs/docs/build/building-modules/16-testing.md similarity index 79% rename from docs/docs/building-modules/16-testing.md rename to docs/docs/build/building-modules/16-testing.md index cd49fc454a30..fee66b0dc40c 100644 --- a/docs/docs/building-modules/16-testing.md +++ b/docs/docs/build/building-modules/16-testing.md @@ -19,37 +19,37 @@ All packages and modules should have unit test coverage. Modules should have the The SDK uses `mockgen` to generate mocks for keepers: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/scripts/mockgen.sh#L3-L6 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/scripts/mockgen.sh#L3-L6 ``` You can read more about mockgen [here](https://github.com/golang/mock). ### Example -As an example, we will walkthrough the [keeper tests](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/gov/keeper/keeper_test.go) of the `x/gov` module. +As an example, we will walkthrough the [keeper tests](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/gov/keeper/keeper_test.go) of the `x/gov` module. -The `x/gov` module has a `Keeper` type requires a few external dependencies (ie. imports outside `x/gov` to work properly). +The `x/gov` module has a `Keeper` type, which requires a few external dependencies (ie. imports outside `x/gov` to work properly). ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/gov/keeper/keeper.go#L61-L65 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/gov/keeper/keeper.go#L22-L24 ``` In order to only test `x/gov`, we mock the [expected keepers](https://docs.cosmos.network/v0.46/building-modules/keeper.html#type-definition) and instantiate the `Keeper` with the mocked dependencies. Note that we may need to configure the mocked dependencies to return the expected values: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/gov/keeper/common_test.go#L67-L81 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/gov/keeper/common_test.go#L67-L81 ``` This allows us to test the `x/gov` module without having to import other modules. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/gov/keeper/keeper_test.go#L3-L35 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/gov/keeper/keeper_test.go#L3-L42 ``` We can test then create unit tests using the newly created `Keeper` instance. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/gov/keeper/keeper_test.go#L73-L91 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/gov/keeper/keeper_test.go#L83-L107 ``` ## Integration Tests @@ -66,7 +66,7 @@ The SDK provides small helpers for quickly setting up an integration tests. Thes ### Example ```go reference -https://github.com/cosmos/cosmos-sdk/blob/29e22b3bdb05353555c8e0b269311bbff7b8deca/testutil/integration/example_test.go#L22-L89 +https://github.com/cosmos/cosmos-sdk/blob/a2f73a7dd37bea0ab303792c55fa1e4e1db3b898/testutil/integration/example_test.go#L30-L116 ``` ## Deterministic and Regression tests @@ -81,7 +81,7 @@ Each query is tested using 2 methods: Here's an example of regression tests: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/tests/integration/bank/keeper/deterministic_test.go#L102-L115 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/tests/integration/bank/keeper/deterministic_test.go#L134-L151 ``` ## Simulations @@ -89,17 +89,17 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/tests/integration/bank/kee Simulations uses as well a minimal application, built with [`depinject`](../packages/01-depinject.md): :::note -You can as well use the `AppConfig` `configurator` for creating an `AppConfig` [inline](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/slashing/app_test.go#L54-L62). There is no difference between those two ways, use whichever you prefer. +You can as well use the `AppConfig` `configurator` for creating an `AppConfig` [inline](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/slashing/app_test.go#L54-L62). There is no difference between those two ways, use whichever you prefer. ::: Following is an example for `x/gov/` simulations: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/gov/simulation/operations_test.go#L292-L310 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/gov/simulation/operations_test.go#L406-L430 ``` ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/gov/simulation/operations_test.go#L69-L111 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/gov/simulation/operations_test.go#L90-L132 ``` ## End-to-end Tests diff --git a/docs/docs/build/building-modules/17-preblock.md b/docs/docs/build/building-modules/17-preblock.md new file mode 100644 index 000000000000..a79646bd4e70 --- /dev/null +++ b/docs/docs/build/building-modules/17-preblock.md @@ -0,0 +1,31 @@ +--- +sidebar_position: 1 +--- + +# PreBlocker + +:::note Synopsis +`PreBlocker` is optional method module developers can implement in their module. They will be triggered before [`BeginBlock`](../../learn/advanced/00-baseapp.md#beginblock). +::: + +:::note Pre-requisite Readings + +* [Module Manager](./01-module-manager.md) + +::: + +## PreBlocker + +There are two semantics around the new lifecycle method: + +- It runs before the `BeginBlocker` of all modules +- It can modify consensus parameters in storage, and signal the caller through the return value. + +When it returns `ConsensusParamsChanged=true`, the caller must refresh the consensus parameter in the deliver context: +``` +app.finalizeBlockState.ctx = app.finalizeBlockState.ctx.WithConsensusParams(app.GetConsensusParams()) +``` + +The new ctx must be passed to all the other lifecycle methods. + + diff --git a/docs/docs/building-modules/_category_.json b/docs/docs/build/building-modules/_category_.json similarity index 73% rename from docs/docs/building-modules/_category_.json rename to docs/docs/build/building-modules/_category_.json index 8dc3f9a9411b..2d50f8b3ec57 100644 --- a/docs/docs/building-modules/_category_.json +++ b/docs/docs/build/building-modules/_category_.json @@ -1,5 +1,5 @@ { "label": "Building Modules", - "position": 3, + "position": 1, "link": null } \ No newline at end of file diff --git a/docs/docs/migrations/01-intro.md b/docs/docs/build/migrations/01-intro.md similarity index 100% rename from docs/docs/migrations/01-intro.md rename to docs/docs/build/migrations/01-intro.md diff --git a/docs/docs/build/migrations/_category_.json b/docs/docs/build/migrations/_category_.json new file mode 100644 index 000000000000..5a06c3ebba6c --- /dev/null +++ b/docs/docs/build/migrations/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "Migrations", + "position": 3, + "link": null +} diff --git a/docs/docs/build/modules/_category_.json b/docs/docs/build/modules/_category_.json new file mode 100644 index 000000000000..72d229c0b058 --- /dev/null +++ b/docs/docs/build/modules/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "Modules", + "position": 2, + "link": null +} diff --git a/docs/docs/packages/README.md b/docs/docs/build/packages/README.md similarity index 95% rename from docs/docs/packages/README.md rename to docs/docs/build/packages/README.md index ad5e6699cab5..d7a115b263de 100644 --- a/docs/docs/packages/README.md +++ b/docs/docs/build/packages/README.md @@ -26,7 +26,7 @@ For more information on SDK tooling, see the [Tooling](https://docs.cosmos.netwo ## Automation * [Depinject](./01-depinject.md) - Dependency injection framework -* [Client/v2](https://pkg.go.dev/cosmossdk.io/client/v2) - Library powering [AutoCLI](https://docs.cosmos.network/main/building-modules/autocli) +* [Client/v2](https://pkg.go.dev/cosmossdk.io/client/v2) - Library powering [AutoCLI](https://docs.cosmos.network/main/core/autocli) ## Utilities diff --git a/docs/docs/packages/_category_.json b/docs/docs/build/packages/_category_.json similarity index 70% rename from docs/docs/packages/_category_.json rename to docs/docs/build/packages/_category_.json index e91118d38435..5ed885eb2836 100644 --- a/docs/docs/packages/_category_.json +++ b/docs/docs/build/packages/_category_.json @@ -1,5 +1,5 @@ { "label": "Packages", - "position": 9, + "position": 4, "link": null } \ No newline at end of file diff --git a/docs/docs/tooling/00-protobuf.md b/docs/docs/build/tooling/00-protobuf.md similarity index 86% rename from docs/docs/tooling/00-protobuf.md rename to docs/docs/build/tooling/00-protobuf.md index 53decb74d8b7..7f9e33159403 100644 --- a/docs/docs/tooling/00-protobuf.md +++ b/docs/docs/build/tooling/00-protobuf.md @@ -4,20 +4,20 @@ sidebar_position: 1 # Protocol Buffers -It is known that Cosmos SDK uses protocol buffers extensively, this docuemnt is meant to provide a guide on how it is used in the cosmos-sdk. +It is known that Cosmos SDK uses protocol buffers extensively, this document is meant to provide a guide on how it is used in the cosmos-sdk. To generate the proto file, the Cosmos SDK uses a docker image, this image is provided to all to use as well. The latest version is `ghcr.io/cosmos/proto-builder:0.12.x` Below is the example of the Cosmos SDK's commands for generating, linting, and formatting protobuf files that can be reused in any applications makefile. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/Makefile#L411-L432 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/Makefile#L411-L432 ``` The script used to generate the protobuf files can be found in the `scripts/` directory. ```shell reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/scripts/protocgen.sh#L1-L37 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/scripts/protocgen.sh ``` ## Buf @@ -90,7 +90,7 @@ Example of how to define `gen` files can be found [here](https://docs.buf.build/ #### `buf.lock` -This is a autogenerated file based off the dependencies required by the `.gen` files. There is no need to copy the current one. If you depend on cosmos-sdk proto definitions a new entry for the Cosmos SDK will need to be provided. The dependency you will need to use is `buf.build/cosmos/cosmos-sdk`. +This is an autogenerated file based off the dependencies required by the `.gen` files. There is no need to copy the current one. If you depend on cosmos-sdk proto definitions a new entry for the Cosmos SDK will need to be provided. The dependency you will need to use is `buf.build/cosmos/cosmos-sdk`. ```go reference https://github.com/cosmos/cosmos-sdk/blob/main/proto/buf.lock#L1-L16 @@ -98,7 +98,7 @@ https://github.com/cosmos/cosmos-sdk/blob/main/proto/buf.lock#L1-L16 #### `buf.yaml` -`buf.yaml` defines the [name of your package](https://github.com/cosmos/cosmos-sdk/blob/main/proto/buf.yaml#L3), which [breakage checker](https://docs.buf.build/tour/detect-breaking-changes) to use and how to [lint your protobuf files](https://docs.buf.build/tour/lint-your-api). +`buf.yaml` defines the [name of your package](https://github.com/cosmos/cosmos-sdk/blob/main/proto/buf.yaml#L3), which [breakage checker](https://docs.buf.build/tour/detect-breaking-changes) to use and how to [lint your protobuf files](https://buf.build/docs/tutorials/getting-started-with-buf-cli#lint-your-api). ```go reference https://github.com/cosmos/cosmos-sdk/blob/main/proto/buf.yaml#L1-L24 diff --git a/docs/docs/tooling/README.md b/docs/docs/build/tooling/README.md similarity index 100% rename from docs/docs/tooling/README.md rename to docs/docs/build/tooling/README.md diff --git a/docs/docs/tooling/_category_.json b/docs/docs/build/tooling/_category_.json similarity index 68% rename from docs/docs/tooling/_category_.json rename to docs/docs/build/tooling/_category_.json index a01a4fcc48f6..eb57cb8a5a5e 100644 --- a/docs/docs/tooling/_category_.json +++ b/docs/docs/build/tooling/_category_.json @@ -1,5 +1,5 @@ { "label": "Tooling", - "position": 10, + "position": 5, "link": null } \ No newline at end of file diff --git a/docs/docs/building-modules/01-module-manager.md b/docs/docs/building-modules/01-module-manager.md deleted file mode 100644 index 3778d3d608db..000000000000 --- a/docs/docs/building-modules/01-module-manager.md +++ /dev/null @@ -1,273 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Module Manager - -:::note Synopsis -Cosmos SDK modules need to implement the [`AppModule` interfaces](#application-module-interfaces), in order to be managed by the application's [module manager](#module-manager). The module manager plays an important role in [`message` and `query` routing](../core/00-baseapp.md#routing), and allows application developers to set the order of execution of a variety of functions like [`BeginBlocker` and `EndBlocker`](../basics/00-app-anatomy.md#begingblocker-and-endblocker). -::: - -:::note - -### Pre-requisite Readings - -* [Introduction to Cosmos SDK Modules](./01-intro.md) - -::: - -## Application Module Interfaces - -Application module interfaces exist to facilitate the composition of modules together to form a functional Cosmos SDK application. -There are 4 main application module interfaces: - -* [`AppModuleBasic`](#appmodulebasic) for independent module functionalities. -* [`AppModule`](#appmodule) for inter-dependent module functionalities (except genesis-related functionalities). -* [`AppModuleGenesis`](#appmodulegenesis) for inter-dependent genesis-related module functionalities. -* `GenesisOnlyAppModule`: Defines an `AppModule` that only has import/export functionality - -The above interfaces are mostly embedding smaller interfaces (extension interfaces), that defines specific functionalities: - -* `HasName`: Allows the module to provide its own name for legacy purposes. -* [`HasGenesisBasics`](#hasgenesisbasics): The legacy interface for stateless genesis methods. -* [`HasGenesis`](#hasgenesis): The extension interface for stateful genesis methods. -* [`HasInvariants`](#hasinvariants): The extension interface for registering invariants. -* [`HasServices`](#hasservices): The extension interface for modules to register services. -* [`HasConsensusVersion`](#hasconsensusversion): The extension interface for declaring a module consensus version. -* [`BeginBlockAppModule`](#beginblockappmodule): The extension interface that contains information about the `AppModule` and `BeginBlock`. -* [`EndBlockAppModule`](#endblockappmodule): The extension interface that contains information about the `AppModule` and `EndBlock`. -* [`HasPrecommit`](#hasprecommit): The extension interface that contains information about the `AppModule` and `Precommit`. -* [`HasPrepareCheckState`](#haspreparecheckstate): The extension interface that contains information about the `AppModule` and `PrepareCheckState`. - -The `AppModuleBasic` interface exists to define independent methods of the module, i.e. those that do not depend on other modules in the application. This allows for the construction of the basic application structure early in the application definition, generally in the `init()` function of the [main application file](../basics/00-app-anatomy.md#core-application-file). - -The `AppModule` interface exists to define inter-dependent module methods. Many modules need to interact with other modules, typically through [`keeper`s](./06-keeper.md), which means there is a need for an interface where modules list their `keeper`s and other methods that require a reference to another module's object. `AppModule` interface extension, such as `BeginBlockAppModule` and `EndBlockAppModule`, also enables the module manager to set the order of execution between module's methods like `BeginBlock` and `EndBlock`, which is important in cases where the order of execution between modules matters in the context of the application. - -The usage of extension interfaces allows modules to define only the functionalities they need. For example, a module that does not need an `EndBlock` does not need to define the `EndBlockAppModule` interface and thus the `EndBlock` method. `AppModule` and `AppModuleGenesis` are voluntarily small interfaces, that can take advantage of the `Module` patterns without having to define many placeholder functions. - -### `AppModuleBasic` - -The `AppModuleBasic` interface defines the independent methods modules need to implement. - -```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/module/module.go#L49-L59 -``` - -Let us go through the methods: - -* `RegisterLegacyAminoCodec(*codec.LegacyAmino)`: Registers the `amino` codec for the module, which is used to marshal and unmarshal structs to/from `[]byte` in order to persist them in the module's `KVStore`. -* `RegisterInterfaces(codectypes.InterfaceRegistry)`: Registers a module's interface types and their concrete implementations as `proto.Message`. -* `RegisterGRPCGatewayRoutes(client.Context, *runtime.ServeMux)`: Registers gRPC routes for the module. -* `GetTxCmd()`: Returns the root [`Tx` command](./09-module-interfaces.md#tx) for the module. The subcommands of this root command are used by end-users to generate new transactions containing [`message`s](./02-messages-and-queries.md#queries) defined in the module. -* `GetQueryCmd()`: Return the root [`query` command](./09-module-interfaces.md#query) for the module. The subcommands of this root command are used by end-users to generate new queries to the subset of the state defined by the module. - -All the `AppModuleBasic` of an application are managed by the [`BasicManager`](#basicmanager). - -### `HasName` - -```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/module/module.go#L61-L66 -``` - -* `HasName` is an interface that has a method `Name()`. This method returns the name of the module as a `string`. - -### `HasGenesisBasics` - -```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/module/module.go#L68-L72 -``` - -Let us go through the methods: - -* `DefaultGenesis(codec.JSONCodec)`: Returns a default [`GenesisState`](./08-genesis.md#genesisstate) for the module, marshalled to `json.RawMessage`. The default `GenesisState` need to be defined by the module developer and is primarily used for testing. -* `ValidateGenesis(codec.JSONCodec, client.TxEncodingConfig, json.RawMessage)`: Used to validate the `GenesisState` defined by a module, given in its `json.RawMessage` form. It will usually unmarshall the `json` before running a custom [`ValidateGenesis`](./08-genesis.md#validategenesis) function defined by the module developer. - -### `AppModuleGenesis` - -The `AppModuleGenesis` interface is a simple embedding of the `AppModuleBasic` and `HasGenesis` interfaces. - -```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/module/module.go#L156-L160 -``` - -It does not have its own manager, and exists separately from [`AppModule`](#appmodule) only for modules that exist only to implement genesis functionalities, so that they can be managed without having to implement all of `AppModule`'s methods. - -### `HasGenesis` - -The `HasGenesis` interface is an extension interface of `HasGenesisBasics`. - -```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/module/module.go#L162-L167 -``` - -Let us go through the two added methods: - -* `InitGenesis(sdk.Context, codec.JSONCodec, json.RawMessage)`: Initializes the subset of the state managed by the module. It is called at genesis (i.e. when the chain is first started). -* `ExportGenesis(sdk.Context, codec.JSONCodec)`: Exports the latest subset of the state managed by the module to be used in a new genesis file. `ExportGenesis` is called for each module when a new chain is started from the state of an existing chain. - -### `AppModule` - -The `AppModule` interface defines a module. Modules can declare their functionalities by implementing extensions interfaces. - -```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/module/module.go#L169-L173 -``` - -`AppModule`s are managed by the [module manager](#manager), which checks which extension interfaces are implemented by the module. - -:::note -Previously the `AppModule` interface was containing all the methods that are defined in the extensions interfaces. This was leading to much boilerplate for modules that did not need all the functionalities. -::: - -### `HasInvariants` - -This interface defines one method. It allows to checks if a module can register invariants. - -```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/module/module.go#L175-L179 -``` - -* `RegisterInvariants(sdk.InvariantRegistry)`: Registers the [`invariants`](./07-invariants.md) of the module. If an invariant deviates from its predicted value, the [`InvariantRegistry`](./07-invariants.md#registry) triggers appropriate logic (most often the chain will be halted). - -### `HasServices` - -This interface defines one method. It allows to checks if a module can register invariants. - -```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/module/module.go#L181-L185 -``` - -* `RegisterServices(Configurator)`: Allows a module to register services. - -### `HasConsensusVersion` - -This interface defines one method for checking a module consensus version. - -```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/module/module.go#L187-L194 -``` - -* `ConsensusVersion() uint64`: Returns the consensus version of the module. - -### `BeginBlockAppModule` - -The `BeginBlockAppModule` is an extension interface from `AppModule`. All modules that have an `BeginBlock` method implement this interface. - -```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/module/module.go#L196-L200 -``` - -* `BeginBlock(sdk.Context, abci.RequestBeginBlock)`: This method gives module developers the option to implement logic that is automatically triggered at the beginning of each block. Implement empty if no logic needs to be triggered at the beginning of each block for this module. - -### `EndBlockAppModule` - -The `EndBlockAppModule` is an extension interface from `AppModule`. All modules that have an `EndBlock` method implement this interface. - -```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/module/module.go#L202-L206 -``` - -* `EndBlock(sdk.Context, abci.RequestEndBlock)`: This method gives module developers the option to implement logic that is automatically triggered at the end of each block. This is also where the module can inform the underlying consensus engine of validator set changes (e.g. the `staking` module). Implement empty if no logic needs to be triggered at the end of each block for this module. - -### `HasPrecommit` - -`HasPrecommit` is an extension interface from `AppModule`. All modules that have a `Precommit` method implement this interface. - -* `Precommit(sdk.Context)`: This method gives module developers the option to implement logic that is automatically triggered during [`Commit'](../core/00-baseapp.md#commit) of each block using the [`deliverState`](../core/00-baseapp.md#state-updates) of the block to be committed. Implement empty if no logic needs to be triggered during `Commit` of each block for this module. - -### `HasPrepareCheckState` - -`HasPrepareCheckState` is an extension interface from `AppModule`. All modules that have a `PrepareCheckState` method implement this interface. - -* `PrepareCheckState(sdk.Context)`: This method gives module developers the option to implement logic that is automatically triggered during [`Commit'](../core/00-baseapp.md#commit) of each block using the [`checkState`](../core/00-baseapp.md#state-updates) of the next block. Implement empty if no logic needs to be triggered during `Commit` of each block for this module. - -### Implementing the Application Module Interfaces - -Typically, the various application module interfaces are implemented in a file called `module.go`, located in the module's folder (e.g. `./x/module/module.go`). - -Almost every module needs to implement the `AppModuleBasic` and `AppModule` interfaces. If the module is only used for genesis, it will implement `AppModuleGenesis` instead of `AppModule`. The concrete type that implements the interface can add parameters that are required for the implementation of the various methods of the interface. For example, the `Route()` function often calls a `NewMsgServerImpl(k keeper)` function defined in `keeper/msg_server.go` and therefore needs to pass the module's [`keeper`](./06-keeper.md) as a parameter. - -```go -// example -type AppModule struct { - AppModuleBasic - keeper Keeper -} -``` - -In the example above, you can see that the `AppModule` concrete type references an `AppModuleBasic`, and not an `AppModuleGenesis`. That is because `AppModuleGenesis` only needs to be implemented in modules that focus on genesis-related functionalities. In most modules, the concrete `AppModule` type will have a reference to an `AppModuleBasic` and implement the two added methods of `AppModuleGenesis` directly in the `AppModule` type. - -If no parameter is required (which is often the case for `AppModuleBasic`), just declare an empty concrete type like so: - -```go -type AppModuleBasic struct{} -``` - -## Module Managers - -Module managers are used to manage collections of `AppModuleBasic` and `AppModule`. - -### `BasicManager` - -The `BasicManager` is a structure that lists all the `AppModuleBasic` of an application: - -```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/module/module.go#L74-L84 -``` - -It implements the following methods: - -* `NewBasicManager(modules ...AppModuleBasic)`: Constructor function. It takes a list of the application's `AppModuleBasic` and builds a new `BasicManager`. This function is generally called in the `init()` function of [`app.go`](../basics/00-app-anatomy.md#core-application-file) to quickly initialize the independent elements of the application's modules (click [here](https://github.com/cosmos/gaia/blob/main/app/app.go#L59-L74) to see an example). -* `RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)`: Registers the [`codec.LegacyAmino`s](../core/05-encoding.md#amino) of each of the application's `AppModuleBasic`. This function is usually called early on in the [application's construction](../basics/00-app-anatomy.md#constructor). -* `RegisterInterfaces(registry codectypes.InterfaceRegistry)`: Registers interface types and implementations of each of the application's `AppModuleBasic`. -* `DefaultGenesis(cdc codec.JSONCodec)`: Provides default genesis information for modules in the application by calling the [`DefaultGenesis(cdc codec.JSONCodec)`](./08-genesis.md#defaultgenesis) function of each module. It only calls the modules that implements the `HasGenesisBasics` interfaces. -* `ValidateGenesis(cdc codec.JSONCodec, txEncCfg client.TxEncodingConfig, genesis map[string]json.RawMessage)`: Validates the genesis information modules by calling the [`ValidateGenesis(codec.JSONCodec, client.TxEncodingConfig, json.RawMessage)`](./08-genesis.md#validategenesis) function of modules implementing the `HasGenesisBasics` interface. -* `RegisterGRPCGatewayRoutes(clientCtx client.Context, rtr *runtime.ServeMux)`: Registers gRPC routes for modules. -* `AddTxCommands(rootTxCmd *cobra.Command)`: Adds modules' transaction commands to the application's [`rootTxCommand`](../core/07-cli.md#transaction-commands). This function is usually called function from the `main.go` function of the [application's command-line interface](../core/07-cli.md). -* `AddQueryCommands(rootQueryCmd *cobra.Command)`: Adds modules' query commands to the application's [`rootQueryCommand`](../core/07-cli.md#query-commands). This function is usually called function from the `main.go` function of the [application's command-line interface](../core/07-cli.md). - -### `Manager` - -The `Manager` is a structure that holds all the `AppModule` of an application, and defines the order of execution between several key components of these modules: - -```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/module/module.go#L246-L273 -``` - -The module manager is used throughout the application whenever an action on a collection of modules is required. It implements the following methods: - -* `NewManager(modules ...AppModule)`: Constructor function. It takes a list of the application's `AppModule`s and builds a new `Manager`. It is generally called from the application's main [constructor function](../basics/00-app-anatomy.md#constructor-function). -* `SetOrderInitGenesis(moduleNames ...string)`: Sets the order in which the [`InitGenesis`](./08-genesis.md#initgenesis) function of each module will be called when the application is first started. This function is generally called from the application's main [constructor function](../basics/00-app-anatomy.md#constructor-function). - To initialize modules successfully, module dependencies should be considered. For example, the `genutil` module must occur after `staking` module so that the pools are properly initialized with tokens from genesis accounts, the `genutils` module must also occur after `auth` so that it can access the params from auth, IBC's `capability` module should be initialized before all other modules so that it can initialize any capabilities. -* `SetOrderExportGenesis(moduleNames ...string)`: Sets the order in which the [`ExportGenesis`](./08-genesis.md#exportgenesis) function of each module will be called in case of an export. This function is generally called from the application's main [constructor function](../basics/00-app-anatomy.md#constructor-function). -* `SetOrderBeginBlockers(moduleNames ...string)`: Sets the order in which the `BeginBlock()` function of each module will be called at the beginning of each block. This function is generally called from the application's main [constructor function](../basics/00-app-anatomy.md#constructor-function). -* `SetOrderEndBlockers(moduleNames ...string)`: Sets the order in which the `EndBlock()` function of each module will be called at the end of each block. This function is generally called from the application's main [constructor function](../basics/00-app-anatomy.md#constructor-function). -* `SetOrderPrecommiters(moduleNames ...string)`: Sets the order in which the `Precommit()` function of each module will be called during commit of each block. This function is generally called from the application's main [constructor function](../basics/00-app-anatomy.md#constructor-function). -* `SetOrderPrepareCheckStaters(moduleNames ...string)`: Sets the order in which the `PrepareCheckState()` function of each module will be called during commit of each block. This function is generally called from the application's main [constructor function](../basics/00-app-anatomy.md#constructor-function). -* `SetOrderMigrations(moduleNames ...string)`: Sets the order of migrations to be run. If not set then migrations will be run with an order defined in `DefaultMigrationsOrder`. -* `RegisterInvariants(ir sdk.InvariantRegistry)`: Registers the [invariants](./07-invariants.md) of module implementing the `HasInvariants` interface. -* `RegisterRoutes(router sdk.Router, queryRouter sdk.QueryRouter, legacyQuerierCdc *codec.LegacyAmino)`: Registers legacy [`Msg`](./02-messages-and-queries.md#messages) and [`querier`](./04-query-services.md#legacy-queriers) routes. -* `RegisterServices(cfg Configurator)`: Registers the services of modules implementing the `HasServices` interface. -* `InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, genesisData map[string]json.RawMessage)`: Calls the [`InitGenesis`](./08-genesis.md#initgenesis) function of each module when the application is first started, in the order defined in `OrderInitGenesis`. Returns an `abci.ResponseInitChain` to the underlying consensus engine, which can contain validator updates. -* `ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec)`: Calls the [`ExportGenesis`](./08-genesis.md#exportgenesis) function of each module, in the order defined in `OrderExportGenesis`. The export constructs a genesis file from a previously existing state, and is mainly used when a hard-fork upgrade of the chain is required. -* `ExportGenesisForModules(ctx sdk.Context, cdc codec.JSONCodec, modulesToExport []string)`: Behaves the same as `ExportGenesis`, except takes a list of modules to export. -* `BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock)`: At the beginning of each block, this function is called from [`BaseApp`](../core/00-baseapp.md#beginblock) and, in turn, calls the [`BeginBlock`](./05-beginblock-endblock.md) function of each modules implementing the `BeginBlockAppModule` interface, in the order defined in `OrderBeginBlockers`. It creates a child [context](../core/02-context.md) with an event manager to aggregate [events](../core/08-events.md) emitted from all modules. The function returns an `abci.ResponseBeginBlock` which contains the aforementioned events. -* `EndBlock(ctx sdk.Context, req abci.RequestEndBlock)`: At the end of each block, this function is called from [`BaseApp`](../core/00-baseapp.md#endblock) and, in turn, calls the [`EndBlock`](./05-beginblock-endblock.md) function of each modules implementing the `EndBlockAppModule` interface, in the order defined in `OrderEndBlockers`. It creates a child [context](../core/02-context.md) with an event manager to aggregate [events](../core/08-events.md) emitted from all modules. The function returns an `abci.ResponseEndBlock` which contains the aforementioned events, as well as validator set updates (if any). -* `Precommit(ctx sdk.Context)`: During [`Commit`](../core/00-baseapp.md#commit), this function is called from `BaseApp` immediately before the [`deliverState`](../core/00-baseapp.md#state-updates) is written to the underlying [`rootMultiStore`](../core/04-store.md#commitmultistore) and, in turn calls the `Precommit` function of each modules implementing the `HasPrecommit` interface, in the order defined in `OrderPrecommiters`. It creates a child [context](../core/02-context.md) where the underlying `CacheMultiStore` is that of the newly committed block's [`deliverState`](../core/00-baseapp.md#state-updates). -* `PrepareCheckState(ctx sdk.Context)`: During [`Commit`](../core/00-baseapp.md#commit), this function is called from `BaseApp` immediately after the [`deliverState`](../core/00-baseapp.md#state-updates) is written to the underlying [`rootMultiStore`](../core/04-store.md#commitmultistore) and, in turn calls the `PrepareCheckState` function of each module implementing the `HasPrepareCheckState` interface, in the order defined in `OrderPrepareCheckStaters`. It creates a child [context](../core/02-context.md) where the underlying `CacheMultiStore` is that of the next block's [`checkState`](../core/00-baseapp.md#state-updates). Writes to this state will be present in the [`checkState`](../core/00-baseapp.md#state-updates) of the next block, and therefore this method can be used to prepare the `checkState` for the next block. - -Here's an example of a concrete integration within an `simapp`: - -```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/app.go#L386-L432 -``` - -This is the same example from `runtime` (the package that powers app v2): - -```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/runtime/module.go#L77 -``` - -```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/runtime/module.go#L87 -``` diff --git a/docs/docs/building-modules/05-beginblock-endblock.md b/docs/docs/building-modules/05-beginblock-endblock.md deleted file mode 100644 index 3e5667ed7d97..000000000000 --- a/docs/docs/building-modules/05-beginblock-endblock.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -sidebar_position: 1 ---- - -# BeginBlocker and EndBlocker - -:::note Synopsis -`BeginBlocker` and `EndBlocker` are optional methods module developers can implement in their module. They will be triggered at the beginning and at the end of each block respectively, when the [`BeginBlock`](../core/00-baseapp.md#beginblock) and [`EndBlock`](../core/00-baseapp.md#endblock) ABCI messages are received from the underlying consensus engine. -::: - -:::note - -### Pre-requisite Readings - -* [Module Manager](./01-module-manager.md) - -::: - -## BeginBlocker and EndBlocker - -`BeginBlocker` and `EndBlocker` are a way for module developers to add automatic execution of logic to their module. This is a powerful tool that should be used carefully, as complex automatic functions can slow down or even halt the chain. - -When needed, `BeginBlocker` and `EndBlocker` are implemented as part of the [`BeginBlockAppModule` and `BeginBlockAppModule` interfaces](./01-module-manager.md#appmodule). This means either can be left-out if not required. The `BeginBlock` and `EndBlock` methods of the interface implemented in `module.go` generally defer to `BeginBlocker` and `EndBlocker` methods respectively, which are usually implemented in `abci.go`. - -The actual implementation of `BeginBlocker` and `EndBlocker` in `abci.go` are very similar to that of a [`Msg` service](./03-msg-services.md): - -* They generally use the [`keeper`](./06-keeper.md) and [`ctx`](../core/02-context.md) to retrieve information about the latest state. -* If needed, they use the `keeper` and `ctx` to trigger state-transitions. -* If needed, they can emit [`events`](../core/08-events.md) via the `ctx`'s `EventManager`. - -A specificity of the `EndBlocker` is that it can return validator updates to the underlying consensus engine in the form of an [`[]abci.ValidatorUpdates`](https://docs.cometbft.com/v0.37/spec/abci/abci++_methods#endblock). This is the preferred way to implement custom validator changes. - -It is possible for developers to define the order of execution between the `BeginBlocker`/`EndBlocker` functions of each of their application's modules via the module's manager `SetOrderBeginBlocker`/`SetOrderEndBlocker` methods. For more on the module manager, click [here](./01-module-manager.md#manager). - -See an example implementation of `BeginBlocker` from the `distribution` module: - -```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/distribution/abci.go#L14-L38 -``` - -and an example implementation of `EndBlocker` from the `staking` module: - -```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/staking/abci.go#L22-L27 -``` - - diff --git a/docs/docs/building-modules/10-autocli.md b/docs/docs/building-modules/10-autocli.md deleted file mode 100644 index 10a9bde61701..000000000000 --- a/docs/docs/building-modules/10-autocli.md +++ /dev/null @@ -1,157 +0,0 @@ ---- -sidebar_position: 1 ---- - - -# AutoCLI - -:::note Synopsis -This document details how to build CLI and REST interfaces for a module. Examples from various Cosmos SDK modules are included. -::: - -:::note - -## Pre-requisite Readings - -* [Building Modules Intro](./01-intro.md) - -::: - -The `autocli` package is a [Go library](https://pkg.go.dev/cosmossdk.io/client/v2/autocli) for generating CLI (command line interface) interfaces for Cosmos SDK-based applications. It provides a simple way to add CLI commands to your application by generating them automatically based on your gRPC service definitions. Autocli generates CLI commands and flags directly from your protobuf messages, including options, input parameters, and output parameters. This means that you can easily add a CLI interface to your application without having to manually create and manage commands. - -## Getting Started - -Here are the steps to use the `autocli` package: - -1. Define your app's modules that implement the `appmodule.AppModule` interface. -2. Configure how behave `autocli` command generation, by implementing the `func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions` method on the module. Learn more [here](#advanced-usage). -3. Use the `autocli.AppOptions` struct to specifies the modules you defined. If you are using the `depinject` package to manage your app's dependencies, it can automatically create an instance of `autocli.AppOptions` based on your app's configuration. -4. Use the `EnhanceRootCommand()` method provided by `autocli` to add the CLI commands for the specified modules to your root command and can also be found in the `client/v2/autocli/app.go` file. Additionally, this method adds the `autocli` functionality to your app's root command. This method is additive only, meaning that it does not create commands if they are already registered for a module. Instead, it adds any missing commands to the root command. - -Here's an example of how to use `autocli`: - -``` go -// Define your app's modules -testModules := map[string]appmodule.AppModule{ - "testModule": &TestModule{}, -} - -// Define the autocli AppOptions -autoCliOpts := autocli.AppOptions{ - Modules: testModules, -} - -// Get the root command -rootCmd := &cobra.Command{ - Use: "app", -} - -// Enhance the root command with autocli -autocli.EnhanceRootCommand(rootCmd, autoCliOpts) - -// Run the root command -if err := rootCmd.Execute(); err != nil { - fmt.Println(err) -} -``` - -## Flags - -`autocli` generates flags for each field in a protobuf message. By default, the names of the flags are generated based on the names of the fields in the message. You can customise the flag names using the `namingOptions` parameter of the `Builder.AddMessageFlags()` method. - -To define flags for a message, you can use the `Builder.AddMessageFlags()` method. This method takes the `cobra.Command` instance and the message type as input, and generates flags for each field in the message. - -```go reference -https://github.com/cosmos/cosmos-sdk/blob/1ac260cb1c6f05666f47e67f8b2cfd6229a55c3b/client/v2/autocli/common.go#L44-L49 -``` - -The `binder` variable returned by the `AddMessageFlags()` method is used to bind the command-line arguments to the fields in the message. - -You can also customise the behavior of the flags using the `namingOptions` parameter of the `Builder.AddMessageFlags()` method. This parameter allows you to specify a custom prefix for the flags, and to specify whether to generate flags for repeated fields and whether to generate flags for fields with default values. - -## Commands and Queries - -The `autocli` package generates CLI commands and flags for each method defined in your gRPC service. By default, it generates commands for each RPC method that does not return a stream of messages. The commands are named based on the name of the service method. - -For example, given the following protobuf definition for a service: - -```protobuf -service MyService { - rpc MyMethod(MyRequest) returns (MyResponse) {} -} -``` - -`autocli` will generate a command named `my-method` for the `MyMethod` method. The command will have flags for each field in the `MyRequest` message. - -If you want to customise the behavior of a command, you can define a custom command by implementing the `autocli.Command` interface. You can then register the command with the `autocli.Builder` instance for your application. - -Similarly, you can define a custom query by implementing the `autocli.Query` interface. You can then register the query with the `autocli.Builder` instance for your application. - -To add a custom command or query, you can use the `Builder.AddCustomCommand` or `Builder.AddCustomQuery` methods, respectively. These methods take a `cobra.Command` or `cobra.Command` instance, respectively, which can be used to define the behavior of the command or query. - -## Advanced Usage - -### Specifying Subcommands - -By default, `autocli` generates a command for each method in your gRPC service. However, you can specify subcommands to group related commands together. To specify subcommands, you can use the `autocliv1.ServiceCommandDescriptor` struct. - -This example shows how to use the `autocliv1.ServiceCommandDescriptor` struct to group related commands together and specify subcommands in your gRPC service by defining an instance of `autocliv1.ModuleOptions` in your `autocli.go` file. - -```go reference -https://github.com/cosmos/cosmos-sdk/blob/bcdf81cbaf8d70c4e4fa763f51292d54aed689fd/x/gov/autocli.go#L9-L27 -``` - -The `AutoCLIOptions()` method in the autocli package allows you to specify the services and sub-commands to be mapped for your app. In the example code, an instance of the `autocliv1.ModuleOptions` struct is defined in the `appmodule.AppModule` implementation located in the `x/gov/autocli.go` file. This configuration groups related commands together and specifies subcommands for each service. - -### Positional Arguments - -Positional arguments are arguments that are passed to a command without being specified as a flag. They are typically used for providing additional context to a command, such as a filename or search query. - -To add positional arguments to a command, you can use the `autocliv1.PositionalArgDescriptor` struct, as seen in the example below. You need to specify the `ProtoField` parameter, which is the name of the protobuf field that should be used as the positional argument. In addition, if the parameter is a variable-length argument, you can specify the `Varargs` parameter as `true`. This can only be applied to the last positional parameter, and the `ProtoField` must be a repeated field. - -Here's an example of how to define a positional argument for the `Account` method of the `auth` service: - -```go reference -https://github.com/cosmos/cosmos-sdk/blob/bcdf81cbaf8d70c4e4fa763f51292d54aed689fd/x/auth/autocli.go#L8-L32 -``` - -Here are some example commands that use the positional arguments we defined above: - -To query an account by address: - -```bash - query auth account cosmos1abcd...xyz -``` - -To query an account address by account number: - -```bash - query auth address-by-acc-num 1 -``` - -In both of these commands, the `auth` service is being queried with the `query` subcommand, followed by the specific method being called (`account` or `address-by-acc-num`). The positional argument is included at the end of the command (`cosmos1abcd...xyz` or `1`) to specify the address or account number, respectively. - -### Customising Flag Names - -By default, `autocli` generates flag names based on the names of the fields in your protobuf message. However, you can customise the flag names by providing a `FlagOptions` parameter to the `Builder.AddMessageFlags()` method. This parameter allows you to specify custom names for flags based on the names of the message fields. For example, if you have a message with the fields `test` and `test1`, you can use the following naming options to customise the flags - -``` go -options := autocliv1.RpcCommandOptions{ - FlagOptions: map[string]*autocliv1.FlagOptions{ - "test": { Name: "custom_name", }, - "test1": { Name: "other_name", }, - }, -} - -builder.AddMessageFlags(message, options) -``` - -Note that `autocliv1.RpcCommandOptions` is a field of the `autocliv1.ServiceCommandDescriptor` struct, which is defined in the `autocliv1` package. To use this option, you can define an instance of `autocliv1.ModuleOptions` in your `appmodule.AppModule` implementation and specify the `FlagOptions` for the relevant service command descriptor. - -## Conclusion - -`autocli` is a powerful tool for adding CLI interfaces to your Cosmos SDK-based applications. It allows you to easily generate CLI commands and flags from your protobuf messages, and provides many options for customising the behavior of your CLI application. - -To further enhance your CLI experience with Cosmos SDK-based blockchains, you can use `Hubl`. `Hubl` is a tool that allows you to query any Cosmos SDK-based blockchain using the new AutoCLI feature of the Cosmos SDK. With hubl, you can easily configure a new chain and query modules with just a few simple commands. - -For more information on `Hubl`, including how to configure a new chain and query a module, see the [Hubl documentation](https://docs.cosmos.network/main/tooling/hubl). diff --git a/docs/docs/core/14-tips.md b/docs/docs/core/14-tips.md deleted file mode 100644 index 7a3261233f2c..000000000000 --- a/docs/docs/core/14-tips.md +++ /dev/null @@ -1,214 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Transaction Tips - -:::note Synopsis -Transaction tips are a mechanism to pay for transaction fees using another denom than the native fee denom of the chain. They are still in beta, and are not included by default in the SDK. -::: - -## Context - -In a Cosmos ecosystem where more and more chains are connected via [IBC](https://ibc.cosmos.network/), it happens that users want to perform actions on chains where they don't have native tokens yet. An example would be an Osmosis user who wants to vote on a proposal on the Cosmos Hub, but they don't have ATOMs in their wallet. A solution would be to swap OSMO for ATOM just for voting on this proposal, but that is cumbersome. Cross-chain DeFi project [Emeris](https://emeris.com/) is another use case. - -Transaction tips is a new solution for cross-chain transaction fees payment, whereby the transaction initiator signs a transaction without specifying fees, but uses a new `Tip` field. They send this signed transaction to a fee relayer who will choose the transaction fees and broadcast the final transaction, and the SDK provides a mechanism that will transfer the pre-defined `Tip` to the fee payer, to cover for fees. - -Assuming we have two chains, A and B, we define the following terms: - -* **the tipper**: this is the initiator of the transaction, who wants to execute a `Msg` on chain A, but doesn't have any native chain A tokens, only chain B tokens. In our example above, the tipper is the Osmosis (chain B) user wanting to vote on a Cosmos Hub (chain A) proposal. -* **the fee payer**: this is the party that will relay and broadcast the final transaction on chain A, and has chain A tokens. The tipper doesn't need to trust the feepayer. -* **the target chain**: the chain where the `Msg` is executed, chain A in this case. - -## Transaction Tips Flow - -The transaction tips flow happens in multiple steps. - -1. The tipper sends via IBC some chain B tokens to chain A. These tokens will cover for fees on the target chain A. This means that chain A's bank module holds some IBC tokens under the tipper's address. - -2. The tipper drafts a transaction to be executed on the chain A. It can include chain A `Msg`s. However, instead of creating a normal transaction, they create the following `AuxSignerData` document: - - ```protobuf reference - https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/tx/v1beta1/tx.proto#L237-L256 - ``` - - where we have defined `SignDocDirectAux` as: - - ```protobuf reference - https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/tx/v1beta1/tx.proto#L67-L97 - ``` - - where `Tip` is defined as - - ```protobuf reference - https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/tx/v1beta1/tx.proto#L226-L235 - ``` - - Notice that this document doesn't sign over the final chain A fees. Instead, it includes a `Tip` field. It also doesn't include the whole `AuthInfo` object as in `SIGN_MODE_DIRECT`, only the minimum information needed by the tipper - -3. The tipper signs the `SignDocDirectAux` document and attaches the signature to the `AuxSignerData`, then sends the signed `AuxSignerData` to the fee payer. - -4. From the signed `AuxSignerData` document, the fee payer constructs a transaction, using the following algorithm: - -* use as `TxBody` the exact `AuxSignerData.SignDocDirectAux.body_bytes`, to not alter the original intent of the tipper, -* create an `AuthInfo` with: - * `AuthInfo.Tip` copied from `AuxSignerData.SignDocDirectAux.Tip`, - * `AuthInfo.Fee` chosen by the fee payer, which should cover for the transaction gas, but also be small enough so that the tip/fee exchange rate is economically interesting for the fee payer, - * `AuthInfo.SignerInfos` has two signers: the first signer is the tipper, using the public key, sequence and sign mode specified in `AuxSignerData`; and the second signer is the fee payer, using their favorite sign mode, -* a `Signatures` array with two items: the tipper's signature from `AuxSignerData.Sig`, and the final fee payer's signature. - -5. Broadcast the final transaction signed by the two parties to the target chain. Once included, the Cosmos SDK will trigger a transfer of the `Tip` specified in the transaction from the tipper address to the fee payer address. - -### Fee Payers Market - -The benefit of transaction tips for the tipper is clear: there is no need to swap tokens before executing a cross-chain message. - -For the fee payer, the benefit is in the tip v.s. fee exchange. Put simply, the fee payer pays the fees of an unknown tipper's transaction, and gets in exchange the tip that the tipper chose. There is an economic incentive for the fee payer to do so only when the tip is greater than the transaction fees, given the exchange rates between the two tokens. - -In the future, we imagine a market where fee payers will compete to include transactions from tippers, who on their side will optimize by specifying the lowest tip possible. A number of automated services might spin up to perform transaction gas simulation and exchange rate monitoring to optimize both the tip and fee values in real-time. - -### Tipper and Fee Payer Sign Modes - -As we mentioned in the flow above, the tipper signs over the `SignDocDirectAux`, and the fee payer signs over the whole final transaction. As such, both parties might use different sign modes. - -* The tipper MUST use `SIGN_MODE_DIRECT_AUX` or `SIGN_MODE_LEGACY_AMINO_JSON`. That is because the tipper needs to sign over the body, the tip, but not the other signers' information and not over the fee (which is unknown to the tipper). -* The fee payer MUST use `SIGN_MODE_DIRECT` or `SIGN_MODE_LEGACY_AMINO_JSON`. The fee payer signs over the whole transaction. - -For example, if the fee payer signs the whole transaction with `SIGN_MODE_DIRECT_AUX`, it will be rejected by the node, as that would introduce malleability issues (`SIGN_MODE_DIRECT_AUX` doesn't sign over fees). - -In both cases, using `SIGN_MODE_LEGACY_AMINO_JSON` is recommended only if hardware wallet signing is needed. - -## Enabling Tips on your Chain - -The transaction tips functionality is introduced in Cosmos SDK v0.46, so earlier versions do not have support for tips. It is however not included by default in a v0.46 app. Sending a transaction with tips to a chain which didn't enable tips will result in a no-op, i.e. the `tip` field in the transaction will be ignored. - -Enabling tips on a chain is done by adding the `TipDecorator` in the posthandler chain: - -```go -// HandlerOptions are the options required for constructing a SDK PostHandler which supports tips. -type HandlerOptions struct { - BankKeeper types.BankKeeper -} - -// MyPostHandler returns a posthandler chain with the TipDecorator. -func MyPostHandler(options HandlerOptions) (sdk.AnteHandler, error) { - if options.BankKeeper == nil { - return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "bank keeper is required for posthandler") - } - - postDecorators := []sdk.AnteDecorator{ - posthandler.NewTipDecorator(options.bankKeeper), - } - - return sdk.ChainAnteDecorators(postDecorators...), nil -} - -func (app *SimApp) setPostHandler() { - postHandler, err := MyPostHandler( - HandlerOptions{ - BankKeeper: app.BankKeeper, - }, - ) - if err != nil { - panic(err) - } - - app.SetPostHandler(postHandler) -} -``` - -Notice that `NewTipDecorator` needs a reference to the BankKeeper, for transferring the tip to the fee payer. - -## CLI Usage - -The Cosmos SDK also provides some CLI tooling for the transaction tips flow, both for the tipper and for the feepayer. - -For the tipper, the CLI `tx` subcommand has two new flags: `--aux` and `--tip`. The `--aux` flag is used to denote that we are creating an `AuxSignerData` instead of a `Tx`, and the `--tip` is used to populate its `Tip` field. - -```bash -$ simd tx gov vote 16 yes --from --aux --tip 50ibcdenom - - -### Prints the AuxSignerData as JSON: -### {"address":"cosmos1q0ayf5vq6fd2xxrwh30upg05hxdnyw2h5249a2","sign_doc":{"body_bytes":"CosBChwvY29zbW9zLmJhbmsudjFiZXRhMS5Nc2dTZW5kEmsKLWNvc21vczFxMGF5ZjV2cTZmZDJ4eHJ3aDMwdXBnMDVoeGRueXcyaDUyNDlhMhItY29zbW9zMXdlNWoyZXI2MHV5OXF3YzBta3ptdGdtdHA5Z3F5NXY2bjhnZGdlGgsKBXN0YWtlEgIxMA==","public_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AojOF/1luQ5H/nZDSrE1w3CyzGJhJdQuS7hFX5wAA6uJ"},"chain_id":"","account_number":"0","sequence":"1","tip":{"amount":[{"denom":"ibcdenom","amount":"50"}],"tipper":"cosmos1q0ayf5vq6fd2xxrwh30upg05hxdnyw2h5249a2"}},"mode":"SIGN_MODE_DIRECT_AUX","sig":"v/d/bGq9FGdecs6faMG2t//nRirFTiqwFtUB65M6kh0QdUeM6jg3r8oJX1o17xkoDxJ09EyJiSyvo6fbU7vUxg=="} -``` - -It is useful to pipe the JSON output to a file, `> aux_signed_tx.json` - -For the fee payer, the Cosmos SDK added a `tx aux-to-fee` subcommand to include an `AuxSignerData` into a transaction, add fees to it, and broadcast it. - -```bash -$ simd tx aux-to-fee aux_signed_tx.json --from --fees 30atom - -### Prints the broadcasted tx response: -### code: 0 -### codespace: sdk -### data: "" -### events: [] -### gas_used: "0" -### gas_wanted: "0" -### height: "0" -### info: "" -### logs: [] -### timestamp: "" -### tx: null -``` - -Upon completion of the second command, the fee payer's balance will be down the `30atom` fees, and up the `50ibcdenom` tip. - -For both commands, the flag `--sign-mode=amino-json` is still available for hardware wallet signing. - -## Programmatic Usage - -For the tipper, the SDK exposes a new transaction builder, the `AuxTxBuilder`, for generating an `AuxSignerData`. The API of `AuxTxBuilder` is defined [in `client/tx`](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/client/tx/aux_builder.go#L16), and can be used as follows: - -```go -// Note: there's no need to use clientCtx.TxConfig anymore. - -bldr := clienttx.NewAuxTxBuilder() -err := bldr.SetMsgs(msgs...) -bldr.SetAddress("cosmos1...") -bldr.SetMemo(...) -bldr.SetTip(...) -bldr.SetPubKey(...) -err := bldr.SetSignMode(...) // DIRECT_AUX or AMINO, or else error -// ... other setters are also available - -// Get the bytes to sign. -signBz, err := bldr.GetSignBytes() - -// Sign the bz using your favorite method. -sig, err := privKey.sign(signBz) - -// Set the signature -bldr.SetSig(sig) - -// Get the final auxSignerData to be sent to the fee payer -auxSignerData, err:= bldr.GetAuxSignerData() -``` - -For the fee payer, the SDK added a new method on the existing `TxBuilder` to import data from an `AuxSignerData`: - -```go -// get `auxSignerData` from tipper, see code snippet above. - -txBuilder := clientCtx.TxConfig.NewTxBuilder() -err := txBuilder.AddAuxSignerData(auxSignerData) -if err != nil { - return err -} - -// A lot of fields will be populated in txBuilder, such as its Msgs, tip -// memo, etc... - -// The fee payer choses the fee to set on the transaction. -txBuilder.SetFeePayer() -txBuilder.SetFeeAmount(...) -txBuilder.SetGasLimit(...) - -// Usual signing code -err = authclient.SignTx(...) -if err != nil { - return err -} -``` diff --git a/docs/docs/intro/00-overview.md b/docs/docs/intro/00-overview.md deleted file mode 100644 index 31301657727a..000000000000 --- a/docs/docs/intro/00-overview.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -sidebar_position: 1 ---- - -# High-level Overview - -## What is the Cosmos SDK - -The [Cosmos SDK](https://github.com/cosmos/cosmos-sdk) is an open-source framework for building multi-asset public Proof-of-Stake (PoS) blockchains, like the Cosmos Hub, as well as permissioned Proof-of-Authority (PoA) blockchains. Blockchains built with the Cosmos SDK are generally referred to as **application-specific blockchains**. - -The goal of the Cosmos SDK is to allow developers to easily create custom blockchains from scratch that can natively interoperate with other blockchains. We envision the Cosmos SDK as the npm-like framework to build secure blockchain applications on top of [CometBFT](https://github.com/cometbft/cometbft). SDK-based blockchains are built out of composable [modules](../building-modules/01-intro.md), most of which are open-source and readily available for any developers to use. Anyone can create a module for the Cosmos SDK, and integrating already-built modules is as simple as importing them into your blockchain application. What's more, the Cosmos SDK is a capabilities-based system that allows developers to better reason about the security of interactions between modules. For a deeper look at capabilities, jump to [Object-Capability Model](../core/10-ocap.md). - -## What are Application-Specific Blockchains - -One development paradigm in the blockchain world today is that of virtual-machine blockchains like Ethereum, where development generally revolves around building decentralized applications on top of an existing blockchain as a set of smart contracts. While smart contracts can be very good for some use cases like single-use applications (e.g. ICOs), they often fall short for building complex decentralized platforms. More generally, smart contracts can be limiting in terms of flexibility, sovereignty and performance. - -Application-specific blockchains offer a radically different development paradigm than virtual-machine blockchains. An application-specific blockchain is a blockchain customized to operate a single application: developers have all the freedom to make the design decisions required for the application to run optimally. They can also provide better sovereignty, security and performance. - -Learn more about [application-specific blockchains](./01-why-app-specific.md). - -## Why the Cosmos SDK - -The Cosmos SDK is the most advanced framework for building custom application-specific blockchains today. Here are a few reasons why you might want to consider building your decentralized application with the Cosmos SDK: - -* The default consensus engine available within the Cosmos SDK is [CometBFT](https://github.com/cometbft/cometbft). CometBFT is the most (and only) mature BFT consensus engine in existence. It is widely used across the industry and is considered the gold standard consensus engine for building Proof-of-Stake systems. -* The Cosmos SDK is open-source and designed to make it easy to build blockchains out of composable [modules](../modules). As the ecosystem of open-source Cosmos SDK modules grows, it will become increasingly easier to build complex decentralized platforms with it. -* The Cosmos SDK is inspired by capabilities-based security, and informed by years of wrestling with blockchain state-machines. This makes the Cosmos SDK a very secure environment to build blockchains. -* Most importantly, the Cosmos SDK has already been used to build many application-specific blockchains that are already in production. Among others, we can cite [Cosmos Hub](https://hub.cosmos.network), [IRIS Hub](https://irisnet.org), [Binance Chain](https://docs.binance.org/), [Terra](https://terra.money/) or [Kava](https://www.kava.io/). [Many more](https://cosmos.network/ecosystem) are building on the Cosmos SDK. - -## Getting started with the Cosmos SDK - -* Learn more about the [architecture of a Cosmos SDK application](./02-sdk-app-architecture.md) -* Learn how to build an application-specific blockchain from scratch with the [Cosmos SDK Tutorial](https://cosmos.network/docs/tutorial) diff --git a/docs/docs/core/00-baseapp.md b/docs/docs/learn/advanced/00-baseapp.md similarity index 68% rename from docs/docs/core/00-baseapp.md rename to docs/docs/learn/advanced/00-baseapp.md index f54053ad8076..161a1d1a23c6 100644 --- a/docs/docs/core/00-baseapp.md +++ b/docs/docs/learn/advanced/00-baseapp.md @@ -8,12 +8,10 @@ sidebar_position: 1 This document describes `BaseApp`, the abstraction that implements the core functionalities of a Cosmos SDK application. ::: -:::note +:::note Pre-requisite Readings -### Pre-requisite Readings - -* [Anatomy of a Cosmos SDK application](../basics/00-app-anatomy.md) -* [Lifecycle of a Cosmos SDK transaction](../basics/01-tx-lifecycle.md) +* [Anatomy of a Cosmos SDK application](../beginner/00-app-anatomy.md) +* [Lifecycle of a Cosmos SDK transaction](../beginner/01-tx-lifecycle.md) ::: @@ -52,7 +50,7 @@ management logic. The `BaseApp` type holds many important parameters for any Cosmos SDK based application. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/baseapp/baseapp.go#L50-L146 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/baseapp/baseapp.go#L58-L182 ``` Let us go through the most important components. @@ -79,17 +77,16 @@ First, the important parameters that are initialized during the bootstrapping of raw transaction bytes relayed by the underlying CometBFT engine. * [`AnteHandler`](#antehandler): This handler is used to handle signature verification, fee payment, and other pre-message execution checks when a transaction is received. It's executed during - [`CheckTx/RecheckTx`](#checktx) and [`DeliverTx`](#delivertx). -* [`InitChainer`](../basics/00-app-anatomy.md#initchainer), - [`BeginBlocker` and `EndBlocker`](../basics/00-app-anatomy.md#beginblocker-and-endblocker): These are - the functions executed when the application receives the `InitChain`, `BeginBlock` and `EndBlock` + [`CheckTx/RecheckTx`](#checktx) and [`FinalizeBlock`](#finalizeblock). +* [`InitChainer`](../beginner/00-app-anatomy.md#initchainer), [`PreBlocker`](../beginner/00-app-anatomy.md#preblocker), [`BeginBlocker` and `EndBlocker`](../beginner/00-app-anatomy.md#beginblocker-and-endblocker): These are + the functions executed when the application receives the `InitChain` and `FinalizeBlock` ABCI messages from the underlying CometBFT engine. Then, parameters used to define [volatile states](#state-updates) (i.e. cached states): * `checkState`: This state is updated during [`CheckTx`](#checktx), and reset on [`Commit`](#commit). -* `deliverState`: This state is updated during [`DeliverTx`](#delivertx), and set to `nil` on - [`Commit`](#commit) and gets re-initialized on BeginBlock. +* `finalizeBlockState`: This state is updated during [`FinalizeBlock`](#finalizeblock), and set to `nil` on + [`Commit`](#commit) and gets re-initialized on `FinalizeBlock`. * `processProposalState`: This state is updated during [`ProcessProposal`](#process-proposal). * `prepareProposalState`: This state is updated during [`PrepareProposal`](#prepare-proposal). @@ -97,7 +94,7 @@ Finally, a few more important parameters: * `voteInfos`: This parameter carries the list of validators whose precommit is missing, either because they did not vote or because the proposer did not include their vote. This information is - carried by the [Context](#context) and can be used by the application for various things like + carried by the [Context](./02-context.md) and can be used by the application for various things like punishing absent validators. * `minGasPrices`: This parameter defines the minimum gas prices accepted by the node. This is a **local** parameter, meaning each full-node can set a different `minGasPrices`. It is used in the @@ -107,7 +104,7 @@ Finally, a few more important parameters: `minGasPrices` (e.g. if `minGasPrices == 1uatom,1photon`, the `gas-price` of the transaction must be greater than `1uatom` OR `1photon`). * `appVersion`: Version of the application. It is set in the - [application's constructor function](../basics/00-app-anatomy.md#constructor-function). + [application's constructor function](../beginner/00-app-anatomy.md#constructor-function). ## Constructor @@ -121,7 +118,7 @@ func NewBaseApp( ``` The `BaseApp` constructor function is pretty straightforward. The only thing worth noting is the -possibility to provide additional [`options`](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/baseapp/options.go) +possibility to provide additional [`options`](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/baseapp/options.go) to the `BaseApp`, which will execute them in order. The `options` are generally `setter` functions for important parameters, like `SetPruning()` to set pruning options or `SetMinGasPrices()` to set the node's `min-gas-prices`. @@ -131,7 +128,7 @@ Naturally, developers can add additional `options` based on their application's ## State Updates The `BaseApp` maintains four primary volatile states and a root or main state. The main state -is the canonical state of the application and the volatile states, `checkState`, `deliverState`, `prepareProposalState`, `processPreposalState`, +is the canonical state of the application and the volatile states, `checkState`, `prepareProposalState`, `processProposalState` and `finalizeBlockState` are used to handle state transitions in-between the main state made during [`Commit`](#commit). Internally, there is only a single `CommitMultiStore` which we refer to as the main or root state. @@ -143,7 +140,7 @@ The types can be illustrated as follows: ### InitChain State Updates During `InitChain`, the four volatile states, `checkState`, `prepareProposalState`, `processProposalState` -and `deliverState` are set by branching the root `CommitMultiStore`. Any subsequent reads and writes happen +and `finalizeBlockState` are set by branching the root `CommitMultiStore`. Any subsequent reads and writes happen on branched versions of the `CommitMultiStore`. To avoid unnecessary roundtrip to the main state, all reads to the branched store are cached. @@ -184,30 +181,24 @@ Again we want to highlight that the described behavior is that of the default ha ![ProcessProposal](./baseapp_state-processproposal.png) -### BeginBlock State Updates - -During `BeginBlock`, the `deliverState` is set for use in subsequent `DeliverTx` ABCI messages. The -`deliverState` is based off of the last committed state from the root store and is branched. -Note, the `deliverState` is set to `nil` on [`Commit`](#commit). - -![BeginBlock](./baseapp_state-begin_block.png) +### FinalizeBlock State Updates -### DeliverTx State Updates +During `FinalizeBlock`, the `finalizeBlockState` is set for use during transaction execution and endblock. The +`finalizeBlockState` is based off of the last committed state from the root store and is branched. +Note, the `finalizeBlockState` is set to `nil` on [`Commit`](#commit). -The state flow for `DeliverTx` is nearly identical to `CheckTx` except state transitions occur on -the `deliverState` and messages in a transaction are executed. Similarly to `CheckTx`, state transitions -occur on a doubly branched state -- `deliverState`. Successful message execution results in -writes being committed to `deliverState`. Note, if message execution fails, state transitions from +The state flow for transaction execution is nearly identical to `CheckTx` except state transitions occur on +the `finalizeBlockState` and messages in a transaction are executed. Similarly to `CheckTx`, state transitions +occur on a doubly branched state -- `finalizeBlockState`. Successful message execution results in +writes being committed to `finalizeBlockState`. Note, if message execution fails, state transitions from the AnteHandler are persisted. -![DeliverTx](./baseapp_state-deliver_tx.png) - ### Commit State Updates -During `Commit` all the state transitions that occurred in the `deliverState` are finally written to +During `Commit` all the state transitions that occurred in the `finalizeBlockState` are finally written to the root `CommitMultiStore` which in turn is committed to disk and results in a new application root hash. These state transitions are now considered final. Finally, the `checkState` is set to the -newly committed state and `deliverState` is set to `nil` to be reset on `BeginBlock`. +newly committed state and `finalizeBlockState` is set to `nil` to be reset on `FinalizeBlock`. ![Commit](./baseapp_state-commit.png) @@ -225,19 +216,19 @@ When messages and queries are received by the application, they must be routed t ### `Msg` Service Router -[`sdk.Msg`s](../building-modules/02-messages-and-queries.md#messages) need to be routed after they are extracted from transactions, which are sent from the underlying CometBFT engine via the [`CheckTx`](#checktx) and [`DeliverTx`](#delivertx) ABCI messages. To do so, `BaseApp` holds a `msgServiceRouter` which maps fully-qualified service methods (`string`, defined in each module's Protobuf `Msg` service) to the appropriate module's `MsgServer` implementation. +[`sdk.Msg`s](../../build/building-modules/02-messages-and-queries.md#messages) need to be routed after they are extracted from transactions, which are sent from the underlying CometBFT engine via the [`CheckTx`](#checktx) and [`FinalizeBlock`](#finalizeblock) ABCI messages. To do so, `BaseApp` holds a `msgServiceRouter` which maps fully-qualified service methods (`string`, defined in each module's Protobuf `Msg` service) to the appropriate module's `MsgServer` implementation. -The [default `msgServiceRouter` included in `BaseApp`](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/baseapp/msg_service_router.go) is stateless. However, some applications may want to make use of more stateful routing mechanisms such as allowing governance to disable certain routes or point them to new modules for upgrade purposes. For this reason, the `sdk.Context` is also passed into each [route handler inside `msgServiceRouter`](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/baseapp/msg_service_router.go#L31-L32). For a stateless router that doesn't want to make use of this, you can just ignore the `ctx`. +The [default `msgServiceRouter` included in `BaseApp`](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/baseapp/msg_service_router.go) is stateless. However, some applications may want to make use of more stateful routing mechanisms such as allowing governance to disable certain routes or point them to new modules for upgrade purposes. For this reason, the `sdk.Context` is also passed into each [route handler inside `msgServiceRouter`](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/baseapp/msg_service_router.go#L31-L32). For a stateless router that doesn't want to make use of this, you can just ignore the `ctx`. -The application's `msgServiceRouter` is initialized with all the routes using the application's [module manager](../building-modules/01-module-manager.md#manager) (via the `RegisterServices` method), which itself is initialized with all the application's modules in the application's [constructor](../basics/00-app-anatomy.md#constructor-function). +The application's `msgServiceRouter` is initialized with all the routes using the application's [module manager](../../build/building-modules/01-module-manager.md#manager) (via the `RegisterServices` method), which itself is initialized with all the application's modules in the application's [constructor](../beginner/00-app-anatomy.md#constructor-function). ### gRPC Query Router -Similar to `sdk.Msg`s, [`queries`](../building-modules/02-messages-and-queries.md#queries) need to be routed to the appropriate module's [`Query` service](../building-modules/04-query-services.md). To do so, `BaseApp` holds a `grpcQueryRouter`, which maps modules' fully-qualified service methods (`string`, defined in their Protobuf `Query` gRPC) to their `QueryServer` implementation. The `grpcQueryRouter` is called during the initial stages of query processing, which can be either by directly sending a gRPC query to the gRPC endpoint, or via the [`Query` ABCI message](#query) on the CometBFT RPC endpoint. +Similar to `sdk.Msg`s, [`queries`](../../build/building-modules/02-messages-and-queries.md#queries) need to be routed to the appropriate module's [`Query` service](../../build/building-modules/04-query-services.md). To do so, `BaseApp` holds a `grpcQueryRouter`, which maps modules' fully-qualified service methods (`string`, defined in their Protobuf `Query` gRPC) to their `QueryServer` implementation. The `grpcQueryRouter` is called during the initial stages of query processing, which can be either by directly sending a gRPC query to the gRPC endpoint, or via the [`Query` ABCI message](#query) on the CometBFT RPC endpoint. -Just like the `msgServiceRouter`, the `grpcQueryRouter` is initialized with all the query routes using the application's [module manager](../building-modules/01-module-manager.md) (via the `RegisterServices` method), which itself is initialized with all the application's modules in the application's [constructor](../basics/00-app-anatomy.md#app-constructor). +Just like the `msgServiceRouter`, the `grpcQueryRouter` is initialized with all the query routes using the application's [module manager](../../build/building-modules/01-module-manager.md) (via the `RegisterServices` method), which itself is initialized with all the application's modules in the application's [constructor](../beginner/00-app-anatomy.md#app-constructor). -## Main ABCI 1.0 Messages +## Main ABCI 2.0 Messages The [Application-Blockchain Interface](https://github.com/cometbft/cometbft/blob/v0.37.x/spec/abci/abci++_basic_concepts.md) (ABCI) is a generic interface that connects a state-machine with a consensus engine to form a functional full-node. It can be wrapped in any language, and needs to be implemented by each application-specific blockchain built on top of an ABCI-compatible consensus engine like CometBFT. @@ -253,7 +244,9 @@ Developers building on top of the Cosmos SDK need not implement the ABCI themsel * [`Prepare Proposal`](#prepare-proposal) * [`Process Proposal`](#process-proposal) * [`CheckTx`](#checktx) -* [`DeliverTx`](#delivertx) +* [`FinalizeBlock`](#finalizeblock) +* [`ExtendVote`](#extendvote) +* [`VerifyVoteExtension`](#verifyvoteextension) ### Prepare Proposal @@ -265,9 +258,9 @@ Here is how the `PrepareProposal` function can be implemented: 1. Extract the `sdk.Msg`s from the transaction. 2. Perform _stateful_ checks by calling `Validate()` on each of the `sdk.Msg`'s. This is done after _stateless_ checks as _stateful_ checks are more computationally expensive. If `Validate()` fails, `PrepareProposal` returns before running further checks, which saves resources. 3. Perform any additional checks that are specific to the application, such as checking account balances, or ensuring that certain conditions are met before a transaction is proposed.hey are processed by the consensus engine, if necessary. -5. Return the updated transactions to be processed by the consensus engine +4. Return the updated transactions to be processed by the consensus engine -Note that, unlike `CheckTx()`, `PrepareProposal` process `sdk.Msg`s, so it can directly update the state. However, unlike `DeliverTx()`, it does not commit the state updates. It's important to exercise caution when using `PrepareProposal` as incorrect coding could affect the overall liveness of the network. +Note that, unlike `CheckTx()`, `PrepareProposal` process `sdk.Msg`s, so it can directly update the state. However, unlike `FinalizeBlock()`, it does not commit the state updates. It's important to exercise caution when using `PrepareProposal` as incorrect coding could affect the overall liveness of the network. It's important to note that `PrepareProposal` complements the `ProcessProposal` method which is executed after this method. The combination of these two methods means that it is possible to guarantee that no invalid transactions are ever committed. Furthermore, such a setup can give rise to other interesting use cases such as Oracles, threshold decryption and more. @@ -281,7 +274,7 @@ It's important to note that `PrepareProposal` complements the `ProcessProposal` ### Process Proposal -The `ProcessProposal` function is called by the BaseApp as part of the ABCI message flow, and is executed during the `BeginBlock` phase of the consensus process. The purpose of this function is to give more control to the application for block validation, allowing it to check all transactions in a proposed block before the validator sends the prevote for the block. It allows a validator to perform application-dependent work in a proposed block, enabling features such as immediate block execution, and allows the Application to reject invalid blocks. +The `ProcessProposal` function is called by the BaseApp as part of the ABCI message flow, and is executed during the `FinalizeBlock` phase of the consensus process. The purpose of this function is to give more control to the application for block validation, allowing it to check all transactions in a proposed block before the validator sends the prevote for the block. It allows a validator to perform application-dependent work in a proposed block, enabling features such as immediate block execution, and allows the Application to reject invalid blocks. The `ProcessProposal` function performs several key tasks, including: @@ -324,16 +317,16 @@ to do the following checks: first, as _stateless_ checks are less computationally expensive than _stateful_ checks. If `ValidateBasic()` fail, `CheckTx` returns before running _stateful_ checks, which saves resources. This check is still performed for messages that have not yet migrated to the new message validation mechanism defined in [RFC 001](https://docs.cosmos.network/main/rfc/rfc-001-tx-validation) and still have a `ValidateBasic()` method. -3. Perform non-module related _stateful_ checks on the [account](../basics/03-accounts.md). This step is mainly about checking +3. Perform non-module related _stateful_ checks on the [account](../beginner/03-accounts.md). This step is mainly about checking that the `sdk.Msg` signatures are valid, that enough fees are provided and that the sending account - has enough funds to pay for said fees. Note that no precise [`gas`](../basics/04-gas-fees.md) counting occurs here, - as `sdk.Msg`s are not processed. Usually, the [`AnteHandler`](../basics/04-gas-fees.md#antehandler) will check that the `gas` provided + has enough funds to pay for said fees. Note that no precise [`gas`](../beginner/04-gas-fees.md) counting occurs here, + as `sdk.Msg`s are not processed. Usually, the [`AnteHandler`](../beginner/04-gas-fees.md#antehandler) will check that the `gas` provided with the transaction is superior to a minimum reference gas amount based on the raw transaction size, in order to avoid spam with transactions that provide 0 gas. -`CheckTx` does **not** process `sdk.Msg`s - they only need to be processed when the canonical state need to be updated, which happens during `DeliverTx`. +`CheckTx` does **not** process `sdk.Msg`s - they only need to be processed when the canonical state needs to be updated, which happens during `FinalizeBlock`. -Steps 2. and 3. are performed by the [`AnteHandler`](../basics/04-gas-fees.md#antehandler) in the [`RunTx()`](#runtx-antehandler-and-runmsgs) +Steps 2. and 3. are performed by the [`AnteHandler`](../beginner/04-gas-fees.md#antehandler) in the [`RunTx()`](#runtx-antehandler-and-runmsgs) function, which `CheckTx()` calls with the `runTxModeCheck` mode. During each step of `CheckTx()`, a special [volatile state](#state-updates) called `checkState` is updated. This state is used to keep track of the temporary changes triggered by the `CheckTx()` calls of each transaction without modifying @@ -356,7 +349,7 @@ The response contains: * `GasUsed (int64)`: Amount of gas consumed by transaction. During `CheckTx`, this value is computed by multiplying the standard cost of a transaction byte by the size of the raw transaction. Next is an example: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/auth/ante/basic.go#L96 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/auth/ante/basic.go#L102 ``` * `Events ([]cmn.KVPair)`: Key-Value tags for filtering and indexing transactions (eg. by account). See [`event`s](./08-events.md) for more. @@ -371,62 +364,32 @@ Tendermint v0.32.1, an additional `Type` parameter is made available to the `Che indicates whether an incoming transaction is new (`CheckTxType_New`), or a recheck (`CheckTxType_Recheck`). This allows certain checks like signature verification can be skipped during `CheckTxType_Recheck`. -### DeliverTx - -When the underlying consensus engine receives a block proposal, each transaction in the block needs to be processed by the application. To that end, the underlying consensus engine sends a `DeliverTx` message to the application for each transaction in a sequential order. - -Before the first transaction of a given block is processed, a [volatile state](#state-updates) called `deliverState` is initialized during [`BeginBlock`](#beginblock). This state is updated each time a transaction is processed via `DeliverTx`, and committed to the [main state](#main-state) when the block is [committed](#commit), after what it is set to `nil`. - -`DeliverTx` performs the **exact same steps as `CheckTx`**, with a little caveat at step 3 and the addition of a fifth step: - -1. The `AnteHandler` does **not** check that the transaction's `gas-prices` is sufficient. That is because the `min-gas-prices` value `gas-prices` is checked against is local to the node, and therefore what is enough for one full-node might not be for another. This means that the proposer can potentially include transactions for free, although they are not incentivised to do so, as they earn a bonus on the total fee of the block they propose. -2. For each `sdk.Msg` in the transaction, route to the appropriate module's Protobuf [`Msg` service](../building-modules/03-msg-services.md). Additional _stateful_ checks are performed, and the branched multistore held in `deliverState`'s `context` is updated by the module's `keeper`. If the `Msg` service returns successfully, the branched multistore held in `context` is written to `deliverState` `CacheMultiStore`. - -During the additional fifth step outlined in (2), each read/write to the store increases the value of `GasConsumed`. You can find the default cost of each operation: - -```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/types/gas.go#L230-L241 -``` - -At any point, if `GasConsumed > GasWanted`, the function returns with `Code != 0` and `DeliverTx` fails. - -`DeliverTx` returns a response to the underlying consensus engine of type [`abci.ResponseDeliverTx`](https://github.com/cometbft/cometbft/blob/v0.37.x/spec/abci/abci++_methods.md#delivertx). The response contains: - -* `Code (uint32)`: Response Code. `0` if successful. -* `Data ([]byte)`: Result bytes, if any. -* `Log (string):` The output of the application's logger. May be non-deterministic. -* `Info (string):` Additional information. May be non-deterministic. -* `GasWanted (int64)`: Amount of gas requested for transaction. It is provided by users when they generate the transaction. -* `GasUsed (int64)`: Amount of gas consumed by transaction. During `DeliverTx`, this value is computed by multiplying the standard cost of a transaction byte by the size of the raw transaction, and by adding gas each time a read/write to the store occurs. -* `Events ([]cmn.KVPair)`: Key-Value tags for filtering and indexing transactions (eg. by account). See [`event`s](./08-events.md) for more. -* `Codespace (string)`: Namespace for the Code. - ## RunTx, AnteHandler, RunMsgs, PostHandler ### RunTx -`RunTx` is called from `CheckTx`/`DeliverTx` to handle the transaction, with `runTxModeCheck` or `runTxModeDeliver` as parameter to differentiate between the two modes of execution. Note that when `RunTx` receives a transaction, it has already been decoded. +`RunTx` is called from `CheckTx`/`Finalizeblock` to handle the transaction, with `execModeCheck` or `execModeFinalize` as parameter to differentiate between the two modes of execution. Note that when `RunTx` receives a transaction, it has already been decoded. -The first thing `RunTx` does upon being called is to retrieve the `context`'s `CacheMultiStore` by calling the `getContextForTx()` function with the appropriate mode (either `runTxModeCheck` or `runTxModeDeliver`). This `CacheMultiStore` is a branch of the main store, with cache functionality (for query requests), instantiated during `BeginBlock` for `DeliverTx` and during the `Commit` of the previous block for `CheckTx`. After that, two `defer func()` are called for [`gas`](../basics/04-gas-fees.md) management. They are executed when `runTx` returns and make sure `gas` is actually consumed, and will throw errors, if any. +The first thing `RunTx` does upon being called is to retrieve the `context`'s `CacheMultiStore` by calling the `getContextForTx()` function with the appropriate mode (either `runTxModeCheck` or `execModeFinalize`). This `CacheMultiStore` is a branch of the main store, with cache functionality (for query requests), instantiated during `FinalizeBlock` for transaction execution and during the `Commit` of the previous block for `CheckTx`. After that, two `defer func()` are called for [`gas`](../beginner/04-gas-fees.md) management. They are executed when `runTx` returns and make sure `gas` is actually consumed, and will throw errors, if any. After that, `RunTx()` calls `ValidateBasic()`, when available and for backward compatibility, on each `sdk.Msg`in the `Tx`, which runs preliminary _stateless_ validity checks. If any `sdk.Msg` fails to pass `ValidateBasic()`, `RunTx()` returns with an error. -Then, the [`anteHandler`](#antehandler) of the application is run (if it exists). In preparation of this step, both the `checkState`/`deliverState`'s `context` and `context`'s `CacheMultiStore` are branched using the `cacheTxContext()` function. +Then, the [`anteHandler`](#antehandler) of the application is run (if it exists). In preparation of this step, both the `checkState`/`finalizeBlockState`'s `context` and `context`'s `CacheMultiStore` are branched using the `cacheTxContext()` function. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/baseapp/baseapp.go#L663-L672 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/baseapp/baseapp.go#L663-L680 ``` This allows `RunTx` not to commit the changes made to the state during the execution of `anteHandler` if it ends up failing. It also prevents the module implementing the `anteHandler` from writing to state, which is an important part of the [object-capabilities](./10-ocap.md) of the Cosmos SDK. -Finally, the [`RunMsgs()`](#runmsgs) function is called to process the `sdk.Msg`s in the `Tx`. In preparation of this step, just like with the `anteHandler`, both the `checkState`/`deliverState`'s `context` and `context`'s `CacheMultiStore` are branched using the `cacheTxContext()` function. +Finally, the [`RunMsgs()`](#runmsgs) function is called to process the `sdk.Msg`s in the `Tx`. In preparation of this step, just like with the `anteHandler`, both the `checkState`/`finalizeBlockState`'s `context` and `context`'s `CacheMultiStore` are branched using the `cacheTxContext()` function. ### AnteHandler The `AnteHandler` is a special handler that implements the `AnteHandler` interface and is used to authenticate the transaction before the transaction's internal messages are processed. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/handler.go#L6-L8 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/handler.go#L6-L8 ``` The `AnteHandler` is theoretically optional, but still a very important component of public blockchain networks. It serves 3 primary purposes: @@ -435,25 +398,26 @@ The `AnteHandler` is theoretically optional, but still a very important componen * Perform preliminary _stateful_ validity checks like ensuring signatures are valid or that the sender has enough funds to pay for fees. * Play a role in the incentivisation of stakeholders via the collection of transaction fees. -`BaseApp` holds an `anteHandler` as parameter that is initialized in the [application's constructor](../basics/00-app-anatomy.md#application-constructor). The most widely used `anteHandler` is the [`auth` module](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/auth/ante/ante.go). +`BaseApp` holds an `anteHandler` as parameter that is initialized in the [application's constructor](../beginner/00-app-anatomy.md#application-constructor). The most widely used `anteHandler` is the [`auth` module](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/auth/ante/ante.go). -Click [here](../basics/04-gas-fees.md#antehandler) for more on the `anteHandler`. +Click [here](../beginner/04-gas-fees.md#antehandler) for more on the `anteHandler`. ### RunMsgs -`RunMsgs` is called from `RunTx` with `runTxModeCheck` as parameter to check the existence of a route for each message the transaction, and with `runTxModeDeliver` to actually process the `sdk.Msg`s. +`RunMsgs` is called from `RunTx` with `runTxModeCheck` as parameter to check the existence of a route for each message the transaction, and with `execModeFinalize` to actually process the `sdk.Msg`s. -First, it retrieves the `sdk.Msg`'s fully-qualified type name, by checking the `type_url` of the Protobuf `Any` representing the `sdk.Msg`. Then, using the application's [`msgServiceRouter`](#msg-service-router), it checks for the existence of `Msg` service method related to that `type_url`. At this point, if `mode == runTxModeCheck`, `RunMsgs` returns. Otherwise, if `mode == runTxModeDeliver`, the [`Msg` service](../building-modules/03-msg-services.md) RPC is executed, before `RunMsgs` returns. +First, it retrieves the `sdk.Msg`'s fully-qualified type name, by checking the `type_url` of the Protobuf `Any` representing the `sdk.Msg`. Then, using the application's [`msgServiceRouter`](#msg-service-router), it checks for the existence of `Msg` service method related to that `type_url`. At this point, if `mode == runTxModeCheck`, `RunMsgs` returns. Otherwise, if `mode == execModeFinalize`, the [`Msg` service](../../build/building-modules/03-msg-services.md) RPC is executed, before `RunMsgs` returns. ### PostHandler -`PostHandler` is similar to `AnteHandler`, but it, as the name suggests, executes custom post tx processing logic after [`RunMsgs`](#runmsgs) is called. `PostHandler` receives the `Result` of the the `RunMsgs` in order to enable this customizable behavior. +`PostHandler` is similar to `AnteHandler`, but it, as the name suggests, executes custom post tx processing logic after [`RunMsgs`](#runmsgs) is called. `PostHandler` receives the `Result` of the `RunMsgs` in order to enable this customizable behavior. + +Like `AnteHandler`s, `PostHandler`s are theoretically optional. -Like `AnteHandler`s, `PostHandler`s are theoretically optional, one use case for `PostHandler`s is transaction tips (enabled by default in simapp). Other use cases like unused gas refund can also be enabled by `PostHandler`s. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/auth/posthandler/post.go#L1-L15 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/auth/posthandler/post.go#L1-L15 ``` Note, when `PostHandler`s fail, the state from `runMsgs` is also reverted, effectively making the transaction fail. @@ -465,36 +429,86 @@ Note, when `PostHandler`s fail, the state from `runMsgs` is also reverted, effec The [`InitChain` ABCI message](https://github.com/cometbft/cometbft/blob/v0.37.x/spec/abci/abci++_basic_concepts.md#method-overview) is sent from the underlying CometBFT engine when the chain is first started. It is mainly used to **initialize** parameters and state like: * [Consensus Parameters](https://github.com/cometbft/cometbft/blob/v0.37.x/spec/abci/abci++_app_requirements.md#consensus-parameters) via `setConsensusParams`. -* [`checkState` and `deliverState`](#state-updates) via `setState`. -* The [block gas meter](../basics/04-gas-fees.md#block-gas-meter), with infinite gas to process genesis transactions. +* [`checkState` and `finalizeBlockState`](#state-updates) via `setState`. +* The [block gas meter](../beginner/04-gas-fees.md#block-gas-meter), with infinite gas to process genesis transactions. + +Finally, the `InitChain(req abci.RequestInitChain)` method of `BaseApp` calls the [`initChainer()`](../beginner/00-app-anatomy.md#initchainer) of the application in order to initialize the main state of the application from the `genesis file` and, if defined, call the [`InitGenesis`](../../build/building-modules/08-genesis.md#initgenesis) function of each of the application's modules. -Finally, the `InitChain(req abci.RequestInitChain)` method of `BaseApp` calls the [`initChainer()`](../basics/00-app-anatomy.md#initchainer) of the application in order to initialize the main state of the application from the `genesis file` and, if defined, call the [`InitGenesis`](../building-modules/08-genesis.md#initgenesis) function of each of the application's modules. -### BeginBlock +### FinalizeBlock -The [`BeginBlock` ABCI message](https://github.com/cometbft/cometbft/blob/v0.37.x/spec/abci/abci++_basic_concepts.md#method-overview) is sent from the underlying CometBFT engine when a block proposal created by the correct proposer is received, before [`DeliverTx`](#delivertx) is run for each transaction in the block. It allows developers to have logic be executed at the beginning of each block. In the Cosmos SDK, the `BeginBlock(req abci.RequestBeginBlock)` method does the following: +The [`FinalizeBlock` ABCI message](https://github.com/cometbft/cometbft/blob/v0.38.x/spec/abci/abci++_basic_concepts.md#method-overview) is sent from the underlying CometBFT engine when a block proposal created by the correct proposer is received. The previous `BeginBlock, DeliverTx and Endblock` calls are private methods on the BaseApp struct. -* Initialize [`deliverState`](#state-updates) with the latest header using the `req abci.RequestBeginBlock` passed as parameter via the `setState` function. + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/baseapp/abci.go#L623 +``` + +#### PreBlock + +* Run the application's [`preBlocker()`](../beginner/00-app-anatomy.md#preblocker), which mainly runs the [`PreBlocker()`](../../build/building-modules/17-preblock.md#preblock) method of each of the modules. + +#### BeginBlock + +* Initialize [`finalizeBlockState`](#state-updates) with the latest header using the `req abci.RequestFinalizeBlock` passed as parameter via the `setState` function. ```go reference - https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/baseapp/baseapp.go#L406-L433 + https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/baseapp/baseapp.go#L682-L706 ``` - This function also resets the [main gas meter](../basics/04-gas-fees.md#main-gas-meter). + This function also resets the [main gas meter](../beginner/04-gas-fees.md#main-gas-meter). + +* Initialize the [block gas meter](../beginner/04-gas-fees.md#block-gas-meter) with the `maxGas` limit. The `gas` consumed within the block cannot go above `maxGas`. This parameter is defined in the application's consensus parameters. +* Run the application's [`beginBlocker()`](../beginner/00-app-anatomy.md#beginblocker-and-endblocker), which mainly runs the [`BeginBlocker()`](../../build/building-modules/06-beginblock-endblock.md#beginblock) method of each of the modules. +* Set the [`VoteInfos`](https://github.com/cometbft/cometbft/blob/v0.37.x/spec/abci/abci++_methods.md#voteinfo) of the application, i.e. the list of validators whose _precommit_ for the previous block was included by the proposer of the current block. This information is carried into the [`Context`](./02-context.md) so that it can be used during transaction execution and EndBlock. + +#### Transaction Execution -* Initialize the [block gas meter](../basics/04-gas-fees.md#block-gas-meter) with the `maxGas` limit. The `gas` consumed within the block cannot go above `maxGas`. This parameter is defined in the application's consensus parameters. -* Run the application's [`beginBlocker()`](../basics/00-app-anatomy.md#beginblocker-and-endblock), which mainly runs the [`BeginBlocker()`](../building-modules/05-beginblock-endblock.md#beginblock) method of each of the application's modules. -* Set the [`VoteInfos`](https://github.com/cometbft/cometbft/blob/v0.37.x/spec/abci/abci++_methods.md#voteinfo) of the application, i.e. the list of validators whose _precommit_ for the previous block was included by the proposer of the current block. This information is carried into the [`Context`](./02-context.md) so that it can be used during `DeliverTx` and `EndBlock`. +When the underlying consensus engine receives a block proposal, each transaction in the block needs to be processed by the application. To that end, the underlying consensus engine sends the transactions in FinalizeBlock message to the application for each transaction in a sequential order. -### EndBlock +Before the first transaction of a given block is processed, a [volatile state](#state-updates) called `finalizeBlockState` is initialized during FinalizeBlock. This state is updated each time a transaction is processed via `FinalizeBlock`, and committed to the [main state](#main-state) when the block is [committed](#commit), after what it is set to `nil`. -The [`EndBlock` ABCI message](https://github.com/cometbft/cometbft/blob/v0.37.x/spec/abci/abci++_basic_concepts.md#method-overview) is sent from the underlying CometBFT engine after [`DeliverTx`](#delivertx) as been run for each transaction in the block. It allows developers to have logic be executed at the end of each block. In the Cosmos SDK, the bulk `EndBlock(req abci.RequestEndBlock)` method is to run the application's [`EndBlocker()`](../basics/00-app-anatomy.md#beginblocker-and-endblock), which mainly runs the [`EndBlocker()`](../building-modules/05-beginblock-endblock.md#beginblock) method of each of the application's modules. +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/baseapp/baseapp.go#LL708-L743 +``` + +Transaction execution within `FinalizeBlock` performs the **exact same steps as `CheckTx`**, with a little caveat at step 3 and the addition of a fifth step: + +1. The `AnteHandler` does **not** check that the transaction's `gas-prices` is sufficient. That is because the `min-gas-prices` value `gas-prices` is checked against is local to the node, and therefore what is enough for one full-node might not be for another. This means that the proposer can potentially include transactions for free, although they are not incentivised to do so, as they earn a bonus on the total fee of the block they propose. +2. For each `sdk.Msg` in the transaction, route to the appropriate module's Protobuf [`Msg` service](../../build/building-modules/03-msg-services.md). Additional _stateful_ checks are performed, and the branched multistore held in `finalizeBlockState`'s `context` is updated by the module's `keeper`. If the `Msg` service returns successfully, the branched multistore held in `context` is written to `finalizeBlockState` `CacheMultiStore`. + +During the additional fifth step outlined in (2), each read/write to the store increases the value of `GasConsumed`. You can find the default cost of each operation: + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/store/types/gas.go#L230-L241 +``` + +At any point, if `GasConsumed > GasWanted`, the function returns with `Code != 0` and the execution fails. + +Each transactions returns a response to the underlying consensus engine of type [`abci.ExecTxResult`](https://github.com/cometbft/cometbft/blob/v0.38.0-rc1/spec/abci/abci%2B%2B_methods.md#exectxresult). The response contains: + +* `Code (uint32)`: Response Code. `0` if successful. +* `Data ([]byte)`: Result bytes, if any. +* `Log (string):` The output of the application's logger. May be non-deterministic. +* `Info (string):` Additional information. May be non-deterministic. +* `GasWanted (int64)`: Amount of gas requested for transaction. It is provided by users when they generate the transaction. +* `GasUsed (int64)`: Amount of gas consumed by transaction. During transaction execution, this value is computed by multiplying the standard cost of a transaction byte by the size of the raw transaction, and by adding gas each time a read/write to the store occurs. +* `Events ([]cmn.KVPair)`: Key-Value tags for filtering and indexing transactions (eg. by account). See [`event`s](./08-events.md) for more. +* `Codespace (string)`: Namespace for the Code. + +#### EndBlock + +EndBlock is run after transaction execution completes. It allows developers to have logic be executed at the end of each block. In the Cosmos SDK, the bulk EndBlock() method is to run the application's EndBlocker(), which mainly runs the EndBlocker() method of each of the application's modules. + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/baseapp/baseapp.go#L747-L769 +``` ### Commit -The [`Commit` ABCI message](https://github.com/cometbft/cometbft/blob/v0.37.x/spec/abci/abci++_basic_concepts.md#method-overview) is sent from the underlying CometBFT engine after the full-node has received _precommits_ from 2/3+ of validators (weighted by voting power). On the `BaseApp` end, the `Commit(res abci.ResponseCommit)` function is implemented to commit all the valid state transitions that occurred during `BeginBlock`, `DeliverTx` and `EndBlock` and to reset state for the next block. +The [`Commit` ABCI message](https://github.com/cometbft/cometbft/blob/v0.37.x/spec/abci/abci++_basic_concepts.md#method-overview) is sent from the underlying CometBFT engine after the full-node has received _precommits_ from 2/3+ of validators (weighted by voting power). On the `BaseApp` end, the `Commit(res abci.ResponseCommit)` function is implemented to commit all the valid state transitions that occurred during `FinalizeBlock` and to reset state for the next block. -To commit state-transitions, the `Commit` function calls the `Write()` function on `deliverState.ms`, where `deliverState.ms` is a branched multistore of the main store `app.cms`. Then, the `Commit` function sets `checkState` to the latest header (obtained from `deliverState.ctx.BlockHeader`) and `deliverState` to `nil`. +To commit state-transitions, the `Commit` function calls the `Write()` function on `finalizeBlockState.ms`, where `finalizeBlockState.ms` is a branched multistore of the main store `app.cms`. Then, the `Commit` function sets `checkState` to the latest header (obtained from `finalizeBlockState.ctx.BlockHeader`) and `finalizeBlockState` to `nil`. Finally, `Commit` returns the hash of the commitment of `app.cms` back to the underlying consensus engine. This hash is used as a reference in the header of the next block. @@ -504,10 +518,30 @@ The [`Info` ABCI message](https://github.com/cometbft/cometbft/blob/v0.37.x/spec ### Query -The [`Query` ABCI message](https://github.com/cometbft/cometbft/blob/v0.37.x/spec/abci/abci++_basic_concepts.md#info-methods) is used to serve queries received from the underlying consensus engine, including queries received via RPC like CometBFT RPC. It used to be the main entrypoint to build interfaces with the application, but with the introduction of [gRPC queries](../building-modules/04-query-services.md) in Cosmos SDK v0.40, its usage is more limited. The application must respect a few rules when implementing the `Query` method, which are outlined [here](https://github.com/cometbft/cometbft/blob/v0.37.x/spec/abci/abci++_app_requirements.md#query). +The [`Query` ABCI message](https://github.com/cometbft/cometbft/blob/v0.37.x/spec/abci/abci++_basic_concepts.md#info-methods) is used to serve queries received from the underlying consensus engine, including queries received via RPC like CometBFT RPC. It used to be the main entrypoint to build interfaces with the application, but with the introduction of [gRPC queries](../../build/building-modules/04-query-services.md) in Cosmos SDK v0.40, its usage is more limited. The application must respect a few rules when implementing the `Query` method, which are outlined [here](https://github.com/cometbft/cometbft/blob/v0.37.x/spec/abci/abci++_app_requirements.md#query). Each CometBFT `query` comes with a `path`, which is a `string` which denotes what to query. If the `path` matches a gRPC fully-qualified service method, then `BaseApp` will defer the query to the `grpcQueryRouter` and let it handle it like explained [above](#grpc-query-router). Otherwise, the `path` represents a query that is not (yet) handled by the gRPC router. `BaseApp` splits the `path` string with the `/` delimiter. By convention, the first element of the split string (`split[0]`) contains the category of `query` (`app`, `p2p`, `store` or `custom` ). The `BaseApp` implementation of the `Query(req abci.RequestQuery)` method is a simple dispatcher serving these 4 main categories of queries: * Application-related queries like querying the application's version, which are served via the `handleQueryApp` method. * Direct queries to the multistore, which are served by the `handlerQueryStore` method. These direct queries are different from custom queries which go through `app.queryRouter`, and are mainly used by third-party service provider like block explorers. * P2P queries, which are served via the `handleQueryP2P` method. These queries return either `app.addrPeerFilter` or `app.ipPeerFilter` that contain the list of peers filtered by address or IP respectively. These lists are first initialized via `options` in `BaseApp`'s [constructor](#constructor). + +### ExtendVote + +`ExtendVote` allows an application to extend a pre-commit vote with arbitrary data. This process does NOT have to be deterministic and the data returned can be unique to the validator process. + +In the Cosmos-SDK this is implemented as a NoOp: + +``` go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/baseapp/abci_utils.go#L274-L281 +``` + +### VerifyVoteExtension + +`VerifyVoteExtension` allows an application to verify that the data returned by `ExtendVote` is valid. This process MUST be deterministic. Moreover, the value of ResponseVerifyVoteExtension.status MUST exclusively depend on the parameters passed in the call to RequestVerifyVoteExtension, and the last committed Application state. + +In the Cosmos-SDK this is implemented as a NoOp: + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/baseapp/abci_utils.go#L282-L288 +``` diff --git a/docs/docs/core/01-transactions.md b/docs/docs/learn/advanced/01-transactions.md similarity index 60% rename from docs/docs/core/01-transactions.md rename to docs/docs/learn/advanced/01-transactions.md index e8446646ae8c..900d8b3fe182 100644 --- a/docs/docs/core/01-transactions.md +++ b/docs/docs/learn/advanced/01-transactions.md @@ -8,36 +8,34 @@ sidebar_position: 1 `Transactions` are objects created by end-users to trigger state changes in the application. ::: -:::note - -### Pre-requisite Readings +:::note Pre-requisite Readings -* [Anatomy of a Cosmos SDK Application](../basics/00-app-anatomy.md) +* [Anatomy of a Cosmos SDK Application](../beginner/00-app-anatomy.md) ::: ## Transactions -Transactions are comprised of metadata held in [contexts](./02-context.md) and [`sdk.Msg`s](../building-modules/02-messages-and-queries.md) that trigger state changes within a module through the module's Protobuf [`Msg` service](../building-modules/03-msg-services.md). +Transactions are comprised of metadata held in [contexts](./02-context.md) and [`sdk.Msg`s](../../build/building-modules/02-messages-and-queries.md) that trigger state changes within a module through the module's Protobuf [`Msg` service](../../build/building-modules/03-msg-services.md). -When users want to interact with an application and make state changes (e.g. sending coins), they create transactions. Each of a transaction's `sdk.Msg` must be signed using the private key associated with the appropriate account(s), before the transaction is broadcasted to the network. A transaction must then be included in a block, validated, and approved by the network through the consensus process. To read more about the lifecycle of a transaction, click [here](../basics/01-tx-lifecycle.md). +When users want to interact with an application and make state changes (e.g. sending coins), they create transactions. Each of a transaction's `sdk.Msg` must be signed using the private key associated with the appropriate account(s), before the transaction is broadcasted to the network. A transaction must then be included in a block, validated, and approved by the network through the consensus process. To read more about the lifecycle of a transaction, click [here](../beginner/01-tx-lifecycle.md). ## Type Definition Transaction objects are Cosmos SDK types that implement the `Tx` interface ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/tx_msg.go#L42-L50 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/tx_msg.go#L51-L56 ``` It contains the following methods: * **GetMsgs:** unwraps the transaction and returns a list of contained `sdk.Msg`s - one transaction may have one or multiple messages, which are defined by module developers. -* **ValidateBasic:** lightweight, [_stateless_](../basics/01-tx-lifecycle.md#types-of-checks) checks used by ABCI messages [`CheckTx`](./00-baseapp.md#checktx) and [`DeliverTx`](./00-baseapp.md#delivertx) to make sure transactions are not invalid. For example, the [`auth`](https://github.com/cosmos/cosmos-sdk/tree/main/x/auth) module's `ValidateBasic` function checks that its transactions are signed by the correct number of signers and that the fees do not exceed what the user's maximum. When [`runTx`](./00-baseapp.md#runtx) is checking a transaction created from the [`auth`](https://github.com/cosmos/cosmos-sdk/tree/main/x/auth/spec) module, it first runs `ValidateBasic` on each message, then runs the `auth` module AnteHandler which calls `ValidateBasic` for the transaction itself. +* **ValidateBasic:** lightweight, [_stateless_](../beginner/01-tx-lifecycle.md#types-of-checks) checks used by ABCI messages [`CheckTx`](./00-baseapp.md#checktx) and [`DeliverTx`](./00-baseapp.md#delivertx) to make sure transactions are not invalid. For example, the [`auth`](https://github.com/cosmos/cosmos-sdk/tree/main/x/auth) module's `ValidateBasic` function checks that its transactions are signed by the correct number of signers and that the fees do not exceed what the user's maximum. When [`runTx`](./00-baseapp.md#runtx) is checking a transaction created from the [`auth`](https://github.com/cosmos/cosmos-sdk/tree/main/x/auth/spec) module, it first runs `ValidateBasic` on each message, then runs the `auth` module AnteHandler which calls `ValidateBasic` for the transaction itself. - :::note - This function is different from the deprecated `sdk.Msg` [`ValidateBasic`](../basics/01-tx-lifecycle.md#ValidateBasic) methods, which was performing basic validity checks on messages only. - ::: +:::note +This function is different from the deprecated `sdk.Msg` [`ValidateBasic`](../beginner/01-tx-lifecycle.md#ValidateBasic) methods, which was performing basic validity checks on messages only. +::: As a developer, you should rarely manipulate `Tx` directly, as `Tx` is really an intermediate type used for transaction generation. Instead, developers should prefer the `TxBuilder` interface, which you can learn more about [below](#transaction-generation). @@ -50,13 +48,13 @@ Every message in a transaction must be signed by the addresses specified by its The most used implementation of the `Tx` interface is the Protobuf `Tx` message, which is used in `SIGN_MODE_DIRECT`: ```protobuf reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/tx/v1beta1/tx.proto#L13-L26 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/proto/cosmos/tx/v1beta1/tx.proto#L13-L26 ``` -Because Protobuf serialization is not deterministic, the Cosmos SDK uses an additional `TxRaw` type to denote the pinned bytes over which a transaction is signed. Any user can generate a valid `body` and `auth_info` for a transaction, and serialize these two messages using Protobuf. `TxRaw` then pins the user's exact binary representation of `body` and `auth_info`, called respectively `body_bytes` and `auth_info_bytes`. The document that is signed by all signers of the transaction is `SignDoc` (deterministically serialized using [ADR-027](../architecture/adr-027-deterministic-protobuf-serialization.md)): +Because Protobuf serialization is not deterministic, the Cosmos SDK uses an additional `TxRaw` type to denote the pinned bytes over which a transaction is signed. Any user can generate a valid `body` and `auth_info` for a transaction, and serialize these two messages using Protobuf. `TxRaw` then pins the user's exact binary representation of `body` and `auth_info`, called respectively `body_bytes` and `auth_info_bytes`. The document that is signed by all signers of the transaction is `SignDoc` (deterministically serialized using [ADR-027](../../build/architecture/adr-027-deterministic-protobuf-serialization.md)): ```protobuf reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/tx/v1beta1/tx.proto#L48-L65 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/proto/cosmos/tx/v1beta1/tx.proto#L48-L65 ``` Once signed by all signers, the `body_bytes`, `auth_info_bytes` and `signatures` are gathered into `TxRaw`, whose serialized bytes are broadcasted over the network. @@ -66,13 +64,13 @@ Once signed by all signers, the `body_bytes`, `auth_info_bytes` and `signatures` The legacy implementation of the `Tx` interface is the `StdTx` struct from `x/auth`: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/auth/migrations/legacytx/stdtx.go#L83-L93 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/auth/migrations/legacytx/stdtx.go#L83-L90 ``` The document signed by all signers is `StdSignDoc`: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/auth/migrations/legacytx/stdsign.go#L38-L52 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/auth/migrations/legacytx/stdsign.go#L31-L45 ``` which is encoded into bytes using Amino JSON. Once all signatures are gathered into `StdTx`, `StdTx` is serialized using Amino JSON, and these bytes are broadcasted over the network. @@ -87,21 +85,26 @@ The Cosmos SDK also provides a couple of other sign modes for particular use cas need to sign over the fees: ```protobuf reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/tx/v1beta1/tx.proto#L67-L97 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/proto/cosmos/tx/v1beta1/tx.proto#L67-L98 ``` The use case is a multi-signer transaction, where one of the signers is appointed to gather all signatures, broadcast the signature and pay for fees, and the others only care about the transaction body. This generally allows for a better multi-signing UX. If Alice, Bob and Charlie are part of a 3-signer transaction, then Alice and Bob can both use `SIGN_MODE_DIRECT_AUX` to sign over the `TxBody` and their own signer info (no need an additional step to gather other signers' ones, like in `SIGN_MODE_DIRECT`), without specifying a fee in their SignDoc. Charlie can then gather both signatures from Alice and Bob, and create the final transaction by appending a fee. Note that the fee payer of the transaction (in our case Charlie) must sign over the fees, so must use `SIGN_MODE_DIRECT` or `SIGN_MODE_LEGACY_AMINO_JSON`. -A concrete use case is implemented in [transaction tips](./14-tips.md): the tipper may use `SIGN_MODE_DIRECT_AUX` to specify a tip in the transaction, without signing over the actual transaction fees. Then, the fee payer appends fees inside the tipper's desired `TxBody`, and as an exchange for paying the fees and broadcasting the transaction, receives the tipper's transaction tips as payment. #### `SIGN_MODE_TEXTUAL` -`SIGN_MODE_TEXTUAL` is a new sign mode for delivering a better signing experience on hardware wallets, it is currently still under implementation. If you wish to learn more, please refer to [ADR-050](https://github.com/cosmos/cosmos-sdk/pull/10701). +`SIGN_MODE_TEXTUAL` is a new sign mode for delivering a better signing experience on hardware wallets and it is included in the v0.50 release. In this mode, the signer signs over the human-readable string representation of the transaction (CBOR) and makes all data being displayed easier to read. The data is formatted as screens, and each screen is meant to be displayed in its entirety even on small devices like the Ledger Nano. + +There are also _expert_ screens, which will only be displayed if the user has chosen that option in its hardware device. These screens contain things like account number, account sequence and the sign data hash. + +Data is formatted using a set of `ValueRenderer` which the SDK provides defaults for all the known messages and value types. Chain developers can also opt to implement their own `ValueRenderer` for a type/message if they'd like to display information differently. + +If you wish to learn more, please refer to [ADR-050](../../build/architecture/adr-050-sign-mode-textual.md). #### Custom Sign modes -There is the the opportunity to add your own custom sign mode to the Cosmos-SDK. While we can not accept the implementation of the sign mode to the repository, we can accept a pull request to add the custom signmode to the SignMode enum located [here](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/tx/signing/v1beta1/signing.proto#L17) +There is the opportunity to add your own custom sign mode to the Cosmos-SDK. While we can not accept the implementation of the sign mode to the repository, we can accept a pull request to add the custom signmode to the SignMode enum located [here](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/proto/cosmos/tx/signing/v1beta1/signing.proto#L17) ## Transaction Process @@ -119,12 +122,12 @@ The next paragraphs will describe each of these components, in this order. Module `sdk.Msg`s are not to be confused with [ABCI Messages](https://docs.cometbft.com/v0.37/spec/abci/) which define interactions between the CometBFT and application layers. ::: -**Messages** (or `sdk.Msg`s) are module-specific objects that trigger state transitions within the scope of the module they belong to. Module developers define the messages for their module by adding methods to the Protobuf [`Msg` service](../building-modules/03-msg-services.md), and also implement the corresponding `MsgServer`. +**Messages** (or `sdk.Msg`s) are module-specific objects that trigger state transitions within the scope of the module they belong to. Module developers define the messages for their module by adding methods to the Protobuf [`Msg` service](../../build/building-modules/03-msg-services.md), and also implement the corresponding `MsgServer`. -Each `sdk.Msg`s is related to exactly one Protobuf [`Msg` service](../building-modules/03-msg-services.md) RPC, defined inside each module's `tx.proto` file. A SDK app router automatically maps every `sdk.Msg` to a corresponding RPC. Protobuf generates a `MsgServer` interface for each module `Msg` service, and the module developer needs to implement this interface. +Each `sdk.Msg`s is related to exactly one Protobuf [`Msg` service](../../build/building-modules/03-msg-services.md) RPC, defined inside each module's `tx.proto` file. A SDK app router automatically maps every `sdk.Msg` to a corresponding RPC. Protobuf generates a `MsgServer` interface for each module `Msg` service, and the module developer needs to implement this interface. This design puts more responsibility on module developers, allowing application developers to reuse common functionalities without having to implement state transition logic repetitively. -To learn more about Protobuf `Msg` services and how to implement `MsgServer`, click [here](../building-modules/03-msg-services.md). +To learn more about Protobuf `Msg` services and how to implement `MsgServer`, click [here](../../build/building-modules/03-msg-services.md). While messages contain the information for state transition logic, a transaction's other metadata and relevant information are stored in the `TxBuilder` and `Context`. @@ -133,7 +136,7 @@ While messages contain the information for state transition logic, a transaction The `TxBuilder` interface contains data closely related with the generation of transactions, which an end-user can freely set to generate the desired transaction: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/client/tx_config.go#L33-L50 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/client/tx_config.go#L40-L53 ``` * `Msg`s, the array of [messages](#messages) included in the transaction. @@ -145,13 +148,13 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/client/tx_config.go#L33-L5 As there are currently two sign modes for signing transactions, there are also two implementations of `TxBuilder`: -* [wrapper](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/auth/tx/builder.go#L18-L34) for creating transactions for `SIGN_MODE_DIRECT`, -* [StdTxBuilder](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/auth/migrations/legacytx/stdtx_builder.go#L15-L21) for `SIGN_MODE_LEGACY_AMINO_JSON`. +* [wrapper](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/auth/tx/builder.go#L26-L43) for creating transactions for `SIGN_MODE_DIRECT`, +* [StdTxBuilder](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/auth/migrations/legacytx/stdtx_builder.go#L14-L17) for `SIGN_MODE_LEGACY_AMINO_JSON`. -However, the two implementation of `TxBuilder` should be hidden away from end-users, as they should prefer using the overarching `TxConfig` interface: +However, the two implementations of `TxBuilder` should be hidden away from end-users, as they should prefer using the overarching `TxConfig` interface: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/client/tx_config.go#L22-L31 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/client/tx_config.go#L24-L34 ``` `TxConfig` is an app-wide configuration for managing transactions. Most importantly, it holds the information about whether to sign each transaction with `SIGN_MODE_DIRECT` or `SIGN_MODE_LEGACY_AMINO_JSON`. By calling `txBuilder := txConfig.NewTxBuilder()`, a new `TxBuilder` will be created with the appropriate sign mode. @@ -172,9 +175,9 @@ Once the transaction bytes are generated, there are currently three ways of broa #### CLI -Application developers create entry points to the application by creating a [command-line interface](../core/07-cli.md), [gRPC and/or REST interface](../core/06-grpc_rest.md), typically found in the application's `./cmd` folder. These interfaces allow users to interact with the application through command-line. +Application developers create entry points to the application by creating a [command-line interface](./07-cli.md), [gRPC and/or REST interface](./06-grpc_rest.md), typically found in the application's `./cmd` folder. These interfaces allow users to interact with the application through command-line. -For the [command-line interface](../building-modules/09-module-interfaces.md#cli), module developers create subcommands to add as children to the application top-level transaction command `TxCmd`. CLI commands actually bundle all the steps of transaction processing into one simple command: creating messages, generating transactions and broadcasting. For concrete examples, see the [Interacting with a Node](../run-node/02-interact-node.md) section. An example transaction made using CLI looks like: +For the [command-line interface](../../build/building-modules/09-module-interfaces.md#cli), module developers create subcommands to add as children to the application top-level transaction command `TxCmd`. CLI commands actually bundle all the steps of transaction processing into one simple command: creating messages, generating transactions and broadcasting. For concrete examples, see the [Interacting with a Node](../../user/run-node/02-interact-node.md) section. An example transaction made using CLI looks like: ```bash simd tx send $MY_VALIDATOR_ADDRESS $RECIPIENT 1000stake @@ -182,21 +185,21 @@ simd tx send $MY_VALIDATOR_ADDRESS $RECIPIENT 1000stake #### gRPC -[gRPC](https://grpc.io) is the main component for the Cosmos SDK's RPC layer. Its principal usage is in the context of modules' [`Query` services](../building-modules/04-query-services.md). However, the Cosmos SDK also exposes a few other module-agnostic gRPC services, one of them being the `Tx` service: +[gRPC](https://grpc.io) is the main component for the Cosmos SDK's RPC layer. Its principal usage is in the context of modules' [`Query` services](../../build/building-modules/04-query-services.md). However, the Cosmos SDK also exposes a few other module-agnostic gRPC services, one of them being the `Tx` service: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/tx/v1beta1/service.proto +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/proto/cosmos/tx/v1beta1/service.proto ``` The `Tx` service exposes a handful of utility functions, such as simulating a transaction or querying a transaction, and also one method to broadcast transactions. -Examples of broadcasting and simulating a transaction are shown [here](../run-node/03-txs.md#programmatically-with-go). +Examples of broadcasting and simulating a transaction are shown [here](../../user/run-node/03-txs.md#programmatically-with-go). #### REST Each gRPC method has its corresponding REST endpoint, generated using [gRPC-gateway](https://github.com/grpc-ecosystem/grpc-gateway). Therefore, instead of using gRPC, you can also use HTTP to broadcast the same transaction, on the `POST /cosmos/tx/v1beta1/txs` endpoint. -An example can be seen [here](../run-node/03-txs.md#using-rest) +An example can be seen [here](../../user/run-node/03-txs.md#using-rest) #### CometBFT RPC diff --git a/docs/docs/core/02-context.md b/docs/docs/learn/advanced/02-context.md similarity index 72% rename from docs/docs/core/02-context.md rename to docs/docs/learn/advanced/02-context.md index 74e4a7a24f12..0056ec10cc45 100644 --- a/docs/docs/core/02-context.md +++ b/docs/docs/learn/advanced/02-context.md @@ -8,12 +8,10 @@ sidebar_position: 1 The `context` is a data structure intended to be passed from function to function that carries information about the current state of the application. It provides access to a branched storage (a safe branch of the entire state) as well as useful objects and information like `gasMeter`, `block height`, `consensus parameters` and more. ::: -:::note +:::note Pre-requisite Readings -### Pre-requisites Readings - -* [Anatomy of a Cosmos SDK Application](../basics/00-app-anatomy.md) -* [Lifecycle of a Transaction](../basics/01-tx-lifecycle.md) +* [Anatomy of a Cosmos SDK Application](../beginner/00-app-anatomy.md) +* [Lifecycle of a Transaction](../beginner/01-tx-lifecycle.md) ::: @@ -22,26 +20,29 @@ The `context` is a data structure intended to be passed from function to functio The Cosmos SDK `Context` is a custom data structure that contains Go's stdlib [`context`](https://pkg.go.dev/context) as its base, and has many additional types within its definition that are specific to the Cosmos SDK. The `Context` is integral to transaction processing in that it allows modules to easily access their respective [store](./04-store.md#base-layer-kvstores) in the [`multistore`](./04-store.md#multistore) and retrieve transactional context such as the block header and gas meter. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/context.go#L17-L44 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/context.go#L41-L67 ``` * **Base Context:** The base type is a Go [Context](https://pkg.go.dev/context), which is explained further in the [Go Context Package](#go-context-package) section below. * **Multistore:** Every application's `BaseApp` contains a [`CommitMultiStore`](./04-store.md#multistore) which is provided when a `Context` is created. Calling the `KVStore()` and `TransientStore()` methods allows modules to fetch their respective [`KVStore`](./04-store.md#base-layer-kvstores) using their unique `StoreKey`. * **Header:** The [header](https://docs.cometbft.com/v0.37/spec/core/data_structures#header) is a Blockchain type. It carries important information about the state of the blockchain, such as block height and proposer of the current block. -* **Header Hash:** The current block header hash, obtained during `abci.RequestBeginBlock`. +* **Header Hash:** The current block header hash, obtained during `abci.FinalizeBlock`. * **Chain ID:** The unique identification number of the blockchain a block pertains to. -* **Transaction Bytes:** The `[]byte` representation of a transaction being processed using the context. Every transaction is processed by various parts of the Cosmos SDK and consensus engine (e.g. CometBFT) throughout its [lifecycle](../basics/01-tx-lifecycle.md), some of which do not have any understanding of transaction types. Thus, transactions are marshaled into the generic `[]byte` type using some kind of [encoding format](./05-encoding.md) such as [Amino](./05-encoding.md). +* **Transaction Bytes:** The `[]byte` representation of a transaction being processed using the context. Every transaction is processed by various parts of the Cosmos SDK and consensus engine (e.g. CometBFT) throughout its [lifecycle](../beginner/01-tx-lifecycle.md), some of which do not have any understanding of transaction types. Thus, transactions are marshaled into the generic `[]byte` type using some kind of [encoding format](./05-encoding.md) such as [Amino](./05-encoding.md). * **Logger:** A `logger` from the CometBFT libraries. Learn more about logs [here](https://docs.cometbft.com/v0.37/core/configuration). Modules call this method to create their own unique module-specific logger. * **VoteInfo:** A list of the ABCI type [`VoteInfo`](https://docs.cometbft.com/master/spec/abci/abci.html#voteinfo), which includes the name of a validator and a boolean indicating whether they have signed the block. -* **Gas Meters:** Specifically, a [`gasMeter`](../basics/04-gas-fees.md#main-gas-meter) for the transaction currently being processed using the context and a [`blockGasMeter`](../basics/04-gas-fees.md#block-gas-meter) for the entire block it belongs to. Users specify how much in fees they wish to pay for the execution of their transaction; these gas meters keep track of how much [gas](../basics/04-gas-fees.md) has been used in the transaction or block so far. If the gas meter runs out, execution halts. +* **Gas Meters:** Specifically, a [`gasMeter`](../beginner/04-gas-fees.md#main-gas-meter) for the transaction currently being processed using the context and a [`blockGasMeter`](../beginner/04-gas-fees.md#block-gas-meter) for the entire block it belongs to. Users specify how much in fees they wish to pay for the execution of their transaction; these gas meters keep track of how much [gas](../beginner/04-gas-fees.md) has been used in the transaction or block so far. If the gas meter runs out, execution halts. * **CheckTx Mode:** A boolean value indicating whether a transaction should be processed in `CheckTx` or `DeliverTx` mode. -* **Min Gas Price:** The minimum [gas](../basics/04-gas-fees.md) price a node is willing to take in order to include a transaction in its block. This price is a local value configured by each node individually, and should therefore **not be used in any functions used in sequences leading to state-transitions**. +* **Min Gas Price:** The minimum [gas](../beginner/04-gas-fees.md) price a node is willing to take in order to include a transaction in its block. This price is a local value configured by each node individually, and should therefore **not be used in any functions used in sequences leading to state-transitions**. * **Consensus Params:** The ABCI type [Consensus Parameters](https://docs.cometbft.com/master/spec/abci/apps.html#consensus-parameters), which specify certain limits for the blockchain, such as maximum gas for a block. * **Event Manager:** The event manager allows any caller with access to a `Context` to emit [`Events`](./08-events.md). Modules may define module specific - `Events` by defining various `Types` and `Attributes` or use the common definitions found in `types/`. Clients can subscribe or query for these `Events`. These `Events` are collected throughout `DeliverTx`, `BeginBlock`, and `EndBlock` and are returned to CometBFT for indexing. For example: + `Events` by defining various `Types` and `Attributes` or use the common definitions found in `types/`. Clients can subscribe or query for these `Events`. These `Events` are collected throughout `FinalizeBlock` and are returned to CometBFT for indexing. * **Priority:** The transaction priority, only relevant in `CheckTx`. * **KV `GasConfig`:** Enables applications to set a custom `GasConfig` for the `KVStore`. * **Transient KV `GasConfig`:** Enables applications to set a custom `GasConfig` for the transiant `KVStore`. +* **StreamingManager:** The streamingManager field provides access to the streaming manager, which allows modules to subscribe to state changes emitted by the blockchain. The streaming manager is used by the state listening API, which is described in [ADR 038](https://docs.cosmos.network/main/architecture/adr-038-state-listening). +* **CometInfo:** A lightweight field that contains information about the current block, such as the block height, time, and hash. This information can be used for validating evidence, providing historical data, and enhancing the user experience. For further details see [here](https://github.com/cosmos/cosmos-sdk/blob/main/core/comet/service.go#L14). +* **HeaderInfo:** The `headerInfo` field contains information about the current block header, such as the chain ID, gas limit, and timestamp. For further details see [here](https://github.com/cosmos/cosmos-sdk/blob/main/core/header/service.go#L14). ## Go Context Package @@ -61,7 +62,7 @@ explicitly pass a context `ctx` as the first argument of a process. ## Store branching -The `Context` contains a `MultiStore`, which allows for branchinig and caching functionality using `CacheMultiStore` +The `Context` contains a `MultiStore`, which allows for branching and caching functionality using `CacheMultiStore` (queries in `CacheMultiStore` are cached to avoid future round trips). Each `KVStore` is branched in a safe and isolated ephemeral storage. Processes are free to write changes to the `CacheMultiStore`. If a state-transition sequence is performed without issue, the store branch can diff --git a/docs/docs/core/03-node.md b/docs/docs/learn/advanced/03-node.md similarity index 84% rename from docs/docs/core/03-node.md rename to docs/docs/learn/advanced/03-node.md index 67eb018caa52..47b691b32c6b 100644 --- a/docs/docs/core/03-node.md +++ b/docs/docs/learn/advanced/03-node.md @@ -8,11 +8,9 @@ sidebar_position: 1 The main endpoint of a Cosmos SDK application is the daemon client, otherwise known as the full-node client. The full-node runs the state-machine, starting from a genesis file. It connects to peers running the same client in order to receive and relay transactions, block proposals and signatures. The full-node is constituted of the application, defined with the Cosmos SDK, and of a consensus engine connected to the application via the ABCI. ::: -:::note +:::note Pre-requisite Readings -### Pre-requisite Readings - -* [Anatomy of an SDK application](../basics/00-app-anatomy.md) +* [Anatomy of an SDK application](../beginner/00-app-anatomy.md) ::: @@ -23,10 +21,10 @@ The full-node client of any Cosmos SDK application is built by running a `main` In general, developers will implement the `main.go` function with the following structure: * First, an [`encodingCodec`](./05-encoding.md) is instantiated for the application. -* Then, the `config` is retrieved and config parameters are set. This mainly involves setting the Bech32 prefixes for [addresses](../basics/03-accounts.md#addresses). +* Then, the `config` is retrieved and config parameters are set. This mainly involves setting the Bech32 prefixes for [addresses](../beginner/03-accounts.md#addresses). ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/config.go#L14-L29 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/config.go#L14-L29 ``` * Using [cobra](https://github.com/spf13/cobra), the root command of the full-node client is created. After that, all the custom commands of the application are added using the `AddCommand()` method of `rootCmd`. @@ -40,7 +38,7 @@ https://github.com/cometbft/cometbft/blob/v0.37.0/libs/cli/setup.go#L74-L78 See an example of `main` function from the `simapp` application, the Cosmos SDK's application for demo purposes: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/simd/main.go +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/simd/main.go ``` ## `start` command @@ -62,25 +60,25 @@ The flow of the `start` command is pretty straightforward. First, it retrieves t With the `db`, the `start` command creates a new instance of the application using an `appCreator` function: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/server/start.go#L220 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/server/start.go#L220 ``` Note that an `appCreator` is a function that fulfills the `AppCreator` signature: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/server/types/app.go#L64-L66 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/server/types/app.go#L68 ``` -In practice, the [constructor of the application](../basics/00-app-anatomy.md#constructor-function) is passed as the `appCreator`. +In practice, the [constructor of the application](../beginner/00-app-anatomy.md#constructor-function) is passed as the `appCreator`. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/simd/cmd/root.go#L254-L268 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/simd/cmd/root_v2.go#L294-L308 ``` Then, the instance of `app` is used to instantiate a new CometBFT node: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/server/start.go#L336-L348 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/server/start.go#L341-L378 ``` The CometBFT node can be created with `app` because the latter satisfies the [`abci.Application` interface](https://github.com/cometbft/cometbft/blob/v0.37.0/abci/types/application.go#L9-L35) (given that `app` extends [`baseapp`](./00-baseapp.md)). As part of the `node.New` method, CometBFT makes sure that the height of the application (i.e. number of blocks since genesis) is equal to the height of the CometBFT node. The difference between these two heights should always be negative or null. If it is strictly negative, `node.New` will replay blocks until the height of the application reaches the height of the CometBFT node. Finally, if the height of the application is `0`, the CometBFT node will call [`InitChain`](./00-baseapp.md#initchain) on the application to initialize the state from the genesis file. @@ -88,11 +86,11 @@ The CometBFT node can be created with `app` because the latter satisfies the [`a Once the CometBFT node is instantiated and in sync with the application, the node can be started: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/server/start.go#L350-L352 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/server/start.go#L350-L352 ``` Upon starting, the node will bootstrap its RPC and P2P server and start dialing peers. During handshake with its peers, if the node realizes they are ahead, it will query all the blocks sequentially in order to catch up. Then, it will wait for new block proposals and block signatures from validators in order to make progress. ## Other commands -To discover how to concretely run a node and interact with it, please refer to our [Running a Node, API and CLI](../run-node/01-run-node.md) guide. +To discover how to concretely run a node and interact with it, please refer to our [Running a Node, API and CLI](../../user/run-node/01-run-node.md) guide. diff --git a/docs/docs/core/04-store.md b/docs/docs/learn/advanced/04-store.md similarity index 79% rename from docs/docs/core/04-store.md rename to docs/docs/learn/advanced/04-store.md index 239cec484af5..1419b54ae90d 100644 --- a/docs/docs/core/04-store.md +++ b/docs/docs/learn/advanced/04-store.md @@ -8,17 +8,15 @@ sidebar_position: 1 A store is a data structure that holds the state of the application. ::: -:::note +:::note Pre-requisite Readings -### Pre-requisite Readings - -* [Anatomy of a Cosmos SDK application](../basics/00-app-anatomy.md) +* [Anatomy of a Cosmos SDK application](../beginner/00-app-anatomy.md) ::: ## Introduction to Cosmos SDK Stores -The Cosmos SDK comes with a large set of stores to persist the state of applications. By default, the main store of Cosmos SDK applications is a `multistore`, i.e. a store of stores. Developers can add any number of key-value stores to the multistore, depending on their application needs. The multistore exists to support the modularity of the Cosmos SDK, as it lets each module declare and manage their own subset of the state. Key-value stores in the multistore can only be accessed with a specific capability `key`, which is typically held in the [`keeper`](../building-modules/06-keeper.md) of the module that declared the store. +The Cosmos SDK comes with a large set of stores to persist the state of applications. By default, the main store of Cosmos SDK applications is a `multistore`, i.e. a store of stores. Developers can add any number of key-value stores to the multistore, depending on their application needs. The multistore exists to support the modularity of the Cosmos SDK, as it lets each module declare and manage their own subset of the state. Key-value stores in the multistore can only be accessed with a specific capability `key`, which is typically held in the [`keeper`](../../build/building-modules/06-keeper.md) of the module that declared the store. ```text +-----------------------------------------------------+ @@ -65,13 +63,13 @@ The Cosmos SDK comes with a large set of stores to persist the state of applicat At its very core, a Cosmos SDK `store` is an object that holds a `CacheWrapper` and has a `GetStoreType()` method: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/types/store.go#L15-L18 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/store/types/store.go#L15-L18 ``` The `GetStoreType` is a simple method that returns the type of store, whereas a `CacheWrapper` is a simple interface that implements store read caching and write branching through `Write` method: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/types/store.go#L260-L284 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/store/types/store.go#L287-L320 ``` Branching and cache is used ubiquitously in the Cosmos SDK and required to be implemented on every store type. A storage branch creates an isolated, ephemeral branch of a store that can be passed around and updated without affecting the main underlying store. This is used to trigger temporary state-transitions that may be reverted later should an error occur. Read more about it in [context](./02-context.md#Store-branching) @@ -81,13 +79,13 @@ Branching and cache is used ubiquitously in the Cosmos SDK and required to be im A commit store is a store that has the ability to commit changes made to the underlying tree or db. The Cosmos SDK differentiates simple stores from commit stores by extending the basic store interfaces with a `Committer`: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/types/store.go#L28-L33 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/store/types/store.go#L32-L37 ``` The `Committer` is an interface that defines methods to persist changes to disk: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/types/store.go#L20-L27 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/store/types/store.go#L20-L30 ``` The `CommitID` is a deterministic commit of the state tree. Its hash is returned to the underlying consensus engine and stored in the block header. Note that commit store interfaces exist for various purposes, one of which is to make sure not every object can commit the store. As part of the [object-capabilities model](./10-ocap.md) of the Cosmos SDK, only `baseapp` should have the ability to commit stores. For example, this is the reason why the `ctx.KVStore()` method by which modules typically access stores returns a `KVStore` and not a `CommitKVStore`. @@ -101,7 +99,7 @@ The Cosmos SDK comes with many types of stores, the most used being [`CommitMult Each Cosmos SDK application holds a multistore at its root to persist its state. The multistore is a store of `KVStores` that follows the `Multistore` interface: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/types/store.go#L101-L133 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/store/types/store.go#L123-L155 ``` If tracing is enabled, then branching the multistore will firstly wrap all the underlying `KVStore` in [`TraceKv.Store`](#tracekv-store). @@ -111,23 +109,23 @@ If tracing is enabled, then branching the multistore will firstly wrap all the u The main type of `Multistore` used in the Cosmos SDK is `CommitMultiStore`, which is an extension of the `Multistore` interface: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/types/store.go#L141-L200 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/store/types/store.go#L164-L227 ``` As for concrete implementation, the [`rootMulti.Store`] is the go-to implementation of the `CommitMultiStore` interface. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/rootmulti/store.go#L53-L77 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/store/rootmulti/store.go#L53-L77 ``` The `rootMulti.Store` is a base-layer multistore built around a `db` on top of which multiple `KVStores` can be mounted, and is the default multistore store used in [`baseapp`](./00-baseapp.md). ### CacheMultiStore -Whenever the `rootMulti.Store` needs to be branched, a [`cachemulti.Store`](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/cachemulti/store.go) is used. +Whenever the `rootMulti.Store` needs to be branched, a [`cachemulti.Store`](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/store/cachemulti/store.go) is used. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/cachemulti/store.go#L19-L33 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/store/cachemulti/store.go#L19-L33 ``` `cachemulti.Store` branches all substores (creates a virtual store for each substore) in its constructor and hold them in `Store.stores`. Moreover caches all read queries. `Store.GetKVStore()` returns the store from `Store.stores`, and `Store.Write()` recursively calls `CacheWrap.Write()` on all the substores. @@ -138,18 +136,18 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/cachemulti/store.go# A `KVStore` is a simple key-value store used to store and retrieve data. A `CommitKVStore` is a `KVStore` that also implements a `Committer`. By default, stores mounted in `baseapp`'s main `CommitMultiStore` are `CommitKVStore`s. The `KVStore` interface is primarily used to restrict modules from accessing the committer. -Individual `KVStore`s are used by modules to manage a subset of the global state. `KVStores` can be accessed by objects that hold a specific key. This `key` should only be exposed to the [`keeper`](../building-modules/06-keeper.md) of the module that defines the store. +Individual `KVStore`s are used by modules to manage a subset of the global state. `KVStores` can be accessed by objects that hold a specific key. This `key` should only be exposed to the [`keeper`](../../build/building-modules/06-keeper.md) of the module that defines the store. -`CommitKVStore`s are declared by proxy of their respective `key` and mounted on the application's [multistore](#multistore) in the [main application file](../basics/00-app-anatomy.md#core-application-file). In the same file, the `key` is also passed to the module's `keeper` that is responsible for managing the store. +`CommitKVStore`s are declared by proxy of their respective `key` and mounted on the application's [multistore](#multistore) in the [main application file](../beginner/00-app-anatomy.md#core-application-file). In the same file, the `key` is also passed to the module's `keeper` that is responsible for managing the store. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/types/store.go#L206-L239 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/store/types/store.go#L229-L266 ``` Apart from the traditional `Get` and `Set` methods, that a `KVStore` must implement via the `BasicKVStore` interface; a `KVStore` must provide an `Iterator(start, end)` method which returns an `Iterator` object. It is used to iterate over a range of keys, typically keys that share a common prefix. Below is an example from the bank's module keeper, used to iterate over all account balances: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/bank/keeper/view.go#L115-L132 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/bank/keeper/view.go#L125-L140 ``` ### `IAVL` Store @@ -157,7 +155,7 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/bank/keeper/view.go#L115 The default implementation of `KVStore` and `CommitKVStore` used in `baseapp` is the `iavl.Store`. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/iavl/store.go#L37-L41 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/store/iavl/store.go#L35-L40 ``` `iavl` stores are based around an [IAVL Tree](https://github.com/cosmos/iavl), a self-balancing binary tree which guarantees that: @@ -170,10 +168,10 @@ The documentation on the IAVL Tree is located [here](https://github.com/cosmos/i ### `DbAdapter` Store -`dbadapter.Store` is a adapter for `dbm.DB` making it fulfilling the `KVStore` interface. +`dbadapter.Store` is an adapter for `dbm.DB` making it fulfilling the `KVStore` interface. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/dbadapter/store.go#L13-L16 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/store/dbadapter/store.go#L13-L16 ``` `dbadapter.Store` embeds `dbm.DB`, meaning most of the `KVStore` interface functions are implemented. The other functions (mostly miscellaneous) are manually implemented. This store is primarily used within [Transient Stores](#transient-store) @@ -183,7 +181,7 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/dbadapter/store.go#L `Transient.Store` is a base-layer `KVStore` which is automatically discarded at the end of the block. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/transient/store.go#L16-L19 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/store/transient/store.go#L16-L19 ``` `Transient.Store` is a `dbadapter.Store` with a `dbm.NewMemDB()`. All `KVStore` methods are reused. When `Store.Commit()` is called, a new `dbadapter.Store` is assigned, discarding previous reference and making it garbage collected. @@ -191,13 +189,13 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/transient/store.go#L This type of store is useful to persist information that is only relevant per-block. One example would be to store parameter changes (i.e. a bool set to `true` if a parameter changed in a block). ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/params/types/subspace.go#L21-L31 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/params/types/subspace.go#L21-L31 ``` Transient stores are typically accessed via the [`context`](./02-context.md) via the `TransientStore()` method: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/context.go#L284-L287 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/context.go#L340-L343 ``` ## KVStore Wrappers @@ -207,7 +205,7 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/context.go#L284-L287 `cachekv.Store` is a wrapper `KVStore` which provides buffered writing / cached reading functionalities over the underlying `KVStore`. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/cachekv/store.go#L26-L36 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/store/cachekv/store.go#L26-L36 ``` This is the type used whenever an IAVL Store needs to be branched to create an isolated store (typically when we need to mutate a state that might be reverted later). @@ -226,29 +224,29 @@ This is the type used whenever an IAVL Store needs to be branched to create an i ### `GasKv` Store -Cosmos SDK applications use [`gas`](../basics/04-gas-fees.md) to track resources usage and prevent spam. [`GasKv.Store`](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/gaskv/store.go) is a `KVStore` wrapper that enables automatic gas consumption each time a read or write to the store is made. It is the solution of choice to track storage usage in Cosmos SDK applications. +Cosmos SDK applications use [`gas`](../beginner/04-gas-fees.md) to track resources usage and prevent spam. [`GasKv.Store`](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/store/gaskv/store.go) is a `KVStore` wrapper that enables automatic gas consumption each time a read or write to the store is made. It is the solution of choice to track storage usage in Cosmos SDK applications. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/gaskv/store.go#L11-L17 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/store/gaskv/store.go#L11-L17 ``` When methods of the parent `KVStore` are called, `GasKv.Store` automatically consumes appropriate amount of gas depending on the `Store.gasConfig`: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/types/gas.go#L219-L228 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/store/types/gas.go#L219-L228 ``` By default, all `KVStores` are wrapped in `GasKv.Stores` when retrieved. This is done in the `KVStore()` method of the [`context`](./02-context.md): ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/context.go#L279-L282 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/context.go#L335-L338 ``` In this case, the gas configuration set in the `context` is used. The gas configuration can be set using the `WithKVGasConfig` method of the `context`. Otherwise it uses the following default: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/types/gas.go#L230-L241 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/store/types/gas.go#L230-L241 ``` ### `TraceKv` Store @@ -256,7 +254,7 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/types/gas.go#L230-L2 `tracekv.Store` is a wrapper `KVStore` which provides operation tracing functionalities over the underlying `KVStore`. It is applied automatically by the Cosmos SDK on all `KVStore` if tracing is enabled on the parent `MultiStore`. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/tracekv/store.go#L20-L43 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/store/tracekv/store.go#L20-L43 ``` When each `KVStore` methods are called, `tracekv.Store` automatically logs `traceOperation` to the `Store.writer`. `traceOperation.Metadata` is filled with `Store.context` when it is not nil. `TraceContext` is a `map[string]interface{}`. @@ -266,21 +264,21 @@ When each `KVStore` methods are called, `tracekv.Store` automatically logs `trac `prefix.Store` is a wrapper `KVStore` which provides automatic key-prefixing functionalities over the underlying `KVStore`. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/prefix/store.go#L15-L21 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/store/prefix/store.go#L15-L21 ``` When `Store.{Get, Set}()` is called, the store forwards the call to its parent, with the key prefixed with the `Store.prefix`. -When `Store.Iterator()` is called, it does not simply prefix the `Store.prefix`, since it does not work as intended. In that case, some of the elements are traversed even they are not starting with the prefix. +When `Store.Iterator()` is called, it does not simply prefix the `Store.prefix`, since it does not work as intended. In that case, some of the elements are traversed even if they are not starting with the prefix. ### `ListenKv` Store `listenkv.Store` is a wrapper `KVStore` which provides state listening capabilities over the underlying `KVStore`. It is applied automatically by the Cosmos SDK on any `KVStore` whose `StoreKey` is specified during state streaming configuration. -Additional information about state streaming configuration can be found in the [store/streaming/README.md](https://github.com/cosmos/cosmos-sdk/tree/v0.47.0-rc1/store/streaming). +Additional information about state streaming configuration can be found in the [store/streaming/README.md](https://github.com/cosmos/cosmos-sdk/tree/v0.50.0-alpha.0/store/streaming). ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/listenkv/store.go#L11-L18 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/store/listenkv/store.go#L11-L18 ``` When `KVStore.Set` or `KVStore.Delete` methods are called, `listenkv.Store` automatically writes the operations to the set of `Store.listeners`. diff --git a/docs/docs/core/05-encoding.md b/docs/docs/learn/advanced/05-encoding.md similarity index 69% rename from docs/docs/core/05-encoding.md rename to docs/docs/learn/advanced/05-encoding.md index f1b0586cfe9f..707568fdbcdf 100644 --- a/docs/docs/core/05-encoding.md +++ b/docs/docs/learn/advanced/05-encoding.md @@ -8,11 +8,9 @@ sidebar_position: 1 While encoding in the Cosmos SDK used to be mainly handled by `go-amino` codec, the Cosmos SDK is moving towards using `gogoprotobuf` for both state and client-side encoding. ::: -:::note +:::note Pre-requisite Readings -### Pre-requisite Readings - -* [Anatomy of a Cosmos SDK application](../basics/00-app-anatomy.md) +* [Anatomy of a Cosmos SDK application](../beginner/00-app-anatomy.md) ::: @@ -44,58 +42,12 @@ In the `codec` package, there exists two core interfaces, `BinaryCodec` and `JSO where the former encapsulates the current Amino interface except it operates on types implementing the latter instead of generic `interface{}` types. -In addition, there exists two implementations of `Codec`. The first being -`AminoCodec`, where both binary and JSON serialization is handled via Amino. The -second being `ProtoCodec`, where both binary and JSON serialization is handled -via Protobuf. - -This means that modules may use Amino or Protobuf encoding, but the types must +The `ProtoCodec`, where both binary and JSON serialization is handled +via Protobuf. This means that modules may use Protobuf encoding, but the types must implement `ProtoMarshaler`. If modules wish to avoid implementing this interface -for their types, they may use an Amino codec directly. - -### Amino - -Every module uses an Amino codec to serialize types and interfaces. This codec typically -has types and interfaces registered in that module's domain only (e.g. messages), -but there are exceptions like `x/gov`. Each module exposes a `RegisterLegacyAminoCodec` function -that allows a user to provide a codec and have all the types registered. An application -will call this method for each necessary module. - -Where there is no protobuf-based type definition for a module (see below), Amino -is used to encode and decode raw wire bytes to the concrete type or interface: - -```go -bz := keeper.cdc.MustMarshal(typeOrInterface) -keeper.cdc.MustUnmarshal(bz, &typeOrInterface) -``` - -Note, there are length-prefixed variants of the above functionality and this is -typically used for when the data needs to be streamed or grouped together -(e.g. `ResponseDeliverTx.Data`) - -#### Authz authorizations and Gov/Group proposals - -Since authz's `MsgExec` and `MsgGrant` message types, as well as gov's and group's `MsgSubmitProposal`, can contain different messages instances, it is important that developers -add the following code inside the `init` method of their module's `codec.go` file: - -```go -import ( - authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" - govcodec "github.com/cosmos/cosmos-sdk/x/gov/codec" - groupcodec "github.com/cosmos/cosmos-sdk/x/group/codec" -) +for their types, this is autogenerated via [buf](https://buf.build/) -init() { - // Register all Amino interfaces and concrete types on the authz and gov Amino codec so that this can later be - // used to properly serialize MsgGrant, MsgExec and MsgSubmitProposal instances - RegisterLegacyAminoCodec(authzcodec.Amino) - RegisterLegacyAminoCodec(govcodec.Amino) - RegisterLegacyAminoCodec(groupcodec.Amino) -} -``` - -This will allow the `x/authz` module to properly serialize and de-serializes `MsgExec` instances using Amino, -which is required when signing this kind of messages using a Ledger. +If modules use [Collections](../../build/packages/02-collections.md) or [ORM](../../build/packages/03-orm.md), encoding and decoding are handled, marshal and unmarshal should not be handled manually unless for specific cases identified by the developer. ### Gogoproto @@ -126,24 +78,24 @@ the consensus engine accepts only transactions in the form of raw bytes. * The `TxDecoder` object performs the decoding. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/tx_msg.go#L76-L80 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/tx_msg.go#L91-L95 ``` -A standard implementation of both these objects can be found in the [`auth/tx` module](../modules/auth/tx/README.md): +A standard implementation of both these objects can be found in the [`auth/tx` module](../../build/modules/auth/2-tx.md): ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/auth/tx/decoder.go +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/auth/tx/decoder.go ``` ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/auth/tx/encoder.go +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/auth/tx/encoder.go ``` -See [ADR-020](../architecture/adr-020-protobuf-transaction-encoding.md) for details of how a transaction is encoded. +See [ADR-020](../../architecture/adr-020-protobuf-transaction-encoding.md) for details of how a transaction is encoded. ### Interface Encoding and Usage of `Any` -The Protobuf DSL is strongly typed, which can make inserting variable-typed fields difficult. Imagine we want to create a `Profile` protobuf message that serves as a wrapper over [an account](../basics/03-accounts.md): +The Protobuf DSL is strongly typed, which can make inserting variable-typed fields difficult. Imagine we want to create a `Profile` protobuf message that serves as a wrapper over [an account](../beginner/03-accounts.md): ```protobuf message Profile { @@ -154,13 +106,13 @@ message Profile { } ``` -In this `Profile` example, we hardcoded `account` as a `BaseAccount`. However, there are several other types of [user accounts related to vesting](../modules/auth/1-vesting.md), such as `BaseVestingAccount` or `ContinuousVestingAccount`. All of these accounts are different, but they all implement the `AccountI` interface. How would you create a `Profile` that allows all these types of accounts with an `account` field that accepts an `AccountI` interface? +In this `Profile` example, we hardcoded `account` as a `BaseAccount`. However, there are several other types of [user accounts related to vesting](../../build/modules/auth/1-vesting.md), such as `BaseVestingAccount` or `ContinuousVestingAccount`. All of these accounts are different, but they all implement the `AccountI` interface. How would you create a `Profile` that allows all these types of accounts with an `account` field that accepts an `AccountI` interface? ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/auth/types/account.go#L307-L330 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/account.go#L15-L32 ``` -In [ADR-019](../architecture/adr-019-protobuf-state-encoding.md), it has been decided to use [`Any`](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto)s to encode interfaces in protobuf. An `Any` contains an arbitrary serialized message as bytes, along with a URL that acts as a globally unique identifier for and resolves to that message's type. This strategy allows us to pack arbitrary Go types inside protobuf messages. Our new `Profile` then looks like: +In [ADR-019](../../architecture/adr-019-protobuf-state-encoding.md), it has been decided to use [`Any`](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto)s to encode interfaces in protobuf. An `Any` contains an arbitrary serialized message as bytes, along with a URL that acts as a globally unique identifier for and resolves to that message's type. This strategy allows us to pack arbitrary Go types inside protobuf messages. Our new `Profile` then looks like: ```protobuf message Profile { @@ -196,7 +148,7 @@ bz, err := cdc.Marshal(profile) jsonBz, err := cdc.MarshalJSON(profile) ``` -To summarize, to encode an interface, you must 1/ pack the interface into an `Any` and 2/ marshal the `Any`. For convenience, the Cosmos SDK provides a `MarshalInterface` method to bundle these two steps. Have a look at [a real-life example in the x/auth module](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/auth/keeper/keeper.go#L240-L243). +To summarize, to encode an interface, you must 1/ pack the interface into an `Any` and 2/ marshal the `Any`. For convenience, the Cosmos SDK provides a `MarshalInterface` method to bundle these two steps. Have a look at [a real-life example in the x/auth module](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/auth/keeper/keeper.go#L240-L243). The reverse operation of retrieving the concrete Go type from inside an `Any`, called "unpacking", is done with the `GetCachedValue()` on `Any`. @@ -210,7 +162,7 @@ err := cdc.Unmarshal(profilebz, &myProfile) fmt.Printf("%T\n", myProfile.Account) // Prints "Any" fmt.Printf("%T\n", myProfile.Account.GetCachedValue()) // Prints "BaseAccount", "ContinuousVestingAccount" or whatever was initially packed in the Any. -// Get the address of the accountt. +// Get the address of the account. accAddr := myProfile.Account.GetCachedValue().(AccountI).GetAddress() ``` @@ -229,7 +181,7 @@ func (p *Profile) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { The `UnpackInterfaces` gets called recursively on all structs implementing this method, to allow all `Any`s to have their `GetCachedValue()` correctly populated. -For more information about interface encoding, and especially on `UnpackInterfaces` and how the `Any`'s `type_url` gets resolved using the `InterfaceRegistry`, please refer to [ADR-019](../architecture/adr-019-protobuf-state-encoding.md). +For more information about interface encoding, and especially on `UnpackInterfaces` and how the `Any`'s `type_url` gets resolved using the `InterfaceRegistry`, please refer to [ADR-019](../../architecture/adr-019-protobuf-state-encoding.md). #### `Any` Encoding in the Cosmos SDK @@ -237,15 +189,15 @@ The above `Profile` example is a fictive example used for educational purposes. * the `cryptotypes.PubKey` interface for encoding different types of public keys, * the `sdk.Msg` interface for encoding different `Msg`s in a transaction, -* the `AccountI` interface for encodinig different types of accounts (similar to the above example) in the x/auth query responses, -* the `Evidencei` interface for encoding different types of evidences in the x/evidence module, +* the `AccountI` interface for encoding different types of accounts (similar to the above example) in the x/auth query responses, +* the `EvidenceI` interface for encoding different types of evidences in the x/evidence module, * the `AuthorizationI` interface for encoding different types of x/authz authorizations, -* the [`Validator`](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/staking/types/staking.pb.go#L340-L377) struct that contains information about a validator. +* the [`Validator`](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/staking/types/staking.pb.go#L340-L377) struct that contains information about a validator. A real-life example of encoding the pubkey as `Any` inside the Validator struct in x/staking is shown in the following example: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/staking/types/validator.go#L41-L64 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/staking/types/validator.go#L41-L64 ``` #### `Any`'s TypeURL @@ -253,11 +205,13 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/staking/types/validator. When packing a protobuf message inside an `Any`, the message's type is uniquely defined by its type URL, which is the message's fully qualified name prefixed by a `/` (slash) character. In some implementations of `Any`, like the gogoproto one, there's generally [a resolvable prefix, e.g. `type.googleapis.com`](https://github.com/gogo/protobuf/blob/b03c65ea87cdc3521ede29f62fe3ce239267c1bc/protobuf/google/protobuf/any.proto#L87-L91). However, in the Cosmos SDK, we made the decision to not include such prefix, to have shorter type URLs. The Cosmos SDK's own `Any` implementation can be found in `github.com/cosmos/cosmos-sdk/codec/types`. The Cosmos SDK is also switching away from gogoproto to the official `google.golang.org/protobuf` (known as the Protobuf API v2). Its default `Any` implementation also contains the [`type.googleapis.com`](https://github.com/protocolbuffers/protobuf-go/blob/v1.28.1/types/known/anypb/any.pb.go#L266) prefix. To maintain compatibility with the SDK, the following methods from `"google.golang.org/protobuf/types/known/anypb"` should not be used: + * `anypb.New` * `anypb.MarshalFrom` * `anypb.Any#MarshalFrom` Instead, the Cosmos SDK provides helper functions in `"github.com/cosmos/cosmos-proto/anyutil"`, which create an official `anypb.Any` without inserting the prefixes: + * `anyutil.New` * `anyutil.MarshalFrom` @@ -285,14 +239,14 @@ import ( Protobuf types can be defined to encode: * state -* [`Msg`s](../building-modules/02-messages-and-queries.md#messages) -* [Query services](../building-modules/04-query-services.md) -* [genesis](../building-modules/08-genesis.md) +* [`Msg`s](../../build/building-modules/02-messages-and-queries.md#messages) +* [Query services](../../build/building-modules/04-query-services.md) +* [genesis](../../build/building-modules/08-genesis.md) #### Naming and conventions We encourage developers to follow industry guidelines: [Protocol Buffers style guide](https://developers.google.com/protocol-buffers/docs/style) -and [Buf](https://buf.build/docs/style-guide), see more details in [ADR 023](../architecture/adr-023-protobuf-naming.md) +and [Buf](https://buf.build/docs/style-guide), see more details in [ADR 023](../../architecture/adr-023-protobuf-naming.md) ### How to update modules to protobuf encoding @@ -319,7 +273,7 @@ The Cosmos SDK `codec.Codec` interface provides support methods `MarshalInterfac Module should register interfaces using `InterfaceRegistry` which provides a mechanism for registering interfaces: `RegisterInterface(protoName string, iface interface{}, impls ...proto.Message)` and implementations: `RegisterImplementations(iface interface{}, impls ...proto.Message)` that can be safely unpacked from Any, similarly to type registration with Amino: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/codec/types/interface_registry.go#L24-L57 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/codec/types/interface_registry.go#L28-L75 ``` In addition, an `UnpackInterfaces` phase should be introduced to deserialization to unpack interfaces before they're needed. Protobuf types that contain a protobuf `Any` either directly or via one of their members should implement the `UnpackInterfacesMessage` interface: @@ -329,20 +283,3 @@ type UnpackInterfacesMessage interface { UnpackInterfaces(InterfaceUnpacker) error } ``` - -### Custom Stringer - -Using `option (gogoproto.goproto_stringer) = false;` in a proto message definition leads to unexpected behaviour, like returning wrong output or having missing fields in the output. -For that reason a proto Message's `String()` must not be customized, and the `goproto_stringer` option must be avoided. - -A correct YAML output can be obtained through ProtoJSON, using the `JSONToYAML` function: - -```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/codec/yaml.go#L8-L20 -``` - -For example: - -```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/auth/types/account.go#L141-L151 -``` diff --git a/docs/docs/core/06-grpc_rest.md b/docs/docs/learn/advanced/06-grpc_rest.md similarity index 80% rename from docs/docs/core/06-grpc_rest.md rename to docs/docs/learn/advanced/06-grpc_rest.md index 51ca4db40ad7..ee3af79e5d34 100644 --- a/docs/docs/core/06-grpc_rest.md +++ b/docs/docs/learn/advanced/06-grpc_rest.md @@ -20,17 +20,21 @@ Each node exposes the following endpoints for users to interact with a node, eac The node also exposes some other endpoints, such as the CometBFT P2P endpoint, or the [Prometheus endpoint](https://docs.cometbft.com/v0.37/core/metrics), which are not directly related to the Cosmos SDK. Please refer to the [CometBFT documentation](https://docs.cometbft.com/v0.37/core/configuration) for more information about these endpoints. ::: +:::note +All endpoints are defaulted to localhost and must be modified to be exposed to the public internet. +::: + ## gRPC Server In the Cosmos SDK, Protobuf is the main [encoding](./encoding) library. This brings a wide range of Protobuf-based tools that can be plugged into the Cosmos SDK. One such tool is [gRPC](https://grpc.io), a modern open-source high performance RPC framework that has decent client support in several languages. -Each module exposes a [Protobuf `Query` service](../building-modules/02-messages-and-queries.md#queries) that defines state queries. The `Query` services and a transaction service used to broadcast transactions are hooked up to the gRPC server via the following function inside the application: +Each module exposes a [Protobuf `Query` service](../../build/building-modules/02-messages-and-queries.md#queries) that defines state queries. The `Query` services and a transaction service used to broadcast transactions are hooked up to the gRPC server via the following function inside the application: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/server/types/app.go#L46-L48 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/server/types/app.go#L46-L48 ``` -Note: It is not possible to expose any [Protobuf `Msg` service](../building-modules/02-messages-and-queries.md#messages) endpoints via gRPC. Transactions must be generated and signed using the CLI or programmatically before they can be broadcasted using gRPC. See [Generating, Signing, and Broadcasting Transactions](../run-node/03-txs.md) for more information. +Note: It is not possible to expose any [Protobuf `Msg` service](../../build/building-modules/02-messages-and-queries.md#messages) endpoints via gRPC. Transactions must be generated and signed using the CLI or programmatically before they can be broadcasted using gRPC. See [Generating, Signing, and Broadcasting Transactions](../../user/run-node/03-txs.md) for more information. The `grpc.Server` is a concrete gRPC server, which spawns and serves all gRPC query requests and a broadcast transaction request. This server can be configured inside `~/.simapp/config/app.toml`: @@ -41,7 +45,7 @@ The `grpc.Server` is a concrete gRPC server, which spawns and serves all gRPC qu `~/.simapp` is the directory where the node's configuration and databases are stored. By default, it's set to `~/.{app_name}`. ::: -Once the gRPC server is started, you can send requests to it using a gRPC client. Some examples are given in our [Interact with the Node](../run-node/02-interact-node.md#using-grpc) tutorial. +Once the gRPC server is started, you can send requests to it using a gRPC client. Some examples are given in our [Interact with the Node](../../user/run-node/02-interact-node.md#using-grpc) tutorial. An overview of all available gRPC endpoints shipped with the Cosmos SDK is [Protobuf documentation](https://buf.build/cosmos/cosmos-sdk). @@ -62,7 +66,7 @@ If, for various reasons, you cannot use gRPC (for example, you are building a we [gRPC-gateway](https://grpc-ecosystem.github.io/grpc-gateway/) is a tool to expose gRPC endpoints as REST endpoints. For each gRPC endpoint defined in a Protobuf `Query` service, the Cosmos SDK offers a REST equivalent. For instance, querying a balance could be done via the `/cosmos.bank.v1beta1.QueryAllBalances` gRPC endpoint, or alternatively via the gRPC-gateway `"/cosmos/bank/v1beta1/balances/{address}"` REST endpoint: both will return the same result. For each RPC method defined in a Protobuf `Query` service, the corresponding REST endpoint is defined as an option: ```protobuf reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/bank/v1beta1/query.proto#L23-L30 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/proto/cosmos/bank/v1beta1/query.proto#L23-L30 ``` For application developers, gRPC-gateway REST routes needs to be wired up to the REST server, this is done by calling the `RegisterGRPCGatewayRoutes` function on the ModuleManager. @@ -71,14 +75,14 @@ For application developers, gRPC-gateway REST routes needs to be wired up to the A [Swagger](https://swagger.io/) (or OpenAPIv2) specification file is exposed under the `/swagger` route on the API server. Swagger is an open specification describing the API endpoints a server serves, including description, input arguments, return types and much more about each endpoint. -Enabling the `/swagger` endpoint is configurable inside `~/.simapp/config/app.toml` via the `api.swagger` field, which is set to true by default. +Enabling the `/swagger` endpoint is configurable inside `~/.simapp/config/app.toml` via the `api.swagger` field, which is set to false by default. For application developers, you may want to generate your own Swagger definitions based on your custom modules. -The Cosmos SDK's [Swagger generation script](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/scripts/protoc-swagger-gen.sh) is a good place to start. +The Cosmos SDK's [Swagger generation script](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/scripts/protoc-swagger-gen.sh) is a good place to start. ## CometBFT RPC -Independently from the Cosmos SDK, CometBFT also exposes a RPC server. This RPC server can be configured by tuning parameters under the `rpc` table in the `~/.simapp/config/config.toml`, the default listening address is `tcp://localhost:26657`. An OpenAPI specification of all CometBFT RPC endpoints is available [here](https://docs.cometbft.com/master/rpc/). +Independently from the Cosmos SDK, CometBFT also exposes a RPC server. This RPC server can be configured by tuning parameters under the `rpc` table in the `~/.simapp/config/config.toml`, the default listening address is `tcp://localhost:26657`. An OpenAPI specification of all CometBFT RPC endpoints is available [here](https://docs.cometbft.com/main/rpc/). Some CometBFT RPC endpoints are directly related to the Cosmos SDK: @@ -86,10 +90,11 @@ Some CometBFT RPC endpoints are directly related to the Cosmos SDK: * any Protobuf fully-qualified service method, such as `/cosmos.bank.v1beta1.Query/AllBalances`. The `data` field should then include the method's request parameter(s) encoded as bytes using Protobuf. * `/app/simulate`: this will simulate a transaction, and return some information such as gas used. * `/app/version`: this will return the application's version. - * `/store/{path}`: this will query the store directly. + * `/store/{storeName}/key`: this will directly query the named store for data associated with the key represented in the `data` parameter. + * `/store/{storeName}/subspace`: this will directly query the named store for key/value pairs in which the key has the value of the `data` parameter as a prefix. * `/p2p/filter/addr/{port}`: this will return a filtered list of the node's P2P peers by address port. * `/p2p/filter/id/{id}`: this will return a filtered list of the node's P2P peers by ID. -* `/broadcast_tx_{aync,async,commit}`: these 3 endpoint will broadcast a transaction to other peers. CLI, gRPC and REST expose [a way to broadcast transations](./01-transactions.md#broadcasting-the-transaction), but they all use these 3 CometBFT RPCs under the hood. +* `/broadcast_tx_{sync,async,commit}`: these 3 endpoints will broadcast a transaction to other peers. CLI, gRPC and REST expose [a way to broadcast transactions](./01-transactions.md#broadcasting-the-transaction), but they all use these 3 CometBFT RPCs under the hood. ## Comparison Table diff --git a/docs/docs/core/07-cli.md b/docs/docs/learn/advanced/07-cli.md similarity index 54% rename from docs/docs/core/07-cli.md rename to docs/docs/learn/advanced/07-cli.md index ae3592581279..1420f2e1abc4 100644 --- a/docs/docs/core/07-cli.md +++ b/docs/docs/learn/advanced/07-cli.md @@ -5,7 +5,7 @@ sidebar_position: 1 # Command-Line Interface :::note Synopsis -This document describes how command-line interface (CLI) works on a high-level, for an [**application**](../basics/00-app-anatomy.md). A separate document for implementing a CLI for a Cosmos SDK [**module**](../building-modules/01-intro.md) can be found [here](../building-modules/09-module-interfaces.md#cli). +This document describes how command-line interface (CLI) works on a high-level, for an [**application**](../beginner/00-app-anatomy.md). A separate document for implementing a CLI for a Cosmos SDK [**module**](../../build/building-modules/00-intro.md) can be found [here](../../build/building-modules/09-module-interfaces.md#cli). ::: ## Command-Line Interface @@ -24,12 +24,12 @@ The first four strings specify the command: * The root command for the entire application `simd`. * The subcommand `tx`, which contains all commands that let users create transactions. -* The subcommand `bank` to indicate which module to route the command to ([`x/bank`](../modules/bank/README.md) module in this case). +* The subcommand `bank` to indicate which module to route the command to ([`x/bank`](../../build/modules/bank/README.md) module in this case). * The type of transaction `send`. The next two strings are arguments: the `from_address` the user wishes to send from, the `to_address` of the recipient, and the `amount` they want to send. Finally, the last few strings of the command are optional flags to indicate how much the user is willing to pay in fees (calculated using the amount of gas used to execute the transaction and the gas prices provided by the user). -The CLI interacts with a [node](../core/03-node.md) to handle this command. The interface itself is defined in a `main.go` file. +The CLI interacts with a [node](./03-node.md) to handle this command. The interface itself is defined in a `main.go` file. ### Building the CLI @@ -37,13 +37,13 @@ The `main.go` file needs to have a `main()` function that creates a root command * **setting configurations** by reading in configuration files (e.g. the Cosmos SDK config file). * **adding any flags** to it, such as `--chain-id`. -* **instantiating the `codec`** by calling the application's `MakeCodec()` function (called `MakeTestEncodingConfig` in `simapp`). The [`codec`](../core/05-encoding.md) is used to encode and decode data structures for the application - stores can only persist `[]byte`s so the developer must define a serialization format for their data structures or use the default, Protobuf. +* **instantiating the `codec`** by injecting the application codecs. The [`codec`](./05-encoding.md) is used to encode and decode data structures for the application - stores can only persist `[]byte`s so the developer must define a serialization format for their data structures or use the default, Protobuf. * **adding subcommand** for all the possible user interactions, including [transaction commands](#transaction-commands) and [query commands](#query-commands). The `main()` function finally creates an executor and [execute](https://pkg.go.dev/github.com/spf13/cobra#Command.Execute) the root command. See an example of `main()` function from the `simapp` application: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/simd/main.go#L12-L24 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/simd/main.go#L12-L24 ``` The rest of the document will detail what needs to be implemented for each step and include smaller portions of code from the `simapp` CLI files. @@ -56,88 +56,104 @@ Every application CLI first constructs a root command, then adds functionality b The root command (called `rootCmd`) is what the user first types into the command line to indicate which application they wish to interact with. The string used to invoke the command (the "Use" field) is typically the name of the application suffixed with `-d`, e.g. `simd` or `gaiad`. The root command typically includes the following commands to support basic functionality in the application. -* **Status** command from the Cosmos SDK rpc client tools, which prints information about the status of the connected [`Node`](../core/03-node.md). The Status of a node includes `NodeInfo`,`SyncInfo` and `ValidatorInfo`. -* **Keys** [commands](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/client/keys) from the Cosmos SDK client tools, which includes a collection of subcommands for using the key functions in the Cosmos SDK crypto tools, including adding a new key and saving it to the keyring, listing all public keys stored in the keyring, and deleting a key. For example, users can type `simd keys add ` to add a new key and save an encrypted copy to the keyring, using the flag `--recover` to recover a private key from a seed phrase or the flag `--multisig` to group multiple keys together to create a multisig key. For full details on the `add` key command, see the code [here](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/client/keys/add.go). For more details about usage of `--keyring-backend` for storage of key credentials look at the [keyring docs](../run-node/00-keyring.md). +* **Status** command from the Cosmos SDK rpc client tools, which prints information about the status of the connected [`Node`](./03-node.md). The Status of a node includes `NodeInfo`,`SyncInfo` and `ValidatorInfo`. +* **Keys** [commands](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/client/keys) from the Cosmos SDK client tools, which includes a collection of subcommands for using the key functions in the Cosmos SDK crypto tools, including adding a new key and saving it to the keyring, listing all public keys stored in the keyring, and deleting a key. For example, users can type `simd keys add ` to add a new key and save an encrypted copy to the keyring, using the flag `--recover` to recover a private key from a seed phrase or the flag `--multisig` to group multiple keys together to create a multisig key. For full details on the `add` key command, see the code [here](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/client/keys/add.go). For more details about usage of `--keyring-backend` for storage of key credentials look at the [keyring docs](../../user/run-node/00-keyring.md). * **Server** commands from the Cosmos SDK server package. These commands are responsible for providing the mechanisms necessary to start an ABCI CometBFT application and provides the CLI framework (based on [cobra](https://github.com/spf13/cobra)) necessary to fully bootstrap an application. The package exposes two core functions: `StartCmd` and `ExportCmd` which creates commands to start the application and export state respectively. -Learn more [here](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/server). +Learn more [here](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/server). * [**Transaction**](#transaction-commands) commands. * [**Query**](#query-commands) commands. Next is an example `rootCmd` function from the `simapp` application. It instantiates the root command, adds a [*persistent* flag](#flags) and `PreRun` function to be run before every execution, and adds all of the necessary subcommands. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/simd/cmd/root.go#L38-L92 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/simd/cmd/root_v2.go#L47-L130 ``` +:::tip +Use the `EnhanceRootCommand()` from the AutoCLI options to automatically add auto-generated commands from the modules to the root command. +Additionnally it adds all manually defined modules commands (`tx` and `query`) as well. +Read more about [AutoCLI](https://docs.cosmos.network/main/core/autocli) in its dedicated section. +::: + `rootCmd` has a function called `initAppConfig()` which is useful for setting the application's custom configs. By default app uses CometBFT app config template from Cosmos SDK, which can be over-written via `initAppConfig()`. Here's an example code to override default `app.toml` template. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/simd/cmd/root.go#L106-L161 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/simd/cmd/root_v2.go#L144-L199 ``` -The `initAppConfig()` also allows overriding the default Cosmos SDK's [server config](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/server/config/config.go#L235). One example is the `min-gas-prices` config, which defines the minimum gas prices a validator is willing to accept for processing a transaction. By default, the Cosmos SDK sets this parameter to `""` (empty string), which forces all validators to tweak their own `app.toml` and set a non-empty value, or else the node will halt on startup. This might not be the best UX for validators, so the chain developer can set a default `app.toml` value for validators inside this `initAppConfig()` function. +The `initAppConfig()` also allows overriding the default Cosmos SDK's [server config](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/server/config/config.go#L235). One example is the `min-gas-prices` config, which defines the minimum gas prices a validator is willing to accept for processing a transaction. By default, the Cosmos SDK sets this parameter to `""` (empty string), which forces all validators to tweak their own `app.toml` and set a non-empty value, or else the node will halt on startup. This might not be the best UX for validators, so the chain developer can set a default `app.toml` value for validators inside this `initAppConfig()` function. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/simd/cmd/root.go#L126-L142 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/simd/cmd/root_v2.go#L164-L180 ``` The root-level `status` and `keys` subcommands are common across most applications and do not interact with application state. The bulk of an application's functionality - what users can actually *do* with it - is enabled by its `tx` and `query` commands. ### Transaction Commands -[Transactions](./01-transactions.md) are objects wrapping [`Msg`s](../building-modules/02-messages-and-queries.md#messages) that trigger state changes. To enable the creation of transactions using the CLI interface, a function `txCommand` is generally added to the `rootCmd`: +[Transactions](./01-transactions.md) are objects wrapping [`Msg`s](../../build/building-modules/02-messages-and-queries.md#messages) that trigger state changes. To enable the creation of transactions using the CLI interface, a function `txCommand` is generally added to the `rootCmd`: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/simd/cmd/root.go#L177-L184 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/simd/cmd/root_v2.go#L222-L229 ``` This `txCommand` function adds all the transaction available to end-users for the application. This typically includes: -* **Sign command** from the [`auth`](../modules/auth/README.md) module that signs messages in a transaction. To enable multisig, add the `auth` module's `MultiSign` command. Since every transaction requires some sort of signature in order to be valid, the signing command is necessary for every application. +* **Sign command** from the [`auth`](../../build/modules/auth/README.md) module that signs messages in a transaction. To enable multisig, add the `auth` module's `MultiSign` command. Since every transaction requires some sort of signature in order to be valid, the signing command is necessary for every application. * **Broadcast command** from the Cosmos SDK client tools, to broadcast transactions. -* **All [module transaction commands](../building-modules/09-module-interfaces.md#transaction-commands)** the application is dependent on, retrieved by using the [basic module manager's](../building-modules/01-module-manager.md#basic-manager) `AddTxCommands()` function. +* **All [module transaction commands](../../build/building-modules/09-module-interfaces.md#transaction-commands)** the application is dependent on, retrieved by using the [basic module manager's](../../build/building-modules/01-module-manager.md#basic-manager) `AddTxCommands()` function, or enhanced by [AutoCLI](https://docs.cosmos.network/main/core/autocli). Here is an example of a `txCommand` aggregating these subcommands from the `simapp` application: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/simd/cmd/root.go#L227-L251 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/simd/cmd/root_v2.go#L270-L292 ``` +:::tip +When using AutoCLI to generate module transaction commands, `EnhanceRootCommand()` automatically adds the module `tx` command to the root command. +Read more about [AutoCLI](https://docs.cosmos.network/main/core/autocli) in its dedicated section. +::: + ### Query Commands -[**Queries**](../building-modules/02-messages-and-queries.md#queries) are objects that allow users to retrieve information about the application's state. To enable the creation of queries using the CLI interface, a function `queryCommand` is generally added to the `rootCmd`: +[**Queries**](../../build/building-modules/02-messages-and-queries.md#queries) are objects that allow users to retrieve information about the application's state. To enable the creation of queries using the CLI interface, a function `queryCommand` is generally added to the `rootCmd`: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/simd/cmd/root.go#L177-L184 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/simd/cmd/root_v2.go#L222-L229 ``` This `queryCommand` function adds all the queries available to end-users for the application. This typically includes: -* **QueryTx** and/or other transaction query commands] from the `auth` module which allow the user to search for a transaction by inputting its hash, a list of tags, or a block height. These queries allow users to see if transactions have been included in a block. +* **QueryTx** and/or other transaction query commands from the `auth` module which allow the user to search for a transaction by inputting its hash, a list of tags, or a block height. These queries allow users to see if transactions have been included in a block. * **Account command** from the `auth` module, which displays the state (e.g. account balance) of an account given an address. * **Validator command** from the Cosmos SDK rpc client tools, which displays the validator set of a given height. * **Block command** from the Cosmos SDK RPC client tools, which displays the block data for a given height. -* **All [module query commands](../building-modules/09-module-interfaces.md#query-commands)** the application is dependent on, retrieved by using the [basic module manager's](../building-modules/01-module-manager.md#basic-manager) `AddQueryCommands()` function. +* **All [module query commands](../../build/building-modules/09-module-interfaces.md#query-commands)** the application is dependent on, retrieved by using the [basic module manager's](../../build/building-modules/01-module-manager.md#basic-manager) `AddQueryCommands()` function, or enhanced by [AutoCLI](https://docs.cosmos.network/main/core/autocli). Here is an example of a `queryCommand` aggregating subcommands from the `simapp` application: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/simd/cmd/root.go#L204-L225 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/simd/cmd/root_v2.go#L249-L268 ``` +:::tip +When using AutoCLI to generate module query commands, `EnhanceRootCommand()` automatically adds the module `query` command to the root command. +Read more about [AutoCLI](https://docs.cosmos.network/main/core/autocli) in its dedicated section. +::: + ## Flags -Flags are used to modify commands; developers can include them in a `flags.go` file with their CLI. Users can explicitly include them in commands or pre-configure them by inside their [`app.toml`](../run-node/02-interact-node.md#configuring-the-node-using-apptoml). Commonly pre-configured flags include the `--node` to connect to and `--chain-id` of the blockchain the user wishes to interact with. +Flags are used to modify commands; developers can include them in a `flags.go` file with their CLI. Users can explicitly include them in commands or pre-configure them by inside their [`app.toml`](../../user/run-node/01-run-node.md#configuring-the-node-using-apptoml-and-configtoml). Commonly pre-configured flags include the `--node` to connect to and `--chain-id` of the blockchain the user wishes to interact with. A *persistent* flag (as opposed to a *local* flag) added to a command transcends all of its children: subcommands will inherit the configured values for these flags. Additionally, all flags have default values when they are added to commands; some toggle an option off but others are empty values that the user needs to override to create valid commands. A flag can be explicitly marked as *required* so that an error is automatically thrown if the user does not provide a value, but it is also acceptable to handle unexpected missing flags differently. -Flags are added to commands directly (generally in the [module's CLI file](../building-modules/09-module-interfaces.md#flags) where module commands are defined) and no flag except for the `rootCmd` persistent flags has to be added at application level. It is common to add a *persistent* flag for `--chain-id`, the unique identifier of the blockchain the application pertains to, to the root command. Adding this flag can be done in the `main()` function. Adding this flag makes sense as the chain ID should not be changing across commands in this application CLI. +Flags are added to commands directly (generally in the [module's CLI file](../../build/building-modules/09-module-interfaces.md#flags) where module commands are defined) and no flag except for the `rootCmd` persistent flags has to be added at application level. It is common to add a *persistent* flag for `--chain-id`, the unique identifier of the blockchain the application pertains to, to the root command. Adding this flag can be done in the `main()` function. Adding this flag makes sense as the chain ID should not be changing across commands in this application CLI. ## Environment variables -Each flag is bound to it's respecteve named environment variable. Then name of the environment variable consist of two parts - capital case `basename` followed by flag name of the flag. `-` must be substituted with `_`. For example flag `--home` for application with basename `GAIA` is bound to `GAIA_HOME`. It allows reducing the amount of flags typed for routine operations. For example instead of: +Each flag is bound to its respective named environment variable. Then name of the environment variable consist of two parts - capital case `basename` followed by flag name of the flag. `-` must be substituted with `_`. For example flag `--node` for application with basename `GAIA` is bound to `GAIA_NODE`. It allows reducing the amount of flags typed for routine operations. For example instead of: ```shell gaia --home=./ --node= --chain-id="testchain-1" --keyring-backend=test tx ... --from= @@ -158,12 +174,12 @@ gaia tx ... --from= ## Configurations -It is vital that the root command of an application uses `PersistentPreRun()` cobra command property for executing the command, so all child commands have access to the server and client contexts. These contexts are set as their default values initially and maybe modified, scoped to the command, in their respective `PersistentPreRun()` functions. Note that the `client.Context` is typically pre-populated with "default" values that may be useful for all commands to inherit and override if necessary. +It is vital that the root command of an application uses `PersistentPreRun()` cobra command property for executing the command, so all child commands have access to the server and client contexts. These contexts are set as their default values initially and may be modified, scoped to the command, in their respective `PersistentPreRun()` functions. Note that the `client.Context` is typically pre-populated with "default" values that may be useful for all commands to inherit and override if necessary. Here is an example of an `PersistentPreRun()` function from `simapp`: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/simd/cmd/root.go#L63-L86 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/simd/cmd/root_v2.go#L81-L120 ``` The `SetCmdClientContextHandler` call reads persistent flags via `ReadPersistentCommandFlags` which creates a `client.Context` and sets that on the root command's `Context`. @@ -171,7 +187,7 @@ The `SetCmdClientContextHandler` call reads persistent flags via `ReadPersistent The `InterceptConfigsPreRunHandler` call creates a viper literal, default `server.Context`, and a logger and sets that on the root command's `Context`. The `server.Context` will be modified and saved to disk. The internal `interceptConfigs` call reads or creates a CometBFT configuration based on the home path provided. In addition, `interceptConfigs` also reads and loads the application configuration, `app.toml`, and binds that to the `server.Context` viper literal. This is vital so the application can get access to not only the CLI flags, but also to the application configuration values provided by this file. :::tip -When willing to configure which logger is used, do not to use `InterceptConfigsPreRunHandler`, which sets the default SDK logger, but instead use `InterceptConfigsAndCreateContext` and set the server context and the logger manually: +When willing to configure which logger is used, do not use `InterceptConfigsPreRunHandler`, which sets the default SDK logger, but instead use `InterceptConfigsAndCreateContext` and set the server context and the logger manually: ```diff -return server.InterceptConfigsPreRunHandler(cmd, customAppTemplate, customAppConfig, customCMTConfig) diff --git a/docs/docs/core/08-events.md b/docs/docs/learn/advanced/08-events.md similarity index 80% rename from docs/docs/core/08-events.md rename to docs/docs/learn/advanced/08-events.md index 0f133966e374..410e20ade09d 100644 --- a/docs/docs/core/08-events.md +++ b/docs/docs/learn/advanced/08-events.md @@ -7,11 +7,9 @@ sidebar_position: 1 `Event`s are objects that contain information about the execution of the application. They are mainly used by service providers like block explorers and wallet to track the execution of various messages and index transactions. ::: -:::note +:::note Pre-requisite Readings -### Pre-requisite Readings - -* [Anatomy of a Cosmos SDK application](../basics/00-app-anatomy.md) +* [Anatomy of a Cosmos SDK application](../beginner/00-app-anatomy.md) * [CometBFT Documentation on Events](https://docs.cometbft.com/v0.37/spec/abci/abci++_basic_concepts#events) ::: @@ -35,10 +33,10 @@ An Event contains: To parse the attribute values as strings, make sure to add `'` (single quotes) around each attribute value. ::: -_Typed Events_ are Protobuf-defined [messages](../architecture/adr-032-typed-events.md) used by the Cosmos SDK +_Typed Events_ are Protobuf-defined [messages](../../build/architecture/adr-032-typed-events.md) used by the Cosmos SDK for emitting and querying Events. They are defined in a `event.proto` file, on a **per-module basis** and are read as `proto.Message`. _Legacy Events_ are defined on a **per-module basis** in the module's `/types/events.go` file. -They are triggered from the module's Protobuf [`Msg` service](../building-modules/03-msg-services.md) +They are triggered from the module's Protobuf [`Msg` service](../../build/building-modules/03-msg-services.md) by using the [`EventManager`](#eventmanager). In addition, each module documents its events under in the `Events` sections of its specs (x/{moduleName}/`README.md`). @@ -48,7 +46,7 @@ Lastly, Events are returned to the underlying consensus engine in the response o * [`BeginBlock`](./00-baseapp.md#beginblock) * [`EndBlock`](./00-baseapp.md#endblock) * [`CheckTx`](./00-baseapp.md#checktx) -* [`DeliverTx`](./00-baseapp.md#delivertx) +* [`Transaction Execution`](./00-baseapp.md#transactionexecution) ### Examples @@ -57,18 +55,18 @@ The following examples show how to query Events using the Cosmos SDK. | Event | Description | | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- | | `tx.height=23` | Query all transactions at height 23 | -| `message.action='/cosmos.bank.v1beta1.Msg/Send'` | Query all transactions containing a x/bank `Send` [Service `Msg`](../building-modules/03-msg-services.md). Note the `'`s around the value. | +| `message.action='/cosmos.bank.v1beta1.Msg/Send'` | Query all transactions containing a x/bank `Send` [Service `Msg`](../../build/building-modules/03-msg-services.md). Note the `'`s around the value. | | `message.module='bank'` | Query all transactions containing messages from the x/bank module. Note the `'`s around the value. | -| `create_validator.validator='cosmosval1...'` | x/staking-specific Event, see [x/staking SPEC](../modules/staking/README.md). | +| `create_validator.validator='cosmosval1...'` | x/staking-specific Event, see [x/staking SPEC](../../build/modules/staking/README.md). | ## EventManager In Cosmos SDK applications, Events are managed by an abstraction called the `EventManager`. -Internally, the `EventManager` tracks a list of Events for the entire execution flow of a -transaction or `BeginBlock`/`EndBlock`. +Internally, the `EventManager` tracks a list of Events for the entire execution flow of `FinalizeBlock` +(i.e. transaction execution, `BeginBlock`, `EndBlock`). ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/events.go#L24-L27 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/events.go#L19-L26 ``` The `EventManager` comes with a set of useful methods to manage Events. The method @@ -76,7 +74,7 @@ that is used most by module and application developers is `EmitTypedEvent` or `E an Event in the `EventManager`. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/events.go#L53-L62 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/events.go#L53-L62 ``` Module developers should handle Event emission via the `EventManager#EmitTypedEvent` or `EventManager#EmitEvent` in each message @@ -87,7 +85,7 @@ the [`Context`](./02-context.md), where Event should be already registered, and **Typed events:** ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/group/keeper/msg_server.go#L88-L91 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/group/keeper/msg_server.go#L95-L97 ``` **Legacy events:** @@ -98,16 +96,9 @@ ctx.EventManager().EmitEvent( ) ``` -Module's `handler` function should also set a new `EventManager` to the `context` to isolate emitted Events per `message`: - -```go -func NewHandler(keeper Keeper) sdk.Handler { - return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { - ctx = ctx.WithEventManager(sdk.NewEventManager()) - switch msg := msg.(type) { -``` +Where the `EventManager` is accessed via the [`Context`](./02-context.md). -See the [`Msg` services](../building-modules/03-msg-services.md) concept doc for a more detailed +See the [`Msg` services](../../build/building-modules/03-msg-services.md) concept doc for a more detailed view on how to typically implement Events and use the `EventManager` in modules. ## Subscribing to Events @@ -134,7 +125,7 @@ The main `eventCategory` you can subscribe to are: These Events are triggered from the `state` package after a block is committed. You can get the full list of Event categories [on the CometBFT Go documentation](https://pkg.go.dev/github.com/cometbft/cometbft/types#pkg-constants). -The `type` and `attribute` value of the `query` allow you to filter the specific Event you are looking for. For example, a `Mint` transaction triggers an Event of type `EventMint` and has an `Id` and an `Owner` as `attributes` (as defined in the [`events.proto` file of the `NFT` module](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/nft/v1beta1/event.proto#L21-L31)). +The `type` and `attribute` value of the `query` allow you to filter the specific Event you are looking for. For example, a `Mint` transaction triggers an Event of type `EventMint` and has an `Id` and an `Owner` as `attributes` (as defined in the [`events.proto` file of the `NFT` module](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/proto/cosmos/nft/v1beta1/event.proto#L21-L31)). Subscribing to this Event would be done like so: @@ -149,9 +140,9 @@ Subscribing to this Event would be done like so: } ``` -where `ownerAddress` is an address following the [`AccAddress`](../basics/03-accounts.md#addresses) format. +where `ownerAddress` is an address following the [`AccAddress`](../beginner/03-accounts.md#addresses) format. -The same way can be used to subscribe to [legacy events](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/bank/types/events.go). +The same way can be used to subscribe to [legacy events](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/bank/types/events.go). ## Default Events diff --git a/docs/docs/core/09-telemetry.md b/docs/docs/learn/advanced/09-telemetry.md similarity index 98% rename from docs/docs/core/09-telemetry.md rename to docs/docs/learn/advanced/09-telemetry.md index 2be2dc680001..c5916544f111 100644 --- a/docs/docs/core/09-telemetry.md +++ b/docs/docs/learn/advanced/09-telemetry.md @@ -18,8 +18,8 @@ To query active metrics (see retention note above) you have to enable API server ## Emitting metrics If telemetry is enabled via configuration, a single global metrics collector is registered via the -[go-metrics](https://github.com/armon/go-metrics) library. This allows emitting and collecting -metrics through simple [API](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/telemetry/wrapper.go). Example: +[go-metrics](https://github.com/hashicorp/go-metrics) library. This allows emitting and collecting +metrics through simple [API](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/telemetry/wrapper.go). Example: ```go func EndBlocker(ctx sdk.Context, k keeper.Keeper) { diff --git a/docs/docs/core/10-ocap.md b/docs/docs/learn/advanced/10-ocap.md similarity index 97% rename from docs/docs/core/10-ocap.md rename to docs/docs/learn/advanced/10-ocap.md index 078b23e58020..c5a472b7f6c4 100644 --- a/docs/docs/core/10-ocap.md +++ b/docs/docs/learn/advanced/10-ocap.md @@ -68,10 +68,9 @@ sumValue := externalModule.ComputeSumValue(*account) In the Cosmos SDK, you can see the application of this principle in simapp. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/app.go#L294-L318 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/app.go ``` The following diagram shows the current dependencies between keepers. ![Keeper dependencies](https://raw.githubusercontent.com/cosmos/cosmos-sdk/release/v0.46.x/docs/uml/svg/keeper_dependencies.svg) - diff --git a/docs/docs/core/11-runtx_middleware.md b/docs/docs/learn/advanced/11-runtx_middleware.md similarity index 85% rename from docs/docs/core/11-runtx_middleware.md rename to docs/docs/learn/advanced/11-runtx_middleware.md index 40210085f8e0..f083a77888e5 100644 --- a/docs/docs/core/11-runtx_middleware.md +++ b/docs/docs/learn/advanced/11-runtx_middleware.md @@ -8,12 +8,12 @@ sidebar_position: 1 Depending on the panic type different handler is used, for instance the default one prints an error log message. Recovery middleware is used to add custom panic recovery for Cosmos SDK application developers. -More context can found in the corresponding [ADR-022](../architecture/adr-022-custom-panic-handling.md) and the implementation in [recovery.go](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/baseapp/recovery.go). +More context can found in the corresponding [ADR-022](../../build/architecture/adr-022-custom-panic-handling.md) and the implementation in [recovery.go](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/baseapp/recovery.go). ## Interface ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/baseapp/recovery.go#L11-L14 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/baseapp/recovery.go#L14-L17 ``` `recoveryObj` is a return value for `recover()` function from the `buildin` Go package. diff --git a/docs/docs/core/12-simulation.md b/docs/docs/learn/advanced/12-simulation.md similarity index 87% rename from docs/docs/core/12-simulation.md rename to docs/docs/learn/advanced/12-simulation.md index ed23f3990444..dfbcddd0d29f 100644 --- a/docs/docs/core/12-simulation.md +++ b/docs/docs/learn/advanced/12-simulation.md @@ -7,8 +7,8 @@ sidebar_position: 1 The Cosmos SDK offers a full fledged simulation framework to fuzz test every message defined by a module. -On the Cosmos SDK, this functionality is provided by [`SimApp`](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/app_v2.go), which is a -`Baseapp` application that is used for running the [`simulation`](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/simulation) module. +On the Cosmos SDK, this functionality is provided by [`SimApp`](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/app_v2.go), which is a +`Baseapp` application that is used for running the [`simulation`](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/simulation) module. This module defines all the simulation logic as well as the operations for randomized parameters like accounts, balances etc. @@ -41,7 +41,7 @@ failure type: Each simulation must receive a set of inputs (_i.e_ flags) such as the number of blocks that the simulation is run, seed, block size, etc. -Check the full list of flags [here](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/simulation/client/cli/flags.go#L33-L57). +Check the full list of flags [here](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/simulation/client/cli/flags.go#L35-L59). ## Simulator Modes @@ -53,7 +53,7 @@ In addition to the various inputs and commands, the simulator runs in three mode This mode is helpful for running simulations on a known state such as a live network export where a new (mostly likely breaking) version of the application needs to be tested. 3. From a `params.json` file where the initial state is pseudo-randomly generated but the module and simulation parameters can be provided manually. This allows for a more controlled and deterministic simulation setup while allowing the state space to still be pseudo-randomly simulated. - The list of available parameters are listed [here](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/simulation/client/cli/flags.go#L59-L78). + The list of available parameters are listed [here](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/simulation/client/cli/flags.go#L59-L78). :::tip These modes are not mutually exclusive. So you can for example run a randomly @@ -63,7 +63,7 @@ generated genesis state (`1`) with manually generated simulation params (`3`). ## Usage This is a general example of how simulations are run. For more specific examples -check the Cosmos SDK [Makefile](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/Makefile#L282-L318). +check the Cosmos SDK [Makefile](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/Makefile#L282-L318). ```bash $ go test -mod=readonly github.com/cosmos/cosmos-sdk/simapp \ @@ -90,12 +90,12 @@ Here are some suggestions when encountering a simulation failure: * Run invariants on every operation with `-SimulateEveryOperation`. _Note_: this will slow down your simulation **a lot**. * Try adding logs to operations that are not logged. You will have to define a - [Logger](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/staking/keeper/keeper.go#L65-L68) on your `Keeper`. + [Logger](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/staking/keeper/keeper.go#L65-L68) on your `Keeper`. ## Use simulation in your Cosmos SDK-based application -Learn how you can integrate the simulation into your Cosmos SDK-based application: +Learn how you can build the simulation into your Cosmos SDK-based application: * Application Simulation Manager -* [Building modules: Simulator](../building-modules/14-simulator.md) +* [Building modules: Simulator](../../build/building-modules/14-simulator.md) * Simulator tests diff --git a/docs/docs/core/13-proto-docs.md b/docs/docs/learn/advanced/13-proto-docs.md similarity index 100% rename from docs/docs/core/13-proto-docs.md rename to docs/docs/learn/advanced/13-proto-docs.md diff --git a/docs/docs/core/15-upgrade.md b/docs/docs/learn/advanced/15-upgrade.md similarity index 97% rename from docs/docs/core/15-upgrade.md rename to docs/docs/learn/advanced/15-upgrade.md index b5db25589658..5d56f2b59605 100644 --- a/docs/docs/core/15-upgrade.md +++ b/docs/docs/learn/advanced/15-upgrade.md @@ -16,7 +16,7 @@ The Cosmos SDK uses two methods to perform upgrades: * Exporting the entire application state to a JSON file using the `export` CLI command, making changes, and then starting a new binary with the changed JSON file as the genesis file. -* Perform upgrades in place, which significantly decrease the upgrade time for chains with a larger state. Use the [Module Upgrade Guide](../building-modules/13-upgrade.md) to set up your application modules to take advantage of in-place upgrades. +* Perform upgrades in place, which significantly decrease the upgrade time for chains with a larger state. Use the [Module Upgrade Guide](../../build/building-modules/13-upgrade.md) to set up your application modules to take advantage of in-place upgrades. This document provides steps to use the In-Place Store Migrations upgrade method. @@ -63,7 +63,7 @@ app.UpgradeKeeper.SetUpgradeHandler("my-plan", func(ctx sdk.Context, plan upgrad }) ``` -To learn more about configuring migration scripts for your modules, see the [Module Upgrade Guide](../building-modules/13-upgrade.md). +To learn more about configuring migration scripts for your modules, see the [Module Upgrade Guide](../../build/building-modules/13-upgrade.md). ### Order Of Migrations @@ -159,4 +159,4 @@ You can sync a full node to an existing blockchain which has been upgraded using To successfully sync, you must start with the initial binary that the blockchain started with at genesis. If all Software Upgrade Plans contain binary instruction, then you can run Cosmovisor with auto-download option to automatically handle downloading and switching to the binaries associated with each sequential upgrade. Otherwise, you need to manually provide all binaries to Cosmovisor. -To learn more about Cosmovisor, see the [Cosmovisor Quick Start](../tooling/01-cosmovisor.md). +To learn more about Cosmovisor, see the [Cosmovisor Quick Start](../../build/tooling/01-cosmovisor.md). diff --git a/docs/docs/core/16-config.md b/docs/docs/learn/advanced/16-config.md similarity index 100% rename from docs/docs/core/16-config.md rename to docs/docs/learn/advanced/16-config.md diff --git a/docs/docs/learn/advanced/_category_.json b/docs/docs/learn/advanced/_category_.json new file mode 100644 index 000000000000..a49201e64e97 --- /dev/null +++ b/docs/docs/learn/advanced/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "Advanced", + "position": 3, + "link": null +} \ No newline at end of file diff --git a/docs/docs/core/baseapp_state-begin_block.png b/docs/docs/learn/advanced/baseapp_state-begin_block.png similarity index 100% rename from docs/docs/core/baseapp_state-begin_block.png rename to docs/docs/learn/advanced/baseapp_state-begin_block.png diff --git a/docs/docs/core/baseapp_state-checktx.png b/docs/docs/learn/advanced/baseapp_state-checktx.png similarity index 100% rename from docs/docs/core/baseapp_state-checktx.png rename to docs/docs/learn/advanced/baseapp_state-checktx.png diff --git a/docs/docs/core/baseapp_state-commit.png b/docs/docs/learn/advanced/baseapp_state-commit.png similarity index 100% rename from docs/docs/core/baseapp_state-commit.png rename to docs/docs/learn/advanced/baseapp_state-commit.png diff --git a/docs/docs/core/baseapp_state-deliver_tx.png b/docs/docs/learn/advanced/baseapp_state-deliver_tx.png similarity index 100% rename from docs/docs/core/baseapp_state-deliver_tx.png rename to docs/docs/learn/advanced/baseapp_state-deliver_tx.png diff --git a/docs/docs/core/baseapp_state-initchain.png b/docs/docs/learn/advanced/baseapp_state-initchain.png similarity index 100% rename from docs/docs/core/baseapp_state-initchain.png rename to docs/docs/learn/advanced/baseapp_state-initchain.png diff --git a/docs/docs/core/baseapp_state-prepareproposal.png b/docs/docs/learn/advanced/baseapp_state-prepareproposal.png similarity index 100% rename from docs/docs/core/baseapp_state-prepareproposal.png rename to docs/docs/learn/advanced/baseapp_state-prepareproposal.png diff --git a/docs/docs/core/baseapp_state-processproposal.png b/docs/docs/learn/advanced/baseapp_state-processproposal.png similarity index 100% rename from docs/docs/core/baseapp_state-processproposal.png rename to docs/docs/learn/advanced/baseapp_state-processproposal.png diff --git a/docs/docs/core/baseapp_state.png b/docs/docs/learn/advanced/baseapp_state.png similarity index 100% rename from docs/docs/core/baseapp_state.png rename to docs/docs/learn/advanced/baseapp_state.png diff --git a/docs/docs/basics/00-app-anatomy.md b/docs/docs/learn/beginner/00-app-anatomy.md similarity index 58% rename from docs/docs/basics/00-app-anatomy.md rename to docs/docs/learn/beginner/00-app-anatomy.md index 482d2b4a0d5a..07f656db2417 100644 --- a/docs/docs/basics/00-app-anatomy.md +++ b/docs/docs/learn/beginner/00-app-anatomy.md @@ -10,7 +10,7 @@ This document describes the core parts of a Cosmos SDK application, represented ## Node Client -The Daemon, or [Full-Node Client](../core/03-node.md), is the core process of a Cosmos SDK-based blockchain. Participants in the network run this process to initialize their state-machine, connect with other full-nodes, and update their state-machine as new blocks come in. +The Daemon, or [Full-Node Client](../advanced/03-node.md), is the core process of a Cosmos SDK-based blockchain. Participants in the network run this process to initialize their state-machine, connect with other full-nodes, and update their state-machine as new blocks come in. ```text ^ +-------------------------------+ ^ @@ -30,9 +30,9 @@ Blockchain Node | | Consensus | | v +-------------------------------+ v ``` -The blockchain full-node presents itself as a binary, generally suffixed by `-d` for "daemon" (e.g. `appd` for `app` or `gaiad` for `gaia`). This binary is built by running a simple [`main.go`](../core/03-node.md#main-function) function placed in `./cmd/appd/`. This operation usually happens through the [Makefile](#dependencies-and-makefile). +The blockchain full-node presents itself as a binary, generally suffixed by `-d` for "daemon" (e.g. `appd` for `app` or `gaiad` for `gaia`). This binary is built by running a simple [`main.go`](../advanced/03-node.md#main-function) function placed in `./cmd/appd/`. This operation usually happens through the [Makefile](#dependencies-and-makefile). -Once the main binary is built, the node can be started by running the [`start` command](../core/03-node.md#start-command). This command function primarily does three things: +Once the main binary is built, the node can be started by running the [`start` command](../advanced/03-node.md#start-command). This command function primarily does three things: 1. Create an instance of the state-machine defined in [`app.go`](#core-application-file). 2. Initialize the state-machine with the latest known state, extracted from the `db` stored in the `~/.app/data` folder. At this point, the state-machine is at height `appBlockHeight`. @@ -50,40 +50,41 @@ In general, the core of the state-machine is defined in a file called `app.go`. The first thing defined in `app.go` is the `type` of the application. It is generally comprised of the following parts: -* **A reference to [`baseapp`](../core/00-baseapp.md).** The custom application defined in `app.go` is an extension of `baseapp`. When a transaction is relayed by CometBFT to the application, `app` uses `baseapp`'s methods to route them to the appropriate module. `baseapp` implements most of the core logic for the application, including all the [ABCI methods](https://docs.cometbft.com/v0.37/spec/abci/) and the [routing logic](../core/00-baseapp.md#routing). -* **A list of store keys**. The [store](../core/04-store.md), which contains the entire state, is implemented as a [`multistore`](../core/04-store.md#multistore) (i.e. a store of stores) in the Cosmos SDK. Each module uses one or multiple stores in the multistore to persist their part of the state. These stores can be accessed with specific keys that are declared in the `app` type. These keys, along with the `keepers`, are at the heart of the [object-capabilities model](../core/10-ocap.md) of the Cosmos SDK. -* **A list of module's `keeper`s.** Each module defines an abstraction called [`keeper`](../building-modules/06-keeper.md), which handles reads and writes for this module's store(s). The `keeper`'s methods of one module can be called from other modules (if authorized), which is why they are declared in the application's type and exported as interfaces to other modules so that the latter can only access the authorized functions. -* **A reference to an [`appCodec`](../core/05-encoding.md).** The application's `appCodec` is used to serialize and deserialize data structures in order to store them, as stores can only persist `[]bytes`. The default codec is [Protocol Buffers](../core/05-encoding.md). -* **A reference to a [`legacyAmino`](../core/05-encoding.md) codec.** Some parts of the Cosmos SDK have not been migrated to use the `appCodec` above, and are still hardcoded to use Amino. Other parts explicitly use Amino for backwards compatibility. For these reasons, the application still holds a reference to the legacy Amino codec. Please note that the Amino codec will be removed from the SDK in the upcoming releases. -* **A reference to a [module manager](../building-modules/01-module-manager.md#manager)** and a [basic module manager](../building-modules/01-module-manager.md#basicmanager). The module manager is an object that contains a list of the application's modules. It facilitates operations related to these modules, like registering their [`Msg` service](../core/00-baseapp.md#msg-services) and [gRPC `Query` service](../core/00-baseapp.md#grpc-query-services), or setting the order of execution between modules for various functions like [`InitChainer`](#initchainer), [`BeginBlocker` and `EndBlocker`](#beginblocker-and-endblocker). +* **A reference to [`baseapp`](../advanced/00-baseapp.md).** The custom application defined in `app.go` is an extension of `baseapp`. When a transaction is relayed by CometBFT to the application, `app` uses `baseapp`'s methods to route them to the appropriate module. `baseapp` implements most of the core logic for the application, including all the [ABCI methods](https://docs.cometbft.com/v0.37/spec/abci/) and the [routing logic](../advanced/00-baseapp.md#routing). +* **A list of store keys**. The [store](../advanced/04-store.md), which contains the entire state, is implemented as a [`multistore`](../advanced/04-store.md#multistore) (i.e. a store of stores) in the Cosmos SDK. Each module uses one or multiple stores in the multistore to persist their part of the state. These stores can be accessed with specific keys that are declared in the `app` type. These keys, along with the `keepers`, are at the heart of the [object-capabilities model](../advanced/10-ocap.md) of the Cosmos SDK. +* **A list of module's `keeper`s.** Each module defines an abstraction called [`keeper`](../../build/building-modules/06-keeper.md), which handles reads and writes for this module's store(s). The `keeper`'s methods of one module can be called from other modules (if authorized), which is why they are declared in the application's type and exported as interfaces to other modules so that the latter can only access the authorized functions. +* **A reference to an [`appCodec`](../advanced/05-encoding.md).** The application's `appCodec` is used to serialize and deserialize data structures in order to store them, as stores can only persist `[]bytes`. The default codec is [Protocol Buffers](../advanced/05-encoding.md). +* **A reference to a [`legacyAmino`](../advanced/05-encoding.md) codec.** Some parts of the Cosmos SDK have not been migrated to use the `appCodec` above, and are still hardcoded to use Amino. Other parts explicitly use Amino for backwards compatibility. For these reasons, the application still holds a reference to the legacy Amino codec. Please note that the Amino codec will be removed from the SDK in the upcoming releases. +* **A reference to a [module manager](../../build/building-modules/01-module-manager.md#manager)** and a [basic module manager](../../build/building-modules/01-module-manager.md#basicmanager). The module manager is an object that contains a list of the application's modules. It facilitates operations related to these modules, like registering their [`Msg` service](../advanced/00-baseapp.md#msg-services) and [gRPC `Query` service](../advanced/00-baseapp.md#grpc-query-services), or setting the order of execution between modules for various functions like [`InitChainer`](#initchainer), [`PreBlocker`](#preblocker) and [`BeginBlocker` and `EndBlocker`](#beginblocker-and-endblocker). See an example of application type definition from `simapp`, the Cosmos SDK's own app used for demo and testing purposes: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/app.go#L161-L203 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/app.go#L173-L212 ``` ### Constructor Function -Also defined in `app.go` is the constructor function, which constructs a new application of the type defined in the preceding section. The function must fulfill the `AppCreator` signature in order to be used in the [`start` command](../core/03-node.md#start-command) of the application's daemon command. +Also defined in `app.go` is the constructor function, which constructs a new application of the type defined in the preceding section. The function must fulfill the `AppCreator` signature in order to be used in the [`start` command](../advanced/03-node.md#start-command) of the application's daemon command. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/server/types/app.go#L64-L66 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/server/types/app.go#L66-L68 ``` Here are the main actions performed by this function: -* Instantiate a new [`codec`](../core/05-encoding.md) and initialize the `codec` of each of the application's modules using the [basic manager](../building-modules/01-module-manager.md#basicmanager). +* Instantiate a new [`codec`](../advanced/05-encoding.md) and initialize the `codec` of each of the application's modules using the [basic manager](../../build/building-modules/01-module-manager.md#basicmanager). * Instantiate a new application with a reference to a `baseapp` instance, a codec, and all the appropriate store keys. * Instantiate all the [`keeper`](#keeper) objects defined in the application's `type` using the `NewKeeper` function of each of the application's modules. Note that keepers must be instantiated in the correct order, as the `NewKeeper` of one module might require a reference to another module's `keeper`. -* Instantiate the application's [module manager](../building-modules/01-module-manager.md#manager) with the [`AppModule`](#application-module-interface) object of each of the application's modules. -* With the module manager, initialize the application's [`Msg` services](../core/00-baseapp.md#msg-services), [gRPC `Query` services](../core/00-baseapp.md#grpc-query-services), [legacy `Msg` routes](../core/00-baseapp.md#routing), and [legacy query routes](../core/00-baseapp.md#query-routing). When a transaction is relayed to the application by CometBFT via the ABCI, it is routed to the appropriate module's [`Msg` service](#msg-services) using the routes defined here. Likewise, when a gRPC query request is received by the application, it is routed to the appropriate module's [`gRPC query service`](#grpc-query-services) using the gRPC routes defined here. The Cosmos SDK still supports legacy `Msg`s and legacy CometBFT queries, which are routed using the legacy `Msg` routes and the legacy query routes, respectively. -* With the module manager, register the [application's modules' invariants](../building-modules/07-invariants.md). Invariants are variables (e.g. total supply of a token) that are evaluated at the end of each block. The process of checking invariants is done via a special module called the [`InvariantsRegistry`](../building-modules/07-invariants.md#invariant-registry). The value of the invariant should be equal to a predicted value defined in the module. Should the value be different than the predicted one, special logic defined in the invariant registry is triggered (usually the chain is halted). This is useful to make sure that no critical bug goes unnoticed, producing long-lasting effects that are hard to fix. -* With the module manager, set the order of execution between the `InitGenesis`, `BeginBlocker`, and `EndBlocker` functions of each of the [application's modules](#application-module-interface). Note that not all modules implement these functions. +* Instantiate the application's [module manager](../../build/building-modules/01-module-manager.md#manager) with the [`AppModule`](#application-module-interface) object of each of the application's modules. +* With the module manager, initialize the application's [`Msg` services](../advanced/00-baseapp.md#msg-services), [gRPC `Query` services](../advanced/00-baseapp.md#grpc-query-services), [legacy `Msg` routes](../advanced/00-baseapp.md#routing), and [legacy query routes](../advanced/00-baseapp.md#query-routing). When a transaction is relayed to the application by CometBFT via the ABCI, it is routed to the appropriate module's [`Msg` service](#msg-services) using the routes defined here. Likewise, when a gRPC query request is received by the application, it is routed to the appropriate module's [`gRPC query service`](#grpc-query-services) using the gRPC routes defined here. The Cosmos SDK still supports legacy `Msg`s and legacy CometBFT queries, which are routed using the legacy `Msg` routes and the legacy query routes, respectively. +* With the module manager, register the [application's modules' invariants](../../build/building-modules/07-invariants.md). Invariants are variables (e.g. total supply of a token) that are evaluated at the end of each block. The process of checking invariants is done via a special module called the [`InvariantsRegistry`](../../build/building-modules/07-invariants.md#invariant-registry). The value of the invariant should be equal to a predicted value defined in the module. Should the value be different than the predicted one, special logic defined in the invariant registry is triggered (usually the chain is halted). This is useful to make sure that no critical bug goes unnoticed, producing long-lasting effects that are hard to fix. +* With the module manager, set the order of execution between the `InitGenesis`, `PreBlocker`, `BeginBlocker`, and `EndBlocker` functions of each of the [application's modules](#application-module-interface). Note that not all modules implement these functions. * Set the remaining application parameters: * [`InitChainer`](#initchainer): used to initialize the application when it is first started. - * [`BeginBlocker`, `EndBlocker`](#beginblocker-and-endlbocker): called at the beginning and at the end of every block. - * [`anteHandler`](../core/00-baseapp.md#antehandler): used to handle fees and signature verification. + * [`PreBlocker`](#preblocker): called before BeginBlock. + * [`BeginBlocker`, `EndBlocker`](#beginblocker-and-endblocker): called at the beginning and at the end of every block. + * [`anteHandler`](../advanced/00-baseapp.md#antehandler): used to handle fees and signature verification. * Mount the stores. * Return the application. @@ -92,33 +93,48 @@ Note that the constructor function only creates an instance of the app, while th See an example of application constructor from `simapp`: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/app.go#L214-L522 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/app.go#L223-L575 ``` ### InitChainer The `InitChainer` is a function that initializes the state of the application from a genesis file (i.e. token balances of genesis accounts). It is called when the application receives the `InitChain` message from the CometBFT engine, which happens when the node is started at `appBlockHeight == 0` (i.e. on genesis). The application must set the `InitChainer` in its [constructor](#constructor-function) via the [`SetInitChainer`](https://pkg.go.dev/github.com/cosmos/cosmos-sdk/baseapp#BaseApp.SetInitChainer) method. -In general, the `InitChainer` is mostly composed of the [`InitGenesis`](../building-modules/08-genesis.md#initgenesis) function of each of the application's modules. This is done by calling the `InitGenesis` function of the module manager, which in turn calls the `InitGenesis` function of each of the modules it contains. Note that the order in which the modules' `InitGenesis` functions must be called has to be set in the module manager using the [module manager's](../building-modules/01-module-manager.md) `SetOrderInitGenesis` method. This is done in the [application's constructor](#application-constructor), and the `SetOrderInitGenesis` has to be called before the `SetInitChainer`. +In general, the `InitChainer` is mostly composed of the [`InitGenesis`](../../build/building-modules/08-genesis.md#initgenesis) function of each of the application's modules. This is done by calling the `InitGenesis` function of the module manager, which in turn calls the `InitGenesis` function of each of the modules it contains. Note that the order in which the modules' `InitGenesis` functions must be called has to be set in the module manager using the [module manager's](../../build/building-modules/01-module-manager.md) `SetOrderInitGenesis` method. This is done in the [application's constructor](#application-constructor), and the `SetOrderInitGenesis` has to be called before the `SetInitChainer`. See an example of an `InitChainer` from `simapp`: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/app.go#L569-L577 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/app.go#L626-L634 ``` +### PreBlocker + +There are two semantics around the new lifecycle method: + +* It runs before the `BeginBlocker` of all modules +* It can modify consensus parameters in storage, and signal the caller through the return value. + +When it returns `ConsensusParamsChanged=true`, the caller must refresh the consensus parameter in the finalize context: + +```go +app.finalizeBlockState.ctx = app.finalizeBlockState.ctx.WithConsensusParams(app.GetConsensusParams()) +``` + +The new ctx must be passed to all the other lifecycle methods. + ### BeginBlocker and EndBlocker -The Cosmos SDK offers developers the possibility to implement automatic execution of code as part of their application. This is implemented through two functions called `BeginBlocker` and `EndBlocker`. They are called when the application receives the `BeginBlock` and `EndBlock` messages from the CometBFT engine, which happens respectively at the beginning and at the end of each block. The application must set the `BeginBlocker` and `EndBlocker` in its [constructor](#constructor-function) via the [`SetBeginBlocker`](https://pkg.go.dev/github.com/cosmos/cosmos-sdk/baseapp#BaseApp.SetBeginBlocker) and [`SetEndBlocker`](https://pkg.go.dev/github.com/cosmos/cosmos-sdk/baseapp#BaseApp.SetEndBlocker) methods. +The Cosmos SDK offers developers the possibility to implement automatic execution of code as part of their application. This is implemented through two functions called `BeginBlocker` and `EndBlocker`. They are called when the application receives the `FinalizeBlock` messages from the CometBFT consensus engine, which happens respectively at the beginning and at the end of each block. The application must set the `BeginBlocker` and `EndBlocker` in its [constructor](#constructor-function) via the [`SetBeginBlocker`](https://pkg.go.dev/github.com/cosmos/cosmos-sdk/baseapp#BaseApp.SetBeginBlocker) and [`SetEndBlocker`](https://pkg.go.dev/github.com/cosmos/cosmos-sdk/baseapp#BaseApp.SetEndBlocker) methods. -In general, the `BeginBlocker` and `EndBlocker` functions are mostly composed of the [`BeginBlock` and `EndBlock`](../building-modules/05-beginblock-endblock.md) functions of each of the application's modules. This is done by calling the `BeginBlock` and `EndBlock` functions of the module manager, which in turn calls the `BeginBlock` and `EndBlock` functions of each of the modules it contains. Note that the order in which the modules' `BeginBlock` and `EndBlock` functions must be called has to be set in the module manager using the `SetOrderBeginBlockers` and `SetOrderEndBlockers` methods, respectively. This is done via the [module manager](../building-modules/01-module-manager.md) in the [application's constructor](#application-constructor), and the `SetOrderBeginBlockers` and `SetOrderEndBlockers` methods have to be called before the `SetBeginBlocker` and `SetEndBlocker` functions. +In general, the `BeginBlocker` and `EndBlocker` functions are mostly composed of the [`BeginBlock` and `EndBlock`](../../build/building-modules/06-beginblock-endblock.md) functions of each of the application's modules. This is done by calling the `BeginBlock` and `EndBlock` functions of the module manager, which in turn calls the `BeginBlock` and `EndBlock` functions of each of the modules it contains. Note that the order in which the modules' `BeginBlock` and `EndBlock` functions must be called has to be set in the module manager using the `SetOrderBeginBlockers` and `SetOrderEndBlockers` methods, respectively. This is done via the [module manager](../../build/building-modules/01-module-manager.md) in the [application's constructor](#application-constructor), and the `SetOrderBeginBlockers` and `SetOrderEndBlockers` methods have to be called before the `SetBeginBlocker` and `SetEndBlocker` functions. As a sidenote, it is important to remember that application-specific blockchains are deterministic. Developers must be careful not to introduce non-determinism in `BeginBlocker` or `EndBlocker`, and must also be careful not to make them too computationally expensive, as [gas](./04-gas-fees.md) does not constrain the cost of `BeginBlocker` and `EndBlocker` execution. See an example of `BeginBlocker` and `EndBlocker` functions from `simapp` ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/app.go#L555-L563 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/app.go#L613-L620 ``` ### Register Codec @@ -126,40 +142,40 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/app.go#L555-L563 The `EncodingConfig` structure is the last important part of the `app.go` file. The goal of this structure is to define the codecs that will be used throughout the app. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/params/encoding.go#L9-L16 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/params/encoding.go#L9-L16 ``` Here are descriptions of what each of the four fields means: * `InterfaceRegistry`: The `InterfaceRegistry` is used by the Protobuf codec to handle interfaces that are encoded and decoded (we also say "unpacked") using [`google.protobuf.Any`](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). `Any` could be thought as a struct that contains a `type_url` (name of a concrete type implementing the interface) and a `value` (its encoded bytes). `InterfaceRegistry` provides a mechanism for registering interfaces and implementations that can be safely unpacked from `Any`. Each application module implements the `RegisterInterfaces` method that can be used to register the module's own interfaces and implementations. - * You can read more about `Any` in [ADR-019](../architecture/adr-019-protobuf-state-encoding.md). - * To go more into details, the Cosmos SDK uses an implementation of the Protobuf specification called [`gogoprotobuf`](https://github.com/cosmos/gogoproto). By default, the [gogo protobuf implementation of `Any`](https://pkg.go.dev/github.com/cosmos/gogoproto/types) uses [global type registration](https://github.com/cosmos/gogoproto/blob/master/proto/properties.go#L540) to decode values packed in `Any` into concrete Go types. This introduces a vulnerability where any malicious module in the dependency tree could register a type with the global protobuf registry and cause it to be loaded and unmarshaled by a transaction that referenced it in the `type_url` field. For more information, please refer to [ADR-019](../architecture/adr-019-protobuf-state-encoding.md). + * You can read more about `Any` in [ADR-019](../../build/architecture/adr-019-protobuf-state-encoding.md). + * To go more into details, the Cosmos SDK uses an implementation of the Protobuf specification called [`gogoprotobuf`](https://github.com/cosmos/gogoproto). By default, the [gogo protobuf implementation of `Any`](https://pkg.go.dev/github.com/cosmos/gogoproto/types) uses [global type registration](https://github.com/cosmos/gogoproto/blob/master/proto/properties.go#L540) to decode values packed in `Any` into concrete Go types. This introduces a vulnerability where any malicious module in the dependency tree could register a type with the global protobuf registry and cause it to be loaded and unmarshaled by a transaction that referenced it in the `type_url` field. For more information, please refer to [ADR-019](../../build/architecture/adr-019-protobuf-state-encoding.md). * `Codec`: The default codec used throughout the Cosmos SDK. It is composed of a `BinaryCodec` used to encode and decode state, and a `JSONCodec` used to output data to the users (for example, in the [CLI](#cli)). By default, the SDK uses Protobuf as `Codec`. -* `TxConfig`: `TxConfig` defines an interface a client can utilize to generate an application-defined concrete transaction type. Currently, the SDK handles two transaction types: `SIGN_MODE_DIRECT` (which uses Protobuf binary as over-the-wire encoding) and `SIGN_MODE_LEGACY_AMINO_JSON` (which depends on Amino). Read more about transactions [here](../core/01-transactions.md). +* `TxConfig`: `TxConfig` defines an interface a client can utilize to generate an application-defined concrete transaction type. Currently, the SDK handles two transaction types: `SIGN_MODE_DIRECT` (which uses Protobuf binary as over-the-wire encoding) and `SIGN_MODE_LEGACY_AMINO_JSON` (which depends on Amino). Read more about transactions [here](../advanced/01-transactions.md). * `Amino`: Some legacy parts of the Cosmos SDK still use Amino for backwards-compatibility. Each module exposes a `RegisterLegacyAmino` method to register the module's specific types within Amino. This `Amino` codec should not be used by app developers anymore, and will be removed in future releases. An application should create its own encoding config. See an example of a `simappparams.EncodingConfig` from `simapp`: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/app.go#L731-L738 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/params/encoding.go#L11-L16 ``` ## Modules -[Modules](../building-modules/01-intro.md) are the heart and soul of Cosmos SDK applications. They can be considered as state-machines nested within the state-machine. When a transaction is relayed from the underlying CometBFT engine via the ABCI to the application, it is routed by [`baseapp`](../core/00-baseapp.md) to the appropriate module in order to be processed. This paradigm enables developers to easily build complex state-machines, as most of the modules they need often already exist. **For developers, most of the work involved in building a Cosmos SDK application revolves around building custom modules required by their application that do not exist yet, and integrating them with modules that do already exist into one coherent application**. In the application directory, the standard practice is to store modules in the `x/` folder (not to be confused with the Cosmos SDK's `x/` folder, which contains already-built modules). +[Modules](../../build/building-modules/00-intro.md) are the heart and soul of Cosmos SDK applications. They can be considered as state-machines nested within the state-machine. When a transaction is relayed from the underlying CometBFT engine via the ABCI to the application, it is routed by [`baseapp`](../advanced/00-baseapp.md) to the appropriate module in order to be processed. This paradigm enables developers to easily build complex state-machines, as most of the modules they need often already exist. **For developers, most of the work involved in building a Cosmos SDK application revolves around building custom modules required by their application that do not exist yet, and integrating them with modules that do already exist into one coherent application**. In the application directory, the standard practice is to store modules in the `x/` folder (not to be confused with the Cosmos SDK's `x/` folder, which contains already-built modules). ### Application Module Interface -Modules must implement [interfaces](../building-modules/01-module-manager.md#application-module-interfaces) defined in the Cosmos SDK, [`AppModuleBasic`](../building-modules/01-module-manager.md#appmodulebasic) and [`AppModule`](../building-modules/01-module-manager.md#appmodule). The former implements basic non-dependent elements of the module, such as the `codec`, while the latter handles the bulk of the module methods (including methods that require references to other modules' `keeper`s). Both the `AppModule` and `AppModuleBasic` types are, by convention, defined in a file called `module.go`. +Modules must implement [interfaces](../../build/building-modules/01-module-manager.md#application-module-interfaces) defined in the Cosmos SDK, [`AppModuleBasic`](../../build/building-modules/01-module-manager.md#appmodulebasic) and [`AppModule`](../../build/building-modules/01-module-manager.md#appmodule). The former implements basic non-dependent elements of the module, such as the `codec`, while the latter handles the bulk of the module methods (including methods that require references to other modules' `keeper`s). Both the `AppModule` and `AppModuleBasic` types are, by convention, defined in a file called `module.go`. -`AppModule` exposes a collection of useful methods on the module that facilitates the composition of modules into a coherent application. These methods are called from the [`module manager`](../building-modules/01-module-manager.md#manager), which manages the application's collection of modules. +`AppModule` exposes a collection of useful methods on the module that facilitates the composition of modules into a coherent application. These methods are called from the [`module manager`](../../build/building-modules/01-module-manager.md#manager), which manages the application's collection of modules. ### `Msg` Services Each application module defines two [Protobuf services](https://developers.google.com/protocol-buffers/docs/proto#services): one `Msg` service to handle messages, and one gRPC `Query` service to handle queries. If we consider the module as a state-machine, then a `Msg` service is a set of state transition RPC methods. Each Protobuf `Msg` service method is 1:1 related to a Protobuf request type, which must implement `sdk.Msg` interface. -Note that `sdk.Msg`s are bundled in [transactions](../core/01-transactions.md), and each transaction contains one or multiple messages. +Note that `sdk.Msg`s are bundled in [transactions](../advanced/01-transactions.md), and each transaction contains one or multiple messages. When a valid block of transactions is received by the full-node, CometBFT relays each one to the application via [`DeliverTx`](https://docs.cometbft.com/v0.37/spec/abci/abci++_app_requirements#specifics-of-responsedelivertx). Then, the application handles the transaction: @@ -173,7 +189,7 @@ For more details, see [transaction lifecycle](./01-tx-lifecycle.md). Module developers create custom `Msg` services when they build their own module. The general practice is to define the `Msg` Protobuf service in a `tx.proto` file. For example, the `x/bank` module defines a service with two methods to transfer tokens: ```protobuf reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/bank/v1beta1/tx.proto#L13-L36 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/proto/cosmos/bank/v1beta1/tx.proto#L13-L36 ``` Service methods use `keeper` in order to update the module state. @@ -182,7 +198,7 @@ Each module should also implement the `RegisterServices` method as part of the [ ### gRPC `Query` Services -gRPC `Query` services allow users to query the state using [gRPC](https://grpc.io). They are enabled by default, and can be configured under the `grpc.enable` and `grpc.address` fields inside [`app.toml`](../run-node/02-interact-node.md#configuring-the-node-using-apptoml). +gRPC `Query` services allow users to query the state using [gRPC](https://grpc.io). They are enabled by default, and can be configured under the `grpc.enable` and `grpc.address` fields inside [`app.toml`](../../user/run-node/01-run-node.md#configuring-the-node-using-apptoml-and-configtoml). gRPC `Query` services are defined in the module's Protobuf definition files, specifically inside `query.proto`. The `query.proto` definition file exposes a single `Query` [Protobuf service](https://developers.google.com/protocol-buffers/docs/proto#services). Each gRPC query endpoint corresponds to a service method, starting with the `rpc` keyword, inside the `Query` service. @@ -192,7 +208,7 @@ Finally, each module should also implement the `RegisterServices` method as part ### Keeper -[`Keepers`](../building-modules/06-keeper.md) are the gatekeepers of their module's store(s). To read or write in a module's store, it is mandatory to go through one of its `keeper`'s methods. This is ensured by the [object-capabilities](../core/10-ocap.md) model of the Cosmos SDK. Only objects that hold the key to a store can access it, and only the module's `keeper` should hold the key(s) to the module's store(s). +[`Keepers`](../../build/building-modules/06-keeper.md) are the gatekeepers of their module's store(s). To read or write in a module's store, it is mandatory to go through one of its `keeper`'s methods. This is ensured by the [object-capabilities](../advanced/10-ocap.md) model of the Cosmos SDK. Only objects that hold the key to a store can access it, and only the module's `keeper` should hold the key(s) to the module's store(s). `Keepers` are generally defined in a file called `keeper.go`. It contains the `keeper`'s type definition and methods. @@ -210,10 +226,10 @@ Each module defines command-line commands, gRPC services, and REST routes to be #### CLI -Generally, the [commands related to a module](../building-modules/09-module-interfaces.md#cli) are defined in a folder called `client/cli` in the module's folder. The CLI divides commands into two categories, transactions and queries, defined in `client/cli/tx.go` and `client/cli/query.go`, respectively. Both commands are built on top of the [Cobra Library](https://github.com/spf13/cobra): +Generally, the [commands related to a module](../../build/building-modules/09-module-interfaces.md#cli) are defined in a folder called `client/cli` in the module's folder. The CLI divides commands into two categories, transactions and queries, defined in `client/cli/tx.go` and `client/cli/query.go`, respectively. Both commands are built on top of the [Cobra Library](https://github.com/spf13/cobra): * Transactions commands let users generate new transactions so that they can be included in a block and eventually update the state. One command should be created for each [message type](#message-types) defined in the module. The command calls the constructor of the message with the parameters provided by the end-user, and wraps it into a transaction. The Cosmos SDK handles signing and the addition of other transaction metadata. -* Queries let users query the subset of the state defined by the module. Query commands forward queries to the [application's query router](../core/00-baseapp.md#query-routing), which routes them to the appropriate [querier](#querier) the `queryRoute` parameter supplied. +* Queries let users query the subset of the state defined by the module. Query commands forward queries to the [application's query router](../advanced/00-baseapp.md#query-routing), which routes them to the appropriate [querier](#querier) the `queryRoute` parameter supplied. #### gRPC @@ -230,13 +246,13 @@ Some external clients may not wish to use gRPC. In this case, the Cosmos SDK pro The REST endpoints are defined in the Protobuf files, along with the gRPC services, using Protobuf annotations. Modules that want to expose REST queries should add `google.api.http` annotations to their `rpc` methods. By default, all REST endpoints defined in the SDK have a URL starting with the `/cosmos/` prefix. -The Cosmos SDK also provides a development endpoint to generate [Swagger](https://swagger.io/) definition files for these REST endpoints. This endpoint can be enabled inside the [`app.toml`](../run-node/01-run-node.md#configuring-the-node-using-apptoml) config file, under the `api.swagger` key. +The Cosmos SDK also provides a development endpoint to generate [Swagger](https://swagger.io/) definition files for these REST endpoints. This endpoint can be enabled inside the [`app.toml`](../../user/run-node/01-run-node.md#configuring-the-node-using-apptoml-and-configtoml) config file, under the `api.swagger` key. ## Application Interface [Interfaces](#command-line-grpc-services-and-rest-interfaces) let end-users interact with full-node clients. This means querying data from the full-node or creating and sending new transactions to be relayed by the full-node and eventually included in a block. -The main interface is the [Command-Line Interface](../core/07-cli.md). The CLI of a Cosmos SDK application is built by aggregating [CLI commands](#cli) defined in each of the modules used by the application. The CLI of an application is the same as the daemon (e.g. `appd`), and is defined in a file called `appd/main.go`. The file contains the following: +The main interface is the [Command-Line Interface](../advanced/07-cli.md). The CLI of a Cosmos SDK application is built by aggregating [CLI commands](#cli) defined in each of the modules used by the application. The CLI of an application is the same as the daemon (e.g. `appd`), and is defined in a file called `appd/main.go`. The file contains the following: * **A `main()` function**, which is executed to build the `appd` interface client. This function prepares each command and adds them to the `rootCmd` before building them. At the root of `appd`, the function adds generic commands like `status`, `keys`, and `config`, query commands, tx commands, and `rest-server`. * **Query commands**, which are added by calling the `queryCmd` function. This function returns a Cobra command that contains the query commands defined in each of the application's modules (passed as an array of `sdk.ModuleClients` from the `main()` function), as well as some other lower level query commands such as block or validator queries. Query command are called by using the command `appd query [query]` of the CLI. @@ -258,6 +274,6 @@ The following is the `go.mod` of the [Cosmos Hub](https://github.com/cosmos/gaia https://github.com/cosmos/gaia/blob/26ae7c2/go.mod#L1-L28 ``` -For building the application, a [Makefile](https://en.wikipedia.org/wiki/Makefile) is generally used. The Makefile primarily ensures that the `go.mod` is run before building the two entrypoints to the application, [`appd`](#node-client) and [`appd`](#application-interface). +For building the application, a [Makefile](https://en.wikipedia.org/wiki/Makefile) is generally used. The Makefile primarily ensures that the `go.mod` is run before building the two entrypoints to the application, [`Node Client`](#node-client) and [`Application Interface`](#application-interface). Here is an example of the [Cosmos Hub Makefile](https://github.com/cosmos/gaia/blob/main/Makefile). diff --git a/docs/docs/basics/01-tx-lifecycle.md b/docs/docs/learn/beginner/01-tx-lifecycle.md similarity index 68% rename from docs/docs/basics/01-tx-lifecycle.md rename to docs/docs/learn/beginner/01-tx-lifecycle.md index 29ed40370dea..2f86f168a1d7 100644 --- a/docs/docs/basics/01-tx-lifecycle.md +++ b/docs/docs/learn/beginner/01-tx-lifecycle.md @@ -5,12 +5,10 @@ sidebar_position: 1 # Transaction Lifecycle :::note Synopsis -This document describes the lifecycle of a transaction from creation to committed state changes. Transaction definition is described in a [different doc](../core/01-transactions.md). The transaction is referred to as `Tx`. +This document describes the lifecycle of a transaction from creation to committed state changes. Transaction definition is described in a [different doc](../advanced/01-transactions.md). The transaction is referred to as `Tx`. ::: -:::note - -### Pre-requisite Readings +:::note Pre-requisite Readings * [Anatomy of a Cosmos SDK Application](./00-app-anatomy.md) ::: @@ -19,7 +17,7 @@ This document describes the lifecycle of a transaction from creation to committe ### Transaction Creation -One of the main application interfaces is the command-line interface. The transaction `Tx` can be created by the user inputting a command in the following format from the [command-line](../core/07-cli.md), providing the type of transaction in `[command]`, arguments in `[args]`, and configurations such as gas prices in `[flags]`: +One of the main application interfaces is the command-line interface. The transaction `Tx` can be created by the user inputting a command in the following format from the [command-line](../advanced/07-cli.md), providing the type of transaction in `[command]`, arguments in `[args]`, and configurations such as gas prices in `[flags]`: ```bash [appname] tx [command] [args] [flags] @@ -31,7 +29,7 @@ There are several required and optional flags for transaction creation. The `--f #### Gas and Fees -Additionally, there are several [flags](../core/07-cli.md) users can use to indicate how much they are willing to pay in [fees](./04-gas-fees.md): +Additionally, there are several [flags](../advanced/07-cli.md) users can use to indicate how much they are willing to pay in [fees](./04-gas-fees.md): * `--gas` refers to how much [gas](./04-gas-fees.md), which represents computational resources, `Tx` consumes. Gas is dependent on the transaction and is not precisely calculated until execution, but can be estimated by providing `auto` as the value for `--gas`. * `--gas-adjustment` (optional) can be used to scale `gas` up in order to avoid underestimating. For example, users can specify their gas adjustment as 1.5 to use 1.5 times the estimated gas. @@ -53,7 +51,7 @@ appd tx send 1000uatom --from --gas auto --ga #### Other Transaction Creation Methods -The command-line is an easy way to interact with an application, but `Tx` can also be created using a [gRPC or REST interface](../core/06-grpc_rest.md) or some other entry point defined by the application developer. From the user's perspective, the interaction depends on the web interface or wallet they are using (e.g. creating `Tx` using [Lunie.io](https://lunie.io/#/) and signing it with a Ledger Nano S). +The command-line is an easy way to interact with an application, but `Tx` can also be created using a [gRPC or REST interface](../advanced/06-grpc_rest.md) or some other entry point defined by the application developer. From the user's perspective, the interaction depends on the web interface or wallet they are using (e.g. creating `Tx` using [Lunie.io](https://lunie.io/#/) and signing it with a Ledger Nano S). ## Addition to Mempool @@ -73,7 +71,7 @@ are not empty, enforcing nonnegative numbers, and other logic specified in the d **_Stateful_** checks validate transactions and messages based on a committed state. Examples include checking that the relevant values exist and can be transacted with, the address has sufficient funds, and the sender is authorized or has the correct ownership to transact. -At any given moment, full-nodes typically have [multiple versions](../core/00-baseapp.md#state-updates) +At any given moment, full-nodes typically have [multiple versions](../advanced/00-baseapp.md#state-updates) of the application's internal state for different purposes. For example, nodes execute state changes while in the process of verifying transactions, but still need a copy of the last committed state in order to answer queries - they should not respond using state with uncommitted changes. @@ -84,16 +82,16 @@ through several steps, beginning with decoding `Tx`. ### Decoding -When `Tx` is received by the application from the underlying consensus engine (e.g. CometBFT ), it is still in its [encoded](../core/05-encoding.md) `[]byte` form and needs to be unmarshaled in order to be processed. Then, the [`runTx`](../core/00-baseapp.md#runtx-antehandler-runmsgs-posthandler) function is called to run in `runTxModeCheck` mode, meaning the function runs all checks but exits before executing messages and writing state changes. +When `Tx` is received by the application from the underlying consensus engine (e.g. CometBFT ), it is still in its [encoded](../advanced/05-encoding.md) `[]byte` form and needs to be unmarshaled in order to be processed. Then, the [`runTx`](../advanced/00-baseapp.md#runtx-antehandler-runmsgs-posthandler) function is called to run in `runTxModeCheck` mode, meaning the function runs all checks but exits before executing messages and writing state changes. ### ValidateBasic (deprecated) -Messages ([`sdk.Msg`](../core/01-transactions.md#messages)) are extracted from transactions (`Tx`). The `ValidateBasic` method of the `sdk.Msg` interface implemented by the module developer is run for each transaction. -To discard obviously invalid messages, the `BaseApp` type calls the `ValidateBasic` method very early in the processing of the message in the [`CheckTx`](../core/00-baseapp.md#checktx) and [`DeliverTx`](../core/00-baseapp.md#delivertx) transactions. +Messages ([`sdk.Msg`](../advanced/01-transactions.md#messages)) are extracted from transactions (`Tx`). The `ValidateBasic` method of the `sdk.Msg` interface implemented by the module developer is run for each transaction. +To discard obviously invalid messages, the `BaseApp` type calls the `ValidateBasic` method very early in the processing of the message in the [`CheckTx`](../advanced/00-baseapp.md#checktx) and [`DeliverTx`](../advanced/00-baseapp.md#delivertx) transactions. `ValidateBasic` can include only **stateless** checks (the checks that do not require access to the state). :::warning -The `ValidateBasic` method on messages has been deprecated in favor of validating messages directly in their respective [`Msg` services](../building-modules/03-msg-services.md#Validation). +The `ValidateBasic` method on messages has been deprecated in favor of validating messages directly in their respective [`Msg` services](../../build/building-modules/03-msg-services.md#Validation). Read [RFC 001](https://docs.cosmos.network/main/rfc/rfc-001-tx-validation) for more details. ::: @@ -104,7 +102,7 @@ Read [RFC 001](https://docs.cosmos.network/main/rfc/rfc-001-tx-validation) for m #### Guideline -`ValidateBasic` should not be used anymore. Message validation should be performed in the `Msg` service when [handling a message](../building-modules/msg-services#Validation) in a module Msg Server. +`ValidateBasic` should not be used anymore. Message validation should be performed in the `Msg` service when [handling a message](../../build/building-modules/msg-services#Validation) in a module Msg Server. ### AnteHandler @@ -114,9 +112,13 @@ A copy of the cached context is provided to the `AnteHandler`, which performs li For example, the [`auth`](https://github.com/cosmos/cosmos-sdk/tree/main/x/auth/spec) module `AnteHandler` checks and increments sequence numbers, checks signatures and account numbers, and deducts fees from the first signer of the transaction - all state changes are made using the `checkState`. +:::warning +Ante handlers only run on a transaction. If a transaction embed multiple messages (like some x/authz, x/gov transactions for instance), the ante handlers only have awareness of the outer message. Inner messages are mostly directly routed to the [message router](https://docs.cosmos.network/main/learn/advanced/baseapp#msg-service-router) and will skip the chain of ante handlers. Keep that in mind when designing your own ante handler. +::: + ### Gas -The [`Context`](../core/02-context.md), which keeps a `GasMeter` that tracks how much gas is used during the execution of `Tx`, is initialized. The user-provided amount of gas for `Tx` is known as `GasWanted`. If `GasConsumed`, the amount of gas consumed during execution, ever exceeds `GasWanted`, the execution stops and the changes made to the cached copy of the state are not committed. Otherwise, `CheckTx` sets `GasUsed` equal to `GasConsumed` and returns it in the result. After calculating the gas and fee values, validator-nodes check that the user-specified `gas-prices` is greater than their locally defined `min-gas-prices`. +The [`Context`](../advanced/02-context.md), which keeps a `GasMeter` that tracks how much gas is used during the execution of `Tx`, is initialized. The user-provided amount of gas for `Tx` is known as `GasWanted`. If `GasConsumed`, the amount of gas consumed during execution, ever exceeds `GasWanted`, the execution stops and the changes made to the cached copy of the state are not committed. Otherwise, `CheckTx` sets `GasUsed` equal to `GasConsumed` and returns it in the result. After calculating the gas and fee values, validator-nodes check that the user-specified `gas-prices` is greater than their locally defined `min-gas-prices`. ### Discard or Addition to Mempool @@ -157,59 +159,62 @@ must be in this proposer's mempool. ## State Changes The next step of consensus is to execute the transactions to fully validate them. All full-nodes -that receive a block proposal from the correct proposer execute the transactions by calling the ABCI functions -[`BeginBlock`](./00-app-anatomy.md#beginblocker-and-endblocker), `DeliverTx` for each transaction, -and [`EndBlock`](./00-app-anatomy.md#beginblocker-and-endblocker). While each full-node runs everything -locally, this process yields a single, unambiguous result, since the messages' state transitions are deterministic and transactions are -explicitly ordered in the block proposal. +that receive a block proposal from the correct proposer execute the transactions by calling the ABCI function `FinalizeBlock`. +As mentioned throughout the documentation `BeginBlock`, `ExecuteTx` and `EndBlock` are called within FinalizeBlock. +Although every full-node operates individually and locally, the outcome is always consistent and unequivocal. This is because the state changes brought about by the messages are predictable, and the transactions are specifically sequenced in the proposed block. ```text - ----------------------- - |Receive Block Proposal| - ----------------------- - | - v - ----------------------- - | BeginBlock | - ----------------------- - | - v - ----------------------- - | DeliverTx(tx0) | - | DeliverTx(tx1) | - | DeliverTx(tx2) | - | DeliverTx(tx3) | - | . | - | . | - | . | - ----------------------- - | - v - ----------------------- - | EndBlock | - ----------------------- - | - v - ----------------------- - | Consensus | - ----------------------- - | - v - ----------------------- - | Commit | - ----------------------- + -------------------------- + | Receive Block Proposal | + -------------------------- + | + v + ------------------------- + | FinalizeBlock | + ------------------------- + | + v + ------------------- + | BeginBlock | + ------------------- + | + v + -------------------- + | ExecuteTx(tx0) | + | ExecuteTx(tx1) | + | ExecuteTx(tx2) | + | ExecuteTx(tx3) | + | . | + | . | + | . | + ------------------- + | + v + -------------------- + | EndBlock | + -------------------- + | + v + ------------------------- + | Consensus | + ------------------------- + | + v + ------------------------- + | Commit | + ------------------------- ``` -### DeliverTx +### Transaction Execution -The `DeliverTx` ABCI function defined in [`BaseApp`](../core/00-baseapp.md) does the bulk of the +The `FinalizeBlock` ABCI function defined in [`BaseApp`](../advanced/00-baseapp.md) does the bulk of the state transitions: it is run for each transaction in the block in sequential order as committed -to during consensus. Under the hood, `DeliverTx` is almost identical to `CheckTx` but calls the -[`runTx`](../core/00-baseapp.md#runtx) function in deliver mode instead of check mode. -Instead of using their `checkState`, full-nodes use `deliverState`: +to during consensus. Under the hood, transaction execution is almost identical to `CheckTx` but calls the +[`runTx`](../advanced/00-baseapp.md#runtx) function in deliver mode instead of check mode. +Instead of using their `checkState`, full-nodes use `finalizeblock`: -* **Decoding:** Since `DeliverTx` is an ABCI call, `Tx` is received in the encoded `[]byte` form. - Nodes first unmarshal the transaction, using the [`TxConfig`](./app-anatomy#register-codec) defined in the app, then call `runTx` in `runTxModeDeliver`, which is very similar to `CheckTx` but also executes and writes state changes. +* **Decoding:** Since `FinalizeBlock` is an ABCI call, `Tx` is received in the encoded `[]byte` form. + Nodes first unmarshal the transaction, using the [`TxConfig`](./app-anatomy#register-codec) defined in the app, then call `runTx` in `execModeFinalize`, which is very similar to `CheckTx` but also executes and writes state changes. * **Checks and `AnteHandler`:** Full-nodes call `validateBasicMsgs` and `AnteHandler` again. This second check happens because they may not have seen the same transactions during the addition to Mempool stage @@ -217,19 +222,19 @@ Instead of using their `checkState`, full-nodes use `deliverState`: `AnteHandler` does not compare `gas-prices` to the node's `min-gas-prices` since that value is local to each node - differing values across nodes yield nondeterministic results. -* **`MsgServiceRouter`:** After `CheckTx` exits, `DeliverTx` continues to run - [`runMsgs`](../core/00-baseapp.md#runtx-antehandler-runmsgs-posthandler) to fully execute each `Msg` within the transaction. +* **`MsgServiceRouter`:** After `CheckTx` exits, `FinalizeBlock` continues to run + [`runMsgs`](../advanced/00-baseapp.md#runtx-antehandler-runmsgs-posthandler) to fully execute each `Msg` within the transaction. Since the transaction may have messages from different modules, `BaseApp` needs to know which module - to find the appropriate handler. This is achieved using `BaseApp`'s `MsgServiceRouter` so that it can be processed by the module's Protobuf [`Msg` service](../building-modules/03-msg-services.md). - For `LegacyMsg` routing, the `Route` function is called via the [module manager](../building-modules/01-module-manager.md) to retrieve the route name and find the legacy [`Handler`](../building-modules/03-msg-services.md#handler-type) within the module. + to find the appropriate handler. This is achieved using `BaseApp`'s `MsgServiceRouter` so that it can be processed by the module's Protobuf [`Msg` service](../../build/building-modules/03-msg-services.md). + For `LegacyMsg` routing, the `Route` function is called via the [module manager](../../build/building-modules/01-module-manager.md) to retrieve the route name and find the legacy [`Handler`](../../build/building-modules/03-msg-services.md#handler-type) within the module. -* **`Msg` service:** Protobuf `Msg` service is responsible for executing each message in the `Tx` and causes state transitions to persist in `deliverTxState`. +* **`Msg` service:** Protobuf `Msg` service is responsible for executing each message in the `Tx` and causes state transitions to persist in `finalizeBlockState`. -* **PostHandlers:** [`PostHandler`](../core/00-baseapp.md#posthandler)s run after the execution of the message. If they fail, the state change of `runMsgs`, as well of `PostHandlers`, are both reverted. +* **PostHandlers:** [`PostHandler`](../advanced/00-baseapp.md#posthandler)s run after the execution of the message. If they fail, the state change of `runMsgs`, as well of `PostHandlers`, are both reverted. * **Gas:** While a `Tx` is being delivered, a `GasMeter` is used to keep track of how much gas is being used; if execution completes, `GasUsed` is set and returned in the - `abci.ResponseDeliverTx`. If execution halts because `BlockGasMeter` or `GasMeter` has run out or something else goes + `abci.ExecTxResult`. If execution halts because `BlockGasMeter` or `GasMeter` has run out or something else goes wrong, a deferred function at the end appropriately errors or panics. If there are any failed state changes resulting from a `Tx` being invalid or `GasMeter` running out, @@ -246,8 +251,8 @@ not they should commit the state changes. When they receive enough validator votes (2/3+ _precommits_ weighted by voting power), full nodes commit to a new block to be added to the blockchain and finalize the state transitions in the application layer. A new state root is generated to serve as -a merkle proof for the state transitions. Applications use the [`Commit`](../core/00-baseapp.md#commit) -ABCI method inherited from [Baseapp](../core/00-baseapp.md); it syncs all the state transitions by +a merkle proof for the state transitions. Applications use the [`Commit`](../advanced/00-baseapp.md#commit) +ABCI method inherited from [Baseapp](../advanced/00-baseapp.md); it syncs all the state transitions by writing the `deliverState` into the application's internal state. As soon as the state changes are committed, `checkState` starts afresh from the most recently committed state and `deliverState` resets to `nil` in order to be consistent and reflect the changes. diff --git a/docs/docs/basics/02-query-lifecycle.md b/docs/docs/learn/beginner/02-query-lifecycle.md similarity index 62% rename from docs/docs/basics/02-query-lifecycle.md rename to docs/docs/learn/beginner/02-query-lifecycle.md index 27db1caf4e4f..04e4fc9ed644 100644 --- a/docs/docs/basics/02-query-lifecycle.md +++ b/docs/docs/learn/beginner/02-query-lifecycle.md @@ -8,18 +8,16 @@ sidebar_position: 1 This document describes the lifecycle of a query in a Cosmos SDK application, from the user interface to application stores and back. The query is referred to as `MyQuery`. ::: -:::note - -### Pre-requisite Readings +:::note Pre-requisite Readings * [Transaction Lifecycle](./01-tx-lifecycle.md) ::: ## Query Creation -A [**query**](../building-modules/02-messages-and-queries.md#queries) is a request for information made by end-users of applications through an interface and processed by a full-node. Users can query information about the network, the application itself, and application state directly from the application's stores or modules. Note that queries are different from [transactions](../core/01-transactions.md) (view the lifecycle [here](./01-tx-lifecycle.md)), particularly in that they do not require consensus to be processed (as they do not trigger state-transitions); they can be fully handled by one full-node. +A [**query**](../../build/building-modules/02-messages-and-queries.md#queries) is a request for information made by end-users of applications through an interface and processed by a full-node. Users can query information about the network, the application itself, and application state directly from the application's stores or modules. Note that queries are different from [transactions](../advanced/01-transactions.md) (view the lifecycle [here](./01-tx-lifecycle.md)), particularly in that they do not require consensus to be processed (as they do not trigger state-transitions); they can be fully handled by one full-node. -For the purpose of explaining the query lifecycle, let's say the query, `MyQuery`, is requesting a list of delegations made by a certain delegator address in the application called `simapp`. As is to be expected, the [`staking`](../modules/staking/README.md) module handles this query. But first, there are a few ways `MyQuery` can be created by users. +For the purpose of explaining the query lifecycle, let's say the query, `MyQuery`, is requesting a list of delegations made by a certain delegator address in the application called `simapp`. As is to be expected, the [`staking`](../../build/modules/staking/README.md) module handles this query. But first, there are a few ways `MyQuery` can be created by users. ### CLI @@ -29,7 +27,7 @@ The main interface for an application is the command-line interface. Users conne simd query staking delegations ``` -This query command was defined by the [`staking`](../modules/staking/README.md) module developer and added to the list of subcommands by the application developer when creating the CLI. +This query command was defined by the [`staking`](../../build/modules/staking/README.md) module developer and added to the list of subcommands by the application developer when creating the CLI. Note that the general format is as follows: @@ -37,13 +35,13 @@ Note that the general format is as follows: simd query [moduleName] [command] --flag ``` -To provide values such as `--node` (the full-node the CLI connects to), the user can use the [`app.toml`](../run-node/02-interact-node.md#configuring-the-node-using-apptoml) config file to set them or provide them as flags. +To provide values such as `--node` (the full-node the CLI connects to), the user can use the [`app.toml`](../../user/run-node/01-run-node.md#configuring-the-node-using-apptoml-and-configtoml) config file to set them or provide them as flags. -The CLI understands a specific set of commands, defined in a hierarchical structure by the application developer: from the [root command](../core/07-cli.md#root-command) (`simd`), the type of command (`Myquery`), the module that contains the command (`staking`), and command itself (`delegations`). Thus, the CLI knows exactly which module handles this command and directly passes the call there. +The CLI understands a specific set of commands, defined in a hierarchical structure by the application developer: from the [root command](../advanced/07-cli.md#root-command) (`simd`), the type of command (`Myquery`), the module that contains the command (`staking`), and command itself (`delegations`). Thus, the CLI knows exactly which module handles this command and directly passes the call there. ### gRPC -Another interface through which users can make queries is [gRPC](https://grpc.io) requests to a [gRPC server](../core/06-grpc_rest.md#grpc-server). The endpoints are defined as [Protocol Buffers](https://developers.google.com/protocol-buffers) service methods inside `.proto` files, written in Protobuf's own language-agnostic interface definition language (IDL). The Protobuf ecosystem developed tools for code-generation from `*.proto` files into various languages. These tools allow to build gRPC clients easily. +Another interface through which users can make queries is [gRPC](https://grpc.io) requests to a [gRPC server](../advanced/06-grpc_rest.md#grpc-server). The endpoints are defined as [Protocol Buffers](https://developers.google.com/protocol-buffers) service methods inside `.proto` files, written in Protobuf's own language-agnostic interface definition language (IDL). The Protobuf ecosystem developed tools for code-generation from `*.proto` files into various languages. These tools allow to build gRPC clients easily. One such tool is [grpcurl](https://github.com/fullstorydev/grpcurl), and a gRPC request for `MyQuery` using this client looks like: @@ -59,7 +57,7 @@ grpcurl \ ### REST -Another interface through which users can make queries is through HTTP Requests to a [REST server](../core/06-grpc_rest.md#rest-server). The REST server is fully auto-generated from Protobuf services, using [gRPC-gateway](https://github.com/grpc-ecosystem/grpc-gateway). +Another interface through which users can make queries is through HTTP Requests to a [REST server](../advanced/06-grpc_rest.md#rest-server). The REST server is fully auto-generated from Protobuf services, using [gRPC-gateway](https://github.com/grpc-ecosystem/grpc-gateway). An example HTTP request for `MyQuery` looks like: @@ -75,17 +73,17 @@ The preceding examples show how an external user can interact with a node by que The first thing that is created in the execution of a CLI command is a `client.Context`. A `client.Context` is an object that stores all the data needed to process a request on the user side. In particular, a `client.Context` stores the following: -* **Codec**: The [encoder/decoder](../core/05-encoding.md) used by the application, used to marshal the parameters and query before making the CometBFT RPC request and unmarshal the returned response into a JSON object. The default codec used by the CLI is Protobuf. -* **Account Decoder**: The account decoder from the [`auth`](../modules/auth/README.md) module, which translates `[]byte`s into accounts. +* **Codec**: The [encoder/decoder](../advanced/05-encoding.md) used by the application, used to marshal the parameters and query before making the CometBFT RPC request and unmarshal the returned response into a JSON object. The default codec used by the CLI is Protobuf. +* **Account Decoder**: The account decoder from the [`auth`](../../build/modules/auth/README.md) module, which translates `[]byte`s into accounts. * **RPC Client**: The CometBFT RPC Client, or node, to which requests are relayed. -* **Keyring**: A [Key Manager](../basics/03-accounts.md#keyring) used to sign transactions and handle other operations with keys. +* **Keyring**: A [Key Manager]../beginner/03-accounts.md#keyring) used to sign transactions and handle other operations with keys. * **Output Writer**: A [Writer](https://pkg.go.dev/io/#Writer) used to output the response. * **Configurations**: The flags configured by the user for this command, including `--height`, specifying the height of the blockchain to query, and `--indent`, which indicates to add an indent to the JSON response. The `client.Context` also contains various functions such as `Query()`, which retrieves the RPC Client and makes an ABCI call to relay a query to a full-node. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/client/context.go#L24-L64 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/client/context.go#L25-L68 ``` The `client.Context`'s primary role is to store data used during interactions with the end-user and provide methods to interact with this data - it is used before and after the query is processed by the full-node. Specifically, in handling `MyQuery`, the `client.Context` is utilized to encode the query parameters, retrieve the full-node, and write the output. Prior to being relayed to a full-node, the query needs to be encoded into a `[]byte` form, as full-nodes are application-agnostic and do not understand specific types. The full-node (RPC Client) itself is retrieved using the `client.Context`, which knows which node the user CLI is connected to. The query is relayed to this full-node to be processed. Finally, the `client.Context` contains a `Writer` to write output when the response is returned. These steps are further described in later sections. @@ -101,7 +99,7 @@ In our case (querying an address's delegations), `MyQuery` contains an [address] Here is what the code looks like for the CLI command: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/staking/client/cli/query.go#L323-L326 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/staking/client/cli/query.go#L315-L318 ``` #### gRPC Query Client Creation @@ -109,28 +107,28 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/staking/client/cli/query The Cosmos SDK leverages code generated from Protobuf services to make queries. The `staking` module's `MyQuery` service generates a `queryClient`, which the CLI uses to make queries. Here is the relevant code: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/staking/client/cli/query.go#L317-L343 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/staking/client/cli/query.go#L308-L343 ``` -Under the hood, the `client.Context` has a `Query()` function used to retrieve the pre-configured node and relay a query to it; the function takes the query fully-qualified service method name as path (in our case: `/cosmos.staking.v1beta1.Query/Delegations`), and arguments as parameters. It first retrieves the RPC Client (called the [**node**](../core/03-node.md)) configured by the user to relay this query to, and creates the `ABCIQueryOptions` (parameters formatted for the ABCI call). The node is then used to make the ABCI call, `ABCIQueryWithOptions()`. +Under the hood, the `client.Context` has a `Query()` function used to retrieve the pre-configured node and relay a query to it; the function takes the query fully-qualified service method name as path (in our case: `/cosmos.staking.v1beta1.Query/Delegations`), and arguments as parameters. It first retrieves the RPC Client (called the [**node**](../advanced/03-node.md)) configured by the user to relay this query to, and creates the `ABCIQueryOptions` (parameters formatted for the ABCI call). The node is then used to make the ABCI call, `ABCIQueryWithOptions()`. Here is what the code looks like: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/client/query.go#L79-L113 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/client/query.go#L79-L113 ``` ## RPC -With a call to `ABCIQueryWithOptions()`, `MyQuery` is received by a [full-node](../core/05-encoding.md) which then processes the request. Note that, while the RPC is made to the consensus engine (e.g. CometBFT) of a full-node, queries are not part of consensus and so are not broadcasted to the rest of the network, as they do not require anything the network needs to agree upon. +With a call to `ABCIQueryWithOptions()`, `MyQuery` is received by a [full-node](../advanced/05-encoding.md) which then processes the request. Note that, while the RPC is made to the consensus engine (e.g. CometBFT) of a full-node, queries are not part of consensus and so are not broadcasted to the rest of the network, as they do not require anything the network needs to agree upon. Read more about ABCI Clients and CometBFT RPC in the [CometBFT documentation](https://docs.cometbft.com/v0.37/spec/rpc/). ## Application Query Handling -When a query is received by the full-node after it has been relayed from the underlying consensus engine, it is at that point being handled within an environment that understands application-specific types and has a copy of the state. [`baseapp`](../core/00-baseapp.md) implements the ABCI [`Query()`](../core/00-baseapp.md#query) function and handles gRPC queries. The query route is parsed, and it matches the fully-qualified service method name of an existing service method (most likely in one of the modules), then `baseapp` relays the request to the relevant module. +When a query is received by the full-node after it has been relayed from the underlying consensus engine, it is at that point being handled within an environment that understands application-specific types and has a copy of the state. [`baseapp`](../advanced/00-baseapp.md) implements the ABCI [`Query()`](../advanced/00-baseapp.md#query) function and handles gRPC queries. The query route is parsed, and it matches the fully-qualified service method name of an existing service method (most likely in one of the modules), then `baseapp` relays the request to the relevant module. -Since `MyQuery` has a Protobuf fully-qualified service method name from the `staking` module (recall `/cosmos.staking.v1beta1.Query/Delegations`), `baseapp` first parses the path, then uses its own internal `GRPCQueryRouter` to retrieve the corresponding gRPC handler, and routes the query to the module. The gRPC handler is responsible for recognizing this query, retrieving the appropriate values from the application's stores, and returning a response. Read more about query services [here](../building-modules/04-query-services.md). +Since `MyQuery` has a Protobuf fully-qualified service method name from the `staking` module (recall `/cosmos.staking.v1beta1.Query/Delegations`), `baseapp` first parses the path, then uses its own internal `GRPCQueryRouter` to retrieve the corresponding gRPC handler, and routes the query to the module. The gRPC handler is responsible for recognizing this query, retrieving the appropriate values from the application's stores, and returning a response. Read more about query services [here](../../build/building-modules/04-query-services.md). Once a result is received from the querier, `baseapp` begins the process of returning a response to the user. @@ -140,10 +138,10 @@ Since `Query()` is an ABCI function, `baseapp` returns the response as an [`abci ### CLI Response -The application [`codec`](../core/05-encoding.md) is used to unmarshal the response to a JSON and the `client.Context` prints the output to the command line, applying any configurations such as the output type (text, JSON or YAML). +The application [`codec`](../advanced/05-encoding.md) is used to unmarshal the response to a JSON and the `client.Context` prints the output to the command line, applying any configurations such as the output type (text, JSON or YAML). ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/client/context.go#L330-L358 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/client/context.go#L341-L349 ``` And that's a wrap! The result of the query is outputted to the console by the CLI. diff --git a/docs/docs/basics/03-accounts.md b/docs/docs/learn/beginner/03-accounts.md similarity index 83% rename from docs/docs/basics/03-accounts.md rename to docs/docs/learn/beginner/03-accounts.md index 3f908e225608..7280108ac744 100644 --- a/docs/docs/basics/03-accounts.md +++ b/docs/docs/learn/beginner/03-accounts.md @@ -8,9 +8,8 @@ sidebar_position: 1 This document describes the in-built account and public key system of the Cosmos SDK. ::: -:::note +:::note Pre-requisite Readings -### Pre-requisite Readings * [Anatomy of a Cosmos SDK Application](./00-app-anatomy.md) @@ -18,7 +17,7 @@ This document describes the in-built account and public key system of the Cosmos ## Account Definition -In the Cosmos SDK, an _account_ designates a pair of _public key_ `PubKey` and _private key_ `PrivKey`. The `PubKey` can be derived to generate various `Addresses`, which are used to identify users (among other parties) in the application. `Addresses` are also associated with [`message`s](../building-modules/02-messages-and-queries.md#messages) to identify the sender of the `message`. The `PrivKey` is used to generate [digital signatures](#signatures) to prove that an `Address` associated with the `PrivKey` approved of a given `message`. +In the Cosmos SDK, an _account_ designates a pair of _public key_ `PubKey` and _private key_ `PrivKey`. The `PubKey` can be derived to generate various `Addresses`, which are used to identify users (among other parties) in the application. `Addresses` are also associated with [`message`s](../../build/building-modules/02-messages-and-queries.md#messages) to identify the sender of the `message`. The `PrivKey` is used to generate [digital signatures](#signatures) to prove that an `Address` associated with the `PrivKey` approved of a given `message`. For HD key derivation the Cosmos SDK uses a standard called [BIP32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki). The BIP32 allows users to create an HD wallet (as specified in [BIP44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki)) - a set of accounts derived from an initial secret seed. A seed is usually created from a 12- or 24-word mnemonic. A single seed can derive any number of `PrivKey`s using a one-way cryptographic function. Then, a `PubKey` can be derived from the `PrivKey`. Naturally, the mnemonic is the most sensitive information, as private keys can always be re-generated if the mnemonic is preserved. @@ -72,9 +71,9 @@ In the node, all data is stored using Protocol Buffers serialization. The Cosmos SDK supports the following digital key schemes for creating digital signatures: -* `secp256k1`, as implemented in the [Cosmos SDK's `crypto/keys/secp256k1` package](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/crypto/keys/secp256k1/secp256k1.go). -* `secp256r1`, as implemented in the [Cosmos SDK's `crypto/keys/secp256r1` package](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/crypto/keys/secp256r1/pubkey.go), -* `tm-ed25519`, as implemented in the [Cosmos SDK `crypto/keys/ed25519` package](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/crypto/keys/ed25519/ed25519.go). This scheme is supported only for the consensus validation. +* `secp256k1`, as implemented in the [Cosmos SDK's `crypto/keys/secp256k1` package](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/crypto/keys/secp256k1/secp256k1.go). +* `secp256r1`, as implemented in the [Cosmos SDK's `crypto/keys/secp256r1` package](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/crypto/keys/secp256r1/pubkey.go), +* `tm-ed25519`, as implemented in the [Cosmos SDK `crypto/keys/ed25519` package](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/crypto/keys/ed25519/ed25519.go). This scheme is supported only for the consensus validation. | | Address length in bytes | Public key length in bytes | Used for transaction authentication | Used for consensus (cometbft) | | :----------: | :---------------------: | :------------------------: | :---------------------------------: | :-----------------------------: | @@ -95,7 +94,7 @@ Each account is identified using `Address` which is a sequence of bytes derived These types implement the `Address` interface: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/address.go#L108-L124 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/address.go#L126-L134 ``` Address construction algorithm is defined in [ADR-28](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-028-public-key-addresses.md). @@ -110,7 +109,7 @@ Of note, the `Marshal()` and `Bytes()` method both return the same raw `[]byte` For user interaction, addresses are formatted using [Bech32](https://en.bitcoin.it/wiki/Bech32) and implemented by the `String` method. The Bech32 method is the only supported format to use when interacting with a blockchain. The Bech32 human-readable part (Bech32 prefix) is used to denote an address type. Example: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/address.go#L281-L295 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/address.go#L299-L316 ``` | | Address Bech32 Prefix | @@ -124,7 +123,7 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/address.go#L281-L295 Public keys in Cosmos SDK are defined by `cryptotypes.PubKey` interface. Since public keys are saved in a store, `cryptotypes.PubKey` extends the `proto.Message` interface: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/crypto/types/types.go#L8-L17 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/crypto/types/types.go#L8-L17 ``` A compressed format is used for `secp256k1` and `secp256r1` serialization. @@ -135,10 +134,10 @@ A compressed format is used for `secp256k1` and `secp256r1` serialization. This prefix is followed by the `x`-coordinate. Public Keys are not used to reference accounts (or users) and in general are not used when composing transaction messages (with few exceptions: `MsgCreateValidator`, `Validator` and `Multisig` messages). -For user interactions, `PubKey` is formatted using Protobufs JSON ([ProtoMarshalJSON](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/codec/json.go#L14-L34) function). Example: +For user interactions, `PubKey` is formatted using Protobufs JSON ([ProtoMarshalJSON](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/codec/json.go#L14-L34) function). Example: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/crypto/keyring/output.go#L23-L39 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/client/keys/output.go#L23-L39 ``` ## Keyring @@ -146,20 +145,20 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/crypto/keyring/output.go#L A `Keyring` is an object that stores and manages accounts. In the Cosmos SDK, a `Keyring` implementation follows the `Keyring` interface: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/crypto/keyring/keyring.go#L54-L101 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/crypto/keyring/keyring.go#L57-L105 ``` The default implementation of `Keyring` comes from the third-party [`99designs/keyring`](https://github.com/99designs/keyring) library. A few notes on the `Keyring` methods: -* `Sign(uid string, msg []byte) ([]byte, types.PubKey, error)` strictly deals with the signature of the `msg` bytes. You must prepare and encode the transaction into a canonical `[]byte` form. Because protobuf is not deterministic, it has been decided in [ADR-020](../architecture/adr-020-protobuf-transaction-encoding.md) that the canonical `payload` to sign is the `SignDoc` struct, deterministically encoded using [ADR-027](../architecture/adr-027-deterministic-protobuf-serialization.md). Note that signature verification is not implemented in the Cosmos SDK by default, it is deferred to the [`anteHandler`](../core/00-baseapp.md#antehandler). +* `Sign(uid string, msg []byte) ([]byte, types.PubKey, error)` strictly deals with the signature of the `msg` bytes. You must prepare and encode the transaction into a canonical `[]byte` form. Because protobuf is not deterministic, it has been decided in [ADR-020](../../build/architecture/adr-020-protobuf-transaction-encoding.md) that the canonical `payload` to sign is the `SignDoc` struct, deterministically encoded using [ADR-027](../../build/architecture/adr-027-deterministic-protobuf-serialization.md). Note that signature verification is not implemented in the Cosmos SDK by default, it is deferred to the [`anteHandler`](../advanced/00-baseapp.md#antehandler). ```protobuf reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/tx/v1beta1/tx.proto#L48-L65 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/proto/cosmos/tx/v1beta1/tx.proto#L50-L66 ``` -* `NewAccount(uid, mnemonic, bip39Passphrase, hdPath string, algo SignatureAlgo) (*Record, error)` creates a new account based on the [`bip44 path`](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) and persists it on disk. The `PrivKey` is **never stored unencrypted**, instead it is [encrypted with a passphrase](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/crypto/armor.go) before being persisted. In the context of this method, the key type and sequence number refer to the segment of the BIP44 derivation path (for example, `0`, `1`, `2`, ...) that is used to derive a private and a public key from the mnemonic. Using the same mnemonic and derivation path, the same `PrivKey`, `PubKey` and `Address` is generated. The following keys are supported by the keyring: +* `NewAccount(uid, mnemonic, bip39Passphrase, hdPath string, algo SignatureAlgo) (*Record, error)` creates a new account based on the [`bip44 path`](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) and persists it on disk. The `PrivKey` is **never stored unencrypted**, instead it is [encrypted with a passphrase](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/crypto/armor.go) before being persisted. In the context of this method, the key type and sequence number refer to the segment of the BIP44 derivation path (for example, `0`, `1`, `2`, ...) that is used to derive a private and a public key from the mnemonic. Using the same mnemonic and derivation path, the same `PrivKey`, `PubKey` and `Address` is generated. The following keys are supported by the keyring: * `secp256k1` * `ed25519` @@ -171,18 +170,19 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/tx/v1beta1/tx To create a new key type for using in keyring, `keyring.SignatureAlgo` interface must be fulfilled. ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/crypto/keyring/signing_algorithms.go#L10-L15 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/crypto/keyring/signing_algorithms.go#L10-L15 ``` The interface consists in three methods where `Name()` returns the name of the algorithm as a `hd.PubKeyType` and `Derive()` and `Generate()` must return the following functions respectively: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/crypto/hd/algo.go#L28-L31 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/crypto/hd/algo.go#L28-L31 ``` -Once the `keyring.SignatureAlgo` has been implemented it must be added to the [list of supported algos](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/crypto/keyring/keyring.go#L217) of the keyring. + +Once the `keyring.SignatureAlgo` has been implemented it must be added to the [list of supported algos](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/crypto/keyring/keyring.go#L217) of the keyring. For simplicity the implementation of a new key type should be done inside the `crypto/hd` package. -There is an example of a working `secp256k1` implementation in [algo.go](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/crypto/hd/algo.go#L38). +There is an example of a working `secp256k1` implementation in [algo.go](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/crypto/hd/algo.go#L38). #### Implementing secp256r1 algo @@ -261,7 +261,7 @@ func (s secp256r1Algo) Generate() GenerateFn { } ``` -Finally, the algo must be added to the list of [supported algos](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/crypto/keyring/keyring.go#L217) by the keyring. +Finally, the algo must be added to the list of [supported algos](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/crypto/keyring/keyring.go#L217) by the keyring. ```go // cosmos-sdk/crypto/keyring/keyring.go @@ -278,4 +278,4 @@ func newKeystore(kr keyring.Keyring, cdc codec.Codec, backend string, opts ...Op Hereafter to create new keys using your algo, you must specify it with the flag `--algo` : -`simd keys add myKey --algo secp256r1` \ No newline at end of file +`simd keys add myKey --algo secp256r1` diff --git a/docs/docs/basics/04-gas-fees.md b/docs/docs/learn/beginner/04-gas-fees.md similarity index 54% rename from docs/docs/basics/04-gas-fees.md rename to docs/docs/learn/beginner/04-gas-fees.md index 821fe9711ccb..4def021ea7bc 100644 --- a/docs/docs/basics/04-gas-fees.md +++ b/docs/docs/learn/beginner/04-gas-fees.md @@ -8,9 +8,7 @@ sidebar_position: 1 This document describes the default strategies to handle gas and fees within a Cosmos SDK application. ::: -:::note - -### Pre-requisite Readings +:::note Pre-requisite Readings * [Anatomy of a Cosmos SDK Application](./00-app-anatomy.md) @@ -21,14 +19,14 @@ This document describes the default strategies to handle gas and fees within a C In the Cosmos SDK, `gas` is a special unit that is used to track the consumption of resources during execution. `gas` is typically consumed whenever read and writes are made to the store, but it can also be consumed if expensive computation needs to be done. It serves two main purposes: * Make sure blocks are not consuming too many resources and are finalized. This is implemented by default in the Cosmos SDK via the [block gas meter](#block-gas-meter). -* Prevent spam and abuse from end-user. To this end, `gas` consumed during [`message`](../building-modules/02-messages-and-queries.md#messages) execution is typically priced, resulting in a `fee` (`fees = gas * gas-prices`). `fees` generally have to be paid by the sender of the `message`. Note that the Cosmos SDK does not enforce `gas` pricing by default, as there may be other ways to prevent spam (e.g. bandwidth schemes). Still, most applications implement `fee` mechanisms to prevent spam by using the [`AnteHandler`](#antehandler). +* Prevent spam and abuse from end-user. To this end, `gas` consumed during [`message`](../../build/building-modules/02-messages-and-queries.md#messages) execution is typically priced, resulting in a `fee` (`fees = gas * gas-prices`). `fees` generally have to be paid by the sender of the `message`. Note that the Cosmos SDK does not enforce `gas` pricing by default, as there may be other ways to prevent spam (e.g. bandwidth schemes). Still, most applications implement `fee` mechanisms to prevent spam by using the [`AnteHandler`](#antehandler). ## Gas Meter In the Cosmos SDK, `gas` is a simple alias for `uint64`, and is managed by an object called a _gas meter_. Gas meters implement the `GasMeter` interface ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/store/types/gas.go#L40-L51 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/store/types/gas.go#L40-L51 ``` where: @@ -42,7 +40,7 @@ where: * `IsPastLimit()` returns `true` if the amount of gas consumed by the gas meter instance is strictly above the limit, `false` otherwise. * `IsOutOfGas()` returns `true` if the amount of gas consumed by the gas meter instance is above or equal to the limit, `false` otherwise. -The gas meter is generally held in [`ctx`](../core/02-context.md), and consuming gas is done with the following pattern: +The gas meter is generally held in [`ctx`](../advanced/02-context.md), and consuming gas is done with the following pattern: ```go ctx.GasMeter().ConsumeGas(amount, "description") @@ -52,48 +50,52 @@ By default, the Cosmos SDK makes use of two different gas meters, the [main gas ### Main Gas Meter -`ctx.GasMeter()` is the main gas meter of the application. The main gas meter is initialized in `BeginBlock` via `setDeliverState`, and then tracks gas consumption during execution sequences that lead to state-transitions, i.e. those originally triggered by [`BeginBlock`](../core/00-baseapp.md#beginblock), [`DeliverTx`](../core/00-baseapp.md#delivertx) and [`EndBlock`](../core/00-baseapp.md#endblock). At the beginning of each `DeliverTx`, the main gas meter **must be set to 0** in the [`AnteHandler`](#antehandler), so that it can track gas consumption per-transaction. +`ctx.GasMeter()` is the main gas meter of the application. The main gas meter is initialized in `FinalizeBlock` via `setFinalizeBlockState`, and then tracks gas consumption during execution sequences that lead to state-transitions, i.e. those originally triggered by [`FinalizeBlock`](../advanced/00-baseapp.md#finalizeblock). At the beginning of each transaction execution, the main gas meter **must be set to 0** in the [`AnteHandler`](#antehandler), so that it can track gas consumption per-transaction. -Gas consumption can be done manually, generally by the module developer in the [`BeginBlocker`, `EndBlocker`](../building-modules/05-beginblock-endblock.md) or [`Msg` service](../building-modules/03-msg-services.md), but most of the time it is done automatically whenever there is a read or write to the store. This automatic gas consumption logic is implemented in a special store called [`GasKv`](../core/04-store.md#gaskv-store). +Gas consumption can be done manually, generally by the module developer in the [`BeginBlocker`, `EndBlocker`](../../build/building-modules/06-beginblock-endblock.md) or [`Msg` service](../../build/building-modules/03-msg-services.md), but most of the time it is done automatically whenever there is a read or write to the store. This automatic gas consumption logic is implemented in a special store called [`GasKv`](../advanced/04-store.md#gaskv-store). ### Block Gas Meter -`ctx.BlockGasMeter()` is the gas meter used to track gas consumption per block and make sure it does not go above a certain limit. A new instance of the `BlockGasMeter` is created each time [`BeginBlock`](../core/00-baseapp.md#beginblock) is called. The `BlockGasMeter` is finite, and the limit of gas per block is defined in the application's consensus parameters. By default, Cosmos SDK applications use the default consensus parameters provided by CometBFT: +`ctx.BlockGasMeter()` is the gas meter used to track gas consumption per block and make sure it does not go above a certain limit. -```go reference -https://github.com/cometbft/cometbft/blob/v0.37.0/types/params.go#L66-L105 +During the genesis phase, gas consumption is unlimited to accommodate initialisation transactions. + +```go +app.finalizeBlockState.SetContext(app.finalizeBlockState.Context().WithBlockGasMeter(storetypes.NewInfiniteGasMeter())) ``` -When a new [transaction](../core/01-transactions.md) is being processed via `DeliverTx`, the current value of `BlockGasMeter` is checked to see if it is above the limit. If it is, `DeliverTx` returns immediately. This can happen even with the first transaction in a block, as `BeginBlock` itself can consume gas. If not, the transaction is processed normally. At the end of `DeliverTx`, the gas tracked by `ctx.BlockGasMeter()` is increased by the amount consumed to process the transaction: +Following the genesis block, the block gas meter is set to a finite value by the SDK. This transition is facilitated by the consensus engine (e.g., CometBFT) calling the `RequestFinalizeBlock` function, which in turn triggers the SDK's `FinalizeBlock` method. Within `FinalizeBlock`, `internalFinalizeBlock` is executed, performing necessary state updates and function executions. The block gas meter, initialised each with a finite limit, is then incorporated into the context for transaction execution, ensuring gas consumption does not exceed the block's gas limit and is reset at the end of each block. + +Modules within the Cosmos SDK can consume block gas at any point during their execution by utilising the `ctx`. This gas consumption primarily occurs during state read/write operations and transaction processing. The block gas meter, accessible via `ctx.BlockGasMeter()`, monitors the total gas usage within a block, enforcing the gas limit to prevent excessive computation. This ensures that gas limits are adhered to on a per-block basis, starting from the first block post-genesis. ```go -ctx.BlockGasMeter().ConsumeGas( - ctx.GasMeter().GasConsumedToLimit(), - "block gas meter", -) +gasMeter := app.getBlockGasMeter(app.finalizeBlockState.Context()) +app.finalizeBlockState.SetContext(app.finalizeBlockState.Context().WithBlockGasMeter(gasMeter)) ``` +This above shows the general mechanism for setting the block gas meter with a finite limit based on the block's consensus parameters. + ## AnteHandler -The `AnteHandler` is run for every transaction during `CheckTx` and `DeliverTx`, before a Protobuf `Msg` service method for each `sdk.Msg` in the transaction. +The `AnteHandler` is run for every transaction during `CheckTx` and `FinalizeBlock`, before a Protobuf `Msg` service method for each `sdk.Msg` in the transaction. The anteHandler is not implemented in the core Cosmos SDK but in a module. That said, most applications today use the default implementation defined in the [`auth` module](https://github.com/cosmos/cosmos-sdk/tree/main/x/auth). Here is what the `anteHandler` is intended to do in a normal Cosmos SDK application: * Verify that the transactions are of the correct type. Transaction types are defined in the module that implements the `anteHandler`, and they follow the transaction interface: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/types/tx_msg.go#L42-L50 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/tx_msg.go#L51-L56 ``` This enables developers to play with various types for the transaction of their application. In the default `auth` module, the default transaction type is `Tx`: ```protobuf reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/tx/v1beta1/tx.proto#L13-L26 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/proto/cosmos/tx/v1beta1/tx.proto#L14-L27 ``` -* Verify signatures for each [`message`](../building-modules/02-messages-and-queries.md#messages) contained in the transaction. Each `message` should be signed by one or multiple sender(s), and these signatures must be verified in the `anteHandler`. +* Verify signatures for each [`message`](../../build/building-modules/02-messages-and-queries.md#messages) contained in the transaction. Each `message` should be signed by one or multiple sender(s), and these signatures must be verified in the `anteHandler`. * During `CheckTx`, verify that the gas prices provided with the transaction is greater than the local `min-gas-prices` (as a reminder, gas-prices can be deducted from the following equation: `fees = gas * gas-prices`). `min-gas-prices` is a parameter local to each full-node and used during `CheckTx` to discard transactions that do not provide a minimum amount of fees. This ensures that the mempool cannot be spammed with garbage transactions. * Verify that the sender of the transaction has enough funds to cover for the `fees`. When the end-user generates a transaction, they must indicate 2 of the 3 following parameters (the third one being implicit): `fees`, `gas` and `gas-prices`. This signals how much they are willing to pay for nodes to execute their transaction. The provided `gas` value is stored in a parameter called `GasWanted` for later use. -* Set `newCtx.GasMeter` to 0, with a limit of `GasWanted`. **This step is crucial**, as it not only makes sure the transaction cannot consume infinite gas, but also that `ctx.GasMeter` is reset in-between each `DeliverTx` (`ctx` is set to `newCtx` after `anteHandler` is run, and the `anteHandler` is run each time `DeliverTx` is called). +* Set `newCtx.GasMeter` to 0, with a limit of `GasWanted`. **This step is crucial**, as it not only makes sure the transaction cannot consume infinite gas, but also that `ctx.GasMeter` is reset in-between each transaction (`ctx` is set to `newCtx` after `anteHandler` is run, and the `anteHandler` is run each time a transactions executes). -As explained above, the `anteHandler` returns a maximum limit of `gas` the transaction can consume during execution called `GasWanted`. The actual amount consumed in the end is denominated `GasUsed`, and we must therefore have `GasUsed =< GasWanted`. Both `GasWanted` and `GasUsed` are relayed to the underlying consensus engine when [`DeliverTx`](../core/00-baseapp.md#delivertx) returns. +As explained above, the `anteHandler` returns a maximum limit of `gas` the transaction can consume during execution called `GasWanted`. The actual amount consumed in the end is denominated `GasUsed`, and we must therefore have `GasUsed =< GasWanted`. Both `GasWanted` and `GasUsed` are relayed to the underlying consensus engine when [`FinalizeBlock`](../advanced/00-baseapp.md#finalizeblock) returns. diff --git a/docs/docs/learn/beginner/_category_.json b/docs/docs/learn/beginner/_category_.json new file mode 100644 index 000000000000..d09097faee58 --- /dev/null +++ b/docs/docs/learn/beginner/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "Beginner", + "position": 2, + "link": null +} \ No newline at end of file diff --git a/docs/docs/learn/intro/00-overview.md b/docs/docs/learn/intro/00-overview.md new file mode 100644 index 000000000000..a424dfdfe113 --- /dev/null +++ b/docs/docs/learn/intro/00-overview.md @@ -0,0 +1,43 @@ +--- +sidebar_position: 1 +--- + +# What is the Cosmos SDK + +The [Cosmos SDK](https://github.com/cosmos/cosmos-sdk) is an open-source toolkit for building multi-asset public Proof-of-Stake (PoS) blockchains, like the Cosmos Hub, as well as permissioned Proof-of-Authority (PoA) blockchains. Blockchains built with the Cosmos SDK are generally referred to as **application-specific blockchains**. + +The goal of the Cosmos SDK is to allow developers to easily create custom blockchains from scratch that can natively interoperate with other blockchains. +We further this modular approach by allowing developers to plug and play with different consensus engines this can range from the [CometBFT](https://github.com/cometbft/cometbft) or [Rollkit](https://rollkit.dev/). + +SDK-based blockchains have the choice to use the predefined modules or to build their own modules. What this means is that developers can build a blockchain that is tailored to their specific use case, without having to worry about the low-level details of building a blockchain from scratch. Predefined modules include staking, governance, and token issuance, among others. + +What's more, the Cosmos SDK is a capabilities-based system that allows developers to better reason about the security of interactions between modules. For a deeper look at capabilities, jump to [Object-Capability Model](../advanced/10-ocap.md). + +How you can look at this is if we imagine that the SDK is like a lego kit. You can choose to build the basic house from the instructions or you can choose to modify your house and add more floors, more doors, more windows. The choice is yours. + +## What are Application-Specific Blockchains + +One development paradigm in the blockchain world today is that of virtual-machine blockchains like Ethereum, where development generally revolves around building decentralized applications on top of an existing blockchain as a set of smart contracts. While smart contracts can be very good for some use cases like single-use applications (e.g. ICOs), they often fall short for building complex decentralized platforms. More generally, smart contracts can be limiting in terms of flexibility, sovereignty and performance. + +Application-specific blockchains offer a radically different development paradigm than virtual-machine blockchains. An application-specific blockchain is a blockchain customized to operate a single application: developers have all the freedom to make the design decisions required for the application to run optimally. They can also provide better sovereignty, security and performance. + +Learn more about [application-specific blockchains](./01-why-app-specific.md). + +## What is Modularity + +Today there is a lot of talk around modularity and discussions between monolithic and modular. Originally the Cosmos SDK was built with a vision of modularity in mind. Modularity is derived from splitting a blockchain into customizable layers of execution, consensus, settlement and data availability, which is what the Cosmos SDK enables. This means that developers can plug and play, making their blockchain customisable by using different software for different layers. For example you can choose to build a vanilla chain and use the Cosmos SDK with CometBFT. CometBFT will be your consensus layer and the chain itself would be the settlement and execution layer. Another route could be to use the SDK with Rollkit and Celestia as your consensus and data availability layer. The benefit of modularity is that you can customize your chain to your specific use case. + +## Why the Cosmos SDK + +The Cosmos SDK is the most advanced framework for building custom modular application-specific blockchains today. Here are a few reasons why you might want to consider building your decentralized application with the Cosmos SDK: + +* It allows you to plug and play and customize your consensus layer. As above you can use Rollkit and Celestia as your consensus and data availability layer. This offers a lot of flexibility and customisation. +* Previously the default consensus engine available within the Cosmos SDK is [CometBFT](https://github.com/cometbft/cometbft). CometBFT is the most (and only) mature BFT consensus engine in existence. It is widely used across the industry and is considered the gold standard consensus engine for building Proof-of-Stake systems. +* The Cosmos SDK is open-source and designed to make it easy to build blockchains out of composable [modules](../../build/modules). As the ecosystem of open-source Cosmos SDK modules grows, it will become increasingly easier to build complex decentralized platforms with it. +* The Cosmos SDK is inspired by capabilities-based security, and informed by years of wrestling with blockchain state-machines. This makes the Cosmos SDK a very secure environment to build blockchains. +* Most importantly, the Cosmos SDK has already been used to build many application-specific blockchains that are already in production. Among others, we can cite [Cosmos Hub](https://hub.cosmos.network), [IRIS Hub](https://irisnet.org), [Binance Chain](https://docs.binance.org/), [Terra](https://terra.money/) or [Kava](https://www.kava.io/). [Many more](https://cosmos.network/ecosystem) are building on the Cosmos SDK. + +## Getting started with the Cosmos SDK + +* Learn more about the [architecture of a Cosmos SDK application](./02-sdk-app-architecture.md) +* Learn how to build an application-specific blockchain from scratch with the [Cosmos SDK Tutorial](https://cosmos.network/docs/tutorial) diff --git a/docs/docs/intro/01-why-app-specific.md b/docs/docs/learn/intro/01-why-app-specific.md similarity index 99% rename from docs/docs/intro/01-why-app-specific.md rename to docs/docs/learn/intro/01-why-app-specific.md index 5830530ae706..0f0c1c64ed42 100644 --- a/docs/docs/intro/01-why-app-specific.md +++ b/docs/docs/learn/intro/01-why-app-specific.md @@ -58,7 +58,7 @@ The list above contains a few examples that show how much flexibility applicatio ### Performance -decentralized applications built with Smart Contracts are inherently capped in performance by the underlying environment. For a decentralized application to optimise performance, it needs to be built as an application-specific blockchain. Next are some of the benefits an application-specific blockchain brings in terms of performance: +Decentralized applications built with Smart Contracts are inherently capped in performance by the underlying environment. For a decentralized application to optimise performance, it needs to be built as an application-specific blockchain. Next are some of the benefits an application-specific blockchain brings in terms of performance: * Developers of application-specific blockchains can choose to operate with a novel consensus engine such as CometBFT BFT. Compared to Proof-of-Work (used by most virtual-machine blockchains today), it offers significant gains in throughput. * An application-specific blockchain only operates a single application, so that the application does not compete with others for computation and storage. This is the opposite of most non-sharded virtual-machine blockchains today, where smart contracts all compete for computation and storage. diff --git a/docs/docs/intro/02-sdk-app-architecture.md b/docs/docs/learn/intro/02-sdk-app-architecture.md similarity index 91% rename from docs/docs/intro/02-sdk-app-architecture.md rename to docs/docs/learn/intro/02-sdk-app-architecture.md index 465948bacac5..cc18c54d9d99 100644 --- a/docs/docs/intro/02-sdk-app-architecture.md +++ b/docs/docs/learn/intro/02-sdk-app-architecture.md @@ -84,8 +84,8 @@ Note that **CometBFT only handles transaction bytes**. It has no knowledge of wh Here are the most important messages of the ABCI: -* `CheckTx`: When a transaction is received by CometBFT, it is passed to the application to check if a few basic requirements are met. `CheckTx` is used to protect the mempool of full-nodes against spam transactions. . A special handler called the [`AnteHandler`](../basics/04-gas-fees.md#antehandler) is used to execute a series of validation steps such as checking for sufficient fees and validating the signatures. If the checks are valid, the transaction is added to the [mempool](https://docs.cometbft.com/v0.37/spec/p2p/messages/mempool) and relayed to peer nodes. Note that transactions are not processed (i.e. no modification of the state occurs) with `CheckTx` since they have not been included in a block yet. -* `DeliverTx`: When a [valid block](https://docs.cometbft.com/v0.37/spec/core/data_structures#block) is received by CometBFT, each transaction in the block is passed to the application via `DeliverTx` in order to be processed. It is during this stage that the state transitions occur. The `AnteHandler` executes again, along with the actual [`Msg` service](../building-modules/03-msg-services.md) RPC for each message in the transaction. +* `CheckTx`: When a transaction is received by CometBFT, it is passed to the application to check if a few basic requirements are met. `CheckTx` is used to protect the mempool of full-nodes against spam transactions. . A special handler called the [`AnteHandler`](../beginner/04-gas-fees.md#antehandler) is used to execute a series of validation steps such as checking for sufficient fees and validating the signatures. If the checks are valid, the transaction is added to the [mempool](https://docs.cometbft.com/v0.37/spec/p2p/messages/mempool) and relayed to peer nodes. Note that transactions are not processed (i.e. no modification of the state occurs) with `CheckTx` since they have not been included in a block yet. +* `DeliverTx`: When a [valid block](https://docs.cometbft.com/v0.37/spec/core/data_structures#block) is received by CometBFT, each transaction in the block is passed to the application via `DeliverTx` in order to be processed. It is during this stage that the state transitions occur. The `AnteHandler` executes again, along with the actual [`Msg` service](../../build/building-modules/03-msg-services.md) RPC for each message in the transaction. * `BeginBlock`/`EndBlock`: These messages are executed at the beginning and the end of each block, whether the block contains transactions or not. It is useful to trigger automatic execution of logic. Proceed with caution though, as computationally expensive loops could slow down your blockchain, or even freeze it if the loop is infinite. Find a more detailed view of the ABCI methods from the [CometBFT docs](https://docs.cometbft.com/v0.37/spec/abci/). diff --git a/docs/docs/intro/03-sdk-design.md b/docs/docs/learn/intro/03-sdk-design.md similarity index 83% rename from docs/docs/intro/03-sdk-design.md rename to docs/docs/learn/intro/03-sdk-design.md index 6b6fd68e64d2..f392ec9502a9 100644 --- a/docs/docs/intro/03-sdk-design.md +++ b/docs/docs/learn/intro/03-sdk-design.md @@ -4,7 +4,7 @@ sidebar_position: 1 # Main Components of the Cosmos SDK -The Cosmos SDK is a framework that facilitates the development of secure state-machines on top of CometBFT. At its core, the Cosmos SDK is a boilerplate implementation of the [ABCI](./02-sdk-app-architecture.md#abci) in Golang. It comes with a [`multistore`](../core/04-store.md#multistore) to persist data and a [`router`](../core/00-baseapp.md#routing) to handle transactions. +The Cosmos SDK is a framework that facilitates the development of secure state-machines on top of CometBFT. At its core, the Cosmos SDK is a boilerplate implementation of the [ABCI](./02-sdk-app-architecture.md#abci) in Golang. It comes with a [`multistore`](../advanced/04-store.md#multistore) to persist data and a [`router`](../advanced/00-baseapp.md#routing) to handle transactions. Here is a simplified view of how transactions are handled by an application built on top of the Cosmos SDK when transferred from CometBFT via `DeliverTx`: @@ -15,23 +15,23 @@ Here is a simplified view of how transactions are handled by an application buil ## `baseapp` -`baseapp` is the boilerplate implementation of a Cosmos SDK application. It comes with an implementation of the ABCI to handle the connection with the underlying consensus engine. Typically, a Cosmos SDK application extends `baseapp` by embedding it in [`app.go`](../basics/00-app-anatomy.md#core-application-file). +`baseapp` is the boilerplate implementation of a Cosmos SDK application. It comes with an implementation of the ABCI to handle the connection with the underlying consensus engine. Typically, a Cosmos SDK application extends `baseapp` by embedding it in [`app.go`](../beginner/00-app-anatomy.md#core-application-file). Here is an example of this from `simapp`, the Cosmos SDK demonstration app: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/app.go#L164-L203 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/app.go#L170-L212 ``` The goal of `baseapp` is to provide a secure interface between the store and the extensible state machine while defining as little about the state machine as possible (staying true to the ABCI). -For more on `baseapp`, please click [here](../core/00-baseapp.md). +For more on `baseapp`, please click [here](../advanced/00-baseapp.md). ## Multistore -The Cosmos SDK provides a [`multistore`](../core/04-store.md#multistore) for persisting state. The multistore allows developers to declare any number of [`KVStores`](../core/04-store.md#base-layer-kvstores). These `KVStores` only accept the `[]byte` type as value and therefore any custom structure needs to be marshalled using [a codec](../core/05-encoding.md) before being stored. +The Cosmos SDK provides a [`multistore`](../advanced/04-store.md#multistore) for persisting state. The multistore allows developers to declare any number of [`KVStores`](../advanced/04-store.md#base-layer-kvstores). These `KVStores` only accept the `[]byte` type as value and therefore any custom structure needs to be marshalled using [a codec](../advanced/05-encoding.md) before being stored. -The multistore abstraction is used to divide the state in distinct compartments, each managed by its own module. For more on the multistore, click [here](../core/04-store.md#multistore) +The multistore abstraction is used to divide the state in distinct compartments, each managed by its own module. For more on the multistore, click [here](../advanced/04-store.md#multistore) ## Modules @@ -84,7 +84,7 @@ Here is a simplified view of how a transaction is processed by the application o v ``` -Each module can be seen as a little state-machine. Developers need to define the subset of the state handled by the module, as well as custom message types that modify the state (*Note:* `messages` are extracted from `transactions` by `baseapp`). In general, each module declares its own `KVStore` in the `multistore` to persist the subset of the state it defines. Most developers will need to access other 3rd party modules when building their own modules. Given that the Cosmos SDK is an open framework, some of the modules may be malicious, which means there is a need for security principles to reason about inter-module interactions. These principles are based on [object-capabilities](../core/10-ocap.md). In practice, this means that instead of having each module keep an access control list for other modules, each module implements special objects called `keepers` that can be passed to other modules to grant a pre-defined set of capabilities. +Each module can be seen as a little state-machine. Developers need to define the subset of the state handled by the module, as well as custom message types that modify the state (*Note:* `messages` are extracted from `transactions` by `baseapp`). In general, each module declares its own `KVStore` in the `multistore` to persist the subset of the state it defines. Most developers will need to access other 3rd party modules when building their own modules. Given that the Cosmos SDK is an open framework, some of the modules may be malicious, which means there is a need for security principles to reason about inter-module interactions. These principles are based on [object-capabilities](../advanced/10-ocap.md). In practice, this means that instead of having each module keep an access control list for other modules, each module implements special objects called `keepers` that can be passed to other modules to grant a pre-defined set of capabilities. Cosmos SDK modules are defined in the `x/` folder of the Cosmos SDK. Some core modules include: diff --git a/docs/docs/intro/_category_.json b/docs/docs/learn/intro/_category_.json similarity index 72% rename from docs/docs/intro/_category_.json rename to docs/docs/learn/intro/_category_.json index b218fe9be4aa..bb0bcd14af39 100644 --- a/docs/docs/intro/_category_.json +++ b/docs/docs/learn/intro/_category_.json @@ -1,5 +1,5 @@ { "label": "Introduction", - "position": 0, + "position": 1, "link": null } \ No newline at end of file diff --git a/docs/docs/learn/learn.md b/docs/docs/learn/learn.md new file mode 100644 index 000000000000..af624fa3048e --- /dev/null +++ b/docs/docs/learn/learn.md @@ -0,0 +1,11 @@ +--- +sidebar_position: 0 +--- +# Learn + +* [Introduction](./intro/00-overview.md) - Dive into the fundamentals of Cosmos SDK with an insightful introduction, +laying the groundwork for understanding blockchain development. In this section we provide a High-Level Overview of the SDK, then dive deeper into Core concepts such as Application-Specific Blockchains, Blockchain Architecture, and finally we begin to explore what are the main components of the SDK. +* [Beginner](./beginner/00-app-anatomy.md) - Start your journey with beginner-friendly resources in the Cosmos SDK's "Learn" +section, providing a gentle entry point for newcomers to blockchain development. Here we focus on a little more detail, covering the Anatomy of a Cosmos SDK Application, Transaction Lifecycles, Accounts and lastly, Gas and Fees. +* [Advanced](./advanced/00-baseapp.md) - Level up your Cosmos SDK expertise with advanced topics, tailored for experienced +developers diving into intricate blockchain application development. We cover the Cosmos SDK on a lower level as we dive into the core of the SDK with BaseApp, Transactions, Context, Node Client (Daemon), Store, Encoding, gRPC, REST, and CometBFT Endpoints, CLI, Events, Telementry, Object-Capability Model, RunTx recovery middleware, Cosmos Blockchain Simulator, Protobuf Documentation, In-Place Store Migrations, Configuration and AutoCLI. diff --git a/docs/docs/migrations/_category_.json b/docs/docs/migrations/_category_.json deleted file mode 100644 index add3887b861b..000000000000 --- a/docs/docs/migrations/_category_.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "label": "SDK Migrations", - "position": 6, - "link": null -} \ No newline at end of file diff --git a/docs/docs/modules/_category_.json b/docs/docs/modules/_category_.json deleted file mode 100644 index 6038c766228e..000000000000 --- a/docs/docs/modules/_category_.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "label": "SDK Modules", - "position": 7, - "link": null -} \ No newline at end of file diff --git a/docs/docs/run-node/00-keyring.md b/docs/docs/user/run-node/00-keyring.md similarity index 97% rename from docs/docs/run-node/00-keyring.md rename to docs/docs/user/run-node/00-keyring.md index 2cb15b115cfd..b4a2020068fe 100644 --- a/docs/docs/run-node/00-keyring.md +++ b/docs/docs/user/run-node/00-keyring.md @@ -5,7 +5,7 @@ sidebar_position: 1 # Setting up the keyring :::note Synopsis -This document describes how to configure and use the keyring and its various backends for an [**application**](../basics/00-app-anatomy.md). +This document describes how to configure and use the keyring and its various backends for an [**application**](../../learn/beginner/00-app-anatomy.md). ::: The keyring holds the private/public keypairs used to interact with a node. For instance, a validator key needs to be set up before running the blockchain node, so that blocks can be correctly signed. The private key can be stored in different locations, called "backends", such as a file or the operating system's own key storage. @@ -108,7 +108,7 @@ The `memory` backend stores keys in memory. The keys are immediately deleted aft ### Setting backend using the env variable -You can set the keyring-backend using env variable: `BINNAME_KEYRING_BACKEND`. For example, if you binary name is `gaia-v5` then set: `export GAIA_V5_KEYRING_BACKEND=pass` +You can set the keyring-backend using env variable: `BINNAME_KEYRING_BACKEND`. For example, if your binary name is `gaia-v5` then set: `export GAIA_V5_KEYRING_BACKEND=pass` ## Adding keys to the keyring diff --git a/docs/docs/run-node/01-run-node.md b/docs/docs/user/run-node/01-run-node.md similarity index 83% rename from docs/docs/run-node/01-run-node.md rename to docs/docs/user/run-node/01-run-node.md index 64300b4a0046..f16eb42f52de 100644 --- a/docs/docs/run-node/01-run-node.md +++ b/docs/docs/user/run-node/01-run-node.md @@ -8,11 +8,9 @@ sidebar_position: 1 Now that the application is ready and the keyring populated, it's time to see how to run the blockchain node. In this section, the application we are running is called [`simapp`](https://github.com/cosmos/cosmos-sdk/tree/main/simapp), and its corresponding CLI binary `simd`. ::: -:::note +:::note Pre-requisite Readings -### Pre-requisite Readings - -* [Anatomy of a Cosmos SDK Application](../basics/00-app-anatomy.md) +* [Anatomy of a Cosmos SDK Application](../../learn/beginner/00-app-anatomy.md) * [Setting up the keyring](./00-keyring.md) ::: @@ -30,7 +28,12 @@ Before actually running the node, we need to initialize the chain, and most impo simd init --chain-id my-test-chain ``` -The command above creates all the configuration files needed for your node to run, as well as a default genesis file, which defines the initial state of the network. All these configuration files are in `~/.simapp` by default, but you can overwrite the location of this folder by passing the `--home` flag. +The command above creates all the configuration files needed for your node to run, as well as a default genesis file, which defines the initial state of the network. + +:::tip +All these configuration files are in `~/.simapp` by default, but you can overwrite the location of this folder by passing the `--home` flag to each commands, +or set an `$APPD_HOME` environment variable (where `APPD` is the name of the binary). +::: The `~/.simapp` folder has the following structure: @@ -82,9 +85,9 @@ Now that you have created a local account, go ahead and grant it some `stake` to simd genesis add-genesis-account $MY_VALIDATOR_ADDRESS 100000000000stake ``` -Recall that `$MY_VALIDATOR_ADDRESS` is a variable that holds the address of the `my_validator` key in the [keyring](./00-keyring.md#adding-keys-to-the-keyring). Also note that the tokens in the Cosmos SDK have the `{amount}{denom}` format: `amount` is is a 18-digit-precision decimal number, and `denom` is the unique token identifier with its denomination key (e.g. `atom` or `uatom`). Here, we are granting `stake` tokens, as `stake` is the token identifier used for staking in [`simapp`](https://github.com/cosmos/cosmos-sdk/tree/main/simapp). For your own chain with its own staking denom, that token identifier should be used instead. +Recall that `$MY_VALIDATOR_ADDRESS` is a variable that holds the address of the `my_validator` key in the [keyring](./00-keyring.md#adding-keys-to-the-keyring). Also note that the tokens in the Cosmos SDK have the `{amount}{denom}` format: `amount` is an 18-digit-precision decimal number, and `denom` is the unique token identifier with its denomination key (e.g. `atom` or `uatom`). Here, we are granting `stake` tokens, as `stake` is the token identifier used for staking in [`simapp`](https://github.com/cosmos/cosmos-sdk/tree/main/simapp). For your own chain with its own staking denom, that token identifier should be used instead. -Now that your account has some tokens, you need to add a validator to your chain. Validators are special full-nodes that participate in the consensus process (implemented in the [underlying consensus engine](../intro/02-sdk-app-architecture.md#cometbft)) in order to add new blocks to the chain. Any account can declare its intention to become a validator operator, but only those with sufficient delegation get to enter the active set (for example, only the top 125 validator candidates with the most delegation get to be validators in the Cosmos Hub). For this guide, you will add your local node (created via the `init` command above) as a validator of your chain. Validators can be declared before a chain is first started via a special transaction included in the genesis file called a `gentx`: +Now that your account has some tokens, you need to add a validator to your chain. Validators are special full-nodes that participate in the consensus process (implemented in the [underlying consensus engine](../../learn/intro/02-sdk-app-architecture.md#cometbft)) in order to add new blocks to the chain. Any account can declare its intention to become a validator operator, but only those with sufficient delegation get to enter the active set (for example, only the top 125 validator candidates with the most delegation get to be validators in the Cosmos Hub). For this guide, you will add your local node (created via the `init` command above) as a validator of your chain. Validators can be declared before a chain is first started via a special transaction included in the genesis file called a `gentx`: ```bash # Create a gentx. @@ -152,7 +155,14 @@ You should see blocks come in. The previous command allow you to run a single node. This is enough for the next section on interacting with this node, but you may wish to run multiple nodes at the same time, and see how consensus happens between them. -The naive way would be to run the same commands again in separate terminal windows. This is possible, however in the Cosmos SDK, we leverage the power of [Docker Compose](https://docs.docker.com/compose/) to run a localnet. If you need inspiration on how to set up your own localnet with Docker Compose, you can have a look at the Cosmos SDK's [`docker-compose.yml`](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/docker-compose.yml). +The naive way would be to run the same commands again in separate terminal windows. This is possible, however in the Cosmos SDK, we leverage the power of [Docker Compose](https://docs.docker.com/compose/) to run a localnet. If you need inspiration on how to set up your own localnet with Docker Compose, you can have a look at the Cosmos SDK's [`docker-compose.yml`](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/docker-compose.yml). + +### Standalone App/CometBFT + +By default, the Cosmos SDK runs CometBFT in-process with the application +If you want to run the application and CometBFT in separate processes, +start the application with the `--with-comet=false` flag +and set `rpc.laddr` in `config.toml` to the CometBFT node's RPC address. ## Logging diff --git a/docs/docs/run-node/02-interact-node.md b/docs/docs/user/run-node/02-interact-node.md similarity index 92% rename from docs/docs/run-node/02-interact-node.md rename to docs/docs/user/run-node/02-interact-node.md index aaade7bcef14..a511aec41836 100644 --- a/docs/docs/run-node/02-interact-node.md +++ b/docs/docs/user/run-node/02-interact-node.md @@ -8,11 +8,9 @@ sidebar_position: 1 There are multiple ways to interact with a node: using the CLI, using gRPC or using the REST endpoints. ::: -:::note +:::note Pre-requisite Readings -### Pre-requisite Readings - -* [gRPC, REST and CometBFT Endpoints](../core/06-grpc_rest.md) +* [gRPC, REST and CometBFT Endpoints](../../learn/advanced/06-grpc_rest.md) * [Running a Node](./01-run-node.md) ::: @@ -56,7 +54,7 @@ You should see two delegations, the first one made from the `gentx`, and the sec ## Using gRPC -The Protobuf ecosystem developed tools for different use cases, including code-generation from `*.proto` files into various languages. These tools allow the building of clients easily. Often, the client connection (i.e. the transport) can be plugged and replaced very easily. Let's explore one of the most popular transport: [gRPC](../core/06-grpc_rest.md). +The Protobuf ecosystem developed tools for different use cases, including code-generation from `*.proto` files into various languages. These tools allow the building of clients easily. Often, the client connection (i.e. the transport) can be plugged and replaced very easily. Let's explore one of the most popular transport: [gRPC](../../learn/advanced/06-grpc_rest.md). Since the code generation library largely depends on your own tech stack, we will only present three alternatives: @@ -68,7 +66,7 @@ Since the code generation library largely depends on your own tech stack, we wil [grpcurl](https://github.com/fullstorydev/grpcurl) is like `curl` but for gRPC. It is also available as a Go library, but we will use it only as a CLI command for debugging and testing purposes. Follow the instructions in the previous link to install it. -Assuming you have a local node running (either a localnet, or connected a live network), you should be able to run the following command to list the Protobuf services available (you can replace `localhost:9000` by the gRPC server endpoint of another node, which is configured under the `grpc.address` field inside [`app.toml`](../run-node/01-run-node.md#configuring-the-node-using-apptoml)): +Assuming you have a local node running (either a localnet, or connected a live network), you should be able to run the following command to list the Protobuf services available (you can replace `localhost:9000` by the gRPC server endpoint of another node, which is configured under the `grpc.address` field inside [`app.toml`](../run-node/01-run-node.md#configuring-the-node-using-apptoml-and-configtoml)): ```bash grpcurl -plaintext localhost:9090 list @@ -250,7 +248,7 @@ CosmJS documentation can be found at [https://cosmos.github.io/cosmjs](https://c ## Using the REST Endpoints -As described in the [gRPC guide](../core/06-grpc_rest.md), all gRPC services on the Cosmos SDK are made available for more convenient REST-based queries through gRPC-gateway. The format of the URL path is based on the Protobuf service method's full-qualified name, but may contain small customizations so that final URLs look more idiomatic. For example, the REST endpoint for the `cosmos.bank.v1beta1.Query/AllBalances` method is `GET /cosmos/bank/v1beta1/balances/{address}`. Request arguments are passed as query parameters. +As described in the [gRPC guide](../../learn/advanced/06-grpc_rest.md), all gRPC services on the Cosmos SDK are made available for more convenient REST-based queries through gRPC-gateway. The format of the URL path is based on the Protobuf service method's full-qualified name, but may contain small customizations so that final URLs look more idiomatic. For example, the REST endpoint for the `cosmos.bank.v1beta1.Query/AllBalances` method is `GET /cosmos/bank/v1beta1/balances/{address}`. Request arguments are passed as query parameters. Note that the REST endpoints are not enabled by default. To enable them, edit the `api` section of your `~/.simapp/config/app.toml` file: @@ -270,7 +268,7 @@ curl \ Make sure to replace `localhost:1317` with the REST endpoint of your node, configured under the `api.address` field. -The list of all available REST endpoints is available as a Swagger specification file, it can be viewed at `localhost:1317/swagger`. Make sure that the `api.swagger` field is set to true in your [`app.toml`](../run-node/01-run-node.md#configuring-the-node-using-apptoml) file. +The list of all available REST endpoints is available as a Swagger specification file, it can be viewed at `localhost:1317/swagger`. Make sure that the `api.swagger` field is set to true in your [`app.toml`](../run-node/01-run-node.md#configuring-the-node-using-apptoml-and-configtoml) file. ### Query for historical state using REST @@ -288,4 +286,4 @@ Assuming the state at that block has not yet been pruned by the node, this query ### Cross-Origin Resource Sharing (CORS) -[CORS policies](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) are not enabled by default to help with security. If you would like to use the rest-server in a public environment we recommend you provide a reverse proxy, this can be done with [nginx](https://www.nginx.com/). For testing and development purposes there is an `enabled-unsafe-cors` field inside [`app.toml`](../run-node/01-run-node.md#configuring-the-node-using-apptoml). +[CORS policies](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) are not enabled by default to help with security. If you would like to use the rest-server in a public environment we recommend you provide a reverse proxy, this can be done with [nginx](https://www.nginx.com/). For testing and development purposes there is an `enabled-unsafe-cors` field inside [`app.toml`](../run-node/01-run-node.md#configuring-the-node-using-apptoml-and-configtoml). diff --git a/docs/docs/run-node/03-txs.md b/docs/docs/user/run-node/03-txs.md similarity index 98% rename from docs/docs/run-node/03-txs.md rename to docs/docs/user/run-node/03-txs.md index c8d2b610b159..106f02e8e8e8 100644 --- a/docs/docs/run-node/03-txs.md +++ b/docs/docs/user/run-node/03-txs.md @@ -147,7 +147,7 @@ priv3, _, addr3 := testdata.KeyTestPubAddr() Populating the `TxBuilder` can be done via its methods: ```go reference -https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/client/tx_config.go#L33-L50 +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/client/tx_config.go#L33-L50 ``` ```go @@ -269,7 +269,7 @@ func sendTx() error { ### Broadcasting a Transaction -The preferred way to broadcast a transaction is to use gRPC, though using REST (via `gRPC-gateway`) or the CometBFT RPC is also posible. An overview of the differences between these methods is exposed [here](../core/06-grpc_rest.md). For this tutorial, we will only describe the gRPC method. +The preferred way to broadcast a transaction is to use gRPC, though using REST (via `gRPC-gateway`) or the CometBFT RPC is also posible. An overview of the differences between these methods is exposed [here](../../learn/advanced/06-grpc_rest.md). For this tutorial, we will only describe the gRPC method. ```go import ( diff --git a/docs/docs/run-node/05-run-testnet.md b/docs/docs/user/run-node/05-run-testnet.md similarity index 100% rename from docs/docs/run-node/05-run-testnet.md rename to docs/docs/user/run-node/05-run-testnet.md diff --git a/docs/docs/run-node/06-run-production.md b/docs/docs/user/run-node/06-run-production.md similarity index 100% rename from docs/docs/run-node/06-run-production.md rename to docs/docs/user/run-node/06-run-production.md diff --git a/docs/docs/run-node/_category_.json b/docs/docs/user/run-node/_category_.json similarity index 77% rename from docs/docs/run-node/_category_.json rename to docs/docs/user/run-node/_category_.json index 375a7c423023..65e64b945f56 100644 --- a/docs/docs/run-node/_category_.json +++ b/docs/docs/user/run-node/_category_.json @@ -1,5 +1,5 @@ { "label": "Running a Node, API and CLI", - "position": 5, + "position": 0, "link": null } \ No newline at end of file diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 9d5007d122c5..ce1aff326752 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -4,6 +4,9 @@ const lightCodeTheme = require("prism-react-renderer/themes/github"); const darkCodeTheme = require("prism-react-renderer/themes/dracula"); +const lastVersion = "current"; +// const lastVersion = "v0.50"; + /** @type {import('@docusaurus/types').Config} */ const config = { title: "Cosmos SDK", @@ -37,16 +40,16 @@ const config = { docs: { sidebarPath: require.resolve("./sidebars.js"), routeBasePath: "/", - lastVersion: "v0.47", + lastVersion: lastVersion, versions: { current: { path: "main", - banner: "unreleased", - }, - "v0.47": { - path: "v0.47", - label: "v0.47", + // banner: "unreleased", }, + // "v0.50": { + // path: "v0.50", + // label: "v0.50", + // }, }, }, theme: { @@ -212,6 +215,24 @@ const config = { { fromExtensions: ["html"], toExtensions: ["html"], + createRedirects(existingPath) { + return [ + existingPath.replace('/core', '/learn/advanced'), + existingPath.replace('/basics', '/learn/beginner'), + existingPath.replace('/intro', '/learn/intro'), + existingPath.replace('/architecture', '/build/architecture/'), + existingPath.replace('/building-apps', '/build/building-apps'), + existingPath.replace('/building-modules', '/build/building-modules'), + existingPath.replace('/tooling', '/build/tooling'), + existingPath.replace('/migrations', '/build/migrations'), + existingPath.replace('/modules', '/build/modules'), + existingPath.replace('/rfc', '/build/rfc'), + existingPath.replace('/spec', '/build/spec'), + existingPath.replace('/tooling', '/build/tooling'), + existingPath.replace('/run-node', '/user/run-node'), + existingPath.replace('/validate', '/user/validate') + ]; + }, redirects: [ { from: ["/", "/master", "/v0.43", "/v0.44"], @@ -226,11 +247,11 @@ const config = { "/main/modules/auth/06_params", "/main/modules/auth/07_client", ], - to: "/main/modules/auth", + to: "/main/build/modules/auth", }, { from: "/main/modules/auth/05_vesting", - to: "/main/modules/auth/vesting", + to: "/main/build/modules/auth/vesting", }, { from: [ @@ -240,7 +261,7 @@ const config = { "/main/modules/authz/04_events", "/main/modules/authz/05_client", ], - to: "/main/modules/authz", + to: "/main/build/modules/authz", }, { from: [ @@ -250,7 +271,7 @@ const config = { "/main/modules/bank/05_params", "/main/modules/bank/06_client", ], - to: "/main/modules/bank", + to: "/main/build/modules/bank", }, { from: [ @@ -260,7 +281,7 @@ const config = { "/main/modules/crisis/04_params", "/main/modules/crisis/05_client", ], - to: "/main/modules/crisis", + to: "/main/build/modules/crisis", }, { from: [ @@ -273,7 +294,7 @@ const config = { "/main/modules/distribution/07_params", "/main/modules/distribution/08_client", ], - to: "/main/modules/distribution", + to: "/main/build/modules/distribution", }, { from: [ @@ -285,7 +306,7 @@ const config = { "/main/modules/evidence/06_begin_block", "/main/modules/evidence/07_client", ], - to: "/main/modules/evidence", + to: "/main/build/modules/evidence", }, { from: [ @@ -295,7 +316,7 @@ const config = { "/main/modules/feegrant/04_events", "/main/modules/feegrant/05_client", ], - to: "/main/modules/feegrant", + to: "/main/build/modules/feegrant", }, { from: [ @@ -308,7 +329,7 @@ const config = { "/main/modules/gov/07_client", "/main/modules/gov/08_metadata", ], - to: "/main/modules/gov", + to: "/main/build/modules/gov", }, { from: [ @@ -319,7 +340,7 @@ const config = { "/main/modules/group/05_client", "/main/modules/group/06_metadata", ], - to: "/main/modules/group/", + to: "/main/build/modules/group/", }, { from: [ @@ -330,7 +351,7 @@ const config = { "/main/modules/mint/05_events", "/main/modules/mint/06_client", ], - to: "/main/modules/mint/", + to: "/main/build/modules/mint/", }, { from: [ @@ -339,14 +360,14 @@ const config = { "/main/modules/nft/03_messages", "/main/modules/nft/04_events", ], - to: "/main/modules/nft/", + to: "/main/build/modules/nft/", }, { from: [ "/main/modules/params/01_keeper", "/main/modules/params/02_subspace", ], - to: "/main/modules/params/", + to: "/main/build/modules/params/", }, { from: [ @@ -360,7 +381,7 @@ const config = { "/main/modules/slashing/08_params", "/main/modules/slashing/09_client", ], - to: "/main/modules/slashing/", + to: "/main/build/modules/slashing/", }, { from: [ @@ -374,7 +395,7 @@ const config = { "/main/modules/staking/08_params", "/main/modules/staking/09_client", ], - to: "/main/modules/staking/", + to: "/main/build/modules/staking/", }, { from: [ @@ -383,31 +404,35 @@ const config = { "/main/modules/upgrade/03_events", "/main/modules/upgrade/04_client", ], - to: "/main/modules/upgrade/", + to: "/main/build/modules/upgrade/", }, { from: ["/main/modules/capability", "/main/ecosystem"], - to: "/main/modules", + to: "/main/build/modules/auth", }, { from: ["/main/spec/circuit-breaker"], - to: "/main/modules/circuit", + to: "/main/build/modules/circuit", }, { from: ["/main/spec/reserve-pool"], - to: "/main/modules/distribution", + to: "/main/build/modules/distribution", }, { from: ["/main/run-node/cosmovisor"], - to: "/main/tooling/cosmovisor", + to: "/main/build/tooling/cosmovisor", }, { from: ["/main/migrations/pre-upgrade"], - to: "/main/building-apps/app-upgrade", + to: "/main/build/building-apps/app-upgrade", }, { from: ["/main/tooling/depinject"], - to: "/main/packages/depinject", + to: "/main/build/packages/depinject", + }, + { + from: ["/main/building-modules/autocli"], + to: "/main/learn/advanced/autocli", }, ], }, diff --git a/docs/post.sh b/docs/post.sh index a70eb526ad0c..20dd8c914ce9 100755 --- a/docs/post.sh +++ b/docs/post.sh @@ -1,15 +1,17 @@ #!/usr/bin/env bash -find docs/modules ! -name '_category_.json' -type f -exec rm -rf {} + -rm -rf docs/tooling/01-cosmovisor.md -rm -rf docs/tooling/02-confix.md -rm -rf docs/tooling/03-hubl.md -rm -rf docs/packages/01-depinject.md -rm -rf docs/packages/02-collections.md -rm -rf docs/packages/03-orm.md -rm -rf docs/run-node/04-rosetta.md -rm -rf docs/architecture -rm -rf docs/spec -rm -rf docs/rfc -rm -rf docs/migrations/02-upgrading.md -rm -rf versioned_docs versioned_sidebars versions.json \ No newline at end of file +find docs/build/modules ! -name '_category_.json' -type f -exec rm -rf {} + +rm -rf docs/build/tooling/01-cosmovisor.md +rm -rf docs/build/tooling/02-confix.md +rm -rf docs/build/tooling/03-hubl.md +rm -rf docs/build/packages/01-depinject.md +rm -rf docs/build/packages/02-collections.md +rm -rf docs/build/packages/03-orm.md +rm -rf docs/learn/advaced-concepts/17-autocli.md +rm -rf docs/user/run-node/04-rosetta.md +rm -rf docs/build/architecture +rm -rf docs/build/spec +rm -rf docs/build/rfc +rm -rf docs/learn/advanced/17-autocli.md +rm -rf docs/build/migrations/02-upgrading.md +rm -rf versioned_docs versioned_sidebars versions.json diff --git a/docs/pre.sh b/docs/pre.sh index cbe88f049ae8..fe41da35d06b 100755 --- a/docs/pre.sh +++ b/docs/pre.sh @@ -3,41 +3,45 @@ ## Create modules pages for D in ../x/*; do if [ -d "${D}" ]; then - MODDOC=docs/modules/$(echo $D | awk -F/ '{print $NF}') + DIR_NAME=$(echo $D | awk -F/ '{print $NF}') + MODDOC=docs/build/modules/$DIR_NAME rm -rf $MODDOC - mkdir -p $MODDOC && cp -r $D/README.md "$_" + mkdir -p $MODDOC + if [ -f "$D/README.md" ]; then + cp -r $D/README.md $MODDOC/ + fi fi done + ## Vesting is a submodule of auth, but we still want to display it in docs ## TODO to be removed in https://github.com/cosmos/cosmos-sdk/issues/9958 -cp ../x/auth/vesting/README.md ./docs/modules/auth/1-vesting.md -cp ../x/auth/tx/README.md ./docs/modules/auth/2-tx.md +cp ../x/auth/vesting/README.md ./docs/build/modules/auth/1-vesting.md +cp ../x/auth/tx/README.md ./docs/build/modules/auth/2-tx.md ## Add modules page list -cat ../x/README.md | sed 's/\.\.\/docs\/building-modules\/README\.md/\/building-modules\/intro\.html/g' > ./docs/modules/README.md +cat ../x/README.md | sed 's/\.\.\/docs\/build\/building-modules\/README\.md/\/building-modules\/intro\.html/g' > ./docs/modules/README.md ## Add tooling documentation -cp ../tools/cosmovisor/README.md ./docs/tooling/01-cosmovisor.md -cp ../tools/confix/README.md ./docs/tooling/02-confix.md -cp ../tools/hubl/README.md ./docs/tooling/03-hubl.md +cp ../tools/cosmovisor/README.md ./docs/build/tooling/01-cosmovisor.md +cp ../tools/confix/README.md ./docs/build/tooling/02-confix.md +cp ../tools/hubl/README.md ./docs/build/tooling/03-hubl.md +wget -O docs/user/run-node/04-rosetta.md https://raw.githubusercontent.com/cosmos/rosetta/main/README.md ## Add package documentation -cp ../depinject/README.md ./docs/packages/01-depinject.md -cp ../collections/README.md ./docs/packages/02-collections.md -cp ../orm/README.md ./docs/packages/03-orm.md - -## Add rosetta documentation -cp ../tools/rosetta/README.md ./docs/run-node/04-rosetta.md +cp ../client/v2/README.md ./docs/learn/advanced/17-autocli.md +cp ../depinject/README.md ./docs/build/packages/01-depinject.md +cp ../collections/README.md ./docs/build/packages/02-collections.md +cp ../orm/README.md ./docs/build/packages/03-orm.md ## Add architecture documentation -cp -r ./architecture ./docs +cp -r ./architecture ./docs/build ## Add spec documentation -cp -r ./spec ./docs +cp -r ./spec ./docs/build ## Add rfc documentation -cp -r ./rfc ./docs +cp -r ./rfc ./docs/build/rfc ## Add SDK migration documentation -cp -r ../UPGRADING.md ./docs/migrations/02-upgrading.md \ No newline at end of file +cp -r ../UPGRADING.md ./docs/build/migrations/02-upgrading.md diff --git a/docs/rfc/README.md b/docs/rfc/README.md index 24887ac3f668..8b8ead2414ca 100644 --- a/docs/rfc/README.md +++ b/docs/rfc/README.md @@ -13,7 +13,7 @@ discussion that might otherwise only be recorded in an ad-hoc way (for example, via gists or Google docs) that are difficult to discover for someone after the fact. An RFC _may_ give rise to more specific architectural _decisions_ for the Cosmos SDK, but those decisions must be recorded separately in -[Architecture Decision Records (ADR)](../architecture/). +[Architecture Decision Records (ADR)](../architecture). As a rule of thumb, if you can articulate a specific question that needs to be answered, write an ADR. If you need to explore the topic and get input from @@ -35,4 +35,4 @@ sections. ## Table of Contents - +* [RFC-001: Tx Validation](./rfc-001-tx-validation.md) diff --git a/docs/rfc/_category_.json b/docs/rfc/_category_.json index 40fac9822465..a5712bdaeec1 100644 --- a/docs/rfc/_category_.json +++ b/docs/rfc/_category_.json @@ -1,5 +1,5 @@ { - "label": "RFCs", - "position": 12, - "link": null + "label": "RFC", + "position": 7, + "link": null } \ No newline at end of file diff --git a/docs/spec/_category_.json b/docs/spec/_category_.json index 1143a00a1d4a..5c2ccf7d4f56 100644 --- a/docs/spec/_category_.json +++ b/docs/spec/_category_.json @@ -1,5 +1,5 @@ { "label": "Specifications", - "position": 13, + "position": 8, "link": null } \ No newline at end of file diff --git a/docs/versions.json b/docs/versions.json deleted file mode 100644 index 9ad5d640357b..000000000000 --- a/docs/versions.json +++ /dev/null @@ -1,3 +0,0 @@ -[ - "v0.47" -] \ No newline at end of file diff --git a/errors/go.mod b/errors/go.mod index d196b8002aeb..caed8d337d30 100644 --- a/errors/go.mod +++ b/errors/go.mod @@ -10,14 +10,14 @@ require ( require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/kr/pretty v0.3.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.8.1 // indirect golang.org/x/net v0.9.0 // indirect golang.org/x/sys v0.8.0 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect - google.golang.org/protobuf v1.30.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/errors/go.sum b/errors/go.sum index 2f01598e45ce..88ae026e38f1 100644 --- a/errors/go.sum +++ b/errors/go.sum @@ -1,10 +1,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -29,15 +27,12 @@ golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= -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.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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/fuzz/tests/crypto_hd_deriveprivatekeyforpath_test.go b/fuzz/tests/crypto_hd_deriveprivatekeyforpath_test.go index b4be816440fc..0f235262c628 100644 --- a/fuzz/tests/crypto_hd_deriveprivatekeyforpath_test.go +++ b/fuzz/tests/crypto_hd_deriveprivatekeyforpath_test.go @@ -6,8 +6,9 @@ import ( "bytes" "testing" - "github.com/cosmos/cosmos-sdk/crypto/hd" bip39 "github.com/cosmos/go-bip39" + + "github.com/cosmos/cosmos-sdk/crypto/hd" ) func mnemonicToSeed(mnemonic string) []byte { diff --git a/go.mod b/go.mod index a70f93d6a2ee..8f8e49466ea1 100644 --- a/go.mod +++ b/go.mod @@ -1,165 +1,174 @@ -go 1.20 +go 1.21 module github.com/cosmos/cosmos-sdk require ( - cosmossdk.io/api v0.4.2 - cosmossdk.io/collections v0.2.0 - cosmossdk.io/core v0.8.0 - cosmossdk.io/depinject v1.0.0-alpha.3 - cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741 - cosmossdk.io/log v1.1.0 - cosmossdk.io/math v1.0.1 - cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c - cosmossdk.io/x/tx v0.8.0 + cosmossdk.io/api v0.7.6 + cosmossdk.io/collections v0.4.0 + cosmossdk.io/core v0.11.1 + cosmossdk.io/depinject v1.1.0 + cosmossdk.io/errors v1.0.1 + cosmossdk.io/log v1.4.1 + cosmossdk.io/math v1.3.0 + cosmossdk.io/store v1.1.1 + cosmossdk.io/x/tx v0.13.5 github.com/99designs/keyring v1.2.1 - github.com/armon/go-metrics v0.4.1 github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 - github.com/bits-and-blooms/bitset v1.7.0 + github.com/bits-and-blooms/bitset v1.8.0 github.com/chzyer/readline v1.5.1 github.com/cockroachdb/apd/v2 v2.0.2 - github.com/cockroachdb/errors v1.9.1 - github.com/cometbft/cometbft v0.38.0-rc1 + github.com/cockroachdb/errors v1.11.3 + github.com/cometbft/cometbft v0.38.12 github.com/cosmos/btcutil v1.0.5 - github.com/cosmos/cosmos-db v1.0.0 - github.com/cosmos/cosmos-proto v1.0.0-beta.3 - github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1.0.20220726092710-f848e4300a8a + github.com/cosmos/cosmos-db v1.0.2 + github.com/cosmos/cosmos-proto v1.0.0-beta.5 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/gogogateway v1.2.0 - github.com/cosmos/gogoproto v1.4.10 - github.com/cosmos/ledger-cosmos-go v0.13.0 + github.com/cosmos/gogoproto v1.7.0 + github.com/cosmos/ledger-cosmos-go v0.13.3 github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.3 - github.com/google/go-cmp v0.5.9 + github.com/golang/protobuf v1.5.4 + github.com/google/go-cmp v0.6.0 github.com/google/gofuzz v1.2.0 github.com/gorilla/handlers v1.5.1 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d + github.com/hashicorp/go-metrics v0.5.3 + github.com/hashicorp/golang-lru v1.0.2 github.com/hdevalence/ed25519consensus v0.1.0 github.com/huandu/skiplist v1.2.0 github.com/improbable-eng/grpc-web v0.15.0 - github.com/jhump/protoreflect v1.15.1 + github.com/jhump/protoreflect v1.15.3 github.com/magiconair/properties v1.8.7 github.com/manifoldco/promptui v0.9.0 - github.com/mattn/go-isatty v0.0.19 - github.com/prometheus/client_golang v1.15.1 - github.com/prometheus/common v0.44.0 - github.com/rs/zerolog v1.29.1 - github.com/spf13/cast v1.5.1 - github.com/spf13/cobra v1.7.0 + github.com/mattn/go-isatty v0.0.20 + github.com/prometheus/client_golang v1.20.1 + github.com/prometheus/common v0.55.0 + github.com/rs/zerolog v1.33.0 + github.com/spf13/cast v1.6.0 + github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.16.0 - github.com/stretchr/testify v1.8.4 + github.com/spf13/viper v1.19.0 + github.com/stretchr/testify v1.9.0 github.com/tendermint/go-amino v0.16.0 - golang.org/x/crypto v0.9.0 - golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 - golang.org/x/sync v0.2.0 - google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a - google.golang.org/grpc v1.55.0 - google.golang.org/protobuf v1.30.0 - gotest.tools/v3 v3.4.0 - pgregory.net/rapid v0.6.2 - sigs.k8s.io/yaml v1.3.0 + golang.org/x/crypto v0.27.0 + golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 + golang.org/x/sync v0.8.0 + google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 + google.golang.org/grpc v1.67.1 + google.golang.org/protobuf v1.35.1 + gotest.tools/v3 v3.5.1 + pgregory.net/rapid v1.1.0 + sigs.k8s.io/yaml v1.4.0 ) require ( filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect + github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect - github.com/bufbuild/protocompile v0.5.1 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect + github.com/bufbuild/protocompile v0.6.0 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f // indirect - github.com/cockroachdb/redact v1.1.4 // indirect - github.com/cometbft/cometbft-db v0.7.0 // indirect - github.com/cosmos/iavl v1.0.0-beta.2 // indirect - github.com/cosmos/ics23/go v0.10.0 // indirect + github.com/cockroachdb/pebble v1.1.1 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/cometbft/cometbft-db v0.11.0 // indirect + github.com/cosmos/iavl v1.2.0 // indirect + github.com/cosmos/ics23/go v0.11.0 // indirect github.com/danieljoos/wincred v1.1.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect - github.com/emicklei/dot v1.4.2 // indirect + github.com/dvsekhvalnov/jose2go v1.6.0 // indirect + github.com/emicklei/dot v1.6.1 // indirect github.com/fatih/color v1.15.0 // indirect - github.com/felixge/httpsnoop v1.0.2 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/getsentry/sentry-go v0.21.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.1.0 // indirect + github.com/golang/glog v1.2.2 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/orderedcode v0.0.1 // indirect - github.com/gorilla/websocket v1.5.0 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-plugin v1.4.10 // indirect + github.com/hashicorp/go-plugin v1.5.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect - github.com/iancoleman/strcase v0.2.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.16.5 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect - github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.0 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/nxadm/tail v1.4.8 // indirect - github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect - github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 // indirect + github.com/pelletier/go-toml/v2 v2.2.2 // indirect + github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect - github.com/rs/cors v1.8.3 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rs/cors v1.11.1 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect - github.com/tidwall/btree v1.6.0 // indirect - github.com/zondax/hid v0.9.1 // indirect - github.com/zondax/ledger-go v0.14.1 // indirect - go.etcd.io/bbolt v1.3.6 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect - google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect + github.com/tidwall/btree v1.7.0 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect + go.etcd.io/bbolt v1.3.10 // indirect + go.uber.org/multierr v1.10.0 // indirect + golang.org/x/net v0.29.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/term v0.24.0 // indirect + golang.org/x/text v0.18.0 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.6 // indirect ) +// Here are the short-lived replace from the Cosmos SDK +// Replace here are pending PRs, or version to be tagged +// replace ( +// +// ) + // Below are the long-lived replace of the Cosmos SDK replace ( // use cosmos fork of keyring @@ -169,12 +178,16 @@ replace ( github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2 // Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities. // TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 - github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.0 + github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.1 // replace broken goleveldb github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) retract ( + // false start by tagging the wrong branch + v0.50.0 + // revert fix https://github.com/cosmos/cosmos-sdk/pull/16331 + v0.46.12 // subject to a bug in the group module and gov module migration [v0.46.5, v0.46.6] // subject to the dragonberry vulnerability diff --git a/go.sum b/go.sum index 9408b0371b84..ef539c6d3313 100644 --- a/go.sum +++ b/go.sum @@ -1,87 +1,50 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.4.2 h1:lQBMl4xINnMnBOR/tQLtjlDnR4exr4e6/SfHR8PILE0= -cosmossdk.io/api v0.4.2/go.mod h1:qrVgOp7DIeAXa+Tt5dDjOC47bZCDrwx8ZHxrmy7STNE= -cosmossdk.io/collections v0.2.0 h1:CgMfLtE16+qox3zBYrGh60i4yKV8SeExLnIdOS2sbQs= -cosmossdk.io/collections v0.2.0/go.mod h1:Oc1FK0vlmxJZsgUn9/o3ldE6zNyWKvobVzaLhWknZJE= -cosmossdk.io/core v0.8.0 h1:LcJnu52E1a8f8E317VfQ1xK/RZe+IuhMNQAjnDLh25M= -cosmossdk.io/core v0.8.0/go.mod h1:LF6VLOv2DdCiaHxYVmr0MZcZpaSM9ZgvyrQSYTeg6D0= -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.0.20230524212735-6cabb6aa5741 h1:BCRz06fvddw7cKGiEGDiSox3qMsjQ97f92K+PDZDHdc= -cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741/go.mod h1:TB05o6YXkZkzsc+6bZFAV5kZRBtoCU9tUkbeMIqEg0w= -cosmossdk.io/log v1.1.0 h1:v0ogPHYeTzPcBTcPR1A3j1hkei4pZama8kz8LKlCMv0= -cosmossdk.io/log v1.1.0/go.mod h1:6zjroETlcDs+mm62gd8Ig7mZ+N+fVOZS91V17H+M4N4= -cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c h1:A+FMPW9GtfcPBDQNtFeDFN27h1SAP6OVjnGgPLlYXmI= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c/go.mod h1:RbYGvXCbz8uNBCXrwS9Z8SyydeWi+W5x5MZ33muyzMw= -cosmossdk.io/x/tx v0.8.0 h1:gLiGRL/Fy7fs6dd0IX8jOf0PrVr56/SG6XVMGQjyvJU= -cosmossdk.io/x/tx v0.8.0/go.mod h1:T9uEumGNgKU61gJYRv1t3uzQwLnASpJGmSE229HM3xA= +cosmossdk.io/api v0.7.6 h1:PC20PcXy1xYKH2KU4RMurVoFjjKkCgYRbVAD4PdqUuY= +cosmossdk.io/api v0.7.6/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= +cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= +cosmossdk.io/core v0.11.1 h1:h9WfBey7NAiFfIcUhDVNS503I2P2HdZLebJlUIs8LPA= +cosmossdk.io/core v0.11.1/go.mod h1:OJzxcdC+RPrgGF8NJZR2uoQr56tc7gfBKhiKeDO7hH0= +cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E= +cosmossdk.io/depinject v1.1.0/go.mod h1:kkI5H9jCGHeKeYWXTqYdruogYrEeWvBQCw1Pj4/eCFI= +cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= +cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= +cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= +cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= +cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= +cosmossdk.io/store v1.1.1 h1:NA3PioJtWDVU7cHHeyvdva5J/ggyLDkyH0hGHl2804Y= +cosmossdk.io/store v1.1.1/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= +cosmossdk.io/x/tx v0.13.5 h1:FdnU+MdmFWn1pTsbfU0OCf2u6mJ8cqc1H4OMG418MLw= +cosmossdk.io/x/tx v0.13.5/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= +github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -93,14 +56,11 @@ github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -109,17 +69,19 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.7.0 h1:YjAGVd3XmtK9ktAbX8Zg2g2PwLIMjGREZJHlV4j7NEo= -github.com/bits-and-blooms/bitset v1.7.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= -github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= -github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= -github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= +github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= +github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ= +github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c= +github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= -github.com/bufbuild/protocompile v0.5.1 h1:mixz5lJX4Hiz4FpqFREJHIXLfaLBntfaJv1h+/jS+Qg= -github.com/bufbuild/protocompile v0.5.1/go.mod h1:G5iLmavmF4NsYtpZFvE3B/zFch2GIY8+wjsYLR/lc40= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= +github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= -github.com/bytedance/sonic v1.8.0 h1:ea0Xadu+sHlu7x5O3gKhRpQ1IKiMrSiHttPF0ybECuA= -github.com/bytedance/sonic v1.8.0/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= +github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= +github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -130,8 +92,8 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA 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.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= @@ -149,7 +111,6 @@ github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= @@ -158,27 +119,28 @@ github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f h1:qQW3qCVRpjYsV4YNaUOjm6YLeliAD2jpgex9+D9tqU4= -github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f/go.mod h1:TkdVsGYRqtULUppt2RbC+YaKtTHnHoWa2apfFrSKABw= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/redact v1.1.4 h1:Y0XrVI2FAyofNyGveodTN//qdpPtFKcKTeCBsK3AHAQ= -github.com/cockroachdb/redact v1.1.4/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= +github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/cometbft/cometbft v0.38.0-rc1 h1:ph6smlqX82aH+d72KuxDHqu29M7LyusSp/obfGsGX/w= -github.com/cometbft/cometbft v0.38.0-rc1/go.mod h1:5Jz0Z8YsHSf0ZaAqGvi/ifioSdVFPtEGrm8Y9T/993k= -github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= -github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= +github.com/cometbft/cometbft v0.38.12 h1:OWsLZN2KcSSFe8bet9xCn07VwhBnavPea3VyPnNq1bg= +github.com/cometbft/cometbft v0.38.12/go.mod h1:GPHp3/pehPqgX1930HmK1BpBLZPxB75v/dZg8Viwy+o= +github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= +github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/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= @@ -187,45 +149,42 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= -github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= -github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= -github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -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-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= +github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cosmos/iavl v1.0.0-beta.2 h1:XOsIM80Yyml/KifCXEYOy9tWCXwMAbLa91n6pReW07Y= -github.com/cosmos/iavl v1.0.0-beta.2/go.mod h1:EA97dJ07TBktRlG/iGzK6g1eCXNj1q3MGoFYkVzrwHE= -github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= -github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= +github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= +github.com/cosmos/iavl v1.2.0 h1:kVxTmjTh4k0Dh1VNL046v6BXqKziqMDzxo93oh3kOfM= +github.com/cosmos/iavl v1.2.0/go.mod h1:HidWWLVAtODJqFD6Hbne2Y0q3SdxByJepHUOeoH4LiI= +github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= +github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo= github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -github.com/cosmos/ledger-cosmos-go v0.13.0 h1:ex0CvCxToSR7j5WjrghPu2Bu9sSXKikjnVvUryNnx4s= -github.com/cosmos/ledger-cosmos-go v0.13.0/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew 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/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= 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= @@ -235,65 +194,57 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUn 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/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= -github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= +github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/emicklei/dot v1.4.2 h1:UbK6gX4yvrpHKlxuUQicwoAis4zl8Dzwit9SnbBAXWw= -github.com/emicklei/dot v1.4.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= +github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -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/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= -github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= 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.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.21.0 h1:c9l5F1nPF30JIppulk4veau90PK6Smu3abgVtVQWon4= -github.com/getsentry/sentry-go v0.21.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= +github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.9.0 h1:OjyFBKICoexlu99ctXNR2gg+c5pKrKMuyjgARg9qeY8= -github.com/gin-gonic/gin v1.9.0/go.mod h1:W1Me9+hsUSyj3CePGrd1/QrKJMSJ1Tu/0hFEH89961k= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= +github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -308,14 +259,13 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU= -github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s= +github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= +github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= 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/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= @@ -324,13 +274,11 @@ github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/goccy/go-json v0.10.0 h1:mXKd9Qw4NuzShiRlOXKews24ufknHO7gx30lsDyokKA= -github.com/goccy/go-json v0.10.0/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -341,23 +289,13 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV 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/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/glog v1.2.2 h1:1+mZ9upx1Dh6FmUTFR1naJ77miKiXgALjWOZ3NVFPmY= +github.com/golang/glog v1.2.2/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -365,7 +303,6 @@ github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= 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= @@ -377,13 +314,12 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 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/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -392,41 +328,21 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a 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.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= @@ -437,8 +353,8 @@ github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= @@ -459,10 +375,12 @@ github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVH github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= +github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v1.4.10 h1:xUbmA4jC6Dq163/fWcp8P3JuHilrHHMLNRxzGQJ9hNk= -github.com/hashicorp/go-plugin v1.4.10/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -474,8 +392,10 @@ github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -492,25 +412,16 @@ github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0Jr github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= -github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= -github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= @@ -523,57 +434,41 @@ github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= 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.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= -github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid v1.2.1 h1:vJi+O/nMdFt0vqm8NZBI6wzALWdA2X+egi0ogNyrC/w= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= +github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= -github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= -github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= +github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= -github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.0 h1:H4L/LhP7GOMf1j17oQAElHgVlbEje2h14A8Tz9cM2BE= -github.com/linxGnu/grocksdb v1.8.0/go.mod h1:09CeBborffXhXdNpEcOeZrLKEnRtrZFEpFdPNI9Zjjg= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= @@ -581,30 +476,20 @@ github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3v github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= @@ -627,9 +512,10 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -645,8 +531,8 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA 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/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce h1:/pEpMk55wH0X+E5zedGEMOdLuWmV8P4+4W3+LZaM6kg= -github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= @@ -654,7 +540,6 @@ github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DV 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.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= @@ -662,10 +547,14 @@ github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa 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.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -675,19 +564,20 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 h1:W04oB3d0J01W5jgYRGKsV8LCM6g9EkCvPkZcmFuy0OE= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= @@ -698,9 +588,9 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -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/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -708,103 +598,102 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/prometheus/client_golang v1.20.1 h1:IMJXHOD6eARkQpxo8KkhgEVFlBNm+nkrFUyGlIu7Na8= +github.com/prometheus/client_golang v1.20.1/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= -github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= 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/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= 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.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= 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= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= +github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/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/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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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= @@ -815,68 +704,45 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= 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/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= -github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.9 h1:rmenucSohSTiyL09Y+l2OCk+FrMxGMzho2+tjr5ticU= -github.com/ugorji/go/codec v1.2.9/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= +github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= -github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= -github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/bbolt v1.3.10 h1:+BqfJTcCzTItrop8mq/lbzL8wSGtj94UO/3U31shqG0= +go.etcd.io/bbolt v1.3.10/go.mod h1:bK3UQLPJZly7IlNmV7uVHJDxfe5aK9Ll93e/74Y9oEQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -886,70 +752,52 @@ go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -golang.org/x/arch v0.0.0-20210923205945-b76863e36670 h1:18EFjUmQOcUvxNYSkA6jO9VAiXCnxFY6NyDX0bHDmkU= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= +golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= 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= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 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/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -961,72 +809,43 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/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-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/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-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1038,281 +857,145 @@ golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/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-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-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 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.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -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-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= 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/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 h1:x1vNwUhVOcsYoKyEGCZBH694SBmmBjA2EfauFVEI2+M= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a h1:HiYVD+FGJkTo+9zj1gqz0anapsa1JxjiSrN+BJKyUmE= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f h1:cUMEy+8oS78BWIH9OWazBkzbr090Od9tWBNtZHkOhf0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= 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= @@ -1327,8 +1010,9 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1340,10 +1024,8 @@ gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= @@ -1356,32 +1038,22 @@ gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -pgregory.net/rapid v0.6.2 h1:ErW5sL+UKtfBfUTsWHDCoeB+eZKLKMxrSd1VJY6W4bw= -pgregory.net/rapid v0.6.2/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/go.work.example b/go.work.example index e93f4caff3cc..5cd3340df388 100644 --- a/go.work.example +++ b/go.work.example @@ -1,4 +1,4 @@ -go 1.20 +go 1.21 use ( . @@ -14,7 +14,6 @@ use ( ./simapp ./tests ./store - ./tools/rosetta ./tools/cosmovisor ./tools/confix ./tools/hubl diff --git a/internal/db/iterator_adapter.go b/internal/db/iterator_adapter.go deleted file mode 100644 index 02b18acf0fd4..000000000000 --- a/internal/db/iterator_adapter.go +++ /dev/null @@ -1,25 +0,0 @@ -package db - -import ( - storetypes "cosmossdk.io/store/types" - - dbm "github.com/cosmos/cosmos-sdk/db" -) - -var _ = (*storetypes.Iterator)(nil) - -type AsStoreIter struct { - dbm.Iterator - valid bool -} - -// DBToStoreIterator returns an iterator wrapping the given iterator so that it satisfies the -// (store/types).Iterator interface. -func ToStoreIterator(source dbm.Iterator) *AsStoreIter { - ret := &AsStoreIter{Iterator: source} - ret.Next() // The DB iterator must be primed before it can access the first element, because Next also returns the validity status - return ret -} - -func (it *AsStoreIter) Next() { it.valid = it.Iterator.Next() } -func (it *AsStoreIter) Valid() bool { return it.valid } diff --git a/log/bench_test.go b/log/bench_test.go index d1dd9d8e6439..0005e9c12102 100644 --- a/log/bench_test.go +++ b/log/bench_test.go @@ -7,8 +7,9 @@ import ( "testing" "time" - "cosmossdk.io/log" "github.com/rs/zerolog" + + "cosmossdk.io/log" ) const message = "test message" diff --git a/log/level_test.go b/log/level_test.go index 3e2b804542ae..e893ca424274 100644 --- a/log/level_test.go +++ b/log/level_test.go @@ -3,8 +3,9 @@ package log_test import ( "testing" - "cosmossdk.io/log" "gotest.tools/v3/assert" + + "cosmossdk.io/log" ) func TestParseLogLevel(t *testing.T) { diff --git a/log/writer_test.go b/log/writer_test.go index fc312efb679b..1c43030f8d7e 100644 --- a/log/writer_test.go +++ b/log/writer_test.go @@ -5,8 +5,9 @@ import ( "strings" "testing" - "cosmossdk.io/log" "gotest.tools/v3/assert" + + "cosmossdk.io/log" ) func TestFilteredWriter(t *testing.T) { diff --git a/math/CHANGELOG.md b/math/CHANGELOG.md index b337d786d431..10dbe4a437c5 100644 --- a/math/CHANGELOG.md +++ b/math/CHANGELOG.md @@ -39,6 +39,7 @@ Ref: https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.j ### Bug Fixes * [#16266](https://github.com/cosmos/cosmos-sdk/pull/16266) fix: legacy dec power mut zero exponent precision. +* [#18211](https://github.com/cosmos/cosmos-sdk/pull/18211) RelativePow now returns 1 when 0^0, before it was returning the scale factor. ## [math/v1.0.1](https://github.com/cosmos/cosmos-sdk/releases/tag/math/v1.0.1) - 2023-05-15 diff --git a/math/int.go b/math/int.go index 3e6b5c257dec..dc945b13d283 100644 --- a/math/int.go +++ b/math/int.go @@ -455,7 +455,7 @@ var stringsBuilderPool = &sync.Pool{ // FormatInt formats an integer (encoded as in protobuf) into a value-rendered // string following ADR-050. This function operates with string manipulation -// (instead of manipulating the int or sdk.Int object). +// (instead of manipulating the int or math.Int object). func FormatInt(v string) (string, error) { if len(v) == 0 { return "", fmt.Errorf("cannot format empty string") diff --git a/math/uint.go b/math/uint.go index 406d9418cea1..0a61646ae188 100644 --- a/math/uint.go +++ b/math/uint.go @@ -243,8 +243,8 @@ func checkNewUint(i *big.Int) (Uint, error) { func RelativePow(x, n, b Uint) (z Uint) { if x.IsZero() { if n.IsZero() { - z = b // 0^0 = 1 - return + z = OneUint() // 0^0 = 1 + return z } z = ZeroUint() // otherwise 0^a = 0 return diff --git a/math/uint_test.go b/math/uint_test.go index 428672cb2cea..0c464433a074 100644 --- a/math/uint_test.go +++ b/math/uint_test.go @@ -8,8 +8,9 @@ import ( "strings" "testing" - sdkmath "cosmossdk.io/math" "github.com/stretchr/testify/suite" + + sdkmath "cosmossdk.io/math" ) type uintTestSuite struct { @@ -270,7 +271,7 @@ func (s *uintTestSuite) TestRelativePow() { want sdkmath.Uint }{ {[]sdkmath.Uint{sdkmath.ZeroUint(), sdkmath.ZeroUint(), sdkmath.OneUint()}, sdkmath.OneUint()}, - {[]sdkmath.Uint{sdkmath.ZeroUint(), sdkmath.ZeroUint(), sdkmath.NewUint(10)}, sdkmath.NewUint(10)}, + {[]sdkmath.Uint{sdkmath.ZeroUint(), sdkmath.ZeroUint(), sdkmath.NewUint(10)}, sdkmath.NewUint(1)}, {[]sdkmath.Uint{sdkmath.ZeroUint(), sdkmath.OneUint(), sdkmath.NewUint(10)}, sdkmath.ZeroUint()}, {[]sdkmath.Uint{sdkmath.NewUint(10), sdkmath.NewUint(2), sdkmath.OneUint()}, sdkmath.NewUint(100)}, {[]sdkmath.Uint{sdkmath.NewUint(210), sdkmath.NewUint(2), sdkmath.NewUint(100)}, sdkmath.NewUint(441)}, diff --git a/orm/encoding/ormfield/codec.go b/orm/encoding/ormfield/codec.go index ae18c5953935..f90a98f8d912 100644 --- a/orm/encoding/ormfield/codec.go +++ b/orm/encoding/ormfield/codec.go @@ -3,11 +3,11 @@ package ormfield import ( "io" - "cosmossdk.io/orm/types/ormerrors" - "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/types/known/durationpb" "google.golang.org/protobuf/types/known/timestamppb" + + "cosmossdk.io/orm/types/ormerrors" ) // Codec defines an interface for decoding and encoding values in ORM index keys. diff --git a/orm/encoding/ormkv/key_codec_test.go b/orm/encoding/ormkv/key_codec_test.go index b2937426a7a0..7f078504fb35 100644 --- a/orm/encoding/ormkv/key_codec_test.go +++ b/orm/encoding/ormkv/key_codec_test.go @@ -206,7 +206,7 @@ func TestDecodePrefixKey(t *testing.T) { bz, err := cdc.EncodeKey(test.values) assert.NilError(t, err) values, err := cdc.DecodeKey(bytes.NewReader(bz)) - assert.ErrorType(t, err, io.EOF) + assert.ErrorIs(t, err, io.EOF) assert.Equal(t, 0, cdc.CompareKeys(test.values, values)) }) } diff --git a/orm/go.mod b/orm/go.mod index 6d7202540370..8ad0d36a8248 100644 --- a/orm/go.mod +++ b/orm/go.mod @@ -3,22 +3,22 @@ module cosmossdk.io/orm go 1.20 require ( - cosmossdk.io/api v0.4.2 - cosmossdk.io/core v0.8.0 - cosmossdk.io/depinject v1.0.0-alpha.3 + cosmossdk.io/api v0.7.5 + cosmossdk.io/core v0.11.0 + cosmossdk.io/depinject v1.0.0-alpha.4 cosmossdk.io/errors v1.0.0-beta.7 - github.com/cosmos/cosmos-db v1.0.0 - github.com/cosmos/cosmos-proto v1.0.0-beta.3 + github.com/cosmos/cosmos-db v1.0.2 + github.com/cosmos/cosmos-proto v1.0.0-beta.5 github.com/golang/mock v1.6.0 - github.com/google/go-cmp v0.5.9 + github.com/google/go-cmp v0.6.0 github.com/iancoleman/strcase v0.2.0 github.com/regen-network/gocuke v0.6.2 - github.com/stretchr/testify v1.8.4 - golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 - google.golang.org/grpc v1.55.0 - google.golang.org/protobuf v1.30.0 - gotest.tools/v3 v3.4.0 - pgregory.net/rapid v0.6.2 + github.com/stretchr/testify v1.9.0 + golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 + google.golang.org/grpc v1.62.1 + google.golang.org/protobuf v1.33.0 + gotest.tools/v3 v3.5.1 + pgregory.net/rapid v1.1.0 ) require ( @@ -27,41 +27,43 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cockroachdb/apd/v3 v3.1.0 // indirect - github.com/cockroachdb/errors v1.9.1 // indirect + github.com/cockroachdb/errors v1.11.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230525220056-bb4fc9527b3b // indirect - github.com/cockroachdb/redact v1.1.4 // indirect - github.com/cosmos/gogoproto v1.4.10 // indirect + github.com/cockroachdb/pebble v1.1.0 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/cosmos/gogoproto v1.7.0 // indirect github.com/cucumber/common/gherkin/go/v22 v22.0.0 // indirect github.com/cucumber/common/messages/go/v17 v17.1.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/getsentry/sentry-go v0.21.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/gofrs/uuid v4.2.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/klauspost/compress v1.16.5 // indirect + github.com/klauspost/compress v1.17.7 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect - github.com/linxGnu/grocksdb v1.7.16 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/linxGnu/grocksdb v1.8.12 // indirect github.com/onsi/gomega v1.20.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.15.1 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.0 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect - github.com/spf13/cast v1.5.1 // indirect + github.com/prometheus/client_golang v1.18.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.47.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect - google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect diff --git a/orm/go.sum b/orm/go.sum index bea52fcc7e47..5be36fd89afa 100644 --- a/orm/go.sum +++ b/orm/go.sum @@ -1,62 +1,43 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cosmossdk.io/api v0.4.2 h1:lQBMl4xINnMnBOR/tQLtjlDnR4exr4e6/SfHR8PILE0= -cosmossdk.io/api v0.4.2/go.mod h1:qrVgOp7DIeAXa+Tt5dDjOC47bZCDrwx8ZHxrmy7STNE= -cosmossdk.io/core v0.8.0 h1:LcJnu52E1a8f8E317VfQ1xK/RZe+IuhMNQAjnDLh25M= -cosmossdk.io/core v0.8.0/go.mod h1:LF6VLOv2DdCiaHxYVmr0MZcZpaSM9ZgvyrQSYTeg6D0= -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/api v0.7.5 h1:eMPTReoNmGUm8DeiQL9DyM8sYDjEhWzL1+nLbI9DqtQ= +cosmossdk.io/api v0.7.5/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= +cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= 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= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= github.com/alecthomas/participle/v2 v2.0.0-alpha7/go.mod h1:NumScqsC42o9x+dGj8/YqsIfhrIQjFEOFovxotbBirA= github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1 h1:GDQdwm/gAcJcLAKQQZGOJ4knlw+7rfEQQcmwTbt4p5E= github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= github.com/cockroachdb/apd/v3 v3.1.0/go.mod h1:6qgPBMXjATAdD/VefbRP9NoSLKjbB4LCoA7gN4LpHs4= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZazG8= +github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230525220056-bb4fc9527b3b h1:LCs8gDhg6vt8A3dN7AEJxmCoETZ4qkySoVJVm3rcSJk= -github.com/cockroachdb/pebble v0.0.0-20230525220056-bb4fc9527b3b/go.mod h1:TkdVsGYRqtULUppt2RbC+YaKtTHnHoWa2apfFrSKABw= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/redact v1.1.4 h1:Y0XrVI2FAyofNyGveodTN//qdpPtFKcKTeCBsK3AHAQ= -github.com/cockroachdb/redact v1.1.4/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -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-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= -github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= -github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= -github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cockroachdb/pebble v1.1.0 h1:pcFh8CdCIt2kmEpK0OIatq67Ln9uGDYY3d5XnE0LJG4= +github.com/cockroachdb/pebble v1.1.0/go.mod h1:sEHm5NOXxyiAoKWhoFxT8xMgd/f3RA6qUqQ1BXKrh2E= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= +github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= +github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= github.com/cucumber/common/gherkin/go/v22 v22.0.0/go.mod h1:3mJT10B2GGn3MvVPd3FwR7m2u4tLhSRhWUqJU4KN4Fg= @@ -65,158 +46,65 @@ github.com/cucumber/common/messages/go/v17 v17.1.1/go.mod h1:bpGxb57tDE385Rb2Eoh 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 v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= 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/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.21.0 h1:c9l5F1nPF30JIppulk4veau90PK6Smu3abgVtVQWon4= -github.com/getsentry/sentry-go v0.21.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= -github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= -github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= 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/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 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.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= 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/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.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.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -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/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= 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.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= -github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/linxGnu/grocksdb v1.7.16 h1:Q2co1xrpdkr5Hx3Fp+f+f7fRGhQFQhvi/+226dtLmA8= -github.com/linxGnu/grocksdb v1.7.16/go.mod h1:JkS7pl5qWpGpuVb3bPqTz8nC12X3YtPZT+Xq7+QfQo4= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= -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/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= +github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= 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.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= @@ -228,237 +116,127 @@ github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAl github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= 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/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= -github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/procfs v0.10.0 h1:UkG7GPYkO4UZyLnyXjaWYcgOSONqwdBqFUT95ugmt6I= -github.com/prometheus/procfs v0.10.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= +github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.47.0 h1:p5Cz0FNHo7SnWOmWmoRozVcjEp0bIVU8cV7OShpjL1k= +github.com/prometheus/common v0.47.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= github.com/regen-network/gocuke v0.6.2/go.mod h1:zYaqIHZobHyd0xOrHGPQjbhGJsuZ1oElx150u2o1xuk= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/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/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= -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/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= 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.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -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-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= 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/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/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-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-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-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-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/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= 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-20190222072716-a9d3bda3a223/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-20190813064441-fde4db37ae7a/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-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/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-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/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.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 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/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= 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= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= 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= @@ -466,16 +244,12 @@ 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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -pgregory.net/rapid v0.6.2 h1:ErW5sL+UKtfBfUTsWHDCoeB+eZKLKMxrSd1VJY6W4bw= -pgregory.net/rapid v0.6.2/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/orm/internal/codegen/codegen.go b/orm/internal/codegen/codegen.go index aa2513504ed5..8f253f3f672b 100644 --- a/orm/internal/codegen/codegen.go +++ b/orm/internal/codegen/codegen.go @@ -4,12 +4,12 @@ import ( "fmt" "os" + "github.com/cosmos/cosmos-proto/generator" "google.golang.org/protobuf/compiler/protogen" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/pluginpb" ormv1 "cosmossdk.io/api/cosmos/orm/v1" - "github.com/cosmos/cosmos-proto/generator" ) const ( diff --git a/orm/internal/codegen/singleton.go b/orm/internal/codegen/singleton.go index 851e70b73437..639fe256b9f2 100644 --- a/orm/internal/codegen/singleton.go +++ b/orm/internal/codegen/singleton.go @@ -7,7 +7,6 @@ import ( "google.golang.org/protobuf/types/dynamicpb" ormv1 "cosmossdk.io/api/cosmos/orm/v1" - "cosmossdk.io/orm/model/ormtable" ) diff --git a/orm/internal/codegen/table.go b/orm/internal/codegen/table.go index 1b26e9103d2c..9363fab03696 100644 --- a/orm/internal/codegen/table.go +++ b/orm/internal/codegen/table.go @@ -10,7 +10,6 @@ import ( "google.golang.org/protobuf/types/dynamicpb" ormv1 "cosmossdk.io/api/cosmos/orm/v1" - "cosmossdk.io/orm/internal/fieldnames" "cosmossdk.io/orm/model/ormtable" ) diff --git a/orm/internal/fieldnames/fieldnames_test.go b/orm/internal/fieldnames/fieldnames_test.go index f341fd7e3fe4..0bade00de8c2 100644 --- a/orm/internal/fieldnames/fieldnames_test.go +++ b/orm/internal/fieldnames/fieldnames_test.go @@ -4,7 +4,6 @@ import ( "testing" "google.golang.org/protobuf/reflect/protoreflect" - "gotest.tools/v3/assert" ) diff --git a/orm/internal/stablejson/encode_test.go b/orm/internal/stablejson/encode_test.go index c75b48f15479..a874f04e37be 100644 --- a/orm/internal/stablejson/encode_test.go +++ b/orm/internal/stablejson/encode_test.go @@ -3,14 +3,13 @@ package stablejson_test import ( "testing" + "github.com/cosmos/cosmos-proto/anyutil" "github.com/stretchr/testify/require" "google.golang.org/protobuf/types/known/anypb" bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" - "github.com/cosmos/cosmos-proto/anyutil" - "cosmossdk.io/orm/internal/stablejson" ) diff --git a/orm/internal/testpb/bank_query.proto b/orm/internal/testpb/bank_query.proto index a204777bd4ba..6335d52eaf58 100644 --- a/orm/internal/testpb/bank_query.proto +++ b/orm/internal/testpb/bank_query.proto @@ -42,7 +42,7 @@ message ListBalanceRequest { // denom specifies the value of the Denom index key to use in the query. Denom denom = 2; } - + message AddressDenom { // address is the value of the address field in the index. // It can be omitted to query for all valid values of that field in this segment of the index. @@ -51,14 +51,14 @@ message ListBalanceRequest { // It can be omitted to query for all valid values of that field in this segment of the index. optional string denom = 2; } - + message Denom { // denom is the value of the denom field in the index. // It can be omitted to query for all valid values of that field in this segment of the index. optional string denom = 1; } } - + // query specifies the type of query - either a prefix or range query. oneof query { // prefix_query specifies the index key value to use for the prefix query. @@ -68,7 +68,7 @@ message ListBalanceRequest { } // pagination specifies optional pagination parameters. cosmos.base.query.v1beta1.PageRequest pagination = 3; - + // RangeQuery specifies the from/to index keys for a range query. message RangeQuery { // from is the index key to use for the start of the range query. @@ -110,14 +110,14 @@ message ListSupplyRequest { // denom specifies the value of the Denom index key to use in the query. Denom denom = 1; } - + message Denom { // denom is the value of the denom field in the index. // It can be omitted to query for all valid values of that field in this segment of the index. optional string denom = 1; } } - + // query specifies the type of query - either a prefix or range query. oneof query { // prefix_query specifies the index key value to use for the prefix query. @@ -127,7 +127,7 @@ message ListSupplyRequest { } // pagination specifies optional pagination parameters. cosmos.base.query.v1beta1.PageRequest pagination = 3; - + // RangeQuery specifies the from/to index keys for a range query. message RangeQuery { // from is the index key to use for the start of the range query. @@ -147,4 +147,3 @@ message ListSupplyResponse { // pagination is the pagination response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } - diff --git a/orm/internal/testpb/test_schema_query.proto b/orm/internal/testpb/test_schema_query.proto index 8e07ccfcfe80..c3dbcfd5d885 100644 --- a/orm/internal/testpb/test_schema_query.proto +++ b/orm/internal/testpb/test_schema_query.proto @@ -16,11 +16,15 @@ service TestSchemaQueryService { // ListExampleTable queries the ExampleTable table using prefix and range queries against defined indexes. rpc ListExampleTable(ListExampleTableRequest) returns (ListExampleTableResponse) {} // Get queries the ExampleAutoIncrementTable table by its primary key. - rpc GetExampleAutoIncrementTable(GetExampleAutoIncrementTableRequest) returns (GetExampleAutoIncrementTableResponse) {} + rpc GetExampleAutoIncrementTable(GetExampleAutoIncrementTableRequest) returns (GetExampleAutoIncrementTableResponse) { + } // GetExampleAutoIncrementTableByX queries the ExampleAutoIncrementTable table by its X index - rpc GetExampleAutoIncrementTableByX(GetExampleAutoIncrementTableByXRequest) returns (GetExampleAutoIncrementTableByXResponse) {} - // ListExampleAutoIncrementTable queries the ExampleAutoIncrementTable table using prefix and range queries against defined indexes. - rpc ListExampleAutoIncrementTable(ListExampleAutoIncrementTableRequest) returns (ListExampleAutoIncrementTableResponse) {} + rpc GetExampleAutoIncrementTableByX(GetExampleAutoIncrementTableByXRequest) + returns (GetExampleAutoIncrementTableByXResponse) {} + // ListExampleAutoIncrementTable queries the ExampleAutoIncrementTable table using prefix and range queries against + // defined indexes. + rpc ListExampleAutoIncrementTable(ListExampleAutoIncrementTableRequest) + returns (ListExampleAutoIncrementTableResponse) {} // GetExampleSingleton queries the ExampleSingleton singleton. rpc GetExampleSingleton(GetExampleSingletonRequest) returns (GetExampleSingletonResponse) {} // Get queries the ExampleTimestamp table by its primary key. @@ -39,7 +43,8 @@ service TestSchemaQueryService { rpc ListSimpleExample(ListSimpleExampleRequest) returns (ListSimpleExampleResponse) {} // Get queries the ExampleAutoIncFieldName table by its primary key. rpc GetExampleAutoIncFieldName(GetExampleAutoIncFieldNameRequest) returns (GetExampleAutoIncFieldNameResponse) {} - // ListExampleAutoIncFieldName queries the ExampleAutoIncFieldName table using prefix and range queries against defined indexes. + // ListExampleAutoIncFieldName queries the ExampleAutoIncFieldName table using prefix and range queries against + // defined indexes. rpc ListExampleAutoIncFieldName(ListExampleAutoIncFieldNameRequest) returns (ListExampleAutoIncFieldNameResponse) {} } @@ -85,7 +90,7 @@ message ListExampleTableRequest { // bz_str specifies the value of the BzStr index key to use in the query. BzStr bz_str = 4; } - + message U32I64Str { // u32 is the value of the u32 field in the index. // It can be omitted to query for all valid values of that field in this segment of the index. @@ -97,7 +102,7 @@ message ListExampleTableRequest { // It can be omitted to query for all valid values of that field in this segment of the index. optional string str = 3; } - + message U64Str { // u64 is the value of the u64 field in the index. // It can be omitted to query for all valid values of that field in this segment of the index. @@ -106,7 +111,7 @@ message ListExampleTableRequest { // It can be omitted to query for all valid values of that field in this segment of the index. optional string str = 2; } - + message StrU32 { // str is the value of the str field in the index. // It can be omitted to query for all valid values of that field in this segment of the index. @@ -115,7 +120,7 @@ message ListExampleTableRequest { // It can be omitted to query for all valid values of that field in this segment of the index. optional uint32 u32 = 2; } - + message BzStr { // bz is the value of the bz field in the index. // It can be omitted to query for all valid values of that field in this segment of the index. @@ -125,7 +130,7 @@ message ListExampleTableRequest { optional string str = 2; } } - + // query specifies the type of query - either a prefix or range query. oneof query { // prefix_query specifies the index key value to use for the prefix query. @@ -135,7 +140,7 @@ message ListExampleTableRequest { } // pagination specifies optional pagination parameters. cosmos.base.query.v1beta1.PageRequest pagination = 3; - + // RangeQuery specifies the from/to index keys for a range query. message RangeQuery { // from is the index key to use for the start of the range query. @@ -189,20 +194,20 @@ message ListExampleAutoIncrementTableRequest { // x specifies the value of the X index key to use in the query. X x = 2; } - + message Id { // id is the value of the id field in the index. // It can be omitted to query for all valid values of that field in this segment of the index. optional uint64 id = 1; } - + message X { // x is the value of the x field in the index. // It can be omitted to query for all valid values of that field in this segment of the index. optional string x = 1; } } - + // query specifies the type of query - either a prefix or range query. oneof query { // prefix_query specifies the index key value to use for the prefix query. @@ -212,7 +217,7 @@ message ListExampleAutoIncrementTableRequest { } // pagination specifies optional pagination parameters. cosmos.base.query.v1beta1.PageRequest pagination = 3; - + // RangeQuery specifies the from/to index keys for a range query. message RangeQuery { // from is the index key to use for the start of the range query. @@ -234,8 +239,7 @@ message ListExampleAutoIncrementTableResponse { } // GetExampleSingletonRequest is the TestSchemaQuery/GetExampleSingletonRequest request type. -message GetExampleSingletonRequest { -} +message GetExampleSingletonRequest {} // GetExampleSingletonResponse is the TestSchemaQuery/GetExampleSingletonResponse request type. message GetExampleSingletonResponse { @@ -265,20 +269,20 @@ message ListExampleTimestampRequest { // ts specifies the value of the Ts index key to use in the query. Ts ts = 2; } - + message Id { // id is the value of the id field in the index. // It can be omitted to query for all valid values of that field in this segment of the index. optional uint64 id = 1; } - + message Ts { // ts is the value of the ts field in the index. // It can be omitted to query for all valid values of that field in this segment of the index. optional google.protobuf.Timestamp ts = 1; } } - + // query specifies the type of query - either a prefix or range query. oneof query { // prefix_query specifies the index key value to use for the prefix query. @@ -288,7 +292,7 @@ message ListExampleTimestampRequest { } // pagination specifies optional pagination parameters. cosmos.base.query.v1beta1.PageRequest pagination = 3; - + // RangeQuery specifies the from/to index keys for a range query. message RangeQuery { // from is the index key to use for the start of the range query. @@ -332,20 +336,20 @@ message ListExampleDurationRequest { // dur specifies the value of the Dur index key to use in the query. Dur dur = 2; } - + message Id { // id is the value of the id field in the index. // It can be omitted to query for all valid values of that field in this segment of the index. optional uint64 id = 1; } - + message Dur { // dur is the value of the dur field in the index. // It can be omitted to query for all valid values of that field in this segment of the index. optional google.protobuf.Duration dur = 1; } } - + // query specifies the type of query - either a prefix or range query. oneof query { // prefix_query specifies the index key value to use for the prefix query. @@ -355,7 +359,7 @@ message ListExampleDurationRequest { } // pagination specifies optional pagination parameters. cosmos.base.query.v1beta1.PageRequest pagination = 3; - + // RangeQuery specifies the from/to index keys for a range query. message RangeQuery { // from is the index key to use for the start of the range query. @@ -409,20 +413,20 @@ message ListSimpleExampleRequest { // unique specifies the value of the Unique index key to use in the query. Unique unique = 2; } - + message Name { // name is the value of the name field in the index. // It can be omitted to query for all valid values of that field in this segment of the index. optional string name = 1; } - + message Unique { // unique is the value of the unique field in the index. // It can be omitted to query for all valid values of that field in this segment of the index. optional string unique = 1; } } - + // query specifies the type of query - either a prefix or range query. oneof query { // prefix_query specifies the index key value to use for the prefix query. @@ -432,7 +436,7 @@ message ListSimpleExampleRequest { } // pagination specifies optional pagination parameters. cosmos.base.query.v1beta1.PageRequest pagination = 3; - + // RangeQuery specifies the from/to index keys for a range query. message RangeQuery { // from is the index key to use for the start of the range query. @@ -474,14 +478,14 @@ message ListExampleAutoIncFieldNameRequest { // foo specifies the value of the Foo index key to use in the query. Foo foo = 1; } - + message Foo { // foo is the value of the foo field in the index. // It can be omitted to query for all valid values of that field in this segment of the index. optional uint64 foo = 1; } } - + // query specifies the type of query - either a prefix or range query. oneof query { // prefix_query specifies the index key value to use for the prefix query. @@ -491,7 +495,7 @@ message ListExampleAutoIncFieldNameRequest { } // pagination specifies optional pagination parameters. cosmos.base.query.v1beta1.PageRequest pagination = 3; - + // RangeQuery specifies the from/to index keys for a range query. message RangeQuery { // from is the index key to use for the start of the range query. @@ -511,4 +515,3 @@ message ListExampleAutoIncFieldNameResponse { // pagination is the pagination response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } - diff --git a/orm/model/ormdb/genesis.go b/orm/model/ormdb/genesis.go index 29cd0d8e65ca..b5e4d34b1de7 100644 --- a/orm/model/ormdb/genesis.go +++ b/orm/model/ormdb/genesis.go @@ -5,12 +5,11 @@ import ( "fmt" "sort" - "cosmossdk.io/core/appmodule" "golang.org/x/exp/maps" "google.golang.org/protobuf/reflect/protoreflect" + "cosmossdk.io/core/appmodule" "cosmossdk.io/errors" - "cosmossdk.io/orm/types/ormerrors" ) diff --git a/orm/model/ormdb/module.go b/orm/model/ormdb/module.go index a8ab9f89aa97..95ba640c7585 100644 --- a/orm/model/ormdb/module.go +++ b/orm/model/ormdb/module.go @@ -7,15 +7,14 @@ import ( "fmt" "math" - "cosmossdk.io/core/appmodule" - "cosmossdk.io/core/store" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protodesc" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" ormv1alpha1 "cosmossdk.io/api/cosmos/orm/v1alpha1" - + "cosmossdk.io/core/appmodule" + "cosmossdk.io/core/store" "cosmossdk.io/orm/encoding/encodeutil" "cosmossdk.io/orm/encoding/ormkv" "cosmossdk.io/orm/model/ormtable" diff --git a/orm/model/ormdb/module_test.go b/orm/model/ormdb/module_test.go index b2e73357c8c5..a5ef7bbfef77 100644 --- a/orm/model/ormdb/module_test.go +++ b/orm/model/ormdb/module_test.go @@ -8,6 +8,11 @@ import ( "strings" "testing" + dbm "github.com/cosmos/cosmos-db" + "github.com/golang/mock/gomock" + "gotest.tools/v3/assert" + "gotest.tools/v3/golden" + appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" ormmodulev1alpha1 "cosmossdk.io/api/cosmos/orm/module/v1alpha1" ormv1alpha1 "cosmossdk.io/api/cosmos/orm/v1alpha1" @@ -16,12 +21,6 @@ import ( "cosmossdk.io/core/genesis" "cosmossdk.io/core/store" "cosmossdk.io/depinject" - dbm "github.com/cosmos/cosmos-db" - - "github.com/golang/mock/gomock" - "gotest.tools/v3/assert" - "gotest.tools/v3/golden" - _ "cosmossdk.io/orm" // required for ORM module registration "cosmossdk.io/orm/internal/testkv" "cosmossdk.io/orm/internal/testpb" diff --git a/orm/model/ormlist/options.go b/orm/model/ormlist/options.go index e713dfd81400..52c8cc3463e6 100644 --- a/orm/model/ormlist/options.go +++ b/orm/model/ormlist/options.go @@ -5,7 +5,6 @@ import ( "google.golang.org/protobuf/proto" queryv1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" - "cosmossdk.io/orm/internal/listinternal" ) diff --git a/orm/model/ormtable/bench_test.go b/orm/model/ormtable/bench_test.go index dcd68324f342..509bf202cf19 100644 --- a/orm/model/ormtable/bench_test.go +++ b/orm/model/ormtable/bench_test.go @@ -5,9 +5,8 @@ import ( "fmt" "testing" - "google.golang.org/protobuf/proto" - dbm "github.com/cosmos/cosmos-db" + "google.golang.org/protobuf/proto" "gotest.tools/v3/assert" "cosmossdk.io/orm/internal/testkv" diff --git a/orm/model/ormtable/build.go b/orm/model/ormtable/build.go index b946e3f59801..4a7b8cd7a9c9 100644 --- a/orm/model/ormtable/build.go +++ b/orm/model/ormtable/build.go @@ -8,7 +8,6 @@ import ( "google.golang.org/protobuf/reflect/protoregistry" ormv1 "cosmossdk.io/api/cosmos/orm/v1" - "cosmossdk.io/orm/encoding/encodeutil" "cosmossdk.io/orm/encoding/ormkv" "cosmossdk.io/orm/internal/fieldnames" diff --git a/orm/model/ormtable/paginate.go b/orm/model/ormtable/paginate.go index 02ae110a83c0..276179e46921 100644 --- a/orm/model/ormtable/paginate.go +++ b/orm/model/ormtable/paginate.go @@ -3,9 +3,8 @@ package ormtable import ( "math" - "cosmossdk.io/orm/internal/listinternal" - queryv1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" + "cosmossdk.io/orm/internal/listinternal" ) func paginate(it Iterator, options *listinternal.Options) Iterator { diff --git a/orm/model/ormtable/save_test.go b/orm/model/ormtable/save_test.go index 3222ff3ad89f..40106550e800 100644 --- a/orm/model/ormtable/save_test.go +++ b/orm/model/ormtable/save_test.go @@ -5,11 +5,10 @@ import ( "fmt" "testing" + "github.com/regen-network/gocuke" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "google.golang.org/protobuf/encoding/protojson" - - "github.com/regen-network/gocuke" "gotest.tools/v3/assert" "cosmossdk.io/orm/internal/testpb" diff --git a/orm/model/ormtable/singleton_test.go b/orm/model/ormtable/singleton_test.go index 44a8c8f778f9..318305966e68 100644 --- a/orm/model/ormtable/singleton_test.go +++ b/orm/model/ormtable/singleton_test.go @@ -5,7 +5,6 @@ import ( "testing" "google.golang.org/protobuf/testing/protocmp" - "gotest.tools/v3/assert" "cosmossdk.io/orm/internal/testkv" diff --git a/orm/model/ormtable/table_test.go b/orm/model/ormtable/table_test.go index 766bb76592f5..8bebd0432469 100644 --- a/orm/model/ormtable/table_test.go +++ b/orm/model/ormtable/table_test.go @@ -9,7 +9,6 @@ import ( "testing" dbm "github.com/cosmos/cosmos-db" - "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/testing/protocmp" @@ -19,7 +18,6 @@ import ( queryv1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" sdkerrors "cosmossdk.io/errors" - "cosmossdk.io/orm/encoding/ormkv" "cosmossdk.io/orm/internal/testkv" "cosmossdk.io/orm/internal/testpb" diff --git a/orm/model/ormtable/timestamp_test.go b/orm/model/ormtable/timestamp_test.go index 031d755f2cdb..80bce67cc757 100644 --- a/orm/model/ormtable/timestamp_test.go +++ b/orm/model/ormtable/timestamp_test.go @@ -5,7 +5,6 @@ import ( "time" "google.golang.org/protobuf/types/known/timestamppb" - "gotest.tools/v3/assert" "cosmossdk.io/orm/internal/testkv" diff --git a/orm/orm.go b/orm/orm.go index d533b2b4623d..c970f2d21af0 100644 --- a/orm/orm.go +++ b/orm/orm.go @@ -3,17 +3,16 @@ package orm import ( "fmt" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protodesc" + "google.golang.org/protobuf/reflect/protoregistry" + appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" modulev1alpha1 "cosmossdk.io/api/cosmos/orm/module/v1alpha1" ormv1alpha1 "cosmossdk.io/api/cosmos/orm/v1alpha1" "cosmossdk.io/core/appmodule" "cosmossdk.io/core/store" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protodesc" - "google.golang.org/protobuf/reflect/protoregistry" - "cosmossdk.io/depinject" - "cosmossdk.io/orm/model/ormdb" "cosmossdk.io/orm/model/ormtable" ) diff --git a/orm/types/ormerrors/errors.go b/orm/types/ormerrors/errors.go index 2f40da7e7eb3..aae16960fa33 100644 --- a/orm/types/ormerrors/errors.go +++ b/orm/types/ormerrors/errors.go @@ -1,8 +1,9 @@ package ormerrors import ( - "cosmossdk.io/errors" "google.golang.org/grpc/codes" + + "cosmossdk.io/errors" ) var codespace = "orm" diff --git a/proto/README.md b/proto/README.md index a54d5adf7a79..ea225558a9be 100644 --- a/proto/README.md +++ b/proto/README.md @@ -15,6 +15,7 @@ https://docs.buf.build/bsr/documentation. | Prior v0.46.0 | [Unavailable](https://github.com/bufbuild/buf/issues/1415) | | v0.46.x | [8cb30a2c4de74dc9bd8d260b1e75e176](https://buf.build/cosmos/cosmos-sdk/docs/8cb30a2c4de74dc9bd8d260b1e75e176) | | v0.47.x | [v0.47.0](https://buf.build/cosmos/cosmos-sdk/docs/v0.47.0) | +| v0.50.x | [v0.50.0](https://buf.build/cosmos/cosmos-sdk/docs/v0.50.0) | | Next | [latest on buf](https://buf.build/cosmos/cosmos-sdk/commits/main) | ## Generate diff --git a/proto/cosmos/auth/v1beta1/auth.proto b/proto/cosmos/auth/v1beta1/auth.proto index bcac98314597..ebc18b69f052 100644 --- a/proto/cosmos/auth/v1beta1/auth.proto +++ b/proto/cosmos/auth/v1beta1/auth.proto @@ -18,15 +18,12 @@ message BaseAccount { option (cosmos_proto.implements_interface) = "cosmos.auth.v1beta1.AccountI"; - string address = 1 [ - (cosmos_proto.scalar) = "cosmos.AddressString"]; + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - google.protobuf.Any pub_key = 2 [ - (gogoproto.jsontag) = "public_key,omitempty", - (amino.field_name) = "public_key"]; + google.protobuf.Any pub_key = 2 [(gogoproto.jsontag) = "public_key,omitempty", (amino.field_name) = "public_key"]; - uint64 account_number = 3; - uint64 sequence = 4; + uint64 account_number = 3; + uint64 sequence = 4; } // ModuleAccount defines an account for modules that holds coins on a pool. diff --git a/proto/cosmos/authz/v1beta1/query.proto b/proto/cosmos/authz/v1beta1/query.proto index 62154ac19a43..fcd56815a64b 100644 --- a/proto/cosmos/authz/v1beta1/query.proto +++ b/proto/cosmos/authz/v1beta1/query.proto @@ -65,7 +65,7 @@ message QueryGranterGrantsResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } -// QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. +// QueryGranteeGrantsRequest is the request type for the Query/GranteeGrants RPC method. message QueryGranteeGrantsRequest { string grantee = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; diff --git a/proto/cosmos/authz/v1beta1/tx.proto b/proto/cosmos/authz/v1beta1/tx.proto index 69277c95ee28..a1abff0d6f00 100644 --- a/proto/cosmos/authz/v1beta1/tx.proto +++ b/proto/cosmos/authz/v1beta1/tx.proto @@ -44,10 +44,8 @@ message MsgGrant { cosmos.authz.v1beta1.Grant grant = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; } -// MsgExecResponse defines the Msg/MsgExecResponse response type. -message MsgExecResponse { - repeated bytes results = 1; -} +// MsgGrantResponse defines the Msg/MsgGrant response type. +message MsgGrantResponse {} // MsgExec attempts to execute the provided messages using // authorizations granted to the grantee. Each message should have only @@ -63,8 +61,10 @@ message MsgExec { repeated google.protobuf.Any msgs = 2 [(cosmos_proto.accepts_interface) = "cosmos.base.v1beta1.Msg"]; } -// MsgGrantResponse defines the Msg/MsgGrant response type. -message MsgGrantResponse {} +// MsgExecResponse defines the Msg/MsgExecResponse response type. +message MsgExecResponse { + repeated bytes results = 1; +} // MsgRevoke revokes any authorization with the provided sdk.Msg type on the // granter's account with that has been granted to the grantee. diff --git a/proto/cosmos/bank/module/v1/module.proto b/proto/cosmos/bank/module/v1/module.proto index 51e3158b6860..d7d4a7fafdf7 100644 --- a/proto/cosmos/bank/module/v1/module.proto +++ b/proto/cosmos/bank/module/v1/module.proto @@ -10,11 +10,17 @@ message Module { go_import: "github.com/cosmos/cosmos-sdk/x/bank" }; - // blocked_module_accounts configures exceptional module accounts which should be blocked from receiving funds. - // If left empty it defaults to the list of account names supplied in the auth module configuration as + // blocked_module_accounts_override configures exceptional module accounts which should be blocked from receiving + // funds. If left empty it defaults to the list of account names supplied in the auth module configuration as // module_account_permissions repeated string blocked_module_accounts_override = 1; // authority defines the custom module authority. If not set, defaults to the governance module. string authority = 2; -} \ No newline at end of file + + // restrictions_order specifies the order of send restrictions and should be + // a list of module names which provide a send restriction instance. If no + // order is provided, then restrictions will be applied in alphabetical order + // of module names. + repeated string restrictions_order = 3; +} diff --git a/proto/cosmos/bank/v1beta1/query.proto b/proto/cosmos/bank/v1beta1/query.proto index 9aed76477799..5b21a30bed67 100644 --- a/proto/cosmos/bank/v1beta1/query.proto +++ b/proto/cosmos/bank/v1beta1/query.proto @@ -77,12 +77,18 @@ service Query { option (google.api.http).get = "/cosmos/bank/v1beta1/params"; } - // DenomsMetadata queries the client metadata of a given coin denomination. + // DenomMetadata queries the client metadata of a given coin denomination. rpc DenomMetadata(QueryDenomMetadataRequest) returns (QueryDenomMetadataResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata/{denom}"; } + // DenomMetadataByQueryString queries the client metadata of a given coin denomination. + rpc DenomMetadataByQueryString(QueryDenomMetadataByQueryStringRequest) + returns (QueryDenomMetadataByQueryStringResponse) { + option (cosmos.query.v1.module_query_safe) = true; + option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata_by_query_string"; + } // DenomsMetadata queries the client metadata for all registered coin // denominations. rpc DenomsMetadata(QueryDenomsMetadataRequest) returns (QueryDenomsMetadataResponse) { @@ -102,6 +108,15 @@ service Query { option (google.api.http).get = "/cosmos/bank/v1beta1/denom_owners/{denom}"; } + // DenomOwnersByQuery queries for all account addresses that own a particular token + // denomination. + // + // Since: cosmos-sdk 0.50.3 + rpc DenomOwnersByQuery(QueryDenomOwnersByQueryRequest) returns (QueryDenomOwnersByQueryResponse) { + option (cosmos.query.v1.module_query_safe) = true; + option (google.api.http).get = "/cosmos/bank/v1beta1/denom_owners_by_query"; + } + // SendEnabled queries for SendEnabled entries. // // This query only returns denominations that have specific SendEnabled settings. @@ -267,6 +282,7 @@ message QueryParamsRequest {} // QueryParamsResponse defines the response type for querying x/bank parameters. message QueryParamsResponse { + // params provides the parameters of the bank module. Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; } @@ -299,6 +315,20 @@ message QueryDenomMetadataResponse { Metadata metadata = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; } +// QueryDenomMetadataByQueryStringRequest is the request type for the Query/DenomMetadata RPC method. +// Identical with QueryDenomMetadataRequest but receives denom as query string. +message QueryDenomMetadataByQueryStringRequest { + // denom is the coin denom to query the metadata for. + string denom = 1; +} + +// QueryDenomMetadataByQueryStringResponse is the response type for the Query/DenomMetadata RPC +// method. Identical with QueryDenomMetadataResponse but receives denom as query string in request. +message QueryDenomMetadataByQueryStringResponse { + // metadata describes and provides all the client information for the requested token. + Metadata metadata = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + // QueryDenomOwnersRequest defines the request type for the DenomOwners RPC query, // which queries for a paginated set of all account holders of a particular // denomination. @@ -333,6 +363,29 @@ message QueryDenomOwnersResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } +// QueryDenomOwnersByQueryRequest defines the request type for the DenomOwnersByQuery RPC query, +// which queries for a paginated set of all account holders of a particular +// denomination. +// +// Since: cosmos-sdk 0.50.3 +message QueryDenomOwnersByQueryRequest { + // denom defines the coin denomination to query all account holders for. + string denom = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryDenomOwnersByQueryResponse defines the RPC response of a DenomOwnersByQuery RPC query. +// +// Since: cosmos-sdk 0.50.3 +message QueryDenomOwnersByQueryResponse { + repeated DenomOwner denom_owners = 1; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + // QuerySendEnabledRequest defines the RPC request for looking up SendEnabled entries. // // Since: cosmos-sdk 0.47 diff --git a/proto/cosmos/bank/v1beta1/tx.proto b/proto/cosmos/bank/v1beta1/tx.proto index c780be37866f..a4e8fae41f84 100644 --- a/proto/cosmos/bank/v1beta1/tx.proto +++ b/proto/cosmos/bank/v1beta1/tx.proto @@ -105,6 +105,7 @@ message MsgSetSendEnabled { option (cosmos.msg.v1.signer) = "authority"; option (amino.name) = "cosmos-sdk/MsgSetSendEnabled"; + // authority is the address that controls the module. string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // send_enabled is the list of entries to add or update. diff --git a/proto/cosmos/base/abci/v1beta1/abci.proto b/proto/cosmos/base/abci/v1beta1/abci.proto index fc3c0c6da503..9e3b4e55dbc7 100644 --- a/proto/cosmos/base/abci/v1beta1/abci.proto +++ b/proto/cosmos/base/abci/v1beta1/abci.proto @@ -27,10 +27,7 @@ message TxResponse { // non-deterministic. string raw_log = 6; // The output of the application's logger (typed). May be non-deterministic. - repeated ABCIMessageLog logs = 7 [ - (gogoproto.castrepeated) = "ABCIMessageLogs", - (gogoproto.nullable) = false - ]; + repeated ABCIMessageLog logs = 7 [(gogoproto.castrepeated) = "ABCIMessageLogs", (gogoproto.nullable) = false]; // Additional information. May be non-deterministic. string info = 8; // Amount of gas requested for transaction. @@ -61,8 +58,7 @@ message ABCIMessageLog { // Events contains a slice of Event objects that were emitted during some // execution. - repeated StringEvent events = 3 - [(gogoproto.castrepeated) = "StringEvents", (gogoproto.nullable) = false]; + repeated StringEvent events = 3 [(gogoproto.castrepeated) = "StringEvents", (gogoproto.nullable) = false]; } // StringEvent defines en Event object wrapper where all the attributes diff --git a/proto/cosmos/base/node/v1beta1/query.proto b/proto/cosmos/base/node/v1beta1/query.proto index 78fd9f6703a3..95df568f1175 100644 --- a/proto/cosmos/base/node/v1beta1/query.proto +++ b/proto/cosmos/base/node/v1beta1/query.proto @@ -24,10 +24,10 @@ message ConfigRequest {} // ConfigResponse defines the response structure for the Config gRPC query. message ConfigResponse { - string minimum_gas_price = 1; - // pruning settings + string minimum_gas_price = 1; string pruning_keep_recent = 2; string pruning_interval = 3; + uint64 halt_height = 4; } // StateRequest defines the request structure for the status of a node. @@ -35,9 +35,9 @@ message StatusRequest {} // StateResponse defines the response structure for the status of a node. message StatusResponse { - uint64 earliest_store_height = 1; // earliest block height available in the store - uint64 height = 2; // current block height - google.protobuf.Timestamp timestamp = 3 [(gogoproto.stdtime) = true]; // block height timestamp - bytes app_hash = 4; // app hash of the current block - bytes validator_hash = 5; // validator hash provided by the consensus header + uint64 earliest_store_height = 1; // earliest block height available in the store + uint64 height = 2; // current block height + google.protobuf.Timestamp timestamp = 3 [(gogoproto.stdtime) = true]; // block height timestamp + bytes app_hash = 4; // app hash of the current block + bytes validator_hash = 5; // validator hash provided by the consensus header } diff --git a/proto/cosmos/base/v1beta1/coin.proto b/proto/cosmos/base/v1beta1/coin.proto index 69c96f6771b6..1447d642d51f 100644 --- a/proto/cosmos/base/v1beta1/coin.proto +++ b/proto/cosmos/base/v1beta1/coin.proto @@ -19,7 +19,7 @@ message Coin { string denom = 1; string amount = 2 [ (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; @@ -33,16 +33,29 @@ message DecCoin { option (gogoproto.equal) = true; string denom = 1; - string amount = 2 - [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; + string amount = 2 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false + ]; } // IntProto defines a Protobuf wrapper around an Int object. +// Deprecated: Prefer to use math.Int directly. It supports binary Marshal and Unmarshal. message IntProto { - string int = 1 [(cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; + string int = 1 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.nullable) = false + ]; } // DecProto defines a Protobuf wrapper around a Dec object. +// Deprecated: Prefer to use math.LegacyDec directly. It supports binary Marshal and Unmarshal. message DecProto { - string dec = 1 [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; + string dec = 1 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false + ]; } diff --git a/proto/cosmos/circuit/v1/query.proto b/proto/cosmos/circuit/v1/query.proto index 1b952020d1f1..0115d335f439 100644 --- a/proto/cosmos/circuit/v1/query.proto +++ b/proto/cosmos/circuit/v1/query.proto @@ -8,7 +8,7 @@ import "cosmos/circuit/v1/types.proto"; import "google/api/annotations.proto"; import "cosmos/query/v1/query.proto"; -// Query defines the circuit Msg service. +// Query defines the circuit gRPC querier service. service Query { // Account returns account permissions. rpc Account(QueryAccountRequest) returns (AccountResponse) { diff --git a/proto/cosmos/circuit/v1/tx.proto b/proto/cosmos/circuit/v1/tx.proto index c0684316d04a..71f708bb2ad9 100644 --- a/proto/cosmos/circuit/v1/tx.proto +++ b/proto/cosmos/circuit/v1/tx.proto @@ -39,7 +39,7 @@ message MsgAuthorizeCircuitBreaker { Permissions permissions = 3; } -// MsgAuthorizeCircuitBreaker defines the Msg/AuthorizeCircuitBreaker response type. +// MsgAuthorizeCircuitBreakerResponse defines the Msg/AuthorizeCircuitBreaker response type. message MsgAuthorizeCircuitBreakerResponse { bool success = 1; } @@ -59,7 +59,7 @@ message MsgTripCircuitBreaker { repeated string msg_type_urls = 2; } -// MsgTripCircuitBreaker defines the Msg/TripCircuitBreaker response type. +// MsgTripCircuitBreakerResponse defines the Msg/TripCircuitBreaker response type. message MsgTripCircuitBreakerResponse { bool success = 1; } diff --git a/proto/cosmos/consensus/v1/query.proto b/proto/cosmos/consensus/v1/query.proto index cdcb07ba4100..84648d97c097 100644 --- a/proto/cosmos/consensus/v1/query.proto +++ b/proto/cosmos/consensus/v1/query.proto @@ -9,7 +9,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/consensus/types"; // Query defines the gRPC querier service. service Query { - // Params queries the parameters of x/consensus_param module. + // Params queries the parameters of x/consensus module. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/cosmos/consensus/v1/params"; } diff --git a/proto/cosmos/consensus/v1/tx.proto b/proto/cosmos/consensus/v1/tx.proto index 2f798528858d..4323de703a5e 100644 --- a/proto/cosmos/consensus/v1/tx.proto +++ b/proto/cosmos/consensus/v1/tx.proto @@ -9,11 +9,11 @@ import "tendermint/types/params.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/consensus/types"; -// Msg defines the bank Msg service. +// Msg defines the consensus Msg service. service Msg { option (cosmos.msg.v1.service) = true; - // UpdateParams defines a governance operation for updating the x/consensus_param module parameters. + // UpdateParams defines a governance operation for updating the x/consensus module parameters. // The authority is defined in the keeper. // // Since: cosmos-sdk 0.47 @@ -23,7 +23,7 @@ service Msg { // MsgUpdateParams is the Msg/UpdateParams request type. message MsgUpdateParams { option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "cosmos-sdk/x/consensus/MsgUpdateParams"; + option (amino.name) = "cosmos-sdk/x/consensus/MsgUpdateParams"; // authority is the address that controls the module (defaults to x/gov unless overwritten). string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; @@ -36,6 +36,9 @@ message MsgUpdateParams { tendermint.types.BlockParams block = 2; tendermint.types.EvidenceParams evidence = 3; tendermint.types.ValidatorParams validator = 4; + + // Since: cosmos-sdk 0.50 + tendermint.types.ABCIParams abci = 5; } // MsgUpdateParamsResponse defines the response structure for executing a diff --git a/proto/cosmos/distribution/v1beta1/distribution.proto b/proto/cosmos/distribution/v1beta1/distribution.proto index 34c6e774abd1..0c20286f9a09 100644 --- a/proto/cosmos/distribution/v1beta1/distribution.proto +++ b/proto/cosmos/distribution/v1beta1/distribution.proto @@ -15,7 +15,7 @@ message Params { string community_tax = 1 [ (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (amino.dont_omitempty) = true, (gogoproto.nullable) = false ]; @@ -24,7 +24,7 @@ message Params { // in the x/distribution module's reward mechanism. string base_proposer_reward = 2 [ (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false, (amino.dont_omitempty) = true, deprecated = true @@ -34,7 +34,7 @@ message Params { // in the x/distribution module's reward mechanism. string bonus_proposer_reward = 3 [ (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false, (amino.dont_omitempty) = true, deprecated = true @@ -104,7 +104,7 @@ message ValidatorSlashEvent { uint64 validator_period = 1; string fraction = 2 [ (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; } @@ -158,7 +158,7 @@ message DelegatorStartingInfo { uint64 previous_period = 1; string stake = 2 [ (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; diff --git a/proto/cosmos/distribution/v1beta1/tx.proto b/proto/cosmos/distribution/v1beta1/tx.proto index fc14c5e10c53..32318bd81219 100644 --- a/proto/cosmos/distribution/v1beta1/tx.proto +++ b/proto/cosmos/distribution/v1beta1/tx.proto @@ -192,14 +192,14 @@ message MsgCommunityPoolSpendResponse {} // // Since: cosmos-sdk 0.50 message MsgDepositValidatorRewardsPool { - option (amino.name) = "cosmos-sdk/distr/MsgDepositValRewards"; + option (amino.name) = "cosmos-sdk/distr/MsgDepositValRewards"; option (cosmos.msg.v1.signer) = "depositor"; option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - string depositor = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + string depositor = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; repeated cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false, (amino.encoding) = "legacy_coins", diff --git a/proto/cosmos/feegrant/v1beta1/query.proto b/proto/cosmos/feegrant/v1beta1/query.proto index cc0b969c55de..591537acd9ef 100644 --- a/proto/cosmos/feegrant/v1beta1/query.proto +++ b/proto/cosmos/feegrant/v1beta1/query.proto @@ -12,12 +12,12 @@ option go_package = "cosmossdk.io/x/feegrant"; // Query defines the gRPC querier service. service Query { - // Allowance returns fee granted to the grantee by the granter. + // Allowance returns granted allwance to the grantee by the granter. rpc Allowance(QueryAllowanceRequest) returns (QueryAllowanceResponse) { option (google.api.http).get = "/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}"; } - // Allowances returns all the grants for address. + // Allowances returns all the grants for the given grantee address. rpc Allowances(QueryAllowancesRequest) returns (QueryAllowancesResponse) { option (google.api.http).get = "/cosmos/feegrant/v1beta1/allowances/{grantee}"; } diff --git a/proto/cosmos/feegrant/v1beta1/tx.proto b/proto/cosmos/feegrant/v1beta1/tx.proto index 37e505c4e9a2..a45eec3ba368 100644 --- a/proto/cosmos/feegrant/v1beta1/tx.proto +++ b/proto/cosmos/feegrant/v1beta1/tx.proto @@ -20,6 +20,11 @@ service Msg { // RevokeAllowance revokes any fee allowance of granter's account that // has been granted to the grantee. rpc RevokeAllowance(MsgRevokeAllowance) returns (MsgRevokeAllowanceResponse); + + // PruneAllowances prunes expired fee allowances, currently up to 75 at a time. + // + // Since cosmos-sdk 0.50 + rpc PruneAllowances(MsgPruneAllowances) returns (MsgPruneAllowancesResponse); } // MsgGrantAllowance adds permission for Grantee to spend up to Allowance @@ -55,3 +60,18 @@ message MsgRevokeAllowance { // MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. message MsgRevokeAllowanceResponse {} + +// MsgPruneAllowances prunes expired fee allowances. +// +// Since cosmos-sdk 0.50 +message MsgPruneAllowances { + option (cosmos.msg.v1.signer) = "pruner"; + + // pruner is the address of the user pruning expired allowances. + string pruner = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// MsgPruneAllowancesResponse defines the Msg/PruneAllowancesResponse response type. +// +// Since cosmos-sdk 0.50 +message MsgPruneAllowancesResponse {} \ No newline at end of file diff --git a/proto/cosmos/gov/v1/gov.proto b/proto/cosmos/gov/v1/gov.proto index 9edd903b982c..0ebfbc1d1f0f 100644 --- a/proto/cosmos/gov/v1/gov.proto +++ b/proto/cosmos/gov/v1/gov.proto @@ -80,7 +80,8 @@ message Proposal { google.protobuf.Timestamp voting_end_time = 9 [(gogoproto.stdtime) = true]; // metadata is any arbitrary metadata attached to the proposal. - // the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#proposal-3 + // the recommended format of the metadata is to be found here: + // https://docs.cosmos.network/v0.47/modules/gov#proposal-3 string metadata = 10; // title is the title of the proposal @@ -102,6 +103,11 @@ message Proposal { // // Since: cosmos-sdk 0.50 bool expedited = 14; + + // failed_reason defines the reason why the proposal failed + // + // Since: cosmos-sdk 0.50 + string failed_reason = 15; } // ProposalStatus enumerates the valid statuses of a proposal. @@ -151,7 +157,7 @@ message Vote { // options is the weighted vote options. repeated WeightedVoteOption options = 4; - // metadata is any arbitrary metadata to attached to the vote. + // metadata is any arbitrary metadata attached to the vote. // the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#vote-5 string metadata = 5; } @@ -244,14 +250,22 @@ message Params { string expedited_threshold = 11 [(cosmos_proto.scalar) = "cosmos.Dec"]; // Minimum expedited deposit for a proposal to enter voting period. - repeated cosmos.base.v1beta1.Coin expedited_min_deposit = 12 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + repeated cosmos.base.v1beta1.Coin expedited_min_deposit = 12 + [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; // burn deposits if a proposal does not meet quorum bool burn_vote_quorum = 13; - + // burn deposits if the proposal does not enter voting period bool burn_proposal_deposit_prevote = 14; - + // burn deposits if quorum with vote type no_veto is met bool burn_vote_veto = 15; + + // The ratio representing the proportion of the deposit value minimum that must be met when making a deposit. + // Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be + // required. + // + // Since: cosmos-sdk 0.50 + string min_deposit_ratio = 16 [(cosmos_proto.scalar) = "cosmos.Dec"]; } diff --git a/proto/cosmos/gov/v1/query.proto b/proto/cosmos/gov/v1/query.proto index ce308c7db24c..006d12fd6148 100644 --- a/proto/cosmos/gov/v1/query.proto +++ b/proto/cosmos/gov/v1/query.proto @@ -1,4 +1,3 @@ - // Since: cosmos-sdk 0.46 syntax = "proto3"; package cosmos.gov.v1; @@ -42,7 +41,7 @@ service Query { option (google.api.http).get = "/cosmos/gov/v1/params/{params_type}"; } - // Deposit queries single deposit information based proposalID, depositAddr. + // Deposit queries single deposit information based on proposalID, depositAddr. rpc Deposit(QueryDepositRequest) returns (QueryDepositResponse) { option (google.api.http).get = "/cosmos/gov/v1/proposals/{proposal_id}/deposits/{depositor}"; } diff --git a/proto/cosmos/gov/v1/tx.proto b/proto/cosmos/gov/v1/tx.proto index 57a062602b6d..21920a5ffcf0 100644 --- a/proto/cosmos/gov/v1/tx.proto +++ b/proto/cosmos/gov/v1/tx.proto @@ -56,10 +56,10 @@ message MsgSubmitProposal { // initial_deposit is the deposit value that must be paid at proposal submission. repeated cosmos.base.v1beta1.Coin initial_deposit = 2 [ - (gogoproto.nullable) = false, + (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins" + (amino.dont_omitempty) = true, + (amino.encoding) = "legacy_coins" ]; // proposer is the account address of the proposer. @@ -78,7 +78,7 @@ message MsgSubmitProposal { // Since: cosmos-sdk 0.47 string summary = 6; - // expedided defines if the proposal is expedited or not + // expedited defines if the proposal is expedited or not // // Since: cosmos-sdk 0.50 bool expedited = 7; @@ -193,8 +193,10 @@ message MsgUpdateParamsResponse {} message MsgCancelProposal { option (cosmos.msg.v1.signer) = "proposer"; + // proposal_id defines the unique id of the proposal. uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id"]; - string proposer = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // proposer is the account address of the proposer. + string proposer = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgCancelProposalResponse defines the response structure for executing a @@ -202,6 +204,7 @@ message MsgCancelProposal { // // Since: cosmos-sdk 0.50 message MsgCancelProposalResponse { + // proposal_id defines the unique id of the proposal. uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id"]; // canceled_time is the time when proposal is canceled. google.protobuf.Timestamp canceled_time = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; diff --git a/proto/cosmos/gov/v1beta1/genesis.proto b/proto/cosmos/gov/v1beta1/genesis.proto index a680590ca565..f0c679a31870 100644 --- a/proto/cosmos/gov/v1beta1/genesis.proto +++ b/proto/cosmos/gov/v1beta1/genesis.proto @@ -21,10 +21,10 @@ message GenesisState { // proposals defines all the proposals present at genesis. repeated Proposal proposals = 4 [(gogoproto.castrepeated) = "Proposals", (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - // params defines all the parameters of related to deposit. + // deposit_params defines all the parameters related to deposit. DepositParams deposit_params = 5 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - // params defines all the parameters of related to voting. + // voting_params defines all the parameters related to voting. VotingParams voting_params = 6 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - // params defines all the parameters of related to tally. + // tally_params defines all the parameters related to tally. TallyParams tally_params = 7 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; } diff --git a/proto/cosmos/gov/v1beta1/gov.proto b/proto/cosmos/gov/v1beta1/gov.proto index 37b4e8b2ce3e..99b97191c164 100644 --- a/proto/cosmos/gov/v1beta1/gov.proto +++ b/proto/cosmos/gov/v1beta1/gov.proto @@ -39,7 +39,7 @@ message WeightedVoteOption { // weight is the vote weight associated with the vote option. string weight = 2 [ (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (amino.dont_omitempty) = true, (gogoproto.nullable) = false ]; @@ -152,28 +152,28 @@ message TallyResult { // yes is the number of yes votes on a proposal. string yes = 1 [ (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false ]; // abstain is the number of abstain votes on a proposal. string abstain = 2 [ (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false ]; // no is the number of no votes on a proposal. string no = 3 [ (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false ]; // no_with_veto is the number of no with veto votes on a proposal. string no_with_veto = 4 [ (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false ]; } @@ -229,14 +229,16 @@ message TallyParams { // Minimum percentage of total stake needed to vote for a result to be // considered valid. bytes quorum = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false, (gogoproto.jsontag) = "quorum,omitempty" ]; // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. bytes threshold = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false, (gogoproto.jsontag) = "threshold,omitempty" ]; @@ -244,7 +246,8 @@ message TallyParams { // Minimum value of Veto votes to Total votes ratio for proposal to be // vetoed. Default value: 1/3. bytes veto_threshold = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false, (gogoproto.jsontag) = "veto_threshold,omitempty" ]; diff --git a/proto/cosmos/gov/v1beta1/query.proto b/proto/cosmos/gov/v1beta1/query.proto index f225a0f65059..28352ed40c06 100644 --- a/proto/cosmos/gov/v1beta1/query.proto +++ b/proto/cosmos/gov/v1beta1/query.proto @@ -37,7 +37,7 @@ service Query { option (google.api.http).get = "/cosmos/gov/v1beta1/params/{params_type}"; } - // Deposit queries single deposit information based proposalID, depositAddr. + // Deposit queries single deposit information based on proposalID, depositor address. rpc Deposit(QueryDepositRequest) returns (QueryDepositResponse) { option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}"; } diff --git a/proto/cosmos/gov/v1beta1/tx.proto b/proto/cosmos/gov/v1beta1/tx.proto index 24795ab3b405..9de763be360b 100644 --- a/proto/cosmos/gov/v1beta1/tx.proto +++ b/proto/cosmos/gov/v1beta1/tx.proto @@ -11,7 +11,7 @@ import "amino/amino.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"; -// Msg defines the bank Msg service. +// Msg defines the gov Msg service. service Msg { option (cosmos.msg.v1.service) = true; diff --git a/proto/cosmos/mint/v1beta1/mint.proto b/proto/cosmos/mint/v1beta1/mint.proto index 28840255fbf2..440a392dbd87 100644 --- a/proto/cosmos/mint/v1beta1/mint.proto +++ b/proto/cosmos/mint/v1beta1/mint.proto @@ -12,13 +12,13 @@ message Minter { // current annual inflation rate string inflation = 1 [ (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // current annual expected provisions string annual_provisions = 2 [ (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; } @@ -32,28 +32,28 @@ message Params { // maximum annual change in inflation rate string inflation_rate_change = 2 [ (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; // maximum inflation rate string inflation_max = 3 [ (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; // minimum inflation rate string inflation_min = 4 [ (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; // goal of percent bonded atoms string goal_bonded = 5 [ (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; diff --git a/proto/cosmos/mint/v1beta1/query.proto b/proto/cosmos/mint/v1beta1/query.proto index 002f2744c2cb..db5c90fb31c4 100644 --- a/proto/cosmos/mint/v1beta1/query.proto +++ b/proto/cosmos/mint/v1beta1/query.proto @@ -5,6 +5,7 @@ import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cosmos/mint/v1beta1/mint.proto"; import "amino/amino.proto"; +import "cosmos_proto/cosmos.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types"; @@ -43,7 +44,8 @@ message QueryInflationRequest {} message QueryInflationResponse { // inflation is the current minting inflation value. bytes inflation = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; @@ -58,7 +60,8 @@ message QueryAnnualProvisionsRequest {} message QueryAnnualProvisionsResponse { // annual_provisions is the current minting annual provisions value. bytes annual_provisions = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; diff --git a/proto/cosmos/slashing/v1beta1/query.proto b/proto/cosmos/slashing/v1beta1/query.proto index 761e1a4b86c7..e7279709edeb 100644 --- a/proto/cosmos/slashing/v1beta1/query.proto +++ b/proto/cosmos/slashing/v1beta1/query.proto @@ -40,7 +40,7 @@ message QueryParamsResponse { // method message QuerySigningInfoRequest { // cons_address is the address to query signing info of - string cons_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string cons_address = 1 [(cosmos_proto.scalar) = "cosmos.ConsensusAddressString"]; } // QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC diff --git a/proto/cosmos/slashing/v1beta1/slashing.proto b/proto/cosmos/slashing/v1beta1/slashing.proto index 11c3d784cf19..2347f34973cc 100644 --- a/proto/cosmos/slashing/v1beta1/slashing.proto +++ b/proto/cosmos/slashing/v1beta1/slashing.proto @@ -23,11 +23,8 @@ message ValidatorSigningInfo { // signed_blocks_window param determines the index in the missed block bitmap. int64 index_offset = 3; // Timestamp until which the validator is jailed due to liveness downtime. - google.protobuf.Timestamp jailed_until = 4 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; + google.protobuf.Timestamp jailed_until = 4 + [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; // Whether or not a validator has been tombstoned (killed out of validator // set). It is set once the validator commits an equivocation or for any other // configured misbehavior. @@ -43,26 +40,23 @@ message Params { int64 signed_blocks_window = 1; bytes min_signed_per_window = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false, - (amino.encoding) = "cosmos_dec_bytes", (amino.dont_omitempty) = true ]; - google.protobuf.Duration downtime_jail_duration = 3 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (gogoproto.stdduration) = true - ]; + google.protobuf.Duration downtime_jail_duration = 3 + [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdduration) = true]; bytes slash_fraction_double_sign = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false, - (amino.encoding) = "cosmos_dec_bytes", (amino.dont_omitempty) = true ]; bytes slash_fraction_downtime = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false, - (amino.encoding) = "cosmos_dec_bytes", (amino.dont_omitempty) = true ]; } diff --git a/proto/cosmos/staking/module/v1/module.proto b/proto/cosmos/staking/module/v1/module.proto index 7ef4a06cf075..fd92a54805d6 100644 --- a/proto/cosmos/staking/module/v1/module.proto +++ b/proto/cosmos/staking/module/v1/module.proto @@ -17,4 +17,10 @@ message Module { // authority defines the custom module authority. If not set, defaults to the governance module. string authority = 2; + + // bech32_prefix_validator is the bech32 validator prefix for the app. + string bech32_prefix_validator = 3; + + // bech32_prefix_consensus is the bech32 consensus node prefix for the app. + string bech32_prefix_consensus = 4; } diff --git a/proto/cosmos/staking/v1beta1/genesis.proto b/proto/cosmos/staking/v1beta1/genesis.proto index 8b278ff91af7..c3f1ce5dee91 100644 --- a/proto/cosmos/staking/v1beta1/genesis.proto +++ b/proto/cosmos/staking/v1beta1/genesis.proto @@ -16,7 +16,8 @@ message GenesisState { // last_total_power tracks the total amounts of bonded tokens recorded during // the previous end block. bytes last_total_power = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; @@ -37,6 +38,7 @@ message GenesisState { // redelegations defines the redelegations active at genesis. repeated Redelegation redelegations = 7 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + // exported defines a bool to identify whether the chain dealing with exported or initialized genesis. bool exported = 8; } diff --git a/proto/cosmos/staking/v1beta1/query.proto b/proto/cosmos/staking/v1beta1/query.proto index 06eb5551c98a..9b9812235274 100644 --- a/proto/cosmos/staking/v1beta1/query.proto +++ b/proto/cosmos/staking/v1beta1/query.proto @@ -151,7 +151,7 @@ message QueryValidatorsResponse { // QueryValidatorRequest is response type for the Query/Validator RPC method message QueryValidatorRequest { // validator_addr defines the validator address to query for. - string validator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_addr = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; } // QueryValidatorResponse is response type for the Query/Validator RPC method @@ -164,7 +164,7 @@ message QueryValidatorResponse { // Query/ValidatorDelegations RPC method message QueryValidatorDelegationsRequest { // validator_addr defines the validator address to query for. - string validator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_addr = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; @@ -184,7 +184,7 @@ message QueryValidatorDelegationsResponse { // Query/ValidatorUnbondingDelegations RPC method message QueryValidatorUnbondingDelegationsRequest { // validator_addr defines the validator address to query for. - string validator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_addr = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; @@ -208,7 +208,7 @@ message QueryDelegationRequest { string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // validator_addr defines the validator address to query for. - string validator_addr = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_addr = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; } // QueryDelegationResponse is response type for the Query/Delegation RPC method. @@ -227,7 +227,7 @@ message QueryUnbondingDelegationRequest { string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // validator_addr defines the validator address to query for. - string validator_addr = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_addr = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; } // QueryDelegationResponse is response type for the Query/UnbondingDelegation @@ -292,10 +292,10 @@ message QueryRedelegationsRequest { string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // src_validator_addr defines the validator address to redelegate from. - string src_validator_addr = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string src_validator_addr = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; // dst_validator_addr defines the validator address to redelegate to. - string dst_validator_addr = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string dst_validator_addr = 3 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 4; @@ -344,7 +344,7 @@ message QueryDelegatorValidatorRequest { string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // validator_addr defines the validator address to query for. - string validator_addr = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_addr = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; } // QueryDelegatorValidatorResponse response type for the diff --git a/proto/cosmos/staking/v1beta1/staking.proto b/proto/cosmos/staking/v1beta1/staking.proto index 231a200c89dd..24ec65d10202 100644 --- a/proto/cosmos/staking/v1beta1/staking.proto +++ b/proto/cosmos/staking/v1beta1/staking.proto @@ -31,21 +31,21 @@ message CommissionRates { // rate is the commission rate charged to delegators, as a fraction. string rate = 1 [ (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; // max_rate defines the maximum commission rate which validator can ever charge, as a fraction. string max_rate = 2 [ (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; // max_change_rate defines the maximum daily increase of the validator commission, as a fraction. string max_change_rate = 3 [ (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; @@ -102,13 +102,13 @@ message Validator { // tokens define the delegated tokens (incl. self-delegation). string tokens = 5 [ (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false ]; // delegator_shares defines total shares issued to a validator's delegators. string delegator_shares = 6 [ (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // description defines the description terms for the validator. @@ -125,7 +125,7 @@ message Validator { // Since: cosmos-sdk 0.46 string min_self_delegation = 11 [ (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false ]; @@ -163,7 +163,7 @@ message DVPair { option (gogoproto.goproto_getters) = false; string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; } // DVPairs defines an array of DVPair objects. @@ -180,8 +180,8 @@ message DVVTriplet { option (gogoproto.goproto_getters) = false; string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string validator_src_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string validator_dst_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_src_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + string validator_dst_address = 3 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; } // DVVTriplets defines an array of DVVTriplet objects. @@ -196,14 +196,14 @@ message Delegation { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - // delegator_address is the bech32-encoded address of the delegator. + // delegator_address is the encoded address of the delegator. string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // validator_address is the bech32-encoded address of the validator. - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // validator_address is the encoded address of the validator. + string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; // shares define the delegation shares received. string shares = 3 [ (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; } @@ -214,10 +214,10 @@ message UnbondingDelegation { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - // delegator_address is the bech32-encoded address of the delegator. + // delegator_address is the encoded address of the delegator. string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // validator_address is the bech32-encoded address of the validator. - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // validator_address is the encoded address of the validator. + string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; // entries are the unbonding delegation entries. repeated UnbondingDelegationEntry entries = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; // unbonding delegation entries @@ -235,13 +235,13 @@ message UnbondingDelegationEntry { // initial_balance defines the tokens initially scheduled to receive at completion. string initial_balance = 3 [ (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false ]; // balance defines the tokens to receive at completion. string balance = 4 [ (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false ]; // Incrementing id that uniquely identifies this entry @@ -263,13 +263,13 @@ message RedelegationEntry { // initial_balance defines the initial balance when redelegation started. string initial_balance = 3 [ (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false ]; // shares_dst is the amount of destination-validator shares created by redelegation. string shares_dst = 4 [ (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // Incrementing id that uniquely identifies this entry @@ -288,9 +288,9 @@ message Redelegation { // delegator_address is the bech32-encoded address of the delegator. string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // validator_src_address is the validator redelegation source operator address. - string validator_src_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_src_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; // validator_dst_address is the validator redelegation destination operator address. - string validator_dst_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_dst_address = 3 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; // entries are the redelegation entries. repeated RedelegationEntry entries = 4 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; // redelegation entries @@ -315,7 +315,7 @@ message Params { // min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators string min_commission_rate = 6 [ (gogoproto.moretags) = "yaml:\"min_commission_rate\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false, (amino.dont_omitempty) = true, (cosmos_proto.scalar) = "cosmos.Dec" @@ -341,7 +341,7 @@ message RedelegationEntryResponse { RedelegationEntry redelegation_entry = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; string balance = 4 [ (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false ]; } @@ -363,14 +363,14 @@ message Pool { option (gogoproto.equal) = true; string not_bonded_tokens = 1 [ (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false, (gogoproto.jsontag) = "not_bonded_tokens", (amino.dont_omitempty) = true ]; string bonded_tokens = 2 [ (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false, (gogoproto.jsontag) = "bonded_tokens", (amino.dont_omitempty) = true diff --git a/proto/cosmos/staking/v1beta1/tx.proto b/proto/cosmos/staking/v1beta1/tx.proto index a05a84145173..238645ba9232 100644 --- a/proto/cosmos/staking/v1beta1/tx.proto +++ b/proto/cosmos/staking/v1beta1/tx.proto @@ -59,7 +59,7 @@ message MsgCreateValidator { CommissionRates commission = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; string min_self_delegation = 3 [ (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; @@ -91,9 +91,9 @@ message MsgEditValidator { // zero with no way to distinguish if an update was intended. // REF: #2373 string commission_rate = 3 - [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec"]; + [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec"]; string min_self_delegation = 4 - [(cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; + [(cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "cosmossdk.io/math.Int"]; } // MsgEditValidatorResponse defines the Msg/EditValidator response type. @@ -159,7 +159,7 @@ message MsgUndelegateResponse { // amount returns the amount of undelegated coins // // Since: cosmos-sdk 0.50 - cosmos.base.v1beta1.Coin amount = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + cosmos.base.v1beta1.Coin amount = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; } // MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator diff --git a/proto/cosmos/store/v1beta1/commit_info.proto b/proto/cosmos/store/v1beta1/commit_info.proto index a931e3e7d762..37459a0d05a1 100644 --- a/proto/cosmos/store/v1beta1/commit_info.proto +++ b/proto/cosmos/store/v1beta1/commit_info.proto @@ -11,8 +11,7 @@ option go_package = "cosmossdk.io/store/types"; message CommitInfo { int64 version = 1; repeated StoreInfo store_infos = 2 [(gogoproto.nullable) = false]; - google.protobuf.Timestamp timestamp = 3 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } // StoreInfo defines store-specific commit information. It contains a reference diff --git a/proto/cosmos/store/v1beta1/listening.proto b/proto/cosmos/store/v1beta1/listening.proto index 24131a47df53..14bc2e7a78fd 100644 --- a/proto/cosmos/store/v1beta1/listening.proto +++ b/proto/cosmos/store/v1beta1/listening.proto @@ -11,8 +11,8 @@ option go_package = "cosmossdk.io/store/types"; // // Since: cosmos-sdk 0.43 message StoreKVPair { - string store_key = 1; // the store key for the KVStore this pair originates from - bool delete = 2; // true indicates a delete operation, false indicates a set operation + string store_key = 1; // the store key for the KVStore this pair originates from + bool delete = 2; // true indicates a delete operation, false indicates a set operation bytes key = 3; bytes value = 4; } @@ -22,7 +22,7 @@ message StoreKVPair { message BlockMetadata { tendermint.abci.ResponseCommit response_commit = 6; tendermint.abci.RequestFinalizeBlock request_finalize_block = 7; - tendermint.abci.ResponseFinalizeBlock response_finalize_block = 8; // TODO: should we renumber this? + tendermint.abci.ResponseFinalizeBlock response_finalize_block = 8; // TODO: should we renumber this? - reserved 1, 2, 3, 4, 5; // reserved for from previous use in comet <= 0.37 + reserved 1, 2, 3, 4, 5; // reserved for from previous use in comet <= 0.37 } diff --git a/proto/cosmos/tx/signing/v1beta1/signing.proto b/proto/cosmos/tx/signing/v1beta1/signing.proto index faad739b5aab..584eff4e41fd 100644 --- a/proto/cosmos/tx/signing/v1beta1/signing.proto +++ b/proto/cosmos/tx/signing/v1beta1/signing.proto @@ -25,15 +25,14 @@ enum SignMode { // SIGN_MODE_TEXTUAL is a future signing mode that will verify some // human-readable textual representation on top of the binary representation - // from SIGN_MODE_DIRECT. It is currently experimental, and should be used - // for testing purposes only, until Textual is fully released. Please follow - // the tracking issue https://github.com/cosmos/cosmos-sdk/issues/11970. + // from SIGN_MODE_DIRECT. + // + // Since: cosmos-sdk 0.50 SIGN_MODE_TEXTUAL = 2; // SIGN_MODE_DIRECT_AUX specifies a signing mode which uses // SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not - // require signers signing over other signers' `signer_info`. It also allows - // for adding Tips in transactions. + // require signers signing over other signers' `signer_info`. // // Since: cosmos-sdk 0.46 SIGN_MODE_DIRECT_AUX = 3; diff --git a/proto/cosmos/tx/v1beta1/service.proto b/proto/cosmos/tx/v1beta1/service.proto index 5cd848e09afc..7e19a1865259 100644 --- a/proto/cosmos/tx/v1beta1/service.proto +++ b/proto/cosmos/tx/v1beta1/service.proto @@ -37,8 +37,7 @@ service Service { // GetBlockWithTxs fetches a block with decoded txs. // // Since: cosmos-sdk 0.45.2 - rpc GetBlockWithTxs(GetBlockWithTxsRequest) - returns (GetBlockWithTxsResponse) { + rpc GetBlockWithTxs(GetBlockWithTxsRequest) returns (GetBlockWithTxsResponse) { option (google.api.http).get = "/cosmos/tx/v1beta1/txs/block/{height}"; } // TxDecode decodes the transaction. diff --git a/proto/cosmos/tx/v1beta1/tx.proto b/proto/cosmos/tx/v1beta1/tx.proto index 04f98cf57f63..cfaac70449f4 100644 --- a/proto/cosmos/tx/v1beta1/tx.proto +++ b/proto/cosmos/tx/v1beta1/tx.proto @@ -88,13 +88,8 @@ message SignDocDirectAux { // sequence is the sequence number of the signing account. uint64 sequence = 5; - // Tip is the optional tip used for transactions fees paid in another denom. - // It should be left empty if the signer is not the tipper for this - // transaction. - // - // This field is ignored if the chain didn't enable tips, i.e. didn't add the - // `TipDecorator` in its posthandler. - Tip tip = 6; + // tips have been depreacted and should not be used + Tip tip = 6 [deprecated = true]; } // TxBody is the body of a transaction that all signers sign over. @@ -142,14 +137,13 @@ message AuthInfo { // based on the cost of evaluating the body and doing signature verification // of the signers. This can be estimated via simulation. Fee fee = 2; - // Tip is the optional tip used for transactions fees paid in another denom. // // This field is ignored if the chain didn't enable tips, i.e. didn't add the // `TipDecorator` in its posthandler. // // Since: cosmos-sdk 0.46 - Tip tip = 3; + Tip tip = 3 [deprecated = true]; } // SignerInfo describes the public key and signing mode of a single top-level @@ -207,10 +201,10 @@ message ModeInfo { message Fee { // amount is the amount of coins to be paid as a fee repeated cosmos.base.v1beta1.Coin amount = 1 [ - (gogoproto.nullable) = false, + (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins" + (amino.dont_omitempty) = true, + (amino.encoding) = "legacy_coins" ]; // gas_limit is the maximum gas that can be used in transaction processing @@ -232,12 +226,13 @@ message Fee { // // Since: cosmos-sdk 0.46 message Tip { + option deprecated = true; // amount is the amount of the tip repeated cosmos.base.v1beta1.Coin amount = 1 [ - (gogoproto.nullable) = false, + (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins" + (amino.dont_omitempty) = true, + (amino.encoding) = "legacy_coins" ]; // tipper is the address of the account paying for the tip string tipper = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; diff --git a/proto/tendermint/abci/types.proto b/proto/tendermint/abci/types.proto index 73151984ff95..78eeccebf468 100644 --- a/proto/tendermint/abci/types.proto +++ b/proto/tendermint/abci/types.proto @@ -25,10 +25,8 @@ service ABCI { rpc InitChain(RequestInitChain) returns (ResponseInitChain); rpc ListSnapshots(RequestListSnapshots) returns (ResponseListSnapshots); rpc OfferSnapshot(RequestOfferSnapshot) returns (ResponseOfferSnapshot); - rpc LoadSnapshotChunk(RequestLoadSnapshotChunk) - returns (ResponseLoadSnapshotChunk); - rpc ApplySnapshotChunk(RequestApplySnapshotChunk) - returns (ResponseApplySnapshotChunk); + rpc LoadSnapshotChunk(RequestLoadSnapshotChunk) returns (ResponseLoadSnapshotChunk); + rpc ApplySnapshotChunk(RequestApplySnapshotChunk) returns (ResponseApplySnapshotChunk); rpc PrepareProposal(RequestPrepareProposal) returns (ResponsePrepareProposal); rpc ProcessProposal(RequestProcessProposal) returns (ResponseProcessProposal); rpc ExtendVote(RequestExtendVote) returns (ResponseExtendVote); @@ -58,7 +56,7 @@ message Request { RequestVerifyVoteExtension verify_vote_extension = 19; RequestFinalizeBlock finalize_block = 20; } - reserved 4, 7, 9, 10; // SetOption, BeginBlock, DeliverTx, EndBlock + reserved 4, 7, 9, 10; // SetOption, BeginBlock, DeliverTx, EndBlock } message RequestEcho { @@ -75,8 +73,7 @@ message RequestInfo { } message RequestInitChain { - google.protobuf.Timestamp time = 1 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + google.protobuf.Timestamp time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; string chain_id = 2; tendermint.types.ConsensusParams consensus_params = 3; repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false]; @@ -108,8 +105,8 @@ message RequestListSnapshots {} // offers a snapshot to the application message RequestOfferSnapshot { - Snapshot snapshot = 1; // snapshot offered by peers - bytes app_hash = 2; // light client-verified app hash for snapshot height + Snapshot snapshot = 1; // snapshot offered by peers + bytes app_hash = 2; // light client-verified app hash for snapshot height } // loads a snapshot chunk @@ -156,16 +153,24 @@ message RequestProcessProposal { // Extends a vote with application-injected data message RequestExtendVote { - // the hash of the block that this vote may be referring to - bytes hash = 1; + // the hash of the block that this vote may be referring to + bytes hash = 1; // the height of the extended vote int64 height = 2; + // info of the block that this vote may be referring to + google.protobuf.Timestamp time = 3 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + repeated bytes txs = 4; + CommitInfo proposed_last_commit = 5 [(gogoproto.nullable) = false]; + repeated Misbehavior misbehavior = 6 [(gogoproto.nullable) = false]; + bytes next_validators_hash = 7; + // address of the public key of the original proposer of the block. + bytes proposer_address = 8; } // Verify the vote extension message RequestVerifyVoteExtension { // the hash of the block that this received vote corresponds to - bytes hash = 1; + bytes hash = 1; // the validator that signed the vote extension bytes validator_address = 2; int64 height = 3; @@ -208,7 +213,7 @@ message Response { ResponseVerifyVoteExtension verify_vote_extension = 20; ResponseFinalizeBlock finalize_block = 21; } - reserved 5, 8, 10, 11; // SetOption, BeginBlock, DeliverTx, EndBlock + reserved 5, 8, 10, 11; // SetOption, BeginBlock, DeliverTx, EndBlock } // nondeterministic @@ -241,8 +246,8 @@ message ResponseInitChain { message ResponseQuery { uint32 code = 1; // bytes data = 2; // use "value" instead. - string log = 3; // nondeterministic - string info = 4; // nondeterministic + string log = 3; // nondeterministic + string info = 4; // nondeterministic int64 index = 5; bytes key = 6; bytes value = 7; @@ -254,13 +259,12 @@ message ResponseQuery { message ResponseCheckTx { uint32 code = 1; bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic + string log = 3; // nondeterministic + string info = 4; // nondeterministic int64 gas_wanted = 5 [json_name = "gas_wanted"]; int64 gas_used = 6 [json_name = "gas_used"]; - repeated Event events = 7 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; - string codespace = 8; + repeated Event events = 7 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; + string codespace = 8; // These reserved fields were used until v0.37 by the priority mempool (now // removed). @@ -269,7 +273,7 @@ message ResponseCheckTx { } message ResponseCommit { - reserved 1, 2; // data was previously returned here + reserved 1, 2; // data was previously returned here int64 retain_height = 3; } @@ -281,12 +285,12 @@ message ResponseOfferSnapshot { Result result = 1; enum Result { - UNKNOWN = 0; // Unknown result, abort all snapshot restoration - ACCEPT = 1; // Snapshot accepted, apply chunks - ABORT = 2; // Abort all snapshot restoration - REJECT = 3; // Reject this specific snapshot, try others - REJECT_FORMAT = 4; // Reject all snapshots of this format, try others - REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others + UNKNOWN = 0; // Unknown result, abort all snapshot restoration + ACCEPT = 1; // Snapshot accepted, apply chunks + ABORT = 2; // Abort all snapshot restoration + REJECT = 3; // Reject this specific snapshot, try others + REJECT_FORMAT = 4; // Reject all snapshots of this format, try others + REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others } } @@ -296,16 +300,16 @@ message ResponseLoadSnapshotChunk { message ResponseApplySnapshotChunk { Result result = 1; - repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply - repeated string reject_senders = 3; // Chunk senders to reject and ban + repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply + repeated string reject_senders = 3; // Chunk senders to reject and ban enum Result { - UNKNOWN = 0; // Unknown result, abort all snapshot restoration - ACCEPT = 1; // Chunk successfully accepted - ABORT = 2; // Abort all snapshot restoration - RETRY = 3; // Retry chunk (combine with refetch and reject) - RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject) - REJECT_SNAPSHOT = 5; // Reject this snapshot, try others + UNKNOWN = 0; // Unknown result, abort all snapshot restoration + ACCEPT = 1; // Chunk successfully accepted + ABORT = 2; // Abort all snapshot restoration + RETRY = 3; // Retry chunk (combine with refetch and reject) + RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject) + REJECT_SNAPSHOT = 5; // Reject this snapshot, try others } } @@ -337,14 +341,13 @@ message ResponseVerifyVoteExtension { // Incorrectly implementing this thus has liveness implications as it may affect // CometBFT's ability to receive 2/3+ valid votes to finalize the block. // Honest nodes should never be rejected. - REJECT = 2; + REJECT = 2; } } message ResponseFinalizeBlock { // set of block events emmitted as part of executing the block - repeated Event events = 1 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; + repeated Event events = 1 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; // the result of executing each transaction including the events // the particular transction emitted. This should match the order // of the transactions delivered in the block itself @@ -353,7 +356,8 @@ message ResponseFinalizeBlock { repeated ValidatorUpdate validator_updates = 3 [(gogoproto.nullable) = false]; // updates to the consensus params, if any. tendermint.types.ConsensusParams consensus_param_updates = 4; - // app_hash is the hash of the applications' state which is used to confirm that execution of the transactions was deterministic. It is up to the application to decide which algorithm to use. + // app_hash is the hash of the applications' state which is used to confirm that execution of the transactions was + // deterministic. It is up to the application to decide which algorithm to use. bytes app_hash = 5; } @@ -381,17 +385,14 @@ message ExtendedCommitInfo { // Later, transactions may be queried using these events. message Event { string type = 1; - repeated EventAttribute attributes = 2 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "attributes,omitempty" - ]; + repeated EventAttribute attributes = 2 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes,omitempty"]; } // EventAttribute is a single key-value pair, associated with an event. message EventAttribute { string key = 1; string value = 2; - bool index = 3; // nondeterministic + bool index = 3; // nondeterministic } // ExecTxResult contains results of executing one individual transaction. @@ -400,12 +401,12 @@ message EventAttribute { message ExecTxResult { uint32 code = 1; bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 gas_wanted = 5; - int64 gas_used = 6; + string log = 3; // nondeterministic + string info = 4; // nondeterministic + int64 gas_wanted = 5 [json_name = "gas_wanted"]; + int64 gas_used = 6 [json_name = "gas_used"]; repeated Event events = 7 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; // nondeterministic + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; // nondeterministic string codespace = 8; } @@ -423,9 +424,9 @@ message TxResult { // Blockchain Types message Validator { - bytes address = 1; // The first 20 bytes of SHA256(public key) + bytes address = 1; // The first 20 bytes of SHA256(public key) // PubKey pub_key = 2 [(gogoproto.nullable)=false]; - int64 power = 3; // The voting power + int64 power = 3; // The voting power } message ValidatorUpdate { @@ -434,7 +435,7 @@ message ValidatorUpdate { } message VoteInfo { - Validator validator = 1 [(gogoproto.nullable) = false]; + Validator validator = 1 [(gogoproto.nullable) = false]; tendermint.types.BlockIDFlag block_id_flag = 3; reserved 2; // signed_last_block @@ -466,8 +467,7 @@ message Misbehavior { // The height when the offense occurred int64 height = 3; // The corresponding time where the offense occurred - google.protobuf.Timestamp time = 4 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; // Total voting power of the validator set in case the ABCI application does // not store historical validators. // https://github.com/tendermint/tendermint/issues/4581 @@ -478,9 +478,9 @@ message Misbehavior { // State Sync Types message Snapshot { - uint64 height = 1; // The height at which the snapshot was taken - uint32 format = 2; // The application-specific snapshot format - uint32 chunks = 3; // Number of chunks in the snapshot - bytes hash = 4; // Arbitrary snapshot hash, equal only if identical - bytes metadata = 5; // Arbitrary application metadata + uint64 height = 1; // The height at which the snapshot was taken + uint32 format = 2; // The application-specific snapshot format + uint32 chunks = 3; // Number of chunks in the snapshot + bytes hash = 4; // Arbitrary snapshot hash, equal only if identical + bytes metadata = 5; // Arbitrary application metadata } diff --git a/proto/tendermint/types/evidence.proto b/proto/tendermint/types/evidence.proto index 1f35049bdc4f..06f30ec2f5f3 100644 --- a/proto/tendermint/types/evidence.proto +++ b/proto/tendermint/types/evidence.proto @@ -30,7 +30,7 @@ message LightClientAttackEvidence { int64 common_height = 2; repeated tendermint.types.Validator byzantine_validators = 3; int64 total_voting_power = 4; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } message EvidenceList { diff --git a/proto/tendermint/types/params.proto b/proto/tendermint/types/params.proto index f96a2e2f5726..6a42d5ef0da7 100644 --- a/proto/tendermint/types/params.proto +++ b/proto/tendermint/types/params.proto @@ -27,7 +27,7 @@ message BlockParams { // Note: must be greater or equal to -1 int64 max_gas = 2; - reserved 3; // was TimeIotaMs see https://github.com/tendermint/tendermint/pull/5792 + reserved 3; // was TimeIotaMs see https://github.com/tendermint/tendermint/pull/5792 } // EvidenceParams determine how we handle evidence of malfeasance. @@ -43,8 +43,7 @@ message EvidenceParams { // It should correspond with an app's "unbonding period" or other similar // mechanism for handling [Nothing-At-Stake // attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). - google.protobuf.Duration max_age_duration = 2 - [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; + google.protobuf.Duration max_age_duration = 2 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; // This sets the maximum size of total evidence in bytes that can be committed in a single block. // and should fall comfortably under the max block bytes. diff --git a/proto/tendermint/types/types.proto b/proto/tendermint/types/types.proto index a527e2ffb217..a0d545ad9ee7 100644 --- a/proto/tendermint/types/types.proto +++ b/proto/tendermint/types/types.proto @@ -55,19 +55,19 @@ message Header { BlockID last_block_id = 5 [(gogoproto.nullable) = false]; // hashes of block data - bytes last_commit_hash = 6; // commit from validators from the last block - bytes data_hash = 7; // transactions + bytes last_commit_hash = 6; // commit from validators from the last block + bytes data_hash = 7; // transactions // hashes from the app output from the prev block - bytes validators_hash = 8; // validators for the current block - bytes next_validators_hash = 9; // validators for the next block - bytes consensus_hash = 10; // consensus params for current block - bytes app_hash = 11; // state after txs from the previous block - bytes last_results_hash = 12; // root hash of all results from the txs from the previous block + bytes validators_hash = 8; // validators for the current block + bytes next_validators_hash = 9; // validators for the next block + bytes consensus_hash = 10; // consensus params for current block + bytes app_hash = 11; // state after txs from the previous block + bytes last_results_hash = 12; // root hash of all results from the txs from the previous block // consensus info - bytes evidence_hash = 13; // evidence included in the block - bytes proposer_address = 14; // original proposer of the block + bytes evidence_hash = 13; // evidence included in the block + bytes proposer_address = 14; // original proposer of the block } // Data contains the set of transactions included in the block @@ -84,12 +84,10 @@ message Vote { SignedMsgType type = 1; int64 height = 2; int32 round = 3; - BlockID block_id = 4 - [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. - google.protobuf.Timestamp timestamp = 5 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes validator_address = 6; - int32 validator_index = 7; + BlockID block_id = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. + google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes validator_address = 6; + int32 validator_index = 7; // Vote signature by the validator if they participated in consensus for the // associated block. bytes signature = 8; @@ -114,16 +112,14 @@ message Commit { message CommitSig { tendermint.types.BlockIDFlag block_id_flag = 1; bytes validator_address = 2; - google.protobuf.Timestamp timestamp = 3 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 4; + google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes signature = 4; } message ExtendedCommit { - int64 height = 1; - int32 round = 2; - BlockID block_id = 3 - [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; + int64 height = 1; + int32 round = 2; + BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; repeated ExtendedCommitSig extended_signatures = 4 [(gogoproto.nullable) = false]; } @@ -133,9 +129,8 @@ message ExtendedCommit { message ExtendedCommitSig { tendermint.types.BlockIDFlag block_id_flag = 1; bytes validator_address = 2; - google.protobuf.Timestamp timestamp = 3 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 4; + google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes signature = 4; // Vote extension data bytes extension = 5; // Vote extension signature @@ -148,9 +143,8 @@ message Proposal { int32 round = 3; int32 pol_round = 4; BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; - google.protobuf.Timestamp timestamp = 6 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 7; + google.protobuf.Timestamp timestamp = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes signature = 7; } message SignedHeader { diff --git a/proto/tendermint/types/validator.proto b/proto/tendermint/types/validator.proto index 7b55956fcdd1..cd5105fac765 100644 --- a/proto/tendermint/types/validator.proto +++ b/proto/tendermint/types/validator.proto @@ -11,13 +11,13 @@ enum BlockIDFlag { option (gogoproto.goproto_enum_stringer) = true; option (gogoproto.goproto_enum_prefix) = false; - BLOCK_ID_FLAG_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "BlockIDFlagUnknown"]; // indicates an error condition - BLOCK_ID_FLAG_ABSENT = 1 [(gogoproto.enumvalue_customname) = "BlockIDFlagAbsent"]; // the vote was not received - BLOCK_ID_FLAG_COMMIT = 2 [(gogoproto.enumvalue_customname) = "BlockIDFlagCommit"]; // voted for the block that received the majority - BLOCK_ID_FLAG_NIL = 3 [(gogoproto.enumvalue_customname) = "BlockIDFlagNil"]; // voted for nil + BLOCK_ID_FLAG_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "BlockIDFlagUnknown"]; // indicates an error condition + BLOCK_ID_FLAG_ABSENT = 1 [(gogoproto.enumvalue_customname) = "BlockIDFlagAbsent"]; // the vote was not received + BLOCK_ID_FLAG_COMMIT = 2 + [(gogoproto.enumvalue_customname) = "BlockIDFlagCommit"]; // voted for the block that received the majority + BLOCK_ID_FLAG_NIL = 3 [(gogoproto.enumvalue_customname) = "BlockIDFlagNil"]; // voted for nil } - message ValidatorSet { repeated Validator validators = 1; Validator proposer = 2; diff --git a/runtime/app.go b/runtime/app.go index e2cb361d4c84..55b44aaa0d34 100644 --- a/runtime/app.go +++ b/runtime/app.go @@ -4,13 +4,14 @@ import ( "encoding/json" "fmt" + abci "github.com/cometbft/cometbft/abci/types" + "golang.org/x/exp/slices" + runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1" appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" + "cosmossdk.io/core/appmodule" "cosmossdk.io/log" - storetypes "cosmossdk.io/store/types" - abci "github.com/cometbft/cometbft/abci/types" - "golang.org/x/exp/slices" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" @@ -49,6 +50,7 @@ type App struct { basicManager module.BasicManager baseAppOptions []BaseAppOption msgServiceRouter *baseapp.MsgServiceRouter + grpcQueryRouter *baseapp.GRPCQueryRouter appConfig *appv1alpha1.Config logger log.Logger // initChainer is the init chainer function defined by the app config. @@ -75,7 +77,26 @@ func (a *App) RegisterModules(modules ...module.AppModule) error { appModule.RegisterInterfaces(a.interfaceRegistry) appModule.RegisterLegacyAminoCodec(a.amino) + if module, ok := appModule.(module.HasServices); ok { + module.RegisterServices(a.configurator) + } else if module, ok := appModule.(appmodule.HasServices); ok { + if err := module.RegisterServices(a.configurator); err != nil { + return err + } + } } + + return nil +} + +// RegisterStores registers the provided store keys. +// This method should only be used for registering extra stores +// wiich is necessary for modules that not registered using the app config. +// To be used in combination of RegisterModules. +func (a *App) RegisterStores(keys ...storetypes.StoreKey) error { + a.storeKeys = append(a.storeKeys, keys...) + a.MountStores(keys...) + return nil } @@ -94,6 +115,13 @@ func (a *App) Load(loadLatest bool) error { a.ModuleManager.SetOrderExportGenesis(a.config.InitGenesis...) } + if len(a.config.PreBlockers) != 0 { + a.ModuleManager.SetOrderPreBlockers(a.config.PreBlockers...) + if a.BaseApp.PreBlocker() == nil { + a.SetPreBlocker(a.PreBlocker) + } + } + if len(a.config.BeginBlockers) != 0 { a.ModuleManager.SetOrderBeginBlockers(a.config.BeginBlockers...) a.SetBeginBlocker(a.BeginBlocker) @@ -127,6 +155,11 @@ func (a *App) Load(loadLatest bool) error { return nil } +// PreBlocker application updates every pre block +func (a *App) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) { + return a.ModuleManager.PreBlock(ctx) +} + // BeginBlocker application updates every begin block func (a *App) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error) { return a.ModuleManager.BeginBlock(ctx) diff --git a/runtime/autocli.go b/runtime/autocli.go index 62e1b4569478..49ff9619115f 100644 --- a/runtime/autocli.go +++ b/runtime/autocli.go @@ -7,33 +7,35 @@ import ( ) func (m appModule) AutoCLIOptions() *autocliv1.ModuleOptions { - return &autocliv1.ModuleOptions{Query: &autocliv1.ServiceCommandDescriptor{ - Service: appv1alpha1.Query_ServiceDesc.ServiceName, - RpcCommandOptions: []*autocliv1.RpcCommandOptions{ - { - RpcMethod: "Config", - Short: "Queries the current app config", + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: appv1alpha1.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Config", + Short: "Query the current app config", + }, }, - }, - SubCommands: map[string]*autocliv1.ServiceCommandDescriptor{ - "autocli": { - Service: autocliv1.Query_ServiceDesc.ServiceName, - RpcCommandOptions: []*autocliv1.RpcCommandOptions{ - { - RpcMethod: "AppOptions", - Short: "Queries custom autocli options", + SubCommands: map[string]*autocliv1.ServiceCommandDescriptor{ + "autocli": { + Service: autocliv1.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "AppOptions", + Short: "Query the custom autocli options", + }, }, }, - }, - "reflection": { - Service: reflectionv1.ReflectionService_ServiceDesc.ServiceName, - RpcCommandOptions: []*autocliv1.RpcCommandOptions{ - { - RpcMethod: "FileDescriptors", - Short: "Queries the app's protobuf file descriptors", + "reflection": { + Service: reflectionv1.ReflectionService_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "FileDescriptors", + Short: "Query the app's protobuf file descriptors", + }, }, }, }, }, - }} + } } diff --git a/runtime/builder.go b/runtime/builder.go index e340a9db7eb5..b91b894668b2 100644 --- a/runtime/builder.go +++ b/runtime/builder.go @@ -29,8 +29,18 @@ func (a *AppBuilder) Build(db dbm.DB, traceStore io.Writer, baseAppOptions ...fu baseAppOptions = append(baseAppOptions, option) } + // set routers first in case they get modified by other options + baseAppOptions = append( + []func(*baseapp.BaseApp){ + func(bApp *baseapp.BaseApp) { + bApp.SetMsgServiceRouter(a.app.msgServiceRouter) + bApp.SetGRPCQueryRouter(a.app.grpcQueryRouter) + }, + }, + baseAppOptions..., + ) + bApp := baseapp.NewBaseApp(a.app.config.AppName, a.app.logger, db, nil, baseAppOptions...) - bApp.SetMsgServiceRouter(a.app.msgServiceRouter) bApp.SetCommitMultiStoreTracer(traceStore) bApp.SetVersion(version.Version) bApp.SetInterfaceRegistry(a.app.interfaceRegistry) @@ -38,6 +48,7 @@ func (a *AppBuilder) Build(db dbm.DB, traceStore io.Writer, baseAppOptions ...fu a.app.BaseApp = bApp a.app.configurator = module.NewConfigurator(a.app.cdc, a.app.MsgServiceRouter(), a.app.GRPCQueryRouter()) + if err := a.app.ModuleManager.RegisterServices(a.app.configurator); err != nil { panic(err) } diff --git a/runtime/events.go b/runtime/events.go index 4139ede7b7d6..752dcae2bb30 100644 --- a/runtime/events.go +++ b/runtime/events.go @@ -3,9 +3,10 @@ package runtime import ( "context" - "cosmossdk.io/core/event" "google.golang.org/protobuf/runtime/protoiface" + "cosmossdk.io/core/event" + sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -32,12 +33,12 @@ func NewEventManager(ctx context.Context) event.Manager { } // Emit emits an typed event that is defined in the protobuf file. -// In the future these events will be added to consensus +// In the future these events will be added to consensus. func (e Events) Emit(ctx context.Context, event protoiface.MessageV1) error { return e.EventManagerI.EmitTypedEvent(event) } -// EmitKV emits a key value pair event +// EmitKV emits a key value pair event. func (e Events) EmitKV(ctx context.Context, eventType string, attrs ...event.Attribute) error { attributes := make([]sdk.Attribute, 0, len(attrs)) @@ -45,15 +46,12 @@ func (e Events) EmitKV(ctx context.Context, eventType string, attrs ...event.Att attributes = append(attributes, sdk.NewAttribute(attr.Key, attr.Value)) } - events := sdk.Events{ - sdk.NewEvent(eventType, attributes...), - } - e.EventManagerI.EmitEvents(events) + e.EventManagerI.EmitEvents(sdk.Events{sdk.NewEvent(eventType, attributes...)}) return nil } // Emit emits an typed event that is defined in the protobuf file. -// In the future these events will be added to consensus +// In the future these events will be added to consensus. func (e Events) EmitNonConsensus(ctx context.Context, event protoiface.MessageV1) error { return e.EventManagerI.EmitTypedEvent(event) } diff --git a/runtime/module.go b/runtime/module.go index 8fca550d7261..d7d46cc75b90 100644 --- a/runtime/module.go +++ b/runtime/module.go @@ -4,30 +4,31 @@ import ( "fmt" "os" - runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1" - appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" - "cosmossdk.io/depinject" - "cosmossdk.io/log" - "cosmossdk.io/x/tx/signing" "github.com/cosmos/gogoproto/proto" "google.golang.org/protobuf/reflect/protodesc" "google.golang.org/protobuf/reflect/protoregistry" + runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1" + appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" + authmodulev1 "cosmossdk.io/api/cosmos/auth/module/v1" + stakingmodulev1 "cosmossdk.io/api/cosmos/staking/module/v1" + "cosmossdk.io/core/address" "cosmossdk.io/core/appmodule" "cosmossdk.io/core/comet" "cosmossdk.io/core/event" "cosmossdk.io/core/genesis" "cosmossdk.io/core/header" "cosmossdk.io/core/store" + "cosmossdk.io/depinject" + "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" - - "github.com/cosmos/cosmos-sdk/codec/address" + "cosmossdk.io/x/tx/signing" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/std" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/types/msgservice" ) @@ -74,6 +75,7 @@ func init() { ProvideHeaderInfoService, ProvideCometInfoService, ProvideBasicManager, + ProvideAddressCodec, ), appmodule.Invoke(SetupAppBuilder), ) @@ -83,8 +85,8 @@ func ProvideApp(interfaceRegistry codectypes.InterfaceRegistry) ( codec.Codec, *codec.LegacyAmino, *AppBuilder, - codec.ProtoCodecMarshaler, *baseapp.MsgServiceRouter, + *baseapp.GRPCQueryRouter, appmodule.AppModule, protodesc.Resolver, protoregistry.MessageTypeResolver, @@ -95,7 +97,7 @@ func ProvideApp(interfaceRegistry codectypes.InterfaceRegistry) ( // At startup, check that all proto annotations are correct. if err := msgservice.ValidateProtoAnnotations(protoFiles); err != nil { - // Once we switch to using protoreflect-based antehandlers, we might + // Once we switch to using protoreflect-based ante handlers, we might // want to panic here instead of logging a warning. _, _ = fmt.Fprintln(os.Stderr, err.Error()) } @@ -107,6 +109,7 @@ func ProvideApp(interfaceRegistry codectypes.InterfaceRegistry) ( cdc := codec.NewProtoCodec(interfaceRegistry) msgServiceRouter := baseapp.NewMsgServiceRouter() + grpcQueryRouter := baseapp.NewGRPCQueryRouter() app := &App{ storeKeys: nil, interfaceRegistry: interfaceRegistry, @@ -114,16 +117,17 @@ func ProvideApp(interfaceRegistry codectypes.InterfaceRegistry) ( amino: amino, basicManager: module.BasicManager{}, msgServiceRouter: msgServiceRouter, + grpcQueryRouter: grpcQueryRouter, } appBuilder := &AppBuilder{app} - return cdc, amino, appBuilder, cdc, msgServiceRouter, appModule{app}, protoFiles, protoTypes, nil + return cdc, amino, appBuilder, msgServiceRouter, grpcQueryRouter, appModule{app}, protoFiles, protoTypes, nil } type AppInputs struct { depinject.In - AppConfig *appv1alpha1.Config + AppConfig *appv1alpha1.Config `optional:"true"` Config *runtimev1alpha1.Module AppBuilder *AppBuilder Modules map[string]appmodule.AppModule @@ -157,16 +161,10 @@ func SetupAppBuilder(inputs AppInputs) { } } -func ProvideInterfaceRegistry(customGetSigners []signing.CustomGetSigner) (codectypes.InterfaceRegistry, error) { +func ProvideInterfaceRegistry(addressCodec address.Codec, validatorAddressCodec ValidatorAddressCodec, customGetSigners []signing.CustomGetSigner) (codectypes.InterfaceRegistry, error) { signingOptions := signing.Options{ - // using the global prefixes is a temporary solution until we refactor this - // to get the address.Codec's from the container - AddressCodec: address.Bech32Codec{ - Bech32Prefix: sdk.GetConfig().GetBech32AccountAddrPrefix(), - }, - ValidatorAddressCodec: address.Bech32Codec{ - Bech32Prefix: sdk.GetConfig().GetBech32ValidatorAddrPrefix(), - }, + AddressCodec: addressCodec, + ValidatorAddressCodec: validatorAddressCodec, } for _, signer := range customGetSigners { signingOptions.DefineCustomGetSigners(signer.MsgType, signer.Fn) @@ -179,10 +177,11 @@ func ProvideInterfaceRegistry(customGetSigners []signing.CustomGetSigner) (codec if err != nil { return nil, err } - err = interfaceRegistry.SigningContext().Validate() - if err != nil { + + if err := interfaceRegistry.SigningContext().Validate(); err != nil { return nil, err } + return interfaceRegistry, nil } @@ -260,3 +259,50 @@ func ProvideHeaderInfoService(app *AppBuilder) header.Service { func ProvideBasicManager(app *AppBuilder) module.BasicManager { return app.app.basicManager } + +type ( + // ValidatorAddressCodec is an alias for address.Codec for validator addresses. + ValidatorAddressCodec address.Codec + + // ConsensusAddressCodec is an alias for address.Codec for validator consensus addresses. + ConsensusAddressCodec address.Codec +) + +type AddressCodecInputs struct { + depinject.In + + AuthConfig *authmodulev1.Module `optional:"true"` + StakingConfig *stakingmodulev1.Module `optional:"true"` + + AddressCodecFactory func() address.Codec `optional:"true"` + ValidatorAddressCodecFactory func() ValidatorAddressCodec `optional:"true"` + ConsensusAddressCodecFactory func() ConsensusAddressCodec `optional:"true"` +} + +// ProvideAddressCodec provides an address.Codec to the container for any +// modules that want to do address string <> bytes conversion. +func ProvideAddressCodec(in AddressCodecInputs) (address.Codec, ValidatorAddressCodec, ConsensusAddressCodec) { + if in.AddressCodecFactory != nil && in.ValidatorAddressCodecFactory != nil && in.ConsensusAddressCodecFactory != nil { + return in.AddressCodecFactory(), in.ValidatorAddressCodecFactory(), in.ConsensusAddressCodecFactory() + } + + if in.AuthConfig == nil || in.AuthConfig.Bech32Prefix == "" { + panic("auth config bech32 prefix cannot be empty if no custom address codec is provided") + } + + if in.StakingConfig == nil { + in.StakingConfig = &stakingmodulev1.Module{} + } + + if in.StakingConfig.Bech32PrefixValidator == "" { + in.StakingConfig.Bech32PrefixValidator = fmt.Sprintf("%svaloper", in.AuthConfig.Bech32Prefix) + } + + if in.StakingConfig.Bech32PrefixConsensus == "" { + in.StakingConfig.Bech32PrefixConsensus = fmt.Sprintf("%svalcons", in.AuthConfig.Bech32Prefix) + } + + return addresscodec.NewBech32Codec(in.AuthConfig.Bech32Prefix), + addresscodec.NewBech32Codec(in.StakingConfig.Bech32PrefixValidator), + addresscodec.NewBech32Codec(in.StakingConfig.Bech32PrefixConsensus) +} diff --git a/runtime/services.go b/runtime/services.go index a16a3a6b5a57..3730b4a2af92 100644 --- a/runtime/services.go +++ b/runtime/services.go @@ -6,16 +6,20 @@ import ( appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" - "cosmossdk.io/core/comet" "cosmossdk.io/core/header" + "github.com/cosmos/cosmos-sdk/runtime/services" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" ) func (a *App) registerRuntimeServices(cfg module.Configurator) error { - appv1alpha1.RegisterQueryServer(cfg.QueryServer(), services.NewAppQueryService(a.appConfig)) + // no app config service if user is using app.yaml / app.json + // it is as in v0.52, this whole query service does not exist at all. + if a.appConfig != nil { + appv1alpha1.RegisterQueryServer(cfg.QueryServer(), services.NewAppQueryService(a.appConfig)) + } autocliv1.RegisterQueryServer(cfg.QueryServer(), services.NewAutoCLIQueryService(a.ModuleManager.Modules)) reflectionSvc, err := services.NewReflectionService() diff --git a/runtime/services/autocli.go b/runtime/services/autocli.go index 5c2a7efe43fd..66c70b31e7ee 100644 --- a/runtime/services/autocli.go +++ b/runtime/services/autocli.go @@ -3,9 +3,6 @@ package services import ( "context" - autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" - cosmosmsg "cosmossdk.io/api/cosmos/msg/v1" - "cosmossdk.io/core/appmodule" gogogrpc "github.com/cosmos/gogoproto/grpc" "github.com/cosmos/gogoproto/proto" "google.golang.org/grpc" @@ -13,6 +10,10 @@ import ( "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + cosmosmsg "cosmossdk.io/api/cosmos/msg/v1" + "cosmossdk.io/core/appmodule" + "github.com/cosmos/cosmos-sdk/types/module" ) @@ -31,6 +32,7 @@ func NewAutoCLIQueryService(appModules map[string]interface{}) *AutoCLIQueryServ } // ExtractAutoCLIOptions extracts autocli ModuleOptions from the provided app modules. +// // Example Usage: // // ExtractAutoCLIOptions(ModuleManager.Modules) diff --git a/runtime/services/reflection.go b/runtime/services/reflection.go index 890ff66e350e..65225a482606 100644 --- a/runtime/services/reflection.go +++ b/runtime/services/reflection.go @@ -3,9 +3,10 @@ package services import ( "context" - reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" "github.com/cosmos/gogoproto/proto" "google.golang.org/protobuf/types/descriptorpb" + + reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" ) // ReflectionService implements the cosmos.reflection.v1 service. diff --git a/runtime/store.go b/runtime/store.go index 9374fb0c199f..4cfe131c5071 100644 --- a/runtime/store.go +++ b/runtime/store.go @@ -4,12 +4,11 @@ import ( "context" "io" - "cosmossdk.io/core/store" + dbm "github.com/cosmos/cosmos-db" + "cosmossdk.io/core/store" storetypes "cosmossdk.io/store/types" - dbm "github.com/cosmos/cosmos-db" - sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -25,6 +24,10 @@ func (k kvStoreService) OpenKVStore(ctx context.Context) store.KVStore { return newKVStore(sdk.UnwrapSDKContext(ctx).KVStore(k.key)) } +func NewMemStoreService(storeKey *storetypes.MemoryStoreKey) store.MemoryStoreService { + return &memStoreService{key: storeKey} +} + type memStoreService struct { key *storetypes.MemoryStoreKey } @@ -33,6 +36,10 @@ func (m memStoreService) OpenMemoryStore(ctx context.Context) store.KVStore { return newKVStore(sdk.UnwrapSDKContext(ctx).KVStore(m.key)) } +func NewTransientStoreService(storeKey *storetypes.TransientStoreKey) store.TransientStoreService { + return &transientStoreService{key: storeKey} +} + type transientStoreService struct { key *storetypes.TransientStoreKey } diff --git a/runtime/types.go b/runtime/types.go index a87ff8944282..afde0e42d1f8 100644 --- a/runtime/types.go +++ b/runtime/types.go @@ -18,7 +18,7 @@ type AppI interface { Name() string // The application types codec. - // NOTE: This shoult be sealed before being returned. + // NOTE: This should NOT be sealed before being returned. LegacyAmino() *codec.LegacyAmino // Application updates every begin block. diff --git a/scripts/go-lint-all.bash b/scripts/go-lint-all.bash index b99606844d79..8850c65cd111 100755 --- a/scripts/go-lint-all.bash +++ b/scripts/go-lint-all.bash @@ -1,6 +1,6 @@ #!/usr/bin/env bash -set -eu -o pipefail +set -e -o pipefail REPO_ROOT="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )/.." &> /dev/null && pwd )" export REPO_ROOT @@ -14,5 +14,24 @@ lint_module() { } export -f lint_module -find "${REPO_ROOT}" -type f -name go.mod -print0 | - xargs -0 -I{} bash -c 'lint_module "$@"' _ {} "$@" # Prepend go.mod file before command-line args. +# if LINT_DIFF env is set, only lint the files in the current commit otherwise lint all files +if [[ -z "${LINT_DIFF:-}" ]]; then + find "${REPO_ROOT}" -type f -name go.mod -print0 | + xargs -0 -I{} bash -c 'lint_module "$@"' _ {} "$@" +else + if [[ -z $GIT_DIFF ]]; then + GIT_DIFF=$(git diff --name-only --diff-filter=d | grep \.go$ | grep -v \.pb\.go$) || true + fi + + if [[ -z "$GIT_DIFF" ]]; then + echo "no files to lint" + exit 0 + fi + + for f in $(dirname $(echo "$GIT_DIFF" | tr -d "'") | uniq); do + echo "linting $f [$(date -Iseconds -u)]" && + cd $f && + golangci-lint run ./... -c "${REPO_ROOT}/.golangci.yml" "$@" && + cd $REPO_ROOT + done +fi \ No newline at end of file diff --git a/scripts/init-simapp.sh b/scripts/init-simapp.sh index 5db89d2c5066..6913079e0a31 100755 --- a/scripts/init-simapp.sh +++ b/scripts/init-simapp.sh @@ -1,16 +1,17 @@ -#!/bin/bash +#!/usr/bin/env bash SIMD_BIN=${SIMD_BIN:=$(which simd 2>/dev/null)} if [ -z "$SIMD_BIN" ]; then echo "SIMD_BIN is not set. Make sure to run make install before"; exit 1; fi echo "using $SIMD_BIN" -if [ -d "$($SIMD_BIN config home)" ]; then rm -r $($SIMD_BIN config home); fi +if [ -d "$($SIMD_BIN config home)" ]; then rm -rv $($SIMD_BIN config home); fi $SIMD_BIN config set client chain-id demo $SIMD_BIN config set client keyring-backend test +$SIMD_BIN config set app api.enable true $SIMD_BIN keys add alice $SIMD_BIN keys add bob $SIMD_BIN init test --chain-id demo $SIMD_BIN genesis add-genesis-account alice 5000000000stake --keyring-backend test $SIMD_BIN genesis add-genesis-account bob 5000000000stake --keyring-backend test $SIMD_BIN genesis gentx alice 1000000stake --chain-id demo -$SIMD_BIN genesis collect-gentxs \ No newline at end of file +$SIMD_BIN genesis collect-gentxs diff --git a/scripts/mockgen.sh b/scripts/mockgen.sh index a3786acc50d2..cda998093a19 100755 --- a/scripts/mockgen.sh +++ b/scripts/mockgen.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash mockgen_cmd="mockgen" +$mockgen_cmd -source=baseapp/abci_utils.go -package mock -destination baseapp/testutil/mock/mocks.go $mockgen_cmd -source=client/account_retriever.go -package mock -destination testutil/mock/account_retriever.go $mockgen_cmd -package mock -destination store/mock/cosmos_cosmos_db_DB.go github.com/cosmos/cosmos-db DB $mockgen_cmd -source=types/module/module.go -package mock -destination testutil/mock/types_module_module.go diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index b1a4428e8572..e84178a05f43 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -4,6 +4,9 @@ # docker build --pull --rm -f "contrib/devtools/Dockerfile" -t cosmossdk-proto:latest "contrib/devtools" # docker run --rm -v $(pwd):/workspace --workdir /workspace cosmossdk-proto sh ./scripts/protocgen.sh +echo "Formatting protobuf files" +find ./ -name "*.proto" -exec clang-format -i {} \; + set -e echo "Generating gogo proto code" @@ -22,11 +25,10 @@ done cd .. -# generate codec/testdata proto code +# generate tests proto code (cd testutil/testdata; buf generate) - -# generate baseapp test messages (cd baseapp/testutil; buf generate) +(cd tests/integration/tx/internal; make codegen) # move proto files to the right places cp -r github.com/cosmos/cosmos-sdk/* ./ @@ -35,4 +37,4 @@ rm -rf github.com cosmossdk.io go mod tidy -./scripts/protocgen-pulsar.sh +./scripts/protocgen-pulsar.sh \ No newline at end of file diff --git a/server/README.md b/server/README.md index 21c6bed620d8..a7c0e275fe1b 100644 --- a/server/README.md +++ b/server/README.md @@ -74,26 +74,12 @@ the viper literal and passed to the application construction. Example: ```go -func newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts server.AppOptions) server.Application { - var cache sdk.MultiStorePersistentCache - - if cast.ToBool(appOpts.Get(server.FlagInterBlockCache)) { - cache = store.NewCommitKVStoreCacheManager() - } - - pruningOpts, err := server.GetPruningOptionsFromFlags(appOpts) - if err != nil { - panic(err) - } - +func newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts servertypes.AppOptions) servertypes.Application { + baseappOptions := server.DefaultBaseappOptions(appOpts) return simapp.NewSimApp( logger, db, traceStore, true, - baseapp.SetPruning(pruningOpts), - baseapp.SetMinGasPrices(cast.ToString(appOpts.Get(server.FlagMinGasPrices))), - baseapp.SetHaltHeight(cast.ToUint64(appOpts.Get(server.FlagHaltHeight))), - baseapp.SetHaltTime(cast.ToUint64(appOpts.Get(server.FlagHaltTime))), - baseapp.SetInterBlockCache(cache), - baseapp.SetTrace(cast.ToBool(appOpts.Get(server.FlagTrace))), + appOpts, + baseappOptions..., ) } ``` diff --git a/server/api/server.go b/server/api/server.go index 5e273f645360..84a0ad6bd827 100644 --- a/server/api/server.go +++ b/server/api/server.go @@ -9,7 +9,6 @@ import ( "sync" "time" - "cosmossdk.io/log" tmrpcserver "github.com/cometbft/cometbft/rpc/jsonrpc/server" gateway "github.com/cosmos/gogogateway" "github.com/gorilla/handlers" @@ -18,6 +17,8 @@ import ( "github.com/improbable-eng/grpc-web/go/grpcweb" "google.golang.org/grpc" + "cosmossdk.io/log" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec/legacy" "github.com/cosmos/cosmos-sdk/server/config" diff --git a/server/cmd/execute.go b/server/cmd/execute.go index 7a1a0c5ad1f3..cf8e7c009f44 100644 --- a/server/cmd/execute.go +++ b/server/cmd/execute.go @@ -25,9 +25,10 @@ func Execute(rootCmd *cobra.Command, envPrefix, defaultHome string) error { // https://github.com/spf13/cobra/pull/1118. ctx := CreateExecuteContext(context.Background()) - rootCmd.PersistentFlags().String(flags.FlagLogLevel, zerolog.InfoLevel.String(), "The logging level (trace|debug|info|warn|error|fatal|panic)") + rootCmd.PersistentFlags().String(flags.FlagLogLevel, zerolog.InfoLevel.String(), "The logging level (trace|debug|info|warn|error|fatal|panic|disabled or '*:,:')") // NOTE: The default logger is only checking for the "json" value, any other value will default to plain text. rootCmd.PersistentFlags().String(flags.FlagLogFormat, "plain", "The logging format (json|plain)") + rootCmd.PersistentFlags().Bool(flags.FlagLogNoColor, false, "Disable colored logs") executor := cmtcli.PrepareBaseCmd(rootCmd, envPrefix, defaultHome) return executor.ExecuteContext(ctx) diff --git a/server/cmt_abci.go b/server/cmt_abci.go index 3db12dafed5a..74040f245169 100644 --- a/server/cmt_abci.go +++ b/server/cmt_abci.go @@ -4,6 +4,7 @@ import ( "context" abci "github.com/cometbft/cometbft/abci/types" + servertypes "github.com/cosmos/cosmos-sdk/server/types" ) diff --git a/server/cmt_cmds.go b/server/cmt_cmds.go index 02b14a7b4aa4..a66956a9b419 100644 --- a/server/cmt_cmds.go +++ b/server/cmt_cmds.go @@ -1,29 +1,28 @@ package server import ( + "context" + "encoding/json" "fmt" "strconv" "strings" - "cosmossdk.io/log" cmtcfg "github.com/cometbft/cometbft/config" - "github.com/cometbft/cometbft/light" + cmtjson "github.com/cometbft/cometbft/libs/json" "github.com/cometbft/cometbft/node" "github.com/cometbft/cometbft/p2p" pvm "github.com/cometbft/cometbft/privval" - cmtstore "github.com/cometbft/cometbft/proto/tendermint/store" - sm "github.com/cometbft/cometbft/state" - "github.com/cometbft/cometbft/statesync" - "github.com/cometbft/cometbft/store" cmtversion "github.com/cometbft/cometbft/version" "github.com/spf13/cobra" "sigs.k8s.io/yaml" + "cosmossdk.io/log" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" rpc "github.com/cosmos/cosmos-sdk/client/rpc" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - servercmtlog "github.com/cosmos/cosmos-sdk/server/log" "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" @@ -31,6 +30,43 @@ import ( auth "github.com/cosmos/cosmos-sdk/x/auth/client/cli" ) +// StatusCommand returns the command to return the status of the network. +func StatusCommand() *cobra.Command { + cmd := &cobra.Command{ + Use: "status", + Short: "Query remote node for status", + RunE: func(cmd *cobra.Command, _ []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + status, err := cmtservice.GetNodeStatus(context.Background(), clientCtx) + if err != nil { + return err + } + + output, err := cmtjson.Marshal(status) + if err != nil { + return err + } + + // In order to maintain backwards compatibility, the default json format output + outputFormat, _ := cmd.Flags().GetString(flags.FlagOutput) + if outputFormat == flags.OutputFormatJSON { + clientCtx = clientCtx.WithOutputFormat(flags.OutputFormatJSON) + } + + return clientCtx.PrintRaw(output) + }, + } + + cmd.Flags().StringP(flags.FlagNode, "n", "tcp://localhost:26657", "Node to connect to") + cmd.Flags().StringP(flags.FlagOutput, "o", "json", "Output format (text|json)") + + return cmd +} + // ShowNodeIDCmd - ported from CometBFT, dump node ID to stdout func ShowNodeIDCmd() *cobra.Command { return &cobra.Command{ @@ -45,7 +81,7 @@ func ShowNodeIDCmd() *cobra.Command { return err } - fmt.Println(nodeKey.ID()) + cmd.Println(nodeKey.ID()) return nil }, } @@ -77,7 +113,7 @@ func ShowValidatorCmd() *cobra.Command { return err } - fmt.Println(string(bz)) + cmd.Println(string(bz)) return nil }, } @@ -97,7 +133,8 @@ func ShowAddressCmd() *cobra.Command { privValidator := pvm.LoadFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile()) valConsAddr := (sdk.ConsAddress)(privValidator.GetAddress()) - fmt.Println(valConsAddr.String()) + + cmd.Println(valConsAddr.String()) return nil }, } @@ -127,7 +164,7 @@ func VersionCmd() *cobra.Command { return err } - cmd.Print(string(bs)) + cmd.Println(string(bs)) return nil }, } @@ -145,7 +182,7 @@ Please refer to each module's documentation for the full set of events to query for. Each module documents its respective events under 'xx_events.md'. `, Example: fmt.Sprintf( - "$ %s query blocks --query \"message.sender='cosmos1...' AND block.height > 7\" --page 1 --limit 30 --order-by ASC", + "$ %s query blocks --query \"message.sender='cosmos1...' AND block.height > 7\" --page 1 --limit 30 --order_by asc", version.AppName, ), RunE: func(cmd *cobra.Command, args []string) error { @@ -189,7 +226,7 @@ $ %s query block --%s=%s `, version.AppName, auth.FlagType, auth.TypeHeight, version.AppName, auth.FlagType, auth.TypeHash)), - Args: cobra.ExactArgs(1), + Args: cobra.MaximumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { @@ -197,29 +234,37 @@ $ %s query block --%s=%s } typ, _ := cmd.Flags().GetString(auth.FlagType) + if len(args) == 0 { + // do not break default v0.50 behavior of block hash + // if no args are provided, set the type to height + typ = auth.TypeHeight + } switch typ { case auth.TypeHeight: - - if args[0] == "" { - return fmt.Errorf("argument should be a block height") + var ( + err error + height int64 + ) + heightStr := "" + if len(args) > 0 { + heightStr = args[0] } - var height *int64 - - // optional height - if len(args) > 0 { - h, err := strconv.Atoi(args[0]) + if heightStr == "" { + cmd.Println("Falling back to latest block height:") + height, err = rpc.GetChainHeight(clientCtx) if err != nil { - return err + return fmt.Errorf("failed to get chain height: %w", err) } - if h > 0 { - tmp := int64(h) - height = &tmp + } else { + height, err = strconv.ParseInt(heightStr, 10, 64) + if err != nil { + return fmt.Errorf("failed to parse block height: %w", err) } } - output, err := rpc.GetBlockByHeight(clientCtx, height) + output, err := rpc.GetBlockByHeight(clientCtx, &height) if err != nil { return err } @@ -260,87 +305,87 @@ $ %s query block --%s=%s return cmd } -func BootstrapStateCmd(appCreator types.AppCreator) *cobra.Command { +// QueryBlockResultsCmd implements the default command for a BlockResults query. +func QueryBlockResultsCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "bootstrap-state", - Short: "Bootstrap CometBFT state at an arbitrary block height using a light client", - Args: cobra.NoArgs, + Use: "block-results [height]", + Short: "Query for a committed block's results by height", + Long: "Query for a specific committed block's results using the CometBFT RPC `block_results` method", + Args: cobra.RangeArgs(0, 1), RunE: func(cmd *cobra.Command, args []string) error { - serverCtx := GetServerContextFromCmd(cmd) - logger := log.NewLogger(cmd.OutOrStdout()) - cfg := serverCtx.Config + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } - height, err := cmd.Flags().GetInt64("height") + node, err := clientCtx.GetNode() if err != nil { return err } - if height == 0 { - home := serverCtx.Viper.GetString(flags.FlagHome) - db, err := openDB(home, GetAppDBBackend(serverCtx.Viper)) + + // optional height + var height int64 + if len(args) > 0 { + height, err = strconv.ParseInt(args[0], 10, 64) if err != nil { return err } - - app := appCreator(logger, db, nil, serverCtx.Viper) - height = app.CommitMultiStore().LastCommitID().Version + } else { + cmd.Println("Falling back to latest block height:") + height, err = rpc.GetChainHeight(clientCtx) + if err != nil { + return fmt.Errorf("failed to get chain height: %w", err) + } } - blockStoreDB, err := cmtcfg.DefaultDBProvider(&cmtcfg.DBContext{ID: "blockstore", Config: cfg}) + blockRes, err := node.BlockResults(context.Background(), &height) if err != nil { return err } - blockStore := store.NewBlockStore(blockStoreDB) - stateDB, err := cmtcfg.DefaultDBProvider(&cmtcfg.DBContext{ID: "state", Config: cfg}) + // coretypes.ResultBlockResults doesn't implement proto.Message interface + // so we can't print it using clientCtx.PrintProto + // we choose to serialize it to json and print the json instead + blockResStr, err := json.Marshal(blockRes) if err != nil { return err } - stateStore := sm.NewStore(stateDB, sm.StoreOptions{ - DiscardABCIResponses: cfg.Storage.DiscardABCIResponses, - }) - genState, _, err := node.LoadStateFromDBOrGenesisDocProvider(stateDB, node.DefaultGenesisDocProviderFunc(cfg)) - if err != nil { - return err - } + return clientCtx.PrintRaw(blockResStr) + }, + } - stateProvider, err := statesync.NewLightClientStateProvider( - cmd.Context(), - genState.ChainID, genState.Version, genState.InitialHeight, - cfg.StateSync.RPCServers, light.TrustOptions{ - Period: cfg.StateSync.TrustPeriod, - Height: cfg.StateSync.TrustHeight, - Hash: cfg.StateSync.TrustHashBytes(), - }, servercmtlog.CometLoggerWrapper{Logger: logger.With("module", "light")}) - if err != nil { - return fmt.Errorf("failed to set up light client state provider: %w", err) - } + flags.AddQueryFlagsToCmd(cmd) - state, err := stateProvider.State(cmd.Context(), uint64(height)) - if err != nil { - return fmt.Errorf("failed to get state: %w", err) - } + return cmd +} - commit, err := stateProvider.Commit(cmd.Context(), uint64(height)) - if err != nil { - return fmt.Errorf("failed to get commit: %w", err) - } +func BootstrapStateCmd(appCreator types.AppCreator) *cobra.Command { + cmd := &cobra.Command{ + Use: "bootstrap-state", + Short: "Bootstrap CometBFT state at an arbitrary block height using a light client", + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, args []string) error { + serverCtx := GetServerContextFromCmd(cmd) + logger := log.NewLogger(cmd.OutOrStdout()) + cfg := serverCtx.Config - if err := stateStore.Bootstrap(state); err != nil { - return fmt.Errorf("failed to bootstrap state: %w", err) + height, err := cmd.Flags().GetInt64("height") + if err != nil { + return err } + if height == 0 { + home := serverCtx.Viper.GetString(flags.FlagHome) + db, err := openDB(home, GetAppDBBackend(serverCtx.Viper)) + if err != nil { + return err + } - if err := blockStore.SaveSeenCommit(state.LastBlockHeight, commit); err != nil { - return fmt.Errorf("failed to save seen commit: %w", err) + app := appCreator(logger, db, nil, serverCtx.Viper) + height = app.CommitMultiStore().LastCommitID().Version } - store.SaveBlockStoreState(&cmtstore.BlockStoreState{ - // it breaks the invariant that blocks in range [Base, Height] must exists, but it do works in practice. - Base: state.LastBlockHeight, - Height: state.LastBlockHeight, - }, blockStoreDB) - - return nil + return node.BootstrapStateWithGenProvider(cmd.Context(), cfg, cmtcfg.DefaultDBProvider, getGenDocProvider(cfg), uint64(height), nil) }, } diff --git a/server/config/config.go b/server/config/config.go index 5cf1313b6673..d97dedc5f54e 100644 --- a/server/config/config.go +++ b/server/config/config.go @@ -3,7 +3,6 @@ package config import ( "fmt" "math" - "strings" "github.com/spf13/viper" @@ -39,6 +38,10 @@ type BaseConfig struct { // specified in this config (e.g. 0.25token1;0.0001token2). MinGasPrices string `mapstructure:"minimum-gas-prices"` + // The maximum amount of gas a grpc/Rest query may consume. + // If set to 0, it is unbounded. + QueryGasLimit uint64 `mapstructure:"query-gas-limit"` + Pruning string `mapstructure:"pruning"` PruningKeepRecent string `mapstructure:"pruning-keep-recent"` PruningInterval string `mapstructure:"pruning-interval"` @@ -85,9 +88,6 @@ type BaseConfig struct { // IAVLDisableFastNode enables or disables the fast sync node. IAVLDisableFastNode bool `mapstructure:"iavl-disable-fastnode"` - // IAVLLazyLoading enable/disable the lazy loading of iavl store. - IAVLLazyLoading bool `mapstructure:"iavl-lazy-loading"` - // AppDBBackend defines the type of Database to use for the application and snapshots databases. // An empty string indicates that the CometBFT config's DBBackend value should be used. AppDBBackend string `mapstructure:"app-db-backend"` @@ -165,7 +165,7 @@ type MempoolConfig struct { // the mempool is disabled entirely, zero indicates that the mempool is // unbounded in how many txs it may contain, and a positive value indicates // the maximum amount of txs it may contain. - MaxTxs int + MaxTxs int `mapstructure:"max-txs"` } // State Streaming configuration @@ -201,23 +201,15 @@ func (c *Config) SetMinGasPrices(gasPrices sdk.DecCoins) { c.MinGasPrices = gasPrices.String() } -// GetMinGasPrices returns the validator's minimum gas prices based on the set -// configuration. +// GetMinGasPrices returns the validator's minimum gas prices based on the set configuration. func (c *Config) GetMinGasPrices() sdk.DecCoins { if c.MinGasPrices == "" { return sdk.DecCoins{} } - gasPricesStr := strings.Split(c.MinGasPrices, ";") - gasPrices := make(sdk.DecCoins, len(gasPricesStr)) - - for i, s := range gasPricesStr { - gasPrice, err := sdk.ParseDecCoin(s) - if err != nil { - panic(fmt.Errorf("failed to parse minimum gas price coin (%s): %s", s, err)) - } - - gasPrices[i] = gasPrice + gasPrices, err := sdk.ParseDecCoins(c.MinGasPrices) + if err != nil { + panic(fmt.Sprintf("invalid minimum gas prices: %v", err)) } return gasPrices @@ -228,6 +220,7 @@ func DefaultConfig() *Config { return &Config{ BaseConfig: BaseConfig{ MinGasPrices: defaultMinGasPrices, + QueryGasLimit: 0, InterBlockCache: true, Pruning: pruningtypes.PruningOptionDefault, PruningKeepRecent: "0", @@ -236,7 +229,6 @@ func DefaultConfig() *Config { IndexEvents: make([]string, 0), IAVLCacheSize: 781250, IAVLDisableFastNode: false, - IAVLLazyLoading: false, AppDBBackend: "", }, Telemetry: telemetry.Config{ @@ -271,7 +263,7 @@ func DefaultConfig() *Config { }, }, Mempool: MempoolConfig{ - MaxTxs: 5_000, + MaxTxs: -1, }, } } diff --git a/server/config/config_test.go b/server/config/config_test.go index c15186e73a2d..bd5cf061b350 100644 --- a/server/config/config_test.go +++ b/server/config/config_test.go @@ -18,10 +18,18 @@ func TestDefaultConfig(t *testing.T) { require.True(t, cfg.GetMinGasPrices().IsZero()) } -func TestSetMinimumFees(t *testing.T) { +func TestGetAndSetMinimumGas(t *testing.T) { cfg := DefaultConfig() - cfg.SetMinGasPrices(sdk.DecCoins{sdk.NewInt64DecCoin("foo", 5)}) + + input := sdk.DecCoins{sdk.NewInt64DecCoin("foo", 5)} + cfg.SetMinGasPrices(input) require.Equal(t, "5.000000000000000000foo", cfg.MinGasPrices) + require.EqualValues(t, cfg.GetMinGasPrices(), input) + + input = sdk.DecCoins{sdk.NewInt64DecCoin("bar", 1), sdk.NewInt64DecCoin("foo", 5)} + cfg.SetMinGasPrices(input) + require.Equal(t, "1.000000000000000000bar,5.000000000000000000foo", cfg.MinGasPrices) + require.EqualValues(t, cfg.GetMinGasPrices(), input) } func TestIndexEventsMarshalling(t *testing.T) { @@ -208,3 +216,21 @@ func TestSetConfigTemplate(t *testing.T) { actual := setBuffer.String() require.Equal(t, expected, actual, "resulting config strings") } + +func TestAppConfig(t *testing.T) { + appConfigFile := filepath.Join(t.TempDir(), "app.toml") + defer func() { + _ = os.Remove(appConfigFile) + }() + + defAppConfig := DefaultConfig() + SetConfigTemplate(DefaultConfigTemplate) + WriteConfigFile(appConfigFile, defAppConfig) + + v := viper.New() + v.SetConfigFile(appConfigFile) + require.NoError(t, v.ReadInConfig()) + appCfg := new(Config) + require.NoError(t, v.Unmarshal(appCfg)) + require.EqualValues(t, appCfg, defAppConfig) +} diff --git a/server/config/toml.go b/server/config/toml.go index de846d8f8575..b3c20c69a024 100644 --- a/server/config/toml.go +++ b/server/config/toml.go @@ -18,9 +18,13 @@ const DefaultConfigTemplate = `# This is a TOML config file. # The minimum gas prices a validator is willing to accept for processing a # transaction. A transaction's fees must meet the minimum of any denomination -# specified in this config (e.g. 0.25token1;0.0001token2). +# specified in this config (e.g. 0.25token1,0.0001token2). minimum-gas-prices = "{{ .BaseConfig.MinGasPrices }}" +# The maximum gas a query coming over rest/grpc may consume. +# If this is set to zero, the query can consume an unbounded amount of gas. +query-gas-limit = "{{ .BaseConfig.QueryGasLimit }}" + # default: the last 362880 states are kept, pruning at 10 block intervals # nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) # everything: 2 latest states will be kept; pruning at 10 block intervals. @@ -77,14 +81,9 @@ iavl-cache-size = {{ .BaseConfig.IAVLCacheSize }} # Default is false. iavl-disable-fastnode = {{ .BaseConfig.IAVLDisableFastNode }} -# IAVLLazyLoading enable/disable the lazy loading of iavl store. -# Default is false. -iavl-lazy-loading = {{ .BaseConfig.IAVLLazyLoading }} - # AppDBBackend defines the database backend type to use for the application and snapshots DBs. # An empty string indicates that a fallback will be used. -# First fallback is the deprecated compile-time types.DBBackend value. -# Second fallback (if the types.DBBackend also isn't set), is the db-backend value set in CometBFT's config.toml. +# The fallback is the db_backend value set in CometBFT's config.toml. app-db-backend = "{{ .BaseConfig.AppDBBackend }}" ############################################################################### @@ -122,6 +121,17 @@ global-labels = [{{ range $k, $v := .Telemetry.GlobalLabels }} ["{{index $v 0 }}", "{{ index $v 1}}"],{{ end }} ] +# MetricsSink defines the type of metrics sink to use. +metrics-sink = "{{ .Telemetry.MetricsSink }}" + +# StatsdAddr defines the address of a statsd server to send metrics to. +# Only utilized if MetricsSink is set to "statsd" or "dogstatsd". +statsd-addr = "{{ .Telemetry.StatsdAddr }}" + +# DatadogHostname defines the hostname to use when emitting metrics to +# Datadog. Only utilized if MetricsSink is set to "dogstatsd". +datadog-hostname = "{{ .Telemetry.DatadogHostname }}" + ############################################################################### ### API Configuration ### ############################################################################### @@ -230,12 +240,12 @@ stop-node-on-err = {{ .Streaming.ABCI.StopNodeOnErr }} [mempool] # Setting max-txs to 0 will allow for a unbounded amount of transactions in the mempool. -# Setting max_txs to negative 1 (-1) will disable transactions from being inserted into the mempool. +# Setting max_txs to negative 1 (-1) will disable transactions from being inserted into the mempool (no-op mempool). # Setting max_txs to a positive number (> 0) will limit the number of transactions in the mempool, by the specified amount. # # Note, this configuration only applies to SDK built-in app-side mempool # implementations. -max-txs = "{{ .Mempool.MaxTxs }}" +max-txs = {{ .Mempool.MaxTxs }} ` var configTemplate *template.Template diff --git a/server/constructors_test.go b/server/constructors_test.go index 02e3c51feb9d..0932d79488d0 100644 --- a/server/constructors_test.go +++ b/server/constructors_test.go @@ -4,9 +4,8 @@ import ( "path/filepath" "testing" - "github.com/stretchr/testify/require" - dbm "github.com/cosmos/cosmos-db" + "github.com/stretchr/testify/require" ) func Test_openDB(t *testing.T) { diff --git a/server/export.go b/server/export.go index eeac72fabe5f..9b43da0c854e 100644 --- a/server/export.go +++ b/server/export.go @@ -11,6 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/server/types" + "github.com/cosmos/cosmos-sdk/version" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" ) @@ -87,6 +88,10 @@ func ExportCmd(appExporter types.AppExporter, defaultNodeHome string) *cobra.Com return err } + // set current binary version + appGenesis.AppName = version.AppName + appGenesis.AppVersion = version.Version + appGenesis.AppState = exported.AppState appGenesis.InitialHeight = exported.Height appGenesis.Consensus = genutiltypes.NewConsensusGenesis(exported.ConsensusParams, exported.Validators) diff --git a/server/export_test.go b/server/export_test.go index 6d1886469181..d1dad66aaa65 100644 --- a/server/export_test.go +++ b/server/export_test.go @@ -10,11 +10,16 @@ import ( "testing" "time" - "cosmossdk.io/log" cmtcfg "github.com/cometbft/cometbft/config" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" cmttypes "github.com/cometbft/cometbft/types" dbm "github.com/cosmos/cosmos-db" + "github.com/rs/zerolog" + "github.com/spf13/viper" + "github.com/stretchr/testify/require" + + "cosmossdk.io/log" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/server/types" @@ -22,9 +27,6 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - "github.com/rs/zerolog" - "github.com/spf13/viper" - "github.com/stretchr/testify/require" ) // ExportSystem wraps a (*cmdtest).System diff --git a/server/grpc/gogoreflection/serverreflection.go b/server/grpc/gogoreflection/serverreflection.go index 916015366dba..fd48aa416b40 100644 --- a/server/grpc/gogoreflection/serverreflection.go +++ b/server/grpc/gogoreflection/serverreflection.go @@ -51,7 +51,7 @@ import ( dpb "github.com/golang/protobuf/protoc-gen-go/descriptor" "google.golang.org/grpc" "google.golang.org/grpc/codes" - rpb "google.golang.org/grpc/reflection/grpc_reflection_v1" + rpb "google.golang.org/grpc/reflection/grpc_reflection_v1alpha" "google.golang.org/grpc/status" ) @@ -387,60 +387,60 @@ func (s *serverReflectionServer) ServerReflectionInfo(stream rpb.ServerReflectio return err } - out := &rpb.ServerReflectionResponse{ - ValidHost: in.Host, + out := &rpb.ServerReflectionResponse{ //nolint:staticcheck // SA1019: we want to keep using v1alpha + ValidHost: in.Host, //nolint:staticcheck // SA1019: we want to keep using v1alpha OriginalRequest: in, } switch req := in.MessageRequest.(type) { case *rpb.ServerReflectionRequest_FileByFilename: - b, err := s.fileDescEncodingByFilename(req.FileByFilename, sentFileDescriptors) + b, err := s.fileDescEncodingByFilename(req.FileByFilename, sentFileDescriptors) //nolint:staticcheck // SA1019: we want to keep using v1alpha if err != nil { out.MessageResponse = &rpb.ServerReflectionResponse_ErrorResponse{ - ErrorResponse: &rpb.ErrorResponse{ + ErrorResponse: &rpb.ErrorResponse{ //nolint:staticcheck // SA1019: we want to keep using v1alpha ErrorCode: int32(codes.NotFound), ErrorMessage: err.Error(), }, } } else { out.MessageResponse = &rpb.ServerReflectionResponse_FileDescriptorResponse{ - FileDescriptorResponse: &rpb.FileDescriptorResponse{FileDescriptorProto: b}, + FileDescriptorResponse: &rpb.FileDescriptorResponse{FileDescriptorProto: b}, //nolint:staticcheck // SA1019: we want to keep using v1alpha } } case *rpb.ServerReflectionRequest_FileContainingSymbol: - b, err := s.fileDescEncodingContainingSymbol(req.FileContainingSymbol, sentFileDescriptors) + b, err := s.fileDescEncodingContainingSymbol(req.FileContainingSymbol, sentFileDescriptors) //nolint:staticcheck // SA1019: we want to keep using v1alpha if err != nil { out.MessageResponse = &rpb.ServerReflectionResponse_ErrorResponse{ - ErrorResponse: &rpb.ErrorResponse{ + ErrorResponse: &rpb.ErrorResponse{ //nolint:staticcheck // SA1019: we want to keep using v1alpha ErrorCode: int32(codes.NotFound), ErrorMessage: err.Error(), }, } } else { out.MessageResponse = &rpb.ServerReflectionResponse_FileDescriptorResponse{ - FileDescriptorResponse: &rpb.FileDescriptorResponse{FileDescriptorProto: b}, + FileDescriptorResponse: &rpb.FileDescriptorResponse{FileDescriptorProto: b}, //nolint:staticcheck // SA1019: we want to keep using v1alpha } } case *rpb.ServerReflectionRequest_FileContainingExtension: - typeName := req.FileContainingExtension.ContainingType - extNum := req.FileContainingExtension.ExtensionNumber + typeName := req.FileContainingExtension.ContainingType //nolint:staticcheck // SA1019: we want to keep using v1alpha + extNum := req.FileContainingExtension.ExtensionNumber //nolint:staticcheck // SA1019: we want to keep using v1alpha b, err := s.fileDescEncodingContainingExtension(typeName, extNum, sentFileDescriptors) if err != nil { out.MessageResponse = &rpb.ServerReflectionResponse_ErrorResponse{ - ErrorResponse: &rpb.ErrorResponse{ + ErrorResponse: &rpb.ErrorResponse{ //nolint:staticcheck // SA1019: we want to keep using v1alpha ErrorCode: int32(codes.NotFound), ErrorMessage: err.Error(), }, } } else { out.MessageResponse = &rpb.ServerReflectionResponse_FileDescriptorResponse{ - FileDescriptorResponse: &rpb.FileDescriptorResponse{FileDescriptorProto: b}, + FileDescriptorResponse: &rpb.FileDescriptorResponse{FileDescriptorProto: b}, //nolint:staticcheck // SA1019: we want to keep using v1alpha } } case *rpb.ServerReflectionRequest_AllExtensionNumbersOfType: - extNums, err := s.allExtensionNumbersForTypeName(req.AllExtensionNumbersOfType) + extNums, err := s.allExtensionNumbersForTypeName(req.AllExtensionNumbersOfType) //nolint:staticcheck // SA1019: we want to keep using v1alpha if err != nil { out.MessageResponse = &rpb.ServerReflectionResponse_ErrorResponse{ - ErrorResponse: &rpb.ErrorResponse{ + ErrorResponse: &rpb.ErrorResponse{ //nolint:staticcheck // SA1019: we want to keep using v1alpha ErrorCode: int32(codes.NotFound), ErrorMessage: err.Error(), }, @@ -448,22 +448,22 @@ func (s *serverReflectionServer) ServerReflectionInfo(stream rpb.ServerReflectio log.Printf("OH NO: %s", err) } else { out.MessageResponse = &rpb.ServerReflectionResponse_AllExtensionNumbersResponse{ - AllExtensionNumbersResponse: &rpb.ExtensionNumberResponse{ - BaseTypeName: req.AllExtensionNumbersOfType, + AllExtensionNumbersResponse: &rpb.ExtensionNumberResponse{ //nolint:staticcheck // SA1019: we want to keep using v1alpha + BaseTypeName: req.AllExtensionNumbersOfType, //nolint:staticcheck // SA1019: we want to keep using v1alpha ExtensionNumber: extNums, }, } } case *rpb.ServerReflectionRequest_ListServices: svcNames, _ := s.getSymbols() - serviceResponses := make([]*rpb.ServiceResponse, len(svcNames)) + serviceResponses := make([]*rpb.ServiceResponse, len(svcNames)) //nolint:staticcheck // SA1019: we want to keep using v1alpha for i, n := range svcNames { - serviceResponses[i] = &rpb.ServiceResponse{ + serviceResponses[i] = &rpb.ServiceResponse{ //nolint:staticcheck // SA1019: we want to keep using v1alpha Name: n, } } out.MessageResponse = &rpb.ServerReflectionResponse_ListServicesResponse{ - ListServicesResponse: &rpb.ListServiceResponse{ + ListServicesResponse: &rpb.ListServiceResponse{ //nolint:staticcheck // SA1019: we want to keep using v1alpha Service: serviceResponses, }, } diff --git a/server/grpc/server_test.go b/server/grpc/server_test.go index 8cc51e0a5be8..6c45094b24f0 100644 --- a/server/grpc/server_test.go +++ b/server/grpc/server_test.go @@ -6,10 +6,9 @@ import ( "testing" "time" + "github.com/jhump/protoreflect/grpcreflect" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - - "github.com/jhump/protoreflect/grpcreflect" "google.golang.org/grpc" "google.golang.org/grpc/metadata" @@ -52,7 +51,7 @@ func (s *IntegrationTestSuite) SetupSuite() { s.Require().NoError(err) val0 := s.network.Validators[0] - s.conn, err = grpc.Dial( + s.conn, err = grpc.Dial( //nolint:staticcheck // ignore this line for this linter val0.AppConfig.GRPC.Address, grpc.WithInsecure(), //nolint:staticcheck // ignore SA1019, we don't need to use a secure connection for tests grpc.WithDefaultCallOptions(grpc.ForceCodec(codec.NewProtoCodec(s.cfg.InterfaceRegistry).GRPCCodec())), diff --git a/server/log/cmt_logger.go b/server/log/cmt_logger.go index 9780c11ee5e8..9cc9380372e6 100644 --- a/server/log/cmt_logger.go +++ b/server/log/cmt_logger.go @@ -1,8 +1,9 @@ package server import ( - "cosmossdk.io/log" cmtlog "github.com/cometbft/cometbft/libs/log" + + "cosmossdk.io/log" ) var _ cmtlog.Logger = (*CometLoggerWrapper)(nil) diff --git a/server/mock/app.go b/server/mock/app.go index d5ebd12f0cf1..3b4205166008 100644 --- a/server/mock/app.go +++ b/server/mock/app.go @@ -10,10 +10,14 @@ import ( abci "github.com/cometbft/cometbft/abci/types" db "github.com/cosmos/cosmos-db" "google.golang.org/grpc" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protodesc" + "google.golang.org/protobuf/reflect/protoregistry" + "google.golang.org/protobuf/types/descriptorpb" "cosmossdk.io/log" - storetypes "cosmossdk.io/store/types" + bam "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/testutil" @@ -45,7 +49,7 @@ func NewApp(rootDir string, logger log.Logger) (servertypes.ABCI, error) { router.SetInterfaceRegistry(interfaceRegistry) newDesc := &grpc.ServiceDesc{ - ServiceName: "test", + ServiceName: "Test", Methods: []grpc.MethodDesc{ { MethodName: "Test", @@ -66,7 +70,7 @@ func NewApp(rootDir string, logger log.Logger) (servertypes.ABCI, error) { // KVStoreHandler is a simple handler that takes KVStoreTx and writes // them to the db. -func KVStoreHandler(storeKey storetypes.StoreKey) sdk.Handler { +func KVStoreHandler(storeKey storetypes.StoreKey) bam.MsgServiceHandler { return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { dTx, ok := msg.(*KVStoreTx) if !ok { @@ -170,3 +174,47 @@ func MsgTestHandler(srv interface{}, ctx context.Context, dec func(interface{}) func (m MsgServerImpl) Test(ctx context.Context, msg *KVStoreTx) (*sdk.Result, error) { return KVStoreHandler(m.capKeyMainStore)(sdk.UnwrapSDKContext(ctx), msg) } + +func init() { + err := registerFauxDescriptor() + if err != nil { + panic(err) + } +} + +func registerFauxDescriptor() error { + fauxDescriptor, err := protodesc.NewFile(&descriptorpb.FileDescriptorProto{ + Name: proto.String("faux_proto/test.proto"), + Dependency: nil, + PublicDependency: nil, + WeakDependency: nil, + MessageType: []*descriptorpb.DescriptorProto{ + { + Name: proto.String("KVStoreTx"), + }, + }, + EnumType: nil, + Service: []*descriptorpb.ServiceDescriptorProto{ + { + Name: proto.String("Test"), + Method: []*descriptorpb.MethodDescriptorProto{ + { + Name: proto.String("Test"), + InputType: proto.String("KVStoreTx"), + OutputType: proto.String("KVStoreTx"), + }, + }, + }, + }, + Extension: nil, + Options: nil, + SourceCodeInfo: nil, + Syntax: nil, + Edition: nil, + }, nil) + if err != nil { + return err + } + + return protoregistry.GlobalFiles.RegisterFile(fauxDescriptor) +} diff --git a/server/mock/app_test.go b/server/mock/app_test.go index f204c5f5f26c..bb5bd906cc2e 100644 --- a/server/mock/app_test.go +++ b/server/mock/app_test.go @@ -6,10 +6,11 @@ import ( "testing" "time" - "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" "github.com/stretchr/testify/require" + "cosmossdk.io/log" + servertypes "github.com/cosmos/cosmos-sdk/server/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" diff --git a/server/mock/store.go b/server/mock/store.go index 2094e2905d0a..6e8a30364614 100644 --- a/server/mock/store.go +++ b/server/mock/store.go @@ -142,10 +142,6 @@ func (ms multiStore) SetIAVLDisableFastNode(disable bool) { panic("not implemented") } -func (ms multiStore) SetLazyLoading(bool) { - panic("not implemented") -} - func (ms multiStore) SetInitialVersion(version int64) error { panic("not implemented") } diff --git a/server/mock/tx.go b/server/mock/tx.go index 941c002e0036..f8bdef446a9a 100644 --- a/server/mock/tx.go +++ b/server/mock/tx.go @@ -4,17 +4,16 @@ import ( "bytes" "fmt" - bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" protov2 "google.golang.org/protobuf/proto" - "github.com/cosmos/cosmos-sdk/x/auth/signing" - + bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" errorsmod "cosmossdk.io/errors" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" txsigning "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/signing" ) // An sdk.Tx which is its own sdk.Msg. diff --git a/server/module_hash.go b/server/module_hash.go new file mode 100644 index 000000000000..d959b4261c8d --- /dev/null +++ b/server/module_hash.go @@ -0,0 +1,101 @@ +package server + +import ( + "encoding/hex" + "fmt" + "sort" + "strconv" + "strings" + + "github.com/spf13/cobra" + + "cosmossdk.io/store/rootmulti" + storetypes "cosmossdk.io/store/types" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/server/types" + "github.com/cosmos/cosmos-sdk/version" +) + +// ModuleHashByHeightQuery retrieves the module hashes at a given height. +func ModuleHashByHeightQuery(appCreator types.AppCreator) *cobra.Command { + cmd := &cobra.Command{ + Use: "module-hash-by-height [height]", + Short: "Get module hashes at a given height", + Long: "Get module hashes at a given height. This command is useful for debugging and verifying the state of the application at a given height. Daemon should not be running when calling this command.", + Example: fmt.Sprintf("%s module-hash-by-height 16841115", version.AppName), + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + heightToRetrieveString := args[0] + + serverCtx := GetServerContextFromCmd(cmd) + + height, err := strconv.ParseInt(heightToRetrieveString, 10, 64) + if err != nil { + return fmt.Errorf("invalid height: %w", err) + } + + commitInfoForHeight, err := getModuleHashesAtHeight(serverCtx, appCreator, height) + if err != nil { + return err + } + + clientCtx := client.GetClientContextFromCmd(cmd) + return clientCtx.PrintProto(commitInfoForHeight) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +func getModuleHashesAtHeight(svrCtx *Context, appCreator types.AppCreator, height int64) (*storetypes.CommitInfo, error) { + home := svrCtx.Config.RootDir + db, err := openDB(home, GetAppDBBackend(svrCtx.Viper)) + if err != nil { + return nil, fmt.Errorf("error opening DB, make sure daemon is not running when calling this query: %w", err) + } + app := appCreator(svrCtx.Logger, db, nil, svrCtx.Viper) + rms, ok := app.CommitMultiStore().(*rootmulti.Store) + if !ok { + return nil, fmt.Errorf("expected rootmulti.Store, got %T", app.CommitMultiStore()) + } + + commitInfoForHeight, err := rms.GetCommitInfo(height) + if err != nil { + return nil, err + } + + // Create a new slice of StoreInfos for storing the modified hashes. + storeInfos := make([]storetypes.StoreInfo, len(commitInfoForHeight.StoreInfos)) + + for i, storeInfo := range commitInfoForHeight.StoreInfos { + // Convert the hash to a hexadecimal string. + hash := strings.ToUpper(hex.EncodeToString(storeInfo.CommitId.Hash)) + + // Create a new StoreInfo with the modified hash. + storeInfos[i] = storetypes.StoreInfo{ + Name: storeInfo.Name, + CommitId: storetypes.CommitID{ + Version: storeInfo.CommitId.Version, + Hash: []byte(hash), + }, + } + } + + // Sort the storeInfos slice based on the module name. + sort.Slice(storeInfos, func(i, j int) bool { + return storeInfos[i].Name < storeInfos[j].Name + }) + + // Create a new CommitInfo with the modified StoreInfos. + commitInfoForHeight = &storetypes.CommitInfo{ + Version: commitInfoForHeight.Version, + StoreInfos: storeInfos, + Timestamp: commitInfoForHeight.Timestamp, + } + + return commitInfoForHeight, nil +} diff --git a/server/start.go b/server/start.go index c589045e62ff..dbc575464669 100644 --- a/server/start.go +++ b/server/start.go @@ -1,32 +1,42 @@ package server import ( + "bufio" "context" - "errors" "fmt" "io" "net" "os" + "path/filepath" "runtime/pprof" + "strings" + "time" - pruningtypes "cosmossdk.io/store/pruning/types" - "github.com/armon/go-metrics" "github.com/cometbft/cometbft/abci/server" cmtcmd "github.com/cometbft/cometbft/cmd/cometbft/commands" cmtcfg "github.com/cometbft/cometbft/config" + cmtjson "github.com/cometbft/cometbft/libs/json" "github.com/cometbft/cometbft/node" "github.com/cometbft/cometbft/p2p" pvm "github.com/cometbft/cometbft/privval" + cmtstate "github.com/cometbft/cometbft/proto/tendermint/state" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cometbft/cometbft/proxy" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/cometbft/cometbft/rpc/client/local" + sm "github.com/cometbft/cometbft/state" + "github.com/cometbft/cometbft/store" cmttypes "github.com/cometbft/cometbft/types" dbm "github.com/cosmos/cosmos-db" + "github.com/hashicorp/go-metrics" "github.com/spf13/cobra" "github.com/spf13/pflag" "golang.org/x/sync/errgroup" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" + pruningtypes "cosmossdk.io/store/pruning/types" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec" @@ -49,6 +59,7 @@ const ( flagTraceStore = "trace-store" flagCPUProfile = "cpu-profile" FlagMinGasPrices = "minimum-gas-prices" + FlagQueryGasLimit = "query-gas-limit" FlagHaltHeight = "halt-height" FlagHaltTime = "halt-time" FlagInterBlockCache = "inter-block-cache" @@ -63,6 +74,7 @@ const ( FlagMinRetainBlocks = "min-retain-blocks" FlagIAVLCacheSize = "iavl-cache-size" FlagDisableIAVLFastNode = "iavl-disable-fastnode" + FlagShutdownGrace = "shutdown-grace" // state sync-related flags FlagStateSyncSnapshotInterval = "state-sync.snapshot-interval" @@ -86,6 +98,14 @@ const ( // mempool flags FlagMempoolMaxTxs = "mempool.max-txs" + + // testnet keys + KeyIsTestnet = "is-testnet" + KeyNewChainID = "new-chain-ID" + KeyNewOpAddr = "new-operator-addr" + KeyNewValAddr = "new-validator-addr" + KeyUserPubKey = "user-pub-key" + KeyTriggerTestnetUpgrade = "trigger-testnet-upgrade" ) // StartCmdOptions defines options that can be customized in `StartCmdWithOptions`, @@ -96,8 +116,12 @@ type StartCmdOptions struct { // PostSetup can be used to setup extra services under the same cancellable context, // it's not called in stand-alone mode, only for in-process mode. PostSetup func(svrCtx *Context, clientCtx client.Context, ctx context.Context, g *errgroup.Group) error + // PostSetupStandalone can be used to setup extra services under the same cancellable context, + PostSetupStandalone func(svrCtx *Context, clientCtx client.Context, ctx context.Context, g *errgroup.Group) error // AddFlags add custom flags to start cmd AddFlags func(cmd *cobra.Command) + // StartCommandHanlder can be used to customize the start command handler + StartCommandHandler func(svrCtx *Context, clientCtx client.Context, appCreator types.AppCreator, inProcessConsensus bool, opts StartCmdOptions) error } // StartCmd runs the service passed in, either stand-alone or in-process with @@ -113,6 +137,10 @@ func StartCmdWithOptions(appCreator types.AppCreator, defaultNodeHome string, op opts.DBOpener = openDB } + if opts.StartCommandHandler == nil { + opts.StartCommandHandler = start + } + cmd := &cobra.Command{ Use: "start", Short: "Run the full node", @@ -167,61 +195,24 @@ is performed. Note, when enabled, gRPC will also be automatically enabled. serverCtx.Logger.Info("starting ABCI without CometBFT") } - return wrapCPUProfile(serverCtx, func() error { - return start(serverCtx, clientCtx, appCreator, withCMT, opts) + err = wrapCPUProfile(serverCtx, func() error { + return opts.StartCommandHandler(serverCtx, clientCtx, appCreator, withCMT, opts) }) + + serverCtx.Logger.Debug("received quit signal") + graceDuration, _ := cmd.Flags().GetDuration(FlagShutdownGrace) + if graceDuration > 0 { + serverCtx.Logger.Info("graceful shutdown start", FlagShutdownGrace, graceDuration) + <-time.After(graceDuration) + serverCtx.Logger.Info("graceful shutdown complete") + } + + return err }, } cmd.Flags().String(flags.FlagHome, defaultNodeHome, "The application home directory") - cmd.Flags().Bool(flagWithComet, true, "Run abci app embedded in-process with CometBFT") - cmd.Flags().String(flagAddress, "tcp://0.0.0.0:26658", "Listen address") - cmd.Flags().String(flagTransport, "socket", "Transport protocol: socket, grpc") - cmd.Flags().String(flagTraceStore, "", "Enable KVStore tracing to an output file") - cmd.Flags().String(FlagMinGasPrices, "", "Minimum gas prices to accept for transactions; Any fee in a tx must meet this minimum (e.g. 0.01photino;0.0001stake)") - cmd.Flags().IntSlice(FlagUnsafeSkipUpgrades, []int{}, "Skip a set of upgrade heights to continue the old binary") - cmd.Flags().Uint64(FlagHaltHeight, 0, "Block height at which to gracefully halt the chain and shutdown the node") - cmd.Flags().Uint64(FlagHaltTime, 0, "Minimum block time (in Unix seconds) at which to gracefully halt the chain and shutdown the node") - cmd.Flags().Bool(FlagInterBlockCache, true, "Enable inter-block caching") - cmd.Flags().String(flagCPUProfile, "", "Enable CPU profiling and write to the provided file") - cmd.Flags().Bool(FlagTrace, false, "Provide full stack traces for errors in ABCI Log") - cmd.Flags().String(FlagPruning, pruningtypes.PruningOptionDefault, "Pruning strategy (default|nothing|everything|custom)") - cmd.Flags().Uint64(FlagPruningKeepRecent, 0, "Number of recent heights to keep on disk (ignored if pruning is not 'custom')") - cmd.Flags().Uint64(FlagPruningInterval, 0, "Height interval at which pruned heights are removed from disk (ignored if pruning is not 'custom')") - cmd.Flags().Uint(FlagInvCheckPeriod, 0, "Assert registered invariants every N blocks") - cmd.Flags().Uint64(FlagMinRetainBlocks, 0, "Minimum block height offset during ABCI commit to prune CometBFT blocks") - cmd.Flags().Bool(FlagAPIEnable, false, "Define if the API server should be enabled") - cmd.Flags().Bool(FlagAPISwagger, false, "Define if swagger documentation should automatically be registered (Note: the API must also be enabled)") - cmd.Flags().String(FlagAPIAddress, serverconfig.DefaultAPIAddress, "the API server address to listen on") - cmd.Flags().Uint(FlagAPIMaxOpenConnections, 1000, "Define the number of maximum open connections") - cmd.Flags().Uint(FlagRPCReadTimeout, 10, "Define the CometBFT RPC read timeout (in seconds)") - cmd.Flags().Uint(FlagRPCWriteTimeout, 0, "Define the CometBFT RPC write timeout (in seconds)") - cmd.Flags().Uint(FlagRPCMaxBodyBytes, 1000000, "Define the CometBFT maximum request body (in bytes)") - cmd.Flags().Bool(FlagAPIEnableUnsafeCORS, false, "Define if CORS should be enabled (unsafe - use it at your own risk)") - cmd.Flags().Bool(flagGRPCOnly, false, "Start the node in gRPC query only mode (no CometBFT process is started)") - cmd.Flags().Bool(flagGRPCEnable, true, "Define if the gRPC server should be enabled") - cmd.Flags().String(flagGRPCAddress, serverconfig.DefaultGRPCAddress, "the gRPC server address to listen on") - cmd.Flags().Bool(flagGRPCWebEnable, true, "Define if the gRPC-Web server should be enabled. (Note: gRPC must also be enabled)") - cmd.Flags().Uint64(FlagStateSyncSnapshotInterval, 0, "State sync snapshot interval") - cmd.Flags().Uint32(FlagStateSyncSnapshotKeepRecent, 2, "State sync snapshot to keep") - cmd.Flags().Bool(FlagDisableIAVLFastNode, false, "Disable fast node for IAVL tree") - cmd.Flags().Int(FlagMempoolMaxTxs, mempool.DefaultMaxTx, "Sets MaxTx value for the app-side mempool") - - // support old flags name for backwards compatibility - cmd.Flags().SetNormalizeFunc(func(f *pflag.FlagSet, name string) pflag.NormalizedName { - if name == "with-tendermint" { - name = flagWithComet - } - - return pflag.NormalizedName(name) - }) - - // add support for all CometBFT-specific command line options - cmtcmd.AddNodeFlags(cmd) - - if opts.AddFlags != nil { - opts.AddFlags(cmd) - } + addStartNodeFlags(cmd, opts) return cmd } @@ -245,12 +236,12 @@ func start(svrCtx *Context, clientCtx client.Context, appCreator types.AppCreato emitServerInfoMetrics() if !withCmt { - return startStandAlone(svrCtx, app, opts) + return startStandAlone(svrCtx, svrCfg, clientCtx, app, metrics, opts) } return startInProcess(svrCtx, svrCfg, clientCtx, app, metrics, opts) } -func startStandAlone(svrCtx *Context, app types.Application, opts StartCmdOptions) error { +func startStandAlone(svrCtx *Context, svrCfg serverconfig.Config, clientCtx client.Context, app types.Application, metrics *telemetry.Metrics, opts StartCmdOptions) error { addr := svrCtx.Viper.GetString(flagAddress) transport := svrCtx.Viper.GetString(flagTransport) @@ -264,6 +255,42 @@ func startStandAlone(svrCtx *Context, app types.Application, opts StartCmdOption g, ctx := getCtx(svrCtx, false) + // Add the tx service to the gRPC router. We only need to register this + // service if API or gRPC is enabled, and avoid doing so in the general + // case, because it spawns a new local CometBFT RPC client. + if svrCfg.API.Enable || svrCfg.GRPC.Enable { + // create tendermint client + // assumes the rpc listen address is where tendermint has its rpc server + rpcclient, err := rpchttp.New(svrCtx.Config.RPC.ListenAddress, "/websocket") + if err != nil { + return err + } + // re-assign for making the client available below + // do not use := to avoid shadowing clientCtx + clientCtx = clientCtx.WithClient(rpcclient) + + // use the provided clientCtx to register the services + app.RegisterTxService(clientCtx) + app.RegisterTendermintService(clientCtx) + app.RegisterNodeService(clientCtx, svrCfg) + } + + grpcSrv, clientCtx, err := startGrpcServer(ctx, g, svrCfg.GRPC, clientCtx, svrCtx, app) + if err != nil { + return err + } + + err = startAPIServer(ctx, g, svrCfg, clientCtx, svrCtx, app, svrCtx.Config.RootDir, grpcSrv, metrics) + if err != nil { + return err + } + + if opts.PostSetupStandalone != nil { + if err := opts.PostSetupStandalone(svrCtx, clientCtx, ctx, g); err != nil { + return err + } + } + g.Go(func() error { if err := svr.Start(); err != nil { svrCtx.Logger.Error("failed to start out-of-process ABCI server", "err", err) @@ -274,7 +301,7 @@ func startStandAlone(svrCtx *Context, app types.Application, opts StartCmdOption // so we can gracefully stop the ABCI server. <-ctx.Done() svrCtx.Logger.Info("stopping the ABCI server...") - return errors.Join(svr.Stop(), app.Close()) + return svr.Stop() }) return g.Wait() @@ -284,17 +311,17 @@ func startInProcess(svrCtx *Context, svrCfg serverconfig.Config, clientCtx clien metrics *telemetry.Metrics, opts StartCmdOptions, ) error { cmtCfg := svrCtx.Config - home := cmtCfg.RootDir - gRPCOnly := svrCtx.Viper.GetBool(flagGRPCOnly) + g, ctx := getCtx(svrCtx, true) + if gRPCOnly { // TODO: Generalize logic so that gRPC only is really in startStandAlone svrCtx.Logger.Info("starting node in gRPC only mode; CometBFT is disabled") svrCfg.GRPC.Enable = true } else { svrCtx.Logger.Info("starting node with ABCI CometBFT in-process") - tmNode, cleanupFn, err := startCmtNode(cmtCfg, app, svrCtx) + tmNode, cleanupFn, err := startCmtNode(ctx, cmtCfg, app, svrCtx) if err != nil { return err } @@ -314,14 +341,12 @@ func startInProcess(svrCtx *Context, svrCfg serverconfig.Config, clientCtx clien } } - g, ctx := getCtx(svrCtx, true) - grpcSrv, clientCtx, err := startGrpcServer(ctx, g, svrCfg.GRPC, clientCtx, svrCtx, app) if err != nil { return err } - err = startAPIServer(ctx, g, cmtCfg, svrCfg, clientCtx, svrCtx, app, home, grpcSrv, metrics) + err = startAPIServer(ctx, g, svrCfg, clientCtx, svrCtx, app, cmtCfg.RootDir, grpcSrv, metrics) if err != nil { return err } @@ -339,6 +364,7 @@ func startInProcess(svrCtx *Context, svrCfg serverconfig.Config, clientCtx clien // TODO: Move nodeKey into being created within the function. func startCmtNode( + ctx context.Context, cfg *cmtcfg.Config, app types.Application, svrCtx *Context, @@ -349,7 +375,8 @@ func startCmtNode( } cmtApp := NewCometABCIWrapper(app) - tmNode, err = node.NewNode( + tmNode, err = node.NewNodeWithContext( + ctx, cfg, pvm.LoadOrGenFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile()), nodeKey, @@ -370,7 +397,6 @@ func startCmtNode( cleanupFn = func() { if tmNode != nil && tmNode.IsRunning() { _ = tmNode.Stop() - _ = app.Close() } } @@ -435,7 +461,7 @@ func startGrpcServer( // return grpcServer as nil if gRPC is disabled return nil, clientCtx, nil } - _, port, err := net.SplitHostPort(config.Address) + _, _, err := net.SplitHostPort(config.Address) if err != nil { return nil, clientCtx, err } @@ -450,11 +476,9 @@ func startGrpcServer( maxRecvMsgSize = serverconfig.DefaultGRPCMaxRecvMsgSize } - grpcAddress := fmt.Sprintf("127.0.0.1:%s", port) - // if gRPC is enabled, configure gRPC client for gRPC gateway - grpcClient, err := grpc.Dial( - grpcAddress, + grpcClient, err := grpc.Dial( //nolint: staticcheck // ignore this line for this linter + config.Address, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithDefaultCallOptions( grpc.ForceCodec(codec.NewProtoCodec(clientCtx.InterfaceRegistry).GRPCCodec()), @@ -467,7 +491,7 @@ func startGrpcServer( } clientCtx = clientCtx.WithGRPCClient(grpcClient) - svrCtx.Logger.Debug("gRPC client assigned to client context", "target", grpcAddress) + svrCtx.Logger.Debug("gRPC client assigned to client context", "target", config.Address) grpcSrv, err := servergrpc.NewGRPCServer(clientCtx, app, config) if err != nil { @@ -485,7 +509,6 @@ func startGrpcServer( func startAPIServer( ctx context.Context, g *errgroup.Group, - cmtCfg *cmtcfg.Config, svrCfg serverconfig.Config, clientCtx client.Context, svrCtx *Context, @@ -514,10 +537,6 @@ func startAPIServer( } func startTelemetry(cfg serverconfig.Config) (*telemetry.Metrics, error) { - if !cfg.Telemetry.Enabled { - return nil, nil - } - return telemetry.New(cfg.Telemetry) } @@ -549,12 +568,7 @@ func wrapCPUProfile(svrCtx *Context, callbackFn func() error) error { }() } - errCh := make(chan error) - go func() { - errCh <- callbackFn() - }() - - return <-errCh + return callbackFn() } // emitServerInfoMetrics emits server info related metrics using application telemetry. @@ -596,7 +610,15 @@ func startApp(svrCtx *Context, appCreator types.AppCreator, opts StartCmdOptions return app, traceCleanupFn, err } - app = appCreator(svrCtx.Logger, db, traceWriter, svrCtx.Viper) + if isTestnet, ok := svrCtx.Viper.Get(KeyIsTestnet).(bool); ok && isTestnet { + app, err = testnetify(svrCtx, appCreator, db, traceWriter) + if err != nil { + return app, traceCleanupFn, err + } + } else { + app = appCreator(svrCtx.Logger, db, traceWriter, svrCtx.Viper) + } + cleanupFn = func() { traceCleanupFn() if localErr := app.Close(); localErr != nil { @@ -605,3 +627,390 @@ func startApp(svrCtx *Context, appCreator types.AppCreator, opts StartCmdOptions } return app, cleanupFn, nil } + +// InPlaceTestnetCreator utilizes the provided chainID and operatorAddress as well as the local private validator key to +// control the network represented in the data folder. This is useful to create testnets nearly identical to your +// mainnet environment. +func InPlaceTestnetCreator(testnetAppCreator types.AppCreator) *cobra.Command { + opts := StartCmdOptions{} + if opts.DBOpener == nil { + opts.DBOpener = openDB + } + + if opts.StartCommandHandler == nil { + opts.StartCommandHandler = start + } + + cmd := &cobra.Command{ + Use: "in-place-testnet [newChainID] [newOperatorAddress]", + Short: "Create and start a testnet from current local state", + Long: `Create and start a testnet from current local state. +After utilizing this command the network will start. If the network is stopped, +the normal "start" command should be used. Re-using this command on state that +has already been modified by this command could result in unexpected behavior. + +Additionally, the first block may take up to one minute to be committed, depending +on how old the block is. For instance, if a snapshot was taken weeks ago and we want +to turn this into a testnet, it is possible lots of pending state needs to be committed +(expiring locks, etc.). It is recommended that you should wait for this block to be committed +before stopping the daemon. + +If the --trigger-testnet-upgrade flag is set, the upgrade handler specified by the flag will be run +on the first block of the testnet. + +Regardless of whether the flag is set or not, if any new stores are introduced in the daemon being run, +those stores will be registered in order to prevent panics. Therefore, you only need to set the flag if +you want to test the upgrade handler itself. +`, + Example: "in-place-testnet localosmosis osmo12smx2wdlyttvyzvzg54y2vnqwq2qjateuf7thj", + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) error { + serverCtx := GetServerContextFromCmd(cmd) + _, err := GetPruningOptionsFromFlags(serverCtx.Viper) + if err != nil { + return err + } + + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + withCMT, _ := cmd.Flags().GetBool(flagWithComet) + if !withCMT { + serverCtx.Logger.Info("starting ABCI without CometBFT") + } + + newChainID := args[0] + newOperatorAddress := args[1] + + skipConfirmation, _ := cmd.Flags().GetBool("skip-confirmation") + + if !skipConfirmation { + // Confirmation prompt to prevent accidental modification of state. + reader := bufio.NewReader(os.Stdin) + fmt.Println("This operation will modify state in your data folder and cannot be undone. Do you want to continue? (y/n)") + text, _ := reader.ReadString('\n') + response := strings.TrimSpace(strings.ToLower(text)) + if response != "y" && response != "yes" { + fmt.Println("Operation canceled.") + return nil + } + } + + // Set testnet keys to be used by the application. + // This is done to prevent changes to existing start API. + serverCtx.Viper.Set(KeyIsTestnet, true) + serverCtx.Viper.Set(KeyNewChainID, newChainID) + serverCtx.Viper.Set(KeyNewOpAddr, newOperatorAddress) + + err = wrapCPUProfile(serverCtx, func() error { + return opts.StartCommandHandler(serverCtx, clientCtx, testnetAppCreator, withCMT, opts) + }) + + serverCtx.Logger.Debug("received quit signal") + graceDuration, _ := cmd.Flags().GetDuration(FlagShutdownGrace) + if graceDuration > 0 { + serverCtx.Logger.Info("graceful shutdown start", FlagShutdownGrace, graceDuration) + <-time.After(graceDuration) + serverCtx.Logger.Info("graceful shutdown complete") + } + + return err + }, + } + + addStartNodeFlags(cmd, opts) + cmd.Flags().String(KeyTriggerTestnetUpgrade, "", "If set (example: \"v21\"), triggers the v21 upgrade handler to run on the first block of the testnet") + cmd.Flags().Bool("skip-confirmation", false, "Skip the confirmation prompt") + return cmd +} + +// testnetify modifies both state and blockStore, allowing the provided operator address and local validator key to control the network +// that the state in the data folder represents. The chainID of the local genesis file is modified to match the provided chainID. +func testnetify(ctx *Context, testnetAppCreator types.AppCreator, db dbm.DB, traceWriter io.WriteCloser) (types.Application, error) { + config := ctx.Config + + newChainID, ok := ctx.Viper.Get(KeyNewChainID).(string) + if !ok { + return nil, fmt.Errorf("expected string for key %s", KeyNewChainID) + } + + // Modify app genesis chain ID and save to genesis file. + genFilePath := config.GenesisFile() + appGen, err := genutiltypes.AppGenesisFromFile(genFilePath) + if err != nil { + return nil, err + } + appGen.ChainID = newChainID + if err := appGen.ValidateAndComplete(); err != nil { + return nil, err + } + if err := appGen.SaveAs(genFilePath); err != nil { + return nil, err + } + + // Regenerate addrbook.json to prevent peers on old network from causing error logs. + addrBookPath := filepath.Join(config.RootDir, "config", "addrbook.json") + if err := os.Remove(addrBookPath); err != nil && !os.IsNotExist(err) { + return nil, fmt.Errorf("failed to remove existing addrbook.json: %w", err) + } + + emptyAddrBook := []byte("{}") + if err := os.WriteFile(addrBookPath, emptyAddrBook, 0o600); err != nil { + return nil, fmt.Errorf("failed to create empty addrbook.json: %w", err) + } + + // Load the comet genesis doc provider. + genDocProvider := node.DefaultGenesisDocProviderFunc(config) + + // Initialize blockStore and stateDB. + blockStoreDB, err := cmtcfg.DefaultDBProvider(&cmtcfg.DBContext{ID: "blockstore", Config: config}) + if err != nil { + return nil, err + } + blockStore := store.NewBlockStore(blockStoreDB) + + stateDB, err := cmtcfg.DefaultDBProvider(&cmtcfg.DBContext{ID: "state", Config: config}) + if err != nil { + return nil, err + } + + defer blockStore.Close() + defer stateDB.Close() + + privValidator := pvm.LoadOrGenFilePV(config.PrivValidatorKeyFile(), config.PrivValidatorStateFile()) + userPubKey, err := privValidator.GetPubKey() + if err != nil { + return nil, err + } + validatorAddress := userPubKey.Address() + + stateStore := sm.NewStore(stateDB, sm.StoreOptions{ + DiscardABCIResponses: config.Storage.DiscardABCIResponses, + }) + + state, genDoc, err := node.LoadStateFromDBOrGenesisDocProvider(stateDB, genDocProvider) + if err != nil { + return nil, err + } + + ctx.Viper.Set(KeyNewValAddr, validatorAddress) + ctx.Viper.Set(KeyUserPubKey, userPubKey) + testnetApp := testnetAppCreator(ctx.Logger, db, traceWriter, ctx.Viper) + + // We need to create a temporary proxyApp to get the initial state of the application. + // Depending on how the node was stopped, the application height can differ from the blockStore height. + // This height difference changes how we go about modifying the state. + cmtApp := NewCometABCIWrapper(testnetApp) + _, context := getCtx(ctx, true) + clientCreator := proxy.NewLocalClientCreator(cmtApp) + metrics := node.DefaultMetricsProvider(cmtcfg.DefaultConfig().Instrumentation) + _, _, _, _, proxyMetrics, _, _ := metrics(genDoc.ChainID) + proxyApp := proxy.NewAppConns(clientCreator, proxyMetrics) + if err := proxyApp.Start(); err != nil { + return nil, fmt.Errorf("error starting proxy app connections: %v", err) + } + res, err := proxyApp.Query().Info(context, proxy.RequestInfo) + if err != nil { + return nil, fmt.Errorf("error calling Info: %v", err) + } + err = proxyApp.Stop() + if err != nil { + return nil, err + } + appHash := res.LastBlockAppHash + appHeight := res.LastBlockHeight + + var block *cmttypes.Block + switch { + case appHeight == blockStore.Height(): + block = blockStore.LoadBlock(blockStore.Height()) + // If the state's last blockstore height does not match the app and blockstore height, we likely stopped with the halt height flag. + if state.LastBlockHeight != appHeight { + state.LastBlockHeight = appHeight + block.AppHash = appHash + state.AppHash = appHash + } else { + // Node was likely stopped via SIGTERM, delete the next block's seen commit + err := blockStoreDB.Delete([]byte(fmt.Sprintf("SC:%v", blockStore.Height()+1))) + if err != nil { + return nil, err + } + } + case blockStore.Height() > state.LastBlockHeight: + // This state usually occurs when we gracefully stop the node. + err = blockStore.DeleteLatestBlock() + if err != nil { + return nil, err + } + block = blockStore.LoadBlock(blockStore.Height()) + default: + // If there is any other state, we just load the block + block = blockStore.LoadBlock(blockStore.Height()) + } + + block.ChainID = newChainID + state.ChainID = newChainID + + block.LastBlockID = state.LastBlockID + block.LastCommit.BlockID = state.LastBlockID + + // Create a vote from our validator + vote := cmttypes.Vote{ + Type: cmtproto.PrecommitType, + Height: state.LastBlockHeight, + Round: 0, + BlockID: state.LastBlockID, + Timestamp: time.Now(), + ValidatorAddress: validatorAddress, + ValidatorIndex: 0, + Signature: []byte{}, + } + + // Sign the vote, and copy the proto changes from the act of signing to the vote itself + voteProto := vote.ToProto() + err = privValidator.SignVote(newChainID, voteProto) + if err != nil { + return nil, err + } + vote.Signature = voteProto.Signature + vote.Timestamp = voteProto.Timestamp + + // Modify the block's lastCommit to be signed only by our validator + block.LastCommit.Signatures[0].ValidatorAddress = validatorAddress + block.LastCommit.Signatures[0].Signature = vote.Signature + block.LastCommit.Signatures = []cmttypes.CommitSig{block.LastCommit.Signatures[0]} + + // Load the seenCommit of the lastBlockHeight and modify it to be signed from our validator + seenCommit := blockStore.LoadSeenCommit(state.LastBlockHeight) + seenCommit.BlockID = state.LastBlockID + seenCommit.Round = vote.Round + seenCommit.Signatures[0].Signature = vote.Signature + seenCommit.Signatures[0].ValidatorAddress = validatorAddress + seenCommit.Signatures[0].Timestamp = vote.Timestamp + seenCommit.Signatures = []cmttypes.CommitSig{seenCommit.Signatures[0]} + err = blockStore.SaveSeenCommit(state.LastBlockHeight, seenCommit) + if err != nil { + return nil, err + } + + // Create ValidatorSet struct containing just our valdiator. + newVal := &cmttypes.Validator{ + Address: validatorAddress, + PubKey: userPubKey, + VotingPower: 900000000000000, + } + newValSet := &cmttypes.ValidatorSet{ + Validators: []*cmttypes.Validator{newVal}, + Proposer: newVal, + } + + // Replace all valSets in state to be the valSet with just our validator. + state.Validators = newValSet + state.LastValidators = newValSet + state.NextValidators = newValSet + state.LastHeightValidatorsChanged = blockStore.Height() + + err = stateStore.Save(state) + if err != nil { + return nil, err + } + + // Create a ValidatorsInfo struct to store in stateDB. + valSet, err := state.Validators.ToProto() + if err != nil { + return nil, err + } + valInfo := &cmtstate.ValidatorsInfo{ + ValidatorSet: valSet, + LastHeightChanged: state.LastBlockHeight, + } + buf, err := valInfo.Marshal() + if err != nil { + return nil, err + } + + // Modfiy Validators stateDB entry. + err = stateDB.Set([]byte(fmt.Sprintf("validatorsKey:%v", blockStore.Height())), buf) + if err != nil { + return nil, err + } + + // Modify LastValidators stateDB entry. + err = stateDB.Set([]byte(fmt.Sprintf("validatorsKey:%v", blockStore.Height()-1)), buf) + if err != nil { + return nil, err + } + + // Modify NextValidators stateDB entry. + err = stateDB.Set([]byte(fmt.Sprintf("validatorsKey:%v", blockStore.Height()+1)), buf) + if err != nil { + return nil, err + } + + // Since we modified the chainID, we set the new genesisDoc in the stateDB. + b, err := cmtjson.Marshal(genDoc) + if err != nil { + return nil, err + } + if err := stateDB.SetSync([]byte("genesisDoc"), b); err != nil { + return nil, err + } + + return testnetApp, err +} + +// addStartNodeFlags should be added to any CLI commands that start the network. +func addStartNodeFlags(cmd *cobra.Command, opts StartCmdOptions) { + cmd.Flags().Bool(flagWithComet, true, "Run abci app embedded in-process with CometBFT") + cmd.Flags().String(flagAddress, "tcp://127.0.0.1:26658", "Listen address") + cmd.Flags().String(flagTransport, "socket", "Transport protocol: socket, grpc") + cmd.Flags().String(flagTraceStore, "", "Enable KVStore tracing to an output file") + cmd.Flags().String(FlagMinGasPrices, "", "Minimum gas prices to accept for transactions; Any fee in a tx must meet this minimum (e.g. 0.01photino;0.0001stake)") + cmd.Flags().Uint64(FlagQueryGasLimit, 0, "Maximum gas a Rest/Grpc query can consume. Blank and 0 imply unbounded.") + cmd.Flags().IntSlice(FlagUnsafeSkipUpgrades, []int{}, "Skip a set of upgrade heights to continue the old binary") + cmd.Flags().Uint64(FlagHaltHeight, 0, "Block height at which to gracefully halt the chain and shutdown the node") + cmd.Flags().Uint64(FlagHaltTime, 0, "Minimum block time (in Unix seconds) at which to gracefully halt the chain and shutdown the node") + cmd.Flags().Bool(FlagInterBlockCache, true, "Enable inter-block caching") + cmd.Flags().String(flagCPUProfile, "", "Enable CPU profiling and write to the provided file") + cmd.Flags().Bool(FlagTrace, false, "Provide full stack traces for errors in ABCI Log") + cmd.Flags().String(FlagPruning, pruningtypes.PruningOptionDefault, "Pruning strategy (default|nothing|everything|custom)") + cmd.Flags().Uint64(FlagPruningKeepRecent, 0, "Number of recent heights to keep on disk (ignored if pruning is not 'custom')") + cmd.Flags().Uint64(FlagPruningInterval, 0, "Height interval at which pruned heights are removed from disk (ignored if pruning is not 'custom')") + cmd.Flags().Uint(FlagInvCheckPeriod, 0, "Assert registered invariants every N blocks") + cmd.Flags().Uint64(FlagMinRetainBlocks, 0, "Minimum block height offset during ABCI commit to prune CometBFT blocks") + cmd.Flags().Bool(FlagAPIEnable, false, "Define if the API server should be enabled") + cmd.Flags().Bool(FlagAPISwagger, false, "Define if swagger documentation should automatically be registered (Note: the API must also be enabled)") + cmd.Flags().String(FlagAPIAddress, serverconfig.DefaultAPIAddress, "the API server address to listen on") + cmd.Flags().Uint(FlagAPIMaxOpenConnections, 1000, "Define the number of maximum open connections") + cmd.Flags().Uint(FlagRPCReadTimeout, 10, "Define the CometBFT RPC read timeout (in seconds)") + cmd.Flags().Uint(FlagRPCWriteTimeout, 0, "Define the CometBFT RPC write timeout (in seconds)") + cmd.Flags().Uint(FlagRPCMaxBodyBytes, 1000000, "Define the CometBFT maximum request body (in bytes)") + cmd.Flags().Bool(FlagAPIEnableUnsafeCORS, false, "Define if CORS should be enabled (unsafe - use it at your own risk)") + cmd.Flags().Bool(flagGRPCOnly, false, "Start the node in gRPC query only mode (no CometBFT process is started)") + cmd.Flags().Bool(flagGRPCEnable, true, "Define if the gRPC server should be enabled") + cmd.Flags().String(flagGRPCAddress, serverconfig.DefaultGRPCAddress, "the gRPC server address to listen on") + cmd.Flags().Bool(flagGRPCWebEnable, true, "Define if the gRPC-Web server should be enabled. (Note: gRPC must also be enabled)") + cmd.Flags().Uint64(FlagStateSyncSnapshotInterval, 0, "State sync snapshot interval") + cmd.Flags().Uint32(FlagStateSyncSnapshotKeepRecent, 2, "State sync snapshot to keep") + cmd.Flags().Bool(FlagDisableIAVLFastNode, false, "Disable fast node for IAVL tree") + cmd.Flags().Int(FlagMempoolMaxTxs, mempool.DefaultMaxTx, "Sets MaxTx value for the app-side mempool") + cmd.Flags().Duration(FlagShutdownGrace, 0*time.Second, "On Shutdown, duration to wait for resource clean up") + + // support old flags name for backwards compatibility + cmd.Flags().SetNormalizeFunc(func(f *pflag.FlagSet, name string) pflag.NormalizedName { + if name == "with-tendermint" { + name = flagWithComet + } + + return pflag.NormalizedName(name) + }) + + // add support for all CometBFT-specific command line options + cmtcmd.AddNodeFlags(cmd) + + if opts.AddFlags != nil { + opts.AddFlags(cmd) + } +} diff --git a/server/types/app.go b/server/types/app.go index a13588150d58..3b5feab3c0ca 100644 --- a/server/types/app.go +++ b/server/types/app.go @@ -4,15 +4,16 @@ import ( "encoding/json" "io" - "cosmossdk.io/log" - "cosmossdk.io/store/snapshots" - storetypes "cosmossdk.io/store/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" cmttypes "github.com/cometbft/cometbft/types" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/gogoproto/grpc" "github.com/spf13/cobra" + "cosmossdk.io/log" + "cosmossdk.io/store/snapshots" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" diff --git a/server/util.go b/server/util.go index 37293317dd55..521d13d8a508 100644 --- a/server/util.go +++ b/server/util.go @@ -173,6 +173,10 @@ func CreateSDKLogger(ctx *Context, out io.Writer) (log.Logger, error) { if ctx.Viper.GetString(flags.FlagLogFormat) == flags.OutputFormatJSON { opts = append(opts, log.OutputJSONOption()) } + opts = append(opts, + log.ColorOption(!ctx.Viper.GetBool(flags.FlagLogNoColor)), + // We use CometBFT flag (cmtcli.TraceFlag) for trace logging. + log.TraceOption(ctx.Viper.GetBool(FlagTrace))) // check and set filter level or keys for the logger if any logLvlStr := ctx.Viper.GetString(flags.FlagLogLevel) @@ -190,11 +194,6 @@ func CreateSDKLogger(ctx *Context, out io.Writer) (log.Logger, error) { } opts = append(opts, log.FilterOption(filterFunc)) - - case ctx.Viper.GetBool("trace"): // cmtcli.TraceFlag - // Check if the CometBFT flag for trace logging is set if it is then setup a tracing logger in this app as well. - // Note it overrides log level passed in `log_levels`. - opts = append(opts, log.LevelOption(zerolog.TraceLevel)) default: opts = append(opts, log.LevelOption(logLvl)) } @@ -339,9 +338,46 @@ func AddCommands(rootCmd *cobra.Command, defaultNodeHome string, appCreator type ExportCmd(appExport, defaultNodeHome), version.NewVersionCommand(), NewRollbackCmd(appCreator, defaultNodeHome), + ModuleHashByHeightQuery(appCreator), ) } +// AddCommandsWithStartCmdOptions adds server commands with the provided StartCmdOptions. +func AddCommandsWithStartCmdOptions(rootCmd *cobra.Command, defaultNodeHome string, appCreator types.AppCreator, appExport types.AppExporter, opts StartCmdOptions) { + cometCmd := &cobra.Command{ + Use: "comet", + Aliases: []string{"cometbft", "tendermint"}, + Short: "CometBFT subcommands", + } + + cometCmd.AddCommand( + ShowNodeIDCmd(), + ShowValidatorCmd(), + ShowAddressCmd(), + VersionCmd(), + cmtcmd.ResetAllCmd, + cmtcmd.ResetStateCmd, + BootstrapStateCmd(appCreator), + ) + + startCmd := StartCmdWithOptions(appCreator, defaultNodeHome, opts) + + rootCmd.AddCommand( + startCmd, + cometCmd, + ExportCmd(appExport, defaultNodeHome), + version.NewVersionCommand(), + NewRollbackCmd(appCreator, defaultNodeHome), + ) +} + +// AddTestnetCreatorCommand allows chains to create a testnet from the state existing in their node's data directory. +func AddTestnetCreatorCommand(rootCmd *cobra.Command, appCreator types.AppCreator, addStartFlags types.ModuleInitFlags) { + testnetCreateCmd := InPlaceTestnetCreator(appCreator) + addStartFlags(testnetCreateCmd) + rootCmd.AddCommand(testnetCreateCmd) +} + // https://stackoverflow.com/questions/23558425/how-do-i-get-the-local-ip-address-in-go // TODO there must be a better way to get external IP func ExternalIP() (string, error) { @@ -405,7 +441,7 @@ func ListenForQuitSignals(g *errgroup.Group, block bool, cancelFn context.Cancel func GetAppDBBackend(opts types.AppOptions) dbm.BackendType { rv := cast.ToString(opts.Get("app-db-backend")) if len(rv) == 0 { - rv = cast.ToString(opts.Get("db-backend")) + rv = cast.ToString(opts.Get("db_backend")) } // Cosmos SDK has migrated to cosmos-db which does not support all the backends which tm-db supported @@ -477,12 +513,16 @@ func DefaultBaseappOptions(appOpts types.AppOptions) []func(*baseapp.BaseApp) { chainID := cast.ToString(appOpts.Get(flags.FlagChainID)) if chainID == "" { // fallback to genesis chain-id - appGenesis, err := genutiltypes.AppGenesisFromFile(filepath.Join(homeDir, "config", "genesis.json")) + reader, err := os.Open(filepath.Join(homeDir, "config", "genesis.json")) if err != nil { panic(err) } + defer reader.Close() - chainID = appGenesis.ChainID + chainID, err = genutiltypes.ParseChainIDFromGenesis(reader) + if err != nil { + panic(fmt.Errorf("failed to parse chain-id from genesis file: %w", err)) + } } snapshotStore, err := GetSnapshotStore(appOpts) @@ -518,13 +558,14 @@ func DefaultBaseappOptions(appOpts types.AppOptions) []func(*baseapp.BaseApp) { baseapp.SetIAVLDisableFastNode(cast.ToBool(appOpts.Get(FlagDisableIAVLFastNode))), defaultMempool, baseapp.SetChainID(chainID), + baseapp.SetQueryGasLimit(cast.ToUint64(appOpts.Get(FlagQueryGasLimit))), } } func GetSnapshotStore(appOpts types.AppOptions) (*snapshots.Store, error) { homeDir := cast.ToString(appOpts.Get(flags.FlagHome)) snapshotDir := filepath.Join(homeDir, "data", "snapshots") - if err := os.MkdirAll(snapshotDir, os.ModePerm); err != nil { + if err := os.MkdirAll(snapshotDir, 0o744); err != nil { return nil, fmt.Errorf("failed to create snapshots directory: %w", err) } diff --git a/server/util_test.go b/server/util_test.go index 0f60877508ff..a9d17f0e050b 100644 --- a/server/util_test.go +++ b/server/util_test.go @@ -11,7 +11,9 @@ import ( "testing" cmtcfg "github.com/cometbft/cometbft/config" + db "github.com/cosmos/cosmos-db" "github.com/spf13/cobra" + "github.com/spf13/viper" "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/client" @@ -37,6 +39,15 @@ func preRunETestImpl(cmd *cobra.Command, args []string) error { return errCanceledInPreRun } +func TestGetAppDBBackend(t *testing.T) { + v := viper.New() + require.Equal(t, server.GetAppDBBackend(v), db.GoLevelDBBackend) + v.Set("db_backend", "dbtype1") // value from CometBFT config + require.Equal(t, server.GetAppDBBackend(v), db.BackendType("dbtype1")) + v.Set("app-db-backend", "dbtype2") // value from app.toml + require.Equal(t, server.GetAppDBBackend(v), db.BackendType("dbtype2")) +} + func TestInterceptConfigsPreRunHandlerCreatesConfigFilesWhenMissing(t *testing.T) { tempDir := t.TempDir() cmd := server.StartCmd(nil, "/foobar") diff --git a/simapp/abci.go b/simapp/abci.go new file mode 100644 index 000000000000..7848d254d50f --- /dev/null +++ b/simapp/abci.go @@ -0,0 +1,84 @@ +package simapp + +import ( + "bytes" + "crypto/rand" + "encoding/json" + "fmt" + + abci "github.com/cometbft/cometbft/abci/types" + + "github.com/cosmos/cosmos-sdk/baseapp" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type ( + // VoteExtensionHandler defines a dummy vote extension handler for SimApp. + // + // NOTE: This implementation is solely used for testing purposes. DO NOT use + // in a production application! + VoteExtensionHandler struct{} + + // VoteExtension defines the structure used to create a dummy vote extension. + VoteExtension struct { + Hash []byte + Height int64 + Data []byte + } +) + +func NewVoteExtensionHandler() *VoteExtensionHandler { + return &VoteExtensionHandler{} +} + +func (h *VoteExtensionHandler) SetHandlers(bApp *baseapp.BaseApp) { + bApp.SetExtendVoteHandler(h.ExtendVote()) + bApp.SetVerifyVoteExtensionHandler(h.VerifyVoteExtension()) +} + +func (h *VoteExtensionHandler) ExtendVote() sdk.ExtendVoteHandler { + return func(_ sdk.Context, req *abci.RequestExtendVote) (*abci.ResponseExtendVote, error) { + buf := make([]byte, 1024) + + _, err := rand.Read(buf) + if err != nil { + return nil, fmt.Errorf("failed to generate random vote extension data: %w", err) + } + + ve := VoteExtension{ + Hash: req.Hash, + Height: req.Height, + Data: buf, + } + + bz, err := json.Marshal(ve) + if err != nil { + return nil, fmt.Errorf("failed to encode vote extension: %w", err) + } + + return &abci.ResponseExtendVote{VoteExtension: bz}, nil + } +} + +func (h *VoteExtensionHandler) VerifyVoteExtension() sdk.VerifyVoteExtensionHandler { + return func(ctx sdk.Context, req *abci.RequestVerifyVoteExtension) (*abci.ResponseVerifyVoteExtension, error) { + var ve VoteExtension + + if err := json.Unmarshal(req.VoteExtension, &ve); err != nil { + return &abci.ResponseVerifyVoteExtension{Status: abci.ResponseVerifyVoteExtension_REJECT}, nil + } + + switch { + case req.Height != ve.Height: + return &abci.ResponseVerifyVoteExtension{Status: abci.ResponseVerifyVoteExtension_REJECT}, nil + + case !bytes.Equal(req.Hash, ve.Hash): + return &abci.ResponseVerifyVoteExtension{Status: abci.ResponseVerifyVoteExtension_REJECT}, nil + + case len(ve.Data) != 1024: + return &abci.ResponseVerifyVoteExtension{Status: abci.ResponseVerifyVoteExtension_REJECT}, nil + } + + return &abci.ResponseVerifyVoteExtension{Status: abci.ResponseVerifyVoteExtension_ACCEPT}, nil + } +} diff --git a/simapp/ante.go b/simapp/ante.go index 2a17d69bdbb7..58e85a7597dc 100644 --- a/simapp/ante.go +++ b/simapp/ante.go @@ -4,6 +4,7 @@ import ( "errors" circuitante "cosmossdk.io/x/circuit/ante" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/ante" ) diff --git a/simapp/app.go b/simapp/app.go index 7e4681399232..63178f1ab52e 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -7,27 +7,17 @@ import ( "fmt" "io" "os" - "path/filepath" - - "cosmossdk.io/log" - "cosmossdk.io/x/tx/signing" autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" "cosmossdk.io/client/v2/autocli" + clienthelpers "cosmossdk.io/client/v2/helpers" "cosmossdk.io/core/appmodule" - - "github.com/cosmos/cosmos-sdk/codec/address" - - authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" - "github.com/cosmos/cosmos-sdk/x/auth/tx" - - abci "github.com/cometbft/cometbft/abci/types" - dbm "github.com/cosmos/cosmos-db" - "github.com/cosmos/gogoproto/proto" - "github.com/spf13/cast" - + "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" + "cosmossdk.io/x/circuit" + circuitkeeper "cosmossdk.io/x/circuit/keeper" + circuittypes "cosmossdk.io/x/circuit/types" "cosmossdk.io/x/evidence" evidencekeeper "cosmossdk.io/x/evidence/keeper" evidencetypes "cosmossdk.io/x/evidence/types" @@ -37,13 +27,14 @@ import ( "cosmossdk.io/x/nft" nftkeeper "cosmossdk.io/x/nft/keeper" nftmodule "cosmossdk.io/x/nft/module" + "cosmossdk.io/x/tx/signing" "cosmossdk.io/x/upgrade" upgradekeeper "cosmossdk.io/x/upgrade/keeper" upgradetypes "cosmossdk.io/x/upgrade/types" - - "cosmossdk.io/x/circuit" - circuitkeeper "cosmossdk.io/x/circuit/keeper" - circuittypes "cosmossdk.io/x/circuit/types" + abci "github.com/cometbft/cometbft/abci/types" + dbm "github.com/cosmos/cosmos-db" + "github.com/cosmos/gogoproto/proto" + "github.com/spf13/cast" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" @@ -51,6 +42,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services" @@ -63,13 +55,17 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/types/msgservice" + sigtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/ante" + authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" "github.com/cosmos/cosmos-sdk/x/auth/posthandler" authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" + "github.com/cosmos/cosmos-sdk/x/auth/tx" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" + txmodule "github.com/cosmos/cosmos-sdk/x/auth/tx/config" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/auth/vesting" vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" @@ -137,36 +133,6 @@ var ( _ servertypes.Application = (*SimApp)(nil) ) -// stdAccAddressCodec is a temporary address codec that we will use until we -// can populate it with the correct bech32 prefixes without depending on the global. -type stdAccAddressCodec struct{} - -func (g stdAccAddressCodec) StringToBytes(text string) ([]byte, error) { - if text == "" { - return nil, nil - } - return sdk.AccAddressFromBech32(text) -} - -func (g stdAccAddressCodec) BytesToString(bz []byte) (string, error) { - if bz == nil { - return "", nil - } - return sdk.AccAddress(bz).String(), nil -} - -// stdValAddressCodec is a temporary address codec that we will use until we -// can populate it with the correct bech32 prefixes without depending on the global. -type stdValAddressCodec struct{} - -func (g stdValAddressCodec) StringToBytes(text string) ([]byte, error) { - return sdk.ValAddressFromBech32(text) -} - -func (g stdValAddressCodec) BytesToString(bz []byte) (string, error) { - return sdk.ValAddress(bz).String(), nil -} - // SimApp extends an ABCI application, but with most of its parameters exported. // They are exported for convenience in creating helper functions, as object // capabilities aren't needed for testing. @@ -183,7 +149,7 @@ type SimApp struct { // keepers AccountKeeper authkeeper.AccountKeeper - BankKeeper bankkeeper.Keeper + BankKeeper bankkeeper.BaseKeeper StakingKeeper *stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper MintKeeper mintkeeper.Keeper @@ -212,12 +178,11 @@ type SimApp struct { } func init() { - userHomeDir, err := os.UserHomeDir() + var err error + DefaultNodeHome, err = clienthelpers.GetNodeHomeDirectory(".simapp") if err != nil { panic(err) } - - DefaultNodeHome = filepath.Join(userHomeDir, ".simapp") } // NewSimApp returns a reference to an initialized SimApp. @@ -244,6 +209,10 @@ func NewSimApp( legacyAmino := codec.NewLegacyAmino() txConfig := tx.NewTxConfig(appCodec, tx.DefaultSignModes) + if err := interfaceRegistry.SigningContext().Validate(); err != nil { + panic(err) + } + std.RegisterLegacyAminoCodec(legacyAmino) std.RegisterInterfaces(interfaceRegistry) @@ -273,6 +242,13 @@ func NewSimApp( // } // baseAppOptions = append(baseAppOptions, prepareOpt) + // create and set dummy vote extension handler + voteExtOp := func(bApp *baseapp.BaseApp) { + voteExtHandler := NewVoteExtensionHandler() + voteExtHandler.SetHandlers(bApp) + } + baseAppOptions = append(baseAppOptions, voteExtOp, baseapp.SetOptimisticExecution()) + bApp := baseapp.NewBaseApp(appName, logger, db, txConfig.TxDecoder(), baseAppOptions...) bApp.SetCommitMultiStoreTracer(traceStore) bApp.SetVersion(version.Version) @@ -310,7 +286,7 @@ func NewSimApp( bApp.SetParamStore(app.ConsensusParamsKeeper.ParamsStore) // add keepers - app.AccountKeeper = authkeeper.NewAccountKeeper(appCodec, runtime.NewKVStoreService(keys[authtypes.StoreKey]), authtypes.ProtoBaseAccount, maccPerms, sdk.Bech32MainPrefix, authtypes.NewModuleAddress(govtypes.ModuleName).String()) + app.AccountKeeper = authkeeper.NewAccountKeeper(appCodec, runtime.NewKVStoreService(keys[authtypes.StoreKey]), authtypes.ProtoBaseAccount, maccPerms, authcodec.NewBech32Codec(sdk.Bech32MainPrefix), sdk.Bech32MainPrefix, authtypes.NewModuleAddress(govtypes.ModuleName).String()) app.BankKeeper = bankkeeper.NewBaseKeeper( appCodec, @@ -320,8 +296,24 @@ func NewSimApp( authtypes.NewModuleAddress(govtypes.ModuleName).String(), logger, ) + + // optional: enable sign mode textual by overwriting the default tx config (after setting the bank keeper) + enabledSignModes := append(tx.DefaultSignModes, sigtypes.SignMode_SIGN_MODE_TEXTUAL) + txConfigOpts := tx.ConfigOptions{ + EnabledSignModes: enabledSignModes, + TextualCoinMetadataQueryFn: txmodule.NewBankKeeperCoinMetadataQueryFn(app.BankKeeper), + } + txConfig, err := tx.NewTxConfigWithOptions( + appCodec, + txConfigOpts, + ) + if err != nil { + panic(err) + } + app.txConfig = txConfig + app.StakingKeeper = stakingkeeper.NewKeeper( - appCodec, keys[stakingtypes.StoreKey], app.AccountKeeper, app.BankKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), + appCodec, runtime.NewKVStoreService(keys[stakingtypes.StoreKey]), app.AccountKeeper, app.BankKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), authcodec.NewBech32Codec(sdk.Bech32PrefixValAddr), authcodec.NewBech32Codec(sdk.Bech32PrefixConsAddr), ) app.MintKeeper = mintkeeper.NewKeeper(appCodec, runtime.NewKVStoreService(keys[minttypes.StoreKey]), app.StakingKeeper, app.AccountKeeper, app.BankKeeper, authtypes.FeeCollectorName, authtypes.NewModuleAddress(govtypes.ModuleName).String()) @@ -370,8 +362,7 @@ func NewSimApp( // See: https://docs.cosmos.network/main/modules/gov#proposal-messages govRouter := govv1beta1.NewRouter() govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). - AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). - AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)) + AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)) govConfig := govtypes.DefaultConfig() /* Example of setting gov params: @@ -450,12 +441,15 @@ func NewSimApp( app.BasicModuleManager.RegisterLegacyAminoCodec(legacyAmino) app.BasicModuleManager.RegisterInterfaces(interfaceRegistry) + // NOTE: upgrade module is required to be prioritized + app.ModuleManager.SetOrderPreBlockers( + upgradetypes.ModuleName, + ) // During begin block slashing happens after distr.BeginBlocker so that // there is nothing left over in the validator fee pool, so as to keep the // CanWithdrawInvariant invariant. // NOTE: staking module is required if HistoricalEntries param > 0 app.ModuleManager.SetOrderBeginBlockers( - upgradetypes.ModuleName, minttypes.ModuleName, distrtypes.ModuleName, slashingtypes.ModuleName, @@ -491,7 +485,7 @@ func NewSimApp( app.ModuleManager.RegisterInvariants(app.CrisisKeeper) app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter()) - err := app.ModuleManager.RegisterServices(app.configurator) + err = app.ModuleManager.RegisterServices(app.configurator) if err != nil { panic(err) } @@ -528,6 +522,7 @@ func NewSimApp( // initialize BaseApp app.SetInitChainer(app.InitChainer) + app.SetPreBlocker(app.PreBlocker) app.SetBeginBlocker(app.BeginBlocker) app.SetEndBlocker(app.EndBlocker) app.setAnteHandler(txConfig) @@ -540,12 +535,7 @@ func NewSimApp( // meaning that both `runMsgs` and `postHandler` state will be committed if // both are successful, and both will be reverted if any of the two fails. // - // The SDK exposes a default postHandlers chain, which comprises of only - // one decorator: the Transaction Tips decorator. However, some chains do - // not need it by default, so feel free to comment the next line if you do - // not need tips. - // To read more about tips: - // https://docs.cosmos.network/main/core/tips.html + // The SDK exposes a default postHandlers chain // // Please note that changing any of the anteHandler or postHandler chain is // likely to be a state-machine breaking change, which needs a coordinated @@ -609,6 +599,11 @@ func (app *SimApp) setPostHandler() { // Name returns the name of the App func (app *SimApp) Name() string { return app.BaseApp.Name() } +// PreBlocker application updates every pre block +func (app *SimApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) { + return app.ModuleManager.PreBlock(ctx) +} + // BeginBlocker application updates every begin block func (app *SimApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error) { return app.ModuleManager.BeginBlock(ctx) @@ -677,8 +672,11 @@ func (app *SimApp) AutoCliOpts() autocli.AppOptions { } return autocli.AppOptions{ - Modules: modules, - AddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()), + Modules: modules, + ModuleOptions: runtimeservices.ExtractAutoCLIOptions(app.ModuleManager.Modules), + AddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()), + ValidatorAddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix()), + ConsensusAddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ConsensusAddrPrefix()), } } @@ -696,7 +694,7 @@ func (app *SimApp) GetKey(storeKey string) *storetypes.KVStoreKey { // GetStoreKeys returns all the stored store keys. func (app *SimApp) GetStoreKeys() []storetypes.StoreKey { - keys := make([]storetypes.StoreKey, len(app.keys)) + keys := make([]storetypes.StoreKey, 0, len(app.keys)) for _, key := range app.keys { keys = append(keys, key) } diff --git a/simapp/app_config.go b/simapp/app_config.go index b8a79d7fe9e8..13c9a984ca69 100644 --- a/simapp/app_config.go +++ b/simapp/app_config.go @@ -27,51 +27,50 @@ import ( txconfigv1 "cosmossdk.io/api/cosmos/tx/config/v1" upgrademodulev1 "cosmossdk.io/api/cosmos/upgrade/module/v1" vestingmodulev1 "cosmossdk.io/api/cosmos/vesting/module/v1" - "cosmossdk.io/depinject" - - _ "cosmossdk.io/x/circuit" // import for side-effects - _ "cosmossdk.io/x/evidence" // import for side-effects - _ "cosmossdk.io/x/feegrant/module" // import for side-effects - _ "cosmossdk.io/x/nft/module" // import for side-effects - _ "cosmossdk.io/x/upgrade" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/auth/vesting" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/authz/module" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/bank" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/consensus" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/crisis" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/distribution" // import for side-effects - "github.com/cosmos/cosmos-sdk/x/genutil" - "github.com/cosmos/cosmos-sdk/x/gov" - _ "github.com/cosmos/cosmos-sdk/x/group/module" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/mint" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/params" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/slashing" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/staking" // import for side-effects - "cosmossdk.io/core/appconfig" + "cosmossdk.io/depinject" + _ "cosmossdk.io/x/circuit" // import for side-effects circuittypes "cosmossdk.io/x/circuit/types" + _ "cosmossdk.io/x/evidence" // import for side-effects evidencetypes "cosmossdk.io/x/evidence/types" "cosmossdk.io/x/feegrant" + _ "cosmossdk.io/x/feegrant/module" // import for side-effects "cosmossdk.io/x/nft" + _ "cosmossdk.io/x/nft/module" // import for side-effects + _ "cosmossdk.io/x/upgrade" // import for side-effects upgradetypes "cosmossdk.io/x/upgrade/types" + "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/types/module" + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import for side-effects authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + _ "github.com/cosmos/cosmos-sdk/x/auth/vesting" // import for side-effects vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" "github.com/cosmos/cosmos-sdk/x/authz" + _ "github.com/cosmos/cosmos-sdk/x/authz/module" // import for side-effects + _ "github.com/cosmos/cosmos-sdk/x/bank" // import for side-effects banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + _ "github.com/cosmos/cosmos-sdk/x/consensus" // import for side-effects consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" + _ "github.com/cosmos/cosmos-sdk/x/crisis" // import for side-effects crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" + _ "github.com/cosmos/cosmos-sdk/x/distribution" // import for side-effects distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" + "github.com/cosmos/cosmos-sdk/x/gov" govclient "github.com/cosmos/cosmos-sdk/x/gov/client" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/cosmos-sdk/x/group" + _ "github.com/cosmos/cosmos-sdk/x/group/module" // import for side-effects + _ "github.com/cosmos/cosmos-sdk/x/mint" // import for side-effects minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + _ "github.com/cosmos/cosmos-sdk/x/params" // import for side-effects paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + _ "github.com/cosmos/cosmos-sdk/x/slashing" // import for side-effects slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" + _ "github.com/cosmos/cosmos-sdk/x/staking" // import for side-effects stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) @@ -106,25 +105,26 @@ var ( Name: runtime.ModuleName, Config: appconfig.WrapAny(&runtimev1alpha1.Module{ AppName: "SimApp", + // NOTE: upgrade module is required to be prioritized + PreBlockers: []string{ + upgradetypes.ModuleName, + }, // During begin block slashing happens after distr.BeginBlocker so that // there is nothing left over in the validator fee pool, so as to keep the // CanWithdrawInvariant invariant. // NOTE: staking module is required if HistoricalEntries param > 0 BeginBlockers: []string{ - upgradetypes.ModuleName, minttypes.ModuleName, distrtypes.ModuleName, slashingtypes.ModuleName, evidencetypes.ModuleName, stakingtypes.ModuleName, - genutiltypes.ModuleName, authz.ModuleName, }, EndBlockers: []string{ crisistypes.ModuleName, govtypes.ModuleName, stakingtypes.ModuleName, - genutiltypes.ModuleName, feegrant.ModuleName, group.ModuleName, }, @@ -155,7 +155,6 @@ var ( paramstypes.ModuleName, upgradetypes.ModuleName, vestingtypes.ModuleName, - consensustypes.ModuleName, circuittypes.ModuleName, }, // When ExportGenesis is not specified, the export genesis module order @@ -186,8 +185,13 @@ var ( }), }, { - Name: stakingtypes.ModuleName, - Config: appconfig.WrapAny(&stakingmodulev1.Module{}), + Name: stakingtypes.ModuleName, + Config: appconfig.WrapAny(&stakingmodulev1.Module{ + // NOTE: specifying a prefix is only necessary when using bech32 addresses + // If not specfied, the auth Bech32Prefix appended with "valoper" and "valcons" is used by default + Bech32PrefixValidator: "cosmosvaloper", + Bech32PrefixConsensus: "cosmosvalcons", + }), }, { Name: slashingtypes.ModuleName, @@ -198,8 +202,10 @@ var ( Config: appconfig.WrapAny(¶msmodulev1.Module{}), }, { - Name: "tx", - Config: appconfig.WrapAny(&txconfigv1.Config{}), + Name: "tx", + Config: appconfig.WrapAny(&txconfigv1.Config{ + SkipAnteHandler: true, // Enable this to skip the default antehandlers and set custom ante handlers. + }), }, { Name: genutiltypes.ModuleName, diff --git a/simapp/app_v2.go b/simapp/app_di.go similarity index 82% rename from simapp/app_v2.go rename to simapp/app_di.go index 7ec1f3732449..71999c12ac04 100644 --- a/simapp/app_v2.go +++ b/simapp/app_di.go @@ -4,13 +4,12 @@ package simapp import ( "io" - "os" - "path/filepath" - "cosmossdk.io/log" dbm "github.com/cosmos/cosmos-db" + clienthelpers "cosmossdk.io/client/v2/helpers" "cosmossdk.io/depinject" + "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" circuitkeeper "cosmossdk.io/x/circuit/keeper" evidencekeeper "cosmossdk.io/x/evidence/keeper" @@ -30,6 +29,7 @@ import ( testdata_pulsar "github.com/cosmos/cosmos-sdk/testutil/testdata/testpb" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/auth" + "github.com/cosmos/cosmos-sdk/x/auth/ante" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -82,19 +82,18 @@ type SimApp struct { GroupKeeper groupkeeper.Keeper NFTKeeper nftkeeper.Keeper ConsensusParamsKeeper consensuskeeper.Keeper - CircuitBreakerKeeper circuitkeeper.Keeper + CircuitKeeper circuitkeeper.Keeper // simulation manager sm *module.SimulationManager } func init() { - userHomeDir, err := os.UserHomeDir() + var err error + DefaultNodeHome, err = clienthelpers.GetNodeHomeDirectory(".simapp") if err != nil { panic(err) } - - DefaultNodeHome = filepath.Join(userHomeDir, ".simapp") } // NewSimApp returns a reference to an initialized SimApp. @@ -128,11 +127,28 @@ func NewSimApp( // add it below. By default the auth module uses simulation.RandomGenesisAccounts. // // authtypes.RandomGenesisAccountsFn(simulation.RandomGenesisAccounts), - + // // For providing a custom a base account type add it below. // By default the auth module uses authtypes.ProtoBaseAccount(). // // func() sdk.AccountI { return authtypes.ProtoBaseAccount() }, + // + // For providing a different address codec, add it below. + // By default the auth module uses a Bech32 address codec, + // with the prefix defined in the auth module configuration. + // + // func() address.Codec { return <- custom address codec type -> } + + // + // STAKING + // + // For provinding a different validator and consensus address codec, add it below. + // By default the staking module uses the bech32 prefix provided in the auth config, + // and appends "valoper" and "valcons" for validator and consensus addresses respectively. + // When providing a custom address codec in auth, custom address codecs must be provided here as well. + // + // func() runtime.ValidatorAddressCodec { return <- custom validator address codec type -> } + // func() runtime.ConsensusAddressCodec { return <- custom consensus address codec type -> } // // MINT @@ -167,7 +183,7 @@ func NewSimApp( &app.GroupKeeper, &app.NFTKeeper, &app.ConsensusParamsKeeper, - &app.CircuitBreakerKeeper, + &app.CircuitKeeper, ); err != nil { panic(err) } @@ -198,6 +214,13 @@ func NewSimApp( // } // baseAppOptions = append(baseAppOptions, prepareOpt) + // create and set dummy vote extension handler + voteExtOp := func(bApp *baseapp.BaseApp) { + voteExtHandler := NewVoteExtensionHandler() + voteExtHandler.SetHandlers(bApp) + } + baseAppOptions = append(baseAppOptions, voteExtOp, baseapp.SetOptimisticExecution()) + app.App = appBuilder.Build(db, traceStore, baseAppOptions...) // register streaming services @@ -226,13 +249,16 @@ func NewSimApp( app.sm.RegisterStoreDecoders() + // set custom ante handler + app.setAnteHandler(app.txConfig) + // A custom InitChainer can be set if extra pre-init-genesis logic is required. // By default, when using app wiring enabled module, this is not required. // For instance, the upgrade module will set automatically the module version map in its init genesis thanks to app wiring. // However, when registering a module manually (i.e. that does not support app wiring), the module version map // must be set manually as follow. The upgrade module will de-duplicate the module version map. // - // app.SetInitChainer(func(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { + // app.SetInitChainer(func(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error) { // app.UpgradeKeeper.SetModuleVersionMap(ctx, app.ModuleManager.GetVersionMap()) // return app.App.InitChainer(ctx, req) // }) @@ -244,8 +270,28 @@ func NewSimApp( return app } -// Name returns the name of the App -func (app *SimApp) Name() string { return app.BaseApp.Name() } +// setAnteHandler sets custom ante handlers. +// "x/auth/tx" pre-defined ante handler have been disabled in app_config. +func (app *SimApp) setAnteHandler(txConfig client.TxConfig) { + anteHandler, err := NewAnteHandler( + HandlerOptions{ + ante.HandlerOptions{ + AccountKeeper: app.AccountKeeper, + BankKeeper: app.BankKeeper, + SignModeHandler: txConfig.SignModeHandler(), + FeegrantKeeper: app.FeeGrantKeeper, + SigGasConsumer: ante.DefaultSigVerificationGasConsumer, + }, + &app.CircuitKeeper, + }, + ) + if err != nil { + panic(err) + } + + // Set the AnteHandler for the app + app.SetAnteHandler(anteHandler) +} // LegacyAmino returns SimApp's amino codec. // diff --git a/simapp/app_test.go b/simapp/app_test.go index d5929d28714f..a0df234ca9b2 100644 --- a/simapp/app_test.go +++ b/simapp/app_test.go @@ -5,11 +5,6 @@ import ( "fmt" "testing" - "cosmossdk.io/core/appmodule" - "cosmossdk.io/log" - "cosmossdk.io/x/evidence" - feegrantmodule "cosmossdk.io/x/feegrant/module" - "cosmossdk.io/x/upgrade" abci "github.com/cometbft/cometbft/abci/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" @@ -17,8 +12,18 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" + "cosmossdk.io/core/address" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/depinject" + "cosmossdk.io/log" + "cosmossdk.io/x/evidence" + feegrantmodule "cosmossdk.io/x/feegrant/module" + "cosmossdk.io/x/upgrade" + "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil/mock" + "github.com/cosmos/cosmos-sdk/testutil/network" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" @@ -48,7 +53,7 @@ func TestSimAppExportAndBlockedAddrs(t *testing.T) { AppOpts: simtestutil.NewAppOptionsWithFlagHome(t.TempDir()), }) - // BlockedAddresses returns a map of addresses in app v1 and a map of modules name in app v2. + // BlockedAddresses returns a map of addresses in app v1 and a map of modules name in app di. for acc := range BlockedAddresses() { var addr sdk.AccAddress if modAddr, err := sdk.AccAddressFromBech32(acc); err == nil { @@ -231,7 +236,7 @@ func TestInitGenesisOnMigration(t *testing.T) { mockModule := mock.NewMockAppModuleWithAllExtensions(mockCtrl) mockDefaultGenesis := json.RawMessage(`{"key": "value"}`) mockModule.EXPECT().DefaultGenesis(gomock.Eq(app.appCodec)).Times(1).Return(mockDefaultGenesis) - mockModule.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(app.appCodec), gomock.Eq(mockDefaultGenesis)).Times(1).Return(nil) + mockModule.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(app.appCodec), gomock.Eq(mockDefaultGenesis)).Times(1) mockModule.EXPECT().ConsensusVersion().Times(1).Return(uint64(0)) app.ModuleManager.Modules["mock"] = mockModule @@ -295,3 +300,61 @@ func TestProtoAnnotations(t *testing.T) { err = msgservice.ValidateProtoAnnotations(r) require.NoError(t, err) } + +var _ address.Codec = (*customAddressCodec)(nil) + +type customAddressCodec struct{} + +func (c customAddressCodec) StringToBytes(text string) ([]byte, error) { + return []byte(text), nil +} + +func (c customAddressCodec) BytesToString(bz []byte) (string, error) { + return string(bz), nil +} + +func TestAddressCodecFactory(t *testing.T) { + var addrCodec address.Codec + var valAddressCodec runtime.ValidatorAddressCodec + var consAddressCodec runtime.ConsensusAddressCodec + + err := depinject.Inject( + depinject.Configs( + network.MinimumAppConfig(), + depinject.Supply(log.NewNopLogger()), + ), + &addrCodec, &valAddressCodec, &consAddressCodec) + require.NoError(t, err) + require.NotNil(t, addrCodec) + _, ok := addrCodec.(customAddressCodec) + require.False(t, ok) + require.NotNil(t, valAddressCodec) + _, ok = valAddressCodec.(customAddressCodec) + require.False(t, ok) + require.NotNil(t, consAddressCodec) + _, ok = consAddressCodec.(customAddressCodec) + require.False(t, ok) + + // Set the address codec to the custom one + err = depinject.Inject( + depinject.Configs( + network.MinimumAppConfig(), + depinject.Supply( + log.NewNopLogger(), + func() address.Codec { return customAddressCodec{} }, + func() runtime.ValidatorAddressCodec { return customAddressCodec{} }, + func() runtime.ConsensusAddressCodec { return customAddressCodec{} }, + ), + ), + &addrCodec, &valAddressCodec, &consAddressCodec) + require.NoError(t, err) + require.NotNil(t, addrCodec) + _, ok = addrCodec.(customAddressCodec) + require.True(t, ok) + require.NotNil(t, valAddressCodec) + _, ok = valAddressCodec.(customAddressCodec) + require.True(t, ok) + require.NotNil(t, consAddressCodec) + _, ok = consAddressCodec.(customAddressCodec) + require.True(t, ok) +} diff --git a/simapp/export.go b/simapp/export.go index 9b233dc74680..5eda698a107c 100644 --- a/simapp/export.go +++ b/simapp/export.go @@ -77,13 +77,24 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] /* Handle fee distribution state. */ // withdraw all validator commission - app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { - _, _ = app.DistrKeeper.WithdrawValidatorCommission(ctx, val.GetOperator()) + err := app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + valBz, err := app.StakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) + if err != nil { + panic(err) + } + _, _ = app.DistrKeeper.WithdrawValidatorCommission(ctx, valBz) return false }) + if err != nil { + panic(err) + } // withdraw all delegator rewards - dels := app.StakingKeeper.GetAllDelegations(ctx) + dels, err := app.StakingKeeper.GetAllDelegations(ctx) + if err != nil { + panic(err) + } + for _, delegation := range dels { valAddr, err := sdk.ValAddressFromBech32(delegation.ValidatorAddress) if err != nil { @@ -106,9 +117,13 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] ctx = ctx.WithBlockHeight(0) // reinitialize all validators - app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + err = app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + valBz, err := app.StakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) + if err != nil { + panic(err) + } // donate any unwithdrawn outstanding reward fraction tokens to the community pool - scraps, err := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, val.GetOperator()) + scraps, err := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, valBz) if err != nil { panic(err) } @@ -121,7 +136,7 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] panic(err) } - if err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator()); err != nil { + if err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, valBz); err != nil { panic(err) } return false @@ -156,7 +171,10 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] for i := range red.Entries { red.Entries[i].CreationHeight = 0 } - app.StakingKeeper.SetRedelegation(ctx, red) + err = app.StakingKeeper.SetRedelegation(ctx, red) + if err != nil { + panic(err) + } return false }) @@ -165,7 +183,10 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] for i := range ubd.Entries { ubd.Entries[i].CreationHeight = 0 } - app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) + err = app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) + if err != nil { + panic(err) + } return false }) @@ -177,8 +198,8 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] for ; iter.Valid(); iter.Next() { addr := sdk.ValAddress(stakingtypes.AddressFromValidatorsKey(iter.Key())) - validator, found := app.StakingKeeper.GetValidator(ctx, addr) - if !found { + validator, err := app.StakingKeeper.GetValidator(ctx, addr) + if err != nil { panic("expected validator, not found") } @@ -196,7 +217,7 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] return } - _, err := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) + _, err = app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) if err != nil { log.Fatal(err) } diff --git a/simapp/genesis_account_test.go b/simapp/genesis_account_test.go index ea62b588045c..d813e9ec7e31 100644 --- a/simapp/genesis_account_test.go +++ b/simapp/genesis_account_test.go @@ -4,13 +4,14 @@ import ( "testing" "time" + "github.com/cometbft/cometbft/crypto" + "github.com/stretchr/testify/require" + "cosmossdk.io/simapp" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - - "github.com/cometbft/cometbft/crypto" - "github.com/stretchr/testify/require" ) func TestSimGenesisAccountValidate(t *testing.T) { diff --git a/simapp/go.mod b/simapp/go.mod index 421da8de902f..3ca34743d5fd 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -1,211 +1,209 @@ module cosmossdk.io/simapp -go 1.20 +go 1.21 require ( - cosmossdk.io/api v0.4.2 - cosmossdk.io/client/v2 v2.0.0-20230309163709-87da587416ba - cosmossdk.io/core v0.8.0 - cosmossdk.io/depinject v1.0.0-alpha.3 - cosmossdk.io/log v1.1.0 - cosmossdk.io/math v1.0.1 - cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c - cosmossdk.io/tools/confix v0.0.0-20230120150717-4f6f6c00021f - cosmossdk.io/tools/rosetta v0.2.1 - cosmossdk.io/x/circuit v0.0.0-20230220112800-f69b9ff58fbe - cosmossdk.io/x/evidence v0.1.0 - cosmossdk.io/x/feegrant v0.0.0-20230117113717-50e7c4a4ceff - cosmossdk.io/x/nft v0.0.0-20230113085233-fae3332d62fc - cosmossdk.io/x/tx v0.8.0 - cosmossdk.io/x/upgrade v0.0.0-20230127052425-54c8e1568335 - github.com/cometbft/cometbft v0.38.0-rc1 - github.com/cosmos/cosmos-db v1.0.0 + cosmossdk.io/api v0.7.6 + cosmossdk.io/client/v2 v2.0.0-beta.5 + cosmossdk.io/collections v0.4.0 // indirect + cosmossdk.io/core v0.11.1 + cosmossdk.io/depinject v1.1.0 + cosmossdk.io/log v1.4.1 + cosmossdk.io/math v1.3.0 + cosmossdk.io/store v1.1.1 + cosmossdk.io/tools/confix v0.1.1 + cosmossdk.io/x/circuit v0.1.1 + cosmossdk.io/x/evidence v0.1.1 + cosmossdk.io/x/feegrant v0.1.1 + cosmossdk.io/x/nft v0.1.1 + cosmossdk.io/x/tx v0.13.5 + cosmossdk.io/x/upgrade v0.1.4 + github.com/cometbft/cometbft v0.38.12 + github.com/cosmos/cosmos-db v1.0.2 // this version is not used as it is always replaced by the latest Cosmos SDK version - github.com/cosmos/cosmos-sdk v0.50.0 - github.com/cosmos/gogoproto v1.4.10 + github.com/cosmos/cosmos-sdk v0.50.8 + github.com/cosmos/gogoproto v1.7.0 github.com/golang/mock v1.6.0 - github.com/spf13/cast v1.5.1 - github.com/spf13/cobra v1.7.0 + github.com/spf13/cast v1.6.0 + github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.16.0 - github.com/stretchr/testify v1.8.4 - google.golang.org/protobuf v1.30.0 + github.com/spf13/viper v1.19.0 + github.com/stretchr/testify v1.9.0 + google.golang.org/protobuf v1.35.1 ) require ( - cloud.google.com/go v0.110.0 // indirect - cloud.google.com/go/compute v1.19.0 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v0.13.0 // indirect - cloud.google.com/go/storage v1.30.0 // indirect - cosmossdk.io/collections v0.2.0 // indirect - cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741 // indirect + cloud.google.com/go v0.112.1 // indirect + cloud.google.com/go/compute/metadata v0.5.0 // indirect + cloud.google.com/go/iam v1.1.6 // indirect + cloud.google.com/go/storage v1.38.0 // indirect + cosmossdk.io/errors v1.0.1 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect + github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect - github.com/armon/go-metrics v0.4.1 // indirect github.com/aws/aws-sdk-go v1.44.224 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect - github.com/bits-and-blooms/bitset v1.7.0 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/bits-and-blooms/bitset v1.8.0 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect - github.com/cockroachdb/errors v1.9.1 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect + github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230606202032-d96868fd481e // indirect - github.com/cockroachdb/redact v1.1.4 // indirect - github.com/coinbase/rosetta-sdk-go/types v1.0.0 // indirect - github.com/cometbft/cometbft-db v0.7.0 // indirect + github.com/cockroachdb/pebble v1.1.1 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/cometbft/cometbft-db v0.11.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v1.0.0-beta.2 // indirect - github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.13.0 // indirect - github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect + github.com/cosmos/iavl v1.2.0 // indirect + github.com/cosmos/ics23/go v0.11.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/creachadair/atomicfile v0.3.1 // indirect github.com/creachadair/tomledit v0.0.24 // indirect github.com/danieljoos/wincred v1.1.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect - github.com/emicklei/dot v1.4.2 // indirect + github.com/dvsekhvalnov/jose2go v1.6.0 // indirect + github.com/emicklei/dot v1.6.1 // indirect github.com/fatih/color v1.15.0 // indirect - github.com/felixge/httpsnoop v1.0.2 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/getsentry/sentry-go v0.21.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.1.0 // indirect + github.com/golang/glog v1.2.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect - github.com/google/s2a-go v0.1.3 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect - github.com/googleapis/gax-go/v2 v2.8.0 // indirect + github.com/google/s2a-go v0.1.7 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect + github.com/googleapis/gax-go/v2 v2.12.3 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/mux v1.8.0 // indirect - github.com/gorilla/websocket v1.5.0 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.7.1 // indirect + github.com/hashicorp/go-getter v1.7.4 // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-plugin v1.4.10 // indirect + github.com/hashicorp/go-metrics v0.5.3 // indirect + github.com/hashicorp/go-plugin v1.5.2 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/huandu/skiplist v1.2.0 // indirect - github.com/iancoleman/strcase v0.2.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.16.5 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect - github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.0 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect - github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 // indirect + github.com/pelletier/go-toml/v2 v2.2.2 // indirect + github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.15.1 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.20.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect - github.com/rs/cors v1.8.3 // indirect - github.com/rs/zerolog v1.29.1 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rs/cors v1.11.1 // indirect + github.com/rs/zerolog v1.33.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tidwall/btree v1.6.0 // indirect + github.com/tidwall/btree v1.7.0 // indirect github.com/ulikunitz/xz v0.5.11 // indirect - github.com/zondax/hid v0.9.1 // indirect - github.com/zondax/ledger-go v0.14.1 // indirect - go.etcd.io/bbolt v1.3.7 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect + go.etcd.io/bbolt v1.3.10 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/crypto v0.9.0 // indirect - golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/oauth2 v0.8.0 // indirect - golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect - golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/api v0.122.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect - google.golang.org/grpc v1.55.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect + go.uber.org/multierr v1.10.0 // indirect + golang.org/x/crypto v0.27.0 // indirect + golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect + golang.org/x/net v0.29.0 // indirect + golang.org/x/oauth2 v0.22.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/term v0.24.0 // indirect + golang.org/x/text v0.18.0 // indirect + golang.org/x/time v0.5.0 // indirect + google.golang.org/api v0.171.0 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f // indirect + google.golang.org/grpc v1.67.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - gotest.tools/v3 v3.4.0 // indirect + gotest.tools/v3 v3.5.1 // indirect nhooyr.io/websocket v1.8.6 // indirect - pgregory.net/rapid v0.6.2 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + pgregory.net/rapid v1.1.0 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) // Here are the short-lived replace from the SimApp // Replace here are pending PRs, or version to be tagged -replace ( - cosmossdk.io/client/v2 => ../client/v2 - cosmossdk.io/tools/confix => ../tools/confix - cosmossdk.io/tools/rosetta => ../tools/rosetta - cosmossdk.io/x/circuit => ../x/circuit - cosmossdk.io/x/evidence => ../x/evidence - cosmossdk.io/x/feegrant => ../x/feegrant - cosmossdk.io/x/nft => ../x/nft - cosmossdk.io/x/tx => ../x/tx - cosmossdk.io/x/upgrade => ../x/upgrade -) +// replace ( +// +// ) // Below are the long-lived replace of the SimApp replace ( @@ -215,7 +213,7 @@ replace ( github.com/cosmos/cosmos-sdk => ../. // Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities. // TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 - github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.0 + github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.1 // replace broken goleveldb github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) diff --git a/simapp/go.sum b/simapp/go.sum index 94d6aa531ecf..47c4c56e7490 100644 --- a/simapp/go.sum +++ b/simapp/go.sum @@ -3,7 +3,6 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -16,7 +15,6 @@ cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOY cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= @@ -32,8 +30,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= -cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= +cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= +cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -70,10 +68,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.19.0 h1:+9zda3WGgW1ZSTlVppLCYFIr48Pa35q1uG2N1itbCEQ= -cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= +cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= @@ -111,13 +107,12 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v0.13.0 h1:+CmB+K0J/33d0zSQ9SlFWUeCCEn5XJA0ZMZ3pHE9u8k= -cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= +cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= +cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= -cloud.google.com/go/longrunning v0.4.1 h1:v+yFJOfKC3yZdY6ZUI933pIYdhyhV8S3NpWrXWmg7jM= cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= @@ -171,12 +166,11 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.30.0 h1:g1yrbxAWOrvg/594228pETWkOi00MLTrOWfh56veU5o= -cloud.google.com/go/storage v1.30.0/go.mod h1:xAVretHSROm1BQX4IIsoVgJqw0LqOyX+I/O2GzRAzdE= +cloud.google.com/go/storage v1.38.0 h1:Az68ZRGlnNTpIBbLjSMIV2BDcwwXYlRlQzis0llkpJg= +cloud.google.com/go/storage v1.38.0/go.mod h1:tlUADB0mAb9BgYls9lq+8MGkfzOXuLrnHXlpHmvFJoY= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= @@ -188,51 +182,65 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.4.2 h1:lQBMl4xINnMnBOR/tQLtjlDnR4exr4e6/SfHR8PILE0= -cosmossdk.io/api v0.4.2/go.mod h1:qrVgOp7DIeAXa+Tt5dDjOC47bZCDrwx8ZHxrmy7STNE= -cosmossdk.io/collections v0.2.0 h1:CgMfLtE16+qox3zBYrGh60i4yKV8SeExLnIdOS2sbQs= -cosmossdk.io/collections v0.2.0/go.mod h1:Oc1FK0vlmxJZsgUn9/o3ldE6zNyWKvobVzaLhWknZJE= -cosmossdk.io/core v0.8.0 h1:LcJnu52E1a8f8E317VfQ1xK/RZe+IuhMNQAjnDLh25M= -cosmossdk.io/core v0.8.0/go.mod h1:LF6VLOv2DdCiaHxYVmr0MZcZpaSM9ZgvyrQSYTeg6D0= -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.0.20230524212735-6cabb6aa5741 h1:BCRz06fvddw7cKGiEGDiSox3qMsjQ97f92K+PDZDHdc= -cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741/go.mod h1:TB05o6YXkZkzsc+6bZFAV5kZRBtoCU9tUkbeMIqEg0w= -cosmossdk.io/log v1.1.0 h1:v0ogPHYeTzPcBTcPR1A3j1hkei4pZama8kz8LKlCMv0= -cosmossdk.io/log v1.1.0/go.mod h1:6zjroETlcDs+mm62gd8Ig7mZ+N+fVOZS91V17H+M4N4= -cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c h1:A+FMPW9GtfcPBDQNtFeDFN27h1SAP6OVjnGgPLlYXmI= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c/go.mod h1:RbYGvXCbz8uNBCXrwS9Z8SyydeWi+W5x5MZ33muyzMw= +cosmossdk.io/api v0.7.6 h1:PC20PcXy1xYKH2KU4RMurVoFjjKkCgYRbVAD4PdqUuY= +cosmossdk.io/api v0.7.6/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/client/v2 v2.0.0-beta.5 h1:0LVv3nEByn//hFDIrYLs2WvsEU3HodOelh4SDHnA/1I= +cosmossdk.io/client/v2 v2.0.0-beta.5/go.mod h1:4p0P6o0ro+FizakJUYS9SeM94RNbv0thLmkHRw5o5as= +cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= +cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= +cosmossdk.io/core v0.11.1 h1:h9WfBey7NAiFfIcUhDVNS503I2P2HdZLebJlUIs8LPA= +cosmossdk.io/core v0.11.1/go.mod h1:OJzxcdC+RPrgGF8NJZR2uoQr56tc7gfBKhiKeDO7hH0= +cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E= +cosmossdk.io/depinject v1.1.0/go.mod h1:kkI5H9jCGHeKeYWXTqYdruogYrEeWvBQCw1Pj4/eCFI= +cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= +cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= +cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= +cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= +cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= +cosmossdk.io/store v1.1.1 h1:NA3PioJtWDVU7cHHeyvdva5J/ggyLDkyH0hGHl2804Y= +cosmossdk.io/store v1.1.1/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= +cosmossdk.io/tools/confix v0.1.1 h1:aexyRv9+y15veH3Qw16lxQwo+ki7r2I+g0yNTEFEQM8= +cosmossdk.io/tools/confix v0.1.1/go.mod h1:nQVvP1tHsGXS83PonPVWJtSbddIqyjEw99L4M3rPJyQ= +cosmossdk.io/x/circuit v0.1.1 h1:KPJCnLChWrxD4jLwUiuQaf5mFD/1m7Omyo7oooefBVQ= +cosmossdk.io/x/circuit v0.1.1/go.mod h1:B6f/urRuQH8gjt4eLIXfZJucrbreuYrKh5CSjaOxr+Q= +cosmossdk.io/x/evidence v0.1.1 h1:Ks+BLTa3uftFpElLTDp9L76t2b58htjVbSZ86aoK/E4= +cosmossdk.io/x/evidence v0.1.1/go.mod h1:OoDsWlbtuyqS70LY51aX8FBTvguQqvFrt78qL7UzeNc= +cosmossdk.io/x/feegrant v0.1.1 h1:EKFWOeo/pup0yF0svDisWWKAA9Zags6Zd0P3nRvVvw8= +cosmossdk.io/x/feegrant v0.1.1/go.mod h1:2GjVVxX6G2fta8LWj7pC/ytHjryA6MHAJroBWHFNiEQ= +cosmossdk.io/x/nft v0.1.1 h1:pslAVS8P5NkW080+LWOamInjDcq+v2GSCo+BjN9sxZ8= +cosmossdk.io/x/nft v0.1.1/go.mod h1:Kac6F6y2gsKvoxU+fy8uvxRTi4BIhLOor2zgCNQwVgY= +cosmossdk.io/x/tx v0.13.5 h1:FdnU+MdmFWn1pTsbfU0OCf2u6mJ8cqc1H4OMG418MLw= +cosmossdk.io/x/tx v0.13.5/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w= +cosmossdk.io/x/upgrade v0.1.4 h1:/BWJim24QHoXde8Bc64/2BSEB6W4eTydq0X/2f8+g38= +cosmossdk.io/x/upgrade v0.1.4/go.mod h1:9v0Aj+fs97O+Ztw+tG3/tp5JSlrmT7IcFhAebQHmOPo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= +github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -244,8 +252,6 @@ github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= @@ -254,7 +260,6 @@ github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX github.com/aws/aws-sdk-go v1.44.224 h1:09CiaaF35nRmxrzWZ2uRq5v6Ghg/d2RiPjZnSgtt+RQ= github.com/aws/aws-sdk-go v1.44.224/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -265,16 +270,19 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.7.0 h1:YjAGVd3XmtK9ktAbX8Zg2g2PwLIMjGREZJHlV4j7NEo= -github.com/bits-and-blooms/bitset v1.7.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= -github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= -github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= -github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= +github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= +github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ= +github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c= +github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= -github.com/bufbuild/protocompile v0.5.1 h1:mixz5lJX4Hiz4FpqFREJHIXLfaLBntfaJv1h+/jS+Qg= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= +github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= -github.com/bytedance/sonic v1.8.0 h1:ea0Xadu+sHlu7x5O3gKhRpQ1IKiMrSiHttPF0ybECuA= -github.com/bytedance/sonic v1.8.0/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= +github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= +github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -285,8 +293,8 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA 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.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= @@ -315,29 +323,28 @@ github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230606202032-d96868fd481e h1:6QuLTQCQZueVNzoYYUuFfaRgBOpj6gIwQA1PZT2rfWM= -github.com/cockroachdb/pebble v0.0.0-20230606202032-d96868fd481e/go.mod h1:TkdVsGYRqtULUppt2RbC+YaKtTHnHoWa2apfFrSKABw= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/redact v1.1.4 h1:Y0XrVI2FAyofNyGveodTN//qdpPtFKcKTeCBsK3AHAQ= -github.com/cockroachdb/redact v1.1.4/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= +github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= -github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= -github.com/cometbft/cometbft v0.38.0-rc1 h1:ph6smlqX82aH+d72KuxDHqu29M7LyusSp/obfGsGX/w= -github.com/cometbft/cometbft v0.38.0-rc1/go.mod h1:5Jz0Z8YsHSf0ZaAqGvi/ifioSdVFPtEGrm8Y9T/993k= -github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= -github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= +github.com/cometbft/cometbft v0.38.12 h1:OWsLZN2KcSSFe8bet9xCn07VwhBnavPea3VyPnNq1bg= +github.com/cometbft/cometbft v0.38.12/go.mod h1:GPHp3/pehPqgX1930HmK1BpBLZPxB75v/dZg8Viwy+o= +github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= +github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/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= @@ -346,49 +353,46 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= -github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= -github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= -github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= +github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= +github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cosmos/iavl v1.0.0-beta.2 h1:XOsIM80Yyml/KifCXEYOy9tWCXwMAbLa91n6pReW07Y= -github.com/cosmos/iavl v1.0.0-beta.2/go.mod h1:EA97dJ07TBktRlG/iGzK6g1eCXNj1q3MGoFYkVzrwHE= -github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= -github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= +github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= +github.com/cosmos/iavl v1.2.0 h1:kVxTmjTh4k0Dh1VNL046v6BXqKziqMDzxo93oh3kOfM= +github.com/cosmos/iavl v1.2.0/go.mod h1:HidWWLVAtODJqFD6Hbne2Y0q3SdxByJepHUOeoH4LiI= +github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= +github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo= github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -github.com/cosmos/ledger-cosmos-go v0.13.0 h1:ex0CvCxToSR7j5WjrghPu2Bu9sSXKikjnVvUryNnx4s= -github.com/cosmos/ledger-cosmos-go v0.13.0/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= -github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= -github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creachadair/atomicfile v0.3.1 h1:yQORkHjSYySh/tv5th1dkKcn02NEW5JleB84sjt+W4Q= github.com/creachadair/atomicfile v0.3.1/go.mod h1:mwfrkRxFKwpNAflYZzytbSwxvbK6fdGRRlp0KEQc0qU= github.com/creachadair/tomledit v0.0.24 h1:5Xjr25R2esu1rKCbQEmjZYlrhFkDspoAbAKb6QKQDhQ= github.com/creachadair/tomledit v0.0.24/go.mod h1:9qHbShRWQzSCcn617cMzg4eab1vbLCOjOshAWSzWr8U= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew 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/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= 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= @@ -399,20 +403,21 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUn 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/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= -github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= +github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/emicklei/dot v1.4.2 h1:UbK6gX4yvrpHKlxuUQicwoAis4zl8Dzwit9SnbBAXWw= -github.com/emicklei/dot v1.4.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= +github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -424,39 +429,34 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -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/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= -github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= 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.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.21.0 h1:c9l5F1nPF30JIppulk4veau90PK6Smu3abgVtVQWon4= -github.com/getsentry/sentry-go v0.21.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= +github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.9.0 h1:OjyFBKICoexlu99ctXNR2gg+c5pKrKMuyjgARg9qeY8= -github.com/gin-gonic/gin v1.9.0/go.mod h1:W1Me9+hsUSyj3CePGrd1/QrKJMSJ1Tu/0hFEH89961k= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= +github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -473,14 +473,18 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU= -github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s= +github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= +github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= 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/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= @@ -489,13 +493,11 @@ github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/goccy/go-json v0.10.0 h1:mXKd9Qw4NuzShiRlOXKews24ufknHO7gx30lsDyokKA= -github.com/goccy/go-json v0.10.0/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -506,11 +508,9 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV 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/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/glog v1.2.2 h1:1+mZ9upx1Dh6FmUTFR1naJ77miKiXgALjWOZ3NVFPmY= +github.com/golang/glog v1.2.2/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -545,13 +545,12 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 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/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -570,18 +569,20 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -593,24 +594,24 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.3 h1:FAgZmpLl/SXurPEZyCMPBIiiYeTbqfjlbdnCNTAkbGE= -github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= -github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -620,10 +621,9 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.8.0 h1:UBtEZqx1bjXtOQ5BVTkuYghXrr3N4V123VKJK67vJZc= -github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= +github.com/googleapis/gax-go/v2 v2.12.3 h1:5/zPPDvw8Q1SuXjrqrZslrqT7dL/uJT2CQii/cLCKqA= +github.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBHwWRvkNFJUQcS4= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= @@ -634,8 +634,8 @@ github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= @@ -653,17 +653,19 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= -github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-getter v1.7.4 h1:3yQjWuxICvSpYwqSayAdKRFcvBl1y/vogCxczWSmix0= +github.com/hashicorp/go-getter v1.7.4/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= +github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v1.4.10 h1:xUbmA4jC6Dq163/fWcp8P3JuHilrHHMLNRxzGQJ9hNk= -github.com/hashicorp/go-plugin v1.4.10/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= @@ -679,8 +681,10 @@ github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -697,24 +701,18 @@ github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0Jr github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= -github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -736,53 +734,39 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= 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.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= -github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid v1.2.1 h1:vJi+O/nMdFt0vqm8NZBI6wzALWdA2X+egi0ogNyrC/w= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= +github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= -github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= -github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= +github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= -github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.0 h1:H4L/LhP7GOMf1j17oQAElHgVlbEje2h14A8Tz9cM2BE= -github.com/linxGnu/grocksdb v1.8.0/go.mod h1:09CeBborffXhXdNpEcOeZrLKEnRtrZFEpFdPNI9Zjjg= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= @@ -790,31 +774,21 @@ github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3v github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= @@ -838,9 +812,10 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -855,8 +830,9 @@ 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/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce h1:/pEpMk55wH0X+E5zedGEMOdLuWmV8P4+4W3+LZaM6kg= -github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= @@ -864,7 +840,6 @@ github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DV 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.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= @@ -872,10 +847,14 @@ github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa 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.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -885,19 +864,20 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 h1:W04oB3d0J01W5jgYRGKsV8LCM6g9EkCvPkZcmFuy0OE= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= @@ -908,9 +888,9 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -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/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -918,103 +898,102 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/prometheus/client_golang v1.20.1 h1:IMJXHOD6eARkQpxo8KkhgEVFlBNm+nkrFUyGlIu7Na8= +github.com/prometheus/client_golang v1.20.1/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= -github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= 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/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= 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.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= 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= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= +github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/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/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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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= @@ -1025,62 +1004,46 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= 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/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= -github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.9 h1:rmenucSohSTiyL09Y+l2OCk+FrMxGMzho2+tjr5ticU= -github.com/ugorji/go/codec v1.2.9/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= +github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= -github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= -github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= -go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/bbolt v1.3.10 h1:+BqfJTcCzTItrop8mq/lbzL8wSGtj94UO/3U31shqG0= +go.etcd.io/bbolt v1.3.10/go.mod h1:bK3UQLPJZly7IlNmV7uVHJDxfe5aK9Ll93e/74Y9oEQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1093,6 +1056,18 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw= +go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1102,12 +1077,15 @@ go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -golang.org/x/arch v0.0.0-20210923205945-b76863e36670 h1:18EFjUmQOcUvxNYSkA6jO9VAiXCnxFY6NyDX0bHDmkU= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= +golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1116,17 +1094,13 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1138,8 +1112,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-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= 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= @@ -1166,7 +1140,9 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1178,7 +1154,6 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -1188,7 +1163,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1210,15 +1184,12 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -1231,10 +1202,11 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1260,8 +1232,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= -golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= +golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= +golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1276,8 +1248,9 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1289,7 +1262,6 @@ golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1299,7 +1271,6 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1336,14 +1307,11 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1356,7 +1324,6 @@ golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1374,24 +1341,26 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1403,26 +1372,26 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -1469,7 +1438,6 @@ golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= @@ -1477,7 +1445,9 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= 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= @@ -1485,8 +1455,9 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -1536,8 +1507,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.122.0 h1:zDobeejm3E7pEG1mNHvdxvjs5XJoCMzyNH+CmwL94Es= -google.golang.org/api v0.122.0/go.mod h1:gcitW0lvnyWjSp9nKxAbdHKIZ6vF4aajGueeslZOyms= +google.golang.org/api v0.171.0 h1:w174hnBPqut76FzW5Qaupt7zY8Kql6fiVjgys4f58sU= +google.golang.org/api v0.171.0/go.mod h1:Hnq5AHm4OTMt2BUVjael2CWZFD6vksJdWCWiUAmjC9o= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1545,9 +1516,7 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1586,10 +1555,8 @@ google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1656,13 +1623,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 h1:x1vNwUhVOcsYoKyEGCZBH694SBmmBjA2EfauFVEI2+M= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a h1:HiYVD+FGJkTo+9zj1gqz0anapsa1JxjiSrN+BJKyUmE= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f h1:cUMEy+8oS78BWIH9OWazBkzbr090Od9tWBNtZHkOhf0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1704,8 +1670,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1722,8 +1688,9 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1736,10 +1703,8 @@ gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= @@ -1754,13 +1719,12 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1771,13 +1735,13 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -pgregory.net/rapid v0.6.2 h1:ErW5sL+UKtfBfUTsWHDCoeB+eZKLKMxrSd1VJY6W4bw= -pgregory.net/rapid v0.6.2/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/simapp/internal/testnet/cometrpc_test.go b/simapp/internal/testnet/cometrpc_test.go deleted file mode 100644 index fa463630f988..000000000000 --- a/simapp/internal/testnet/cometrpc_test.go +++ /dev/null @@ -1,167 +0,0 @@ -package testnet_test - -import ( - "context" - "testing" - "time" - - "cosmossdk.io/log" - "cosmossdk.io/simapp" - cmtcfg "github.com/cometbft/cometbft/config" - "github.com/cometbft/cometbft/rpc/client/http" - dbm "github.com/cosmos/cosmos-db" - "github.com/cosmos/cosmos-sdk/baseapp" - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" - "github.com/cosmos/cosmos-sdk/testutil/testnet" - sdk "github.com/cosmos/cosmos-sdk/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/stretchr/testify/require" -) - -const memdb = "memdb" - -// A single comet server in a network runs an RPC server successfully. -func TestCometRPC_SingleRPCServer(t *testing.T) { - const nVals = 2 - - valPKs := testnet.NewValidatorPrivKeys(nVals) - cmtVals := valPKs.CometGenesisValidators() - stakingVals := cmtVals.StakingValidators() - - const chainID = "comet-rpc-singleton" - - b := testnet.DefaultGenesisBuilderOnlyValidators( - chainID, - stakingVals, - sdk.NewCoin(sdk.DefaultBondDenom, sdk.DefaultPowerReduction), - ) - - jGenesis := b.Encode() - - // Logs shouldn't be necessary here because we are exercising CometStarter, - // and only doing a very basic check that the RPC talks to the app. - logger := log.NewNopLogger() - - nodes, err := testnet.NewNetwork(nVals, func(idx int) *testnet.CometStarter { - rootDir := t.TempDir() - - app := simapp.NewSimApp( - logger, - dbm.NewMemDB(), - nil, - true, - simtestutil.NewAppOptionsWithFlagHome(rootDir), - baseapp.SetChainID(chainID), - ) - - cfg := cmtcfg.DefaultConfig() - cfg.BaseConfig.DBBackend = memdb - - cs := testnet.NewCometStarter( - app, - cfg, - valPKs[idx].Val, - jGenesis, - rootDir, - ) - - // Only enable the RPC on the first service. - if idx == 0 { - cs = cs.RPCListen() - } - - return cs - }) - defer nodes.StopAndWait() - require.NoError(t, err) - - // Once HTTP client to be shared across the following subtests. - c, err := http.New(nodes[0].Config().RPC.ListenAddress, "/websocket") - require.NoError(t, err) - - t.Run("status query", func(t *testing.T) { - ctx := context.Background() - st, err := c.Status(ctx) - require.NoError(t, err) - - // Simple assertion to ensure we have a functioning RPC. - require.Equal(t, chainID, st.NodeInfo.Network) - }) - - // Block until reported height is at least 1, - // otherwise we can't make transactions. - require.NoError(t, testnet.WaitForNodeHeight(nodes[0], 1, 10*time.Second)) - - t.Run("simple abci query", func(t *testing.T) { - res, err := c.ABCIQuery( - context.Background(), - "/cosmos.bank.v1beta1.Query/TotalSupply", - nil, - ) - require.NoError(t, err) - - registry := codectypes.NewInterfaceRegistry() - cdc := codec.NewProtoCodec(registry) - - var tsResp banktypes.QueryTotalSupplyResponse - require.NoError(t, cdc.Unmarshal(res.Response.Value, &tsResp)) - - // Just check that something is reported in the supply. - require.NotEmpty(t, tsResp.Supply) - }) -} - -// Starting two comet instances with an RPC server, -// fails with a predictable error. -func TestCometRPC_MultipleRPCError(t *testing.T) { - const nVals = 2 - - valPKs := testnet.NewValidatorPrivKeys(nVals) - cmtVals := valPKs.CometGenesisValidators() - stakingVals := cmtVals.StakingValidators() - - const chainID = "comet-rpc-multiple" - - b := testnet.DefaultGenesisBuilderOnlyValidators( - chainID, - stakingVals, - sdk.NewCoin(sdk.DefaultBondDenom, sdk.DefaultPowerReduction), - ) - - jGenesis := b.Encode() - - // Logs shouldn't be necessary here because we are exercising CometStarter. - logger := log.NewNopLogger() - - nodes, err := testnet.NewNetwork(nVals, func(idx int) *testnet.CometStarter { - rootDir := t.TempDir() - - app := simapp.NewSimApp( - logger, - dbm.NewMemDB(), - nil, - true, - simtestutil.NewAppOptionsWithFlagHome(rootDir), - baseapp.SetChainID(chainID), - ) - - cfg := cmtcfg.DefaultConfig() - cfg.BaseConfig.DBBackend = memdb - - return testnet.NewCometStarter( - app, - cfg, - valPKs[idx].Val, - jGenesis, - rootDir, - ).RPCListen() // Every node has RPCListen enabled, which will cause a failure. - }) - defer nodes.StopAndWait() - - // Returned error is convertible to CometRPCInUseError. - // We can't test the exact value because it includes a stack trace. - require.Error(t, err) - require.ErrorAs(t, err, new(testnet.CometRPCInUseError)) -} diff --git a/simapp/internal/testnet/cometstarter_test.go b/simapp/internal/testnet/cometstarter_test.go deleted file mode 100644 index 9e9d1d53c4ac..000000000000 --- a/simapp/internal/testnet/cometstarter_test.go +++ /dev/null @@ -1,134 +0,0 @@ -package testnet_test - -import ( - "fmt" - "math/rand" - "net" - "testing" - "time" - - "cosmossdk.io/log" - "cosmossdk.io/simapp" - cmtcfg "github.com/cometbft/cometbft/config" - dbm "github.com/cosmos/cosmos-db" - "github.com/cosmos/cosmos-sdk/baseapp" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" - "github.com/cosmos/cosmos-sdk/testutil/testnet" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/require" -) - -// Use a limited set of available ports to ensure that -// retries eventually land on a free port. -func TestCometStarter_PortContention(t *testing.T) { - if testing.Short() { - t.Skip("skipping long test in short mode") - } - - const nVals = 4 - - // Find n+1 addresses that should be free. - // Ephemeral port range should start at about 49k+ - // according to `sysctl net.inet.ip.portrange` on macOS, - // and at about 32k+ on Linux - // according to `sysctl net.ipv4.ip_local_port_range`. - // - // Because we attempt to find free addresses outside that range, - // it is unlikely that another process will claim a port - // we discover to be free, during the time this test runs. - const portSeekStart = 19000 - reuseAddrs := make([]string, 0, nVals+1) - for i := portSeekStart; i < portSeekStart+1000; i++ { - addr := fmt.Sprintf("127.0.0.1:%d", i) - ln, err := net.Listen("tcp", addr) - if err != nil { - // No need to log the failure. - continue - } - - // If the port was free, append it to our reusable addresses. - reuseAddrs = append(reuseAddrs, "tcp://"+addr) - _ = ln.Close() - - if len(reuseAddrs) == nVals+1 { - break - } - } - - if len(reuseAddrs) != nVals+1 { - t.Fatalf("needed %d free ports but only found %d", nVals+1, len(reuseAddrs)) - } - - // Now that we have one more port than the number of validators, - // there is a good chance that picking a random port will conflict with a previously chosen one. - // But since CometStarter retries several times, - // it should eventually land on a free port. - - valPKs := testnet.NewValidatorPrivKeys(nVals) - cmtVals := valPKs.CometGenesisValidators() - stakingVals := cmtVals.StakingValidators() - - const chainID = "simapp-cometstarter" - - b := testnet.DefaultGenesisBuilderOnlyValidators( - chainID, - stakingVals, - sdk.NewCoin(sdk.DefaultBondDenom, sdk.DefaultPowerReduction), - ) - - jGenesis := b.Encode() - - // Use an info-level logger, because the debug logs in comet are noisy - // and there is a data race in comet debug logs, - // due to be fixed in v0.37.1 which is not yet released: - // https://github.com/cometbft/cometbft/pull/532 - logger := log.NewTestLoggerInfo(t) - - const nRuns = 4 - for i := 0; i < nRuns; i++ { - t.Run(fmt.Sprintf("attempt %d", i), func(t *testing.T) { - nodes, err := testnet.NewNetwork(nVals, func(idx int) *testnet.CometStarter { - rootDir := t.TempDir() - - app := simapp.NewSimApp( - logger.With("instance", idx), - dbm.NewMemDB(), - nil, - true, - simtestutil.NewAppOptionsWithFlagHome(rootDir), - baseapp.SetChainID(chainID), - ) - - cfg := cmtcfg.DefaultConfig() - - // memdb is sufficient for this test. - cfg.BaseConfig.DBBackend = "memdb" - - return testnet.NewCometStarter( - app, - cfg, - valPKs[idx].Val, - jGenesis, - rootDir, - ). - Logger(logger.With("rootmodule", fmt.Sprintf("comet_node-%d", idx))). - TCPAddrChooser(func() string { - // This chooser function is the key of this test, - // where there is only one more available address than there are nodes. - // Therefore it is likely that an address will already be in use, - // thereby exercising the address-in-use retry. - return reuseAddrs[rand.Intn(len(reuseAddrs))] - }) - }) - - // Ensure nodes are stopped completely, - // so that we don't get t.Cleanup errors around directories not being empty. - defer nodes.StopAndWait() - require.NoError(t, err) - - // Ensure that the height advances. - // Looking for height 2 seems more meaningful than 1. - require.NoError(t, testnet.WaitForNodeHeight(nodes[0], 2, 10*time.Second)) - }) - } -} diff --git a/simapp/internal/testnet/doc.go b/simapp/internal/testnet/doc.go deleted file mode 100644 index 19064ddd0f45..000000000000 --- a/simapp/internal/testnet/doc.go +++ /dev/null @@ -1,10 +0,0 @@ -// Package testnet contains tests for -// [github.com/cosmos/cosmos-sdk/testutil/testnet]. -// -// Eventually all of these tests will move into that package, -// but that is currently blocked on having a minimal app defined -// in the root cosmos-sdk Go module. -// Once that app is available, the contents of this package -// will be moved to testutil/testnet, -// and references to SimApp will be replaced by the minimal app. -package testnet diff --git a/simapp/internal/testnet/example_basic_test.go b/simapp/internal/testnet/example_basic_test.go deleted file mode 100644 index 99f7ae362cca..000000000000 --- a/simapp/internal/testnet/example_basic_test.go +++ /dev/null @@ -1,112 +0,0 @@ -package testnet_test - -import ( - "fmt" - "os" - "path/filepath" - - "cosmossdk.io/log" - "cosmossdk.io/simapp" - cmtcfg "github.com/cometbft/cometbft/config" - dbm "github.com/cosmos/cosmos-db" - "github.com/cosmos/cosmos-sdk/baseapp" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" - "github.com/cosmos/cosmos-sdk/testutil/testnet" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func Example_basicUsage() { - const nVals = 2 - - // Set up new private keys for the set of validators. - valPKs := testnet.NewValidatorPrivKeys(nVals) - - // Comet-style validators. - cmtVals := valPKs.CometGenesisValidators() - - // Cosmos SDK staking validators for genesis. - stakingVals := cmtVals.StakingValidators() - - const chainID = "example-basic" - - // Create a genesis builder that only requires validators, - // without any separate delegator accounts. - // - // If you need further customization, start with testnet.NewGenesisBuilder(). - b := testnet.DefaultGenesisBuilderOnlyValidators( - chainID, - stakingVals, - // The amount to use in each validator's account during gentx. - sdk.NewCoin(sdk.DefaultBondDenom, sdk.DefaultPowerReduction), - ) - - // JSON-formatted genesis. - jGenesis := b.Encode() - - // In this example, we have an outer root directory for the validators. - // Use t.TempDir() in tests. - rootDir, err := os.MkdirTemp("", "testnet-example-") - if err != nil { - panic(err) - } - defer os.RemoveAll(rootDir) - - // In tests, you probably want to use log.NewTestLoggerInfo(t). - logger := log.NewNopLogger() - - // The NewNetwork function creates a network of validators. - // We have to provide a callback to return CometStarter instances. - // NewNetwork will start all the comet instances concurrently - // and join the nodes together. - nodes, err := testnet.NewNetwork(nVals, func(idx int) *testnet.CometStarter { - // Make a new directory for the validator being created. - // In tests, this would be a simpler call to t.TempDir(). - dir := filepath.Join(rootDir, fmt.Sprintf("val-%d", idx)) - if err := os.Mkdir(dir, 0o755); err != nil { - panic(err) - } - - // TODO: use a different minimal app for this. - app := simapp.NewSimApp( - logger.With("instance", idx), - dbm.NewMemDB(), - nil, - true, - simtestutil.NewAppOptionsWithFlagHome(rootDir), - baseapp.SetChainID(chainID), - ) - - // Each CometStarter instance must be associated with - // a distinct comet Config object, - // as the CometStarter will automatically modify some fields, - // including P2P.ListenAddress. - cfg := cmtcfg.DefaultConfig() - - // No need to persist comet's DB to disk in this example. - cfg.BaseConfig.DBBackend = "memdb" - - return testnet.NewCometStarter( - app, - cfg, - valPKs[idx].Val, // Validator private key for this comet instance. - jGenesis, // Raw bytes of genesis file. - dir, // Where to put files on disk. - ).Logger(logger.With("root_module", fmt.Sprintf("comet_%d", idx))) - }) - // StopAndWait must be deferred before the error check, - // as the nodes value may contain some successfully started instances. - defer nodes.StopAndWait() - if err != nil { - panic(err) - } - - // Now you can begin interacting with the nodes. - // For the sake of this example, we'll just check - // a couple simple properties of one node. - fmt.Println(nodes[0].IsListening()) - fmt.Println(nodes[0].GenesisDoc().ChainID) - - // Output: - // true - // example-basic -} diff --git a/simapp/sim_bench_test.go b/simapp/sim_bench_test.go index b91372d56562..cbd5570e914f 100644 --- a/simapp/sim_bench_test.go +++ b/simapp/sim_bench_test.go @@ -5,12 +5,12 @@ import ( "os" "testing" - "github.com/spf13/viper" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" flag "github.com/spf13/pflag" + "github.com/spf13/viper" "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/server" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" @@ -61,7 +61,7 @@ func BenchmarkFullAppSimulation(b *testing.B) { appOptions.SetDefault(flags.FlagHome, DefaultNodeHome) appOptions.SetDefault(server.FlagInvCheckPeriod, simcli.FlagPeriodValue) - app := NewSimApp(logger, db, nil, true, appOptions, interBlockCacheOpt()) + app := NewSimApp(logger, db, nil, true, appOptions, interBlockCacheOpt(), baseapp.SetChainID(SimAppChainID)) // run randomized simulation _, simParams, simErr := simulation.SimulateFromSeed( @@ -116,7 +116,7 @@ func BenchmarkInvariants(b *testing.B) { appOptions[flags.FlagHome] = DefaultNodeHome appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue - app := NewSimApp(logger, db, nil, true, appOptions, interBlockCacheOpt()) + app := NewSimApp(logger, db, nil, true, appOptions, interBlockCacheOpt(), baseapp.SetChainID(SimAppChainID)) // run randomized simulation _, simParams, simErr := simulation.SimulateFromSeed( diff --git a/simapp/sim_test.go b/simapp/sim_test.go index 53599cafc6cc..2f4504cedf3e 100644 --- a/simapp/sim_test.go +++ b/simapp/sim_test.go @@ -76,6 +76,9 @@ func TestFullAppSimulation(t *testing.T) { appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue app := NewSimApp(logger, db, nil, true, appOptions, fauxMerkleModeOpt, baseapp.SetChainID(SimAppChainID)) + if !simcli.FlagSigverifyTxValue { + app.SetNotSigverifyTx() + } require.Equal(t, "SimApp", app.Name()) // run randomized simulation @@ -121,6 +124,9 @@ func TestAppImportExport(t *testing.T) { appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue app := NewSimApp(logger, db, nil, true, appOptions, fauxMerkleModeOpt, baseapp.SetChainID(SimAppChainID)) + if !simcli.FlagSigverifyTxValue { + app.SetNotSigverifyTx() + } require.Equal(t, "SimApp", app.Name()) // Run randomized simulation @@ -167,22 +173,21 @@ func TestAppImportExport(t *testing.T) { err = json.Unmarshal(exported.AppState, &genesisState) require.NoError(t, err) - defer func() { - if r := recover(); r != nil { - err := fmt.Sprintf("%v", r) - if !strings.Contains(err, "validator set is empty after InitGenesis") { - panic(r) - } + ctxA := app.NewContextLegacy(true, cmtproto.Header{Height: app.LastBlockHeight()}) + ctxB := newApp.NewContextLegacy(true, cmtproto.Header{Height: app.LastBlockHeight()}) + _, err = newApp.ModuleManager.InitGenesis(ctxB, app.AppCodec(), genesisState) + + if err != nil { + if strings.Contains(err.Error(), "validator set is empty after InitGenesis") { logger.Info("Skipping simulation as all validators have been unbonded") logger.Info("err", err, "stacktrace", string(debug.Stack())) + return } - }() - - ctxA := app.NewContextLegacy(true, cmtproto.Header{Height: app.LastBlockHeight()}) - ctxB := newApp.NewContextLegacy(true, cmtproto.Header{Height: app.LastBlockHeight()}) - newApp.ModuleManager.InitGenesis(ctxB, app.AppCodec(), genesisState) - newApp.StoreConsensusParams(ctxB, exported.ConsensusParams) + } + require.NoError(t, err) + err = newApp.StoreConsensusParams(ctxB, exported.ConsensusParams) + require.NoError(t, err) fmt.Printf("comparing stores...\n") // skip certain prefixes @@ -241,6 +246,9 @@ func TestAppSimulationAfterImport(t *testing.T) { appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue app := NewSimApp(logger, db, nil, true, appOptions, fauxMerkleModeOpt, baseapp.SetChainID(SimAppChainID)) + if !simcli.FlagSigverifyTxValue { + app.SetNotSigverifyTx() + } require.Equal(t, "SimApp", app.Name()) // Run randomized simulation @@ -363,6 +371,9 @@ func TestAppStateDeterminism(t *testing.T) { db := dbm.NewMemDB() app := NewSimApp(logger, db, nil, true, appOptions, interBlockCacheOpt(), baseapp.SetChainID(SimAppChainID)) + if !simcli.FlagSigverifyTxValue { + app.SetNotSigverifyTx() + } fmt.Printf( "running non-determinism simulation; seed %d: %d/%d, attempt: %d/%d\n", diff --git a/simapp/simd/cmd/root_v2.go b/simapp/simd/cmd/commands.go similarity index 55% rename from simapp/simd/cmd/root_v2.go rename to simapp/simd/cmd/commands.go index 3dd21f92b679..00c810442f78 100644 --- a/simapp/simd/cmd/root_v2.go +++ b/simapp/simd/cmd/commands.go @@ -1,134 +1,35 @@ -//go:build !app_v1 - package cmd import ( "errors" "io" - "os" cmtcfg "github.com/cometbft/cometbft/config" dbm "github.com/cosmos/cosmos-db" "github.com/spf13/cobra" "github.com/spf13/viper" - "cosmossdk.io/client/v2/autocli" - "cosmossdk.io/depinject" "cosmossdk.io/log" "cosmossdk.io/simapp" confixcmd "cosmossdk.io/tools/confix/cmd" - rosettaCmd "cosmossdk.io/tools/rosetta/cmd" "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/debug" - "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/keys" "github.com/cosmos/cosmos-sdk/client/pruning" "github.com/cosmos/cosmos-sdk/client/rpc" "github.com/cosmos/cosmos-sdk/client/snapshot" - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/server" serverconfig "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/cosmos/cosmos-sdk/types/tx/signing" authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli" - "github.com/cosmos/cosmos-sdk/x/auth/tx" - txmodule "github.com/cosmos/cosmos-sdk/x/auth/tx/config" - "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/crisis" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" ) -// NewRootCmd creates a new root command for simd. It is called once in the main function. -func NewRootCmd() *cobra.Command { - var ( - interfaceRegistry codectypes.InterfaceRegistry - appCodec codec.Codec - txConfig client.TxConfig - legacyAmino *codec.LegacyAmino - autoCliOpts autocli.AppOptions - moduleBasicManager module.BasicManager - ) - - if err := depinject.Inject(depinject.Configs(simapp.AppConfig, depinject.Supply(log.NewNopLogger())), - &interfaceRegistry, - &appCodec, - &txConfig, - &legacyAmino, - &autoCliOpts, - &moduleBasicManager, - ); err != nil { - panic(err) - } - - initClientCtx := client.Context{}. - WithCodec(appCodec). - WithInterfaceRegistry(interfaceRegistry). - WithLegacyAmino(legacyAmino). - WithInput(os.Stdin). - WithAccountRetriever(types.AccountRetriever{}). - WithHomeDir(simapp.DefaultNodeHome). - WithViper("") // In simapp, we don't use any prefix for env variables. - - rootCmd := &cobra.Command{ - Use: "simd", - Short: "simulation app", - PersistentPreRunE: func(cmd *cobra.Command, _ []string) error { - // set the default command outputs - cmd.SetOut(cmd.OutOrStdout()) - cmd.SetErr(cmd.ErrOrStderr()) - - initClientCtx = initClientCtx.WithCmdContext(cmd.Context()) - initClientCtx, err := client.ReadPersistentCommandFlags(initClientCtx, cmd.Flags()) - if err != nil { - return err - } - - initClientCtx, err = config.ReadFromClientConfig(initClientCtx) - if err != nil { - return err - } - - // This needs to go after ReadFromClientConfig, as that function - // sets the RPC client needed for SIGN_MODE_TEXTUAL. - enabledSignModes := append(tx.DefaultSignModes, signing.SignMode_SIGN_MODE_TEXTUAL) - txConfigOpts := tx.ConfigOptions{ - EnabledSignModes: enabledSignModes, - TextualCoinMetadataQueryFn: txmodule.NewGRPCCoinMetadataQueryFn(initClientCtx), - } - txConfigWithTextual, err := tx.NewTxConfigWithOptions( - codec.NewProtoCodec(interfaceRegistry), - txConfigOpts, - ) - if err != nil { - return err - } - initClientCtx = initClientCtx.WithTxConfig(txConfigWithTextual) - if err := client.SetCmdClientContextHandler(initClientCtx, cmd); err != nil { - return err - } - - customAppTemplate, customAppConfig := initAppConfig() - customCMTConfig := initCometBFTConfig() - - return server.InterceptConfigsPreRunHandler(cmd, customAppTemplate, customAppConfig, customCMTConfig) - }, - } - - initRootCmd(rootCmd, txConfig, interfaceRegistry, appCodec, moduleBasicManager) - - if err := autoCliOpts.EnhanceRootCommand(rootCmd); err != nil { - panic(err) - } - - return rootCmd -} - // initCometBFTConfig helps to override default CometBFT Config values. // return cmtcfg.DefaultConfig if no custom configuration is required for the application. func initCometBFTConfig() *cmtcfg.Config { @@ -146,19 +47,18 @@ func initCometBFTConfig() *cmtcfg.Config { func initAppConfig() (string, interface{}) { // The following code snippet is just for reference. - // WASMConfig defines configuration for the wasm module. - type WASMConfig struct { - // This is the maximum sdk gas (wasm and storage) that we allow for any x/wasm "smart" queries - QueryGasLimit uint64 `mapstructure:"query_gas_limit"` - - // Address defines the gRPC-web server to listen on - LruSize uint64 `mapstructure:"lru_size"` + // CustomConfig defines an arbitrary custom config to extend app.toml. + // If you don't need it, you can remove it. + // If you wish to add fields that correspond to flags that aren't in the SDK server config, + // this custom config can as well help. + type CustomConfig struct { + CustomField string `mapstructure:"custom-field"` } type CustomAppConfig struct { - serverconfig.Config + serverconfig.Config `mapstructure:",squash"` - WASM WASMConfig `mapstructure:"wasm"` + Custom CustomConfig `mapstructure:"custom"` } // Optionally allow the chain developer to overwrite the SDK's default @@ -179,21 +79,22 @@ func initAppConfig() (string, interface{}) { srvCfg.MinGasPrices = "0stake" // srvCfg.BaseConfig.IAVLDisableFastNode = true // disable fastnode by default + // Now we set the custom config default values. customAppConfig := CustomAppConfig{ Config: *srvCfg, - WASM: WASMConfig{ - LruSize: 1, - QueryGasLimit: 300000, + Custom: CustomConfig{ + CustomField: "anything", }, } + // The default SDK app template is defined in serverconfig.DefaultConfigTemplate. + // We append the custom config template to the default one. + // And we set the default config to the custom app template. customAppTemplate := serverconfig.DefaultConfigTemplate + ` -[wasm] -# This is the maximum sdk gas (wasm and storage) that we allow for any x/wasm "smart" queries -query_gas_limit = 300000 -# This is the number of wasm vm instances we keep cached in memory for speed-up -# Warning: this is currently unstable and may lead to crashes, best to keep for 0 unless testing locally -lru_size = 0` +[custom] +# That field will be parsed by server.InterceptConfigsPreRunHandler and held by viper. +# Do not forget to add quotes around the value if it is a string. +custom-field = "{{ .Custom.CustomField }}"` return customAppTemplate, customAppConfig } @@ -201,8 +102,6 @@ lru_size = 0` func initRootCmd( rootCmd *cobra.Command, txConfig client.TxConfig, - interfaceRegistry codectypes.InterfaceRegistry, - appCodec codec.Codec, basicManager module.BasicManager, ) { cfg := sdk.GetConfig() @@ -213,27 +112,24 @@ func initRootCmd( NewTestnetCmd(basicManager, banktypes.GenesisBalancesIterator{}), debug.Cmd(), confixcmd.ConfigCommand(), - pruning.Cmd(newApp), + pruning.Cmd(newApp, simapp.DefaultNodeHome), snapshot.Cmd(newApp), ) - server.AddCommands(rootCmd, simapp.DefaultNodeHome, newApp, appExport, addModuleInitFlags) + server.AddCommandsWithStartCmdOptions(rootCmd, simapp.DefaultNodeHome, newApp, appExport, server.StartCmdOptions{ + AddFlags: func(startCmd *cobra.Command) { + crisis.AddModuleInitFlags(startCmd) + }, + }) // add keybase, auxiliary RPC, query, genesis, and tx child commands rootCmd.AddCommand( - rpc.StatusCommand(), + server.StatusCommand(), genesisCommand(txConfig, basicManager), queryCommand(), txCommand(), - keys.Commands(simapp.DefaultNodeHome), + keys.Commands(), ) - - // add rosetta - rootCmd.AddCommand(rosettaCmd.RosettaCommand(interfaceRegistry, appCodec)) -} - -func addModuleInitFlags(startCmd *cobra.Command) { - crisis.AddModuleInitFlags(startCmd) } // genesisCommand builds genesis-related `simd genesis` command. Users may provide application specific commands as a parameter @@ -257,11 +153,12 @@ func queryCommand() *cobra.Command { } cmd.AddCommand( - rpc.ValidatorCommand(), + rpc.WaitTxCmd(), server.QueryBlockCmd(), authcmd.QueryTxsByEventsCmd(), server.QueryBlocksCmd(), authcmd.QueryTxCmd(), + server.QueryBlockResultsCmd(), ) return cmd @@ -285,7 +182,7 @@ func txCommand() *cobra.Command { authcmd.GetBroadcastCommand(), authcmd.GetEncodeCommand(), authcmd.GetDecodeCommand(), - authcmd.GetAuxToFeeCommand(), + authcmd.GetSimulateCmd(), ) return cmd @@ -299,7 +196,6 @@ func newApp( appOpts servertypes.AppOptions, ) servertypes.Application { baseappOptions := server.DefaultBaseappOptions(appOpts) - return simapp.NewSimApp( logger, db, traceStore, true, appOpts, @@ -318,13 +214,6 @@ func appExport( appOpts servertypes.AppOptions, modulesToExport []string, ) (servertypes.ExportedApp, error) { - // this check is necessary as we use the flag in x/upgrade. - // we can exit more gracefully by checking the flag here. - homePath, ok := appOpts.Get(flags.FlagHome).(string) - if !ok || homePath == "" { - return servertypes.ExportedApp{}, errors.New("application home not set") - } - viperAppOpts, ok := appOpts.(*viper.Viper) if !ok { return servertypes.ExportedApp{}, errors.New("appOpts is not viper.Viper") diff --git a/simapp/simd/cmd/root.go b/simapp/simd/cmd/root.go index 2de3d5d5eccb..19d197f95665 100644 --- a/simapp/simd/cmd/root.go +++ b/simapp/simd/cmd/root.go @@ -3,43 +3,22 @@ package cmd import ( - "errors" - "io" "os" "cosmossdk.io/log" "cosmossdk.io/simapp" "cosmossdk.io/simapp/params" - confixcmd "cosmossdk.io/tools/confix/cmd" - rosettaCmd "cosmossdk.io/tools/rosetta/cmd" - cmtcfg "github.com/cometbft/cometbft/config" dbm "github.com/cosmos/cosmos-db" "github.com/spf13/cobra" - "github.com/spf13/viper" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" - "github.com/cosmos/cosmos-sdk/client/debug" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/keys" - "github.com/cosmos/cosmos-sdk/client/pruning" - "github.com/cosmos/cosmos-sdk/client/rpc" - "github.com/cosmos/cosmos-sdk/client/snapshot" - "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/server" - serverconfig "github.com/cosmos/cosmos-sdk/server/config" - servertypes "github.com/cosmos/cosmos-sdk/server/types" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/types/tx/signing" - authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli" "github.com/cosmos/cosmos-sdk/x/auth/tx" - txmodule "github.com/cosmos/cosmos-sdk/x/auth/tx/config" + authtxconfig "github.com/cosmos/cosmos-sdk/x/auth/tx/config" "github.com/cosmos/cosmos-sdk/x/auth/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/cosmos/cosmos-sdk/x/crisis" - genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" ) // NewRootCmd creates a new root command for simd. It is called once in the @@ -47,7 +26,7 @@ import ( func NewRootCmd() *cobra.Command { // we "pre"-instantiate the application for getting the injected/configured encoding configuration // note, this is not necessary when using app wiring, as depinject can be directly used (see root_v2.go) - tempApp := simapp.NewSimApp(log.NewNopLogger(), dbm.NewMemDB(), nil, true, simtestutil.NewAppOptionsWithFlagHome(tempDir())) + tempApp := simapp.NewSimApp(log.NewNopLogger(), dbm.NewMemDB(), nil, true, simtestutil.NewAppOptionsWithFlagHome(simapp.DefaultNodeHome)) encodingConfig := params.EncodingConfig{ InterfaceRegistry: tempApp.InterfaceRegistry(), Codec: tempApp.AppCodec(), @@ -58,6 +37,7 @@ func NewRootCmd() *cobra.Command { initClientCtx := client.Context{}. WithCodec(encodingConfig.Codec). WithInterfaceRegistry(encodingConfig.InterfaceRegistry). + WithTxConfig(encodingConfig.TxConfig). WithLegacyAmino(encodingConfig.Amino). WithInput(os.Stdin). WithAccountRetriever(types.AccountRetriever{}). @@ -65,8 +45,9 @@ func NewRootCmd() *cobra.Command { WithViper("") // In simapp, we don't use any prefix for env variables. rootCmd := &cobra.Command{ - Use: "simd", - Short: "simulation app", + Use: "simd", + Short: "simulation app", + SilenceErrors: true, PersistentPreRunE: func(cmd *cobra.Command, _ []string) error { // set the default command outputs cmd.SetOut(cmd.OutOrStdout()) @@ -84,20 +65,24 @@ func NewRootCmd() *cobra.Command { } // This needs to go after ReadFromClientConfig, as that function - // sets the RPC client needed for SIGN_MODE_TEXTUAL. - enabledSignModes := append(tx.DefaultSignModes, signing.SignMode_SIGN_MODE_TEXTUAL) - txConfigOpts := tx.ConfigOptions{ - EnabledSignModes: enabledSignModes, - TextualCoinMetadataQueryFn: txmodule.NewGRPCCoinMetadataQueryFn(initClientCtx), + // sets the RPC client needed for SIGN_MODE_TEXTUAL. This sign mode + // is only available if the client is online. + if !initClientCtx.Offline { + enabledSignModes := append(tx.DefaultSignModes, signing.SignMode_SIGN_MODE_TEXTUAL) + txConfigOpts := tx.ConfigOptions{ + EnabledSignModes: enabledSignModes, + TextualCoinMetadataQueryFn: authtxconfig.NewGRPCCoinMetadataQueryFn(initClientCtx), + } + txConfig, err := tx.NewTxConfigWithOptions( + initClientCtx.Codec, + txConfigOpts, + ) + if err != nil { + return err + } + + initClientCtx = initClientCtx.WithTxConfig(txConfig) } - txConfigWithTextual, err := tx.NewTxConfigWithOptions( - codec.NewProtoCodec(encodingConfig.InterfaceRegistry), - txConfigOpts, - ) - if err != nil { - return err - } - initClientCtx = initClientCtx.WithTxConfig(txConfigWithTextual) if err := client.SetCmdClientContextHandler(initClientCtx, cmd); err != nil { return err @@ -110,234 +95,15 @@ func NewRootCmd() *cobra.Command { }, } - initRootCmd(rootCmd, encodingConfig, tempApp.BasicModuleManager) + initRootCmd(rootCmd, encodingConfig.TxConfig, tempApp.BasicModuleManager) + + // add keyring to autocli opts + autoCliOpts := tempApp.AutoCliOpts() + autoCliOpts.ClientCtx = initClientCtx - if err := tempApp.AutoCliOpts().EnhanceRootCommand(rootCmd); err != nil { + if err := autoCliOpts.EnhanceRootCommand(rootCmd); err != nil { panic(err) } return rootCmd } - -// initCometBFTConfig helps to override default CometBFT Config values. -// return cmtcfg.DefaultConfig if no custom configuration is required for the application. -func initCometBFTConfig() *cmtcfg.Config { - cfg := cmtcfg.DefaultConfig() - - // these values put a higher strain on node memory - // cfg.P2P.MaxNumInboundPeers = 100 - // cfg.P2P.MaxNumOutboundPeers = 40 - - return cfg -} - -// initAppConfig helps to override default appConfig template and configs. -// return "", nil if no custom configuration is required for the application. -func initAppConfig() (string, interface{}) { - // The following code snippet is just for reference. - - // WASMConfig defines configuration for the wasm module. - type WASMConfig struct { - // This is the maximum sdk gas (wasm and storage) that we allow for any x/wasm "smart" queries - QueryGasLimit uint64 `mapstructure:"query_gas_limit"` - - // Address defines the gRPC-web server to listen on - LruSize uint64 `mapstructure:"lru_size"` - } - - type CustomAppConfig struct { - serverconfig.Config - - WASM WASMConfig `mapstructure:"wasm"` - } - - // Optionally allow the chain developer to overwrite the SDK's default - // server config. - srvCfg := serverconfig.DefaultConfig() - // The SDK's default minimum gas price is set to "" (empty value) inside - // app.toml. If left empty by validators, the node will halt on startup. - // However, the chain developer can set a default app.toml value for their - // validators here. - // - // In summary: - // - if you leave srvCfg.MinGasPrices = "", all validators MUST tweak their - // own app.toml config, - // - if you set srvCfg.MinGasPrices non-empty, validators CAN tweak their - // own app.toml to override, or use this default value. - // - // In simapp, we set the min gas prices to 0. - srvCfg.MinGasPrices = "0stake" - // srvCfg.BaseConfig.IAVLDisableFastNode = true // disable fastnode by default - - customAppConfig := CustomAppConfig{ - Config: *srvCfg, - WASM: WASMConfig{ - LruSize: 1, - QueryGasLimit: 300000, - }, - } - - customAppTemplate := serverconfig.DefaultConfigTemplate + ` -[wasm] -# This is the maximum sdk gas (wasm and storage) that we allow for any x/wasm "smart" queries -query_gas_limit = 300000 -# This is the number of wasm vm instances we keep cached in memory for speed-up -# Warning: this is currently unstable and may lead to crashes, best to keep for 0 unless testing locally -lru_size = 0` - - return customAppTemplate, customAppConfig -} - -func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig, basicManager module.BasicManager) { - cfg := sdk.GetConfig() - cfg.Seal() - - rootCmd.AddCommand( - genutilcli.InitCmd(basicManager, simapp.DefaultNodeHome), - NewTestnetCmd(basicManager, banktypes.GenesisBalancesIterator{}), - debug.Cmd(), - confixcmd.ConfigCommand(), - pruning.Cmd(newApp), - snapshot.Cmd(newApp), - ) - - server.AddCommands(rootCmd, simapp.DefaultNodeHome, newApp, appExport, addModuleInitFlags) - - // add keybase, auxiliary RPC, query, genesis, and tx child commands - rootCmd.AddCommand( - rpc.StatusCommand(), - genesisCommand(encodingConfig, basicManager), - txCommand(), - queryCommand(), - keys.Commands(simapp.DefaultNodeHome), - ) - - rootCmd.AddCommand(rosettaCmd.RosettaCommand(encodingConfig.InterfaceRegistry, encodingConfig.Codec)) -} - -func addModuleInitFlags(startCmd *cobra.Command) { - crisis.AddModuleInitFlags(startCmd) -} - -// genesisCommand builds genesis-related `simd genesis` command. Users may provide application specific commands as a parameter -func genesisCommand(encodingConfig params.EncodingConfig, basicManager module.BasicManager, cmds ...*cobra.Command) *cobra.Command { - cmd := genutilcli.Commands(encodingConfig.TxConfig, basicManager, simapp.DefaultNodeHome) - - for _, subCmd := range cmds { - cmd.AddCommand(subCmd) - } - return cmd -} - -func queryCommand() *cobra.Command { - cmd := &cobra.Command{ - Use: "query", - Aliases: []string{"q"}, - Short: "Querying subcommands", - DisableFlagParsing: false, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - cmd.AddCommand( - rpc.ValidatorCommand(), - server.QueryBlockCmd(), - authcmd.QueryTxsByEventsCmd(), - server.QueryBlocksCmd(), - authcmd.QueryTxCmd(), - ) - - return cmd -} - -func txCommand() *cobra.Command { - cmd := &cobra.Command{ - Use: "tx", - Short: "Transactions subcommands", - DisableFlagParsing: false, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - cmd.AddCommand( - authcmd.GetSignCommand(), - authcmd.GetSignBatchCommand(), - authcmd.GetMultiSignCommand(), - authcmd.GetMultiSignBatchCmd(), - authcmd.GetValidateSignaturesCommand(), - authcmd.GetBroadcastCommand(), - authcmd.GetEncodeCommand(), - authcmd.GetDecodeCommand(), - authcmd.GetAuxToFeeCommand(), - ) - - return cmd -} - -// newApp creates the application -func newApp( - logger log.Logger, - db dbm.DB, - traceStore io.Writer, - appOpts servertypes.AppOptions, -) servertypes.Application { - baseappOptions := server.DefaultBaseappOptions(appOpts) - - return simapp.NewSimApp( - logger, db, traceStore, true, - appOpts, - baseappOptions..., - ) -} - -// appExport creates a new simapp (optionally at a given height) and exports state. -func appExport( - logger log.Logger, - db dbm.DB, - traceStore io.Writer, - height int64, - forZeroHeight bool, - jailAllowedAddrs []string, - appOpts servertypes.AppOptions, - modulesToExport []string, -) (servertypes.ExportedApp, error) { - var simApp *simapp.SimApp - - // this check is necessary as we use the flag in x/upgrade. - // we can exit more gracefully by checking the flag here. - homePath, ok := appOpts.Get(flags.FlagHome).(string) - if !ok || homePath == "" { - return servertypes.ExportedApp{}, errors.New("application home not set") - } - - viperAppOpts, ok := appOpts.(*viper.Viper) - if !ok { - return servertypes.ExportedApp{}, errors.New("appOpts is not viper.Viper") - } - - // overwrite the FlagInvCheckPeriod - viperAppOpts.Set(server.FlagInvCheckPeriod, 1) - appOpts = viperAppOpts - - if height != -1 { - simApp = simapp.NewSimApp(logger, db, traceStore, false, appOpts) - - if err := simApp.LoadHeight(height); err != nil { - return servertypes.ExportedApp{}, err - } - } else { - simApp = simapp.NewSimApp(logger, db, traceStore, true, appOpts) - } - - return simApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs, modulesToExport) -} - -var tempDir = func() string { - dir, err := os.MkdirTemp("", "simapp") - if err != nil { - dir = simapp.DefaultNodeHome - } - defer os.RemoveAll(dir) - - return dir -} diff --git a/simapp/simd/cmd/root_di.go b/simapp/simd/cmd/root_di.go new file mode 100644 index 000000000000..4fe8c4d3ce75 --- /dev/null +++ b/simapp/simd/cmd/root_di.go @@ -0,0 +1,116 @@ +//go:build !app_v1 + +package cmd + +import ( + "os" + + "github.com/spf13/cobra" + + "cosmossdk.io/client/v2/autocli" + "cosmossdk.io/depinject" + "cosmossdk.io/log" + "cosmossdk.io/simapp" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/config" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/server" + "github.com/cosmos/cosmos-sdk/types/module" + "github.com/cosmos/cosmos-sdk/x/auth/tx" + authtxconfig "github.com/cosmos/cosmos-sdk/x/auth/tx/config" + "github.com/cosmos/cosmos-sdk/x/auth/types" +) + +// NewRootCmd creates a new root command for simd. It is called once in the main function. +func NewRootCmd() *cobra.Command { + var ( + autoCliOpts autocli.AppOptions + moduleBasicManager module.BasicManager + clientCtx client.Context + ) + + if err := depinject.Inject( + depinject.Configs(simapp.AppConfig, + depinject.Supply( + log.NewNopLogger(), + ), + depinject.Provide( + ProvideClientContext, + ), + ), + &autoCliOpts, + &moduleBasicManager, + &clientCtx, + ); err != nil { + panic(err) + } + + rootCmd := &cobra.Command{ + Use: "simd", + Short: "simulation app", + SilenceErrors: true, + PersistentPreRunE: func(cmd *cobra.Command, _ []string) error { + // set the default command outputs + cmd.SetOut(cmd.OutOrStdout()) + cmd.SetErr(cmd.ErrOrStderr()) + + clientCtx = clientCtx.WithCmdContext(cmd.Context()).WithViper("") + clientCtx, err := client.ReadPersistentCommandFlags(clientCtx, cmd.Flags()) + if err != nil { + return err + } + + clientCtx, err = config.ReadFromClientConfig(clientCtx) + if err != nil { + return err + } + + if err := client.SetCmdClientContextHandler(clientCtx, cmd); err != nil { + return err + } + + customAppTemplate, customAppConfig := initAppConfig() + customCMTConfig := initCometBFTConfig() + + return server.InterceptConfigsPreRunHandler(cmd, customAppTemplate, customAppConfig, customCMTConfig) + }, + } + + initRootCmd(rootCmd, clientCtx.TxConfig, moduleBasicManager) + + if err := autoCliOpts.EnhanceRootCommand(rootCmd); err != nil { + panic(err) + } + + return rootCmd +} + +func ProvideClientContext( + appCodec codec.Codec, + interfaceRegistry codectypes.InterfaceRegistry, + txConfigOpts tx.ConfigOptions, + legacyAmino *codec.LegacyAmino, +) client.Context { + clientCtx := client.Context{}. + WithCodec(appCodec). + WithInterfaceRegistry(interfaceRegistry). + WithLegacyAmino(legacyAmino). + WithInput(os.Stdin). + WithAccountRetriever(types.AccountRetriever{}). + WithHomeDir(simapp.DefaultNodeHome). + WithViper("") // In simapp, we don't use any prefix for env variables. + + clientCtx, _ = config.ReadFromClientConfig(clientCtx) + + // textual is enabled by default, we need to re-create the tx config grpc instead of bank keeper. + txConfigOpts.TextualCoinMetadataQueryFn = authtxconfig.NewGRPCCoinMetadataQueryFn(clientCtx) + txConfig, err := tx.NewTxConfigWithOptions(clientCtx.Codec, txConfigOpts) + if err != nil { + panic(err) + } + clientCtx = clientCtx.WithTxConfig(txConfig) + + return clientCtx +} diff --git a/simapp/simd/cmd/cmd_test.go b/simapp/simd/cmd/root_test.go similarity index 99% rename from simapp/simd/cmd/cmd_test.go rename to simapp/simd/cmd/root_test.go index a9c2f8ba537c..5d80df267f55 100644 --- a/simapp/simd/cmd/cmd_test.go +++ b/simapp/simd/cmd/root_test.go @@ -8,6 +8,7 @@ import ( "cosmossdk.io/simapp" "cosmossdk.io/simapp/simd/cmd" + "github.com/cosmos/cosmos-sdk/client/flags" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" diff --git a/simapp/simd/cmd/testnet.go b/simapp/simd/cmd/testnet.go index cd539255b189..d96244cfdf3f 100644 --- a/simapp/simd/cmd/testnet.go +++ b/simapp/simd/cmd/testnet.go @@ -23,6 +23,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/server" srvconfig "github.com/cosmos/cosmos-sdk/server/config" "github.com/cosmos/cosmos-sdk/testutil" @@ -83,7 +84,7 @@ func addTestnetFlagsToCmd(cmd *cobra.Command) { // support old flags name for backwards compatibility cmd.Flags().SetNormalizeFunc(func(f *pflag.FlagSet, name string) pflag.NormalizedName { - if name == "algo" { + if name == flags.FlagKeyAlgorithm { name = flags.FlagKeyType } @@ -144,7 +145,7 @@ Example: args.numValidators, _ = cmd.Flags().GetInt(flagNumValidators) args.algo, _ = cmd.Flags().GetString(flags.FlagKeyType) - return initTestnetFiles(clientCtx, cmd, config, mbm, genBalIterator, args) + return initTestnetFiles(clientCtx, cmd, config, mbm, genBalIterator, clientCtx.TxConfig.SigningContext().ValidatorAddressCodec(), args) }, } @@ -204,6 +205,7 @@ func initTestnetFiles( nodeConfig *cmtconfig.Config, mbm module.BasicManager, genBalIterator banktypes.GenesisBalancesIterator, + valAddrCodec runtime.ValidatorAddressCodec, args initArgs, ) error { if args.chainID == "" { @@ -296,9 +298,13 @@ func initTestnetFiles( genBalances = append(genBalances, banktypes.Balance{Address: addr.String(), Coins: coins.Sort()}) genAccounts = append(genAccounts, authtypes.NewBaseAccount(addr, nil, 0, 0)) + valStr, err := valAddrCodec.BytesToString(sdk.ValAddress(addr)) + if err != nil { + return err + } valTokens := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) createValMsg, err := stakingtypes.NewMsgCreateValidator( - sdk.ValAddress(addr), + valStr, valPubKeys[i], sdk.NewCoin(sdk.DefaultBondDenom, valTokens), stakingtypes.NewDescription(nodeDirName, "", "", "", ""), @@ -336,6 +342,7 @@ func initTestnetFiles( return err } + srvconfig.SetConfigTemplate(srvconfig.DefaultConfigTemplate) srvconfig.WriteConfigFile(filepath.Join(nodeDir, "config", "app.toml"), simappConfig) } @@ -345,7 +352,7 @@ func initTestnetFiles( err := collectGenFiles( clientCtx, nodeConfig, args.chainID, nodeIDs, valPubKeys, args.numValidators, - args.outputDir, args.nodeDirPrefix, args.nodeDaemonHome, genBalIterator, + args.outputDir, args.nodeDirPrefix, args.nodeDaemonHome, genBalIterator, valAddrCodec, ) if err != nil { return err @@ -402,7 +409,7 @@ func initGenFiles( func collectGenFiles( clientCtx client.Context, nodeConfig *cmtconfig.Config, chainID string, nodeIDs []string, valPubKeys []cryptotypes.PubKey, numValidators int, - outputDir, nodeDirPrefix, nodeDaemonHome string, genBalIterator banktypes.GenesisBalancesIterator, + outputDir, nodeDirPrefix, nodeDaemonHome string, genBalIterator banktypes.GenesisBalancesIterator, valAddrCodec runtime.ValidatorAddressCodec, ) error { var appState json.RawMessage genTime := cmttime.Now() @@ -423,7 +430,8 @@ func collectGenFiles( return err } - nodeAppState, err := genutil.GenAppStateFromConfig(clientCtx.Codec, clientCtx.TxConfig, nodeConfig, initCfg, appGenesis, genBalIterator, genutiltypes.DefaultMessageValidator) + nodeAppState, err := genutil.GenAppStateFromConfig(clientCtx.Codec, clientCtx.TxConfig, nodeConfig, initCfg, appGenesis, genBalIterator, genutiltypes.DefaultMessageValidator, + valAddrCodec) if err != nil { return err } diff --git a/simapp/simd/cmd/testnet_test.go b/simapp/simd/cmd/testnet_test.go index 71ef4d304618..8cc84047a640 100644 --- a/simapp/simd/cmd/testnet_test.go +++ b/simapp/simd/cmd/testnet_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/require" "cosmossdk.io/log" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/server" diff --git a/simapp/simd/main.go b/simapp/simd/main.go index 9890b4c0b0d5..4e7549b21411 100644 --- a/simapp/simd/main.go +++ b/simapp/simd/main.go @@ -1,18 +1,20 @@ package main import ( + "fmt" "os" - "cosmossdk.io/log" + clientv2helpers "cosmossdk.io/client/v2/helpers" "cosmossdk.io/simapp" "cosmossdk.io/simapp/simd/cmd" + svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" ) func main() { rootCmd := cmd.NewRootCmd() - if err := svrcmd.Execute(rootCmd, "", simapp.DefaultNodeHome); err != nil { - log.NewLogger(rootCmd.OutOrStderr()).Error("failure when running app", "err", err) + if err := svrcmd.Execute(rootCmd, clientv2helpers.EnvPrefix, simapp.DefaultNodeHome); err != nil { + fmt.Fprintln(rootCmd.OutOrStderr(), err) os.Exit(1) } } diff --git a/simapp/sonar-project.properties b/simapp/sonar-project.properties deleted file mode 100644 index 1da573f424c1..000000000000 --- a/simapp/sonar-project.properties +++ /dev/null @@ -1,14 +0,0 @@ -sonar.projectKey=cosmos-sdk-simapp -sonar.organization=cosmos - -sonar.projectName=Cosmos SDK - SimApp -sonar.project.monorepo.enabled=true - -sonar.sources=. -sonar.exclusions=**/*_test.go -sonar.tests=. -sonar.test.inclusions=**/*_test.go -sonar.go.coverage.reportPaths=coverage.out - -sonar.sourceEncoding=UTF-8 -sonar.scm.provider=git \ No newline at end of file diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go index bb36b5ee2d5f..7043f2eba3bf 100644 --- a/simapp/test_helpers.go +++ b/simapp/test_helpers.go @@ -6,14 +6,14 @@ import ( "os" "testing" - "cosmossdk.io/log" - sdkmath "cosmossdk.io/math" abci "github.com/cometbft/cometbft/abci/types" cmtjson "github.com/cometbft/cometbft/libs/json" cmttypes "github.com/cometbft/cometbft/types" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require" + "cosmossdk.io/log" + sdkmath "cosmossdk.io/math" pruningtypes "cosmossdk.io/store/pruning/types" bam "github.com/cosmos/cosmos-sdk/baseapp" @@ -190,8 +190,12 @@ func AddTestAddrsIncremental(app *SimApp, ctx sdk.Context, accNum int, accAmt sd func addTestAddrs(app *SimApp, ctx sdk.Context, accNum int, accAmt sdkmath.Int, strategy simtestutil.GenerateAccountStrategy) []sdk.AccAddress { testAddrs := strategy(accNum) + bondDenom, err := app.StakingKeeper.BondDenom(ctx) + if err != nil { + panic(err) + } - initCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), accAmt)) + initCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, accAmt)) for _, addr := range testAddrs { initAccountWithCoins(app, ctx, addr, initCoins) diff --git a/simapp/testutil_network_test.go b/simapp/testutil_network_test.go index f12cbae39dfa..fad10ea95474 100644 --- a/simapp/testutil_network_test.go +++ b/simapp/testutil_network_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/suite" "cosmossdk.io/simapp" + "github.com/cosmos/cosmos-sdk/testutil/network" ) diff --git a/simapp/upgrades.go b/simapp/upgrades.go index d59e78108d72..66c9fb87e7c0 100644 --- a/simapp/upgrades.go +++ b/simapp/upgrades.go @@ -4,6 +4,7 @@ import ( "context" storetypes "cosmossdk.io/store/types" + circuittypes "cosmossdk.io/x/circuit/types" upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/types/module" @@ -31,7 +32,11 @@ func (app SimApp) RegisterUpgradeHandlers() { } if upgradeInfo.Name == UpgradeName && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { - storeUpgrades := storetypes.StoreUpgrades{} + storeUpgrades := storetypes.StoreUpgrades{ + Added: []string{ + circuittypes.ModuleName, + }, + } // configure store loader that checks if version == upgradeHeight and applies store upgrades app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) diff --git a/store/CHANGELOG.md b/store/CHANGELOG.md index 2d0ab929b924..25154cae464e 100644 --- a/store/CHANGELOG.md +++ b/store/CHANGELOG.md @@ -23,27 +23,50 @@ Ref: https://keepachangelog.com/en/1.0.0/ # Changelog -## [Unreleased] +## v1.1.1 (September 06, 2024) + +### Improvements + +* [#21574](https://github.com/cosmos/cosmos-sdk/pull/21574) Upgrade IVL to IAVL 1.2.0. + +## v1.1.0 (March 20, 2024) + +### Improvements + +* [#19770](https://github.com/cosmos/cosmos-sdk/pull/19770) Upgrade IAVL to IAVL v1.1.1. + +## v1.0.2 (January 10, 2024) + +### Bug Fixes + +* [#18897](https://github.com/cosmos/cosmos-sdk/pull/18897) Replace panic in pruning to avoid consensus halting. + +## v1.0.1 (November 28, 2023) + +### Bug Fixes + +* [#18563](https://github.com/cosmos/cosmos-sdk/pull/18563) `LastCommitID().Hash` will always return `sha256([]byte{})` if the store is empty. + +## v1.0.0 (October 31, 2023) ### Features +* [#17294](https://github.com/cosmos/cosmos-sdk/pull/17294) Add snapshot manager Close method. * [#15568](https://github.com/cosmos/cosmos-sdk/pull/15568) Migrate the `iavl` to the new key format. - * Remove `DeleteVersion`, `DeleteVersions`, `LazyLoadVersionForOverwriting` from `iavl` tree API. - * Add `DeleteVersionsTo` and `SaveChangeSet`, since it will keep versions sequentially like `fromVersion` to `toVersion`. - * Refactor the pruning manager to use `DeleteVersionsTo`. + * Remove `DeleteVersion`, `DeleteVersions`, `LazyLoadVersionForOverwriting` from `iavl` tree API. + * Add `DeleteVersionsTo` and `SaveChangeSet`, since it will keep versions sequentially like `fromVersion` to `toVersion`. + * Refactor the pruning manager to use `DeleteVersionsTo`. * [#15712](https://github.com/cosmos/cosmos-sdk/pull/15712) Add `WorkingHash` function to the store interface to get the current app hash before commit. - * [#14645](https://github.com/cosmos/cosmos-sdk/pull/14645) Add limit to the length of key and value. * [#15683](https://github.com/cosmos/cosmos-sdk/pull/15683) `rootmulti.Store.CacheMultiStoreWithVersion` now can handle loading archival states that don't persist any of the module stores the current state has. * [#16060](https://github.com/cosmos/cosmos-sdk/pull/16060) Support saving restoring snapshot locally. +* [#14746](https://github.com/cosmos/cosmos-sdk/pull/14746) The `store` module is extracted to have a separate go.mod file which allows it be a standalone module. +* [#14410](https://github.com/cosmos/cosmos-sdk/pull/14410) `rootmulti.Store.loadVersion` has validation to check if all the module stores' height is correct, it will error if any module store has incorrect height. -### API Breaking Changes - -* [#16321](https://github.com/cosmos/cosmos-sdk/pull/16321) QueryInterface defines its own request and response types instead of relying on comet/abci & returns an error +### Improvements -## [v0.1.0-alpha.1](https://github.com/cosmos/cosmos-sdk/releases/tag/store%2Fv0.1.0-alpha.1) - 2023-03-17 +* [#17158](https://github.com/cosmos/cosmos-sdk/pull/17158) Start the goroutine after need to create a snapshot. -### Features +### API Breaking Changes -* [#14746](https://github.com/cosmos/cosmos-sdk/pull/14746) The `store` module is extracted to have a separate go.mod file which allows it be a standalone module. -* [#14410](https://github.com/cosmos/cosmos-sdk/pull/14410) `rootmulti.Store.loadVersion` has validation to check if all the module stores' height is correct, it will error if any module store has incorrect height. +* [#16321](https://github.com/cosmos/cosmos-sdk/pull/16321) QueryInterface defines its own request and response types instead of relying on comet/abci & returns an error diff --git a/store/cache/cache.go b/store/cache/cache.go index 976b4525260c..98d17d0341ac 100644 --- a/store/cache/cache.go +++ b/store/cache/cache.go @@ -3,10 +3,10 @@ package cache import ( "fmt" + lru "github.com/hashicorp/golang-lru" + "cosmossdk.io/store/cachekv" "cosmossdk.io/store/types" - - lru "github.com/hashicorp/golang-lru" ) var ( diff --git a/store/cache/cache_test.go b/store/cache/cache_test.go index 0340f7ecbd8d..efbf22c8e18e 100644 --- a/store/cache/cache_test.go +++ b/store/cache/cache_test.go @@ -13,10 +13,11 @@ import ( "cosmossdk.io/store/cachekv" iavlstore "cosmossdk.io/store/iavl" "cosmossdk.io/store/types" + "cosmossdk.io/store/wrapper" ) func TestGetOrSetStoreCache(t *testing.T) { - db := dbm.NewMemDB() + db := wrapper.NewDBWrapper(dbm.NewMemDB()) mngr := cache.NewCommitKVStoreCacheManager(cache.DefaultCommitKVStoreCacheSize) sKey := types.NewKVStoreKey("test") @@ -29,7 +30,7 @@ func TestGetOrSetStoreCache(t *testing.T) { } func TestUnwrap(t *testing.T) { - db := dbm.NewMemDB() + db := wrapper.NewDBWrapper(dbm.NewMemDB()) mngr := cache.NewCommitKVStoreCacheManager(cache.DefaultCommitKVStoreCacheSize) sKey := types.NewKVStoreKey("test") @@ -42,7 +43,7 @@ func TestUnwrap(t *testing.T) { } func TestStoreCache(t *testing.T) { - db := dbm.NewMemDB() + db := wrapper.NewDBWrapper(dbm.NewMemDB()) mngr := cache.NewCommitKVStoreCacheManager(cache.DefaultCommitKVStoreCacheSize) sKey := types.NewKVStoreKey("test") @@ -68,7 +69,7 @@ func TestStoreCache(t *testing.T) { } func TestReset(t *testing.T) { - db := dbm.NewMemDB() + db := wrapper.NewDBWrapper(dbm.NewMemDB()) mngr := cache.NewCommitKVStoreCacheManager(cache.DefaultCommitKVStoreCacheSize) sKey := types.NewKVStoreKey("test") @@ -88,7 +89,7 @@ func TestReset(t *testing.T) { } func TestCacheWrap(t *testing.T) { - db := dbm.NewMemDB() + db := wrapper.NewDBWrapper(dbm.NewMemDB()) mngr := cache.NewCommitKVStoreCacheManager(cache.DefaultCommitKVStoreCacheSize) sKey := types.NewKVStoreKey("test") diff --git a/store/cachekv/benchmark_test.go b/store/cachekv/benchmark_test.go index 3f718e3a3741..158549b4bd3b 100644 --- a/store/cachekv/benchmark_test.go +++ b/store/cachekv/benchmark_test.go @@ -4,14 +4,16 @@ import ( fmt "fmt" "testing" + dbm "github.com/cosmos/cosmos-db" + "github.com/stretchr/testify/require" + "cosmossdk.io/store/cachekv" "cosmossdk.io/store/dbadapter" "cosmossdk.io/store/types" - dbm "github.com/cosmos/cosmos-db" - "github.com/stretchr/testify/require" ) func DoBenchmarkDeepCacheStack(b *testing.B, depth int) { + b.Helper() db := dbm.NewMemDB() initialStore := cachekv.NewStore(dbadapter.Store{DB: db}) diff --git a/store/cachekv/internal/btree.go b/store/cachekv/internal/btree.go index 1894db97a1fa..209f7e58c4dd 100644 --- a/store/cachekv/internal/btree.go +++ b/store/cachekv/internal/btree.go @@ -4,8 +4,9 @@ import ( "bytes" "errors" - "cosmossdk.io/store/types" "github.com/tidwall/btree" + + "cosmossdk.io/store/types" ) const ( diff --git a/store/cachekv/internal/btree_test.go b/store/cachekv/internal/btree_test.go index 4ee075d4cef6..06437997f636 100644 --- a/store/cachekv/internal/btree_test.go +++ b/store/cachekv/internal/btree_test.go @@ -3,8 +3,9 @@ package internal import ( "testing" - "cosmossdk.io/store/types" "github.com/stretchr/testify/require" + + "cosmossdk.io/store/types" ) func TestGetSetDelete(t *testing.T) { @@ -182,6 +183,7 @@ func TestDBIterator(t *testing.T) { } func verifyIterator(t *testing.T, itr types.Iterator, expected []int64, msg string) { + t.Helper() i := 0 for itr.Valid() { key := itr.Key() diff --git a/store/cachekv/internal/memiterator.go b/store/cachekv/internal/memiterator.go index 77e7c1eea4f3..9dbba7587071 100644 --- a/store/cachekv/internal/memiterator.go +++ b/store/cachekv/internal/memiterator.go @@ -4,8 +4,9 @@ import ( "bytes" "errors" - "cosmossdk.io/store/types" "github.com/tidwall/btree" + + "cosmossdk.io/store/types" ) var _ types.Iterator = (*memIterator)(nil) diff --git a/store/cachekv/store.go b/store/cachekv/store.go index f25a4c25f123..08cfc2b325f6 100644 --- a/store/cachekv/store.go +++ b/store/cachekv/store.go @@ -6,9 +6,9 @@ import ( "sort" "sync" - "cosmossdk.io/math" dbm "github.com/cosmos/cosmos-db" + "cosmossdk.io/math" "cosmossdk.io/store/cachekv/internal" "cosmossdk.io/store/internal/conv" "cosmossdk.io/store/internal/kv" diff --git a/store/cachekv/store_bench_test.go b/store/cachekv/store_bench_test.go index d047c4398c06..8f15855e0952 100644 --- a/store/cachekv/store_bench_test.go +++ b/store/cachekv/store_bench_test.go @@ -15,6 +15,7 @@ const defaultValueSizeBz = 1 << 12 // This benchmark measures the time of iterator.Next() when the parent store is blank func benchmarkBlankParentIteratorNext(b *testing.B, keysize int) { + b.Helper() mem := dbadapter.Store{DB: dbm.NewMemDB()} kvstore := cachekv.NewStore(mem) // Use a singleton for value, to not waste time computing it @@ -44,6 +45,7 @@ func benchmarkBlankParentIteratorNext(b *testing.B, keysize int) { // Benchmark setting New keys to a store, where the new keys are in sequence. func benchmarkBlankParentAppend(b *testing.B, keysize int) { + b.Helper() mem := dbadapter.Store{DB: dbm.NewMemDB()} kvstore := cachekv.NewStore(mem) @@ -66,6 +68,7 @@ func benchmarkBlankParentAppend(b *testing.B, keysize int) { // Benchmark setting New keys to a store, where the new keys are random. // the speed of this function does not depend on the values in the parent store func benchmarkRandomSet(b *testing.B, keysize int) { + b.Helper() mem := dbadapter.Store{DB: dbm.NewMemDB()} kvstore := cachekv.NewStore(mem) @@ -96,6 +99,7 @@ func benchmarkRandomSet(b *testing.B, keysize int) { // We essentially are benchmarking the cacheKV iterator creation & iteration times // with the number of entries deleted in the parent. func benchmarkIteratorOnParentWithManyDeletes(b *testing.B, numDeletes int) { + b.Helper() mem := dbadapter.Store{DB: dbm.NewMemDB()} // Use a singleton for value, to not waste time computing it diff --git a/store/cachekv/store_test.go b/store/cachekv/store_test.go index 3694726a7935..3c5622355403 100644 --- a/store/cachekv/store_test.go +++ b/store/cachekv/store_test.go @@ -4,10 +4,10 @@ import ( "fmt" "testing" - "cosmossdk.io/math/unsafe" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require" + "cosmossdk.io/math/unsafe" "cosmossdk.io/store/cachekv" "cosmossdk.io/store/dbadapter" "cosmossdk.io/store/types" @@ -466,6 +466,7 @@ func randInt(n int) int { // useful for replaying a error case if we find one func doOp(t *testing.T, st types.CacheKVStore, truth dbm.DB, op int, args ...int) { + t.Helper() switch op { case opSet: k := args[0] @@ -491,6 +492,7 @@ func doOp(t *testing.T, st types.CacheKVStore, truth dbm.DB, op int, args ...int } func doRandomOp(t *testing.T, st types.CacheKVStore, truth dbm.DB, maxKey int) { + t.Helper() r := randInt(totalOps) switch r { case opSet: @@ -520,6 +522,7 @@ func doRandomOp(t *testing.T, st types.CacheKVStore, truth dbm.DB, maxKey int) { // iterate over whole domain func assertIterateDomain(t *testing.T, st types.KVStore, expectedN int) { + t.Helper() itr := st.Iterator(nil, nil) i := 0 for ; itr.Valid(); itr.Next() { @@ -533,6 +536,7 @@ func assertIterateDomain(t *testing.T, st types.KVStore, expectedN int) { } func assertIterateDomainCheck(t *testing.T, st types.KVStore, mem dbm.DB, r []keyRange) { + t.Helper() // iterate over each and check they match the other itr := st.Iterator(nil, nil) itr2, err := mem.Iterator(nil, nil) // ground truth @@ -566,6 +570,7 @@ func assertIterateDomainCheck(t *testing.T, st types.KVStore, mem dbm.DB, r []ke } func assertIterateDomainCompare(t *testing.T, st types.KVStore, mem dbm.DB) { + t.Helper() // iterate over each and check they match the other itr := st.Iterator(nil, nil) itr2, err := mem.Iterator(nil, nil) // ground truth @@ -577,6 +582,7 @@ func assertIterateDomainCompare(t *testing.T, st types.KVStore, mem dbm.DB) { } func checkIterators(t *testing.T, itr, itr2 types.Iterator) { + t.Helper() for ; itr.Valid(); itr.Next() { require.True(t, itr2.Valid()) k, v := itr.Key(), itr.Value() @@ -592,6 +598,7 @@ func checkIterators(t *testing.T, itr, itr2 types.Iterator) { //-------------------------------------------------------- func setRange(t *testing.T, st types.KVStore, mem dbm.DB, start, end int) { + t.Helper() for i := start; i < end; i++ { st.Set(keyFmt(i), valFmt(i)) err := mem.Set(keyFmt(i), valFmt(i)) @@ -600,6 +607,7 @@ func setRange(t *testing.T, st types.KVStore, mem dbm.DB, start, end int) { } func deleteRange(t *testing.T, st types.KVStore, mem dbm.DB, start, end int) { + t.Helper() for i := start; i < end; i++ { st.Delete(keyFmt(i)) err := mem.Delete(keyFmt(i)) diff --git a/store/dbadapter/store.go b/store/dbadapter/store.go index 175f6ad18f96..013e26df2030 100644 --- a/store/dbadapter/store.go +++ b/store/dbadapter/store.go @@ -38,6 +38,7 @@ func (dsa Store) Has(key []byte) bool { // Set wraps the underlying DB's Set method panicing on error. func (dsa Store) Set(key, value []byte) { types.AssertValidKey(key) + types.AssertValidValue(value) if err := dsa.DB.Set(key, value); err != nil { panic(err) } diff --git a/store/dbadapter/store_test.go b/store/dbadapter/store_test.go index 75e7541b9f74..9685887f9126 100644 --- a/store/dbadapter/store_test.go +++ b/store/dbadapter/store_test.go @@ -5,13 +5,13 @@ import ( "errors" "testing" + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" + "cosmossdk.io/store/cachekv" "cosmossdk.io/store/dbadapter" "cosmossdk.io/store/mock" "cosmossdk.io/store/types" - - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/require" ) var errFoo = errors.New("dummy") diff --git a/store/go.mod b/store/go.mod index f1dc7809a3a3..f744a3b3d6c9 100644 --- a/store/go.mod +++ b/store/go.mod @@ -1,78 +1,80 @@ module cosmossdk.io/store -go 1.20 +go 1.21 require ( - cosmossdk.io/errors v1.0.0-beta.7 - cosmossdk.io/log v1.1.0 - cosmossdk.io/math v1.0.1 - github.com/armon/go-metrics v0.4.1 - github.com/cometbft/cometbft v0.38.0-rc1 - github.com/cosmos/cosmos-db v1.0.0 - github.com/cosmos/gogoproto v1.4.10 - github.com/cosmos/iavl v1.0.0-beta.2 - github.com/cosmos/ics23/go v0.10.0 + cosmossdk.io/errors v1.0.0 + cosmossdk.io/log v1.4.1 + cosmossdk.io/math v1.3.0 + github.com/cometbft/cometbft v0.38.12 + github.com/cosmos/cosmos-db v1.0.2 + github.com/cosmos/gogoproto v1.7.0 + github.com/cosmos/iavl v1.2.0 + github.com/cosmos/ics23/go v0.11.0 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/hashicorp/go-hclog v1.5.0 - github.com/hashicorp/go-plugin v1.4.10 - github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d - github.com/spf13/cast v1.5.1 // indirect - github.com/stretchr/testify v1.8.4 - github.com/tidwall/btree v1.6.0 - golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 - google.golang.org/grpc v1.55.0 - google.golang.org/protobuf v1.30.0 - gotest.tools/v3 v3.4.0 + github.com/hashicorp/go-metrics v0.5.1 + github.com/hashicorp/go-plugin v1.5.2 + github.com/hashicorp/golang-lru v1.0.2 + github.com/spf13/cast v1.6.0 // indirect + github.com/stretchr/testify v1.9.0 + github.com/tidwall/btree v1.7.0 + golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 + google.golang.org/grpc v1.62.1 + google.golang.org/protobuf v1.34.2 + gotest.tools/v3 v3.5.1 ) require ( github.com/DataDog/zstd v1.5.5 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/cockroachdb/errors v1.9.1 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect + github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230525220056-bb4fc9527b3b // indirect - github.com/cockroachdb/redact v1.1.4 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/cockroachdb/pebble v1.1.1 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect - github.com/emicklei/dot v1.4.2 // indirect + github.com/emicklei/dot v1.6.1 // indirect github.com/fatih/color v1.15.0 // indirect - github.com/getsentry/sentry-go v0.21.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/hashicorp/go-immutable-radix v1.0.0 // indirect github.com/hashicorp/go-uuid v1.0.1 // indirect github.com/hashicorp/yamux v0.1.1 // indirect - github.com/jhump/protoreflect v1.15.1 // indirect - github.com/klauspost/compress v1.16.5 // indirect + github.com/jhump/protoreflect v1.15.3 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/linxGnu/grocksdb v1.7.16 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20220708102147-0a8a51822cae // indirect github.com/oklog/run v1.1.0 // indirect github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.15.1 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.0 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect - github.com/rs/zerolog v1.29.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.20.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rs/zerolog v1.33.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - golang.org/x/crypto v0.9.0 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect + golang.org/x/crypto v0.26.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/text v0.17.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/store/go.sum b/store/go.sum index 4632e20a8612..5afe6fbf4b76 100644 --- a/store/go.sum +++ b/store/go.sum @@ -1,134 +1,96 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -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/log v1.1.0 h1:v0ogPHYeTzPcBTcPR1A3j1hkei4pZama8kz8LKlCMv0= -cosmossdk.io/log v1.1.0/go.mod h1:6zjroETlcDs+mm62gd8Ig7mZ+N+fVOZS91V17H+M4N4= -cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= +cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= +cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= +cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= +cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= +cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= +cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= -github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= -github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= +github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ= +github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c= +github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= -github.com/bufbuild/protocompile v0.5.1 h1:mixz5lJX4Hiz4FpqFREJHIXLfaLBntfaJv1h+/jS+Qg= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= +github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230525220056-bb4fc9527b3b h1:LCs8gDhg6vt8A3dN7AEJxmCoETZ4qkySoVJVm3rcSJk= -github.com/cockroachdb/pebble v0.0.0-20230525220056-bb4fc9527b3b/go.mod h1:TkdVsGYRqtULUppt2RbC+YaKtTHnHoWa2apfFrSKABw= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/redact v1.1.4 h1:Y0XrVI2FAyofNyGveodTN//qdpPtFKcKTeCBsK3AHAQ= -github.com/cockroachdb/redact v1.1.4/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/cometbft/cometbft v0.38.0-rc1 h1:ph6smlqX82aH+d72KuxDHqu29M7LyusSp/obfGsGX/w= -github.com/cometbft/cometbft v0.38.0-rc1/go.mod h1:5Jz0Z8YsHSf0ZaAqGvi/ifioSdVFPtEGrm8Y9T/993k= -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/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= +github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= +github.com/cometbft/cometbft v0.38.12 h1:OWsLZN2KcSSFe8bet9xCn07VwhBnavPea3VyPnNq1bg= +github.com/cometbft/cometbft v0.38.12/go.mod h1:GPHp3/pehPqgX1930HmK1BpBLZPxB75v/dZg8Viwy+o= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= -github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cosmos/iavl v1.0.0-beta.2 h1:XOsIM80Yyml/KifCXEYOy9tWCXwMAbLa91n6pReW07Y= -github.com/cosmos/iavl v1.0.0-beta.2/go.mod h1:EA97dJ07TBktRlG/iGzK6g1eCXNj1q3MGoFYkVzrwHE= -github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= -github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= +github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= +github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= +github.com/cosmos/iavl v1.2.0 h1:kVxTmjTh4k0Dh1VNL046v6BXqKziqMDzxo93oh3kOfM= +github.com/cosmos/iavl v1.2.0/go.mod h1:HidWWLVAtODJqFD6Hbne2Y0q3SdxByJepHUOeoH4LiI= +github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= +github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/emicklei/dot v1.4.2 h1:UbK6gX4yvrpHKlxuUQicwoAis4zl8Dzwit9SnbBAXWw= -github.com/emicklei/dot v1.4.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= +github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= +github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= 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/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.21.0 h1:c9l5F1nPF30JIppulk4veau90PK6Smu3abgVtVQWon4= -github.com/getsentry/sentry-go v0.21.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= -github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= -github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= 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/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -139,128 +101,83 @@ github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:x 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.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= 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/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.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.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-plugin v1.4.10 h1:xUbmA4jC6Dq163/fWcp8P3JuHilrHHMLNRxzGQJ9hNk= -github.com/hashicorp/go-plugin v1.4.10/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0= +github.com/hashicorp/go-metrics v0.5.1 h1:rfPwUqFU6uZXNvGl4hzjY8LEBsqFVU4si1H9/Hqck/U= +github.com/hashicorp/go-metrics v0.5.1/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= -github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= -github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= 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.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= -github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= -github.com/linxGnu/grocksdb v1.7.16 h1:Q2co1xrpdkr5Hx3Fp+f+f7fRGhQFQhvi/+226dtLmA8= -github.com/linxGnu/grocksdb v1.7.16/go.mod h1:JkS7pl5qWpGpuVb3bPqTz8nC12X3YtPZT+Xq7+QfQo4= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= 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= @@ -269,7 +186,6 @@ github.com/oasisprotocol/curve25519-voi v0.0.0-20220708102147-0a8a51822cae/go.mo github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= @@ -280,9 +196,9 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d h1:htwtWgtQo8YS6JFWWi2DNgY0RwSGJ1ruMoxY6CUUclk= github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= @@ -293,159 +209,97 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE 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/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/prometheus/client_golang v1.20.1 h1:IMJXHOD6eARkQpxo8KkhgEVFlBNm+nkrFUyGlIu7Na8= +github.com/prometheus/client_golang v1.20.1/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.10.0 h1:UkG7GPYkO4UZyLnyXjaWYcgOSONqwdBqFUT95ugmt6I= -github.com/prometheus/procfs v0.10.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= 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/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/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/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= -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/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= 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/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= -github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= -github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -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-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= 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/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-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-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-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/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-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-20190222072716-a9d3bda3a223/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-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/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= @@ -457,97 +311,60 @@ golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/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-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/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.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 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/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= 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= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c h1:lfpJ/2rWPa/kJgxyyXM8PrNnfCzcmxJ265mADgwmvLI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= 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.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -555,15 +372,10 @@ 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.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/store/iavl/store.go b/store/iavl/store.go index f9e95fd6905b..7bdcb1df9177 100644 --- a/store/iavl/store.go +++ b/store/iavl/store.go @@ -18,6 +18,7 @@ import ( pruningtypes "cosmossdk.io/store/pruning/types" "cosmossdk.io/store/tracekv" "cosmossdk.io/store/types" + "cosmossdk.io/store/wrapper" ) const ( @@ -51,7 +52,7 @@ func LoadStore(db dbm.DB, logger log.Logger, key types.StoreKey, id types.Commit // provided DB. An error is returned if the version fails to load, or if called with a positive // version on an empty tree. func LoadStoreWithInitialVersion(db dbm.DB, logger log.Logger, key types.StoreKey, id types.CommitID, initialVersion uint64, cacheSize int, disableFastNode bool, metrics metrics.StoreMetrics) (types.CommitKVStore, error) { - tree := iavl.NewMutableTreeWithOpts(db, cacheSize, &iavl.Options{InitialVersion: initialVersion}, disableFastNode, logger) + tree := iavl.NewMutableTree(wrapper.NewDBWrapper(db), cacheSize, disableFastNode, logger, iavl.InitialVersionOption(initialVersion)) isUpgradeable, err := tree.IsUpgradeable() if err != nil { @@ -216,7 +217,10 @@ func (st *Store) Has(key []byte) (exists bool) { // Implements types.KVStore. func (st *Store) Delete(key []byte) { defer st.metrics.MeasureSince("store", "iavl", "delete") - st.tree.Remove(key) + _, _, err := st.tree.Remove(key) + if err != nil { + panic(err) + } } // DeleteVersionsTo deletes versions upto the given version from the MutableTree. An error @@ -360,7 +364,9 @@ func (st *Store) Query(req *types.RequestQuery) (res *types.ResponseQuery, err e for ; iterator.Valid(); iterator.Next() { pairs.Pairs = append(pairs.Pairs, kv.Pair{Key: iterator.Key(), Value: iterator.Value()}) } - iterator.Close() + if err := iterator.Close(); err != nil { + panic(fmt.Errorf("failed to close iterator: %w", err)) + } bz, err := pairs.Marshal() if err != nil { diff --git a/store/iavl/store_test.go b/store/iavl/store_test.go index 24f5ba9b8474..7ad24d7fe33d 100644 --- a/store/iavl/store_test.go +++ b/store/iavl/store_test.go @@ -4,18 +4,20 @@ import ( "bytes" crand "crypto/rand" "fmt" + "math" "sort" "testing" - "cosmossdk.io/log" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/iavl" "github.com/stretchr/testify/require" + "cosmossdk.io/log" "cosmossdk.io/store/cachekv" "cosmossdk.io/store/internal/kv" "cosmossdk.io/store/metrics" "cosmossdk.io/store/types" + "cosmossdk.io/store/wrapper" ) var ( @@ -35,16 +37,19 @@ func randBytes(numBytes int) []byte { // make a tree with data from above and save it func newAlohaTree(t *testing.T, db dbm.DB) (*iavl.MutableTree, types.CommitID) { - tree := iavl.NewMutableTree(db, cacheSize, false, log.NewNopLogger()) + t.Helper() + tree := iavl.NewMutableTree(wrapper.NewDBWrapper(db), cacheSize, false, log.NewNopLogger()) for k, v := range treeData { - tree.Set([]byte(k), []byte(v)) + _, err := tree.Set([]byte(k), []byte(v)) + require.NoError(t, err) } for i := 0; i < nMoreData; i++ { key := randBytes(12) value := randBytes(50) - tree.Set(key, value) + _, err := tree.Set(key, value) + require.NoError(t, err) } hash, ver, err := tree.SaveVersion() @@ -281,7 +286,7 @@ func TestIAVLIterator(t *testing.T) { } func TestIAVLReverseIterator(t *testing.T) { - db := dbm.NewMemDB() + db := wrapper.NewDBWrapper(dbm.NewMemDB()) tree := iavl.NewMutableTree(db, cacheSize, false, log.NewNopLogger()) @@ -294,6 +299,7 @@ func TestIAVLReverseIterator(t *testing.T) { iavlStore.Set([]byte{0x01}, []byte("1")) testReverseIterator := func(t *testing.T, start, end []byte, expected []string) { + t.Helper() iter := iavlStore.ReverseIterator(start, end) var i int for i = 0; iter.Valid(); iter.Next() { @@ -314,7 +320,7 @@ func TestIAVLReverseIterator(t *testing.T) { } func TestIAVLPrefixIterator(t *testing.T) { - db := dbm.NewMemDB() + db := wrapper.NewDBWrapper(dbm.NewMemDB()) tree := iavl.NewMutableTree(db, cacheSize, false, log.NewNopLogger()) iavlStore := UnsafeNewStore(tree) @@ -377,7 +383,7 @@ func TestIAVLPrefixIterator(t *testing.T) { } func TestIAVLReversePrefixIterator(t *testing.T) { - db := dbm.NewMemDB() + db := wrapper.NewDBWrapper(dbm.NewMemDB()) tree := iavl.NewMutableTree(db, cacheSize, false, log.NewNopLogger()) iavlStore := UnsafeNewStore(tree) @@ -444,7 +450,7 @@ func nextVersion(iavl *Store) { } func TestIAVLNoPrune(t *testing.T) { - db := dbm.NewMemDB() + db := wrapper.NewDBWrapper(dbm.NewMemDB()) tree := iavl.NewMutableTree(db, cacheSize, false, log.NewNopLogger()) iavlStore := UnsafeNewStore(tree) @@ -462,7 +468,7 @@ func TestIAVLNoPrune(t *testing.T) { } func TestIAVLStoreQuery(t *testing.T) { - db := dbm.NewMemDB() + db := wrapper.NewDBWrapper(dbm.NewMemDB()) tree := iavl.NewMutableTree(db, cacheSize, false, log.NewNopLogger()) iavlStore := UnsafeNewStore(tree) @@ -574,14 +580,15 @@ func TestIAVLStoreQuery(t *testing.T) { func BenchmarkIAVLIteratorNext(b *testing.B) { b.ReportAllocs() - db := dbm.NewMemDB() + db := wrapper.NewDBWrapper(dbm.NewMemDB()) treeSize := 1000 tree := iavl.NewMutableTree(db, cacheSize, false, log.NewNopLogger()) for i := 0; i < treeSize; i++ { key := randBytes(4) value := randBytes(50) - tree.Set(key, value) + _, err := tree.Set(key, value) + require.NoError(b, err) } iavlStore := UnsafeNewStore(tree) @@ -609,7 +616,7 @@ func TestSetInitialVersion(t *testing.T) { { "works with a mutable tree", func(db *dbm.MemDB) *Store { - tree := iavl.NewMutableTree(db, cacheSize, false, log.NewNopLogger()) + tree := iavl.NewMutableTree(wrapper.NewDBWrapper(db), cacheSize, false, log.NewNopLogger()) store := UnsafeNewStore(tree) return store @@ -618,7 +625,7 @@ func TestSetInitialVersion(t *testing.T) { { "throws error on immutable tree", func(db *dbm.MemDB) *Store { - tree := iavl.NewMutableTree(db, cacheSize, false, log.NewNopLogger()) + tree := iavl.NewMutableTree(wrapper.NewDBWrapper(db), cacheSize, false, log.NewNopLogger()) store := UnsafeNewStore(tree) _, version, err := store.tree.SaveVersion() require.NoError(t, err) @@ -666,7 +673,7 @@ func TestChangeSets(t *testing.T) { treeSize := 1000 treeVersion := int64(10) targetVersion := int64(6) - tree := iavl.NewMutableTree(db, cacheSize, false, log.NewNopLogger()) + tree := iavl.NewMutableTree(wrapper.NewDBWrapper(db), cacheSize, false, log.NewNopLogger(), iavl.FlushThresholdOption(math.MaxInt)) for j := int64(0); j < treeVersion; j++ { keys := [][]byte{} diff --git a/store/iavl/tree.go b/store/iavl/tree.go index 2a8577f8f01d..889fc1d5a07f 100644 --- a/store/iavl/tree.go +++ b/store/iavl/tree.go @@ -3,8 +3,8 @@ package iavl import ( "fmt" - "cosmossdk.io/store/types" "github.com/cosmos/iavl" + idb "github.com/cosmos/iavl/db" ) var ( @@ -31,7 +31,7 @@ type ( GetVersioned(key []byte, version int64) ([]byte, error) GetImmutable(version int64) (*iavl.ImmutableTree, error) SetInitialVersion(version uint64) - Iterator(start, end []byte, ascending bool) (types.Iterator, error) + Iterator(start, end []byte, ascending bool) (idb.Iterator, error) AvailableVersions() []int LoadVersionForOverwriting(targetVersion int64) error TraverseStateChanges(startVersion, endVersion int64, fn func(version int64, changeSet *iavl.ChangeSet) error) error @@ -93,10 +93,6 @@ func (it *immutableTree) LoadVersionForOverwriting(targetVersion int64) error { panic("cannot call 'LoadVersionForOverwriting' on an immutable IAVL tree") } -func (it *immutableTree) LazyLoadVersionForOverwriting(targetVersion int64) (int64, error) { - panic("cannot call 'LazyLoadVersionForOverwriting' on an immutable IAVL tree") -} - func (it *immutableTree) WorkingHash() []byte { panic("cannot call 'WorkingHash' on an immutable IAVL tree") } diff --git a/store/iavl/tree_test.go b/store/iavl/tree_test.go index 0fdaf17de5b0..243355e42e08 100644 --- a/store/iavl/tree_test.go +++ b/store/iavl/tree_test.go @@ -3,21 +3,33 @@ package iavl import ( "testing" - "cosmossdk.io/log" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/iavl" "github.com/stretchr/testify/require" + + "cosmossdk.io/log" + "cosmossdk.io/store/wrapper" ) func TestImmutableTreePanics(t *testing.T) { t.Parallel() - immTree := iavl.NewImmutableTree(dbm.NewMemDB(), 100, false, log.NewNopLogger()) + immTree := iavl.NewImmutableTree(wrapper.NewDBWrapper(dbm.NewMemDB()), 100, false, log.NewNopLogger()) it := &immutableTree{immTree} - require.Panics(t, func() { it.Set([]byte{}, []byte{}) }) - require.Panics(t, func() { it.Remove([]byte{}) }) + require.Panics(t, func() { + _, err := it.Set([]byte{}, []byte{}) + require.NoError(t, err) + }) + require.Panics(t, func() { + _, _, err := it.Remove([]byte{}) + require.NoError(t, err) + }) require.Panics(t, func() { _, _, _ = it.SaveVersion() }) require.Panics(t, func() { _ = it.DeleteVersionsTo(int64(1)) }) + val, err := it.GetVersioned(nil, 1) + require.Error(t, err) + require.Nil(t, val) + imm, err := it.GetImmutable(1) require.Error(t, err) require.Nil(t, imm) diff --git a/store/internal/conv/string.go b/store/internal/conv/string.go index ab2b7f44b38a..96d89c3a5fff 100644 --- a/store/internal/conv/string.go +++ b/store/internal/conv/string.go @@ -1,20 +1,13 @@ package conv import ( - "reflect" "unsafe" ) // UnsafeStrToBytes uses unsafe to convert string into byte array. Returned bytes // must not be altered after this function is called as it will cause a segmentation fault. func UnsafeStrToBytes(s string) []byte { - var buf []byte - sHdr := (*reflect.StringHeader)(unsafe.Pointer(&s)) - bufHdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf)) - bufHdr.Data = sHdr.Data - bufHdr.Cap = sHdr.Len - bufHdr.Len = sHdr.Len - return buf + return unsafe.Slice(unsafe.StringData(s), len(s)) // ref https://github.com/golang/go/issues/53003#issuecomment-1140276077 } // UnsafeBytesToStr is meant to make a zero allocation conversion diff --git a/store/internal/proofs/helpers.go b/store/internal/proofs/helpers.go index cad3acd5dc70..59c3bf0a9dde 100644 --- a/store/internal/proofs/helpers.go +++ b/store/internal/proofs/helpers.go @@ -3,10 +3,10 @@ package proofs import ( "sort" - "cosmossdk.io/math/unsafe" cmtprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto" "golang.org/x/exp/maps" + "cosmossdk.io/math/unsafe" sdkmaps "cosmossdk.io/store/internal/maps" ) diff --git a/store/listenkv/store_test.go b/store/listenkv/store_test.go index 9a56ffedbc34..51b88912c2e1 100644 --- a/store/listenkv/store_test.go +++ b/store/listenkv/store_test.go @@ -4,15 +4,14 @@ import ( "fmt" "testing" + dbm "github.com/cosmos/cosmos-db" + "github.com/stretchr/testify/require" + "cosmossdk.io/store/dbadapter" "cosmossdk.io/store/internal/kv" "cosmossdk.io/store/listenkv" "cosmossdk.io/store/prefix" "cosmossdk.io/store/types" - - "github.com/stretchr/testify/require" - - dbm "github.com/cosmos/cosmos-db" ) func bz(s string) []byte { return []byte(s) } diff --git a/store/mem/mem_test.go b/store/mem/mem_test.go index 254193192b8f..6595b45dce17 100644 --- a/store/mem/mem_test.go +++ b/store/mem/mem_test.go @@ -3,12 +3,11 @@ package mem_test import ( "testing" - "cosmossdk.io/store/cachekv" - pruningtypes "cosmossdk.io/store/pruning/types" - "github.com/stretchr/testify/require" + "cosmossdk.io/store/cachekv" "cosmossdk.io/store/mem" + pruningtypes "cosmossdk.io/store/pruning/types" "cosmossdk.io/store/types" ) diff --git a/store/metrics/telemetry.go b/store/metrics/telemetry.go index bdea79ffd0f0..d5bc55c45b9b 100644 --- a/store/metrics/telemetry.go +++ b/store/metrics/telemetry.go @@ -3,7 +3,7 @@ package metrics import ( "time" - "github.com/armon/go-metrics" + "github.com/hashicorp/go-metrics" ) // StoreMetrics defines the set of metrics for the store package @@ -37,7 +37,7 @@ func NewMetrics(labels [][]string) Metrics { return gatherer } -// MeasureSince provides a wrapper functionality for emitting a a time measure +// MeasureSince provides a wrapper functionality for emitting a time measure // metric with global labels (if any). func (m Metrics) MeasureSince(keys ...string) { start := time.Now() diff --git a/store/prefix/store_test.go b/store/prefix/store_test.go index 3f03614b7c67..738835770425 100644 --- a/store/prefix/store_test.go +++ b/store/prefix/store_test.go @@ -4,18 +4,17 @@ import ( "crypto/rand" "testing" - "cosmossdk.io/store/cachekv" - dbm "github.com/cosmos/cosmos-db" - "github.com/stretchr/testify/require" - tiavl "github.com/cosmos/iavl" + "github.com/stretchr/testify/require" "cosmossdk.io/log" + "cosmossdk.io/store/cachekv" "cosmossdk.io/store/dbadapter" "cosmossdk.io/store/gaskv" "cosmossdk.io/store/iavl" "cosmossdk.io/store/types" + "cosmossdk.io/store/wrapper" ) // copied from iavl/store_test.go @@ -31,6 +30,7 @@ type kvpair struct { } func genRandomKVPairs(t *testing.T) []kvpair { + t.Helper() kvps := make([]kvpair, 20) for i := 0; i < 20; i++ { @@ -46,6 +46,7 @@ func genRandomKVPairs(t *testing.T) []kvpair { } func setRandomKVPairs(t *testing.T, store types.KVStore) []kvpair { + t.Helper() kvps := genRandomKVPairs(t) for _, kvp := range kvps { store.Set(kvp.key, kvp.value) @@ -54,6 +55,7 @@ func setRandomKVPairs(t *testing.T, store types.KVStore) []kvpair { } func testPrefixStore(t *testing.T, baseStore types.KVStore, prefix []byte) { + t.Helper() prefixStore := NewStore(baseStore, prefix) prefixPrefixStore := NewStore(prefixStore, []byte("prefix")) @@ -89,7 +91,7 @@ func testPrefixStore(t *testing.T, baseStore types.KVStore, prefix []byte) { } func TestIAVLStorePrefix(t *testing.T) { - db := dbm.NewMemDB() + db := wrapper.NewDBWrapper(dbm.NewMemDB()) tree := tiavl.NewMutableTree(db, cacheSize, false, log.NewNopLogger()) iavlStore := iavl.UnsafeNewStore(tree) @@ -254,33 +256,39 @@ func mockStoreWithStuff() types.KVStore { } func checkValue(t *testing.T, store types.KVStore, key, expected []byte) { + t.Helper() bz := store.Get(key) require.Equal(t, expected, bz) } func checkValid(t *testing.T, itr types.Iterator, expected bool) { + t.Helper() valid := itr.Valid() require.Equal(t, expected, valid) } func checkNext(t *testing.T, itr types.Iterator, expected bool) { + t.Helper() itr.Next() valid := itr.Valid() require.Equal(t, expected, valid) } func checkDomain(t *testing.T, itr types.Iterator, start, end []byte) { + t.Helper() ds, de := itr.Domain() require.Equal(t, start, ds) require.Equal(t, end, de) } func checkItem(t *testing.T, itr types.Iterator, key, value []byte) { + t.Helper() require.Exactly(t, key, itr.Key()) require.Exactly(t, value, itr.Value()) } func checkInvalid(t *testing.T, itr types.Iterator) { + t.Helper() checkValid(t, itr, false) checkKeyPanics(t, itr) checkValuePanics(t, itr) @@ -288,14 +296,17 @@ func checkInvalid(t *testing.T, itr types.Iterator) { } func checkKeyPanics(t *testing.T, itr types.Iterator) { + t.Helper() require.Panics(t, func() { itr.Key() }) } func checkValuePanics(t *testing.T, itr types.Iterator) { + t.Helper() require.Panics(t, func() { itr.Value() }) } func checkNextPanics(t *testing.T, itr types.Iterator) { + t.Helper() require.Panics(t, func() { itr.Next() }) } diff --git a/store/pruning/manager.go b/store/pruning/manager.go index cd85319e5a66..9a99e4915136 100644 --- a/store/pruning/manager.go +++ b/store/pruning/manager.go @@ -6,9 +6,9 @@ import ( "sort" "sync" - "cosmossdk.io/log" dbm "github.com/cosmos/cosmos-db" + "cosmossdk.io/log" "cosmossdk.io/store/pruning/types" ) @@ -21,7 +21,7 @@ type Manager struct { opts types.PruningOptions snapshotInterval uint64 // Snapshots are taken in a separate goroutine from the regular execution - // and can be delivered asynchrounously via HandleHeightSnapshot. + // and can be delivered asynchrounously via HandleSnapshotHeight. // Therefore, we sync access to pruneSnapshotHeights with this mutex. pruneSnapshotHeightsMx sync.RWMutex // These are the heights that are multiples of snapshotInterval and kept for state sync snapshots. @@ -65,11 +65,11 @@ func (m *Manager) GetOptions() types.PruningOptions { return m.opts } -// HandleHeightSnapshot persists the snapshot height to be pruned at the next appropriate -// height defined by the pruning strategy. Flushes the update to disk and panics if the flush fails. -// The input height must be greater than 0 and pruning strategy any but pruning nothing. -// If one of these conditions is not met, this function does nothing. -func (m *Manager) HandleHeightSnapshot(height int64) { +// HandleSnapshotHeight persists the snapshot height to be pruned at the next appropriate +// height defined by the pruning strategy. It flushes the update to disk and panics if the flush fails. +// The input height must be greater than 0, and the pruning strategy must not be set to pruning nothing. +// If either of these conditions is not met, this function does nothing. +func (m *Manager) HandleSnapshotHeight(height int64) { if m.opts.GetPruningStrategy() == types.PruningNothing || height <= 0 { return } @@ -77,7 +77,7 @@ func (m *Manager) HandleHeightSnapshot(height int64) { m.pruneSnapshotHeightsMx.Lock() defer m.pruneSnapshotHeightsMx.Unlock() - m.logger.Debug("HandleHeightSnapshot", "height", height) + m.logger.Debug("HandleSnapshotHeight", "height", height) m.pruneSnapshotHeights = append(m.pruneSnapshotHeights, height) sort.Slice(m.pruneSnapshotHeights, func(i, j int) bool { return m.pruneSnapshotHeights[i] < m.pruneSnapshotHeights[j] }) k := 1 @@ -118,7 +118,7 @@ func (m *Manager) GetPruningHeight(height int64) int64 { m.pruneSnapshotHeightsMx.RLock() defer m.pruneSnapshotHeightsMx.RUnlock() - // - snapshotInterval is zero as that means that all heights can be pruned. + // snapshotInterval is zero, indicating that all heights can be pruned if m.snapshotInterval <= 0 { return pruneHeight } diff --git a/store/pruning/manager_test.go b/store/pruning/manager_test.go index aa307725dc1a..006891de8570 100644 --- a/store/pruning/manager_test.go +++ b/store/pruning/manager_test.go @@ -5,11 +5,11 @@ import ( "fmt" "testing" - "cosmossdk.io/log" db "github.com/cosmos/cosmos-db" "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" + "cosmossdk.io/log" "cosmossdk.io/store/mock" "cosmossdk.io/store/pruning" "cosmossdk.io/store/pruning/types" @@ -111,7 +111,7 @@ func TestStrategies(t *testing.T) { for curHeight := int64(0); curHeight < 110000; curHeight++ { if tc.snapshotInterval != 0 { if curHeight > int64(tc.snapshotInterval) && curHeight%int64(tc.snapshotInterval) == int64(tc.snapshotInterval)-1 { - manager.HandleHeightSnapshot(curHeight - int64(tc.snapshotInterval) + 1) + manager.HandleSnapshotHeight(curHeight - int64(tc.snapshotInterval) + 1) snHeight = curHeight } } @@ -214,10 +214,10 @@ func TestHandleSnapshotHeight_DbErr_Panic(t *testing.T) { } }() - manager.HandleHeightSnapshot(10) + manager.HandleSnapshotHeight(10) } -func TestHandleHeightSnapshot_LoadFromDisk(t *testing.T) { +func TestHandleSnapshotHeight_LoadFromDisk(t *testing.T) { snapshotInterval := uint64(10) // Setup @@ -233,7 +233,7 @@ func TestHandleHeightSnapshot_LoadFromDisk(t *testing.T) { snapshotHeightStr := fmt.Sprintf("snaphost height: %d", snapshotHeight) if snapshotHeight > int64(snapshotInterval) && snapshotHeight%int64(snapshotInterval) == 1 { // Test flush - manager.HandleHeightSnapshot(snapshotHeight - 1) + manager.HandleSnapshotHeight(snapshotHeight - 1) expected = 1 } @@ -251,27 +251,6 @@ func TestHandleHeightSnapshot_LoadFromDisk(t *testing.T) { } } -func TestHandleHeightSnapshot_DbErr_Panic(t *testing.T) { - ctrl := gomock.NewController(t) - - // Setup - dbMock := mock.NewMockDB(ctrl) - - dbMock.EXPECT().SetSync(gomock.Any(), gomock.Any()).Return(errors.New(dbErr)).Times(1) - - manager := pruning.NewManager(dbMock, log.NewNopLogger()) - manager.SetOptions(types.NewPruningOptions(types.PruningEverything)) - require.NotNil(t, manager) - - defer func() { - if r := recover(); r == nil { - t.Fail() - } - }() - - manager.HandleHeightSnapshot(10) -} - func TestLoadPruningSnapshotHeights(t *testing.T) { var ( manager = pruning.NewManager(db.NewMemDB(), log.NewNopLogger()) diff --git a/store/rootmulti/dbadapter.go b/store/rootmulti/dbadapter.go index 4f32ada4e9ff..65cd41c66a28 100644 --- a/store/rootmulti/dbadapter.go +++ b/store/rootmulti/dbadapter.go @@ -2,9 +2,8 @@ package rootmulti import ( "cosmossdk.io/store/dbadapter" - "cosmossdk.io/store/types" - pruningtypes "cosmossdk.io/store/pruning/types" + "cosmossdk.io/store/types" ) var commithash = []byte("FAKE_HASH") diff --git a/store/rootmulti/proof_test.go b/store/rootmulti/proof_test.go index e92a6c5b50d1..d573937c3d08 100644 --- a/store/rootmulti/proof_test.go +++ b/store/rootmulti/proof_test.go @@ -3,12 +3,13 @@ package rootmulti import ( "testing" + dbm "github.com/cosmos/cosmos-db" + "github.com/stretchr/testify/require" + "cosmossdk.io/log" "cosmossdk.io/store/iavl" "cosmossdk.io/store/metrics" "cosmossdk.io/store/types" - dbm "github.com/cosmos/cosmos-db" - "github.com/stretchr/testify/require" ) func TestVerifyIAVLStoreQueryProof(t *testing.T) { diff --git a/store/rootmulti/snapshot_test.go b/store/rootmulti/snapshot_test.go index cecb61202f0d..635be92970a3 100644 --- a/store/rootmulti/snapshot_test.go +++ b/store/rootmulti/snapshot_test.go @@ -10,17 +10,17 @@ import ( "math/rand" "testing" - "cosmossdk.io/log" + dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "cosmossdk.io/log" "cosmossdk.io/store/iavl" "cosmossdk.io/store/metrics" "cosmossdk.io/store/rootmulti" "cosmossdk.io/store/snapshots" snapshottypes "cosmossdk.io/store/snapshots/types" "cosmossdk.io/store/types" - dbm "github.com/cosmos/cosmos-db" ) func newMultiStoreWithGeneratedData(db dbm.DB, stores uint8, storeKeys uint64) *rootmulti.Store { @@ -33,7 +33,10 @@ func newMultiStoreWithGeneratedData(db dbm.DB, stores uint8, storeKeys uint64) * multiStore.MountStoreWithDB(key, types.StoreTypeIAVL, nil) keys = append(keys, key) } - multiStore.LoadLatestVersion() + err := multiStore.LoadLatestVersion() + if err != nil { + panic(err) + } for _, key := range keys { store := multiStore.GetCommitKVStore(key).(*iavl.Store) @@ -50,7 +53,10 @@ func newMultiStoreWithGeneratedData(db dbm.DB, stores uint8, storeKeys uint64) * } multiStore.Commit() - multiStore.LoadLatestVersion() + err = multiStore.LoadLatestVersion() + if err != nil { + panic(err) + } return multiStore } @@ -61,8 +67,9 @@ func newMultiStoreWithMixedMounts(db dbm.DB) *rootmulti.Store { store.MountStoreWithDB(types.NewKVStoreKey("iavl2"), types.StoreTypeIAVL, nil) store.MountStoreWithDB(types.NewKVStoreKey("iavl3"), types.StoreTypeIAVL, nil) store.MountStoreWithDB(types.NewTransientStoreKey("trans1"), types.StoreTypeTransient, nil) - store.LoadLatestVersion() - + if err := store.LoadLatestVersion(); err != nil { + panic(err) + } return store } @@ -93,6 +100,7 @@ func newMultiStoreWithMixedMountsAndBasicData(db dbm.DB) *rootmulti.Store { } func assertStoresEqual(t *testing.T, expect, actual types.CommitKVStore, msgAndArgs ...interface{}) { + t.Helper() assert.Equal(t, expect.LastCommitID(), actual.LastCommitID()) expectIter := expect.Iterator(nil, nil) expectMap := map[string][]byte{} @@ -226,6 +234,7 @@ func TestMultistoreSnapshotRestore(t *testing.T) { } func benchmarkMultistoreSnapshot(b *testing.B, stores uint8, storeKeys uint64) { + b.Helper() b.Skip("Noisy with slow setup time, please see https://github.com/cosmos/cosmos-sdk/issues/8855.") b.ReportAllocs() @@ -261,6 +270,7 @@ func benchmarkMultistoreSnapshot(b *testing.B, stores uint8, storeKeys uint64) { } func benchmarkMultistoreSnapshotRestore(b *testing.B, stores uint8, storeKeys uint64) { + b.Helper() b.Skip("Noisy with slow setup time, please see https://github.com/cosmos/cosmos-sdk/issues/8855.") b.ReportAllocs() diff --git a/store/rootmulti/store.go b/store/rootmulti/store.go index 473c8bc3f715..94336bc5faa8 100644 --- a/store/rootmulti/store.go +++ b/store/rootmulti/store.go @@ -1,6 +1,7 @@ package rootmulti import ( + "crypto/sha256" "errors" "fmt" "io" @@ -9,7 +10,6 @@ import ( "strings" "sync" - "cosmossdk.io/log" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" protoio "github.com/cosmos/gogoproto/io" @@ -17,6 +17,7 @@ import ( iavltree "github.com/cosmos/iavl" errorsmod "cosmossdk.io/errors" + "cosmossdk.io/log" "cosmossdk.io/store/cachemulti" "cosmossdk.io/store/dbadapter" "cosmossdk.io/store/iavl" @@ -314,7 +315,9 @@ func deleteKVStore(kv types.KVStore) error { keys = append(keys, itr.Key()) itr.Next() } - itr.Close() + if err := itr.Close(); err != nil { + return err + } for _, k := range keys { kv.Delete(k) @@ -330,17 +333,19 @@ func moveKVStoreData(oldDB, newDB types.KVStore) error { newDB.Set(itr.Key(), itr.Value()) itr.Next() } - itr.Close() + if err := itr.Close(); err != nil { + return err + } // then delete the old store return deleteKVStore(oldDB) } // PruneSnapshotHeight prunes the given height according to the prune strategy. -// If PruneNothing, this is a no-op. -// If other strategy, this height is persisted until the snapshot is operated. +// If the strategy is PruneNothing, this is a no-op. +// For other strategies, this height is persisted until the snapshot is operated. func (rs *Store) PruneSnapshotHeight(height int64) { - rs.pruningManager.HandleHeightSnapshot(height) + rs.pruningManager.HandleSnapshotHeight(height) } // SetInterBlockCache sets the Store's internal inter-block (persistent) cache. @@ -434,8 +439,19 @@ func (rs *Store) LatestVersion() int64 { // LastCommitID implements Committer/CommitStore. func (rs *Store) LastCommitID() types.CommitID { if rs.lastCommitInfo == nil { + emptyHash := sha256.Sum256([]byte{}) + appHash := emptyHash[:] return types.CommitID{ Version: GetLatestVersion(rs.db), + Hash: appHash, // set empty apphash to sha256([]byte{}) if info is nil + } + } + if len(rs.lastCommitInfo.CommitID().Hash) == 0 { + emptyHash := sha256.Sum256([]byte{}) + appHash := emptyHash[:] + return types.CommitID{ + Version: rs.lastCommitInfo.Version, + Hash: appHash, // set empty apphash to sha256([]byte{}) if hash is nil } } @@ -480,7 +496,10 @@ func (rs *Store) Commit() types.CommitID { rs.removalMap = make(map[types.StoreKey]bool) if err := rs.handlePruning(version); err != nil { - panic(err) + rs.logger.Error( + "failed to prune store, please check your pruning configuration", + "err", err, + ) } return types.CommitID{ @@ -646,15 +665,15 @@ func (rs *Store) GetKVStore(key types.StoreKey) types.KVStore { func (rs *Store) handlePruning(version int64) error { pruneHeight := rs.pruningManager.GetPruningHeight(version) - rs.logger.Info("prune start", "height", version) - defer rs.logger.Info("prune end", "height", version) + rs.logger.Debug("prune start", "height", version) + defer rs.logger.Debug("prune end", "height", version) return rs.PruneStores(pruneHeight) } // PruneStores prunes all history upto the specific height of the multi store. func (rs *Store) PruneStores(pruningHeight int64) (err error) { if pruningHeight <= 0 { - rs.logger.Debug("pruning skipped, height is smaller than 0") + rs.logger.Debug("pruning skipped, height is less than or equal to 0") return nil } @@ -676,9 +695,11 @@ func (rs *Store) PruneStores(pruningHeight int64) (err error) { continue } - if errors.Is(err, iavltree.ErrVersionDoesNotExist) && err != nil { + if errors.Is(err, iavltree.ErrVersionDoesNotExist) { return err } + + rs.logger.Error("failed to prune store", "key", key, "err", err) } return nil } @@ -1037,7 +1058,8 @@ func (rs *Store) buildCommitInfo(version int64) *types.CommitInfo { storeInfos := []types.StoreInfo{} for _, key := range keys { store := rs.stores[key] - if store.GetStoreType() == types.StoreTypeTransient { + storeType := store.GetStoreType() + if storeType == types.StoreTypeTransient || storeType == types.StoreTypeMemory { continue } storeInfos = append(storeInfos, types.StoreInfo{ @@ -1103,7 +1125,9 @@ func (rs *Store) GetCommitInfo(ver int64) (*types.CommitInfo, error) { func (rs *Store) flushMetadata(db dbm.DB, version int64, cInfo *types.CommitInfo) { rs.logger.Debug("flushing metadata", "height", version) batch := db.NewBatch() - defer batch.Close() + defer func() { + _ = batch.Close() + }() if cInfo != nil { flushCommitInfo(batch, version, cInfo) @@ -1202,7 +1226,10 @@ func flushCommitInfo(batch dbm.Batch, version int64, cInfo *types.CommitInfo) { } cInfoKey := fmt.Sprintf(commitInfoKeyFmt, version) - batch.Set([]byte(cInfoKey), bz) + err = batch.Set([]byte(cInfoKey), bz) + if err != nil { + panic(err) + } } func flushLatestVersion(batch dbm.Batch, version int64) { @@ -1211,5 +1238,8 @@ func flushLatestVersion(batch dbm.Batch, version int64) { panic(err) } - batch.Set([]byte(latestVersionKey), bz) + err = batch.Set([]byte(latestVersionKey), bz) + if err != nil { + panic(err) + } } diff --git a/store/rootmulti/store_test.go b/store/rootmulti/store_test.go index f8845ad1d164..2702f3e08623 100644 --- a/store/rootmulti/store_test.go +++ b/store/rootmulti/store_test.go @@ -2,15 +2,16 @@ package rootmulti import ( "bytes" + "crypto/sha256" "fmt" "testing" "time" - "cosmossdk.io/errors" - "cosmossdk.io/log" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require" + "cosmossdk.io/errors" + "cosmossdk.io/log" "cosmossdk.io/store/cachemulti" "cosmossdk.io/store/iavl" sdkmaps "cosmossdk.io/store/internal/maps" @@ -72,7 +73,9 @@ func TestCacheMultiStoreWithVersion(t *testing.T) { err := ms.LoadLatestVersion() require.Nil(t, err) - commitID := types.CommitID{} + emptyHash := sha256.Sum256([]byte{}) + appHash := emptyHash[:] + commitID := types.CommitID{Hash: appHash} checkStore(t, ms, commitID, commitID) k, v := []byte("wind"), []byte("blows") @@ -120,7 +123,9 @@ func TestHashStableWithEmptyCommit(t *testing.T) { err := ms.LoadLatestVersion() require.Nil(t, err) - commitID := types.CommitID{} + emptyHash := sha256.Sum256([]byte{}) + appHash := emptyHash[:] + commitID := types.CommitID{Hash: appHash} checkStore(t, ms, commitID, commitID) k, v := []byte("wind"), []byte("blows") @@ -148,8 +153,10 @@ func TestMultistoreCommitLoad(t *testing.T) { err := store.LoadLatestVersion() require.Nil(t, err) + emptyHash := sha256.Sum256([]byte{}) + appHash := emptyHash[:] // New store has empty last commit. - commitID := types.CommitID{} + commitID := types.CommitID{Hash: appHash} checkStore(t, store, commitID, commitID) // Make sure we can get stores by name. @@ -648,7 +655,8 @@ func TestSetInitialVersion(t *testing.T) { require.NoError(t, multi.LoadLatestVersion()) - multi.SetInitialVersion(5) + err := multi.SetInitialVersion(5) + require.NoError(t, err) require.Equal(t, int64(5), multi.initialVersion) multi.Commit() @@ -743,7 +751,9 @@ func TestCommitOrdered(t *testing.T) { err := multi.LoadLatestVersion() require.Nil(t, err) - commitID := types.CommitID{} + emptyHash := sha256.Sum256([]byte{}) + appHash := emptyHash[:] + commitID := types.CommitID{Hash: appHash} checkStore(t, multi, commitID, commitID) k, v := []byte("wind"), []byte("blows") @@ -820,26 +830,27 @@ func unmountStore(rootStore *Store, storeKeyName string) { } func checkStore(t *testing.T, store *Store, expect, got types.CommitID) { + t.Helper() require.Equal(t, expect, got) require.Equal(t, expect, store.LastCommitID()) } -func checkContains(t testing.TB, info []types.StoreInfo, wanted []string) { - t.Helper() +func checkContains(tb testing.TB, info []types.StoreInfo, wanted []string) { + tb.Helper() for _, want := range wanted { - checkHas(t, info, want) + checkHas(tb, info, want) } } -func checkHas(t testing.TB, info []types.StoreInfo, want string) { - t.Helper() +func checkHas(tb testing.TB, info []types.StoreInfo, want string) { + tb.Helper() for _, i := range info { if i.Name == want { return } } - t.Fatalf("storeInfo doesn't contain %s", want) + tb.Fatalf("storeInfo doesn't contain %s", want) } func getExpectedCommitID(store *Store, ver int64) types.CommitID { @@ -915,13 +926,15 @@ func (stub *commitKVStoreStub) Commit() types.CommitID { return commitID } -func prepareStoreMap() map[types.StoreKey]types.CommitKVStore { +func prepareStoreMap() (map[types.StoreKey]types.CommitKVStore, error) { var db dbm.DB = dbm.NewMemDB() store := NewStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics()) 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() + if err := store.LoadLatestVersion(); err != nil { + return nil, err + } return map[types.StoreKey]types.CommitKVStore{ testStoreKey1: &commitKVStoreStub{ CommitKVStore: store.GetStoreByName("iavl1").(types.CommitKVStore), @@ -932,7 +945,7 @@ func prepareStoreMap() map[types.StoreKey]types.CommitKVStore { testStoreKey3: &commitKVStoreStub{ CommitKVStore: store.GetStoreByName("trans1").(types.CommitKVStore), }, - } + }, nil } func TestCommitStores(t *testing.T) { @@ -959,7 +972,8 @@ func TestCommitStores(t *testing.T) { } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - storeMap := prepareStoreMap() + storeMap, err := prepareStoreMap() + require.NoError(t, err) store := storeMap[testStoreKey1].(*commitKVStoreStub) for i := tc.committed; i > 0; i-- { store.Commit() diff --git a/store/snapshots/chunk.go b/store/snapshots/chunk.go index 7cfce6330219..fdf8cbd4b9a5 100644 --- a/store/snapshots/chunk.go +++ b/store/snapshots/chunk.go @@ -59,11 +59,13 @@ func (w *ChunkWriter) Close() error { // CloseWithError closes the writer and sends an error to the reader. func (w *ChunkWriter) CloseWithError(err error) { if !w.closed { + if w.pipe == nil { + // create a dummy pipe just to propagate the error to the reader, it always returns nil + _ = w.chunk() + } w.closed = true close(w.ch) - if w.pipe != nil { - _ = w.pipe.CloseWithError(err) // CloseWithError always returns nil - } + _ = w.pipe.CloseWithError(err) // CloseWithError always returns nil } } diff --git a/store/snapshots/helpers_test.go b/store/snapshots/helpers_test.go index 0cb307642a0c..d337b53ab79b 100644 --- a/store/snapshots/helpers_test.go +++ b/store/snapshots/helpers_test.go @@ -11,12 +11,12 @@ import ( "testing" "time" - "cosmossdk.io/log" db "github.com/cosmos/cosmos-db" protoio "github.com/cosmos/gogoproto/io" "github.com/stretchr/testify/require" errorsmod "cosmossdk.io/errors" + "cosmossdk.io/log" "cosmossdk.io/store/snapshots" snapshottypes "cosmossdk.io/store/snapshots/types" "cosmossdk.io/store/types" @@ -171,9 +171,42 @@ func (m *mockSnapshotter) SetSnapshotInterval(snapshotInterval uint64) { m.snapshotInterval = snapshotInterval } +type mockErrorSnapshotter struct{} + +var _ snapshottypes.Snapshotter = (*mockErrorSnapshotter)(nil) + +func (m *mockErrorSnapshotter) Snapshot(height uint64, protoWriter protoio.Writer) error { + return errors.New("mock snapshot error") +} + +func (m *mockErrorSnapshotter) Restore( + height uint64, format uint32, protoReader protoio.Reader, +) (snapshottypes.SnapshotItem, error) { + return snapshottypes.SnapshotItem{}, errors.New("mock restore error") +} + +func (m *mockErrorSnapshotter) SnapshotFormat() uint32 { + return snapshottypes.CurrentFormat +} + +func (m *mockErrorSnapshotter) SupportedFormats() []uint32 { + return []uint32{snapshottypes.CurrentFormat} +} + +func (m *mockErrorSnapshotter) PruneSnapshotHeight(height int64) { +} + +func (m *mockErrorSnapshotter) GetSnapshotInterval() uint64 { + return 0 +} + +func (m *mockErrorSnapshotter) SetSnapshotInterval(snapshotInterval uint64) { +} + // setupBusyManager creates a manager with an empty store that is busy creating a snapshot at height 1. // The snapshot will complete when the returned closer is called. func setupBusyManager(t *testing.T) *snapshots.Manager { + t.Helper() store, err := snapshots.NewStore(db.NewMemDB(), t.TempDir()) require.NoError(t, err) hung := newHungSnapshotter() @@ -291,14 +324,14 @@ func (s *extSnapshotter) RestoreExtension(height uint64, format uint32, payloadR } // GetTempDir returns a writable temporary director for the test to use. -func GetTempDir(t testing.TB) string { - t.Helper() +func GetTempDir(tb testing.TB) string { + tb.Helper() // os.MkDir() is used instead of testing.T.TempDir() // see https://github.com/cosmos/cosmos-sdk/pull/8475 and // https://github.com/cosmos/cosmos-sdk/pull/10341 for // this change's rationale. tempdir, err := os.MkdirTemp("", "") - require.NoError(t, err) - t.Cleanup(func() { _ = os.RemoveAll(tempdir) }) + require.NoError(tb, err) + tb.Cleanup(func() { _ = os.RemoveAll(tempdir) }) return tempdir } diff --git a/store/snapshots/manager.go b/store/snapshots/manager.go index 57e6a8f18af5..3bedcd3ae001 100644 --- a/store/snapshots/manager.go +++ b/store/snapshots/manager.go @@ -11,9 +11,8 @@ import ( "sort" "sync" - "cosmossdk.io/log" - errorsmod "cosmossdk.io/errors" + "cosmossdk.io/log" "cosmossdk.io/store/snapshots/types" storetypes "cosmossdk.io/store/types" ) @@ -515,7 +514,8 @@ func (m *Manager) SnapshotIfApplicable(height int64) { m.logger.Debug("snapshot is skipped", "height", height) return } - m.snapshot(height) + // start the routine after need to create a snapshot + go m.snapshot(height) } // shouldTakeSnapshot returns true is snapshot should be taken at height. @@ -551,3 +551,8 @@ func (m *Manager) snapshot(height int64) { m.logger.Debug("pruned state snapshots", "pruned", pruned) } } + +// Close the snapshot database. +func (m *Manager) Close() error { + return m.store.db.Close() +} diff --git a/store/snapshots/manager_test.go b/store/snapshots/manager_test.go index d18696d12855..49f31e86272b 100644 --- a/store/snapshots/manager_test.go +++ b/store/snapshots/manager_test.go @@ -4,6 +4,7 @@ import ( "errors" "testing" + db "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -34,6 +35,8 @@ func TestManager_List(t *testing.T) { list, err := manager.List() require.NoError(t, err) assert.Equal(t, []*types.Snapshot{}, list) + + require.NoError(t, manager.Close()) } func TestManager_LoadChunk(t *testing.T) { @@ -243,3 +246,13 @@ func TestManager_Restore(t *testing.T) { }) require.NoError(t, err) } + +func TestManager_TakeError(t *testing.T) { + snapshotter := &mockErrorSnapshotter{} + store, err := snapshots.NewStore(db.NewMemDB(), GetTempDir(t)) + require.NoError(t, err) + manager := snapshots.NewManager(store, opts, snapshotter, nil, log.NewNopLogger()) + + _, err = manager.Create(1) + require.Error(t, err) +} diff --git a/store/snapshots/store_test.go b/store/snapshots/store_test.go index 2fe1d656d8a3..f4ff0ef74df2 100644 --- a/store/snapshots/store_test.go +++ b/store/snapshots/store_test.go @@ -16,6 +16,7 @@ import ( ) func setupStore(t *testing.T) *snapshots.Store { + t.Helper() store, err := snapshots.NewStore(db.NewMemDB(), GetTempDir(t)) require.NoError(t, err) diff --git a/store/snapshots/stream.go b/store/snapshots/stream.go index 9c4c8a9412b5..e010f9224468 100644 --- a/store/snapshots/stream.go +++ b/store/snapshots/stream.go @@ -5,9 +5,10 @@ import ( "compress/zlib" "io" - "cosmossdk.io/errors" protoio "github.com/cosmos/gogoproto/io" "github.com/cosmos/gogoproto/proto" + + "cosmossdk.io/errors" ) const ( diff --git a/store/snapshots/types/convert.go b/store/snapshots/types/convert.go index 71b3d0642b3b..90deead3bfa8 100644 --- a/store/snapshots/types/convert.go +++ b/store/snapshots/types/convert.go @@ -1,9 +1,10 @@ package types import ( - "cosmossdk.io/errors" abci "github.com/cometbft/cometbft/abci/types" proto "github.com/cosmos/gogoproto/proto" + + "cosmossdk.io/errors" ) // Converts an ABCI snapshot to a snapshot. Mainly to decode the SDK metadata. diff --git a/store/streaming/streaming_test.go b/store/streaming/streaming_test.go index c00c6021e5c1..e6124838b57e 100644 --- a/store/streaming/streaming_test.go +++ b/store/streaming/streaming_test.go @@ -8,16 +8,15 @@ import ( "testing" "time" - "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/gogoproto/proto" - - storetypes "cosmossdk.io/store/types" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" + + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" ) type PluginTestSuite struct { diff --git a/store/tracekv/store.go b/store/tracekv/store.go index 9ab124aa0e48..ba6df431da16 100644 --- a/store/tracekv/store.go +++ b/store/tracekv/store.go @@ -6,7 +6,6 @@ import ( "io" "cosmossdk.io/errors" - "cosmossdk.io/store/types" ) @@ -196,5 +195,8 @@ func writeOperation(w io.Writer, op operation, tc types.TraceContext, key, value panic(errors.Wrap(err, "failed to write trace operation")) } - io.WriteString(w, "\n") + _, err = io.WriteString(w, "\n") + if err != nil { + panic(errors.Wrap(err, "failed to write newline")) + } } diff --git a/store/tracekv/store_test.go b/store/tracekv/store_test.go index dc04302a3bbf..2c42734baefd 100644 --- a/store/tracekv/store_test.go +++ b/store/tracekv/store_test.go @@ -6,9 +6,8 @@ import ( "io" "testing" - "github.com/stretchr/testify/require" - dbm "github.com/cosmos/cosmos-db" + "github.com/stretchr/testify/require" "cosmossdk.io/store/dbadapter" "cosmossdk.io/store/internal/kv" diff --git a/store/types/commit_info.go b/store/types/commit_info.go index 125111a0c228..249d0986d403 100644 --- a/store/types/commit_info.go +++ b/store/types/commit_info.go @@ -1,6 +1,8 @@ package types import ( + "crypto/sha256" + cmtprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto" "cosmossdk.io/store/internal/maps" @@ -30,10 +32,17 @@ func (ci CommitInfo) toMap() map[string][]byte { func (ci CommitInfo) Hash() []byte { // we need a special case for empty set, as SimpleProofsFromMap requires at least one entry if len(ci.StoreInfos) == 0 { - return nil + emptyHash := sha256.Sum256([]byte{}) + return emptyHash[:] } rootHash, _, _ := maps.ProofsFromMap(ci.toMap()) + + if len(rootHash) == 0 { + emptyHash := sha256.Sum256([]byte{}) + return emptyHash[:] + } + return rootHash } diff --git a/store/types/iterator_test.go b/store/types/iterator_test.go index c9c33b556237..a804b092c8ea 100644 --- a/store/types/iterator_test.go +++ b/store/types/iterator_test.go @@ -3,16 +3,17 @@ package types_test import ( "testing" - "cosmossdk.io/log" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require" + "cosmossdk.io/log" "cosmossdk.io/store/iavl" "cosmossdk.io/store/metrics" "cosmossdk.io/store/types" ) func newMemTestKVStore(t *testing.T) types.KVStore { + t.Helper() db := dbm.NewMemDB() store, err := iavl.LoadStore(db, log.NewNopLogger(), types.NewKVStoreKey("test"), types.CommitID{}, iavl.DefaultIAVLCacheSize, false, metrics.NewNoOpMetrics()) require.NoError(t, err) diff --git a/store/wrapper/wrapper.go b/store/wrapper/wrapper.go new file mode 100644 index 000000000000..5ccb4aef4698 --- /dev/null +++ b/store/wrapper/wrapper.go @@ -0,0 +1,34 @@ +package wrapper + +import ( + dbm "github.com/cosmos/cosmos-db" + idb "github.com/cosmos/iavl/db" +) + +var _ idb.DB = &DBWrapper{} + +// DBwrapper is a simple wrapper of dbm.DB that implements the iavl.DB interface. +type DBWrapper struct { + dbm.DB +} + +// NewDBWrapper creates a new DBWrapper instance. +func NewDBWrapper(db dbm.DB) *DBWrapper { + return &DBWrapper{db} +} + +func (dbw *DBWrapper) NewBatch() idb.Batch { + return dbw.DB.NewBatch() +} + +func (dbw *DBWrapper) NewBatchWithSize(size int) idb.Batch { + return dbw.DB.NewBatchWithSize(size) +} + +func (dbw *DBWrapper) Iterator(start, end []byte) (idb.Iterator, error) { + return dbw.DB.Iterator(start, end) +} + +func (dbw *DBWrapper) ReverseIterator(start, end []byte) (idb.Iterator, error) { + return dbw.DB.ReverseIterator(start, end) +} diff --git a/telemetry/metrics.go b/telemetry/metrics.go index a0cb15b11fa1..07d1020eb892 100644 --- a/telemetry/metrics.go +++ b/telemetry/metrics.go @@ -4,14 +4,25 @@ import ( "bytes" "encoding/json" "fmt" + "net/http" "time" - "github.com/armon/go-metrics" - metricsprom "github.com/armon/go-metrics/prometheus" + "github.com/hashicorp/go-metrics" + "github.com/hashicorp/go-metrics/datadog" + metricsprom "github.com/hashicorp/go-metrics/prometheus" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/expfmt" ) +// globalTelemetryEnabled is a private variable that stores the telemetry enabled state. +// It is set on initialization and does not change for the lifetime of the program. +var globalTelemetryEnabled bool + +// IsTelemetryEnabled provides controlled access to check if telemetry is enabled. +func IsTelemetryEnabled() bool { + return globalTelemetryEnabled +} + // globalLabels defines the set of global labels that will be applied to all // metrics emitted using the telemetry package function wrappers. var globalLabels = []metrics.Label{} @@ -21,8 +32,18 @@ const ( FormatDefault = "" FormatPrometheus = "prometheus" FormatText = "text" + ContentTypeText = `text/plain; version=` + expfmt.TextVersion + `; charset=utf-8` + + MetricSinkInMem = "mem" + MetricSinkStatsd = "statsd" + MetricSinkDogsStatsd = "dogstatsd" ) +// DisplayableSink is an interface that defines a method for displaying metrics. +type DisplayableSink interface { + DisplayMetrics(resp http.ResponseWriter, req *http.Request) (any, error) +} + // Config defines the configuration options for application telemetry. type Config struct { // Prefixed with keys to separate services @@ -52,6 +73,17 @@ type Config struct { // Example: // [["chain_id", "cosmoshub-1"]] GlobalLabels [][]string `mapstructure:"global-labels"` + + // MetricsSink defines the type of metrics backend to use. + MetricsSink string `mapstructure:"metrics-sink" default:"mem"` + + // StatsdAddr defines the address of a statsd server to send metrics to. + // Only utilized if MetricsSink is set to "statsd" or "dogstatsd". + StatsdAddr string `mapstructure:"statsd-addr"` + + // DatadogHostname defines the hostname to use when emitting metrics to + // Datadog. Only utilized if MetricsSink is set to "dogstatsd". + DatadogHostname string `mapstructure:"datadog-hostname"` } // Metrics defines a wrapper around application telemetry functionality. It allows @@ -60,7 +92,7 @@ type Config struct { // by the operator. In addition to the sinks, when a process gets a SIGUSR1, a // dump of formatted recent metrics will be sent to STDERR. type Metrics struct { - memSink *metrics.InmemSink + sink metrics.MetricSink prometheusEnabled bool } @@ -72,16 +104,16 @@ type GatherResponse struct { // New creates a new instance of Metrics func New(cfg Config) (_ *Metrics, rerr error) { + globalTelemetryEnabled = cfg.Enabled if !cfg.Enabled { return nil, nil } - if numGlobalLables := len(cfg.GlobalLabels); numGlobalLables > 0 { - parsedGlobalLabels := make([]metrics.Label, numGlobalLables) + if numGlobalLabels := len(cfg.GlobalLabels); numGlobalLabels > 0 { + parsedGlobalLabels := make([]metrics.Label, numGlobalLabels) for i, gl := range cfg.GlobalLabels { parsedGlobalLabels[i] = NewLabel(gl[0], gl[1]) } - globalLabels = parsedGlobalLabels } @@ -89,16 +121,32 @@ func New(cfg Config) (_ *Metrics, rerr error) { metricsConf.EnableHostname = cfg.EnableHostname metricsConf.EnableHostnameLabel = cfg.EnableHostnameLabel - memSink := metrics.NewInmemSink(10*time.Second, time.Minute) - inMemSig := metrics.DefaultInmemSignal(memSink) - defer func() { - if rerr != nil { - inMemSig.Stop() - } - }() + var ( + sink metrics.MetricSink + err error + ) + switch cfg.MetricsSink { + case MetricSinkStatsd: + sink, err = metrics.NewStatsdSink(cfg.StatsdAddr) + case MetricSinkDogsStatsd: + sink, err = datadog.NewDogStatsdSink(cfg.StatsdAddr, cfg.DatadogHostname) + default: + memSink := metrics.NewInmemSink(10*time.Second, time.Minute) + sink = memSink + inMemSig := metrics.DefaultInmemSignal(memSink) + defer func() { + if rerr != nil { + inMemSig.Stop() + } + }() + } + + if err != nil { + return nil, err + } - m := &Metrics{memSink: memSink} - fanout := metrics.FanoutSink{memSink} + m := &Metrics{sink: sink} + fanout := metrics.FanoutSink{sink} if cfg.PrometheusRetentionTime > 0 { m.prometheusEnabled = true @@ -140,6 +188,8 @@ func (m *Metrics) Gather(format string) (GatherResponse, error) { } } +// gatherPrometheus collects Prometheus metrics and returns a GatherResponse. +// If Prometheus metrics are not enabled, it returns an error. func (m *Metrics) gatherPrometheus() (GatherResponse, error) { if !m.prometheusEnabled { return GatherResponse{}, fmt.Errorf("prometheus metrics are not enabled") @@ -153,18 +203,25 @@ func (m *Metrics) gatherPrometheus() (GatherResponse, error) { buf := &bytes.Buffer{} defer buf.Reset() - e := expfmt.NewEncoder(buf, expfmt.FmtText) + e := expfmt.NewEncoder(buf, expfmt.NewFormat(expfmt.TypeTextPlain)) + for _, mf := range metricsFamilies { if err := e.Encode(mf); err != nil { return GatherResponse{}, fmt.Errorf("failed to encode prometheus metrics: %w", err) } } - return GatherResponse{ContentType: string(expfmt.FmtText), Metrics: buf.Bytes()}, nil + return GatherResponse{ContentType: ContentTypeText, Metrics: buf.Bytes()}, nil } +// gatherGeneric collects generic metrics and returns a GatherResponse. func (m *Metrics) gatherGeneric() (GatherResponse, error) { - summary, err := m.memSink.DisplayMetrics(nil, nil) + gm, ok := m.sink.(DisplayableSink) + if !ok { + return GatherResponse{}, fmt.Errorf("non in-memory metrics sink does not support generic format") + } + + summary, err := gm.DisplayMetrics(nil, nil) if err != nil { return GatherResponse{}, fmt.Errorf("failed to gather in-memory metrics: %w", err) } diff --git a/telemetry/metrics_test.go b/telemetry/metrics_test.go index aa4c934bfb58..e7b8895dfdcf 100644 --- a/telemetry/metrics_test.go +++ b/telemetry/metrics_test.go @@ -6,8 +6,7 @@ import ( "testing" "time" - "github.com/armon/go-metrics" - "github.com/prometheus/common/expfmt" + "github.com/hashicorp/go-metrics" "github.com/stretchr/testify/require" ) @@ -19,6 +18,7 @@ func TestMetrics_Disabled(t *testing.T) { func TestMetrics_InMem(t *testing.T) { m, err := New(Config{ + MetricsSink: MetricSinkInMem, Enabled: true, EnableHostname: false, ServiceName: "test", @@ -42,6 +42,7 @@ func TestMetrics_InMem(t *testing.T) { func TestMetrics_Prom(t *testing.T) { m, err := New(Config{ + MetricsSink: MetricSinkInMem, Enabled: true, EnableHostname: false, ServiceName: "test", @@ -56,7 +57,7 @@ func TestMetrics_Prom(t *testing.T) { gr, err := m.Gather(FormatPrometheus) require.NoError(t, err) - require.Equal(t, gr.ContentType, string(expfmt.FmtText)) + require.Equal(t, gr.ContentType, ContentTypeText) require.True(t, strings.Contains(string(gr.Metrics), "test_dummy_counter 30")) } diff --git a/telemetry/wrapper.go b/telemetry/wrapper.go index c669c816a964..da11f1fa0450 100644 --- a/telemetry/wrapper.go +++ b/telemetry/wrapper.go @@ -3,7 +3,7 @@ package telemetry import ( "time" - "github.com/armon/go-metrics" + "github.com/hashicorp/go-metrics" ) // Common metric key constants @@ -24,6 +24,10 @@ func NewLabel(name, value string) metrics.Label { // metric for a module with a given set of keys. If any global labels are defined, // they will be added to the module label. func ModuleMeasureSince(module string, start time.Time, keys ...string) { + if !IsTelemetryEnabled() { + return + } + metrics.MeasureSinceWithLabels( keys, start.UTC(), @@ -35,6 +39,10 @@ func ModuleMeasureSince(module string, start time.Time, keys ...string) { // module with a given set of keys. If any global labels are defined, they will // be added to the module label. func ModuleSetGauge(module string, val float32, keys ...string) { + if !IsTelemetryEnabled() { + return + } + metrics.SetGaugeWithLabels( keys, val, @@ -45,29 +53,58 @@ func ModuleSetGauge(module string, val float32, keys ...string) { // IncrCounter provides a wrapper functionality for emitting a counter metric with // global labels (if any). func IncrCounter(val float32, keys ...string) { + if !IsTelemetryEnabled() { + return + } + metrics.IncrCounterWithLabels(keys, val, globalLabels) } // IncrCounterWithLabels provides a wrapper functionality for emitting a counter // metric with global labels (if any) along with the provided labels. func IncrCounterWithLabels(keys []string, val float32, labels []metrics.Label) { + if !IsTelemetryEnabled() { + return + } + metrics.IncrCounterWithLabels(keys, val, append(labels, globalLabels...)) } // SetGauge provides a wrapper functionality for emitting a gauge metric with // global labels (if any). func SetGauge(val float32, keys ...string) { + if !IsTelemetryEnabled() { + return + } + metrics.SetGaugeWithLabels(keys, val, globalLabels) } // SetGaugeWithLabels provides a wrapper functionality for emitting a gauge // metric with global labels (if any) along with the provided labels. func SetGaugeWithLabels(keys []string, val float32, labels []metrics.Label) { + if !IsTelemetryEnabled() { + return + } + metrics.SetGaugeWithLabels(keys, val, append(labels, globalLabels...)) } // MeasureSince provides a wrapper functionality for emitting a a time measure // metric with global labels (if any). func MeasureSince(start time.Time, keys ...string) { + if !IsTelemetryEnabled() { + return + } + metrics.MeasureSinceWithLabels(keys, start.UTC(), globalLabels) } + +// Now return the current time if telemetry is enabled or a zero time if it's not +func Now() time.Time { + if !IsTelemetryEnabled() { + return time.Time{} + } + + return time.Now() +} diff --git a/telemetry/wrapper_test.go b/telemetry/wrapper_test.go new file mode 100644 index 000000000000..5388839874bc --- /dev/null +++ b/telemetry/wrapper_test.go @@ -0,0 +1,51 @@ +package telemetry + +import ( + "sync" + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +var mu sync.Mutex + +func initTelemetry(v bool) { + globalTelemetryEnabled = v +} + +// Reset the global state to a known disabled state before each test. +func setupTest(t *testing.T) { + t.Helper() + mu.Lock() // Ensure no other test can modify global state at the same time. + defer mu.Unlock() + initTelemetry(false) +} + +// TestNow tests the Now function when telemetry is enabled and disabled. +func TestNow(t *testing.T) { + setupTest(t) // Locks the mutex to avoid race condition. + + initTelemetry(true) + telemetryTime := Now() + assert.NotEqual(t, time.Time{}, telemetryTime, "Now() should not return zero time when telemetry is enabled") + + setupTest(t) // Reset the global state and lock the mutex again. + + initTelemetry(false) + telemetryTime = Now() + assert.Equal(t, time.Time{}, telemetryTime, "Now() should return zero time when telemetry is disabled") +} + +// TestIsTelemetryEnabled tests the IsTelemetryEnabled function. +func TestIsTelemetryEnabled(t *testing.T) { + setupTest(t) // Locks the mutex to avoid race condition. + + initTelemetry(true) + assert.True(t, IsTelemetryEnabled(), "IsTelemetryEnabled() should return true when globalTelemetryEnabled is set to true") + + setupTest(t) // Reset the global state and lock the mutex again. + + initTelemetry(false) + assert.False(t, IsTelemetryEnabled(), "IsTelemetryEnabled() should return false when globalTelemetryEnabled is set to false") +} diff --git a/tests/e2e/auth/suite.go b/tests/e2e/auth/suite.go index e6a1fc2963b4..fd12683c485d 100644 --- a/tests/e2e/auth/suite.go +++ b/tests/e2e/auth/suite.go @@ -7,12 +7,13 @@ import ( "strings" "testing" - "cosmossdk.io/depinject" - "cosmossdk.io/math" abci "github.com/cometbft/cometbft/abci/types" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" + "cosmossdk.io/depinject" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" addresscodec "github.com/cosmos/cosmos-sdk/codec/address" @@ -30,7 +31,6 @@ import ( authcli "github.com/cosmos/cosmos-sdk/x/auth/client/cli" authclitestutil "github.com/cosmos/cosmos-sdk/x/auth/client/testutil" authtestutil "github.com/cosmos/cosmos-sdk/x/auth/testutil" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" bank "github.com/cosmos/cosmos-sdk/x/bank/client/cli" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" @@ -98,7 +98,7 @@ func (s *E2ETestSuite) TestCLISignGenOnly() { account, err := val.ClientCtx.AccountRetriever.GetAccount(val.ClientCtx, addr) s.Require().NoError(err) - sendTokens := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))) + sendTokens := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(10))) args := []string{ keyName, // from keyname val2.Address.String(), @@ -204,8 +204,8 @@ func (s *E2ETestSuite) TestCLISignGenOnly() { func (s *E2ETestSuite) TestCLISignBatch() { val := s.network.Validators[0] sendTokens := sdk.NewCoins( - sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)), - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), + sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), math.NewInt(10)), + sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)), ) generatedStd, err := s.createBankMsg(val, val.Address, @@ -288,50 +288,6 @@ func (s *E2ETestSuite) TestCLISignBatch() { s.Require().Equal(sigs[0].Sequence, seq1) } -func (s *E2ETestSuite) TestCliGetAccountAddressByID() { - require := s.Require() - val1 := s.network.Validators[0] - testCases := []struct { - name string - args []string - expectErr bool - }{ - { - "not enough args", - []string{fmt.Sprintf("--%s=json", flags.FlagOutput)}, - true, - }, - { - "invalid account id", - []string{fmt.Sprint(-1), fmt.Sprintf("--%s=json", flags.FlagOutput)}, - true, - }, - { - "valid account id", - []string{fmt.Sprint(0), fmt.Sprintf("--%s=json", flags.FlagOutput)}, - false, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := authcli.GetAccountAddressByIDCmd() - clientCtx := val1.ClientCtx - - queryResJSON, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - var res authtypes.QueryAccountAddressByIDResponse - require.NoError(val1.ClientCtx.Codec.UnmarshalJSON(queryResJSON.Bytes(), &res)) - require.NotNil(res.GetAccountAddress()) - } - }) - } -} - func (s *E2ETestSuite) TestCLIQueryTxCmdByHash() { val := s.network.Validators[0] @@ -572,7 +528,7 @@ func (s *E2ETestSuite) TestCLIQueryTxsCmdByEvents() { []string{ fmt.Sprintf( "--query=tx.fee='%s'", - sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String(), + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String(), ), fmt.Sprintf("--%s=json", flags.FlagOutput), }, @@ -583,7 +539,7 @@ func (s *E2ETestSuite) TestCLIQueryTxsCmdByEvents() { []string{ fmt.Sprintf( "--query=tx.fee='%s'", - sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(0))).String(), + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(0))).String(), ), fmt.Sprintf("--%s=json", flags.FlagOutput), }, @@ -656,11 +612,11 @@ func (s *E2ETestSuite) TestCLISendGenerateSignAndBroadcast() { s.Require().NoError(err) s.Require().Equal(0, len(sigs)) - resp, err := clitestutil.QueryBalancesExec(val1.ClientCtx, val1.Address, addresscodec.NewBech32Codec("cosmos")) + resp, err := testutil.GetRequest(fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s", val1.APIAddress, val1.Address)) s.Require().NoError(err) var balRes banktypes.QueryAllBalancesResponse - err = val1.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) + err = val1.ClientCtx.Codec.UnmarshalJSON(resp, &balRes) s.Require().NoError(err) startTokens := balRes.Balances.AmountOf(s.cfg.BondDenom) @@ -723,10 +679,9 @@ func (s *E2ETestSuite) TestCLISendGenerateSignAndBroadcast() { s.Require().NoError(s.network.WaitForNextBlock()) // Ensure foo has right amount of funds - resp, err = clitestutil.QueryBalancesExec(val1.ClientCtx, val1.Address, addresscodec.NewBech32Codec("cosmos")) + resp, err = testutil.GetRequest(fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s", val1.APIAddress, val1.Address)) s.Require().NoError(err) - - err = val1.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) + err = val1.ClientCtx.Codec.UnmarshalJSON(resp, &balRes) s.Require().NoError(err) s.Require().Equal(startTokens, balRes.Balances.AmountOf(s.cfg.BondDenom)) @@ -745,20 +700,20 @@ func (s *E2ETestSuite) TestCLISendGenerateSignAndBroadcast() { // Ensure destiny account state err = s.network.RetryForBlocks(func() error { - resp, err = clitestutil.QueryBalancesExec(val1.ClientCtx, addr, addresscodec.NewBech32Codec("cosmos")) + resp, err = testutil.GetRequest(fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s", val1.APIAddress, addr)) + s.Require().NoError(err) return err }, 3) s.Require().NoError(err) - err = val1.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) + err = val1.ClientCtx.Codec.UnmarshalJSON(resp, &balRes) s.Require().NoError(err) s.Require().Equal(sendTokens.Amount, balRes.Balances.AmountOf(s.cfg.BondDenom)) // Ensure origin account state - resp, err = clitestutil.QueryBalancesExec(val1.ClientCtx, val1.Address, addresscodec.NewBech32Codec("cosmos")) + resp, err = testutil.GetRequest(fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s", val1.APIAddress, val1.Address)) s.Require().NoError(err) - - err = val1.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) + err = val1.ClientCtx.Codec.UnmarshalJSON(resp, &balRes) s.Require().NoError(err) } @@ -796,7 +751,7 @@ func (s *E2ETestSuite) TestCLIMultisignInsufficientCosigners() { addresscodec.NewBech32Codec("cosmos"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), ) s.Require().NoError(err) @@ -877,11 +832,11 @@ func (s *E2ETestSuite) TestCLIMultisignSortSignatures() { addr, err := multisigRecord.GetAddress() s.Require().NoError(err) - resp, err := clitestutil.QueryBalancesExec(val1.ClientCtx, addr, addresscodec.NewBech32Codec("cosmos")) + resp, err := testutil.GetRequest(fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s", val1.APIAddress, addr)) s.Require().NoError(err) var balRes banktypes.QueryAllBalancesResponse - err = val1.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) + err = val1.ClientCtx.Codec.UnmarshalJSON(resp, &balRes) s.Require().NoError(err) intialCoins := balRes.Balances @@ -895,10 +850,9 @@ func (s *E2ETestSuite) TestCLIMultisignSortSignatures() { s.Require().NoError(err) s.Require().NoError(s.network.WaitForNextBlock()) - resp, err = clitestutil.QueryBalancesExec(val1.ClientCtx, addr, addresscodec.NewBech32Codec("cosmos")) + resp, err = testutil.GetRequest(fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s", val1.APIAddress, addr)) s.Require().NoError(err) - - err = val1.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) + err = val1.ClientCtx.Codec.UnmarshalJSON(resp, &balRes) s.Require().NoError(err) diff, _ := balRes.Balances.SafeSub(intialCoins...) s.Require().Equal(sendTokens.Amount, diff.AmountOf(s.cfg.BondDenom)) @@ -914,7 +868,7 @@ func (s *E2ETestSuite) TestCLIMultisignSortSignatures() { addresscodec.NewBech32Codec("cosmos"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), ) s.Require().NoError(err) @@ -992,7 +946,7 @@ func (s *E2ETestSuite) TestSignWithMultisig() { addresscodec.NewBech32Codec("cosmos"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), ) s.Require().NoError(err) @@ -1037,11 +991,11 @@ func (s *E2ETestSuite) TestCLIMultisign() { var balRes banktypes.QueryAllBalancesResponse err = s.network.RetryForBlocks(func() error { - resp, err := clitestutil.QueryBalancesExec(val1.ClientCtx, addr, addresscodec.NewBech32Codec("cosmos")) + resp, err := testutil.GetRequest(fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s", val1.APIAddress, addr)) if err != nil { return err } - return val1.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) + return val1.ClientCtx.Codec.UnmarshalJSON(resp, &balRes) }, 3) s.Require().NoError(err) s.Require().True(sendTokens.Amount.Equal(balRes.Balances.AmountOf(s.cfg.BondDenom))) @@ -1057,7 +1011,7 @@ func (s *E2ETestSuite) TestCLIMultisign() { addresscodec.NewBech32Codec("cosmos"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), ) s.Require().NoError(err) @@ -1146,12 +1100,12 @@ func (s *E2ETestSuite) TestSignBatchMultisig() { addr, val.Address, sdk.NewCoins( - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(1)), + sdk.NewCoin(s.cfg.BondDenom, math.NewInt(1)), ), addresscodec.NewBech32Codec("cosmos"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), ) s.Require().NoError(err) @@ -1212,12 +1166,12 @@ func (s *E2ETestSuite) TestMultisignBatch() { addr, val.Address, sdk.NewCoins( - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(1)), + sdk.NewCoin(s.cfg.BondDenom, math.NewInt(1)), ), addresscodec.NewBech32Codec("cosmos"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), ) s.Require().NoError(err) @@ -1227,10 +1181,8 @@ func (s *E2ETestSuite) TestMultisignBatch() { defer filename.Close() val.ClientCtx.HomeDir = strings.Replace(val.ClientCtx.HomeDir, "simd", "simcli", 1) - queryResJSON, err := authclitestutil.QueryAccountExec(val.ClientCtx, addr, addresscodec.NewBech32Codec("cosmos")) + account, err := val.ClientCtx.AccountRetriever.GetAccount(val.ClientCtx, addr) s.Require().NoError(err) - var account sdk.AccountI - s.Require().NoError(val.ClientCtx.Codec.UnmarshalInterfaceJSON(queryResJSON.Bytes(), &account)) // sign-batch file addr1, err := account1.GetAddress() @@ -1269,121 +1221,6 @@ func (s *E2ETestSuite) TestMultisignBatch() { } } -func (s *E2ETestSuite) TestGetAccountCmd() { - val := s.network.Validators[0] - _, _, addr1 := testdata.KeyTestPubAddr() - - testCases := []struct { - name string - address sdk.AccAddress - expectErr bool - }{ - { - "invalid address", - addr1, - true, - }, - { - "valid address", - val.Address, - false, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - clientCtx := val.ClientCtx - - out, err := authclitestutil.QueryAccountExec(clientCtx, tc.address, addresscodec.NewBech32Codec("cosmos")) - if tc.expectErr { - s.Require().Error(err) - s.Require().NotEqual("internal", err.Error()) - } else { - var acc sdk.AccountI - s.Require().NoError(val.ClientCtx.Codec.UnmarshalInterfaceJSON(out.Bytes(), &acc)) - s.Require().Equal(val.Address, acc.GetAddress()) - } - }) - } -} - -func (s *E2ETestSuite) TestGetAccountsCmd() { - val := s.network.Validators[0] - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, authcli.GetAccountsCmd(), []string{ - fmt.Sprintf("--%s=json", flags.FlagOutput), - }) - s.Require().NoError(err) - - var res authtypes.QueryAccountsResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) - s.Require().NotEmpty(res.Accounts) -} - -func (s *E2ETestSuite) 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", flags.FlagOutput), - }) - 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 sdk.AccountI - err := val.ClientCtx.InterfaceRegistry.UnpackAny(res.Account, &account) - s.Require().NoError(err) - - moduleAccount, ok := account.(sdk.ModuleAccountI) - s.Require().True(ok) - s.Require().Equal(tc.moduleName, moduleAccount.GetName()) - } - }) - } -} - -func (s *E2ETestSuite) TestQueryModuleAccountsCmd() { - val := s.network.Validators[0] - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, authcli.QueryModuleAccountsCmd(), []string{ - fmt.Sprintf("--%s=json", flags.FlagOutput), - }) - 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) @@ -1426,45 +1263,6 @@ func TestGetBroadcastCommandWithoutOfflineFlag(t *testing.T) { require.Contains(t, out.String(), "connect: connection refused") } -func (s *E2ETestSuite) TestQueryParamsCmd() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectErr bool - }{ - { - "happy case", - []string{fmt.Sprintf("--%s=json", flags.FlagOutput)}, - false, - }, - { - "with specific height", - []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=json", flags.FlagOutput)}, - false, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := authcli.QueryParamsCmd() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - s.Require().NotEqual("internal", err.Error()) - } else { - var authParams authtypes.Params - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &authParams)) - s.Require().NotNil(authParams.MaxMemoCharacters) - } - }) - } -} - // TestTxWithoutPublicKey makes sure sending a proto tx message without the // public key doesn't cause any error in the RPC layer (broadcast). // See https://github.com/cosmos/cosmos-sdk/issues/7585 for more details. @@ -1475,11 +1273,11 @@ func (s *E2ETestSuite) TestTxWithoutPublicKey() { // Create a txBuilder with an unsigned tx. txBuilder := txCfg.NewTxBuilder() msg := banktypes.NewMsgSend(val1.Address, val1.Address, sdk.NewCoins( - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), + sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)), )) err := txBuilder.SetMsgs(msg) s.Require().NoError(err) - txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(150)))) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(150)))) txBuilder.SetGasLimit(testdata.NewTestGasLimit()) // Set empty signature to set signer infos. sigV2 := signing.SignatureV2{ @@ -1532,8 +1330,8 @@ func (s *E2ETestSuite) TestTxWithoutPublicKey() { func (s *E2ETestSuite) TestSignWithMultiSignersAminoJSON() { require := s.Require() val0, val1 := s.network.Validators[0], s.network.Validators[1] - val0Coin := sdk.NewCoin(fmt.Sprintf("%stoken", val0.Moniker), sdk.NewInt(10)) - val1Coin := sdk.NewCoin(fmt.Sprintf("%stoken", val1.Moniker), sdk.NewInt(10)) + val0Coin := sdk.NewCoin(fmt.Sprintf("%stoken", val0.Moniker), math.NewInt(10)) + val1Coin := sdk.NewCoin(fmt.Sprintf("%stoken", val1.Moniker), math.NewInt(10)) _, _, addr1 := testdata.KeyTestPubAddr() // Creating a tx with 2 msgs from 2 signers: val0 and val1. @@ -1545,7 +1343,7 @@ func (s *E2ETestSuite) TestSignWithMultiSignersAminoJSON() { banktypes.NewMsgSend(val0.Address, addr1, sdk.NewCoins(val0Coin)), banktypes.NewMsgSend(val1.Address, addr1, sdk.NewCoins(val1Coin)), ) - txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)))) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)))) txBuilder.SetGasLimit(testdata.NewTestGasLimit() * 2) signers, err := txBuilder.GetTx().GetSigners() require.NoError(err) @@ -1593,10 +1391,10 @@ func (s *E2ETestSuite) TestSignWithMultiSignersAminoJSON() { require.Equal(uint32(0), txRes.Code, txRes.RawLog) // Make sure the addr1's balance got funded. - queryResJSON, err := clitestutil.QueryBalancesExec(val0.ClientCtx, addr1, addresscodec.NewBech32Codec("cosmos")) - require.NoError(err) + resp, err := testutil.GetRequest(fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s", val0.APIAddress, addr1)) + s.Require().NoError(err) var queryRes banktypes.QueryAllBalancesResponse - err = val0.ClientCtx.Codec.UnmarshalJSON(queryResJSON.Bytes(), &queryRes) + err = val0.ClientCtx.Codec.UnmarshalJSON(resp, &queryRes) require.NoError(err) require.Equal(sdk.NewCoins(val0Coin, val1Coin), queryRes.Balances) } @@ -1604,7 +1402,7 @@ func (s *E2ETestSuite) TestSignWithMultiSignersAminoJSON() { func (s *E2ETestSuite) TestAuxSigner() { require := s.Require() val := s.network.Validators[0] - val0Coin := sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)) + val0Coin := sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), math.NewInt(10)) testCases := []struct { name string @@ -1670,11 +1468,11 @@ func (s *E2ETestSuite) TestAuxToFeeWithTips() { tipper, err := acc.GetAddress() require.NoError(err) - tipperInitialBal := sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10000)) + tipperInitialBal := sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), math.NewInt(10000)) feePayer := val.Address - fee := sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(1000)) - tip := sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(1000)) + fee := sdk.NewCoin(s.cfg.BondDenom, math.NewInt(1000)) + tip := sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), math.NewInt(1000)) require.NoError(s.network.WaitForNextBlock()) _, err = s.createBankMsg(val, tipper, sdk.NewCoins(tipperInitialBal)) @@ -1753,7 +1551,7 @@ func (s *E2ETestSuite) TestAuxToFeeWithTips() { name: "--tip flag unset: no error", tipper: tipper, feePayer: feePayer, - tip: sdk.Coin{Denom: fmt.Sprintf("%stoken", val.Moniker), Amount: sdk.NewInt(0)}, + tip: sdk.Coin{Denom: fmt.Sprintf("%stoken", val.Moniker), Amount: math.NewInt(0)}, tipperArgs: []string{ fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirectAux), fmt.Sprintf("--%s=true", flags.FlagAux), @@ -1824,7 +1622,7 @@ func (s *E2ETestSuite) TestAuxToFeeWithTips() { name: "wrong denom in tip: error", tipper: tipper, feePayer: feePayer, - tip: sdk.Coin{Denom: fmt.Sprintf("%stoken", val.Moniker), Amount: sdk.NewInt(0)}, + tip: sdk.Coin{Denom: fmt.Sprintf("%stoken", val.Moniker), Amount: math.NewInt(0)}, tipperArgs: []string{ fmt.Sprintf("--%s=%s", flags.FlagTip, "1000wrongDenom"), fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirectAux), @@ -1843,7 +1641,7 @@ func (s *E2ETestSuite) TestAuxToFeeWithTips() { name: "insufficient fees: error", tipper: tipper, feePayer: feePayer, - tip: sdk.Coin{Denom: fmt.Sprintf("%stoken", val.Moniker), Amount: sdk.NewInt(0)}, + tip: sdk.Coin{Denom: fmt.Sprintf("%stoken", val.Moniker), Amount: math.NewInt(0)}, tipperArgs: []string{ fmt.Sprintf("--%s=%s", flags.FlagTip, tip), fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirectAux), @@ -1878,12 +1676,6 @@ func (s *E2ETestSuite) TestAuxToFeeWithTips() { genTxFile := testutil.WriteToNewTempFile(s.T(), string(res.Bytes())) defer genTxFile.Close() - // broadcast the tx - res, err = authclitestutil.TxAuxToFeeExec( - val.ClientCtx, - genTxFile.Name(), - tc.feePayerArgs..., - ) s.Require().NoError(s.network.WaitForNextBlock()) switch { @@ -1921,7 +1713,7 @@ func (s *E2ETestSuite) createBankMsg(val *network.Validator, toAddr sdk.AccAddre fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, - sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), } flags = append(flags, extraFlags...) @@ -1929,11 +1721,11 @@ func (s *E2ETestSuite) createBankMsg(val *network.Validator, toAddr sdk.AccAddre } func (s *E2ETestSuite) getBalances(clientCtx client.Context, addr sdk.AccAddress, denom string) math.Int { - resp, err := clitestutil.QueryBalancesExec(clientCtx, addr, addresscodec.NewBech32Codec("cosmos")) + resp, err := testutil.GetRequest(fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s/by_denom?denom=%s", s.cfg.APIAddress, addr.String(), denom)) s.Require().NoError(err) var balRes banktypes.QueryAllBalancesResponse - err = clientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) + err = clientCtx.Codec.UnmarshalJSON(resp, &balRes) s.Require().NoError(err) startTokens := balRes.Balances.AmountOf(denom) return startTokens diff --git a/tests/e2e/authz/grpc.go b/tests/e2e/authz/grpc.go index 72de28813cba..24dd529b27a8 100644 --- a/tests/e2e/authz/grpc.go +++ b/tests/e2e/authz/grpc.go @@ -4,6 +4,8 @@ import ( "fmt" "time" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" @@ -116,7 +118,7 @@ func (s *E2ETestSuite) TestQueryGrantsGRPC() { fmt.Sprintf("--%s=%s", cli.FlagMsgType, typeMsgVote), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=%d", cli.FlagExpiration, time.Now().Add(time.Minute*time.Duration(120)).Unix()), }) s.Require().NoError(err) @@ -197,7 +199,7 @@ func (s *E2ETestSuite) TestQueryGranterGrantsGRPC() { fmt.Sprintf("%s/cosmos/authz/v1beta1/grants/granter/%s", val.APIAddress, val.Address.String()), false, "", - 7, + 6, }, } for _, tc := range testCases { diff --git a/tests/e2e/authz/query.go b/tests/e2e/authz/query.go deleted file mode 100644 index e4e0f94073b8..000000000000 --- a/tests/e2e/authz/query.go +++ /dev/null @@ -1,267 +0,0 @@ -package authz - -import ( - "fmt" - "strings" - "time" - - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/codec/address" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/authz" - "github.com/cosmos/cosmos-sdk/x/authz/client/cli" - authzclitestutil "github.com/cosmos/cosmos-sdk/x/authz/client/testutil" -) - -func (s *E2ETestSuite) TestQueryAuthorizations() { - val := s.network.Validators[0] - - grantee := s.grantee[0] - twoHours := time.Now().Add(time.Minute * time.Duration(120)).Unix() - - _, err := authzclitestutil.CreateGrant( - val.ClientCtx, - []string{ - grantee.String(), - "send", - fmt.Sprintf("--%s=100stake", cli.FlagSpendLimit), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%d", cli.FlagExpiration, twoHours), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - }, - ) - s.Require().NoError(err) - s.Require().NoError(s.network.WaitForNextBlock()) - - testCases := []struct { - name string - args []string - expectErr bool - expErrMsg string - }{ - { - "Error: Invalid grantee", - []string{ - val.Address.String(), - "invalid grantee", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - "decoding bech32 failed: invalid character in string: ' '", - }, - { - "Error: Invalid granter", - []string{ - "invalid granter", - grantee.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - "decoding bech32 failed: invalid character in string: ' '", - }, - { - "Valid txn (json)", - []string{ - val.Address.String(), - grantee.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - ``, - }, - } - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryGrants(address.NewBech32Codec("cosmos")) - clientCtx := val.ClientCtx - resp, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - s.Require().Contains(string(resp.Bytes()), tc.expErrMsg) - } else { - s.Require().NoError(err) - var grants authz.QueryGrantsResponse - err = val.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &grants) - s.Require().NoError(err) - } - }) - } -} - -func (s *E2ETestSuite) TestQueryAuthorization() { - val := s.network.Validators[0] - - grantee := s.grantee[0] - twoHours := time.Now().Add(time.Minute * time.Duration(120)).Unix() - - _, err := authzclitestutil.CreateGrant( - val.ClientCtx, - []string{ - grantee.String(), - "send", - fmt.Sprintf("--%s=100stake", cli.FlagSpendLimit), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%d", cli.FlagExpiration, twoHours), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - }, - ) - s.Require().NoError(err) - s.Require().NoError(s.network.WaitForNextBlock()) - - testCases := []struct { - name string - args []string - expectErr bool - expectedOutput string - }{ - { - "Error: Invalid grantee", - []string{ - val.Address.String(), - "invalid grantee", - typeMsgSend, - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - "", - }, - { - "Error: Invalid granter", - []string{ - "invalid granter", - grantee.String(), - typeMsgSend, - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - "", - }, - { - "no authorization found", - []string{ - val.Address.String(), - grantee.String(), - "typeMsgSend", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - "", - }, - { - "Valid txn (json)", - []string{ - val.Address.String(), - grantee.String(), - typeMsgSend, - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - `{"@type":"/cosmos.bank.v1beta1.SendAuthorization","spend_limit":[{"denom":"stake","amount":"100"}],"allow_list":[]}`, - }, - { - "Valid txn with allowed list (json)", - []string{ - val.Address.String(), - s.grantee[3].String(), - typeMsgSend, - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - fmt.Sprintf(`{"@type":"/cosmos.bank.v1beta1.SendAuthorization","spend_limit":[{"denom":"stake","amount":"88"}],"allow_list":["%s"]}`, s.grantee[4]), - }, - } - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryGrants(address.NewBech32Codec("cosmos")) - clientCtx := val.ClientCtx - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - s.Require().Contains(strings.TrimSpace(out.String()), tc.expectedOutput) - } - }) - } -} - -func (s *E2ETestSuite) TestQueryGranterGrants() { - val := s.network.Validators[0] - grantee := s.grantee[0] - require := s.Require() - - testCases := []struct { - name string - args []string - expectErr bool - expectedErr string - expItems int - }{ - { - "invalid address", - []string{ - "invalid-address", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - "decoding bech32 failed", - 0, - }, - { - "no authorization found", - []string{ - grantee.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - "", - 0, - }, - { - "valid case", - []string{ - val.Address.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - "", - 7, - }, - { - "valid case with pagination", - []string{ - val.Address.String(), - "--limit=2", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - "", - 2, - }, - } - for _, tc := range testCases { - s.Run(tc.name, func() { - cmd := cli.GetQueryGranterGrants(address.NewBech32Codec("cosmos")) - clientCtx := val.ClientCtx - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - require.Error(err) - require.Contains(out.String(), tc.expectedErr) - } else { - require.NoError(err) - var grants authz.QueryGranterGrantsResponse - require.NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &grants)) - require.Len(grants.Grants, tc.expItems) - } - }) - } -} diff --git a/tests/e2e/authz/tx.go b/tests/e2e/authz/tx.go index cb4e7671553b..225a8332e8ad 100644 --- a/tests/e2e/authz/tx.go +++ b/tests/e2e/authz/tx.go @@ -9,6 +9,8 @@ import ( // without this import amino json encoding will fail when resolving any types _ "cosmossdk.io/api/cosmos/authz/v1beta1" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/client/flags" addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/crypto/hd" @@ -76,7 +78,7 @@ func (s *E2ETestSuite) SetupSuite() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=%d", cli.FlagExpiration, time.Now().Add(time.Minute*time.Duration(120)).Unix()), }) s.Require().NoError(err) @@ -96,7 +98,7 @@ func (s *E2ETestSuite) SetupSuite() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=%d", cli.FlagExpiration, time.Now().Add(time.Minute*time.Duration(120)).Unix()), }) s.Require().NoError(err) @@ -119,7 +121,7 @@ func (s *E2ETestSuite) SetupSuite() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%d", cli.FlagExpiration, time.Now().Add(time.Minute*time.Duration(120)).Unix()), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=%s", cli.FlagAllowList, s.grantee[4]), }, ) @@ -149,9 +151,9 @@ func (s *E2ETestSuite) msgSendExec(grantee sdk.AccAddress) { val.ClientCtx, val.Address, grantee, - sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(200))), addresscodec.NewBech32Codec("cosmos"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(200))), addresscodec.NewBech32Codec("cosmos"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), ) s.Require().NoError(err) s.Require().Contains(out.String(), `"code":0`) @@ -170,7 +172,7 @@ var ( ) func execDelegate(val *network.Validator, args []string) (testutil.BufferWriter, error) { - cmd := stakingcli.NewDelegateCmd() + cmd := stakingcli.NewDelegateCmd(addresscodec.NewBech32Codec("cosmosvaloper"), addresscodec.NewBech32Codec("cosmos")) clientCtx := val.ClientCtx return clitestutil.ExecTestCLICmd(clientCtx, cmd, args) } @@ -192,7 +194,7 @@ func (s *E2ETestSuite) TestCmdRevokeAuthorizations() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%d", cli.FlagExpiration, twoHours), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, ) s.Require().NoError(err) @@ -209,7 +211,7 @@ func (s *E2ETestSuite) TestCmdRevokeAuthorizations() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%d", cli.FlagExpiration, twoHours), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, ) s.Require().NoError(err) @@ -226,7 +228,7 @@ func (s *E2ETestSuite) TestCmdRevokeAuthorizations() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%d", cli.FlagExpiration, twoHours), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), }, ) @@ -272,7 +274,7 @@ func (s *E2ETestSuite) TestCmdRevokeAuthorizations() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, &sdk.TxResponse{}, 0, false, @@ -285,7 +287,7 @@ func (s *E2ETestSuite) TestCmdRevokeAuthorizations() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, &sdk.TxResponse{}, 0, false, @@ -298,7 +300,7 @@ func (s *E2ETestSuite) TestCmdRevokeAuthorizations() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), }, &sdk.TxResponse{}, 0, @@ -340,7 +342,7 @@ func (s *E2ETestSuite) TestExecAuthorizationWithExpiration() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%d", cli.FlagExpiration, tenSeconds), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, ) s.Require().NoError(err) @@ -359,7 +361,7 @@ func (s *E2ETestSuite) TestExecAuthorizationWithExpiration() { execMsg.Name(), fmt.Sprintf("--%s=%s", flags.FlagFrom, grantee.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), }) s.Require().NoError(err) @@ -383,7 +385,7 @@ func (s *E2ETestSuite) TestNewExecGenericAuthorized() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%d", cli.FlagExpiration, twoHours), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, ) s.Require().NoError(err) @@ -430,7 +432,7 @@ func (s *E2ETestSuite) TestNewExecGenericAuthorized() { execMsg.Name(), fmt.Sprintf("--%s=%s", flags.FlagFrom, grantee.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), }, &sdk.TxResponse{}, @@ -443,7 +445,7 @@ func (s *E2ETestSuite) TestNewExecGenericAuthorized() { execMsg.Name(), fmt.Sprintf("--%s=%s", flags.FlagFrom, grantee.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), }, @@ -487,14 +489,14 @@ func (s *E2ETestSuite) TestNewExecGrantAuthorized() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%d", cli.FlagExpiration, twoHours), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, ) s.Require().NoError(err) s.Require().NoError(s.network.WaitForNextBlock()) tokens := sdk.NewCoins( - sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(12)), + sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), math.NewInt(12)), ) normalGeneratedTx, err := clitestutil.MsgSendExec( val.ClientCtx, @@ -504,7 +506,7 @@ func (s *E2ETestSuite) TestNewExecGrantAuthorized() { addresscodec.NewBech32Codec("cosmos"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), ) s.Require().NoError(err) @@ -523,7 +525,7 @@ func (s *E2ETestSuite) TestNewExecGrantAuthorized() { execMsg.Name(), fmt.Sprintf("--%s=%s", flags.FlagFrom, grantee.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), }, 0, @@ -536,7 +538,7 @@ func (s *E2ETestSuite) TestNewExecGrantAuthorized() { execMsg.Name(), fmt.Sprintf("--%s=%s", flags.FlagFrom, grantee1.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), }, 0, @@ -549,7 +551,7 @@ func (s *E2ETestSuite) TestNewExecGrantAuthorized() { execMsg.Name(), fmt.Sprintf("--%s=%s", flags.FlagFrom, grantee.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), }, authz.ErrNoAuthorizationFound.ABCICode(), @@ -600,7 +602,7 @@ func (s *E2ETestSuite) TestExecSendAuthzWithAllowList() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%d", cli.FlagExpiration, twoHours), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=%s", cli.FlagAllowList, allowedAddr), }, ) @@ -608,7 +610,7 @@ func (s *E2ETestSuite) TestExecSendAuthzWithAllowList() { s.Require().NoError(s.network.WaitForNextBlock()) tokens := sdk.NewCoins( - sdk.NewCoin("stake", sdk.NewInt(12)), + sdk.NewCoin("stake", math.NewInt(12)), ) validGeneratedTx, err := clitestutil.MsgSendExec( @@ -619,7 +621,7 @@ func (s *E2ETestSuite) TestExecSendAuthzWithAllowList() { addresscodec.NewBech32Codec("cosmos"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), ) s.Require().NoError(err) @@ -634,7 +636,7 @@ func (s *E2ETestSuite) TestExecSendAuthzWithAllowList() { addresscodec.NewBech32Codec("cosmos"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), ) s.Require().NoError(err) @@ -646,7 +648,7 @@ func (s *E2ETestSuite) TestExecSendAuthzWithAllowList() { execMsg.Name(), fmt.Sprintf("--%s=%s", flags.FlagFrom, grantee.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), } var response sdk.TxResponse @@ -661,7 +663,7 @@ func (s *E2ETestSuite) TestExecSendAuthzWithAllowList() { execMsg1.Name(), fmt.Sprintf("--%s=%s", flags.FlagFrom, grantee.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), } out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, args) @@ -694,14 +696,14 @@ func (s *E2ETestSuite) TestExecDelegateAuthorization() { fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%d", cli.FlagExpiration, twoHours), fmt.Sprintf("--%s=%s", cli.FlagAllowedValidators, val.ValAddress.String()), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, ) s.Require().NoError(err) s.Require().NoError(s.network.WaitForNextBlock()) tokens := sdk.NewCoins( - sdk.NewCoin("stake", sdk.NewInt(50)), + sdk.NewCoin("stake", math.NewInt(50)), ) delegateTx := fmt.Sprintf(`{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgDelegate","delegator_address":"%s","validator_address":"%s","amount":{"denom":"%s","amount":"%s"}}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":[]}`, val.Address.String(), val.ValAddress.String(), @@ -722,7 +724,7 @@ func (s *E2ETestSuite) TestExecDelegateAuthorization() { execMsg.Name(), fmt.Sprintf("--%s=%s", flags.FlagFrom, grantee.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), }, 0, @@ -735,7 +737,7 @@ func (s *E2ETestSuite) TestExecDelegateAuthorization() { execMsg.Name(), fmt.Sprintf("--%s=%s", flags.FlagFrom, grantee.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), }, 0, @@ -748,7 +750,7 @@ func (s *E2ETestSuite) TestExecDelegateAuthorization() { execMsg.Name(), fmt.Sprintf("--%s=%s", flags.FlagFrom, grantee.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), }, authz.ErrNoAuthorizationFound.ABCICode(), @@ -787,14 +789,14 @@ func (s *E2ETestSuite) TestExecDelegateAuthorization() { fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%d", cli.FlagExpiration, twoHours), fmt.Sprintf("--%s=%s", cli.FlagAllowedValidators, val.ValAddress.String()), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, ) s.Require().NoError(err) s.Require().NoError(s.network.WaitForNextBlock()) tokens = sdk.NewCoins( - sdk.NewCoin("stake", sdk.NewInt(50)), + sdk.NewCoin("stake", math.NewInt(50)), ) delegateTx = fmt.Sprintf(`{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgDelegate","delegator_address":"%s","validator_address":"%s","amount":{"denom":"%s","amount":"%s"}}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":[]}`, val.Address.String(), val.ValAddress.String(), @@ -815,7 +817,7 @@ func (s *E2ETestSuite) TestExecDelegateAuthorization() { execMsg.Name(), fmt.Sprintf("--%s=%s", flags.FlagFrom, grantee.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), }, 0, @@ -855,7 +857,7 @@ func (s *E2ETestSuite) TestExecDelegateAuthorization() { fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%d", cli.FlagExpiration, twoHours), fmt.Sprintf("--%s=%s", cli.FlagDenyValidators, val.ValAddress.String()), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, ) s.Require().NoError(err) @@ -865,7 +867,7 @@ func (s *E2ETestSuite) TestExecDelegateAuthorization() { execMsg.Name(), fmt.Sprintf("--%s=%s", flags.FlagFrom, grantee.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), } cmd := cli.NewCmdExecAuthorization() @@ -902,7 +904,7 @@ func (s *E2ETestSuite) TestExecUndelegateAuthorization() { fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%d", cli.FlagExpiration, twoHours), fmt.Sprintf("--%s=%s", cli.FlagAllowedValidators, val.ValAddress.String()), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, ) s.Require().NoError(err) @@ -917,13 +919,13 @@ func (s *E2ETestSuite) TestExecUndelegateAuthorization() { fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, ) s.Require().NoError(err) tokens := sdk.NewCoins( - sdk.NewCoin("stake", sdk.NewInt(50)), + sdk.NewCoin("stake", math.NewInt(50)), ) undelegateTx := fmt.Sprintf(`{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgUndelegate","delegator_address":"%s","validator_address":"%s","amount":{"denom":"%s","amount":"%s"}}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":[]}`, val.Address.String(), val.ValAddress.String(), @@ -945,7 +947,7 @@ func (s *E2ETestSuite) TestExecUndelegateAuthorization() { fmt.Sprintf("--%s=%s", flags.FlagGas, "250000"), fmt.Sprintf("--%s=%s", flags.FlagFrom, grantee.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), }, 0, @@ -959,7 +961,7 @@ func (s *E2ETestSuite) TestExecUndelegateAuthorization() { fmt.Sprintf("--%s=%s", flags.FlagGas, "250000"), fmt.Sprintf("--%s=%s", flags.FlagFrom, grantee.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), }, 0, @@ -973,7 +975,7 @@ func (s *E2ETestSuite) TestExecUndelegateAuthorization() { fmt.Sprintf("--%s=%s", flags.FlagGas, "250000"), fmt.Sprintf("--%s=%s", flags.FlagFrom, grantee.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), }, authz.ErrNoAuthorizationFound.ABCICode(), @@ -1012,14 +1014,14 @@ func (s *E2ETestSuite) TestExecUndelegateAuthorization() { fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%d", cli.FlagExpiration, twoHours), fmt.Sprintf("--%s=%s", cli.FlagAllowedValidators, val.ValAddress.String()), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, ) s.Require().NoError(err) s.Require().NoError(s.network.WaitForNextBlock()) tokens = sdk.NewCoins( - sdk.NewCoin("stake", sdk.NewInt(50)), + sdk.NewCoin("stake", math.NewInt(50)), ) undelegateTx = fmt.Sprintf(`{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgUndelegate","delegator_address":"%s","validator_address":"%s","amount":{"denom":"%s","amount":"%s"}}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":[]}`, val.Address.String(), val.ValAddress.String(), @@ -1041,7 +1043,7 @@ func (s *E2ETestSuite) TestExecUndelegateAuthorization() { fmt.Sprintf("--%s=%s", flags.FlagGas, "250000"), fmt.Sprintf("--%s=%s", flags.FlagFrom, grantee.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), }, 0, diff --git a/tests/e2e/bank/grpc.go b/tests/e2e/bank/grpc.go index 8bc393d306d1..d60c6a203b39 100644 --- a/tests/e2e/bank/grpc.go +++ b/tests/e2e/bank/grpc.go @@ -35,7 +35,7 @@ func (s *E2ETestSuite) TestTotalSupplyGRPCHandler() { &types.QueryTotalSupplyResponse{ Supply: sdk.NewCoins( sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), s.cfg.AccountTokens), - sdk.NewCoin(s.cfg.BondDenom, s.cfg.StakingTokens.Add(sdk.NewInt(10))), + sdk.NewCoin(s.cfg.BondDenom, s.cfg.StakingTokens.Add(math.NewInt(10))), ), Pagination: &query.PageResponse{ Total: 2, @@ -50,7 +50,7 @@ func (s *E2ETestSuite) TestTotalSupplyGRPCHandler() { }, &types.QuerySupplyOfResponse{}, &types.QuerySupplyOfResponse{ - Amount: sdk.NewCoin(s.cfg.BondDenom, s.cfg.StakingTokens.Add(sdk.NewInt(10))), + Amount: sdk.NewCoin(s.cfg.BondDenom, s.cfg.StakingTokens.Add(math.NewInt(10))), }, }, { @@ -61,7 +61,7 @@ func (s *E2ETestSuite) TestTotalSupplyGRPCHandler() { }, &types.QuerySupplyOfResponse{}, &types.QuerySupplyOfResponse{ - Amount: sdk.NewCoin(s.cfg.BondDenom, s.cfg.StakingTokens.Add(sdk.NewInt(20))), + Amount: sdk.NewCoin(s.cfg.BondDenom, s.cfg.StakingTokens.Add(math.NewInt(20))), }, }, { @@ -72,7 +72,7 @@ func (s *E2ETestSuite) TestTotalSupplyGRPCHandler() { }, &types.QuerySupplyOfResponse{}, &types.QuerySupplyOfResponse{ - Amount: sdk.NewCoin(s.cfg.BondDenom, s.cfg.StakingTokens.Add(sdk.NewInt(10))), + Amount: sdk.NewCoin(s.cfg.BondDenom, s.cfg.StakingTokens.Add(math.NewInt(10))), }, }, { @@ -267,7 +267,7 @@ func (s *E2ETestSuite) TestBalancesGRPCHandler() { &types.QueryBalanceResponse{ Balance: &sdk.Coin{ Denom: "foobar", - Amount: sdk.NewInt(0), + Amount: math.NewInt(0), }, }, }, diff --git a/tests/e2e/bank/suite.go b/tests/e2e/bank/suite.go index d319676fdb71..48b34f12b483 100644 --- a/tests/e2e/bank/suite.go +++ b/tests/e2e/bank/suite.go @@ -11,15 +11,13 @@ import ( "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/testutil" - "github.com/cosmos/cosmos-sdk/client/flags" addresscodec "github.com/cosmos/cosmos-sdk/codec/address" + "github.com/cosmos/cosmos-sdk/testutil" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/cosmos/cosmos-sdk/testutil/network" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/x/bank/client/cli" "github.com/cosmos/cosmos-sdk/x/bank/types" ) @@ -97,276 +95,6 @@ func (s *E2ETestSuite) TearDownSuite() { s.network.Cleanup() } -func (s *E2ETestSuite) TestGetBalancesCmd() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectErr bool - respType proto.Message - expected proto.Message - }{ - {"no address provided", []string{}, true, nil, nil}, - { - "total account balance", - []string{ - val.Address.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - fmt.Sprintf("--%s=1", flags.FlagHeight), - }, - false, - &types.QueryAllBalancesResponse{}, - &types.QueryAllBalancesResponse{ - Balances: sdk.NewCoins( - sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), s.cfg.AccountTokens), - sdk.NewCoin(s.cfg.BondDenom, s.cfg.StakingTokens.Sub(s.cfg.BondedTokens)), - ), - Pagination: &query.PageResponse{}, - }, - }, - { - "total account balance of a specific denom", - []string{ - val.Address.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - fmt.Sprintf("--%s=%s", cli.FlagDenom, s.cfg.BondDenom), - fmt.Sprintf("--%s=1", flags.FlagHeight), - }, - false, - &sdk.Coin{}, - NewCoin(s.cfg.BondDenom, s.cfg.StakingTokens.Sub(s.cfg.BondedTokens)), - }, - { - "total account balance of a bogus denom", - []string{ - val.Address.String(), - fmt.Sprintf("--%s=foobar", cli.FlagDenom), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - &sdk.Coin{}, - NewCoin("foobar", math.ZeroInt()), - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetBalancesCmd(addresscodec.NewBech32Codec("cosmos")) - out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, tc.args) - - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), tc.respType)) - s.Require().Equal(tc.expected.String(), tc.respType.String()) - } - }) - } -} - -func (s *E2ETestSuite) TestGetCmdQueryTotalSupply() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectErr bool - respType proto.Message - expected proto.Message - }{ - { - name: "total supply", - args: []string{ - fmt.Sprintf("--%s=1", flags.FlagHeight), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - respType: &types.QueryTotalSupplyResponse{}, - expected: &types.QueryTotalSupplyResponse{ - Supply: sdk.NewCoins( - sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), s.cfg.AccountTokens), - sdk.NewCoin(s.cfg.BondDenom, s.cfg.StakingTokens.Add(sdk.NewInt(10))), - ), - Pagination: &query.PageResponse{Total: 0}, - }, - }, - { - name: "total supply of a specific denomination", - args: []string{ - fmt.Sprintf("--%s=1", flags.FlagHeight), - fmt.Sprintf("--%s=%s", cli.FlagDenom, s.cfg.BondDenom), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - respType: &sdk.Coin{}, - expected: &sdk.Coin{ - Denom: s.cfg.BondDenom, - Amount: s.cfg.StakingTokens.Add(sdk.NewInt(10)), - }, - }, - { - name: "total supply of a bogus denom", - args: []string{ - fmt.Sprintf("--%s=1", flags.FlagHeight), - fmt.Sprintf("--%s=foobar", cli.FlagDenom), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - respType: &sdk.Coin{}, - expected: &sdk.Coin{ - Denom: "foobar", - Amount: math.ZeroInt(), - }, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryTotalSupply() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), tc.respType)) - s.Require().Equal(tc.expected, tc.respType) - } - }) - } -} - -func (s *E2ETestSuite) TestGetCmdQueryDenomsMetadata() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectErr bool - respType proto.Message - expected proto.Message - }{ - { - name: "all denoms client metadata", - args: []string{ - fmt.Sprintf("--%s=1", flags.FlagHeight), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - respType: &types.QueryDenomsMetadataResponse{}, - expected: &types.QueryDenomsMetadataResponse{ - Metadatas: []types.Metadata{ - { - Name: "Cosmos Hub Atom", - Symbol: "ATOM", - Description: "The native staking token of the Cosmos Hub.", - DenomUnits: []*types.DenomUnit{ - { - Denom: "uatom", - Exponent: 0, - Aliases: []string{"microatom"}, - }, - { - Denom: "atom", - Exponent: 6, - Aliases: []string{"ATOM"}, - }, - }, - Base: "uatom", - Display: "atom", - }, - { - Name: "Ethereum", - Symbol: "ETH", - Description: "Ethereum mainnet token", - DenomUnits: []*types.DenomUnit{ - { - Denom: "wei", - Exponent: 0, - Aliases: []string{}, - }, - { - Denom: "eth", - Exponent: 6, - Aliases: []string{"ETH"}, - }, - }, - Base: "wei", - Display: "eth", - }, - }, - Pagination: &query.PageResponse{Total: 2}, - }, - }, - { - name: "client metadata of a specific denomination", - args: []string{ - fmt.Sprintf("--%s=1", flags.FlagHeight), - fmt.Sprintf("--%s=%s", cli.FlagDenom, "uatom"), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - respType: &types.QueryDenomMetadataResponse{}, - expected: &types.QueryDenomMetadataResponse{ - Metadata: types.Metadata{ - Name: "Cosmos Hub Atom", - Symbol: "ATOM", - Description: "The native staking token of the Cosmos Hub.", - DenomUnits: []*types.DenomUnit{ - { - Denom: "uatom", - Exponent: 0, - Aliases: []string{"microatom"}, - }, - { - Denom: "atom", - Exponent: 6, - Aliases: []string{"ATOM"}, - }, - }, - Base: "uatom", - Display: "atom", - }, - }, - }, - { - name: "client metadata of a bogus denom", - args: []string{ - fmt.Sprintf("--%s=1", flags.FlagHeight), - fmt.Sprintf("--%s=foobar", cli.FlagDenom), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - expectErr: true, - respType: &types.QueryDenomMetadataResponse{}, - expected: &types.QueryDenomMetadataResponse{ - Metadata: types.Metadata{ - DenomUnits: []*types.DenomUnit{}, - }, - }, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdDenomsMetadata() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), tc.respType)) - s.Require().Equal(tc.expected, tc.respType) - } - }) - } -} - func (s *E2ETestSuite) TestNewSendTxCmdGenOnly() { val := s.network.Validators[0] @@ -375,13 +103,13 @@ func (s *E2ETestSuite) TestNewSendTxCmdGenOnly() { from := val.Address to := val.Address amount := sdk.NewCoins( - sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)), - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), + sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), math.NewInt(10)), + sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)), ) args := []string{ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), } @@ -400,13 +128,13 @@ func (s *E2ETestSuite) TestNewSendTxCmdDryRun() { from := val.Address to := val.Address amount := sdk.NewCoins( - sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)), - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), + sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), math.NewInt(10)), + sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)), ) args := []string{ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagDryRun), } @@ -441,13 +169,13 @@ func (s *E2ETestSuite) TestNewSendTxCmd() { val.Address, val.Address, sdk.NewCoins( - sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)), - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), + sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), math.NewInt(10)), + sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)), ), []string{ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, false, 0, &sdk.TxResponse{}, }, @@ -456,13 +184,13 @@ func (s *E2ETestSuite) TestNewSendTxCmd() { val.Address, val.Address, sdk.NewCoins( - sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)), - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), + sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), math.NewInt(10)), + sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)), ), []string{ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagOffline), fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), }, @@ -473,13 +201,13 @@ func (s *E2ETestSuite) TestNewSendTxCmd() { val.Address, val.Address, sdk.NewCoins( - sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)), - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), + sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), math.NewInt(10)), + sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)), ), []string{ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(1))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(1))).String()), }, false, sdkerrors.ErrInsufficientFee.ABCICode(), @@ -490,13 +218,13 @@ func (s *E2ETestSuite) TestNewSendTxCmd() { val.Address, val.Address, sdk.NewCoins( - sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)), - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), + sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), math.NewInt(10)), + sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)), ), []string{ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), "--gas=10", }, false, @@ -545,13 +273,13 @@ func (s *E2ETestSuite) TestNewMultiSendTxCmd() { val.Address, []sdk.AccAddress{val.Address, testAddr}, sdk.NewCoins( - sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)), - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), + sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), math.NewInt(10)), + sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)), ), []string{ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, false, 0, &sdk.TxResponse{}, }, @@ -560,14 +288,14 @@ func (s *E2ETestSuite) TestNewMultiSendTxCmd() { val.Address, []sdk.AccAddress{val.Address, testAddr}, sdk.NewCoins( - sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)), - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), + sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), math.NewInt(10)), + sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)), ), []string{ fmt.Sprintf("--%s=true", cli.FlagSplit), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, false, 0, &sdk.TxResponse{}, }, @@ -576,13 +304,13 @@ func (s *E2ETestSuite) TestNewMultiSendTxCmd() { val.Address, []sdk.AccAddress{val.Address}, sdk.NewCoins( - sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)), - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), + sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), math.NewInt(10)), + sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)), ), []string{ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, true, 0, &sdk.TxResponse{}, }, @@ -591,13 +319,13 @@ func (s *E2ETestSuite) TestNewMultiSendTxCmd() { val.Address, []sdk.AccAddress{val.Address, testAddr}, sdk.NewCoins( - sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)), - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), + sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), math.NewInt(10)), + sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)), ), []string{ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagOffline), fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), }, @@ -608,13 +336,13 @@ func (s *E2ETestSuite) TestNewMultiSendTxCmd() { val.Address, []sdk.AccAddress{val.Address, testAddr}, sdk.NewCoins( - sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)), - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), + sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), math.NewInt(10)), + sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)), ), []string{ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(1))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(1))).String()), }, false, sdkerrors.ErrInsufficientFee.ABCICode(), @@ -625,13 +353,13 @@ func (s *E2ETestSuite) TestNewMultiSendTxCmd() { val.Address, []sdk.AccAddress{val.Address, testAddr}, sdk.NewCoins( - sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)), - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), + sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), math.NewInt(10)), + sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)), ), []string{ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), "--gas=10", }, false, diff --git a/tests/e2e/distribution/grpc_query_suite.go b/tests/e2e/distribution/grpc_query_suite.go index c9765fbb8ae5..6d40625d7e57 100644 --- a/tests/e2e/distribution/grpc_query_suite.go +++ b/tests/e2e/distribution/grpc_query_suite.go @@ -3,10 +3,11 @@ package distribution import ( "fmt" - "cosmossdk.io/simapp" "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/suite" + "cosmossdk.io/simapp" + sdktestutil "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/network" sdk "github.com/cosmos/cosmos-sdk/types" @@ -311,7 +312,7 @@ func (s *GRPCQueryTestSuite) TestQueryDelegatorRewardsGRPC() { &types.QueryDelegationTotalRewardsResponse{}, &types.QueryDelegationTotalRewardsResponse{ Rewards: []types.DelegationDelegatorReward{ - types.NewDelegationDelegatorReward(val.ValAddress, rewards), + types.NewDelegationDelegatorReward(val.ValAddress.String(), rewards), }, Total: rewards, }, diff --git a/tests/e2e/distribution/suite.go b/tests/e2e/distribution/suite.go index f4d6e3dbf59b..54d02961f747 100644 --- a/tests/e2e/distribution/suite.go +++ b/tests/e2e/distribution/suite.go @@ -4,14 +4,14 @@ import ( "context" "encoding/hex" "fmt" - "strings" "time" - "cosmossdk.io/math" - "cosmossdk.io/simapp" "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/suite" + "cosmossdk.io/math" + "cosmossdk.io/simapp" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec/address" @@ -50,7 +50,7 @@ func (s *E2ETestSuite) SetupSuite() { var mintData minttypes.GenesisState s.Require().NoError(s.cfg.Codec.UnmarshalJSON(genesisState[minttypes.ModuleName], &mintData)) - inflation := sdk.MustNewDecFromStr("1.0") + inflation := math.LegacyMustNewDecFromStr("1.0") mintData.Minter.Inflation = inflation mintData.Params.InflationMin = inflation mintData.Params.InflationMax = inflation @@ -72,430 +72,6 @@ func (s *E2ETestSuite) TearDownSuite() { s.network.Cleanup() } -func (s *E2ETestSuite) TestGetCmdQueryParams() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectedOutput string - }{ - { - "json output", - []string{fmt.Sprintf("--%s=json", flags.FlagOutput)}, - `{"community_tax":"0.020000000000000000","base_proposer_reward":"0.000000000000000000","bonus_proposer_reward":"0.000000000000000000","withdraw_addr_enabled":true}`, - }, - { - "text output", - []string{fmt.Sprintf("--%s=text", flags.FlagOutput)}, - `base_proposer_reward: "0.000000000000000000" -bonus_proposer_reward: "0.000000000000000000" -community_tax: "0.020000000000000000" -withdraw_addr_enabled: true`, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryParams() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - s.Require().NoError(err) - s.Require().Equal(tc.expectedOutput, strings.TrimSpace(out.String())) - }) - } -} - -func (s *E2ETestSuite) TestGetCmdQueryValidatorDistributionInfo() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expErr bool - }{ - { - "invalid val address", - []string{"invalid address", fmt.Sprintf("--%s=json", flags.FlagOutput)}, - true, - }, - { - "json output", - []string{val.ValAddress.String(), fmt.Sprintf("--%s=json", flags.FlagOutput)}, - false, - }, - { - "text output", - []string{val.ValAddress.String(), fmt.Sprintf("--%s=text", flags.FlagOutput)}, - false, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryValidatorDistributionInfo() - clientCtx := val.ClientCtx - - _, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - } - }) - } -} - -func (s *E2ETestSuite) TestGetCmdQueryValidatorOutstandingRewards() { - val := s.network.Validators[0] - - _, err := s.network.WaitForHeight(4) - s.Require().NoError(err) - - testCases := []struct { - name string - args []string - expectErr bool - expectedOutput string - }{ - { - "invalid validator address", - []string{ - fmt.Sprintf("--%s=3", flags.FlagHeight), - "foo", - }, - true, - "", - }, - { - "json output", - []string{ - fmt.Sprintf("--%s=3", flags.FlagHeight), - sdk.ValAddress(val.Address).String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - `{"rewards":[{"denom":"stake","amount":"232.260000000000000000"}]}`, - }, - { - "text output", - []string{ - fmt.Sprintf("--%s=text", flags.FlagOutput), - fmt.Sprintf("--%s=3", flags.FlagHeight), - sdk.ValAddress(val.Address).String(), - }, - false, - `rewards: -- amount: "232.260000000000000000" - denom: stake`, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryValidatorOutstandingRewards() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - s.Require().Equal(tc.expectedOutput, strings.TrimSpace(out.String())) - } - }) - } -} - -func (s *E2ETestSuite) TestGetCmdQueryValidatorCommission() { - val := s.network.Validators[0] - - _, err := s.network.WaitForHeight(4) - s.Require().NoError(err) - - testCases := []struct { - name string - args []string - expectErr bool - expectedOutput string - }{ - { - "invalid validator address", - []string{ - fmt.Sprintf("--%s=3", flags.FlagHeight), - "foo", - }, - true, - "", - }, - { - "json output", - []string{ - fmt.Sprintf("--%s=3", flags.FlagHeight), - sdk.ValAddress(val.Address).String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - `{"commission":[{"denom":"stake","amount":"116.130000000000000000"}]}`, - }, - { - "text output", - []string{ - fmt.Sprintf("--%s=text", flags.FlagOutput), - fmt.Sprintf("--%s=3", flags.FlagHeight), - sdk.ValAddress(val.Address).String(), - }, - false, - `commission: -- amount: "116.130000000000000000" - denom: stake`, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryValidatorCommission() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - s.Require().Equal(tc.expectedOutput, strings.TrimSpace(out.String())) - } - }) - } -} - -func (s *E2ETestSuite) TestGetCmdQueryValidatorSlashes() { - val := s.network.Validators[0] - - _, err := s.network.WaitForHeight(4) - s.Require().NoError(err) - - testCases := []struct { - name string - args []string - expectErr bool - expectedOutput string - }{ - { - "invalid validator address", - []string{ - fmt.Sprintf("--%s=3", flags.FlagHeight), - "foo", "1", "3", - }, - true, - "", - }, - { - "invalid start height", - []string{ - fmt.Sprintf("--%s=3", flags.FlagHeight), - sdk.ValAddress(val.Address).String(), "-1", "3", - }, - true, - "", - }, - { - "invalid end height", - []string{ - fmt.Sprintf("--%s=3", flags.FlagHeight), - sdk.ValAddress(val.Address).String(), "1", "-3", - }, - true, - "", - }, - { - "json output", - []string{ - fmt.Sprintf("--%s=3", flags.FlagHeight), - sdk.ValAddress(val.Address).String(), "1", "3", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - "{\"slashes\":[],\"pagination\":{\"next_key\":null,\"total\":\"0\"}}", - }, - { - "text output", - []string{ - fmt.Sprintf("--%s=text", flags.FlagOutput), - fmt.Sprintf("--%s=3", flags.FlagHeight), - sdk.ValAddress(val.Address).String(), "1", "3", - }, - false, - "pagination:\n next_key: null\n total: \"0\"\nslashes: []", - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryValidatorSlashes() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - s.Require().Equal(tc.expectedOutput, strings.TrimSpace(out.String())) - } - }) - } -} - -func (s *E2ETestSuite) TestGetCmdQueryDelegatorRewards() { - val := s.network.Validators[0] - addr := val.Address - valAddr := sdk.ValAddress(addr) - - _, err := s.network.WaitForHeightWithTimeout(11, time.Minute) - s.Require().NoError(err) - - testCases := []struct { - name string - args []string - expectErr bool - expectedOutput string - }{ - { - "invalid delegator address", - []string{ - fmt.Sprintf("--%s=5", flags.FlagHeight), - "foo", valAddr.String(), - }, - true, - "", - }, - { - "invalid validator address", - []string{ - fmt.Sprintf("--%s=5", flags.FlagHeight), - addr.String(), "foo", - }, - true, - "", - }, - { - "json output", - []string{ - fmt.Sprintf("--%s=5", flags.FlagHeight), - addr.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - fmt.Sprintf(`{"rewards":[{"validator_address":"%s","reward":[{"denom":"stake","amount":"193.550000000000000000"}]}],"total":[{"denom":"stake","amount":"193.550000000000000000"}]}`, valAddr.String()), - }, - { - "json output (specific validator)", - []string{ - fmt.Sprintf("--%s=5", flags.FlagHeight), - addr.String(), valAddr.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - `{"rewards":[{"denom":"stake","amount":"193.550000000000000000"}]}`, - }, - { - "text output", - []string{ - fmt.Sprintf("--%s=text", flags.FlagOutput), - fmt.Sprintf("--%s=5", flags.FlagHeight), - addr.String(), - }, - false, - fmt.Sprintf(`rewards: -- reward: - - amount: "193.550000000000000000" - denom: stake - validator_address: %s -total: -- amount: "193.550000000000000000" - denom: stake`, valAddr.String()), - }, - { - "text output (specific validator)", - []string{ - fmt.Sprintf("--%s=text", flags.FlagOutput), - fmt.Sprintf("--%s=5", flags.FlagHeight), - addr.String(), valAddr.String(), - }, - false, - `rewards: -- amount: "193.550000000000000000" - denom: stake`, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryDelegatorRewards(address.NewBech32Codec("cosmos")) - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - s.Require().Equal(tc.expectedOutput, strings.TrimSpace(out.String())) - } - }) - } -} - -func (s *E2ETestSuite) TestGetCmdQueryCommunityPool() { - val := s.network.Validators[0] - - _, err := s.network.WaitForHeight(4) - s.Require().NoError(err) - - testCases := []struct { - name string - args []string - expectedOutput string - }{ - { - "json output", - []string{fmt.Sprintf("--%s=3", flags.FlagHeight), fmt.Sprintf("--%s=json", flags.FlagOutput)}, - `{"pool":[{"denom":"stake","amount":"4.740000000000000000"}]}`, - }, - { - "text output", - []string{fmt.Sprintf("--%s=text", flags.FlagOutput), fmt.Sprintf("--%s=3", flags.FlagHeight)}, - `pool: -- amount: "4.740000000000000000" - denom: stake`, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryCommunityPool() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - s.Require().NoError(err) - s.Require().Equal(tc.expectedOutput, strings.TrimSpace(out.String())) - }) - } -} - func (s *E2ETestSuite) TestNewWithdrawRewardsCmd() { val := s.network.Validators[0] @@ -515,7 +91,7 @@ func (s *E2ETestSuite) TestNewWithdrawRewardsCmd() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, true, 0, nil, []string{}, @@ -527,7 +103,7 @@ func (s *E2ETestSuite) TestNewWithdrawRewardsCmd() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, false, 0, &sdk.TxResponse{}, []string{ @@ -542,7 +118,7 @@ func (s *E2ETestSuite) TestNewWithdrawRewardsCmd() { fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=true", cli.FlagCommission), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, false, 0, &sdk.TxResponse{}, []string{ @@ -563,7 +139,7 @@ func (s *E2ETestSuite) TestNewWithdrawRewardsCmd() { _, _ = s.network.WaitForHeightWithTimeout(10, time.Minute) ctx := svrcmd.CreateExecuteContext(context.Background()) - cmd := cli.NewWithdrawRewardsCmd() + cmd := cli.NewWithdrawRewardsCmd(address.NewBech32Codec("cosmosvaloper"), address.NewBech32Codec("cosmos")) cmd.SetContext(ctx) cmd.SetArgs(args) s.Require().NoError(client.SetCmdClientContextHandler(clientCtx, cmd)) @@ -627,7 +203,7 @@ func (s *E2ETestSuite) TestNewWithdrawAllRewardsCmd() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagOffline), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, true, 0, nil, []string{}, @@ -638,7 +214,7 @@ func (s *E2ETestSuite) TestNewWithdrawAllRewardsCmd() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, false, 0, &sdk.TxResponse{}, []string{ @@ -651,7 +227,7 @@ func (s *E2ETestSuite) TestNewWithdrawAllRewardsCmd() { tc := tc s.Run(tc.name, func() { - cmd := cli.NewWithdrawAllRewardsCmd() + cmd := cli.NewWithdrawAllRewardsCmd(address.NewBech32Codec("cosmosvaloper"), address.NewBech32Codec("cosmos")) clientCtx := val.ClientCtx _, _ = s.network.WaitForHeightWithTimeout(10, time.Minute) @@ -715,7 +291,7 @@ func (s *E2ETestSuite) TestNewSetWithdrawAddrCmd() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, true, 0, nil, }, @@ -726,7 +302,7 @@ func (s *E2ETestSuite) TestNewSetWithdrawAddrCmd() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, false, 0, &sdk.TxResponse{}, }, @@ -770,18 +346,18 @@ func (s *E2ETestSuite) TestNewFundCommunityPoolCmd() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, true, 0, nil, }, { "valid transaction", []string{ - sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(5431))).String(), + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(5431))).String(), fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, false, 0, &sdk.TxResponse{}, }, @@ -791,7 +367,7 @@ func (s *E2ETestSuite) TestNewFundCommunityPoolCmd() { tc := tc s.Run(tc.name, func() { - cmd := cli.NewFundCommunityPoolCmd() + cmd := cli.NewFundCommunityPoolCmd(address.NewBech32Codec("cosmos")) clientCtx := val.ClientCtx out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) diff --git a/tests/e2e/distribution/withdraw_all_suite.go b/tests/e2e/distribution/withdraw_all_suite.go index 803d92c0cf1e..18a7a5b11555 100644 --- a/tests/e2e/distribution/withdraw_all_suite.go +++ b/tests/e2e/distribution/withdraw_all_suite.go @@ -4,11 +4,13 @@ import ( "fmt" "strings" - "cosmossdk.io/simapp" "github.com/stretchr/testify/suite" + "cosmossdk.io/math" + "cosmossdk.io/simapp" + "github.com/cosmos/cosmos-sdk/client/flags" - addresscodec "github.com/cosmos/cosmos-sdk/codec/address" + "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/testutil" @@ -64,9 +66,9 @@ func (s *WithdrawAllTestSuite) TestNewWithdrawAllRewardsGenerateOnly() { val.ClientCtx, val.Address, newAddr, - sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(2000))), addresscodec.NewBech32Codec("cosmos"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(2000))), address.NewBech32Codec("cosmos"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), ) require.NoError(err) require.NoError(s.network.WaitForNextBlock()) @@ -74,13 +76,13 @@ func (s *WithdrawAllTestSuite) TestNewWithdrawAllRewardsGenerateOnly() { // delegate 500 tokens to validator1 args := []string{ val.ValAddress.String(), - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(500)).String(), + sdk.NewCoin(s.cfg.BondDenom, math.NewInt(500)).String(), fmt.Sprintf("--%s=%s", flags.FlagFrom, newAddr.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), } - cmd := stakingcli.NewDelegateCmd() + cmd := stakingcli.NewDelegateCmd(clientCtx.InterfaceRegistry.SigningContext().ValidatorAddressCodec(), clientCtx.InterfaceRegistry.SigningContext().AddressCodec()) _, err = clitestutil.ExecTestCLICmd(clientCtx, cmd, args) require.NoError(err) require.NoError(s.network.WaitForNextBlock()) @@ -88,11 +90,11 @@ func (s *WithdrawAllTestSuite) TestNewWithdrawAllRewardsGenerateOnly() { // delegate 500 tokens to validator2 args = []string{ val1.ValAddress.String(), - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(500)).String(), + sdk.NewCoin(s.cfg.BondDenom, math.NewInt(500)).String(), fmt.Sprintf("--%s=%s", flags.FlagFrom, newAddr.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), } _, err = clitestutil.ExecTestCLICmd(clientCtx, cmd, args) require.NoError(err) @@ -105,9 +107,9 @@ func (s *WithdrawAllTestSuite) TestNewWithdrawAllRewardsGenerateOnly() { fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), fmt.Sprintf("--%s=1", cli.FlagMaxMessagesPerTx), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), } - cmd = cli.NewWithdrawAllRewardsCmd() + cmd = cli.NewWithdrawAllRewardsCmd(address.NewBech32Codec("cosmosvaloper"), address.NewBech32Codec("cosmos")) out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, args) if err != nil { return err @@ -128,9 +130,9 @@ func (s *WithdrawAllTestSuite) TestNewWithdrawAllRewardsGenerateOnly() { fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), fmt.Sprintf("--%s=2", cli.FlagMaxMessagesPerTx), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), } - cmd = cli.NewWithdrawAllRewardsCmd() + cmd = cli.NewWithdrawAllRewardsCmd(address.NewBech32Codec("cosmosvaloper"), address.NewBech32Codec("cosmos")) out, err = clitestutil.ExecTestCLICmd(clientCtx, cmd, args) require.NoError(err) // expect 1 transaction in the generated file when --max-msgs in a tx set 2, since there are only delegations. diff --git a/tests/e2e/gov/deposits.go b/tests/e2e/gov/deposits.go index 4b433aef26de..9a4a1b34a888 100644 --- a/tests/e2e/gov/deposits.go +++ b/tests/e2e/gov/deposits.go @@ -7,10 +7,9 @@ import ( "github.com/stretchr/testify/suite" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/codec/address" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/testutil" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/cosmos/cosmos-sdk/testutil/network" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/gov/client/cli" @@ -57,14 +56,12 @@ func (s *DepositTestSuite) submitProposal(val *network.Validator, initialDeposit s.Require().NoError(s.network.WaitForNextBlock()) // query proposals, return the last's id - cmd := cli.GetCmdQueryProposals(address.NewBech32Codec("cosmos")) - args := []string{fmt.Sprintf("--%s=json", flags.FlagOutput)} - res, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, args) + res, err := testutil.GetRequest(fmt.Sprintf("%s/cosmos/gov/v1/proposals", val.APIAddress)) s.Require().NoError(err) - var proposals v1.QueryProposalsResponse - err = s.cfg.Codec.UnmarshalJSON(res.Bytes(), &proposals) + err = s.cfg.Codec.UnmarshalJSON(res, &proposals) s.Require().NoError(err) + s.Require().GreaterOrEqual(len(proposals.Proposals), 1) return proposals.Proposals[len(proposals.Proposals)-1].Id } @@ -74,33 +71,6 @@ func (s *DepositTestSuite) TearDownSuite() { s.network.Cleanup() } -func (s *DepositTestSuite) TestQueryDepositsWithoutInitialDeposit() { - val := s.network.Validators[0] - clientCtx := val.ClientCtx - - // submit proposal without initial deposit - id := s.submitProposal(val, sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(0)), "TestQueryDepositsWithoutInitialDeposit") - proposalID := strconv.FormatUint(id, 10) - - // deposit amount - depositAmount := sdk.NewCoin(s.cfg.BondDenom, v1.DefaultMinDepositTokens.Add(sdk.NewInt(50))).String() - _, err := govclitestutil.MsgDeposit(clientCtx, val.Address.String(), proposalID, depositAmount) - s.Require().NoError(err) - s.Require().NoError(s.network.WaitForNextBlock()) - - // query deposit - deposit := s.queryDeposit(val, proposalID, false, "") - s.Require().NotNil(deposit) - s.Require().Equal(sdk.Coins(deposit.Amount).String(), depositAmount) - - // query deposits - deposits := s.queryDeposits(val, proposalID, false, "") - s.Require().NotNil(deposits) - s.Require().Len(deposits.Deposits, 1) - // verify initial deposit - s.Require().Equal(sdk.Coins(deposits.Deposits[0].Amount).String(), depositAmount) -} - func (s *DepositTestSuite) TestQueryDepositsWithInitialDeposit() { val := s.network.Validators[0] depositAmount := sdk.NewCoin(s.cfg.BondDenom, v1.DefaultMinDepositTokens) @@ -112,98 +82,83 @@ func (s *DepositTestSuite) TestQueryDepositsWithInitialDeposit() { // query deposit deposit := s.queryDeposit(val, proposalID, false, "") s.Require().NotNil(deposit) - s.Require().Equal(sdk.Coins(deposit.Amount).String(), depositAmount.String()) + s.Require().Equal(depositAmount.String(), sdk.Coins(deposit.Deposit.Amount).String()) // query deposits deposits := s.queryDeposits(val, proposalID, false, "") s.Require().NotNil(deposits) s.Require().Len(deposits.Deposits, 1) // verify initial deposit - s.Require().Equal(sdk.Coins(deposits.Deposits[0].Amount).String(), depositAmount.String()) + s.Require().Equal(depositAmount.String(), sdk.Coins(deposits.Deposits[0].Amount).String()) } func (s *DepositTestSuite) TestQueryProposalAfterVotingPeriod() { val := s.network.Validators[0] - depositAmount := sdk.NewCoin(s.cfg.BondDenom, v1.DefaultMinDepositTokens.Sub(sdk.NewInt(50))) + depositAmount := sdk.NewCoin(s.cfg.BondDenom, v1.DefaultMinDepositTokens.Sub(math.NewInt(50))) // submit proposal with an initial deposit id := s.submitProposal(val, depositAmount, "TestQueryProposalAfterVotingPeriod") proposalID := strconv.FormatUint(id, 10) - args := []string{fmt.Sprintf("--%s=json", flags.FlagOutput)} - cmd := cli.GetCmdQueryProposals(address.NewBech32Codec("cosmos")) - _, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, args) + resp, err := testutil.GetRequest(fmt.Sprintf("%s/cosmos/gov/v1/proposals", val.APIAddress)) + s.Require().NoError(err) + var proposals v1.QueryProposalsResponse + err = s.cfg.Codec.UnmarshalJSON(resp, &proposals) s.Require().NoError(err) + s.Require().GreaterOrEqual(len(proposals.Proposals), 1) // query proposal - args = []string{proposalID, fmt.Sprintf("--%s=json", flags.FlagOutput)} - cmd = cli.GetCmdQueryProposal() - _, err = clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, args) + resp, err = testutil.GetRequest(fmt.Sprintf("%s/cosmos/gov/v1/proposals/%s", val.APIAddress, proposalID)) + s.Require().NoError(err) + var proposal v1.QueryProposalResponse + err = s.cfg.Codec.UnmarshalJSON(resp, &proposal) s.Require().NoError(err) // waiting for deposit and voting period to end time.Sleep(25 * time.Second) // query proposal - _, err = clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, args) - s.Require().Error(err) - s.Require().Contains(err.Error(), fmt.Sprintf("proposal %s doesn't exist", proposalID)) + resp, err = testutil.GetRequest(fmt.Sprintf("%s/cosmos/gov/v1/proposals/%s", val.APIAddress, proposalID)) + s.Require().NoError(err) + s.Require().Contains(string(resp), fmt.Sprintf("proposal %s doesn't exist", proposalID)) // query deposits - deposits := s.queryDeposits(val, proposalID, true, "proposal 3 doesn't exist") - s.Require().Nil(deposits) + deposits := s.queryDeposits(val, proposalID, false, "") + s.Require().Len(deposits.Deposits, 0) } func (s *DepositTestSuite) queryDeposits(val *network.Validator, proposalID string, exceptErr bool, message string) *v1.QueryDepositsResponse { - args := []string{proposalID, fmt.Sprintf("--%s=json", flags.FlagOutput)} - var depositsRes *v1.QueryDepositsResponse - cmd := cli.GetCmdQueryDeposits() - - var ( - out testutil.BufferWriter - err error - ) + s.Require().NoError(s.network.WaitForNextBlock()) - err = s.network.RetryForBlocks(func() error { - out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, args) - if err == nil { - err = val.ClientCtx.LegacyAmino.UnmarshalJSON(out.Bytes(), &depositsRes) - return err - } - return err - }, 3) + resp, err := testutil.GetRequest(fmt.Sprintf("%s/cosmos/gov/v1/proposals/%s/deposits", val.APIAddress, proposalID)) + s.Require().NoError(err) if exceptErr { - s.Require().Error(err) - s.Require().Contains(err.Error(), message) + s.Require().Contains(string(resp), message) return nil } + var depositsRes v1.QueryDepositsResponse + err = val.ClientCtx.Codec.UnmarshalJSON(resp, &depositsRes) s.Require().NoError(err) - return depositsRes + + return &depositsRes } -func (s *DepositTestSuite) queryDeposit(val *network.Validator, proposalID string, exceptErr bool, message string) *v1.Deposit { - args := []string{proposalID, val.Address.String(), fmt.Sprintf("--%s=json", flags.FlagOutput)} - var depositRes *v1.Deposit - cmd := cli.GetCmdQueryDeposit() - var ( - out testutil.BufferWriter - err error - ) +func (s *DepositTestSuite) queryDeposit(val *network.Validator, proposalID string, exceptErr bool, message string) *v1.QueryDepositResponse { + s.Require().NoError(s.network.WaitForNextBlock()) - err = s.network.RetryForBlocks(func() error { - out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, args) - return err - }, 3) + resp, err := testutil.GetRequest(fmt.Sprintf("%s/cosmos/gov/v1/proposals/%s/deposits/%s", val.APIAddress, proposalID, val.Address.String())) + s.Require().NoError(err) if exceptErr { - s.Require().Error(err) - s.Require().Contains(err.Error(), message) + s.Require().Contains(string(resp), message) return nil } + + var depositRes v1.QueryDepositResponse + err = val.ClientCtx.Codec.UnmarshalJSON(resp, &depositRes) s.Require().NoError(err) - s.Require().NoError(val.ClientCtx.LegacyAmino.UnmarshalJSON(out.Bytes(), &depositRes)) - return depositRes + return &depositRes } diff --git a/tests/e2e/gov/grpc.go b/tests/e2e/gov/grpc.go index 633281b38ca0..77560ba3a40c 100644 --- a/tests/e2e/gov/grpc.go +++ b/tests/e2e/gov/grpc.go @@ -3,11 +3,13 @@ package gov import ( "fmt" + "github.com/cosmos/gogoproto/proto" + + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/testutil" - sdk "github.com/cosmos/cosmos-sdk/types" grpctypes "github.com/cosmos/cosmos-sdk/types/grpc" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - "github.com/cosmos/gogoproto/proto" ) func (s *E2ETestSuite) TestGetProposalGRPC() { @@ -148,10 +150,10 @@ func (s *E2ETestSuite) TestGetProposalVoteGRPC() { fmt.Sprintf("%s/cosmos/gov/v1/proposals/%s/votes/%s", val.APIAddress, "3", voterAddressBech32), false, v1.WeightedVoteOptions{ - &v1.WeightedVoteOption{Option: v1.OptionYes, Weight: sdk.NewDecWithPrec(60, 2).String()}, - &v1.WeightedVoteOption{Option: v1.OptionNo, Weight: sdk.NewDecWithPrec(30, 2).String()}, - &v1.WeightedVoteOption{Option: v1.OptionAbstain, Weight: sdk.NewDecWithPrec(5, 2).String()}, - &v1.WeightedVoteOption{Option: v1.OptionNoWithVeto, Weight: sdk.NewDecWithPrec(5, 2).String()}, + &v1.WeightedVoteOption{Option: v1.OptionYes, Weight: math.LegacyNewDecWithPrec(60, 2).String()}, + &v1.WeightedVoteOption{Option: v1.OptionNo, Weight: math.LegacyNewDecWithPrec(30, 2).String()}, + &v1.WeightedVoteOption{Option: v1.OptionAbstain, Weight: math.LegacyNewDecWithPrec(5, 2).String()}, + &v1.WeightedVoteOption{Option: v1.OptionNoWithVeto, Weight: math.LegacyNewDecWithPrec(5, 2).String()}, }, }, } diff --git a/tests/e2e/gov/query.go b/tests/e2e/gov/query.go deleted file mode 100644 index 23b7c67f564a..000000000000 --- a/tests/e2e/gov/query.go +++ /dev/null @@ -1,556 +0,0 @@ -package gov - -import ( - "fmt" - "strings" - - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/codec/address" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/gov/client/cli" - v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" -) - -func (s *E2ETestSuite) TestCmdParams() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectedOutput string - }{ - { - "json output", - []string{fmt.Sprintf("--%s=json", flags.FlagOutput)}, - `{"voting_params":{"voting_period":"172800s"},"deposit_params":{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800s"},"tally_params":{"quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000"},"params":{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800s","voting_period":"172800s","quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000","min_initial_deposit_ratio":"0.000000000000000000","proposal_cancel_ratio":"0.500000000000000000","proposal_cancel_dest":"","expedited_voting_period":"86400s","expedited_threshold":"0.667000000000000000","expedited_min_deposit":[{"denom":"stake","amount":"50000000"}],"burn_vote_quorum":false,"burn_proposal_deposit_prevote":false,"burn_vote_veto":true}}`, - }, - { - "text output", - []string{}, - ` -deposit_params: - max_deposit_period: 172800s - min_deposit: - - amount: "10000000" - denom: stake -params: - burn_proposal_deposit_prevote: false - burn_vote_quorum: false - burn_vote_veto: true - expedited_min_deposit: - - amount: "50000000" - denom: stake - expedited_threshold: "0.667000000000000000" - expedited_voting_period: 86400s - max_deposit_period: 172800s - min_deposit: - - amount: "10000000" - denom: stake - min_initial_deposit_ratio: "0.000000000000000000" - proposal_cancel_dest: "" - proposal_cancel_ratio: "0.500000000000000000" - quorum: "0.334000000000000000" - threshold: "0.500000000000000000" - veto_threshold: "0.334000000000000000" - voting_period: 172800s -tally_params: - quorum: "0.334000000000000000" - threshold: "0.500000000000000000" - veto_threshold: "0.334000000000000000" -voting_params: - voting_period: 172800s - `, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryParams() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - s.Require().NoError(err) - s.Require().Equal(strings.TrimSpace(tc.expectedOutput), strings.TrimSpace(out.String())) - }) - } -} - -func (s *E2ETestSuite) TestCmdParam() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectedOutput string - }{ - { - "voting params", - []string{ - "voting", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - `{"voting_period":"172800000000000"}`, - }, - { - "tally params", - []string{ - "tallying", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - `{"quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000"}`, - }, - { - "deposit params", - []string{ - "deposit", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - `{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800000000000"}`, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryParam() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - s.Require().NoError(err) - s.Require().Equal(strings.TrimSpace(tc.expectedOutput), strings.TrimSpace(out.String())) - }) - } -} - -func (s *E2ETestSuite) TestCmdProposer() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectErr bool - expectedOutput string - }{ - { - "without proposal id", - []string{ - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - ``, - }, - { - "json output", - []string{ - "1", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - fmt.Sprintf("{\"proposal_id\":\"%s\",\"proposer\":\"%s\"}", "1", val.Address.String()), - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryProposer() - clientCtx := val.ClientCtx - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - s.Require().Equal(strings.TrimSpace(tc.expectedOutput), strings.TrimSpace(out.String())) - } - }) - } -} - -func (s *E2ETestSuite) TestCmdTally() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectErr bool - expectedOutput v1.TallyResult - }{ - { - "without proposal id", - []string{ - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - v1.TallyResult{}, - }, - { - "json output", - []string{ - "2", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - v1.NewTallyResult(sdk.NewInt(0), sdk.NewInt(0), sdk.NewInt(0), sdk.NewInt(0)), - }, - { - "json output", - []string{ - "1", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - v1.NewTallyResult(s.cfg.BondedTokens, sdk.NewInt(0), sdk.NewInt(0), sdk.NewInt(0)), - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryTally() - clientCtx := val.ClientCtx - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - - if tc.expectErr { - s.Require().Error(err) - } else { - var tally v1.TallyResult - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &tally), out.String()) - s.Require().Equal(tally, tc.expectedOutput) - } - }) - } -} - -func (s *E2ETestSuite) TestCmdGetProposal() { - val := s.network.Validators[0] - - title := "Text Proposal 1" - - testCases := []struct { - name string - args []string - expectErr bool - }{ - { - "get non existing proposal", - []string{ - "10", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - }, - { - "get proposal with json response", - []string{ - "1", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryProposal() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - var proposal v1.Proposal - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &proposal), out.String()) - s.Require().Equal(title, proposal.Messages[0].GetCachedValue().(*v1.MsgExecLegacyContent).Content.GetCachedValue().(v1beta1.Content).GetTitle()) - } - }) - } -} - -func (s *E2ETestSuite) TestCmdGetProposals() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectErr bool - }{ - { - "get proposals as json response", - []string{ - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - }, - { - "get proposals with invalid status", - []string{ - "--status=unknown", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryProposals(address.NewBech32Codec("cosmos")) - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - var proposals v1.QueryProposalsResponse - - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &proposals), out.String()) - s.Require().Greater(len(proposals.Proposals), 0) - } - }) - } -} - -func (s *E2ETestSuite) TestCmdQueryDeposits() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectErr bool - }{ - { - "get deposits of non existing proposal", - []string{ - "10", - }, - true, - }, - { - "get deposits(valid req)", - []string{ - "1", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryDeposits() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - - var deposits v1.QueryDepositsResponse - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &deposits), out.String()) - s.Require().Len(deposits.Deposits, 1) - } - }) - } -} - -func (s *E2ETestSuite) TestCmdQueryDeposit() { - val := s.network.Validators[0] - depositAmount := sdk.NewCoin(s.cfg.BondDenom, v1.DefaultMinDepositTokens) - - testCases := []struct { - name string - args []string - expectErr bool - }{ - { - "get deposit with no depositer", - []string{ - "1", - }, - true, - }, - { - "get deposit with wrong deposit address", - []string{ - "1", - "wrong address", - }, - true, - }, - { - "get deposit (valid req)", - []string{ - "1", - val.Address.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryDeposit() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - - var deposit v1.Deposit - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &deposit), out.String()) - s.Require().Equal(depositAmount.String(), sdk.Coins(deposit.Amount).String()) - } - }) - } -} - -func (s *E2ETestSuite) TestCmdQueryVotes() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectErr bool - }{ - { - "get votes with no proposal id", - []string{}, - true, - }, - { - "get votes of non existed proposal", - []string{ - "10", - }, - true, - }, - { - "vote for invalid proposal", - []string{ - "1", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryVotes() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - - var votes v1.QueryVotesResponse - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &votes), out.String()) - s.Require().Len(votes.Votes, 1) - } - }) - } -} - -func (s *E2ETestSuite) TestCmdQueryVote() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectErr bool - expVoteOptions v1.WeightedVoteOptions - }{ - { - "get vote of non existing proposal", - []string{ - "10", - val.Address.String(), - }, - true, - v1.NewNonSplitVoteOption(v1.OptionYes), - }, - { - "get vote by wrong voter", - []string{ - "1", - "wrong address", - }, - true, - v1.NewNonSplitVoteOption(v1.OptionYes), - }, - { - "vote for valid proposal", - []string{ - "1", - val.Address.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - v1.NewNonSplitVoteOption(v1.OptionYes), - }, - { - "split vote for valid proposal", - []string{ - "3", - val.Address.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - v1.WeightedVoteOptions{ - &v1.WeightedVoteOption{Option: v1.OptionYes, Weight: sdk.NewDecWithPrec(60, 2).String()}, - &v1.WeightedVoteOption{Option: v1.OptionNo, Weight: sdk.NewDecWithPrec(30, 2).String()}, - &v1.WeightedVoteOption{Option: v1.OptionAbstain, Weight: sdk.NewDecWithPrec(5, 2).String()}, - &v1.WeightedVoteOption{Option: v1.OptionNoWithVeto, Weight: sdk.NewDecWithPrec(5, 2).String()}, - }, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryVote(address.NewBech32Codec("cosmos")) - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - - var vote v1.Vote - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &vote), out.String()) - s.Require().Equal(len(vote.Options), len(tc.expVoteOptions)) - for i, option := range tc.expVoteOptions { - s.Require().Equal(option.Option, vote.Options[i].Option) - s.Require().Equal(option.Weight, vote.Options[i].Weight) - } - } - }) - } -} diff --git a/tests/e2e/gov/tx.go b/tests/e2e/gov/tx.go index 33cddd26115f..5bcff679372d 100644 --- a/tests/e2e/gov/tx.go +++ b/tests/e2e/gov/tx.go @@ -4,14 +4,13 @@ import ( "encoding/base64" "fmt" - "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/testutil" - "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/suite" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/client/flags" - addresscodec "github.com/cosmos/cosmos-sdk/codec/address" + "github.com/cosmos/cosmos-sdk/testutil" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/cosmos/cosmos-sdk/testutil/network" sdk "github.com/cosmos/cosmos-sdk/types" @@ -61,9 +60,12 @@ func (s *E2ETestSuite) SetupSuite() { s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &resp), out.String()) s.Require().NoError(clitestutil.CheckTxCode(s.network, clientCtx, resp.TxHash, 0)) - // create a proposal without deposit + // create a proposal with a small deposit + minimumAcceptedDep := v1.DefaultMinDepositTokens.ToLegacyDec().Mul(v1.DefaultMinDepositRatio).Ceil().TruncateInt() out, err = govclitestutil.MsgSubmitLegacyProposal(val.ClientCtx, val.Address.String(), - "Text Proposal 2", "Where is the title!?", v1beta1.ProposalTypeText) + "Text Proposal 2", "Where is the title!?", v1beta1.ProposalTypeText, + fmt.Sprintf("--%s=%s", cli.FlagDeposit, sdk.NewCoin(s.cfg.BondDenom, minimumAcceptedDep).String())) + s.Require().NoError(err) s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &resp), out.String()) s.Require().NoError(clitestutil.CheckTxCode(s.network, clientCtx, resp.TxHash, 0)) @@ -129,7 +131,7 @@ func (s *E2ETestSuite) TestNewCmdSubmitProposal() { "summary": "My awesome description", "metadata": "%s", "deposit": "%s" -}`, authtypes.NewModuleAddress(types.ModuleName), base64.StdEncoding.EncodeToString(propMetadata), sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(5431))) +}`, authtypes.NewModuleAddress(types.ModuleName), base64.StdEncoding.EncodeToString(propMetadata), sdk.NewCoin(s.cfg.BondDenom, math.NewInt(100000))) validPropFile := testutil.WriteToNewTempFile(s.T(), validProp) defer validPropFile.Close() @@ -145,7 +147,7 @@ func (s *E2ETestSuite) TestNewCmdSubmitProposal() { []string{ invalidPropFile.Name(), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, true, 0, nil, }, @@ -156,7 +158,7 @@ func (s *E2ETestSuite) TestNewCmdSubmitProposal() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, false, 0, &sdk.TxResponse{}, }, @@ -197,7 +199,7 @@ func (s *E2ETestSuite) TestNewCmdSubmitLegacyProposal() { "description": "Hello, World!", "type": "Text", "deposit": "%s" - }`, sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(5431))) + }`, sdk.NewCoin(s.cfg.BondDenom, math.NewInt(154310))) validPropFile := testutil.WriteToNewTempFile(s.T(), validProp) defer validPropFile.Close() @@ -214,7 +216,7 @@ func (s *E2ETestSuite) TestNewCmdSubmitLegacyProposal() { fmt.Sprintf("--%s=%s", cli.FlagProposal, invalidPropFile.Name()), //nolint:staticcheck // we are intentionally using a deprecated flag here. fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, true, 0, nil, }, @@ -223,10 +225,10 @@ func (s *E2ETestSuite) TestNewCmdSubmitLegacyProposal() { []string{ fmt.Sprintf("--%s='Where is the title!?'", cli.FlagDescription), //nolint:staticcheck // we are intentionally using a deprecated flag here. fmt.Sprintf("--%s=%s", cli.FlagProposalType, v1beta1.ProposalTypeText), //nolint:staticcheck // we are intentionally using a deprecated flag here. - fmt.Sprintf("--%s=%s", cli.FlagDeposit, sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(5431)).String()), + fmt.Sprintf("--%s=%s", cli.FlagDeposit, sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10000)).String()), fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, true, 0, nil, }, @@ -238,7 +240,7 @@ func (s *E2ETestSuite) TestNewCmdSubmitLegacyProposal() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, false, 0, &sdk.TxResponse{}, }, @@ -248,11 +250,11 @@ func (s *E2ETestSuite) TestNewCmdSubmitLegacyProposal() { fmt.Sprintf("--%s='Text Proposal'", cli.FlagTitle), fmt.Sprintf("--%s='Where is the title!?'", cli.FlagDescription), //nolint:staticcheck // we are intentionally using a deprecated flag here. fmt.Sprintf("--%s=%s", cli.FlagProposalType, v1beta1.ProposalTypeText), //nolint:staticcheck // we are intentionally using a deprecated flag here. - fmt.Sprintf("--%s=%s", cli.FlagDeposit, sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(5431)).String()), + fmt.Sprintf("--%s=%s", cli.FlagDeposit, sdk.NewCoin(s.cfg.BondDenom, math.NewInt(100000)).String()), fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, false, 0, &sdk.TxResponse{}, }, @@ -294,7 +296,7 @@ func (s *E2ETestSuite) TestNewCmdCancelProposal() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, true, 0, }, @@ -305,7 +307,7 @@ func (s *E2ETestSuite) TestNewCmdCancelProposal() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, true, 0, }, @@ -316,7 +318,7 @@ func (s *E2ETestSuite) TestNewCmdCancelProposal() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val2), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, true, 0, }, @@ -327,7 +329,7 @@ func (s *E2ETestSuite) TestNewCmdCancelProposal() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, false, 0, }, @@ -338,7 +340,7 @@ func (s *E2ETestSuite) TestNewCmdCancelProposal() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, false, 1, }, @@ -353,9 +355,9 @@ func (s *E2ETestSuite) TestNewCmdCancelProposal() { var balRes banktypes.QueryAllBalancesResponse var newBalance banktypes.QueryAllBalancesResponse if !tc.expectErr && tc.expectedCode == 0 { - resp, err := clitestutil.QueryBalancesExec(clientCtx, val.Address, addresscodec.NewBech32Codec("cosmos")) + resp, err := testutil.GetRequest(fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s", val.APIAddress, val.Address.String())) s.Require().NoError(err) - err = val.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) + err = val.ClientCtx.Codec.UnmarshalJSON(resp, &balRes) s.Require().NoError(err) } @@ -364,21 +366,20 @@ func (s *E2ETestSuite) TestNewCmdCancelProposal() { s.Require().Error(err) } else { s.Require().NoError(err) - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &resp), out.String()) s.Require().NoError(clitestutil.CheckTxCode(s.network, clientCtx, resp.TxHash, tc.expectedCode)) if !tc.expectErr && tc.expectedCode == 0 { - resp, err := clitestutil.QueryBalancesExec(clientCtx, val.Address, addresscodec.NewBech32Codec("cosmos")) + resp, err := testutil.GetRequest(fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s", val.APIAddress, val.Address.String())) s.Require().NoError(err) - err = val.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &newBalance) + err = val.ClientCtx.Codec.UnmarshalJSON(resp, &newBalance) s.Require().NoError(err) remainingAmount := v1.DefaultMinDepositTokens.Mul( - v1.DefaultProposalCancelRatio.Mul(sdk.MustNewDecFromStr("100")).TruncateInt(), + v1.DefaultProposalCancelRatio.Mul(math.LegacyMustNewDecFromStr("100")).TruncateInt(), ).Quo(math.NewIntFromUint64(100)) // new balance = old balance + remaining amount from proposal deposit - txFee (cancel proposal) - txFee := sdk.NewInt(10) + txFee := math.NewInt(10) s.Require().True( newBalance.Balances.AmountOf(s.network.Config.BondDenom).Equal( balRes.Balances.AmountOf(s.network.Config.BondDenom).Add(remainingAmount).Sub(txFee), @@ -390,84 +391,6 @@ func (s *E2ETestSuite) TestNewCmdCancelProposal() { } } -func (s *E2ETestSuite) TestNewCmdDeposit() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectErr bool - expectedCode uint32 - }{ - { - "without proposal id", - []string{ - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)).String(), // 10stake - fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - }, - true, 0, - }, - { - "without deposit amount", - []string{ - "1", - fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - }, - true, 0, - }, - { - "deposit on non existing proposal", - []string{ - "10", - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)).String(), // 10stake - fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - }, - false, 1, - }, - { - "deposit on existing proposal", - []string{ - "1", - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)).String(), // 10stake - fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - }, - false, 0, - }, - } - - for _, tc := range testCases { - tc := tc - var resp sdk.TxResponse - - s.Run(tc.name, func() { - cmd := cli.NewCmdDeposit() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &resp), out.String()) - s.Require().NoError(clitestutil.CheckTxCode(s.network, clientCtx, resp.TxHash, tc.expectedCode)) - } - }) - } -} - func (s *E2ETestSuite) TestNewCmdVote() { val := s.network.Validators[0] @@ -491,7 +414,7 @@ func (s *E2ETestSuite) TestNewCmdVote() { fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--metadata=%s", "AQ=="), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, false, 3, }, @@ -503,7 +426,7 @@ func (s *E2ETestSuite) TestNewCmdVote() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, false, 0, }, @@ -516,7 +439,7 @@ func (s *E2ETestSuite) TestNewCmdVote() { fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--metadata=%s", "AQ=="), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, false, 0, }, @@ -564,7 +487,7 @@ func (s *E2ETestSuite) TestNewCmdWeightedVote() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, false, 3, }, @@ -576,7 +499,7 @@ func (s *E2ETestSuite) TestNewCmdWeightedVote() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, false, 0, }, @@ -589,7 +512,7 @@ func (s *E2ETestSuite) TestNewCmdWeightedVote() { fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--metadata=%s", "AQ=="), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, false, 0, }, @@ -601,7 +524,7 @@ func (s *E2ETestSuite) TestNewCmdWeightedVote() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, true, 0, }, @@ -613,7 +536,7 @@ func (s *E2ETestSuite) TestNewCmdWeightedVote() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }, false, 0, }, diff --git a/tests/e2e/group/query.go b/tests/e2e/group/query.go deleted file mode 100644 index 293b8f046d18..000000000000 --- a/tests/e2e/group/query.go +++ /dev/null @@ -1,113 +0,0 @@ -package group - -import ( - "fmt" - - "github.com/cosmos/cosmos-sdk/client/flags" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/group" - client "github.com/cosmos/cosmos-sdk/x/group/client/cli" -) - -func (s *E2ETestSuite) TestTallyResult() { - val := s.network.Validators[0] - clientCtx := val.ClientCtx - - member := s.voter - - // create a proposal - out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, client.MsgSubmitProposalCmd(), - append( - []string{ - s.createCLIProposal( - s.groupPolicies[0].Address, val.Address.String(), - s.groupPolicies[0].Address, val.Address.String(), - "", "title", "summary"), - }, - s.commonFlags..., - ), - ) - s.Require().NoError(err, out.String()) - - var txResp sdk.TxResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txResp), out.String()) - txResp, err = clitestutil.GetTxResponse(s.network, clientCtx, txResp.TxHash) - s.Require().NoError(err) - s.Require().Equal(txResp.Code, uint32(0), out.String()) - - proposalID := s.getProposalIDFromTxResponse(txResp) - - testCases := []struct { - name string - args []string - expectErr bool - expTallyResult group.TallyResult - expectErrMsg string - }{ - { - "not found", - []string{ - "12345", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - group.TallyResult{}, - "not found", - }, - { - "invalid proposal id", - []string{ - "", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - group.TallyResult{}, - "strconv.ParseUint: parsing \"\": invalid syntax", - }, - { - "valid proposal id with no votes", - []string{ - proposalID, - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - group.DefaultTallyResult(), - "", - }, - { - "valid proposal id", - []string{ - "1", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - group.TallyResult{ - YesCount: member.Weight, - AbstainCount: "0", - NoCount: "0", - NoWithVetoCount: "0", - }, - "", - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := client.QueryTallyResultCmd() - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Contains(out.String(), tc.expectErrMsg) - } else { - s.Require().NoError(err, out.String()) - var tallyResultRes group.QueryTallyResultResponse - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &tallyResultRes)) - s.Require().NotNil(tallyResultRes) - s.Require().Equal(tc.expTallyResult, tallyResultRes.Tally) - } - }) - } -} diff --git a/tests/e2e/group/suite.go b/tests/e2e/group/suite.go index 1de710d17463..6d1525e543aa 100644 --- a/tests/e2e/group/suite.go +++ b/tests/e2e/group/suite.go @@ -4,12 +4,12 @@ import ( "encoding/base64" "encoding/json" "fmt" - "strings" "github.com/stretchr/testify/suite" // without this import amino json encoding will fail when resolving any types _ "cosmossdk.io/api/cosmos/group/v1" + "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec/address" @@ -50,7 +50,7 @@ func (s *E2ETestSuite) SetupSuite() { s.commonFlags = []string{ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), } var err error @@ -72,11 +72,11 @@ func (s *E2ETestSuite) SetupSuite() { val.ClientCtx, val.Address, account, - sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(2000))), + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(2000))), address.NewBech32Codec("cosmos"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), ) s.Require().NoError(err) s.Require().NoError(s.network.WaitForNextBlock()) @@ -119,9 +119,13 @@ func (s *E2ETestSuite) SetupSuite() { } s.createGroupThresholdPolicyWithBalance(val.Address.String(), "1", threshold, 1000) - out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, client.QueryGroupPoliciesByGroupCmd(), []string{"1", fmt.Sprintf("--%s=json", flags.FlagOutput)}) - s.Require().NoError(err, out.String()) s.Require().NoError(s.network.WaitForNextBlock()) + resp, err := testutil.GetRequest(fmt.Sprintf("%s/cosmos/group/v1/group_policies_by_group/1", val.APIAddress)) + s.Require().NoError(err) + + var groupPoliciesResp group.QueryGroupPoliciesByGroupResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(resp, &groupPoliciesResp)) + s.Require().Len(groupPoliciesResp.GroupPolicies, i+1) } // create group policy with percentage decision policy out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, client.MsgCreateGroupPolicyCmd(), @@ -139,13 +143,13 @@ func (s *E2ETestSuite) SetupSuite() { s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txResp), out.String()) s.Require().NoError(clitestutil.CheckTxCode(s.network, val.ClientCtx, txResp.TxHash, 0)) - out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, client.QueryGroupPoliciesByGroupCmd(), []string{"1", fmt.Sprintf("--%s=json", flags.FlagOutput)}) - s.Require().NoError(err, out.String()) + resp, err := testutil.GetRequest(fmt.Sprintf("%s/cosmos/group/v1/group_policies_by_group/1", val.APIAddress)) + s.Require().NoError(err) - var res group.QueryGroupPoliciesByGroupResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) - s.Require().Equal(len(res.GroupPolicies), 6) - s.groupPolicies = res.GroupPolicies + var groupPoliciesResp group.QueryGroupPoliciesByGroupResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(resp, &groupPoliciesResp)) + s.Require().Equal(len(groupPoliciesResp.GroupPolicies), 6) + s.groupPolicies = groupPoliciesResp.GroupPolicies // create a proposal out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, client.MsgSubmitProposalCmd(), @@ -179,18 +183,18 @@ func (s *E2ETestSuite) SetupSuite() { s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txResp), out.String()) s.Require().NoError(clitestutil.CheckTxCode(s.network, val.ClientCtx, txResp.TxHash, 0)) - out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, client.QueryProposalCmd(), []string{"1", fmt.Sprintf("--%s=json", flags.FlagOutput)}) - s.Require().NoError(err, out.String()) + resp, err = testutil.GetRequest(fmt.Sprintf("%s/cosmos/group/v1/proposal/1", val.APIAddress)) + s.Require().NoError(err) var proposalRes group.QueryProposalResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &proposalRes)) + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(resp, &proposalRes)) s.proposal = proposalRes.Proposal - out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, client.QueryVoteByProposalVoterCmd(), []string{"1", val.Address.String(), fmt.Sprintf("--%s=json", flags.FlagOutput)}) - s.Require().NoError(err, out.String()) + resp, err = testutil.GetRequest(fmt.Sprintf("%s/cosmos/group/v1/vote_by_proposal_voter/1/%s", val.APIAddress, val.Address.String())) + s.Require().NoError(err) var voteRes group.QueryVoteByProposalVoterResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &voteRes)) + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(resp, &voteRes)) s.vote = voteRes.Vote s.voter = &group.Member{ @@ -205,21 +209,6 @@ func (s *E2ETestSuite) TearDownSuite() { s.network.Cleanup() } -func (s *E2ETestSuite) getProposalIDFromTxResponse(txResp sdk.TxResponse) string { - s.Require().Greater(len(txResp.Events), 0) - s.Require().NotNil(txResp.Events[0]) - events := txResp.Events - createProposalEvent, _ := sdk.TypedEventToEvent(&group.EventSubmitProposal{}) - - for _, e := range events { - if e.Type == createProposalEvent.Type { - return strings.ReplaceAll(e.Attributes[0].Value, "\"", "") - } - } - - return "" -} - // createCLIProposal writes a CLI proposal with a MsgSend to a file. Returns // the path to the JSON file. func (s *E2ETestSuite) createCLIProposal(groupPolicyAddress, proposer, sendFrom, sendTo, metadata, title, summary string) string { @@ -229,7 +218,7 @@ func (s *E2ETestSuite) createCLIProposal(groupPolicyAddress, proposer, sendFrom, msg := banktypes.MsgSend{ FromAddress: sendFrom, ToAddress: sendTo, - Amount: sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(20))), + Amount: sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(20))), } msgJSON, err := s.cfg.Codec.MarshalInterfaceJSON(&msg) s.Require().NoError(err) @@ -271,17 +260,17 @@ func (s *E2ETestSuite) createGroupThresholdPolicyWithBalance(adminAddress, group s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txResp), out.String()) s.Require().NoError(clitestutil.CheckTxCode(s.network, val.ClientCtx, txResp.TxHash, 0)) - out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, client.QueryGroupPoliciesByGroupCmd(), []string{groupID, fmt.Sprintf("--%s=json", flags.FlagOutput)}) - s.Require().NoError(err, out.String()) + resp, err := testutil.GetRequest(fmt.Sprintf("%s/cosmos/group/v1/group_policies_by_group/%s", val.APIAddress, groupID)) + s.Require().NoError(err) var res group.QueryGroupPoliciesByGroupResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(resp, &res)) groupPolicyAddress := res.GroupPolicies[0].Address addr, err := sdk.AccAddressFromBech32(groupPolicyAddress) s.Require().NoError(err) _, err = clitestutil.MsgSendExec(clientCtx, val.Address, addr, - sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(tokens))), + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(tokens))), address.NewBech32Codec("cosmos"), s.commonFlags..., ) diff --git a/tests/e2e/mint/grpc.go b/tests/e2e/mint/grpc.go index ed7824f4777c..fc513b5073cf 100644 --- a/tests/e2e/mint/grpc.go +++ b/tests/e2e/mint/grpc.go @@ -3,13 +3,12 @@ package mint import ( "fmt" + "github.com/cosmos/gogoproto/proto" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/testutil" - sdk "github.com/cosmos/cosmos-sdk/types" grpctypes "github.com/cosmos/cosmos-sdk/types/grpc" - - "github.com/cosmos/gogoproto/proto" - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" ) @@ -29,8 +28,8 @@ func (s *E2ETestSuite) TestQueryGRPC() { map[string]string{}, &minttypes.QueryParamsResponse{}, &minttypes.QueryParamsResponse{ - Params: minttypes.NewParams("stake", sdk.NewDecWithPrec(13, 2), sdk.NewDecWithPrec(100, 2), - math.LegacyNewDec(1), sdk.NewDecWithPrec(67, 2), (60 * 60 * 8766 / 5)), + Params: minttypes.NewParams("stake", math.LegacyNewDecWithPrec(13, 2), math.LegacyNewDecWithPrec(100, 2), + math.LegacyNewDec(1), math.LegacyNewDecWithPrec(67, 2), (60 * 60 * 8766 / 5)), }, }, { diff --git a/tests/e2e/mint/suite.go b/tests/e2e/mint/suite.go index da83fed2d0a2..808052c855f4 100644 --- a/tests/e2e/mint/suite.go +++ b/tests/e2e/mint/suite.go @@ -1,16 +1,11 @@ package mint import ( - "fmt" - "strings" - "github.com/stretchr/testify/suite" - "github.com/cosmos/cosmos-sdk/client/flags" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/testutil/network" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/mint/client/cli" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" ) @@ -33,7 +28,7 @@ func (s *E2ETestSuite) SetupSuite() { var mintData minttypes.GenesisState s.Require().NoError(s.cfg.Codec.UnmarshalJSON(genesisState[minttypes.ModuleName], &mintData)) - inflation := sdk.MustNewDecFromStr("1.0") + inflation := math.LegacyMustNewDecFromStr("1.0") mintData.Minter.Inflation = inflation mintData.Params.InflationMin = inflation mintData.Params.InflationMax = inflation @@ -53,110 +48,3 @@ func (s *E2ETestSuite) TearDownSuite() { s.T().Log("tearing down e2e test suite") s.network.Cleanup() } - -func (s *E2ETestSuite) TestGetCmdQueryParams() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectedOutput string - }{ - { - "json output", - []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=json", flags.FlagOutput)}, - `{"mint_denom":"stake","inflation_rate_change":"0.130000000000000000","inflation_max":"1.000000000000000000","inflation_min":"1.000000000000000000","goal_bonded":"0.670000000000000000","blocks_per_year":"6311520"}`, - }, - { - "text output", - []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=text", flags.FlagOutput)}, - `blocks_per_year: "6311520" -goal_bonded: "0.670000000000000000" -inflation_max: "1.000000000000000000" -inflation_min: "1.000000000000000000" -inflation_rate_change: "0.130000000000000000" -mint_denom: stake`, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryParams() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - s.Require().NoError(err) - s.Require().Equal(tc.expectedOutput, strings.TrimSpace(out.String())) - }) - } -} - -func (s *E2ETestSuite) TestGetCmdQueryInflation() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectedOutput string - }{ - { - "json output", - []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=json", flags.FlagOutput)}, - `1.000000000000000000`, - }, - { - "text output", - []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=text", flags.FlagOutput)}, - `1.000000000000000000`, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryInflation() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - s.Require().NoError(err) - s.Require().Equal(tc.expectedOutput, strings.TrimSpace(out.String())) - }) - } -} - -func (s *E2ETestSuite) TestGetCmdQueryAnnualProvisions() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectedOutput string - }{ - { - "json output", - []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=json", flags.FlagOutput)}, - `500000000.000000000000000000`, - }, - { - "text output", - []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=text", flags.FlagOutput)}, - `500000000.000000000000000000`, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryAnnualProvisions() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - s.Require().NoError(err) - s.Require().Equal(tc.expectedOutput, strings.TrimSpace(out.String())) - }) - } -} diff --git a/tests/e2e/params/app_config.go b/tests/e2e/params/app_config.go deleted file mode 100644 index 415c01e0553f..000000000000 --- a/tests/e2e/params/app_config.go +++ /dev/null @@ -1,23 +0,0 @@ -package testutil - -import ( - "github.com/cosmos/cosmos-sdk/testutil/configurator" - - _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring - _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring - _ "github.com/cosmos/cosmos-sdk/x/bank" // import as blank for app wiring - _ "github.com/cosmos/cosmos-sdk/x/consensus" // import as blank for app wiring - _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring - _ "github.com/cosmos/cosmos-sdk/x/params" // import as blank for app wiring - _ "github.com/cosmos/cosmos-sdk/x/staking" // import as blank for app wiring -) - -var AppConfig = configurator.NewAppConfig( - configurator.AuthModule(), - configurator.BankModule(), - configurator.StakingModule(), - configurator.TxModule(), - configurator.ConsensusModule(), - configurator.ParamsModule(), - configurator.GenutilModule(), -) diff --git a/tests/e2e/params/cli_test.go b/tests/e2e/params/cli_test.go deleted file mode 100644 index 80081e2bcaf8..000000000000 --- a/tests/e2e/params/cli_test.go +++ /dev/null @@ -1,19 +0,0 @@ -//go:build e2e -// +build e2e - -package testutil - -import ( - "testing" - - "github.com/stretchr/testify/suite" - - "cosmossdk.io/simapp" - "github.com/cosmos/cosmos-sdk/testutil/network" -) - -func TestE2ETestSuite(t *testing.T) { - cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) - cfg.NumValidators = 1 - suite.Run(t, NewE2ETestSuite(cfg)) -} diff --git a/tests/e2e/params/grpc.go b/tests/e2e/params/grpc.go deleted file mode 100644 index 99c1b603a609..000000000000 --- a/tests/e2e/params/grpc.go +++ /dev/null @@ -1,85 +0,0 @@ -package testutil - -import ( - "fmt" - - "github.com/cosmos/gogoproto/proto" - - "github.com/cosmos/cosmos-sdk/testutil" - "github.com/cosmos/cosmos-sdk/x/params/types/proposal" -) - -func (s *E2ETestSuite) TestQueryParamsGRPC() { - val := s.network.Validators[0] - baseURL := val.APIAddress - - testCases := []struct { - name string - url string - headers map[string]string - expErr bool - respType proto.Message - expected proto.Message - }{ - { - "with no subspace, key", - fmt.Sprintf("%s/cosmos/params/v1beta1/params?subspace=%s&key=%s", baseURL, "", ""), - map[string]string{}, - true, - &proposal.QueryParamsResponse{}, - nil, - }, - { - "with wrong subspace", - fmt.Sprintf("%s/cosmos/params/v1beta1/params?subspace=%s&key=%s", baseURL, "wrongSubspace", "foo"), - map[string]string{}, - true, - &proposal.QueryParamsResponse{}, - nil, - }, - { - "with wrong key", - fmt.Sprintf("%s/cosmos/params/v1beta1/params?subspace=%s&key=%s", baseURL, mySubspace, "wrongKey"), - map[string]string{}, - false, - &proposal.QueryParamsResponse{}, - &proposal.QueryParamsResponse{ - Param: proposal.ParamChange{ - Subspace: mySubspace, - Key: "wrongKey", - }, - }, - }, - { - "params", - fmt.Sprintf("%s/cosmos/params/v1beta1/params?subspace=%s&key=%s", baseURL, mySubspace, "bar"), - map[string]string{}, - false, - &proposal.QueryParamsResponse{}, - &proposal.QueryParamsResponse{ - Param: proposal.ParamChange{ - Subspace: mySubspace, - Key: "bar", - Value: `"1234"`, - }, - }, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - resp, err := testutil.GetRequestWithHeaders(tc.url, tc.headers) - s.Require().NoError(err) - - err = val.ClientCtx.Codec.UnmarshalJSON(resp, tc.respType) - - if tc.expErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - s.Require().Equal(tc.expected.String(), tc.respType.String()) - } - }) - } -} diff --git a/tests/e2e/params/suite.go b/tests/e2e/params/suite.go deleted file mode 100644 index 89c8618440f6..000000000000 --- a/tests/e2e/params/suite.go +++ /dev/null @@ -1,148 +0,0 @@ -package testutil - -import ( - "fmt" - "strings" - - abci "github.com/cometbft/cometbft/abci/types" - dbm "github.com/cosmos/cosmos-db" - "github.com/stretchr/testify/suite" - - "cosmossdk.io/depinject" - pruningtypes "cosmossdk.io/store/pruning/types" - - "github.com/cosmos/cosmos-sdk/baseapp" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/runtime" - servertypes "github.com/cosmos/cosmos-sdk/server/types" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - "github.com/cosmos/cosmos-sdk/testutil/network" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/params/client/cli" - "github.com/cosmos/cosmos-sdk/x/params/keeper" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" -) - -// mySubspace is a x/params subspace created for the purpose of this -// test suite. -const mySubspace = "foo" - -// myParams defines some params in the `mySubspace` subspace. -type myParams struct{} - -func (p *myParams) ParamSetPairs() paramtypes.ParamSetPairs { - return paramtypes.ParamSetPairs{ - paramtypes.NewParamSetPair([]byte("bar"), 1234, func(value interface{}) error { return nil }), - } -} - -type E2ETestSuite struct { - suite.Suite - - cfg network.Config - network *network.Network -} - -func NewE2ETestSuite(cfg network.Config) *E2ETestSuite { - return &E2ETestSuite{cfg: cfg} -} - -func (s *E2ETestSuite) SetupSuite() { - s.T().Log("setting up e2e test suite") - - // Create a new AppConstructor for this test suite, where we manually - // add a subspace and `myParams` to the x/params store. - s.cfg.AppConstructor = func(val network.ValidatorI) servertypes.Application { - var ( - appBuilder *runtime.AppBuilder - paramsKeeper keeper.Keeper - ) - if err := depinject.Inject( - depinject.Configs( - AppConfig, - depinject.Supply(val.GetCtx().Logger), - ), - &appBuilder, ¶msKeeper); err != nil { - panic(err) - } - - // Add this test's `myParams` to the x/params store. - paramSet := myParams{} - subspace := paramsKeeper.Subspace(mySubspace).WithKeyTable(paramtypes.NewKeyTable().RegisterParamSet(¶mSet)) - - app := appBuilder.Build( - dbm.NewMemDB(), - nil, - baseapp.SetPruning(pruningtypes.NewPruningOptionsFromString(val.GetAppConfig().Pruning)), - baseapp.SetMinGasPrices(val.GetAppConfig().MinGasPrices), - baseapp.SetChainID(s.cfg.ChainID), - ) - - s.Require().NoError(app.Load(false)) - - // Make sure not to forget to persist `myParams` into the actual store, - // this is done in InitChain. - app.SetInitChainer(func(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error) { - subspace.SetParamSet(ctx, ¶mSet) - - return app.InitChainer(ctx, req) - }) - - s.Require().NoError(app.LoadLatestVersion()) - - return app - } - - var err error - s.network, err = network.New(s.T(), s.T().TempDir(), s.cfg) - s.Require().NoError(err) - - s.Require().NoError(s.network.WaitForNextBlock()) -} - -func (s *E2ETestSuite) TearDownSuite() { - s.T().Log("tearing down e2e test suite") - s.network.Cleanup() -} - -func (s *E2ETestSuite) TestNewQuerySubspaceParamsCmd() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectedOutput string - }{ - { - "json output", - []string{ - "foo", "bar", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - `{"subspace":"foo","key":"bar","value":"\"1234\""}`, - }, - { - "text output", - []string{ - "foo", "bar", - fmt.Sprintf("--%s=text", flags.FlagOutput), - }, - `key: bar -subspace: foo -value: '"1234"'`, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.NewQuerySubspaceParamsCmd() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - s.Require().NoError(err) - s.Require().Equal(tc.expectedOutput, strings.TrimSpace(out.String())) - }) - } -} diff --git a/tests/e2e/staking/suite.go b/tests/e2e/staking/suite.go index e74bcaaff9a0..5852446f21f3 100644 --- a/tests/e2e/staking/suite.go +++ b/tests/e2e/staking/suite.go @@ -10,6 +10,8 @@ import ( "github.com/cometbft/cometbft/rpc/client/http" "github.com/stretchr/testify/suite" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/client/flags" addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/crypto/hd" @@ -63,7 +65,7 @@ func (s *E2ETestSuite) SetupSuite() { s.Require().Equal(uint32(0), txRes.Code) s.Require().NoError(s.network.WaitForNextBlock()) - unbondingAmount := sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5)) + unbondingAmount := sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(5)) // unbonding the amount out, err = MsgUnbondExec(val.ClientCtx, val.Address, val.ValAddress, unbondingAmount) @@ -105,22 +107,22 @@ func (s *E2ETestSuite) TestBlockResults() { val.ClientCtx, val.Address, newAddr, - sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(200))), addresscodec.NewBech32Codec("cosmos"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(200))), addresscodec.NewBech32Codec("cosmos"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), ) require.NoError(err) require.NoError(s.network.WaitForNextBlock()) // Use CLI to create a delegation from the new account to validator `val`. - cmd := cli.NewDelegateCmd() + cmd := cli.NewDelegateCmd(addresscodec.NewBech32Codec("cosmosvaloper"), addresscodec.NewBech32Codec("cosmos")) _, err = clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, []string{ val.ValAddress.String(), - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(150)).String(), + sdk.NewCoin(s.cfg.BondDenom, math.NewInt(150)).String(), fmt.Sprintf("--%s=%s", flags.FlagFrom, newAddr.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), }) require.NoError(err) require.NoError(s.network.WaitForNextBlock()) diff --git a/tests/e2e/staking/test_helpers.go b/tests/e2e/staking/test_helpers.go index 787080dcd897..6605dc867dae 100644 --- a/tests/e2e/staking/test_helpers.go +++ b/tests/e2e/staking/test_helpers.go @@ -3,8 +3,11 @@ package testutil import ( "fmt" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/testutil" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" sdk "github.com/cosmos/cosmos-sdk/types" @@ -14,7 +17,7 @@ import ( var commonArgs = []string{ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(10))).String()), } // MsgRedelegateExec creates a redelegate message. @@ -29,7 +32,7 @@ func MsgRedelegateExec(clientCtx client.Context, from, src, dst, amount fmt.Stri args = append(args, extraArgs...) args = append(args, commonArgs...) - return clitestutil.ExecTestCLICmd(clientCtx, stakingcli.NewRedelegateCmd(), args) + return clitestutil.ExecTestCLICmd(clientCtx, stakingcli.NewRedelegateCmd(addresscodec.NewBech32Codec("cosmosvaloper"), addresscodec.NewBech32Codec("cosmos")), args) } // MsgUnbondExec creates a unbond message. @@ -45,5 +48,5 @@ func MsgUnbondExec(clientCtx client.Context, from, valAddress, args = append(args, commonArgs...) args = append(args, extraArgs...) - return clitestutil.ExecTestCLICmd(clientCtx, stakingcli.NewUnbondCmd(), args) + return clitestutil.ExecTestCLICmd(clientCtx, stakingcli.NewUnbondCmd(addresscodec.NewBech32Codec("cosmosvaloper"), addresscodec.NewBech32Codec("cosmos")), args) } diff --git a/tests/e2e/tx/service_test.go b/tests/e2e/tx/service_test.go index 24e407969c2f..cee50c6a5a62 100644 --- a/tests/e2e/tx/service_test.go +++ b/tests/e2e/tx/service_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/suite" errorsmod "cosmossdk.io/errors" - + "cosmossdk.io/math" "cosmossdk.io/simapp" "github.com/cosmos/cosmos-sdk/client" @@ -73,12 +73,12 @@ func (s *E2ETestSuite) SetupSuite() { val.Address, val.Address, sdk.NewCoins( - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), + sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10)), ), addresscodec.NewBech32Codec("cosmos"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--gas=%d", flags.DefaultGasLimit), fmt.Sprintf("--%s=foobar", flags.FlagNote), ) @@ -91,7 +91,7 @@ func (s *E2ETestSuite) SetupSuite() { val.Address, val.Address, sdk.NewCoins( - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(1)), + sdk.NewCoin(s.cfg.BondDenom, math.NewInt(1)), ), addresscodec.NewBech32Codec("cosmos"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), @@ -99,7 +99,7 @@ func (s *E2ETestSuite) SetupSuite() { fmt.Sprintf("--%s=0", flags.FlagAccountNumber), fmt.Sprintf("--%s=2", flags.FlagSequence), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--gas=%d", flags.DefaultGasLimit), fmt.Sprintf("--%s=foobar", flags.FlagNote), ) @@ -603,7 +603,7 @@ func (s *E2ETestSuite) TestSimMultiSigTx() { addresscodec.NewBech32Codec("cosmos"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--gas=%d", flags.DefaultGasLimit), ) s.Require().NoError(err) @@ -624,7 +624,7 @@ func (s *E2ETestSuite) TestSimMultiSigTx() { addresscodec.NewBech32Codec("cosmos"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), fmt.Sprintf("--%s=foobar", flags.FlagNote), ) diff --git a/tests/e2e/upgrade/cli_test.go b/tests/e2e/upgrade/cli_test.go deleted file mode 100644 index fee20ee5541a..000000000000 --- a/tests/e2e/upgrade/cli_test.go +++ /dev/null @@ -1,26 +0,0 @@ -//go:build e2e -// +build e2e - -package upgrade - -import ( - "testing" - - "github.com/stretchr/testify/suite" - - "cosmossdk.io/simapp" - "github.com/cosmos/cosmos-sdk/testutil/network" -) - -func TestE2ETestSuite(t *testing.T) { - cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) - cfg.NumValidators = 1 - - app := simapp.Setup(t, false) - ctx := app.BaseApp.NewContext(false) - - app.UpgradeKeeper.SetVersionSetter(app.BaseApp) - app.UpgradeKeeper.SetModuleVersionMap(ctx, app.ModuleManager.GetVersionMap()) - - suite.Run(t, NewE2ETestSuite(cfg, app.UpgradeKeeper, ctx)) -} diff --git a/tests/e2e/upgrade/suite.go b/tests/e2e/upgrade/suite.go deleted file mode 100644 index 620071329093..000000000000 --- a/tests/e2e/upgrade/suite.go +++ /dev/null @@ -1,115 +0,0 @@ -package upgrade - -import ( - "fmt" - - "github.com/stretchr/testify/suite" - - "cosmossdk.io/x/upgrade/client/cli" - "cosmossdk.io/x/upgrade/keeper" - "cosmossdk.io/x/upgrade/types" - - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - "github.com/cosmos/cosmos-sdk/testutil/network" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func NewE2ETestSuite(cfg network.Config, keeper *keeper.Keeper, ctx sdk.Context) *E2ETestSuite { - return &E2ETestSuite{ - cfg: cfg, - upgradeKeeper: keeper, - ctx: ctx, - } -} - -type E2ETestSuite struct { - suite.Suite - - upgradeKeeper *keeper.Keeper - cfg network.Config - network *network.Network - ctx sdk.Context -} - -func (s *E2ETestSuite) SetupSuite() { - s.T().Log("setting up e2e test suite") - - var err error - s.network, err = network.New(s.T(), s.T().TempDir(), s.cfg) - s.Require().NoError(err) -} - -func (s *E2ETestSuite) TearDownSuite() { - s.T().Log("tearing down e2e test suite") - s.network.Cleanup() -} - -func (s *E2ETestSuite) TestModuleVersionsCLI() { - testCases := []struct { - msg string - req types.QueryModuleVersionsRequest - single bool - expPass bool - }{ - { - msg: "test full query", - req: types.QueryModuleVersionsRequest{ModuleName: ""}, - single: false, - expPass: true, - }, - { - msg: "test single module", - req: types.QueryModuleVersionsRequest{ModuleName: "bank"}, - single: true, - expPass: true, - }, - { - msg: "test non-existent module", - req: types.QueryModuleVersionsRequest{ModuleName: "abcdefg"}, - single: true, - expPass: false, - }, - } - - val := s.network.Validators[0] - clientCtx := val.ClientCtx - // avoid printing as yaml from CLI command - clientCtx.OutputFormat = "JSON" - - vm, err := s.upgradeKeeper.GetModuleVersionMap(s.ctx) - s.Require().NoError(err) - s.Require().NotEmpty(vm) - - mv, err := s.upgradeKeeper.GetModuleVersions(s.ctx) - s.Require().NoError(err) - - for _, tc := range testCases { - s.Run(fmt.Sprintf("Case %s", tc.msg), func() { - expect := mv - if tc.expPass { - if tc.single { - expect = []*types.ModuleVersion{{Name: tc.req.ModuleName, Version: vm[tc.req.ModuleName]}} - } - // setup expected response - pm := types.QueryModuleVersionsResponse{ - ModuleVersions: expect, - } - jsonVM, _ := clientCtx.Codec.MarshalJSON(&pm) - expectedRes := string(jsonVM) - // append new line to match behavior of PrintProto - expectedRes += "\n" - - // get actual module versions list response from cli - cmd := cli.GetModuleVersionsCmd() - outVM, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, []string{tc.req.ModuleName}) - s.Require().NoError(err) - - s.Require().Equal(expectedRes, outVM.String()) - } else { - cmd := cli.GetModuleVersionsCmd() - _, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, []string{tc.req.ModuleName}) - s.Require().Error(err) - } - }) - } -} diff --git a/tests/go.mod b/tests/go.mod index 44dc4de73c2a..59fec31376e4 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -1,205 +1,207 @@ module github.com/cosmos/cosmos-sdk/tests -go 1.20 +go 1.21 require ( - cosmossdk.io/api v0.4.2 - cosmossdk.io/core v0.8.0 - cosmossdk.io/depinject v1.0.0-alpha.3 - cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741 - cosmossdk.io/log v1.1.0 - cosmossdk.io/math v1.0.1 - cosmossdk.io/simapp v0.0.0-20230309163709-87da587416ba - cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c - cosmossdk.io/x/evidence v0.1.0 - cosmossdk.io/x/feegrant v0.0.0-20230117113717-50e7c4a4ceff - cosmossdk.io/x/nft v0.0.0-20230113085233-fae3332d62fc // indirect - cosmossdk.io/x/tx v0.8.0 - cosmossdk.io/x/upgrade v0.0.0-20230127052425-54c8e1568335 - github.com/cometbft/cometbft v0.38.0-rc1 - github.com/cosmos/cosmos-db v1.0.0 - github.com/cosmos/cosmos-proto v1.0.0-beta.3 + cosmossdk.io/api v0.7.6 + cosmossdk.io/core v0.11.1 + cosmossdk.io/depinject v1.1.0 + cosmossdk.io/errors v1.0.1 + cosmossdk.io/log v1.4.1 + cosmossdk.io/math v1.3.0 + cosmossdk.io/simapp v0.0.0-20230620040119-e078f1a49e8b + cosmossdk.io/store v1.1.1 + cosmossdk.io/x/evidence v0.1.1 + cosmossdk.io/x/feegrant v0.1.1 + cosmossdk.io/x/nft v0.1.1 // indirect + cosmossdk.io/x/tx v0.13.5 + cosmossdk.io/x/upgrade v0.1.4 + github.com/cometbft/cometbft v0.38.12 + github.com/cosmos/cosmos-db v1.0.2 + github.com/cosmos/cosmos-proto v1.0.0-beta.5 // this version is not used as it is always replaced by the latest Cosmos SDK version - github.com/cosmos/cosmos-sdk v0.50.0 - github.com/cosmos/gogoproto v1.4.10 + github.com/cosmos/cosmos-sdk v0.50.8 + github.com/cosmos/gogoproto v1.7.0 github.com/golang/mock v1.6.0 - github.com/spf13/cobra v1.7.0 - github.com/stretchr/testify v1.8.4 - google.golang.org/grpc v1.55.0 - google.golang.org/protobuf v1.30.0 - gotest.tools/v3 v3.4.0 - pgregory.net/rapid v0.6.2 + github.com/spf13/cobra v1.8.1 + github.com/stretchr/testify v1.9.0 + google.golang.org/grpc v1.67.1 + google.golang.org/protobuf v1.35.1 + gotest.tools/v3 v3.5.1 + pgregory.net/rapid v1.1.0 ) require ( - cloud.google.com/go v0.110.0 // indirect - cloud.google.com/go/compute v1.19.0 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v0.13.0 // indirect - cloud.google.com/go/storage v1.30.0 // indirect - cosmossdk.io/client/v2 v2.0.0-20230309163709-87da587416ba // indirect - cosmossdk.io/collections v0.2.0 // indirect - cosmossdk.io/x/circuit v0.0.0-20230220112800-f69b9ff58fbe // indirect + cloud.google.com/go v0.112.1 // indirect + cloud.google.com/go/compute/metadata v0.5.0 // indirect + cloud.google.com/go/iam v1.1.6 // indirect + cloud.google.com/go/storage v1.38.0 // indirect + cosmossdk.io/client/v2 v2.0.0-beta.5 // indirect + cosmossdk.io/collections v0.4.0 // indirect + cosmossdk.io/x/circuit v0.1.1 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect + github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect - github.com/armon/go-metrics v0.4.1 // indirect github.com/aws/aws-sdk-go v1.44.224 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect - github.com/bits-and-blooms/bitset v1.7.0 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/bits-and-blooms/bitset v1.8.0 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect - github.com/cockroachdb/errors v1.9.1 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect + github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230606202032-d96868fd481e // indirect - github.com/cockroachdb/redact v1.1.4 // indirect - github.com/cometbft/cometbft-db v0.7.0 // indirect + github.com/cockroachdb/pebble v1.1.1 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/cometbft/cometbft-db v0.11.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v1.0.0-beta.2 // indirect - github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.13.0 // indirect + github.com/cosmos/iavl v1.2.0 // indirect + github.com/cosmos/ics23/go v0.11.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/danieljoos/wincred v1.1.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect - github.com/emicklei/dot v1.4.2 // indirect + github.com/dvsekhvalnov/jose2go v1.6.0 // indirect + github.com/emicklei/dot v1.6.1 // indirect github.com/fatih/color v1.15.0 // indirect - github.com/felixge/httpsnoop v1.0.2 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/getsentry/sentry-go v0.21.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.1.0 // indirect + github.com/golang/glog v1.2.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect - github.com/google/s2a-go v0.1.3 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect - github.com/googleapis/gax-go/v2 v2.8.0 // indirect + github.com/google/s2a-go v0.1.7 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect + github.com/googleapis/gax-go/v2 v2.12.3 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/mux v1.8.0 // indirect - github.com/gorilla/websocket v1.5.0 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.7.1 // indirect + github.com/hashicorp/go-getter v1.7.4 // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-plugin v1.4.10 // indirect + github.com/hashicorp/go-metrics v0.5.3 // indirect + github.com/hashicorp/go-plugin v1.5.2 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/huandu/skiplist v1.2.0 // indirect - github.com/iancoleman/strcase v0.2.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.16.5 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect - github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.0 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect - github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 // indirect + github.com/pelletier/go-toml/v2 v2.2.2 // indirect + github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.15.1 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.20.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect - github.com/rs/cors v1.8.3 // indirect - github.com/rs/zerolog v1.29.1 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rs/cors v1.11.1 // indirect + github.com/rs/zerolog v1.33.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/cast v1.5.1 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.16.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/spf13/viper v1.19.0 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tidwall/btree v1.6.0 // indirect + github.com/tidwall/btree v1.7.0 // indirect github.com/ulikunitz/xz v0.5.11 // indirect - github.com/zondax/hid v0.9.1 // indirect - github.com/zondax/ledger-go v0.14.1 // indirect - go.etcd.io/bbolt v1.3.7 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect + go.etcd.io/bbolt v1.3.10 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/crypto v0.9.0 // indirect - golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/oauth2 v0.8.0 // indirect - golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect - golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/api v0.122.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect + go.uber.org/multierr v1.10.0 // indirect + golang.org/x/crypto v0.27.0 // indirect + golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect + golang.org/x/net v0.29.0 // indirect + golang.org/x/oauth2 v0.22.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/term v0.24.0 // indirect + golang.org/x/text v0.18.0 // indirect + golang.org/x/time v0.5.0 // indirect + google.golang.org/api v0.171.0 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.6 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) -// Here are the short-lived replace for tests -// Replace here are pending PRs, or version to be tagged. -// It must be in sync with SimApp temporary replaces -replace ( - // TODO tag all extracted modules after SDK refactor - cosmossdk.io/x/circuit => ../x/circuit - cosmossdk.io/x/evidence => ../x/evidence - cosmossdk.io/x/feegrant => ../x/feegrant - cosmossdk.io/x/nft => ../x/nft - cosmossdk.io/x/tx => ../x/tx - cosmossdk.io/x/upgrade => ../x/upgrade -) +// Here are the short-lived replace from the SimApp +// Replace here are pending PRs, or version to be tagged +// replace ( +// +// ) // Below are the long-lived replace for tests. replace ( @@ -210,5 +212,5 @@ replace ( github.com/cosmos/cosmos-sdk => ../. // Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities. // TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 - github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.0 + github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.1 ) diff --git a/tests/go.sum b/tests/go.sum index 80a5348dd4b3..4cbed4f59ae5 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -3,7 +3,6 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -16,7 +15,6 @@ cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOY cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= @@ -32,8 +30,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= -cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= +cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= +cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -70,10 +68,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.19.0 h1:+9zda3WGgW1ZSTlVppLCYFIr48Pa35q1uG2N1itbCEQ= -cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= +cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= @@ -111,13 +107,12 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v0.13.0 h1:+CmB+K0J/33d0zSQ9SlFWUeCCEn5XJA0ZMZ3pHE9u8k= -cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= +cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= +cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= -cloud.google.com/go/longrunning v0.4.1 h1:v+yFJOfKC3yZdY6ZUI933pIYdhyhV8S3NpWrXWmg7jM= cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= @@ -171,12 +166,11 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.30.0 h1:g1yrbxAWOrvg/594228pETWkOi00MLTrOWfh56veU5o= -cloud.google.com/go/storage v1.30.0/go.mod h1:xAVretHSROm1BQX4IIsoVgJqw0LqOyX+I/O2GzRAzdE= +cloud.google.com/go/storage v1.38.0 h1:Az68ZRGlnNTpIBbLjSMIV2BDcwwXYlRlQzis0llkpJg= +cloud.google.com/go/storage v1.38.0/go.mod h1:tlUADB0mAb9BgYls9lq+8MGkfzOXuLrnHXlpHmvFJoY= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= @@ -188,53 +182,63 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.4.2 h1:lQBMl4xINnMnBOR/tQLtjlDnR4exr4e6/SfHR8PILE0= -cosmossdk.io/api v0.4.2/go.mod h1:qrVgOp7DIeAXa+Tt5dDjOC47bZCDrwx8ZHxrmy7STNE= -cosmossdk.io/client/v2 v2.0.0-20230309163709-87da587416ba h1:LuPHCncU2KLMNPItFECs709uo46I9wSu2fAWYVCx+/U= -cosmossdk.io/client/v2 v2.0.0-20230309163709-87da587416ba/go.mod h1:SXdwqO7cN5htalh/lhXWP8V4zKtBrhhcSTU+ytuEtmM= -cosmossdk.io/collections v0.2.0 h1:CgMfLtE16+qox3zBYrGh60i4yKV8SeExLnIdOS2sbQs= -cosmossdk.io/collections v0.2.0/go.mod h1:Oc1FK0vlmxJZsgUn9/o3ldE6zNyWKvobVzaLhWknZJE= -cosmossdk.io/core v0.8.0 h1:LcJnu52E1a8f8E317VfQ1xK/RZe+IuhMNQAjnDLh25M= -cosmossdk.io/core v0.8.0/go.mod h1:LF6VLOv2DdCiaHxYVmr0MZcZpaSM9ZgvyrQSYTeg6D0= -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.0.20230524212735-6cabb6aa5741 h1:BCRz06fvddw7cKGiEGDiSox3qMsjQ97f92K+PDZDHdc= -cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741/go.mod h1:TB05o6YXkZkzsc+6bZFAV5kZRBtoCU9tUkbeMIqEg0w= -cosmossdk.io/log v1.1.0 h1:v0ogPHYeTzPcBTcPR1A3j1hkei4pZama8kz8LKlCMv0= -cosmossdk.io/log v1.1.0/go.mod h1:6zjroETlcDs+mm62gd8Ig7mZ+N+fVOZS91V17H+M4N4= -cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c h1:A+FMPW9GtfcPBDQNtFeDFN27h1SAP6OVjnGgPLlYXmI= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c/go.mod h1:RbYGvXCbz8uNBCXrwS9Z8SyydeWi+W5x5MZ33muyzMw= +cosmossdk.io/api v0.7.6 h1:PC20PcXy1xYKH2KU4RMurVoFjjKkCgYRbVAD4PdqUuY= +cosmossdk.io/api v0.7.6/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/client/v2 v2.0.0-beta.5 h1:0LVv3nEByn//hFDIrYLs2WvsEU3HodOelh4SDHnA/1I= +cosmossdk.io/client/v2 v2.0.0-beta.5/go.mod h1:4p0P6o0ro+FizakJUYS9SeM94RNbv0thLmkHRw5o5as= +cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= +cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= +cosmossdk.io/core v0.11.1 h1:h9WfBey7NAiFfIcUhDVNS503I2P2HdZLebJlUIs8LPA= +cosmossdk.io/core v0.11.1/go.mod h1:OJzxcdC+RPrgGF8NJZR2uoQr56tc7gfBKhiKeDO7hH0= +cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E= +cosmossdk.io/depinject v1.1.0/go.mod h1:kkI5H9jCGHeKeYWXTqYdruogYrEeWvBQCw1Pj4/eCFI= +cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= +cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= +cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= +cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= +cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= +cosmossdk.io/store v1.1.1 h1:NA3PioJtWDVU7cHHeyvdva5J/ggyLDkyH0hGHl2804Y= +cosmossdk.io/store v1.1.1/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= +cosmossdk.io/x/circuit v0.1.1 h1:KPJCnLChWrxD4jLwUiuQaf5mFD/1m7Omyo7oooefBVQ= +cosmossdk.io/x/circuit v0.1.1/go.mod h1:B6f/urRuQH8gjt4eLIXfZJucrbreuYrKh5CSjaOxr+Q= +cosmossdk.io/x/evidence v0.1.1 h1:Ks+BLTa3uftFpElLTDp9L76t2b58htjVbSZ86aoK/E4= +cosmossdk.io/x/evidence v0.1.1/go.mod h1:OoDsWlbtuyqS70LY51aX8FBTvguQqvFrt78qL7UzeNc= +cosmossdk.io/x/feegrant v0.1.1 h1:EKFWOeo/pup0yF0svDisWWKAA9Zags6Zd0P3nRvVvw8= +cosmossdk.io/x/feegrant v0.1.1/go.mod h1:2GjVVxX6G2fta8LWj7pC/ytHjryA6MHAJroBWHFNiEQ= +cosmossdk.io/x/nft v0.1.1 h1:pslAVS8P5NkW080+LWOamInjDcq+v2GSCo+BjN9sxZ8= +cosmossdk.io/x/nft v0.1.1/go.mod h1:Kac6F6y2gsKvoxU+fy8uvxRTi4BIhLOor2zgCNQwVgY= +cosmossdk.io/x/tx v0.13.5 h1:FdnU+MdmFWn1pTsbfU0OCf2u6mJ8cqc1H4OMG418MLw= +cosmossdk.io/x/tx v0.13.5/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w= +cosmossdk.io/x/upgrade v0.1.4 h1:/BWJim24QHoXde8Bc64/2BSEB6W4eTydq0X/2f8+g38= +cosmossdk.io/x/upgrade v0.1.4/go.mod h1:9v0Aj+fs97O+Ztw+tG3/tp5JSlrmT7IcFhAebQHmOPo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= +github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -246,8 +250,6 @@ github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= @@ -256,7 +258,6 @@ github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX github.com/aws/aws-sdk-go v1.44.224 h1:09CiaaF35nRmxrzWZ2uRq5v6Ghg/d2RiPjZnSgtt+RQ= github.com/aws/aws-sdk-go v1.44.224/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -267,16 +268,19 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.7.0 h1:YjAGVd3XmtK9ktAbX8Zg2g2PwLIMjGREZJHlV4j7NEo= -github.com/bits-and-blooms/bitset v1.7.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= -github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= -github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= -github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= +github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= +github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ= +github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c= +github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= -github.com/bufbuild/protocompile v0.5.1 h1:mixz5lJX4Hiz4FpqFREJHIXLfaLBntfaJv1h+/jS+Qg= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= +github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= -github.com/bytedance/sonic v1.8.0 h1:ea0Xadu+sHlu7x5O3gKhRpQ1IKiMrSiHttPF0ybECuA= -github.com/bytedance/sonic v1.8.0/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= +github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= +github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -287,8 +291,8 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA 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.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= @@ -317,27 +321,28 @@ github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230606202032-d96868fd481e h1:6QuLTQCQZueVNzoYYUuFfaRgBOpj6gIwQA1PZT2rfWM= -github.com/cockroachdb/pebble v0.0.0-20230606202032-d96868fd481e/go.mod h1:TkdVsGYRqtULUppt2RbC+YaKtTHnHoWa2apfFrSKABw= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/redact v1.1.4 h1:Y0XrVI2FAyofNyGveodTN//qdpPtFKcKTeCBsK3AHAQ= -github.com/cockroachdb/redact v1.1.4/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= +github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/cometbft/cometbft v0.38.0-rc1 h1:ph6smlqX82aH+d72KuxDHqu29M7LyusSp/obfGsGX/w= -github.com/cometbft/cometbft v0.38.0-rc1/go.mod h1:5Jz0Z8YsHSf0ZaAqGvi/ifioSdVFPtEGrm8Y9T/993k= -github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= -github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= +github.com/cometbft/cometbft v0.38.12 h1:OWsLZN2KcSSFe8bet9xCn07VwhBnavPea3VyPnNq1bg= +github.com/cometbft/cometbft v0.38.12/go.mod h1:GPHp3/pehPqgX1930HmK1BpBLZPxB75v/dZg8Viwy+o= +github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= +github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/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= @@ -346,43 +351,42 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= -github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= -github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= -github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= +github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= +github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cosmos/iavl v1.0.0-beta.2 h1:XOsIM80Yyml/KifCXEYOy9tWCXwMAbLa91n6pReW07Y= -github.com/cosmos/iavl v1.0.0-beta.2/go.mod h1:EA97dJ07TBktRlG/iGzK6g1eCXNj1q3MGoFYkVzrwHE= -github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= -github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= +github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= +github.com/cosmos/iavl v1.2.0 h1:kVxTmjTh4k0Dh1VNL046v6BXqKziqMDzxo93oh3kOfM= +github.com/cosmos/iavl v1.2.0/go.mod h1:HidWWLVAtODJqFD6Hbne2Y0q3SdxByJepHUOeoH4LiI= +github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= +github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo= github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -github.com/cosmos/ledger-cosmos-go v0.13.0 h1:ex0CvCxToSR7j5WjrghPu2Bu9sSXKikjnVvUryNnx4s= -github.com/cosmos/ledger-cosmos-go v0.13.0/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew 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/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= 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= @@ -393,20 +397,21 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUn 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/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= -github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= +github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/emicklei/dot v1.4.2 h1:UbK6gX4yvrpHKlxuUQicwoAis4zl8Dzwit9SnbBAXWw= -github.com/emicklei/dot v1.4.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= +github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -418,40 +423,35 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -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/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= -github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= 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/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.21.0 h1:c9l5F1nPF30JIppulk4veau90PK6Smu3abgVtVQWon4= -github.com/getsentry/sentry-go v0.21.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= +github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.9.0 h1:OjyFBKICoexlu99ctXNR2gg+c5pKrKMuyjgARg9qeY8= -github.com/gin-gonic/gin v1.9.0/go.mod h1:W1Me9+hsUSyj3CePGrd1/QrKJMSJ1Tu/0hFEH89961k= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= +github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -468,14 +468,18 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU= -github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s= +github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= +github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= 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= @@ -485,13 +489,11 @@ github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/goccy/go-json v0.10.0 h1:mXKd9Qw4NuzShiRlOXKews24ufknHO7gx30lsDyokKA= -github.com/goccy/go-json v0.10.0/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -502,11 +504,9 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV 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/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/glog v1.2.2 h1:1+mZ9upx1Dh6FmUTFR1naJ77miKiXgALjWOZ3NVFPmY= +github.com/golang/glog v1.2.2/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -541,13 +541,12 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 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/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -566,18 +565,20 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -589,7 +590,6 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -597,17 +597,18 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.3 h1:FAgZmpLl/SXurPEZyCMPBIiiYeTbqfjlbdnCNTAkbGE= -github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= -github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -617,10 +618,9 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.8.0 h1:UBtEZqx1bjXtOQ5BVTkuYghXrr3N4V123VKJK67vJZc= -github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= +github.com/googleapis/gax-go/v2 v2.12.3 h1:5/zPPDvw8Q1SuXjrqrZslrqT7dL/uJT2CQii/cLCKqA= +github.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBHwWRvkNFJUQcS4= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= @@ -631,8 +631,8 @@ github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= @@ -650,17 +650,19 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= -github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-getter v1.7.4 h1:3yQjWuxICvSpYwqSayAdKRFcvBl1y/vogCxczWSmix0= +github.com/hashicorp/go-getter v1.7.4/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= +github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v1.4.10 h1:xUbmA4jC6Dq163/fWcp8P3JuHilrHHMLNRxzGQJ9hNk= -github.com/hashicorp/go-plugin v1.4.10/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= @@ -676,8 +678,10 @@ github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -694,24 +698,18 @@ github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0Jr github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= -github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -733,53 +731,39 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= 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.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= -github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid v1.2.1 h1:vJi+O/nMdFt0vqm8NZBI6wzALWdA2X+egi0ogNyrC/w= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= +github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= -github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= -github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= +github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= -github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.0 h1:H4L/LhP7GOMf1j17oQAElHgVlbEje2h14A8Tz9cM2BE= -github.com/linxGnu/grocksdb v1.8.0/go.mod h1:09CeBborffXhXdNpEcOeZrLKEnRtrZFEpFdPNI9Zjjg= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= @@ -787,31 +771,21 @@ github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3v github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= @@ -835,9 +809,10 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -853,8 +828,8 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA 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/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce h1:/pEpMk55wH0X+E5zedGEMOdLuWmV8P4+4W3+LZaM6kg= -github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= @@ -862,7 +837,6 @@ github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DV 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.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= @@ -874,10 +848,14 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -887,19 +865,20 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 h1:W04oB3d0J01W5jgYRGKsV8LCM6g9EkCvPkZcmFuy0OE= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= @@ -910,9 +889,9 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -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/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -920,103 +899,102 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/prometheus/client_golang v1.20.1 h1:IMJXHOD6eARkQpxo8KkhgEVFlBNm+nkrFUyGlIu7Na8= +github.com/prometheus/client_golang v1.20.1/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= -github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= 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/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= 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.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= 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= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= +github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/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/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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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= @@ -1027,62 +1005,46 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= -github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.9 h1:rmenucSohSTiyL09Y+l2OCk+FrMxGMzho2+tjr5ticU= -github.com/ugorji/go/codec v1.2.9/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= +github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= -github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= -github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= -go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/bbolt v1.3.10 h1:+BqfJTcCzTItrop8mq/lbzL8wSGtj94UO/3U31shqG0= +go.etcd.io/bbolt v1.3.10/go.mod h1:bK3UQLPJZly7IlNmV7uVHJDxfe5aK9Ll93e/74Y9oEQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1095,6 +1057,18 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw= +go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1104,12 +1078,15 @@ go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -golang.org/x/arch v0.0.0-20210923205945-b76863e36670 h1:18EFjUmQOcUvxNYSkA6jO9VAiXCnxFY6NyDX0bHDmkU= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= +golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1118,17 +1095,13 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1140,8 +1113,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-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= 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= @@ -1168,7 +1141,9 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1180,7 +1155,6 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -1190,7 +1164,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1211,7 +1184,6 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= @@ -1219,8 +1191,6 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -1233,10 +1203,11 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1262,8 +1233,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= -golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= +golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= +golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1278,8 +1249,9 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1291,7 +1263,6 @@ golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1301,7 +1272,6 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1337,14 +1307,11 @@ golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7w 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-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1357,7 +1324,6 @@ golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1375,24 +1341,26 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1404,26 +1372,26 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -1471,7 +1439,6 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f 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= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= @@ -1479,7 +1446,9 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= 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= @@ -1487,8 +1456,9 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -1538,8 +1508,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.122.0 h1:zDobeejm3E7pEG1mNHvdxvjs5XJoCMzyNH+CmwL94Es= -google.golang.org/api v0.122.0/go.mod h1:gcitW0lvnyWjSp9nKxAbdHKIZ6vF4aajGueeslZOyms= +google.golang.org/api v0.171.0 h1:w174hnBPqut76FzW5Qaupt7zY8Kql6fiVjgys4f58sU= +google.golang.org/api v0.171.0/go.mod h1:Hnq5AHm4OTMt2BUVjael2CWZFD6vksJdWCWiUAmjC9o= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1547,9 +1517,7 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1588,10 +1556,8 @@ google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1658,13 +1624,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 h1:x1vNwUhVOcsYoKyEGCZBH694SBmmBjA2EfauFVEI2+M= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a h1:HiYVD+FGJkTo+9zj1gqz0anapsa1JxjiSrN+BJKyUmE= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f h1:cUMEy+8oS78BWIH9OWazBkzbr090Od9tWBNtZHkOhf0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1706,8 +1671,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1724,8 +1689,9 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1738,10 +1704,8 @@ gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= @@ -1756,13 +1720,12 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1773,13 +1736,13 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -pgregory.net/rapid v0.6.2 h1:ErW5sL+UKtfBfUTsWHDCoeB+eZKLKMxrSd1VJY6W4bw= -pgregory.net/rapid v0.6.2/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/tests/integration/auth/client/cli/suite_test.go b/tests/integration/auth/client/cli/suite_test.go index 64a5b6e7ae30..290568b705f5 100644 --- a/tests/integration/auth/client/cli/suite_test.go +++ b/tests/integration/auth/client/cli/suite_test.go @@ -7,12 +7,12 @@ import ( "strings" "testing" - "cosmossdk.io/math" abci "github.com/cometbft/cometbft/abci/types" rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" "github.com/stretchr/testify/suite" "cosmossdk.io/core/address" + "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" @@ -30,7 +30,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth" authcli "github.com/cosmos/cosmos-sdk/x/auth/client/cli" authtestutil "github.com/cosmos/cosmos-sdk/x/auth/client/testutil" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/bank" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" @@ -169,6 +168,65 @@ func (s *CLITestSuite) TestCLISignBatch() { s.Require().EqualError(err, "required flag(s) \"sequence\" not set") } +func (s *CLITestSuite) TestCLISignBatchTotalFees() { + txCfg := s.clientCtx.TxConfig + s.clientCtx.HomeDir = strings.Replace(s.clientCtx.HomeDir, "simd", "simcli", 1) + + testCases := []struct { + name string + args []string + numTransactions int + denom string + }{ + { + "Offline batch-sign one transaction", + []string{"--offline", "--account-number", "1", "--sequence", "1", "--append"}, + 1, + "stake", + }, + { + "Offline batch-sign two transactions", + []string{"--offline", "--account-number", "1", "--sequence", "1", "--append"}, + 2, + "stake", + }, + } + + for _, tc := range testCases { + s.Run(tc.name, func() { + // Create multiple transactions and write them to separate files + sendTokens := sdk.NewCoin(tc.denom, sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction)) + expectedBatchedTotalFee := int64(0) + txFiles := make([]string, tc.numTransactions) + for i := 0; i < tc.numTransactions; i++ { + tx, err := s.createBankMsg(s.clientCtx, s.val, + sdk.NewCoins(sendTokens), fmt.Sprintf("--%s=true", flags.FlagGenerateOnly)) + s.Require().NoError(err) + txFile := testutil.WriteToNewTempFile(s.T(), tx.String()) + defer txFile.Close() + txFiles[i] = txFile.Name() + + unsignedTx, err := txCfg.TxJSONDecoder()(tx.Bytes()) + s.Require().NoError(err) + txBuilder, err := txCfg.WrapTxBuilder(unsignedTx) + s.Require().NoError(err) + expectedBatchedTotalFee += txBuilder.GetTx().GetFee().AmountOf(tc.denom).Int64() + } + + // Test batch sign + batchSignArgs := append([]string{fmt.Sprintf("--from=%s", s.val.String())}, append(txFiles, tc.args...)...) + signedTx, err := clitestutil.ExecTestCLICmd(s.clientCtx, authcli.GetSignBatchCommand(), batchSignArgs) + s.Require().NoError(err) + signedFinalTx, err := txCfg.TxJSONDecoder()(signedTx.Bytes()) + s.Require().NoError(err) + txBuilder, err := txCfg.WrapTxBuilder(signedFinalTx) + s.Require().NoError(err) + finalTotalFee := txBuilder.GetTx().GetFee() + s.Require().Equal(expectedBatchedTotalFee, finalTotalFee.AmountOf(tc.denom).Int64()) + }) + } +} + func (s *CLITestSuite) TestCLIQueryTxCmdByHash() { sendTokens := sdk.NewInt64Coin("stake", 10) @@ -818,43 +876,6 @@ func (s *CLITestSuite) TestGetBroadcastCommandWithoutOfflineFlag() { s.Require().Contains(out.String(), "connect: connection refused") } -func (s *CLITestSuite) TestQueryParamsCmd() { - testCases := []struct { - name string - args []string - expectErr bool - }{ - { - "happy case", - []string{fmt.Sprintf("--%s=json", flags.FlagOutput)}, - false, - }, - { - "with specific height", - []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=json", flags.FlagOutput)}, - false, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := authcli.QueryParamsCmd() - clientCtx := s.clientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - s.Require().NotEqual("internal", err.Error()) - } else { - var authParams authtypes.Params - s.Require().NoError(s.clientCtx.Codec.UnmarshalJSON(out.Bytes(), &authParams)) - s.Require().NotNil(authParams.MaxMemoCharacters) - } - }) - } -} - // TestTxWithoutPublicKey makes sure sending a proto tx message without the // public key doesn't cause any error in the RPC layer (broadcast). // See https://github.com/cosmos/cosmos-sdk/issues/7585 for more details. @@ -1242,13 +1263,6 @@ func (s *CLITestSuite) TestAuxToFeeWithTips() { genTxFile := testutil.WriteToNewTempFile(s.T(), string(res.Bytes())) defer genTxFile.Close() - // broadcast the tx - res, err = authtestutil.TxAuxToFeeExec( - s.clientCtx, - genTxFile.Name(), - tc.feePayerArgs..., - ) - switch { case tc.expectErrBroadCast: require.Error(err) @@ -1280,11 +1294,11 @@ func (s *CLITestSuite) TestAuxToFeeWithTips() { } func (s *CLITestSuite) getBalances(clientCtx client.Context, addr sdk.AccAddress, denom string) math.Int { - resp, err := clitestutil.QueryBalancesExec(clientCtx, addr, s.ac) + resp, err := testutil.GetRequest(fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s/by_denom?denom=%s", s.baseCtx.NodeURI, addr.String(), denom)) s.Require().NoError(err) var balRes banktypes.QueryAllBalancesResponse - err = clientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) + err = clientCtx.Codec.UnmarshalJSON(resp, &balRes) s.Require().NoError(err) startTokens := balRes.Balances.AmountOf(denom) return startTokens diff --git a/tests/integration/bank/keeper/deterministic_test.go b/tests/integration/bank/keeper/deterministic_test.go index 92e7c03cef41..86bce291117c 100644 --- a/tests/integration/bank/keeper/deterministic_test.go +++ b/tests/integration/bank/keeper/deterministic_test.go @@ -7,9 +7,12 @@ import ( "gotest.tools/v3/assert" "pgregory.net/rapid" + "cosmossdk.io/core/appmodule" "cosmossdk.io/log" + "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil/integration" "github.com/cosmos/cosmos-sdk/testutil/testdata" @@ -18,15 +21,14 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/bank" "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/tx/config" _ "github.com/cosmos/cosmos-sdk/x/consensus" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" _ "github.com/cosmos/cosmos-sdk/x/params" _ "github.com/cosmos/cosmos-sdk/x/staking" ) @@ -34,7 +36,7 @@ import ( var ( denomRegex = sdk.DefaultCoinDenomRegex() addr1 = sdk.MustAccAddressFromBech32("cosmos139f7kncmglres2nf3h4hc4tade85ekfr8sulz5") - coin1 = sdk.NewCoin("denom", sdk.NewInt(10)) + coin1 = sdk.NewCoin("denom", math.NewInt(10)) metadataAtom = banktypes.Metadata{ Description: "The native staking token of the Cosmos Hub.", DenomUnits: []*banktypes.DenomUnit{ @@ -80,6 +82,7 @@ func initDeterministicFixture(t *testing.T) *deterministicFixture { runtime.NewKVStoreService(keys[authtypes.StoreKey]), authtypes.ProtoBaseAccount, maccPerms, + addresscodec.NewBech32Codec(sdk.Bech32MainPrefix), sdk.Bech32MainPrefix, authority.String(), ) @@ -99,7 +102,10 @@ func initDeterministicFixture(t *testing.T) *deterministicFixture { authModule := auth.NewAppModule(cdc, accountKeeper, authsims.RandomGenesisAccounts, nil) bankModule := bank.NewAppModule(cdc, bankKeeper, accountKeeper, nil) - integrationApp := integration.NewIntegrationApp(newCtx, logger, keys, cdc, authModule, bankModule) + integrationApp := integration.NewIntegrationApp(newCtx, logger, keys, cdc, map[string]appmodule.AppModule{ + authtypes.ModuleName: authModule, + banktypes.ModuleName: bankModule, + }) sdkCtx := sdk.UnwrapSDKContext(integrationApp.Context()) @@ -127,7 +133,7 @@ func fundAccount(f *deterministicFixture, addr sdk.AccAddress, coin ...sdk.Coin) func getCoin(rt *rapid.T) sdk.Coin { return sdk.NewCoin( rapid.StringMatching(denomRegex).Draw(rt, "denom"), - sdk.NewInt(rapid.Int64Min(1).Draw(rt, "amount")), + math.NewInt(rapid.Int64Min(1).Draw(rt, "amount")), ) } @@ -173,8 +179,8 @@ func TestGRPCQueryAllBalances(t *testing.T) { }) coins := sdk.NewCoins( - sdk.NewCoin("stake", sdk.NewInt(10)), - sdk.NewCoin("denom", sdk.NewInt(100)), + sdk.NewCoin("stake", math.NewInt(10)), + sdk.NewCoin("denom", math.NewInt(100)), ) fundAccount(f, addr1, coins...) @@ -196,7 +202,7 @@ func TestGRPCQuerySpendableBalances(t *testing.T) { for _, denom := range denoms { coin := sdk.NewCoin( denom, - sdk.NewInt(rapid.Int64Min(1).Draw(rt, "amount")), + math.NewInt(rapid.Int64Min(1).Draw(rt, "amount")), ) // NewCoins sorts the denoms @@ -211,8 +217,8 @@ func TestGRPCQuerySpendableBalances(t *testing.T) { }) coins := sdk.NewCoins( - sdk.NewCoin("stake", sdk.NewInt(10)), - sdk.NewCoin("denom", sdk.NewInt(100)), + sdk.NewCoin("stake", math.NewInt(10)), + sdk.NewCoin("denom", math.NewInt(100)), ) err := banktestutil.FundAccount(f.ctx, f.bankKeeper, addr1, coins) @@ -237,7 +243,7 @@ func TestGRPCQueryTotalSupply(t *testing.T) { for i := 0; i < numCoins; i++ { coin := sdk.NewCoin( rapid.StringMatching(denomRegex).Draw(rt, "denom"), - sdk.NewInt(rapid.Int64Min(1).Draw(rt, "amount")), + math.NewInt(rapid.Int64Min(1).Draw(rt, "amount")), ) coins = coins.Add(coin) @@ -257,8 +263,8 @@ func TestGRPCQueryTotalSupply(t *testing.T) { f = initDeterministicFixture(t) // reset coins := sdk.NewCoins( - sdk.NewCoin("foo", sdk.NewInt(10)), - sdk.NewCoin("bar", sdk.NewInt(100)), + sdk.NewCoin("foo", math.NewInt(10)), + sdk.NewCoin("bar", math.NewInt(100)), ) assert.NilError(t, f.bankKeeper.MintCoins(f.ctx, minttypes.ModuleName, coins)) @@ -274,7 +280,7 @@ func TestGRPCQueryTotalSupplyOf(t *testing.T) { rapid.Check(t, func(rt *rapid.T) { coin := sdk.NewCoin( rapid.StringMatching(denomRegex).Draw(rt, "denom"), - sdk.NewInt(rapid.Int64Min(1).Draw(rt, "amount")), + math.NewInt(rapid.Int64Min(1).Draw(rt, "amount")), ) assert.NilError(t, f.bankKeeper.MintCoins(f.ctx, minttypes.ModuleName, sdk.NewCoins(coin))) @@ -283,7 +289,7 @@ func TestGRPCQueryTotalSupplyOf(t *testing.T) { testdata.DeterministicIterations(f.ctx, t, req, f.queryClient.SupplyOf, 0, true) }) - coin := sdk.NewCoin("bar", sdk.NewInt(100)) + coin := sdk.NewCoin("bar", math.NewInt(100)) assert.NilError(t, f.bankKeeper.MintCoins(f.ctx, minttypes.ModuleName, sdk.NewCoins(coin))) req := &banktypes.QuerySupplyOfRequest{Denom: coin.GetDenom()} @@ -476,7 +482,7 @@ func TestGRPCDenomOwners(t *testing.T) { coin := sdk.NewCoin( denom, - sdk.NewInt(rapid.Int64Min(1).Draw(rt, "amount")), + math.NewInt(rapid.Int64Min(1).Draw(rt, "amount")), ) err := banktestutil.FundAccount(f.ctx, f.bankKeeper, addr, sdk.NewCoins(coin)) diff --git a/tests/integration/distribution/keeper/grpc_query_test.go b/tests/integration/distribution/keeper/grpc_query_test.go index 61799034ac6e..a12dedfd2d3a 100644 --- a/tests/integration/distribution/keeper/grpc_query_test.go +++ b/tests/integration/distribution/keeper/grpc_query_test.go @@ -4,9 +4,10 @@ import ( "fmt" "testing" - "cosmossdk.io/math" "gotest.tools/v3/assert" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/x/distribution/types" @@ -45,7 +46,7 @@ func TestGRPCParams(t *testing.T) { name: "valid request", malleate: func() { params = types.Params{ - CommunityTax: sdk.NewDecWithPrec(3, 1), + CommunityTax: math.LegacyNewDecWithPrec(3, 1), BaseProposerReward: math.LegacyZeroDec(), BonusProposerReward: math.LegacyZeroDec(), WithdrawAddrEnabled: true, @@ -96,8 +97,8 @@ func TestGRPCValidatorOutstandingRewards(t *testing.T) { initialStake := int64(10) tstaking := stakingtestutil.NewHelper(t, f.sdkCtx, f.stakingKeeper) - tstaking.Commission = stakingtypes.NewCommissionRates(sdk.NewDecWithPrec(5, 1), sdk.NewDecWithPrec(5, 1), math.LegacyNewDec(0)) - tstaking.CreateValidator(f.valAddr, valConsPk0, sdk.NewInt(initialStake), true) + tstaking.Commission = stakingtypes.NewCommissionRates(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)) + tstaking.CreateValidator(f.valAddr, valConsPk0, math.NewInt(initialStake), true) // set outstanding rewards err := f.distrKeeper.SetValidatorOutstandingRewards(f.sdkCtx, f.valAddr, types.ValidatorOutstandingRewards{Rewards: valCommission}) @@ -168,8 +169,8 @@ func TestGRPCValidatorCommission(t *testing.T) { initialStake := int64(10) tstaking := stakingtestutil.NewHelper(t, f.sdkCtx, f.stakingKeeper) - tstaking.Commission = stakingtypes.NewCommissionRates(sdk.NewDecWithPrec(5, 1), sdk.NewDecWithPrec(5, 1), math.LegacyNewDec(0)) - tstaking.CreateValidator(f.valAddr, valConsPk0, sdk.NewInt(initialStake), true) + tstaking.Commission = stakingtypes.NewCommissionRates(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)) + tstaking.CreateValidator(f.valAddr, valConsPk0, math.NewInt(initialStake), true) commission := sdk.DecCoins{sdk.DecCoin{Denom: "token1", Amount: math.LegacyNewDec(4)}, {Denom: "token2", Amount: math.LegacyNewDec(2)}} assert.NilError(t, f.distrKeeper.SetValidatorAccumulatedCommission(f.sdkCtx, f.valAddr, types.ValidatorAccumulatedCommission{Commission: commission})) @@ -227,10 +228,10 @@ func TestGRPCValidatorSlashes(t *testing.T) { valAddr2 := sdk.ValAddress(addr2) slashes := []types.ValidatorSlashEvent{ - types.NewValidatorSlashEvent(3, sdk.NewDecWithPrec(5, 1)), - types.NewValidatorSlashEvent(5, sdk.NewDecWithPrec(5, 1)), - types.NewValidatorSlashEvent(7, sdk.NewDecWithPrec(5, 1)), - types.NewValidatorSlashEvent(9, sdk.NewDecWithPrec(5, 1)), + types.NewValidatorSlashEvent(3, math.LegacyNewDecWithPrec(5, 1)), + types.NewValidatorSlashEvent(5, math.LegacyNewDecWithPrec(5, 1)), + types.NewValidatorSlashEvent(7, math.LegacyNewDecWithPrec(5, 1)), + types.NewValidatorSlashEvent(9, math.LegacyNewDecWithPrec(5, 1)), } for i, slash := range slashes { @@ -498,8 +499,8 @@ func TestGRPCDelegationRewards(t *testing.T) { initialStake := int64(10) tstaking := stakingtestutil.NewHelper(t, f.sdkCtx, f.stakingKeeper) - tstaking.Commission = stakingtypes.NewCommissionRates(sdk.NewDecWithPrec(5, 1), sdk.NewDecWithPrec(5, 1), math.LegacyNewDec(0)) - tstaking.CreateValidator(f.valAddr, valConsPk0, sdk.NewInt(initialStake), true) + tstaking.Commission = stakingtypes.NewCommissionRates(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)) + tstaking.CreateValidator(f.valAddr, valConsPk0, math.NewInt(initialStake), true) val, found := f.stakingKeeper.GetValidator(f.sdkCtx, f.valAddr) assert.Assert(t, found) @@ -507,14 +508,16 @@ func TestGRPCDelegationRewards(t *testing.T) { // setup delegation delTokens := sdk.TokensFromConsensusPower(2, sdk.DefaultPowerReduction) validator, issuedShares := val.AddTokensFromDel(delTokens) - delegation := stakingtypes.NewDelegation(delAddr, f.valAddr, issuedShares) - f.stakingKeeper.SetDelegation(f.sdkCtx, delegation) - assert.NilError(t, f.distrKeeper.SetDelegatorStartingInfo(f.sdkCtx, validator.GetOperator(), delAddr, types.NewDelegatorStartingInfo(2, math.LegacyNewDec(initialStake), 20))) + delegation := stakingtypes.NewDelegation(delAddr.String(), f.valAddr.String(), issuedShares) + assert.NilError(t, f.stakingKeeper.SetDelegation(f.sdkCtx, delegation)) + valBz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) + assert.NilError(t, err) + assert.NilError(t, f.distrKeeper.SetDelegatorStartingInfo(f.sdkCtx, valBz, delAddr, types.NewDelegatorStartingInfo(2, math.LegacyNewDec(initialStake), 20))) // setup validator rewards decCoins := sdk.DecCoins{sdk.NewDecCoinFromDec(sdk.DefaultBondDenom, math.LegacyOneDec())} historicalRewards := types.NewValidatorHistoricalRewards(decCoins, 2) - assert.NilError(t, f.distrKeeper.SetValidatorHistoricalRewards(f.sdkCtx, validator.GetOperator(), 2, historicalRewards)) + assert.NilError(t, f.distrKeeper.SetValidatorHistoricalRewards(f.sdkCtx, valBz, 2, historicalRewards)) // setup current rewards and outstanding rewards currentRewards := types.NewValidatorCurrentRewards(decCoins, 3) assert.NilError(t, f.distrKeeper.SetValidatorCurrentRewards(f.sdkCtx, f.valAddr, currentRewards)) diff --git a/tests/integration/distribution/keeper/msg_server_test.go b/tests/integration/distribution/keeper/msg_server_test.go index b13c708263c6..fbb883da63bc 100644 --- a/tests/integration/distribution/keeper/msg_server_test.go +++ b/tests/integration/distribution/keeper/msg_server_test.go @@ -4,16 +4,18 @@ import ( "fmt" "testing" - "cosmossdk.io/log" - "cosmossdk.io/math" - storetypes "cosmossdk.io/store/types" - "github.com/stretchr/testify/require" - cmtabcitypes "github.com/cometbft/cometbft/abci/types" "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/stretchr/testify/require" "gotest.tools/v3/assert" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/log" + "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil/integration" sdk "github.com/cosmos/cosmos-sdk/types" @@ -79,6 +81,7 @@ func initFixture(t testing.TB) *fixture { runtime.NewKVStoreService(keys[authtypes.StoreKey]), authtypes.ProtoBaseAccount, maccPerms, + addresscodec.NewBech32Codec(sdk.Bech32MainPrefix), sdk.Bech32MainPrefix, authority.String(), ) @@ -95,7 +98,7 @@ func initFixture(t testing.TB) *fixture { log.NewNopLogger(), ) - stakingKeeper := stakingkeeper.NewKeeper(cdc, keys[stakingtypes.StoreKey], accountKeeper, bankKeeper, authority.String()) + stakingKeeper := stakingkeeper.NewKeeper(cdc, runtime.NewKVStoreService(keys[stakingtypes.StoreKey]), accountKeeper, bankKeeper, authority.String(), addresscodec.NewBech32Codec(sdk.Bech32PrefixValAddr), addresscodec.NewBech32Codec(sdk.Bech32PrefixConsAddr)) distrKeeper := distrkeeper.NewKeeper( cdc, runtime.NewKVStoreService(keys[distrtypes.StoreKey]), accountKeeper, bankKeeper, stakingKeeper, distrtypes.ModuleName, authority.String(), @@ -121,7 +124,12 @@ func initFixture(t testing.TB) *fixture { }, }) - integrationApp := integration.NewIntegrationApp(ctx, logger, keys, cdc, authModule, bankModule, stakingModule, distrModule) + integrationApp := integration.NewIntegrationApp(ctx, logger, keys, cdc, map[string]appmodule.AppModule{ + authtypes.ModuleName: authModule, + banktypes.ModuleName: bankModule, + stakingtypes.ModuleName: stakingModule, + distrtypes.ModuleName: distrModule, + }) sdkCtx := sdk.UnwrapSDKContext(integrationApp.Context()) @@ -164,14 +172,14 @@ func TestMsgWithdrawDelegatorReward(t *testing.T) { } // setup staking validator - validator, err := stakingtypes.NewValidator(f.valAddr, PKS[0], stakingtypes.Description{}) + validator, err := stakingtypes.NewValidator(f.valAddr.String(), PKS[0], stakingtypes.Description{}) assert.NilError(t, err) commission := stakingtypes.NewCommission(math.LegacyZeroDec(), math.LegacyOneDec(), math.LegacyOneDec()) validator, err = validator.SetInitialCommission(commission) assert.NilError(t, err) validator.DelegatorShares = math.LegacyNewDec(100) - validator.Tokens = sdk.NewInt(1000000) - f.stakingKeeper.SetValidator(f.sdkCtx, validator) + validator.Tokens = math.NewInt(1000000) + assert.NilError(t, f.stakingKeeper.SetValidator(f.sdkCtx, validator)) // set module account coins initTokens := f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, int64(1000)) @@ -186,14 +194,16 @@ func TestMsgWithdrawDelegatorReward(t *testing.T) { // setup delegation delTokens := sdk.TokensFromConsensusPower(2, sdk.DefaultPowerReduction) validator, issuedShares := validator.AddTokensFromDel(delTokens) - delegation := stakingtypes.NewDelegation(delAddr, validator.GetOperator(), issuedShares) - f.stakingKeeper.SetDelegation(f.sdkCtx, delegation) - err = f.distrKeeper.SetDelegatorStartingInfo(f.sdkCtx, validator.GetOperator(), delAddr, distrtypes.NewDelegatorStartingInfo(2, math.LegacyOneDec(), 20)) + + valBz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) require.NoError(t, err) + delegation := stakingtypes.NewDelegation(delAddr.String(), validator.GetOperator(), issuedShares) + require.NoError(t, f.stakingKeeper.SetDelegation(f.sdkCtx, delegation)) + require.NoError(t, f.distrKeeper.SetDelegatorStartingInfo(f.sdkCtx, valBz, delAddr, distrtypes.NewDelegatorStartingInfo(2, math.LegacyOneDec(), 20))) // setup validator rewards decCoins := sdk.DecCoins{sdk.NewDecCoinFromDec(sdk.DefaultBondDenom, math.LegacyOneDec())} historicalRewards := distrtypes.NewValidatorHistoricalRewards(decCoins, 2) - err = f.distrKeeper.SetValidatorHistoricalRewards(f.sdkCtx, validator.GetOperator(), 2, historicalRewards) + err = f.distrKeeper.SetValidatorHistoricalRewards(f.sdkCtx, valBz, 2, historicalRewards) require.NoError(t, err) // setup current rewards and outstanding rewards currentRewards := distrtypes.NewValidatorCurrentRewards(decCoins, 3) @@ -244,7 +254,7 @@ func TestMsgWithdrawDelegatorReward(t *testing.T) { ValidatorAddress: f.valAddr.String(), }, expErr: true, - expErrMsg: "no delegation distribution info", + expErrMsg: "no delegation for (address, validator) tuple", }, { name: "validator with no delegations", @@ -253,7 +263,7 @@ func TestMsgWithdrawDelegatorReward(t *testing.T) { ValidatorAddress: sdk.ValAddress(sdk.AccAddress(PKS[2].Address())).String(), }, expErr: true, - expErrMsg: "no validator distribution info", + expErrMsg: "validator does not exist", }, { name: "valid msg", @@ -266,8 +276,8 @@ func TestMsgWithdrawDelegatorReward(t *testing.T) { } height := f.app.LastBlockHeight() - _, err = f.distrKeeper.GetPreviousProposerConsAddr(f.sdkCtx) - assert.Error(t, err, "previous proposer not set") + proposerAddr, _ := f.distrKeeper.GetPreviousProposerConsAddr(f.sdkCtx) + assert.Equal(t, proposerAddr.Empty(), true) for _, tc := range testCases { tc := tc @@ -465,7 +475,7 @@ func TestMsgWithdrawValidatorCommission(t *testing.T) { // send funds to val addr err = f.bankKeeper.SendCoinsFromModuleToAccount(f.sdkCtx, distrtypes.ModuleName, sdk.AccAddress(f.valAddr), sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initTokens))) require.NoError(t, err) - coins := sdk.NewCoins(sdk.NewCoin("mytoken", sdk.NewInt(2)), sdk.NewCoin("stake", sdk.NewInt(2))) + coins := sdk.NewCoins(sdk.NewCoin("mytoken", math.NewInt(2)), sdk.NewCoin("stake", math.NewInt(2))) err = f.bankKeeper.MintCoins(f.sdkCtx, distrtypes.ModuleName, coins) require.NoError(t, err) @@ -536,7 +546,7 @@ func TestMsgWithdrawValidatorCommission(t *testing.T) { // check balance increase balance = f.bankKeeper.GetAllBalances(f.sdkCtx, sdk.AccAddress(f.valAddr)) assert.DeepEqual(t, sdk.NewCoins( - sdk.NewCoin("mytoken", sdk.NewInt(1)), + sdk.NewCoin("mytoken", math.NewInt(1)), sdk.NewCoin("stake", expTokens.AddRaw(1)), ), balance) @@ -583,7 +593,7 @@ func TestMsgFundCommunityPool(t *testing.T) { { name: "no depositor address", msg: &distrtypes.MsgFundCommunityPool{ - Amount: sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))), + Amount: sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(100))), Depositor: emptyDelAddr.String(), }, expErr: true, @@ -601,7 +611,7 @@ func TestMsgFundCommunityPool(t *testing.T) { { name: "depositor address with no funds", msg: &distrtypes.MsgFundCommunityPool{ - Amount: sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))), + Amount: sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(100))), Depositor: addr2.String(), }, expErr: true, @@ -610,7 +620,7 @@ func TestMsgFundCommunityPool(t *testing.T) { { name: "valid message", msg: &distrtypes.MsgFundCommunityPool{ - Amount: sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))), + Amount: sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(100))), Depositor: addr.String(), }, expErr: false, @@ -650,7 +660,7 @@ func TestMsgUpdateParams(t *testing.T) { f := initFixture(t) // default params - communityTax := sdk.NewDecWithPrec(2, 2) // 2% + communityTax := math.LegacyNewDecWithPrec(2, 2) // 2% withdrawAddrEnabled := true testCases := []struct { @@ -664,7 +674,7 @@ func TestMsgUpdateParams(t *testing.T) { msg: &distrtypes.MsgUpdateParams{ Authority: "invalid", Params: distrtypes.Params{ - CommunityTax: sdk.NewDecWithPrec(2, 0), + CommunityTax: math.LegacyNewDecWithPrec(2, 0), WithdrawAddrEnabled: withdrawAddrEnabled, BaseProposerReward: math.LegacyZeroDec(), BonusProposerReward: math.LegacyZeroDec(), @@ -673,33 +683,47 @@ func TestMsgUpdateParams(t *testing.T) { expErr: true, expErrMsg: "invalid authority", }, + { + name: "community tax is nil", + msg: &distrtypes.MsgUpdateParams{ + Authority: f.distrKeeper.GetAuthority(), + Params: distrtypes.Params{ + CommunityTax: math.LegacyDec{}, + WithdrawAddrEnabled: withdrawAddrEnabled, + BaseProposerReward: math.LegacyZeroDec(), + BonusProposerReward: math.LegacyZeroDec(), + }, + }, + expErr: true, + expErrMsg: "community tax must be not nil", + }, { name: "community tax > 1", msg: &distrtypes.MsgUpdateParams{ Authority: f.distrKeeper.GetAuthority(), Params: distrtypes.Params{ - CommunityTax: sdk.NewDecWithPrec(2, 0), + CommunityTax: math.LegacyNewDecWithPrec(2, 0), WithdrawAddrEnabled: withdrawAddrEnabled, BaseProposerReward: math.LegacyZeroDec(), BonusProposerReward: math.LegacyZeroDec(), }, }, expErr: true, - expErrMsg: "community tax should be non-negative and less than one", + expErrMsg: "community tax too large: 2.000000000000000000", }, { name: "negative community tax", msg: &distrtypes.MsgUpdateParams{ Authority: f.distrKeeper.GetAuthority(), Params: distrtypes.Params{ - CommunityTax: sdk.NewDecWithPrec(-2, 1), + CommunityTax: math.LegacyNewDecWithPrec(-2, 1), WithdrawAddrEnabled: withdrawAddrEnabled, BaseProposerReward: math.LegacyZeroDec(), BonusProposerReward: math.LegacyZeroDec(), }, }, expErr: true, - expErrMsg: "community tax should be non-negative and less than one", + expErrMsg: "community tax must be positive: -0.200000000000000000", }, { name: "base proposer reward set", @@ -707,7 +731,7 @@ func TestMsgUpdateParams(t *testing.T) { Authority: f.distrKeeper.GetAuthority(), Params: distrtypes.Params{ CommunityTax: communityTax, - BaseProposerReward: sdk.NewDecWithPrec(1, 2), + BaseProposerReward: math.LegacyNewDecWithPrec(1, 2), BonusProposerReward: math.LegacyZeroDec(), WithdrawAddrEnabled: withdrawAddrEnabled, }, @@ -722,7 +746,7 @@ func TestMsgUpdateParams(t *testing.T) { Params: distrtypes.Params{ CommunityTax: communityTax, BaseProposerReward: math.LegacyZeroDec(), - BonusProposerReward: sdk.NewDecWithPrec(1, 2), + BonusProposerReward: math.LegacyNewDecWithPrec(1, 2), WithdrawAddrEnabled: withdrawAddrEnabled, }, }, @@ -798,7 +822,7 @@ func TestMsgCommunityPoolSpend(t *testing.T) { msg: &distrtypes.MsgCommunityPoolSpend{ Authority: "invalid", Recipient: recipient.String(), - Amount: sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))), + Amount: sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(100))), }, expErr: true, expErrMsg: "invalid authority", @@ -808,7 +832,7 @@ func TestMsgCommunityPoolSpend(t *testing.T) { msg: &distrtypes.MsgCommunityPoolSpend{ Authority: f.distrKeeper.GetAuthority(), Recipient: "invalid", - Amount: sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))), + Amount: sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(100))), }, expErr: true, expErrMsg: "decoding bech32 failed", @@ -818,7 +842,7 @@ func TestMsgCommunityPoolSpend(t *testing.T) { msg: &distrtypes.MsgCommunityPoolSpend{ Authority: f.distrKeeper.GetAuthority(), Recipient: recipient.String(), - Amount: sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))), + Amount: sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(100))), }, expErr: false, }, @@ -880,13 +904,16 @@ func TestMsgDepositValidatorRewardsPool(t *testing.T) { err = f.bankKeeper.SendCoinsFromModuleToAccount(f.sdkCtx, distrtypes.ModuleName, addr, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, tokens))) require.NoError(t, err) tstaking := stakingtestutil.NewHelper(t, f.sdkCtx, f.stakingKeeper) - tstaking.Commission = stakingtypes.NewCommissionRates(sdk.NewDecWithPrec(5, 1), sdk.NewDecWithPrec(5, 1), math.LegacyNewDec(0)) - tstaking.CreateValidator(valAddr1, valConsPk0, sdk.NewInt(100), true) + tstaking.Commission = stakingtypes.NewCommissionRates(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)) + tstaking.CreateValidator(valAddr1, valConsPk0, math.NewInt(100), true) // mint a non-staking token and send to an account amt := sdk.NewCoins(sdk.NewInt64Coin("foo", 500)) - f.bankKeeper.MintCoins(f.sdkCtx, distrtypes.ModuleName, amt) - f.bankKeeper.SendCoinsFromModuleToAccount(f.sdkCtx, distrtypes.ModuleName, addr, amt) + require.NoError(t, f.bankKeeper.MintCoins(f.sdkCtx, distrtypes.ModuleName, amt)) + require.NoError(t, f.bankKeeper.SendCoinsFromModuleToAccount(f.sdkCtx, distrtypes.ModuleName, addr, amt)) + + bondDenom, err := f.stakingKeeper.BondDenom(f.sdkCtx) + require.NoError(t, err) testCases := []struct { name string @@ -899,7 +926,7 @@ func TestMsgDepositValidatorRewardsPool(t *testing.T) { msg: &distrtypes.MsgDepositValidatorRewardsPool{ Depositor: addr.String(), ValidatorAddress: valAddr1.String(), - Amount: sdk.NewCoins(sdk.NewCoin(f.stakingKeeper.BondDenom(f.sdkCtx), sdk.NewInt(100))), + Amount: sdk.NewCoins(sdk.NewCoin(bondDenom, math.NewInt(100))), }, }, { @@ -915,7 +942,7 @@ func TestMsgDepositValidatorRewardsPool(t *testing.T) { msg: &distrtypes.MsgDepositValidatorRewardsPool{ Depositor: addr.String(), ValidatorAddress: sdk.ValAddress([]byte("addr1_______________")).String(), - Amount: sdk.NewCoins(sdk.NewCoin(f.stakingKeeper.BondDenom(f.sdkCtx), sdk.NewInt(100))), + Amount: sdk.NewCoins(sdk.NewCoin(bondDenom, math.NewInt(100))), }, expErr: true, expErrMsg: "validator does not exist", @@ -948,7 +975,7 @@ func TestMsgDepositValidatorRewardsPool(t *testing.T) { outstandingRewards, _ := f.distrKeeper.GetValidatorOutstandingRewards(f.sdkCtx, val) for _, c := range tc.msg.Amount { x := outstandingRewards.Rewards.AmountOf(c.Denom) - assert.DeepEqual(t, x, sdk.NewDecFromInt(c.Amount)) + assert.DeepEqual(t, x, math.LegacyNewDecFromInt(c.Amount)) } } diff --git a/tests/integration/distribution/module_test.go b/tests/integration/distribution/module_test.go index 974ad21d2832..8da05004b1b2 100644 --- a/tests/integration/distribution/module_test.go +++ b/tests/integration/distribution/module_test.go @@ -3,9 +3,10 @@ package distribution_test import ( "testing" + "gotest.tools/v3/assert" + "cosmossdk.io/depinject" "cosmossdk.io/log" - "gotest.tools/v3/assert" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" diff --git a/tests/integration/evidence/keeper/infraction_test.go b/tests/integration/evidence/keeper/infraction_test.go index 13816e90ad8d..0c17797754bf 100644 --- a/tests/integration/evidence/keeper/infraction_test.go +++ b/tests/integration/evidence/keeper/infraction_test.go @@ -7,6 +7,11 @@ import ( "testing" "time" + abci "github.com/cometbft/cometbft/abci/types" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + "gotest.tools/v3/assert" + + "cosmossdk.io/core/appmodule" "cosmossdk.io/core/comet" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" @@ -14,12 +19,9 @@ import ( "cosmossdk.io/x/evidence/exported" "cosmossdk.io/x/evidence/keeper" evidencetypes "cosmossdk.io/x/evidence/types" - abci "github.com/cometbft/cometbft/abci/types" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" - "gotest.tools/v3/assert" "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/codec/address" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/runtime" @@ -101,6 +103,7 @@ func initFixture(t testing.TB) *fixture { runtime.NewKVStoreService(keys[authtypes.StoreKey]), authtypes.ProtoBaseAccount, maccPerms, + addresscodec.NewBech32Codec(sdk.Bech32MainPrefix), sdk.Bech32MainPrefix, authority.String(), ) @@ -117,11 +120,11 @@ func initFixture(t testing.TB) *fixture { log.NewNopLogger(), ) - stakingKeeper := stakingkeeper.NewKeeper(cdc, keys[stakingtypes.StoreKey], accountKeeper, bankKeeper, authority.String()) + stakingKeeper := stakingkeeper.NewKeeper(cdc, runtime.NewKVStoreService(keys[stakingtypes.StoreKey]), accountKeeper, bankKeeper, authority.String(), addresscodec.NewBech32Codec(sdk.Bech32PrefixValAddr), addresscodec.NewBech32Codec(sdk.Bech32PrefixConsAddr)) slashingKeeper := slashingkeeper.NewKeeper(cdc, codec.NewLegacyAmino(), runtime.NewKVStoreService(keys[slashingtypes.StoreKey]), stakingKeeper, authority.String()) - evidenceKeeper := keeper.NewKeeper(cdc, runtime.NewKVStoreService(keys[evidencetypes.StoreKey]), stakingKeeper, slashingKeeper, address.NewBech32Codec("cosmos"), runtime.ProvideCometInfoService()) + evidenceKeeper := keeper.NewKeeper(cdc, runtime.NewKVStoreService(keys[evidencetypes.StoreKey]), stakingKeeper, slashingKeeper, addresscodec.NewBech32Codec("cosmos"), runtime.ProvideCometInfoService()) router := evidencetypes.NewRouter() router = router.AddRoute(evidencetypes.RouteEquivocation, testEquivocationHandler(evidenceKeeper)) evidenceKeeper.SetRouter(router) @@ -132,7 +135,13 @@ func initFixture(t testing.TB) *fixture { slashingModule := slashing.NewAppModule(cdc, slashingKeeper, accountKeeper, bankKeeper, stakingKeeper, nil, cdc.InterfaceRegistry()) evidenceModule := evidence.NewAppModule(*evidenceKeeper) - integrationApp := integration.NewIntegrationApp(newCtx, logger, keys, cdc, authModule, bankModule, stakingModule, slashingModule, evidenceModule) + integrationApp := integration.NewIntegrationApp(newCtx, logger, keys, cdc, map[string]appmodule.AppModule{ + authtypes.ModuleName: authModule, + banktypes.ModuleName: bankModule, + stakingtypes.ModuleName: stakingModule, + slashingtypes.ModuleName: slashingModule, + evidencetypes.ModuleName: evidenceModule, + }) sdkCtx := sdk.UnwrapSDKContext(integrationApp.Context()) @@ -164,35 +173,40 @@ func TestHandleDoubleSign(t *testing.T) { populateValidators(t, f) power := int64(100) - stakingParams := f.stakingKeeper.GetParams(ctx) - operatorAddr, val := valAddresses[0], pubkeys[0] + stakingParams, err := f.stakingKeeper.GetParams(ctx) + assert.NilError(t, err) + operatorAddr, valpubkey := valAddresses[0], pubkeys[0] tstaking := stakingtestutil.NewHelper(t, ctx, f.stakingKeeper) - selfDelegation := tstaking.CreateValidatorWithValPower(operatorAddr, val, power, true) + selfDelegation := tstaking.CreateValidatorWithValPower(operatorAddr, valpubkey, power, true) // execute end-blocker and verify validator attributes - _, err := f.stakingKeeper.EndBlocker(f.sdkCtx) + _, err = f.stakingKeeper.EndBlocker(f.sdkCtx) assert.NilError(t, err) assert.DeepEqual(t, f.bankKeeper.GetAllBalances(ctx, sdk.AccAddress(operatorAddr)).String(), sdk.NewCoins(sdk.NewCoin(stakingParams.BondDenom, initAmt.Sub(selfDelegation))).String(), ) - assert.DeepEqual(t, selfDelegation, f.stakingKeeper.Validator(ctx, operatorAddr).GetBondedTokens()) + val, err := f.stakingKeeper.Validator(ctx, operatorAddr) + assert.NilError(t, err) + assert.DeepEqual(t, selfDelegation, val.GetBondedTokens()) - assert.NilError(t, f.slashingKeeper.AddPubkey(f.sdkCtx, val)) + assert.NilError(t, f.slashingKeeper.AddPubkey(f.sdkCtx, valpubkey)) - info := slashingtypes.NewValidatorSigningInfo(sdk.ConsAddress(val.Address()), f.sdkCtx.BlockHeight(), int64(0), time.Unix(0, 0), false, int64(0)) - f.slashingKeeper.SetValidatorSigningInfo(f.sdkCtx, sdk.ConsAddress(val.Address()), info) + info := slashingtypes.NewValidatorSigningInfo(sdk.ConsAddress(valpubkey.Address()), f.sdkCtx.BlockHeight(), int64(0), time.Unix(0, 0), false, int64(0)) + f.slashingKeeper.SetValidatorSigningInfo(f.sdkCtx, sdk.ConsAddress(valpubkey.Address()), info) // handle a signature to set signing info - f.slashingKeeper.HandleValidatorSignature(ctx, val.Address(), selfDelegation.Int64(), comet.BlockIDFlagCommit) + f.slashingKeeper.HandleValidatorSignature(ctx, valpubkey.Address(), selfDelegation.Int64(), comet.BlockIDFlagCommit) // double sign less than max age - oldTokens := f.stakingKeeper.Validator(ctx, operatorAddr).GetTokens() + val, err = f.stakingKeeper.Validator(ctx, operatorAddr) + assert.NilError(t, err) + oldTokens := val.GetTokens() nci := NewCometInfo(abci.RequestFinalizeBlock{ Misbehavior: []abci.Misbehavior{{ - Validator: abci.Validator{Address: val.Address(), Power: power}, + Validator: abci.Validator{Address: valpubkey.Address(), Power: power}, Type: abci.MisbehaviorType_DUPLICATE_VOTE, Time: time.Now().UTC(), Height: 1, @@ -203,18 +217,22 @@ func TestHandleDoubleSign(t *testing.T) { assert.NilError(t, f.evidenceKeeper.BeginBlocker(ctx.WithCometInfo(nci))) // should be jailed and tombstoned - assert.Assert(t, f.stakingKeeper.Validator(ctx, operatorAddr).IsJailed()) - assert.Assert(t, f.slashingKeeper.IsTombstoned(ctx, sdk.ConsAddress(val.Address()))) + val, err = f.stakingKeeper.Validator(ctx, operatorAddr) + assert.NilError(t, err) + assert.Assert(t, val.IsJailed()) + assert.Assert(t, f.slashingKeeper.IsTombstoned(ctx, sdk.ConsAddress(valpubkey.Address()))) // tokens should be decreased - newTokens := f.stakingKeeper.Validator(ctx, operatorAddr).GetTokens() + newTokens := val.GetTokens() assert.Assert(t, newTokens.LT(oldTokens)) // submit duplicate evidence assert.NilError(t, f.evidenceKeeper.BeginBlocker(ctx)) // tokens should be the same (capped slash) - assert.Assert(t, f.stakingKeeper.Validator(ctx, operatorAddr).GetTokens().Equal(newTokens)) + val, err = f.stakingKeeper.Validator(ctx, operatorAddr) + assert.NilError(t, err) + assert.Assert(t, val.GetTokens().Equal(newTokens)) // jump to past the unbonding period ctx = ctx.WithBlockTime(time.Unix(1, 0).Add(stakingParams.UnbondingTime)) @@ -247,25 +265,28 @@ func TestHandleDoubleSign_TooOld(t *testing.T) { populateValidators(t, f) power := int64(100) - stakingParams := f.stakingKeeper.GetParams(ctx) - operatorAddr, val := valAddresses[0], pubkeys[0] + stakingParams, err := f.stakingKeeper.GetParams(ctx) + assert.NilError(t, err) + operatorAddr, valpubkey := valAddresses[0], pubkeys[0] tstaking := stakingtestutil.NewHelper(t, ctx, f.stakingKeeper) - amt := tstaking.CreateValidatorWithValPower(operatorAddr, val, power, true) + amt := tstaking.CreateValidatorWithValPower(operatorAddr, valpubkey, power, true) // execute end-blocker and verify validator attributes - _, err := f.stakingKeeper.EndBlocker(f.sdkCtx) + _, err = f.stakingKeeper.EndBlocker(f.sdkCtx) assert.NilError(t, err) assert.DeepEqual(t, f.bankKeeper.GetAllBalances(ctx, sdk.AccAddress(operatorAddr)), sdk.NewCoins(sdk.NewCoin(stakingParams.BondDenom, initAmt.Sub(amt))), ) - assert.DeepEqual(t, amt, f.stakingKeeper.Validator(ctx, operatorAddr).GetBondedTokens()) + val, err := f.stakingKeeper.Validator(ctx, operatorAddr) + assert.NilError(t, err) + assert.DeepEqual(t, amt, val.GetBondedTokens()) nci := NewCometInfo(abci.RequestFinalizeBlock{ Misbehavior: []abci.Misbehavior{{ - Validator: abci.Validator{Address: val.Address(), Power: power}, + Validator: abci.Validator{Address: valpubkey.Address(), Power: power}, Type: abci.MisbehaviorType_DUPLICATE_VOTE, Time: ctx.BlockTime(), Height: 0, @@ -282,8 +303,10 @@ func TestHandleDoubleSign_TooOld(t *testing.T) { assert.NilError(t, f.evidenceKeeper.BeginBlocker(ctx)) - assert.Assert(t, f.stakingKeeper.Validator(ctx, operatorAddr).IsJailed() == false) - assert.Assert(t, f.slashingKeeper.IsTombstoned(ctx, sdk.ConsAddress(val.Address())) == false) + val, err = f.stakingKeeper.Validator(ctx, operatorAddr) + assert.NilError(t, err) + assert.Assert(t, val.IsJailed() == false) + assert.Assert(t, f.slashingKeeper.IsTombstoned(ctx, sdk.ConsAddress(valpubkey.Address())) == false) } func populateValidators(t assert.TestingT, f *fixture) { diff --git a/tests/integration/gov/common_test.go b/tests/integration/gov/common_test.go index c730fdc90ef3..3ade7cde3cae 100644 --- a/tests/integration/gov/common_test.go +++ b/tests/integration/gov/common_test.go @@ -3,9 +3,10 @@ package gov_test import ( "testing" - "cosmossdk.io/math" "gotest.tools/v3/assert" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/gov/types" diff --git a/tests/integration/gov/genesis_test.go b/tests/integration/gov/genesis_test.go index bcd8963420f3..ecf82c02f842 100644 --- a/tests/integration/gov/genesis_test.go +++ b/tests/integration/gov/genesis_test.go @@ -4,9 +4,8 @@ import ( "encoding/json" "testing" - dbm "github.com/cosmos/cosmos-db" - abci "github.com/cometbft/cometbft/abci/types" + dbm "github.com/cosmos/cosmos-db" "gotest.tools/v3/assert" "cosmossdk.io/depinject" diff --git a/tests/integration/gov/keeper/common_test.go b/tests/integration/gov/keeper/common_test.go index db294d5c33cd..9e1bca0b4532 100644 --- a/tests/integration/gov/keeper/common_test.go +++ b/tests/integration/gov/keeper/common_test.go @@ -5,6 +5,8 @@ import ( "gotest.tools/v3/assert" + "cosmossdk.io/math" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -34,15 +36,15 @@ func getTestProposal() []sdk.Msg { } func createValidators(t *testing.T, f *fixture, powers []int64) ([]sdk.AccAddress, []sdk.ValAddress) { - addrs := simtestutil.AddTestAddrsIncremental(f.bankKeeper, f.stakingKeeper, f.ctx, 5, sdk.NewInt(30000000)) + addrs := simtestutil.AddTestAddrsIncremental(f.bankKeeper, f.stakingKeeper, f.ctx, 5, math.NewInt(30000000)) valAddrs := simtestutil.ConvertAddrsToValAddrs(addrs) pks := simtestutil.CreateTestPubKeys(5) - val1, err := stakingtypes.NewValidator(valAddrs[0], pks[0], stakingtypes.Description{}) + val1, err := stakingtypes.NewValidator(valAddrs[0].String(), pks[0], stakingtypes.Description{}) assert.NilError(t, err) - val2, err := stakingtypes.NewValidator(valAddrs[1], pks[1], stakingtypes.Description{}) + val2, err := stakingtypes.NewValidator(valAddrs[1].String(), pks[1], stakingtypes.Description{}) assert.NilError(t, err) - val3, err := stakingtypes.NewValidator(valAddrs[2], pks[2], stakingtypes.Description{}) + val3, err := stakingtypes.NewValidator(valAddrs[2].String(), pks[2], stakingtypes.Description{}) assert.NilError(t, err) f.stakingKeeper.SetValidator(f.ctx, val1) diff --git a/tests/integration/gov/keeper/grpc_query_test.go b/tests/integration/gov/keeper/grpc_query_test.go index e8793b8cc3a7..87ff8868300c 100644 --- a/tests/integration/gov/keeper/grpc_query_test.go +++ b/tests/integration/gov/keeper/grpc_query_test.go @@ -5,10 +5,10 @@ import ( "fmt" "testing" - "cosmossdk.io/math" "gotest.tools/v3/assert" - sdk "github.com/cosmos/cosmos-sdk/types" + "cosmossdk.io/math" + v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) @@ -89,7 +89,7 @@ func TestGRPCQueryTally(t *testing.T) { expRes = &v1.QueryTallyResultResponse{ Tally: &v1.TallyResult{ - YesCount: sdk.NewInt(3 * 5 * 1000000).String(), + YesCount: math.NewInt(3 * 5 * 1000000).String(), NoCount: "0", AbstainCount: "0", NoWithVetoCount: "0", @@ -211,10 +211,10 @@ func TestLegacyGRPCQueryTally(t *testing.T) { expRes = &v1beta1.QueryTallyResultResponse{ Tally: v1beta1.TallyResult{ - Yes: sdk.NewInt(3 * 5 * 1000000), - No: sdk.NewInt(0), - Abstain: sdk.NewInt(0), - NoWithVeto: sdk.NewInt(0), + Yes: math.NewInt(3 * 5 * 1000000), + No: math.NewInt(0), + Abstain: math.NewInt(0), + NoWithVeto: math.NewInt(0), }, } }, diff --git a/tests/integration/gov/keeper/keeper_test.go b/tests/integration/gov/keeper/keeper_test.go index 0a4455b93d35..4e385e8f0d70 100644 --- a/tests/integration/gov/keeper/keeper_test.go +++ b/tests/integration/gov/keeper/keeper_test.go @@ -3,12 +3,15 @@ package keeper_test import ( "testing" - "cosmossdk.io/log" - storetypes "cosmossdk.io/store/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "gotest.tools/v3/assert" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/baseapp" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil/integration" sdk "github.com/cosmos/cosmos-sdk/types" @@ -71,6 +74,7 @@ func initFixture(t testing.TB) *fixture { runtime.NewKVStoreService(keys[authtypes.StoreKey]), authtypes.ProtoBaseAccount, maccPerms, + addresscodec.NewBech32Codec(sdk.Bech32MainPrefix), sdk.Bech32MainPrefix, authority.String(), ) @@ -87,7 +91,7 @@ func initFixture(t testing.TB) *fixture { log.NewNopLogger(), ) - stakingKeeper := stakingkeeper.NewKeeper(cdc, keys[stakingtypes.StoreKey], accountKeeper, bankKeeper, authority.String()) + stakingKeeper := stakingkeeper.NewKeeper(cdc, runtime.NewKVStoreService(keys[stakingtypes.StoreKey]), accountKeeper, bankKeeper, authority.String(), addresscodec.NewBech32Codec(sdk.Bech32PrefixValAddr), addresscodec.NewBech32Codec(sdk.Bech32PrefixConsAddr)) // set default staking params stakingKeeper.SetParams(newCtx, stakingtypes.DefaultParams()) @@ -126,7 +130,13 @@ func initFixture(t testing.TB) *fixture { distrModule := distribution.NewAppModule(cdc, distrKeeper, accountKeeper, bankKeeper, stakingKeeper, nil) govModule := gov.NewAppModule(cdc, govKeeper, accountKeeper, bankKeeper, nil) - integrationApp := integration.NewIntegrationApp(newCtx, logger, keys, cdc, authModule, bankModule, stakingModule, distrModule, govModule) + integrationApp := integration.NewIntegrationApp(newCtx, logger, keys, cdc, map[string]appmodule.AppModule{ + authtypes.ModuleName: authModule, + banktypes.ModuleName: bankModule, + distrtypes.ModuleName: distrModule, + stakingtypes.ModuleName: stakingModule, + types.ModuleName: govModule, + }) sdkCtx := sdk.UnwrapSDKContext(integrationApp.Context()) diff --git a/tests/integration/gov/keeper/tally_test.go b/tests/integration/gov/keeper/tally_test.go index ad705b7c9a14..8f77b5db182e 100644 --- a/tests/integration/gov/keeper/tally_test.go +++ b/tests/integration/gov/keeper/tally_test.go @@ -5,6 +5,8 @@ import ( "gotest.tools/v3/assert" + "cosmossdk.io/math" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" @@ -44,7 +46,7 @@ func TestTallyNoQuorum(t *testing.T) { createValidators(t, f, []int64{2, 5, 0}) - addrs := simtestutil.AddTestAddrsIncremental(f.bankKeeper, f.stakingKeeper, ctx, 1, sdk.NewInt(10000000)) + addrs := simtestutil.AddTestAddrsIncremental(f.bankKeeper, f.stakingKeeper, ctx, 1, math.NewInt(10000000)) tp := TestProposal proposal, err := f.govKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0], false) @@ -451,7 +453,7 @@ func TestTallyJailedValidator(t *testing.T) { consAddr, err := val2.GetConsAddr() assert.NilError(t, err) - f.stakingKeeper.Jail(ctx, sdk.ConsAddress(consAddr.Bytes())) + f.stakingKeeper.Jail(ctx, sdk.ConsAddress(consAddr)) tp := TestProposal proposal, err := f.govKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0], false) diff --git a/tests/integration/gov/module_test.go b/tests/integration/gov/module_test.go index f4a99c0b44ad..7853a51da6d3 100644 --- a/tests/integration/gov/module_test.go +++ b/tests/integration/gov/module_test.go @@ -3,9 +3,10 @@ package gov_test import ( "testing" + "gotest.tools/v3/assert" + "cosmossdk.io/depinject" "cosmossdk.io/log" - "gotest.tools/v3/assert" "github.com/cosmos/cosmos-sdk/testutil/configurator" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" diff --git a/tests/integration/rapidgen/rapidgen.go b/tests/integration/rapidgen/rapidgen.go index 607ebaed253b..08f2346ab523 100644 --- a/tests/integration/rapidgen/rapidgen.go +++ b/tests/integration/rapidgen/rapidgen.go @@ -11,7 +11,6 @@ import ( "google.golang.org/protobuf/reflect/protoregistry" "pgregory.net/rapid" - "cosmossdk.io/api/amino" authapi "cosmossdk.io/api/cosmos/auth/v1beta1" authzapi "cosmossdk.io/api/cosmos/authz/v1beta1" bankapi "cosmossdk.io/api/cosmos/bank/v1beta1" @@ -34,6 +33,7 @@ import ( evidencetypes "cosmossdk.io/x/evidence/types" feegranttypes "cosmossdk.io/x/feegrant" upgradetypes "cosmossdk.io/x/upgrade/types" + "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" @@ -76,22 +76,18 @@ func WithDecisionPolicy(opts rapidproto.GeneratorOptions) rapidproto.GeneratorOp func GeneratorFieldMapper(t *rapid.T, field protoreflect.FieldDescriptor, name string) (protoreflect.Value, bool) { opts := field.Options() - switch { - case proto.HasExtension(opts, cosmos_proto.E_Scalar): + if proto.HasExtension(opts, cosmos_proto.E_Scalar) { scalar := proto.GetExtension(opts, cosmos_proto.E_Scalar).(string) switch scalar { case "cosmos.Int": i32 := rapid.Int32().Draw(t, name) return protoreflect.ValueOfString(fmt.Sprintf("%d", i32)), true case "cosmos.Dec": - return protoreflect.ValueOfString(""), true - } - case field.Kind() == protoreflect.BytesKind: - if proto.HasExtension(opts, amino.E_Encoding) { - encoding := proto.GetExtension(opts, amino.E_Encoding).(string) - if encoding == "cosmos_dec_bytes" { + if field.Kind() == protoreflect.BytesKind { return protoreflect.ValueOfBytes([]byte{}), true } + + return protoreflect.ValueOfString(""), true } } @@ -133,9 +129,9 @@ var ( GenType(&disttypes.MsgWithdrawDelegatorReward{}, &distapi.MsgWithdrawDelegatorReward{}, GenOpts), GenType(&disttypes.MsgWithdrawValidatorCommission{}, &distapi.MsgWithdrawValidatorCommission{}, GenOpts), GenType(&disttypes.MsgSetWithdrawAddress{}, &distapi.MsgSetWithdrawAddress{}, GenOpts), - GenType(&disttypes.MsgFundCommunityPool{}, &distapi.MsgFundCommunityPool{}, GenOpts), + GenType(&disttypes.MsgFundCommunityPool{}, &distapi.MsgFundCommunityPool{}, GenOpts), // nolint:staticcheck // testing legacy code path GenType(&disttypes.MsgUpdateParams{}, &distapi.MsgUpdateParams{}, GenOpts.WithDisallowNil()), - GenType(&disttypes.MsgCommunityPoolSpend{}, &distapi.MsgCommunityPoolSpend{}, GenOpts), + GenType(&disttypes.MsgCommunityPoolSpend{}, &distapi.MsgCommunityPoolSpend{}, GenOpts), // nolint:staticcheck // testing legacy code path GenType(&disttypes.MsgDepositValidatorRewardsPool{}, &distapi.MsgDepositValidatorRewardsPool{}, GenOpts), // evidence diff --git a/tests/integration/runtime/query_test.go b/tests/integration/runtime/query_test.go index 22f2a1d8623c..3ae7a2835f59 100644 --- a/tests/integration/runtime/query_test.go +++ b/tests/integration/runtime/query_test.go @@ -3,7 +3,6 @@ package runtime import ( "testing" - reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" "github.com/cosmos/gogoproto/proto" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" @@ -12,6 +11,7 @@ import ( appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" "cosmossdk.io/depinject" "cosmossdk.io/log" @@ -20,7 +20,6 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/configurator" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/cosmos-sdk/x/auth" _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" _ "github.com/cosmos/cosmos-sdk/x/bank" diff --git a/tests/integration/slashing/keeper/keeper_test.go b/tests/integration/slashing/keeper/keeper_test.go index c7eb5f36631a..d43c07f1df85 100644 --- a/tests/integration/slashing/keeper/keeper_test.go +++ b/tests/integration/slashing/keeper/keeper_test.go @@ -4,15 +4,17 @@ import ( "testing" "time" - "cosmossdk.io/core/comet" - "cosmossdk.io/log" - storetypes "cosmossdk.io/store/types" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/require" "gotest.tools/v3/assert" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/core/comet" + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil/integration" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" @@ -72,6 +74,7 @@ func initFixture(t testing.TB) *fixture { runtime.NewKVStoreService(keys[authtypes.StoreKey]), authtypes.ProtoBaseAccount, maccPerms, + addresscodec.NewBech32Codec(sdk.Bech32MainPrefix), sdk.Bech32MainPrefix, authority.String(), ) @@ -88,7 +91,7 @@ func initFixture(t testing.TB) *fixture { log.NewNopLogger(), ) - stakingKeeper := stakingkeeper.NewKeeper(cdc, keys[stakingtypes.StoreKey], accountKeeper, bankKeeper, authority.String()) + stakingKeeper := stakingkeeper.NewKeeper(cdc, runtime.NewKVStoreService(keys[stakingtypes.StoreKey]), accountKeeper, bankKeeper, authority.String(), addresscodec.NewBech32Codec(sdk.Bech32PrefixValAddr), addresscodec.NewBech32Codec(sdk.Bech32PrefixConsAddr)) slashingKeeper := slashingkeeper.NewKeeper(cdc, &codec.LegacyAmino{}, runtime.NewKVStoreService(keys[slashingtypes.StoreKey]), stakingKeeper, authority.String()) @@ -96,7 +99,11 @@ func initFixture(t testing.TB) *fixture { stakingModule := staking.NewAppModule(cdc, stakingKeeper, accountKeeper, bankKeeper, nil) slashingModule := slashing.NewAppModule(cdc, slashingKeeper, accountKeeper, bankKeeper, stakingKeeper, nil, cdc.InterfaceRegistry()) - integrationApp := integration.NewIntegrationApp(newCtx, logger, keys, cdc, bankModule, stakingModule, slashingModule) + integrationApp := integration.NewIntegrationApp(newCtx, logger, keys, cdc, map[string]appmodule.AppModule{ + banktypes.ModuleName: bankModule, + stakingtypes.ModuleName: stakingModule, + slashingtypes.ModuleName: slashingModule, + }) sdkCtx := sdk.UnwrapSDKContext(integrationApp.Context()) @@ -133,7 +140,8 @@ func TestUnJailNotBonded(t *testing.T) { t.Parallel() f := initFixture(t) - p := f.stakingKeeper.GetParams(f.ctx) + p, err := f.stakingKeeper.GetParams(f.ctx) + assert.NilError(t, err) p.MaxValidators = 5 f.stakingKeeper.SetParams(f.ctx, p) @@ -212,7 +220,7 @@ func TestHandleNewValidator(t *testing.T) { f := initFixture(t) pks := simtestutil.CreateTestPubKeys(1) - addr, val := f.valAddrs[0], pks[0] + addr, valpubkey := f.valAddrs[0], pks[0] tstaking := stakingtestutil.NewHelper(t, f.ctx, f.stakingKeeper) signedBlocksWindow, err := f.slashingKeeper.SignedBlocksWindow(f.ctx) assert.NilError(t, err) @@ -220,27 +228,33 @@ func TestHandleNewValidator(t *testing.T) { assert.NilError(t, f.slashingKeeper.AddPubkey(f.ctx, pks[0])) - info := slashingtypes.NewValidatorSigningInfo(sdk.ConsAddress(val.Address()), f.ctx.BlockHeight(), int64(0), time.Unix(0, 0), false, int64(0)) - err = f.slashingKeeper.SetValidatorSigningInfo(f.ctx, sdk.ConsAddress(val.Address()), info) - assert.NilError(t, err) + info := slashingtypes.NewValidatorSigningInfo(sdk.ConsAddress(valpubkey.Address()), f.ctx.BlockHeight(), int64(0), time.Unix(0, 0), false, int64(0)) + assert.NilError(t, f.slashingKeeper.SetValidatorSigningInfo(f.ctx, sdk.ConsAddress(valpubkey.Address()), info)) // Validator created - amt := tstaking.CreateValidatorWithValPower(addr, val, 100, true) + amt := tstaking.CreateValidatorWithValPower(addr, valpubkey, 100, true) _, err = f.stakingKeeper.EndBlocker(f.ctx) - assert.NilError(t, err) + require.NoError(t, err) + + bondDenom, err := f.stakingKeeper.BondDenom(f.ctx) + require.NoError(t, err) + assert.DeepEqual( t, f.bankKeeper.GetAllBalances(f.ctx, sdk.AccAddress(addr)), - sdk.NewCoins(sdk.NewCoin(f.stakingKeeper.GetParams(f.ctx).BondDenom, testutil.InitTokens.Sub(amt))), + sdk.NewCoins(sdk.NewCoin(bondDenom, testutil.InitTokens.Sub(amt))), ) - assert.DeepEqual(t, amt, f.stakingKeeper.Validator(f.ctx, addr).GetBondedTokens()) + + val, err := f.stakingKeeper.Validator(f.ctx, addr) + require.NoError(t, err) + assert.DeepEqual(t, amt, val.GetBondedTokens()) // Now a validator, for two blocks - assert.NilError(t, f.slashingKeeper.HandleValidatorSignature(f.ctx, val.Address(), 100, comet.BlockIDFlagCommit)) + assert.NilError(t, f.slashingKeeper.HandleValidatorSignature(f.ctx, valpubkey.Address(), 100, comet.BlockIDFlagCommit)) f.ctx = f.ctx.WithBlockHeight(signedBlocksWindow + 2) - assert.NilError(t, f.slashingKeeper.HandleValidatorSignature(f.ctx, val.Address(), 100, comet.BlockIDFlagAbsent)) + assert.NilError(t, f.slashingKeeper.HandleValidatorSignature(f.ctx, valpubkey.Address(), 100, comet.BlockIDFlagAbsent)) - info, found := f.slashingKeeper.GetValidatorSigningInfo(f.ctx, sdk.ConsAddress(val.Address())) + info, found := f.slashingKeeper.GetValidatorSigningInfo(f.ctx, sdk.ConsAddress(valpubkey.Address())) assert.Assert(t, found) assert.Equal(t, signedBlocksWindow+1, info.StartHeight) assert.Equal(t, int64(2), info.IndexOffset) @@ -248,11 +262,11 @@ func TestHandleNewValidator(t *testing.T) { assert.Equal(t, time.Unix(0, 0).UTC(), info.JailedUntil) // validator should be bonded still, should not have been jailed or slashed - validator, _ := f.stakingKeeper.GetValidatorByConsAddr(f.ctx, sdk.GetConsAddress(val)) + validator, _ := f.stakingKeeper.GetValidatorByConsAddr(f.ctx, sdk.GetConsAddress(valpubkey)) assert.Equal(t, stakingtypes.Bonded, validator.GetStatus()) bondPool := f.stakingKeeper.GetBondedPool(f.ctx) expTokens := f.stakingKeeper.TokensFromConsensusPower(f.ctx, 100) - assert.Assert(t, expTokens.Equal(f.bankKeeper.GetBalance(f.ctx, bondPool.GetAddress(), f.stakingKeeper.BondDenom(f.ctx)).Amount)) + assert.Assert(t, expTokens.Equal(f.bankKeeper.GetBalance(f.ctx, bondPool.GetAddress(), bondDenom).Amount)) } // Test a jailed validator being "down" twice @@ -326,7 +340,8 @@ func TestValidatorDippingInAndOut(t *testing.T) { t.Parallel() f := initFixture(t) - params := f.stakingKeeper.GetParams(f.ctx) + params, err := f.stakingKeeper.GetParams(f.ctx) + require.NoError(t, err) params.MaxValidators = 1 f.stakingKeeper.SetParams(f.ctx, params) power := int64(100) diff --git a/tests/integration/staking/keeper/common_test.go b/tests/integration/staking/keeper/common_test.go index 853a506810e3..f4958b1b86da 100644 --- a/tests/integration/staking/keeper/common_test.go +++ b/tests/integration/staking/keeper/common_test.go @@ -4,14 +4,16 @@ import ( "math/big" "testing" + cmtprototypes "github.com/cometbft/cometbft/proto/tendermint/types" + "gotest.tools/v3/assert" + + "cosmossdk.io/core/appmodule" "cosmossdk.io/log" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - "gotest.tools/v3/assert" - - cmtprototypes "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/codec" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil/integration" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" @@ -56,7 +58,7 @@ func ValEq(t *testing.T, exp, got types.Validator) (*testing.T, bool, string, ty // generateAddresses generates numAddrs of normal AccAddrs and ValAddrs func generateAddresses(f *fixture, numAddrs int) ([]sdk.AccAddress, []sdk.ValAddress) { - addrDels := simtestutil.AddTestAddrsIncremental(f.bankKeeper, f.stakingKeeper, f.sdkCtx, numAddrs, sdk.NewInt(10000)) + addrDels := simtestutil.AddTestAddrsIncremental(f.bankKeeper, f.stakingKeeper, f.sdkCtx, numAddrs, math.NewInt(10000)) addrVals := simtestutil.ConvertAddrsToValAddrs(addrDels) return addrDels, addrVals @@ -71,12 +73,12 @@ func createValidators(t *testing.T, f *fixture, powers []int64) ([]sdk.AccAddres val2 := testutil.NewValidator(t, valAddrs[1], pks[1]) vals := []types.Validator{val1, val2} - f.stakingKeeper.SetValidator(f.sdkCtx, val1) - f.stakingKeeper.SetValidator(f.sdkCtx, val2) - f.stakingKeeper.SetValidatorByConsAddr(f.sdkCtx, val1) - f.stakingKeeper.SetValidatorByConsAddr(f.sdkCtx, val2) - f.stakingKeeper.SetNewValidatorByPowerIndex(f.sdkCtx, val1) - f.stakingKeeper.SetNewValidatorByPowerIndex(f.sdkCtx, val2) + assert.NilError(t, f.stakingKeeper.SetValidator(f.sdkCtx, val1)) + assert.NilError(t, f.stakingKeeper.SetValidator(f.sdkCtx, val2)) + assert.NilError(t, f.stakingKeeper.SetValidatorByConsAddr(f.sdkCtx, val1)) + assert.NilError(t, f.stakingKeeper.SetValidatorByConsAddr(f.sdkCtx, val2)) + assert.NilError(t, f.stakingKeeper.SetNewValidatorByPowerIndex(f.sdkCtx, val1)) + assert.NilError(t, f.stakingKeeper.SetNewValidatorByPowerIndex(f.sdkCtx, val2)) _, err := f.stakingKeeper.Delegate(f.sdkCtx, addrs[0], f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, powers[0]), types.Unbonded, val1, true) assert.NilError(t, err) @@ -114,6 +116,7 @@ func initFixture(t testing.TB) *fixture { runtime.NewKVStoreService(keys[authtypes.StoreKey]), authtypes.ProtoBaseAccount, maccPerms, + addresscodec.NewBech32Codec(sdk.Bech32MainPrefix), sdk.Bech32MainPrefix, authority.String(), ) @@ -130,13 +133,17 @@ func initFixture(t testing.TB) *fixture { log.NewNopLogger(), ) - stakingKeeper := stakingkeeper.NewKeeper(cdc, keys[types.StoreKey], accountKeeper, bankKeeper, authority.String()) + stakingKeeper := stakingkeeper.NewKeeper(cdc, runtime.NewKVStoreService(keys[types.StoreKey]), accountKeeper, bankKeeper, authority.String(), addresscodec.NewBech32Codec(sdk.Bech32PrefixValAddr), addresscodec.NewBech32Codec(sdk.Bech32PrefixConsAddr)) authModule := auth.NewAppModule(cdc, accountKeeper, authsims.RandomGenesisAccounts, nil) bankModule := bank.NewAppModule(cdc, bankKeeper, accountKeeper, nil) stakingModule := staking.NewAppModule(cdc, stakingKeeper, accountKeeper, bankKeeper, nil) - integrationApp := integration.NewIntegrationApp(newCtx, logger, keys, cdc, authModule, bankModule, stakingModule) + integrationApp := integration.NewIntegrationApp(newCtx, logger, keys, cdc, map[string]appmodule.AppModule{ + authtypes.ModuleName: authModule, + banktypes.ModuleName: bankModule, + types.ModuleName: stakingModule, + }) sdkCtx := sdk.UnwrapSDKContext(integrationApp.Context()) @@ -145,7 +152,7 @@ func initFixture(t testing.TB) *fixture { types.RegisterQueryServer(integrationApp.QueryHelper(), stakingkeeper.NewQuerier(stakingKeeper)) // set default staking params - stakingKeeper.SetParams(sdkCtx, types.DefaultParams()) + assert.NilError(t, stakingKeeper.SetParams(sdkCtx, types.DefaultParams())) f := fixture{ app: integrationApp, diff --git a/tests/integration/staking/keeper/delegation_test.go b/tests/integration/staking/keeper/delegation_test.go index 3d30da540d41..a68c68ee13e9 100644 --- a/tests/integration/staking/keeper/delegation_test.go +++ b/tests/integration/staking/keeper/delegation_test.go @@ -4,9 +4,10 @@ import ( "testing" "time" - "cosmossdk.io/math" "gotest.tools/v3/assert" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" banktestutil "github.com/cosmos/cosmos-sdk/x/bank/testutil" "github.com/cosmos/cosmos-sdk/x/staking/keeper" @@ -21,23 +22,20 @@ func TestUnbondingDelegationsMaxEntries(t *testing.T) { ctx := f.sdkCtx initTokens := f.stakingKeeper.TokensFromConsensusPower(ctx, int64(1000)) - f.bankKeeper.MintCoins(ctx, types.ModuleName, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initTokens))) + assert.NilError(t, f.bankKeeper.MintCoins(ctx, types.ModuleName, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initTokens)))) addrDel := sdk.AccAddress([]byte("addr")) - accAmt := sdk.NewInt(10000) - initCoins := sdk.NewCoins(sdk.NewCoin(f.stakingKeeper.BondDenom(ctx), accAmt)) - if err := f.bankKeeper.MintCoins(ctx, types.ModuleName, initCoins); err != nil { - panic(err) - } + accAmt := math.NewInt(10000) + bondDenom, err := f.stakingKeeper.BondDenom(ctx) + assert.NilError(t, err) - if err := f.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, addrDel, initCoins); err != nil { - panic(err) - } + initCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, accAmt)) + assert.NilError(t, f.bankKeeper.MintCoins(ctx, types.ModuleName, initCoins)) + assert.NilError(t, f.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, addrDel, initCoins)) addrVal := sdk.ValAddress(addrDel) startTokens := f.stakingKeeper.TokensFromConsensusPower(ctx, 10) - bondDenom := f.stakingKeeper.BondDenom(ctx) notBondedPool := f.stakingKeeper.GetNotBondedPool(ctx) assert.NilError(t, banktestutil.FundModuleAccount(ctx, f.bankKeeper, notBondedPool.GetName(), sdk.NewCoins(sdk.NewCoin(bondDenom, startTokens)))) @@ -53,10 +51,11 @@ func TestUnbondingDelegationsMaxEntries(t *testing.T) { assert.Assert(math.IntEq(t, startTokens, validator.BondedTokens())) assert.Assert(t, validator.IsBonded()) - delegation := types.NewDelegation(addrDel, addrVal, issuedShares) - f.stakingKeeper.SetDelegation(ctx, delegation) + delegation := types.NewDelegation(addrDel.String(), addrVal.String(), issuedShares) + assert.NilError(t, f.stakingKeeper.SetDelegation(ctx, delegation)) - maxEntries := f.stakingKeeper.MaxEntries(ctx) + maxEntries, err := f.stakingKeeper.MaxEntries(ctx) + assert.NilError(t, err) oldBonded := f.bankKeeper.GetBalance(ctx, f.stakingKeeper.GetBondedPool(ctx).GetAddress(), bondDenom).Amount oldNotBonded := f.bankKeeper.GetBalance(ctx, f.stakingKeeper.GetNotBondedPool(ctx).GetAddress(), bondDenom).Amount @@ -69,8 +68,8 @@ func TestUnbondingDelegationsMaxEntries(t *testing.T) { ctx = ctx.WithBlockHeight(i) var amount math.Int completionTime, amount, err = f.stakingKeeper.Undelegate(ctx, addrDel, addrVal, math.LegacyNewDec(1)) - totalUnbonded = totalUnbonded.Add(amount) assert.NilError(t, err) + totalUnbonded = totalUnbonded.Add(amount) } newBonded := f.bankKeeper.GetBalance(ctx, f.stakingKeeper.GetBondedPool(ctx).GetAddress(), bondDenom).Amount @@ -84,7 +83,7 @@ func TestUnbondingDelegationsMaxEntries(t *testing.T) { oldNotBonded = f.bankKeeper.GetBalance(ctx, f.stakingKeeper.GetNotBondedPool(ctx).GetAddress(), bondDenom).Amount // an additional unbond should fail due to max entries - _, _, err := f.stakingKeeper.Undelegate(ctx, addrDel, addrVal, math.LegacyNewDec(1)) + _, _, err = f.stakingKeeper.Undelegate(ctx, addrDel, addrVal, math.LegacyNewDec(1)) assert.Error(t, err, "too many unbonding delegation entries for (delegator, validator) tuple") newBonded = f.bankKeeper.GetBalance(ctx, f.stakingKeeper.GetBondedPool(ctx).GetAddress(), bondDenom).Amount diff --git a/tests/integration/staking/keeper/determinstic_test.go b/tests/integration/staking/keeper/determinstic_test.go index cd0ab10e216f..c6c0f6377d37 100644 --- a/tests/integration/staking/keeper/determinstic_test.go +++ b/tests/integration/staking/keeper/determinstic_test.go @@ -4,14 +4,17 @@ import ( "testing" "time" - "cosmossdk.io/log" - "cosmossdk.io/math" - storetypes "cosmossdk.io/store/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "gotest.tools/v3/assert" "pgregory.net/rapid" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/log" + "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/runtime" @@ -86,6 +89,7 @@ func initDeterministicFixture(t *testing.T) *deterministicFixture { runtime.NewKVStoreService(keys[authtypes.StoreKey]), authtypes.ProtoBaseAccount, maccPerms, + addresscodec.NewBech32Codec(sdk.Bech32MainPrefix), sdk.Bech32MainPrefix, authority.String(), ) @@ -102,42 +106,47 @@ func initDeterministicFixture(t *testing.T) *deterministicFixture { log.NewNopLogger(), ) - stakingKeeper := stakingkeeper.NewKeeper(cdc, keys[stakingtypes.StoreKey], accountKeeper, bankKeeper, authority.String()) + stakingKeeper := stakingkeeper.NewKeeper(cdc, runtime.NewKVStoreService(keys[stakingtypes.StoreKey]), accountKeeper, bankKeeper, authority.String(), addresscodec.NewBech32Codec(sdk.Bech32PrefixValAddr), addresscodec.NewBech32Codec(sdk.Bech32PrefixConsAddr)) authModule := auth.NewAppModule(cdc, accountKeeper, authsims.RandomGenesisAccounts, nil) bankModule := bank.NewAppModule(cdc, bankKeeper, accountKeeper, nil) stakingModule := staking.NewAppModule(cdc, stakingKeeper, accountKeeper, bankKeeper, nil) - integrationApp := integration.NewIntegrationApp(newCtx, logger, keys, cdc, authModule, bankModule, stakingModule) + integrationApp := integration.NewIntegrationApp(newCtx, logger, keys, cdc, map[string]appmodule.AppModule{ + authtypes.ModuleName: authModule, + banktypes.ModuleName: bankModule, + stakingtypes.ModuleName: stakingModule, + }) - sdkCtx := sdk.UnwrapSDKContext(integrationApp.Context()) + ctx := integrationApp.Context() // Register MsgServer and QueryServer stakingtypes.RegisterMsgServer(integrationApp.MsgServiceRouter(), stakingkeeper.NewMsgServerImpl(stakingKeeper)) stakingtypes.RegisterQueryServer(integrationApp.QueryHelper(), stakingkeeper.NewQuerier(stakingKeeper)) // set default staking params - stakingKeeper.SetParams(sdkCtx, stakingtypes.DefaultParams()) + assert.NilError(t, stakingKeeper.SetParams(ctx, stakingtypes.DefaultParams())) // set pools - startTokens := stakingKeeper.TokensFromConsensusPower(sdkCtx, 10) - bondDenom := stakingKeeper.BondDenom(sdkCtx) - notBondedPool := stakingKeeper.GetNotBondedPool(sdkCtx) - assert.NilError(t, banktestutil.FundModuleAccount(sdkCtx, bankKeeper, notBondedPool.GetName(), sdk.NewCoins(sdk.NewCoin(bondDenom, startTokens)))) - accountKeeper.SetModuleAccount(sdkCtx, notBondedPool) - bondedPool := stakingKeeper.GetBondedPool(sdkCtx) - assert.NilError(t, banktestutil.FundModuleAccount(sdkCtx, bankKeeper, bondedPool.GetName(), sdk.NewCoins(sdk.NewCoin(bondDenom, startTokens)))) - accountKeeper.SetModuleAccount(sdkCtx, bondedPool) + startTokens := stakingKeeper.TokensFromConsensusPower(ctx, 10) + bondDenom, err := stakingKeeper.BondDenom(ctx) + assert.NilError(t, err) + notBondedPool := stakingKeeper.GetNotBondedPool(ctx) + assert.NilError(t, banktestutil.FundModuleAccount(ctx, bankKeeper, notBondedPool.GetName(), sdk.NewCoins(sdk.NewCoin(bondDenom, startTokens)))) + accountKeeper.SetModuleAccount(ctx, notBondedPool) + bondedPool := stakingKeeper.GetBondedPool(ctx) + assert.NilError(t, banktestutil.FundModuleAccount(ctx, bankKeeper, bondedPool.GetName(), sdk.NewCoins(sdk.NewCoin(bondDenom, startTokens)))) + accountKeeper.SetModuleAccount(ctx, bondedPool) qr := integrationApp.QueryHelper() queryClient := stakingtypes.NewQueryClient(qr) - amt1 := stakingKeeper.TokensFromConsensusPower(sdkCtx, 101) - amt2 := stakingKeeper.TokensFromConsensusPower(sdkCtx, 102) + amt1 := stakingKeeper.TokensFromConsensusPower(ctx, 101) + amt2 := stakingKeeper.TokensFromConsensusPower(ctx, 102) f := deterministicFixture{ app: integrationApp, - ctx: sdkCtx, + ctx: sdk.UnwrapSDKContext(ctx), cdc: cdc, keys: keys, accountKeeper: accountKeeper, @@ -184,8 +193,8 @@ func createValidator(rt *rapid.T, f *deterministicFixture, t *testing.T) staking ConsensusPubkey: pubkeyAny, Jailed: rapid.Bool().Draw(rt, "jailed"), Status: bondTypeGenerator().Draw(rt, "bond-status"), - Tokens: sdk.NewInt(rapid.Int64Min(10000).Draw(rt, "tokens")), - DelegatorShares: sdk.NewDecWithPrec(rapid.Int64Range(1, 100).Draw(rt, "commission"), 2), + Tokens: math.NewInt(rapid.Int64Min(10000).Draw(rt, "tokens")), + DelegatorShares: math.LegacyNewDecWithPrec(rapid.Int64Range(1, 100).Draw(rt, "commission"), 2), Description: stakingtypes.NewDescription( rapid.StringN(5, 250, 255).Draw(rt, "moniker"), rapid.StringN(5, 250, 255).Draw(rt, "identity"), @@ -196,11 +205,11 @@ func createValidator(rt *rapid.T, f *deterministicFixture, t *testing.T) staking UnbondingHeight: rapid.Int64Min(1).Draw(rt, "unbonding-height"), UnbondingTime: time.Now().Add(durationGenerator().Draw(rt, "duration")), Commission: stakingtypes.NewCommission( - sdk.NewDecWithPrec(rapid.Int64Range(0, 100).Draw(rt, "rate"), 2), - sdk.NewDecWithPrec(rapid.Int64Range(0, 100).Draw(rt, "max-rate"), 2), - sdk.NewDecWithPrec(rapid.Int64Range(0, 100).Draw(rt, "max-change-rate"), 2), + math.LegacyNewDecWithPrec(rapid.Int64Range(0, 100).Draw(rt, "rate"), 2), + math.LegacyNewDecWithPrec(rapid.Int64Range(0, 100).Draw(rt, "max-rate"), 2), + math.LegacyNewDecWithPrec(rapid.Int64Range(0, 100).Draw(rt, "max-change-rate"), 2), ), - MinSelfDelegation: sdk.NewInt(rapid.Int64Min(1).Draw(rt, "tokens")), + MinSelfDelegation: math.NewInt(rapid.Int64Min(1).Draw(rt, "tokens")), } } @@ -220,16 +229,19 @@ func createAndSetValidator(rt *rapid.T, f *deterministicFixture, t *testing.T) s } func setValidator(f *deterministicFixture, t *testing.T, validator stakingtypes.Validator) { - f.stakingKeeper.SetValidator(f.ctx, validator) - f.stakingKeeper.SetValidatorByPowerIndex(f.ctx, validator) - f.stakingKeeper.SetValidatorByConsAddr(f.ctx, validator) - assert.NilError(t, f.stakingKeeper.Hooks().AfterValidatorCreated(f.ctx, validator.GetOperator())) + assert.NilError(t, f.stakingKeeper.SetValidator(f.ctx, validator)) + assert.NilError(t, f.stakingKeeper.SetValidatorByPowerIndex(f.ctx, validator)) + assert.NilError(t, f.stakingKeeper.SetValidatorByConsAddr(f.ctx, validator)) + valbz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) + assert.NilError(t, err) + + assert.NilError(t, f.stakingKeeper.Hooks().AfterValidatorCreated(f.ctx, valbz)) - delegatorAddress := sdk.AccAddress(validator.GetOperator()) + delegatorAddress := sdk.AccAddress(valbz) coins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, validator.BondedTokens())) - banktestutil.FundAccount(f.ctx, f.bankKeeper, delegatorAddress, coins) + assert.NilError(t, banktestutil.FundAccount(f.ctx, f.bankKeeper, delegatorAddress, coins)) - _, err := f.stakingKeeper.Delegate(f.ctx, delegatorAddress, validator.BondedTokens(), stakingtypes.Unbonded, validator, true) + _, err = f.stakingKeeper.Delegate(f.ctx, delegatorAddress, validator.BondedTokens(), stakingtypes.Unbonded, validator, true) assert.NilError(t, err) } @@ -244,8 +256,8 @@ func getStaticValidator(f *deterministicFixture, t *testing.T) stakingtypes.Vali ConsensusPubkey: pubkeyAny, Jailed: false, Status: stakingtypes.Bonded, - Tokens: sdk.NewInt(100), - DelegatorShares: sdk.NewDecWithPrec(5, 2), + Tokens: math.NewInt(100), + DelegatorShares: math.LegacyNewDecWithPrec(5, 2), Description: stakingtypes.NewDescription( "moniker", "identity", @@ -256,11 +268,11 @@ func getStaticValidator(f *deterministicFixture, t *testing.T) stakingtypes.Vali UnbondingHeight: 10, UnbondingTime: time.Date(2022, 10, 1, 0, 0, 0, 0, time.UTC), Commission: stakingtypes.NewCommission( - sdk.NewDecWithPrec(5, 2), - sdk.NewDecWithPrec(5, 2), - sdk.NewDecWithPrec(5, 2), + math.LegacyNewDecWithPrec(5, 2), + math.LegacyNewDecWithPrec(5, 2), + math.LegacyNewDecWithPrec(5, 2), ), - MinSelfDelegation: sdk.NewInt(10), + MinSelfDelegation: math.NewInt(10), } setValidator(f, t, validator) @@ -278,8 +290,8 @@ func getStaticValidator2(f *deterministicFixture, t *testing.T) stakingtypes.Val ConsensusPubkey: pubkeyAny, Jailed: true, Status: stakingtypes.Bonded, - Tokens: sdk.NewInt(10012), - DelegatorShares: sdk.NewDecWithPrec(96, 2), + Tokens: math.NewInt(10012), + DelegatorShares: math.LegacyNewDecWithPrec(96, 2), Description: stakingtypes.NewDescription( "moniker", "identity", @@ -290,11 +302,11 @@ func getStaticValidator2(f *deterministicFixture, t *testing.T) stakingtypes.Val UnbondingHeight: 100132, UnbondingTime: time.Date(2025, 10, 1, 0, 0, 0, 0, time.UTC), Commission: stakingtypes.NewCommission( - sdk.NewDecWithPrec(15, 2), - sdk.NewDecWithPrec(59, 2), - sdk.NewDecWithPrec(51, 2), + math.LegacyNewDecWithPrec(15, 2), + math.LegacyNewDecWithPrec(59, 2), + math.LegacyNewDecWithPrec(51, 2), ), - MinSelfDelegation: sdk.NewInt(1), + MinSelfDelegation: math.NewInt(1), } setValidator(f, t, validator) @@ -312,7 +324,7 @@ func fundAccountAndDelegate(f *deterministicFixture, t *testing.T, delegator sdk coins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, amt)) assert.NilError(t, f.bankKeeper.MintCoins(f.ctx, minttypes.ModuleName, coins)) - banktestutil.FundAccount(f.ctx, f.bankKeeper, delegator, coins) + assert.NilError(t, banktestutil.FundAccount(f.ctx, f.bankKeeper, delegator, coins)) shares, err := f.stakingKeeper.Delegate(f.ctx, delegator, amt, stakingtypes.Unbonded, validator, true) return shares, err @@ -417,8 +429,9 @@ func TestGRPCValidatorUnbondingDelegations(t *testing.T) { delegator := testdata.AddressGenerator(rt).Draw(rt, "delegator") shares, err := createDelegationAndDelegate(rt, f, t, delegator, validator) assert.NilError(t, err) - - _, _, err = f.stakingKeeper.Undelegate(f.ctx, delegator, validator.GetOperator(), shares) + valbz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) + assert.NilError(t, err) + _, _, err = f.stakingKeeper.Undelegate(f.ctx, delegator, valbz, shares) assert.NilError(t, err) } @@ -494,7 +507,9 @@ func TestGRPCUnbondingDelegation(t *testing.T) { shares, err := createDelegationAndDelegate(rt, f, t, delegator, validator) assert.NilError(t, err) - _, _, err = f.stakingKeeper.Undelegate(f.ctx, delegator, validator.GetOperator(), shares) + valbz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) + assert.NilError(t, err) + _, _, err = f.stakingKeeper.Undelegate(f.ctx, delegator, valbz, shares) assert.NilError(t, err) req := &stakingtypes.QueryUnbondingDelegationRequest{ @@ -603,8 +618,9 @@ func TestGRPCDelegatorUnbondingDelegations(t *testing.T) { validator := createAndSetValidatorWithStatus(rt, f, t, stakingtypes.Bonded) shares, err := createDelegationAndDelegate(rt, f, t, delegator, validator) assert.NilError(t, err) - - _, _, err = f.stakingKeeper.Undelegate(f.ctx, delegator, validator.GetOperator(), shares) + valbz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) + assert.NilError(t, err) + _, _, err = f.stakingKeeper.Undelegate(f.ctx, delegator, valbz, shares) assert.NilError(t, err) } @@ -638,24 +654,24 @@ func TestGRPCHistoricalInfo(t *testing.T) { rapid.Check(t, func(rt *rapid.T) { numVals := rapid.IntRange(1, 5).Draw(rt, "num-vals") - vals := make(stakingtypes.Validators, 0, numVals) + vals := stakingtypes.Validators{} for i := 0; i < numVals; i++ { validator := createAndSetValidatorWithStatus(rt, f, t, stakingtypes.Bonded) - vals = append(vals, validator) + vals.Validators = append(vals.Validators, validator) } historicalInfo := stakingtypes.HistoricalInfo{ Header: cmtproto.Header{}, - Valset: vals, + Valset: vals.Validators, } height := rapid.Int64Min(0).Draw(rt, "height") - f.stakingKeeper.SetHistoricalInfo( + assert.NilError(t, f.stakingKeeper.SetHistoricalInfo( f.ctx, height, &historicalInfo, - ) + )) req := &stakingtypes.QueryHistoricalInfoRequest{ Height: height, @@ -675,11 +691,11 @@ func TestGRPCHistoricalInfo(t *testing.T) { height := int64(127) - f.stakingKeeper.SetHistoricalInfo( + assert.NilError(t, f.stakingKeeper.SetHistoricalInfo( f.ctx, height, &historicalInfo, - ) + )) req := &stakingtypes.QueryHistoricalInfoRequest{ Height: height, @@ -812,7 +828,7 @@ func TestGRPCParams(t *testing.T) { MaxValidators: rapid.Uint32Min(1).Draw(rt, "max-validators"), MaxEntries: rapid.Uint32Min(1).Draw(rt, "max-entries"), HistoricalEntries: rapid.Uint32Min(1).Draw(rt, "historical-entries"), - MinCommissionRate: sdk.NewDecWithPrec(rapid.Int64Range(0, 100).Draw(rt, "commission"), 2), + MinCommissionRate: math.LegacyNewDecWithPrec(rapid.Int64Range(0, 100).Draw(rt, "commission"), 2), } err := f.stakingKeeper.SetParams(f.ctx, params) @@ -827,7 +843,7 @@ func TestGRPCParams(t *testing.T) { MaxValidators: 85, MaxEntries: 5, HistoricalEntries: 5, - MinCommissionRate: sdk.NewDecWithPrec(5, 2), + MinCommissionRate: math.LegacyNewDecWithPrec(5, 2), } err := f.stakingKeeper.SetParams(f.ctx, params) diff --git a/tests/integration/staking/keeper/genesis_test.go b/tests/integration/staking/keeper/genesis_test.go index 68be2c93e5e4..78e830dc822e 100644 --- a/tests/integration/staking/keeper/genesis_test.go +++ b/tests/integration/staking/keeper/genesis_test.go @@ -4,11 +4,12 @@ import ( "fmt" "testing" - "cosmossdk.io/math" abci "github.com/cometbft/cometbft/abci/types" "github.com/stretchr/testify/require" "gotest.tools/v3/assert" + "cosmossdk.io/math" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" banktestutil "github.com/cosmos/cosmos-sdk/x/bank/testutil" @@ -37,13 +38,17 @@ func TestInitGenesis(t *testing.T) { ConsensusPubkey: pk0, Status: types.Bonded, Tokens: valTokens, - DelegatorShares: sdk.NewDecFromInt(valTokens), + DelegatorShares: math.LegacyNewDecFromInt(valTokens), Description: types.NewDescription("hoop", "", "", "", ""), } - f.stakingKeeper.SetValidator(f.sdkCtx, bondedVal) + assert.NilError(t, f.stakingKeeper.SetValidator(f.sdkCtx, bondedVal)) + + params, err := f.stakingKeeper.GetParams(f.sdkCtx) + assert.NilError(t, err) + + validators, err := f.stakingKeeper.GetAllValidators(f.sdkCtx) + assert.NilError(t, err) - params := (f.stakingKeeper.GetParams(f.sdkCtx)) - validators := (f.stakingKeeper.GetAllValidators(f.sdkCtx)) assert.Assert(t, len(validators) == 1) var delegations []types.Delegation @@ -59,7 +64,7 @@ func TestInitGenesis(t *testing.T) { ConsensusPubkey: pk1, Status: types.Bonded, Tokens: valTokens, - DelegatorShares: sdk.NewDecFromInt(valTokens), + DelegatorShares: math.LegacyNewDecFromInt(valTokens), Description: types.NewDescription("hoop", "", "", "", ""), } bondedVal2 := types.Validator{ @@ -67,7 +72,7 @@ func TestInitGenesis(t *testing.T) { ConsensusPubkey: pk2, Status: types.Bonded, Tokens: valTokens, - DelegatorShares: sdk.NewDecFromInt(valTokens), + DelegatorShares: math.LegacyNewDecFromInt(valTokens), Description: types.NewDescription("bloop", "", "", "", ""), } @@ -87,7 +92,8 @@ func TestInitGenesis(t *testing.T) { ), ) - genesisDelegations := (f.stakingKeeper.GetAllDelegations(f.sdkCtx)) + genesisDelegations, err := f.stakingKeeper.GetAllDelegations(f.sdkCtx) + assert.NilError(t, err) delegations = append(delegations, genesisDelegations...) genesisState := types.NewGenesisState(params, validators, delegations) @@ -96,7 +102,10 @@ func TestInitGenesis(t *testing.T) { actualGenesis := (f.stakingKeeper.ExportGenesis(f.sdkCtx)) assert.DeepEqual(t, genesisState.Params, actualGenesis.Params) assert.DeepEqual(t, genesisState.Delegations, actualGenesis.Delegations) - assert.DeepEqual(t, (f.stakingKeeper.GetAllValidators(f.sdkCtx)), actualGenesis.Validators) + + allvals, err := f.stakingKeeper.GetAllValidators(f.sdkCtx) + assert.NilError(t, err) + assert.DeepEqual(t, allvals, actualGenesis.Validators) // Ensure validators have addresses. vals2, err := staking.WriteValidators(f.sdkCtx, (f.stakingKeeper)) @@ -135,8 +144,8 @@ func TestInitGenesis_PoolsBalanceMismatch(t *testing.T) { OperatorAddress: sdk.ValAddress("12345678901234567890").String(), ConsensusPubkey: consPub, Jailed: false, - Tokens: sdk.NewInt(10), - DelegatorShares: sdk.NewDecFromInt(sdk.NewInt(10)), + Tokens: math.NewInt(10), + DelegatorShares: math.LegacyNewDecFromInt(math.NewInt(10)), Description: types.NewDescription("bloop", "", "", "", ""), } @@ -175,18 +184,18 @@ func TestInitGenesisLargeValidatorSet(t *testing.T) { assert.Assert(t, size > 100) f, addrs := bootstrapGenesisTest(t, 200) - genesisValidators := f.stakingKeeper.GetAllValidators(f.sdkCtx) + genesisValidators, err := f.stakingKeeper.GetAllValidators(f.sdkCtx) + assert.NilError(t, err) - params := f.stakingKeeper.GetParams(f.sdkCtx) + params, err := f.stakingKeeper.GetParams(f.sdkCtx) + assert.NilError(t, err) delegations := []types.Delegation{} validators := make([]types.Validator, size) - var err error - bondedPoolAmt := math.ZeroInt() for i := range validators { validators[i], err = types.NewValidator( - sdk.ValAddress(addrs[i]), + sdk.ValAddress(addrs[i]).String(), PKs[i], types.NewDescription(fmt.Sprintf("#%d", i), "", "", "", ""), ) @@ -199,7 +208,7 @@ func TestInitGenesisLargeValidatorSet(t *testing.T) { } validators[i].Tokens = tokens - validators[i].DelegatorShares = sdk.NewDecFromInt(tokens) + validators[i].DelegatorShares = math.LegacyNewDecFromInt(tokens) // add bonded coins bondedPoolAmt = bondedPoolAmt.Add(tokens) diff --git a/tests/integration/staking/keeper/grpc_query_test.go b/tests/integration/staking/keeper/grpc_query_test.go index de9b774a5ab4..54d77dc67f56 100644 --- a/tests/integration/staking/keeper/grpc_query_test.go +++ b/tests/integration/staking/keeper/grpc_query_test.go @@ -5,9 +5,10 @@ import ( "fmt" "testing" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "gotest.tools/v3/assert" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + "cosmossdk.io/math" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" @@ -26,8 +27,8 @@ func createValidatorAccs(t *testing.T, f *fixture) ([]sdk.AccAddress, []types.Va // have its order changed sortedVals := make([]types.Validator, len(validators)) copy(sortedVals, validators) - hi := types.NewHistoricalInfo(header, sortedVals, f.stakingKeeper.PowerReduction(f.sdkCtx)) - f.stakingKeeper.SetHistoricalInfo(f.sdkCtx, 5, &hi) + hi := types.NewHistoricalInfo(header, types.Validators{Validators: sortedVals}, f.stakingKeeper.PowerReduction(f.sdkCtx)) + assert.NilError(t, f.stakingKeeper.SetHistoricalInfo(f.sdkCtx, 5, &hi)) return addrs, validators } @@ -126,8 +127,10 @@ func TestGRPCQueryDelegatorValidators(t *testing.T) { qr := f.app.QueryHelper() queryClient := types.NewQueryClient(qr) - params := f.stakingKeeper.GetParams(ctx) - delValidators := f.stakingKeeper.GetDelegatorValidators(ctx, addrs[0], params.MaxValidators) + params, err := f.stakingKeeper.GetParams(ctx) + assert.NilError(t, err) + delValidators, err := f.stakingKeeper.GetDelegatorValidators(ctx, addrs[0], params.MaxValidators) + assert.NilError(t, err) var req *types.QueryDelegatorValidatorsRequest testCases := []struct { msg string @@ -175,7 +178,7 @@ func TestGRPCQueryDelegatorValidators(t *testing.T) { assert.NilError(t, err) assert.Equal(t, 1, len(res.Validators)) assert.Assert(t, res.Pagination.NextKey != nil) - assert.Equal(t, uint64(len(delValidators)), res.Pagination.Total) + assert.Equal(t, uint64(len(delValidators.Validators)), res.Pagination.Total) } else { assert.ErrorContains(t, err, tc.expErrMsg) assert.Assert(t, res == nil) @@ -516,7 +519,7 @@ func TestGRPCQueryUnbondingDelegation(t *testing.T) { unbondingTokens := f.stakingKeeper.TokensFromConsensusPower(ctx, 2) valAddr, err1 := sdk.ValAddressFromBech32(addrVal2) assert.NilError(t, err1) - _, _, err := f.stakingKeeper.Undelegate(ctx, addrAcc2, valAddr, sdk.NewDecFromInt(unbondingTokens)) + _, _, err := f.stakingKeeper.Undelegate(ctx, addrAcc2, valAddr, math.LegacyNewDecFromInt(unbondingTokens)) assert.NilError(t, err) unbond, found := f.stakingKeeper.GetUnbondingDelegation(ctx, addrAcc2, valAddr) @@ -564,7 +567,7 @@ func TestGRPCQueryUnbondingDelegation(t *testing.T) { } }, false, - "invalid Bech32", + "hrp does not match bech32 prefix", }, { "delegation not found for validator", @@ -619,11 +622,11 @@ func TestGRPCQueryDelegatorUnbondingDelegations(t *testing.T) { unbondingTokens := f.stakingKeeper.TokensFromConsensusPower(ctx, 2) valAddr1, err1 := sdk.ValAddressFromBech32(addrVal) assert.NilError(t, err1) - _, _, err := f.stakingKeeper.Undelegate(ctx, addrAcc, valAddr1, sdk.NewDecFromInt(unbondingTokens)) + _, _, err := f.stakingKeeper.Undelegate(ctx, addrAcc, valAddr1, math.LegacyNewDecFromInt(unbondingTokens)) assert.NilError(t, err) valAddr2, err1 := sdk.ValAddressFromBech32(addrVal2) assert.NilError(t, err1) - _, _, err = f.stakingKeeper.Undelegate(ctx, addrAcc, valAddr2, sdk.NewDecFromInt(unbondingTokens)) + _, _, err = f.stakingKeeper.Undelegate(ctx, addrAcc, valAddr2, math.LegacyNewDecFromInt(unbondingTokens)) assert.NilError(t, err) unbond, found := f.stakingKeeper.GetUnbondingDelegation(ctx, addrAcc, valAddr1) @@ -712,7 +715,9 @@ func TestGRPCQueryPoolParameters(t *testing.T) { // Query Params resp, err := queryClient.Params(gocontext.Background(), &types.QueryParamsRequest{}) assert.NilError(t, err) - assert.DeepEqual(t, f.stakingKeeper.GetParams(ctx), resp.Params) + params, err := f.stakingKeeper.GetParams(ctx) + assert.NilError(t, err) + assert.DeepEqual(t, params, resp.Params) } func TestGRPCQueryHistoricalInfo(t *testing.T) { @@ -804,11 +809,16 @@ func TestGRPCQueryRedelegations(t *testing.T) { applyValidatorSetUpdates(t, ctx, f.stakingKeeper, -1) rdAmount := f.stakingKeeper.TokensFromConsensusPower(ctx, 1) - _, err = f.stakingKeeper.BeginRedelegation(ctx, addrAcc1, val1.GetOperator(), val2.GetOperator(), sdk.NewDecFromInt(rdAmount)) + val1bz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(val1.GetOperator()) + assert.NilError(t, err) + val2bz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(val2.GetOperator()) + assert.NilError(t, err) + + _, err = f.stakingKeeper.BeginRedelegation(ctx, addrAcc1, val1bz, val2bz, math.LegacyNewDecFromInt(rdAmount)) assert.NilError(t, err) applyValidatorSetUpdates(t, ctx, f.stakingKeeper, -1) - redel, found := f.stakingKeeper.GetRedelegation(ctx, addrAcc1, val1.GetOperator(), val2.GetOperator()) + redel, found := f.stakingKeeper.GetRedelegation(ctx, addrAcc1, val1bz, val2bz) assert.Assert(t, found) var req *types.QueryRedelegationsRequest @@ -869,7 +879,7 @@ func TestGRPCQueryRedelegations(t *testing.T) { "query redelegations with sourceValAddr only", func() { req = &types.QueryRedelegationsRequest{ - SrcValidatorAddr: val1.GetOperator().String(), + SrcValidatorAddr: val1.GetOperator(), Pagination: &query.PageRequest{Limit: 1, CountTotal: true}, } }, @@ -917,7 +927,9 @@ func TestGRPCQueryValidatorUnbondingDelegations(t *testing.T) { // undelegate undelAmount := f.stakingKeeper.TokensFromConsensusPower(ctx, 2) - _, _, err := f.stakingKeeper.Undelegate(ctx, addrAcc1, val1.GetOperator(), sdk.NewDecFromInt(undelAmount)) + valbz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(val1.GetOperator()) + assert.NilError(t, err) + _, _, err = f.stakingKeeper.Undelegate(ctx, addrAcc1, valbz, math.LegacyNewDecFromInt(undelAmount)) assert.NilError(t, err) applyValidatorSetUpdates(t, ctx, f.stakingKeeper, -1) @@ -951,7 +963,7 @@ func TestGRPCQueryValidatorUnbondingDelegations(t *testing.T) { "valid request", func() { req = &types.QueryValidatorUnbondingDelegationsRequest{ - ValidatorAddr: val1.GetOperator().String(), + ValidatorAddr: val1.GetOperator(), Pagination: &query.PageRequest{Limit: 1, CountTotal: true}, } }, diff --git a/tests/integration/staking/keeper/msg_server_test.go b/tests/integration/staking/keeper/msg_server_test.go index 9c08804f577c..f84c305795dc 100644 --- a/tests/integration/staking/keeper/msg_server_test.go +++ b/tests/integration/staking/keeper/msg_server_test.go @@ -6,6 +6,9 @@ import ( "gotest.tools/v3/assert" + "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/codec/address" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/bank/testutil" @@ -19,43 +22,45 @@ func TestCancelUnbondingDelegation(t *testing.T) { ctx := f.sdkCtx msgServer := keeper.NewMsgServerImpl(f.stakingKeeper) - bondDenom := f.stakingKeeper.BondDenom(ctx) + bondDenom, err := f.stakingKeeper.BondDenom(ctx) + assert.NilError(t, err) // set the not bonded pool module account notBondedPool := f.stakingKeeper.GetNotBondedPool(ctx) startTokens := f.stakingKeeper.TokensFromConsensusPower(ctx, 5) - assert.NilError(t, testutil.FundModuleAccount(ctx, f.bankKeeper, notBondedPool.GetName(), sdk.NewCoins(sdk.NewCoin(f.stakingKeeper.BondDenom(ctx), startTokens)))) + assert.NilError(t, testutil.FundModuleAccount(ctx, f.bankKeeper, notBondedPool.GetName(), sdk.NewCoins(sdk.NewCoin(bondDenom, startTokens)))) f.accountKeeper.SetModuleAccount(ctx, notBondedPool) - moduleBalance := f.bankKeeper.GetBalance(ctx, notBondedPool.GetAddress(), f.stakingKeeper.BondDenom(ctx)) + moduleBalance := f.bankKeeper.GetBalance(ctx, notBondedPool.GetAddress(), bondDenom) assert.DeepEqual(t, sdk.NewInt64Coin(bondDenom, startTokens.Int64()), moduleBalance) // accounts - addrs := simtestutil.AddTestAddrsIncremental(f.bankKeeper, f.stakingKeeper, ctx, 2, sdk.NewInt(10000)) + addrs := simtestutil.AddTestAddrsIncremental(f.bankKeeper, f.stakingKeeper, ctx, 2, math.NewInt(10000)) valAddr := sdk.ValAddress(addrs[0]) delegatorAddr := addrs[1] // setup a new validator with bonded status - validator, err := types.NewValidator(valAddr, PKs[0], types.NewDescription("Validator", "", "", "", "")) + validator, err := types.NewValidator(valAddr.String(), PKs[0], types.NewDescription("Validator", "", "", "", "")) validator.Status = types.Bonded assert.NilError(t, err) - f.stakingKeeper.SetValidator(ctx, validator) + assert.NilError(t, f.stakingKeeper.SetValidator(ctx, validator)) validatorAddr, err := sdk.ValAddressFromBech32(validator.OperatorAddress) assert.NilError(t, err) // setting the ubd entry - unbondingAmount := sdk.NewInt64Coin(f.stakingKeeper.BondDenom(ctx), 5) + unbondingAmount := sdk.NewInt64Coin(bondDenom, 5) ubd := types.NewUnbondingDelegation( delegatorAddr, validatorAddr, 10, ctx.BlockTime().Add(time.Minute*10), unbondingAmount.Amount, 0, + address.NewBech32Codec("cosmosvaloper"), address.NewBech32Codec("cosmos"), ) // set and retrieve a record - f.stakingKeeper.SetUnbondingDelegation(ctx, ubd) + assert.NilError(t, f.stakingKeeper.SetUnbondingDelegation(ctx, ubd)) resUnbond, found := f.stakingKeeper.GetUnbondingDelegation(ctx, delegatorAddr, validatorAddr) assert.Assert(t, found) assert.DeepEqual(t, ubd, resUnbond) @@ -72,7 +77,7 @@ func TestCancelUnbondingDelegation(t *testing.T) { req: types.MsgCancelUnbondingDelegation{ DelegatorAddress: resUnbond.DelegatorAddress, ValidatorAddress: resUnbond.ValidatorAddress, - Amount: sdk.NewCoin(f.stakingKeeper.BondDenom(ctx), sdk.NewInt(4)), + Amount: sdk.NewCoin(bondDenom, math.NewInt(4)), CreationHeight: 11, }, expErrMsg: "unbonding delegation entry is not found at block height", @@ -83,7 +88,7 @@ func TestCancelUnbondingDelegation(t *testing.T) { req: types.MsgCancelUnbondingDelegation{ DelegatorAddress: resUnbond.DelegatorAddress, ValidatorAddress: resUnbond.ValidatorAddress, - Amount: sdk.NewCoin(f.stakingKeeper.BondDenom(ctx), sdk.NewInt(4)), + Amount: sdk.NewCoin(bondDenom, math.NewInt(4)), CreationHeight: 0, }, expErrMsg: "invalid height", @@ -94,7 +99,7 @@ func TestCancelUnbondingDelegation(t *testing.T) { req: types.MsgCancelUnbondingDelegation{ DelegatorAddress: resUnbond.DelegatorAddress, ValidatorAddress: resUnbond.ValidatorAddress, - Amount: sdk.NewCoin("dump_coin", sdk.NewInt(4)), + Amount: sdk.NewCoin("dump_coin", math.NewInt(4)), CreationHeight: 10, }, expErrMsg: "invalid coin denomination", diff --git a/tests/integration/staking/keeper/slash_test.go b/tests/integration/staking/keeper/slash_test.go index 6beea0b0b3e9..9397814b1a72 100644 --- a/tests/integration/staking/keeper/slash_test.go +++ b/tests/integration/staking/keeper/slash_test.go @@ -4,11 +4,13 @@ import ( "testing" "time" - "cosmossdk.io/math" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/require" "gotest.tools/v3/assert" + "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/codec/address" sdk "github.com/cosmos/cosmos-sdk/types" banktestutil "github.com/cosmos/cosmos-sdk/x/bank/testutil" "github.com/cosmos/cosmos-sdk/x/staking/keeper" @@ -24,7 +26,9 @@ func bootstrapSlashTest(t *testing.T, power int64) (*fixture, []sdk.AccAddress, addrDels, addrVals := generateAddresses(f, 100) amt := f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, power) - totalSupply := sdk.NewCoins(sdk.NewCoin(f.stakingKeeper.BondDenom(f.sdkCtx), amt.MulRaw(int64(len(addrDels))))) + bondDenom, err := f.stakingKeeper.BondDenom(f.sdkCtx) + require.NoError(t, err) + totalSupply := sdk.NewCoins(sdk.NewCoin(bondDenom, amt.MulRaw(int64(len(addrDels))))) notBondedPool := f.stakingKeeper.GetNotBondedPool(f.sdkCtx) assert.NilError(t, banktestutil.FundModuleAccount(f.sdkCtx, f.bankKeeper, notBondedPool.GetName(), totalSupply)) @@ -32,7 +36,7 @@ func bootstrapSlashTest(t *testing.T, power int64) (*fixture, []sdk.AccAddress, f.accountKeeper.SetModuleAccount(f.sdkCtx, notBondedPool) numVals := int64(3) - bondedCoins := sdk.NewCoins(sdk.NewCoin(f.stakingKeeper.BondDenom(f.sdkCtx), amt.MulRaw(numVals))) + bondedCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, amt.MulRaw(numVals))) bondedPool := f.stakingKeeper.GetBondedPool(f.sdkCtx) // set bonded pool balance @@ -43,7 +47,7 @@ func bootstrapSlashTest(t *testing.T, power int64) (*fixture, []sdk.AccAddress, validator := testutil.NewValidator(t, addrVals[i], PKs[i]) validator, _ = validator.AddTokensFromDel(amt) validator = keeper.TestingUpdateValidator(f.stakingKeeper, f.sdkCtx, validator, true) - f.stakingKeeper.SetValidatorByConsAddr(f.sdkCtx, validator) + assert.NilError(t, f.stakingKeeper.SetValidatorByConsAddr(f.sdkCtx, validator)) } return f, addrDels, addrVals @@ -53,53 +57,61 @@ func bootstrapSlashTest(t *testing.T, power int64) (*fixture, []sdk.AccAddress, func TestSlashUnbondingDelegation(t *testing.T) { f, addrDels, addrVals := bootstrapSlashTest(t, 10) - fraction := sdk.NewDecWithPrec(5, 1) + fraction := math.LegacyNewDecWithPrec(5, 1) // set an unbonding delegation with expiration timestamp (beyond which the // unbonding delegation shouldn't be slashed) ubd := types.NewUnbondingDelegation(addrDels[0], addrVals[0], 0, - time.Unix(5, 0), sdk.NewInt(10), 0) + time.Unix(5, 0), math.NewInt(10), 0, address.NewBech32Codec("cosmosvaloper"), address.NewBech32Codec("cosmos")) - f.stakingKeeper.SetUnbondingDelegation(f.sdkCtx, ubd) + assert.NilError(t, f.stakingKeeper.SetUnbondingDelegation(f.sdkCtx, ubd)) // unbonding started prior to the infraction height, stakw didn't contribute - slashAmount := f.stakingKeeper.SlashUnbondingDelegation(f.sdkCtx, ubd, 1, fraction) - assert.Assert(t, slashAmount.Equal(sdk.NewInt(0))) + slashAmount, err := f.stakingKeeper.SlashUnbondingDelegation(f.sdkCtx, ubd, 1, fraction) + assert.NilError(t, err) + assert.Assert(t, slashAmount.Equal(math.NewInt(0))) // after the expiration time, no longer eligible for slashing f.sdkCtx = f.sdkCtx.WithBlockHeader(cmtproto.Header{Time: time.Unix(10, 0)}) - f.stakingKeeper.SetUnbondingDelegation(f.sdkCtx, ubd) - slashAmount = f.stakingKeeper.SlashUnbondingDelegation(f.sdkCtx, ubd, 0, fraction) - assert.Assert(t, slashAmount.Equal(sdk.NewInt(0))) + assert.NilError(t, f.stakingKeeper.SetUnbondingDelegation(f.sdkCtx, ubd)) + slashAmount, err = f.stakingKeeper.SlashUnbondingDelegation(f.sdkCtx, ubd, 0, fraction) + assert.NilError(t, err) + assert.Assert(t, slashAmount.Equal(math.NewInt(0))) // test valid slash, before expiration timestamp and to which stake contributed notBondedPool := f.stakingKeeper.GetNotBondedPool(f.sdkCtx) oldUnbondedPoolBalances := f.bankKeeper.GetAllBalances(f.sdkCtx, notBondedPool.GetAddress()) f.sdkCtx = f.sdkCtx.WithBlockHeader(cmtproto.Header{Time: time.Unix(0, 0)}) - f.stakingKeeper.SetUnbondingDelegation(f.sdkCtx, ubd) - slashAmount = f.stakingKeeper.SlashUnbondingDelegation(f.sdkCtx, ubd, 0, fraction) - assert.Assert(t, slashAmount.Equal(sdk.NewInt(5))) + assert.NilError(t, f.stakingKeeper.SetUnbondingDelegation(f.sdkCtx, ubd)) + slashAmount, err = f.stakingKeeper.SlashUnbondingDelegation(f.sdkCtx, ubd, 0, fraction) + assert.NilError(t, err) + assert.Assert(t, slashAmount.Equal(math.NewInt(5))) ubd, found := f.stakingKeeper.GetUnbondingDelegation(f.sdkCtx, addrDels[0], addrVals[0]) assert.Assert(t, found) assert.Assert(t, len(ubd.Entries) == 1) // initial balance unchanged - assert.DeepEqual(t, sdk.NewInt(10), ubd.Entries[0].InitialBalance) + assert.DeepEqual(t, math.NewInt(10), ubd.Entries[0].InitialBalance) // balance decreased - assert.DeepEqual(t, sdk.NewInt(5), ubd.Entries[0].Balance) + assert.DeepEqual(t, math.NewInt(5), ubd.Entries[0].Balance) newUnbondedPoolBalances := f.bankKeeper.GetAllBalances(f.sdkCtx, notBondedPool.GetAddress()) diffTokens := oldUnbondedPoolBalances.Sub(newUnbondedPoolBalances...) - assert.Assert(t, diffTokens.AmountOf(f.stakingKeeper.BondDenom(f.sdkCtx)).Equal(sdk.NewInt(5))) + bondDenom, err := f.stakingKeeper.BondDenom(f.sdkCtx) + assert.NilError(t, err) + assert.Assert(t, diffTokens.AmountOf(bondDenom).Equal(math.NewInt(5))) } // tests slashRedelegation func TestSlashRedelegation(t *testing.T) { f, addrDels, addrVals := bootstrapSlashTest(t, 10) - fraction := sdk.NewDecWithPrec(5, 1) + fraction := math.LegacyNewDecWithPrec(5, 1) + + bondDenom, err := f.stakingKeeper.BondDenom(f.sdkCtx) + assert.NilError(t, err) // add bonded tokens to pool for (re)delegations - startCoins := sdk.NewCoins(sdk.NewInt64Coin(f.stakingKeeper.BondDenom(f.sdkCtx), 15)) + startCoins := sdk.NewCoins(sdk.NewInt64Coin(bondDenom, 15)) bondedPool := f.stakingKeeper.GetBondedPool(f.sdkCtx) _ = f.bankKeeper.GetAllBalances(f.sdkCtx, bondedPool.GetAddress()) @@ -109,37 +121,40 @@ func TestSlashRedelegation(t *testing.T) { // set a redelegation with an expiration timestamp beyond which the // redelegation shouldn't be slashed rd := types.NewRedelegation(addrDels[0], addrVals[0], addrVals[1], 0, - time.Unix(5, 0), sdk.NewInt(10), math.LegacyNewDec(10), 0) + time.Unix(5, 0), math.NewInt(10), math.LegacyNewDec(10), 0, address.NewBech32Codec("cosmosvaloper"), address.NewBech32Codec("cosmos")) - f.stakingKeeper.SetRedelegation(f.sdkCtx, rd) + assert.NilError(t, f.stakingKeeper.SetRedelegation(f.sdkCtx, rd)) // set the associated delegation - del := types.NewDelegation(addrDels[0], addrVals[1], math.LegacyNewDec(10)) - f.stakingKeeper.SetDelegation(f.sdkCtx, del) + del := types.NewDelegation(addrDels[0].String(), addrVals[1].String(), math.LegacyNewDec(10)) + assert.NilError(t, f.stakingKeeper.SetDelegation(f.sdkCtx, del)) // started redelegating prior to the current height, stake didn't contribute to infraction validator, found := f.stakingKeeper.GetValidator(f.sdkCtx, addrVals[1]) assert.Assert(t, found) - slashAmount := f.stakingKeeper.SlashRedelegation(f.sdkCtx, validator, rd, 1, fraction) - assert.Assert(t, slashAmount.Equal(sdk.NewInt(0))) + slashAmount, err := f.stakingKeeper.SlashRedelegation(f.sdkCtx, validator, rd, 1, fraction) + assert.NilError(t, err) + assert.Assert(t, slashAmount.Equal(math.NewInt(0))) // after the expiration time, no longer eligible for slashing f.sdkCtx = f.sdkCtx.WithBlockHeader(cmtproto.Header{Time: time.Unix(10, 0)}) - f.stakingKeeper.SetRedelegation(f.sdkCtx, rd) + assert.NilError(t, f.stakingKeeper.SetRedelegation(f.sdkCtx, rd)) validator, found = f.stakingKeeper.GetValidator(f.sdkCtx, addrVals[1]) assert.Assert(t, found) - slashAmount = f.stakingKeeper.SlashRedelegation(f.sdkCtx, validator, rd, 0, fraction) - assert.Assert(t, slashAmount.Equal(sdk.NewInt(0))) + slashAmount, err = f.stakingKeeper.SlashRedelegation(f.sdkCtx, validator, rd, 0, fraction) + assert.NilError(t, err) + assert.Assert(t, slashAmount.Equal(math.NewInt(0))) balances := f.bankKeeper.GetAllBalances(f.sdkCtx, bondedPool.GetAddress()) // test valid slash, before expiration timestamp and to which stake contributed f.sdkCtx = f.sdkCtx.WithBlockHeader(cmtproto.Header{Time: time.Unix(0, 0)}) - f.stakingKeeper.SetRedelegation(f.sdkCtx, rd) + assert.NilError(t, f.stakingKeeper.SetRedelegation(f.sdkCtx, rd)) validator, found = f.stakingKeeper.GetValidator(f.sdkCtx, addrVals[1]) assert.Assert(t, found) - slashAmount = f.stakingKeeper.SlashRedelegation(f.sdkCtx, validator, rd, 0, fraction) - assert.Assert(t, slashAmount.Equal(sdk.NewInt(5))) + slashAmount, err = f.stakingKeeper.SlashRedelegation(f.sdkCtx, validator, rd, 0, fraction) + assert.NilError(t, err) + assert.Assert(t, slashAmount.Equal(math.NewInt(5))) rd, found = f.stakingKeeper.GetRedelegation(f.sdkCtx, addrDels[0], addrVals[0], addrVals[1]) assert.Assert(t, found) assert.Assert(t, len(rd.Entries) == 1) @@ -148,7 +163,7 @@ func TestSlashRedelegation(t *testing.T) { applyValidatorSetUpdates(t, f.sdkCtx, f.stakingKeeper, 1) // initialbalance unchanged - assert.DeepEqual(t, sdk.NewInt(10), rd.Entries[0].InitialBalance) + assert.DeepEqual(t, math.NewInt(10), rd.Entries[0].InitialBalance) // shares decreased del, found = f.stakingKeeper.GetDelegation(f.sdkCtx, addrDels[0], addrVals[1]) @@ -156,7 +171,7 @@ func TestSlashRedelegation(t *testing.T) { assert.Equal(t, int64(5), del.Shares.RoundInt64()) // pool bonded tokens should decrease - burnedCoins := sdk.NewCoins(sdk.NewCoin(f.stakingKeeper.BondDenom(f.sdkCtx), slashAmount)) + burnedCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, slashAmount)) assert.DeepEqual(t, balances.Sub(burnedCoins...), f.bankKeeper.GetAllBalances(f.sdkCtx, bondedPool.GetAddress())) } @@ -165,14 +180,15 @@ func TestSlashRedelegation(t *testing.T) { func TestSlashAtNegativeHeight(t *testing.T) { f, _, _ := bootstrapSlashTest(t, 10) consAddr := sdk.ConsAddress(PKs[0].Address()) - fraction := sdk.NewDecWithPrec(5, 1) + fraction := math.LegacyNewDecWithPrec(5, 1) bondedPool := f.stakingKeeper.GetBondedPool(f.sdkCtx) oldBondedPoolBalances := f.bankKeeper.GetAllBalances(f.sdkCtx, bondedPool.GetAddress()) _, found := f.stakingKeeper.GetValidatorByConsAddr(f.sdkCtx, consAddr) assert.Assert(t, found) - f.stakingKeeper.Slash(f.sdkCtx, consAddr, -2, 10, fraction) + _, err := f.stakingKeeper.Slash(f.sdkCtx, consAddr, -2, 10, fraction) + assert.NilError(t, err) // read updated state validator, found := f.stakingKeeper.GetValidatorByConsAddr(f.sdkCtx, consAddr) @@ -181,14 +197,20 @@ func TestSlashAtNegativeHeight(t *testing.T) { // end block applyValidatorSetUpdates(t, f.sdkCtx, f.stakingKeeper, 1) - validator, found = f.stakingKeeper.GetValidator(f.sdkCtx, validator.GetOperator()) + valbz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) + assert.NilError(t, err) + + validator, found = f.stakingKeeper.GetValidator(f.sdkCtx, valbz) assert.Assert(t, found) // power decreased assert.Equal(t, int64(5), validator.GetConsensusPower(f.stakingKeeper.PowerReduction(f.sdkCtx))) + bondDenom, err := f.stakingKeeper.BondDenom(f.sdkCtx) + assert.NilError(t, err) + // pool bonded shares decreased newBondedPoolBalances := f.bankKeeper.GetAllBalances(f.sdkCtx, bondedPool.GetAddress()) - diffTokens := oldBondedPoolBalances.Sub(newBondedPoolBalances...).AmountOf(f.stakingKeeper.BondDenom(f.sdkCtx)) + diffTokens := oldBondedPoolBalances.Sub(newBondedPoolBalances...).AmountOf(bondDenom) assert.DeepEqual(t, f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 5).String(), diffTokens.String()) } @@ -196,14 +218,18 @@ func TestSlashAtNegativeHeight(t *testing.T) { func TestSlashValidatorAtCurrentHeight(t *testing.T) { f, _, _ := bootstrapSlashTest(t, 10) consAddr := sdk.ConsAddress(PKs[0].Address()) - fraction := sdk.NewDecWithPrec(5, 1) + fraction := math.LegacyNewDecWithPrec(5, 1) + + bondDenom, err := f.stakingKeeper.BondDenom(f.sdkCtx) + assert.NilError(t, err) bondedPool := f.stakingKeeper.GetBondedPool(f.sdkCtx) oldBondedPoolBalances := f.bankKeeper.GetAllBalances(f.sdkCtx, bondedPool.GetAddress()) _, found := f.stakingKeeper.GetValidatorByConsAddr(f.sdkCtx, consAddr) assert.Assert(t, found) - f.stakingKeeper.Slash(f.sdkCtx, consAddr, f.sdkCtx.BlockHeight(), 10, fraction) + _, err = f.stakingKeeper.Slash(f.sdkCtx, consAddr, f.sdkCtx.BlockHeight(), 10, fraction) + assert.NilError(t, err) // read updated state validator, found := f.stakingKeeper.GetValidatorByConsAddr(f.sdkCtx, consAddr) @@ -212,14 +238,17 @@ func TestSlashValidatorAtCurrentHeight(t *testing.T) { // end block applyValidatorSetUpdates(t, f.sdkCtx, f.stakingKeeper, 1) - validator, found = f.stakingKeeper.GetValidator(f.sdkCtx, validator.GetOperator()) + valbz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) + assert.NilError(t, err) + + validator, found = f.stakingKeeper.GetValidator(f.sdkCtx, valbz) assert.Assert(t, found) // power decreased assert.Equal(t, int64(5), validator.GetConsensusPower(f.stakingKeeper.PowerReduction(f.sdkCtx))) // pool bonded shares decreased newBondedPoolBalances := f.bankKeeper.GetAllBalances(f.sdkCtx, bondedPool.GetAddress()) - diffTokens := oldBondedPoolBalances.Sub(newBondedPoolBalances...).AmountOf(f.stakingKeeper.BondDenom(f.sdkCtx)) + diffTokens := oldBondedPoolBalances.Sub(newBondedPoolBalances...).AmountOf(bondDenom) assert.DeepEqual(t, f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 5).String(), diffTokens.String()) } @@ -228,13 +257,16 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { f, addrDels, addrVals := bootstrapSlashTest(t, 10) consAddr := sdk.ConsAddress(PKs[0].Address()) - fraction := sdk.NewDecWithPrec(5, 1) + fraction := math.LegacyNewDecWithPrec(5, 1) + + bondDenom, err := f.stakingKeeper.BondDenom(f.sdkCtx) + assert.NilError(t, err) // set an unbonding delegation with expiration timestamp beyond which the // unbonding delegation shouldn't be slashed ubdTokens := f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 4) - ubd := types.NewUnbondingDelegation(addrDels[0], addrVals[0], 11, time.Unix(0, 0), ubdTokens, 0) - f.stakingKeeper.SetUnbondingDelegation(f.sdkCtx, ubd) + ubd := types.NewUnbondingDelegation(addrDels[0], addrVals[0], 11, time.Unix(0, 0), ubdTokens, 0, address.NewBech32Codec("cosmosvaloper"), address.NewBech32Codec("cosmos")) + assert.NilError(t, f.stakingKeeper.SetUnbondingDelegation(f.sdkCtx, ubd)) // slash validator for the first time f.sdkCtx = f.sdkCtx.WithBlockHeight(12) @@ -243,7 +275,8 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { _, found := f.stakingKeeper.GetValidatorByConsAddr(f.sdkCtx, consAddr) assert.Assert(t, found) - f.stakingKeeper.Slash(f.sdkCtx, consAddr, 10, 10, fraction) + _, err = f.stakingKeeper.Slash(f.sdkCtx, consAddr, 10, 10, fraction) + assert.NilError(t, err) // end block applyValidatorSetUpdates(t, f.sdkCtx, f.stakingKeeper, 1) @@ -258,7 +291,7 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { // bonded tokens burned newBondedPoolBalances := f.bankKeeper.GetAllBalances(f.sdkCtx, bondedPool.GetAddress()) - diffTokens := oldBondedPoolBalances.Sub(newBondedPoolBalances...).AmountOf(f.stakingKeeper.BondDenom(f.sdkCtx)) + diffTokens := oldBondedPoolBalances.Sub(newBondedPoolBalances...).AmountOf(bondDenom) assert.DeepEqual(t, f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 3), diffTokens) // read updated validator @@ -273,18 +306,19 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { // slash validator again f.sdkCtx = f.sdkCtx.WithBlockHeight(13) - f.stakingKeeper.Slash(f.sdkCtx, consAddr, 9, 10, fraction) + _, err = f.stakingKeeper.Slash(f.sdkCtx, consAddr, 9, 10, fraction) + assert.NilError(t, err) ubd, found = f.stakingKeeper.GetUnbondingDelegation(f.sdkCtx, addrDels[0], addrVals[0]) assert.Assert(t, found) assert.Assert(t, len(ubd.Entries) == 1) // balance decreased again - assert.DeepEqual(t, sdk.NewInt(0), ubd.Entries[0].Balance) + assert.DeepEqual(t, math.NewInt(0), ubd.Entries[0].Balance) // bonded tokens burned again newBondedPoolBalances = f.bankKeeper.GetAllBalances(f.sdkCtx, bondedPool.GetAddress()) - diffTokens = oldBondedPoolBalances.Sub(newBondedPoolBalances...).AmountOf(f.stakingKeeper.BondDenom(f.sdkCtx)) + diffTokens = oldBondedPoolBalances.Sub(newBondedPoolBalances...).AmountOf(bondDenom) assert.DeepEqual(t, f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 6), diffTokens) // read updated validator @@ -299,18 +333,19 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { // on the unbonding delegation, but it will slash stake bonded since the infraction // this may not be the desirable behavior, ref https://github.com/cosmos/cosmos-sdk/issues/1440 f.sdkCtx = f.sdkCtx.WithBlockHeight(13) - f.stakingKeeper.Slash(f.sdkCtx, consAddr, 9, 10, fraction) + _, err = f.stakingKeeper.Slash(f.sdkCtx, consAddr, 9, 10, fraction) + assert.NilError(t, err) ubd, found = f.stakingKeeper.GetUnbondingDelegation(f.sdkCtx, addrDels[0], addrVals[0]) assert.Assert(t, found) assert.Assert(t, len(ubd.Entries) == 1) // balance unchanged - assert.DeepEqual(t, sdk.NewInt(0), ubd.Entries[0].Balance) + assert.DeepEqual(t, math.NewInt(0), ubd.Entries[0].Balance) // bonded tokens burned again newBondedPoolBalances = f.bankKeeper.GetAllBalances(f.sdkCtx, bondedPool.GetAddress()) - diffTokens = oldBondedPoolBalances.Sub(newBondedPoolBalances...).AmountOf(f.stakingKeeper.BondDenom(f.sdkCtx)) + diffTokens = oldBondedPoolBalances.Sub(newBondedPoolBalances...).AmountOf(bondDenom) assert.DeepEqual(t, f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 9), diffTokens) // read updated validator @@ -325,18 +360,19 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { // on the unbonding delegation, but it will slash stake bonded since the infraction // this may not be the desirable behavior, ref https://github.com/cosmos/cosmos-sdk/issues/1440 f.sdkCtx = f.sdkCtx.WithBlockHeight(13) - f.stakingKeeper.Slash(f.sdkCtx, consAddr, 9, 10, fraction) + _, err = f.stakingKeeper.Slash(f.sdkCtx, consAddr, 9, 10, fraction) + assert.NilError(t, err) ubd, found = f.stakingKeeper.GetUnbondingDelegation(f.sdkCtx, addrDels[0], addrVals[0]) assert.Assert(t, found) assert.Assert(t, len(ubd.Entries) == 1) // balance unchanged - assert.DeepEqual(t, sdk.NewInt(0), ubd.Entries[0].Balance) + assert.DeepEqual(t, math.NewInt(0), ubd.Entries[0].Balance) // just 1 bonded token burned again since that's all the validator now has newBondedPoolBalances = f.bankKeeper.GetAllBalances(f.sdkCtx, bondedPool.GetAddress()) - diffTokens = oldBondedPoolBalances.Sub(newBondedPoolBalances...).AmountOf(f.stakingKeeper.BondDenom(f.sdkCtx)) + diffTokens = oldBondedPoolBalances.Sub(newBondedPoolBalances...).AmountOf(bondDenom) assert.DeepEqual(t, f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 10), diffTokens) // apply TM updates @@ -353,17 +389,18 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { func TestSlashWithRedelegation(t *testing.T) { f, addrDels, addrVals := bootstrapSlashTest(t, 10) consAddr := sdk.ConsAddress(PKs[0].Address()) - fraction := sdk.NewDecWithPrec(5, 1) - bondDenom := f.stakingKeeper.BondDenom(f.sdkCtx) + fraction := math.LegacyNewDecWithPrec(5, 1) + bondDenom, err := f.stakingKeeper.BondDenom(f.sdkCtx) + assert.NilError(t, err) // set a redelegation rdTokens := f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 6) - rd := types.NewRedelegation(addrDels[0], addrVals[0], addrVals[1], 11, time.Unix(0, 0), rdTokens, sdk.NewDecFromInt(rdTokens), 0) - f.stakingKeeper.SetRedelegation(f.sdkCtx, rd) + rd := types.NewRedelegation(addrDels[0], addrVals[0], addrVals[1], 11, time.Unix(0, 0), rdTokens, math.LegacyNewDecFromInt(rdTokens), 0, address.NewBech32Codec("cosmosvaloper"), address.NewBech32Codec("cosmos")) + assert.NilError(t, f.stakingKeeper.SetRedelegation(f.sdkCtx, rd)) // set the associated delegation - del := types.NewDelegation(addrDels[0], addrVals[1], sdk.NewDecFromInt(rdTokens)) - f.stakingKeeper.SetDelegation(f.sdkCtx, del) + del := types.NewDelegation(addrDels[0].String(), addrVals[1].String(), math.LegacyNewDecFromInt(rdTokens)) + assert.NilError(t, f.stakingKeeper.SetDelegation(f.sdkCtx, del)) // update bonded tokens bondedPool := f.stakingKeeper.GetBondedPool(f.sdkCtx) @@ -382,10 +419,10 @@ func TestSlashWithRedelegation(t *testing.T) { _, found := f.stakingKeeper.GetValidatorByConsAddr(f.sdkCtx, consAddr) assert.Assert(t, found) - require.NotPanics(t, func() { - f.stakingKeeper.Slash(f.sdkCtx, consAddr, 10, 10, fraction) - }) - burnAmount := sdk.NewDecFromInt(f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 10)).Mul(fraction).TruncateInt() + _, err = f.stakingKeeper.Slash(f.sdkCtx, consAddr, 10, 10, fraction) + assert.NilError(t, err) + + burnAmount := math.LegacyNewDecFromInt(f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 10)).Mul(fraction).TruncateInt() bondedPool = f.stakingKeeper.GetBondedPool(f.sdkCtx) notBondedPool = f.stakingKeeper.GetNotBondedPool(f.sdkCtx) @@ -415,9 +452,8 @@ func TestSlashWithRedelegation(t *testing.T) { _, found = f.stakingKeeper.GetValidatorByConsAddr(f.sdkCtx, consAddr) assert.Assert(t, found) - require.NotPanics(t, func() { - f.stakingKeeper.Slash(f.sdkCtx, consAddr, 10, 10, math.LegacyOneDec()) - }) + _, err = f.stakingKeeper.Slash(f.sdkCtx, consAddr, 10, 10, math.LegacyOneDec()) + assert.NilError(t, err) burnAmount = f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 7) // read updated pool @@ -451,11 +487,10 @@ func TestSlashWithRedelegation(t *testing.T) { _, found = f.stakingKeeper.GetValidatorByConsAddr(f.sdkCtx, consAddr) assert.Assert(t, found) - require.NotPanics(t, func() { - f.stakingKeeper.Slash(f.sdkCtx, consAddr, 10, 10, math.LegacyOneDec()) - }) + _, err = f.stakingKeeper.Slash(f.sdkCtx, consAddr, 10, 10, math.LegacyOneDec()) + assert.NilError(t, err) - burnAmount = sdk.NewDecFromInt(f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 10)).Mul(math.LegacyOneDec()).TruncateInt() + burnAmount = math.LegacyNewDecFromInt(f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 10)).Mul(math.LegacyOneDec()).TruncateInt() burnAmount = burnAmount.Sub(math.LegacyOneDec().MulInt(rdTokens).TruncateInt()) // read updated pool @@ -486,9 +521,8 @@ func TestSlashWithRedelegation(t *testing.T) { validator, _ = f.stakingKeeper.GetValidatorByConsAddr(f.sdkCtx, consAddr) assert.Equal(t, validator.GetStatus(), types.Unbonding) - require.NotPanics(t, func() { - f.stakingKeeper.Slash(f.sdkCtx, consAddr, 10, 10, math.LegacyOneDec()) - }) + _, err = f.stakingKeeper.Slash(f.sdkCtx, consAddr, 10, 10, math.LegacyOneDec()) + assert.NilError(t, err) // read updated pool bondedPool = f.stakingKeeper.GetBondedPool(f.sdkCtx) @@ -512,25 +546,26 @@ func TestSlashWithRedelegation(t *testing.T) { // tests Slash at a previous height with both an unbonding delegation and a redelegation func TestSlashBoth(t *testing.T) { f, addrDels, addrVals := bootstrapSlashTest(t, 10) - fraction := sdk.NewDecWithPrec(5, 1) - bondDenom := f.stakingKeeper.BondDenom(f.sdkCtx) + fraction := math.LegacyNewDecWithPrec(5, 1) + bondDenom, err := f.stakingKeeper.BondDenom(f.sdkCtx) + assert.NilError(t, err) // set a redelegation with expiration timestamp beyond which the // redelegation shouldn't be slashed rdATokens := f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 6) - rdA := types.NewRedelegation(addrDels[0], addrVals[0], addrVals[1], 11, time.Unix(0, 0), rdATokens, sdk.NewDecFromInt(rdATokens), 0) - f.stakingKeeper.SetRedelegation(f.sdkCtx, rdA) + rdA := types.NewRedelegation(addrDels[0], addrVals[0], addrVals[1], 11, time.Unix(0, 0), rdATokens, math.LegacyNewDecFromInt(rdATokens), 0, address.NewBech32Codec("cosmosvaloper"), address.NewBech32Codec("cosmos")) + assert.NilError(t, f.stakingKeeper.SetRedelegation(f.sdkCtx, rdA)) // set the associated delegation - delA := types.NewDelegation(addrDels[0], addrVals[1], sdk.NewDecFromInt(rdATokens)) - f.stakingKeeper.SetDelegation(f.sdkCtx, delA) + delA := types.NewDelegation(addrDels[0].String(), addrVals[1].String(), math.LegacyNewDecFromInt(rdATokens)) + assert.NilError(t, f.stakingKeeper.SetDelegation(f.sdkCtx, delA)) // set an unbonding delegation with expiration timestamp (beyond which the // unbonding delegation shouldn't be slashed) ubdATokens := f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 4) ubdA := types.NewUnbondingDelegation(addrDels[0], addrVals[0], 11, - time.Unix(0, 0), ubdATokens, 0) - f.stakingKeeper.SetUnbondingDelegation(f.sdkCtx, ubdA) + time.Unix(0, 0), ubdATokens, 0, address.NewBech32Codec("cosmosvaloper"), address.NewBech32Codec("cosmos")) + assert.NilError(t, f.stakingKeeper.SetUnbondingDelegation(f.sdkCtx, ubdA)) bondedCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, rdATokens.MulRaw(2))) notBondedCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, ubdATokens)) @@ -552,10 +587,11 @@ func TestSlashBoth(t *testing.T) { _, found := f.stakingKeeper.GetValidatorByConsAddr(f.sdkCtx, sdk.GetConsAddress(PKs[0])) assert.Assert(t, found) consAddr0 := sdk.ConsAddress(PKs[0].Address()) - f.stakingKeeper.Slash(f.sdkCtx, consAddr0, 10, 10, fraction) + _, err = f.stakingKeeper.Slash(f.sdkCtx, consAddr0, 10, 10, fraction) + assert.NilError(t, err) burnedNotBondedAmount := fraction.MulInt(ubdATokens).TruncateInt() - burnedBondAmount := sdk.NewDecFromInt(f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 10)).Mul(fraction).TruncateInt() + burnedBondAmount := math.LegacyNewDecFromInt(f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 10)).Mul(fraction).TruncateInt() burnedBondAmount = burnedBondAmount.Sub(burnedNotBondedAmount) // read updated pool @@ -582,12 +618,14 @@ func TestSlashBoth(t *testing.T) { func TestSlashAmount(t *testing.T) { f, _, _ := bootstrapSlashTest(t, 10) consAddr := sdk.ConsAddress(PKs[0].Address()) - fraction := sdk.NewDecWithPrec(5, 1) - burnedCoins := f.stakingKeeper.Slash(f.sdkCtx, consAddr, f.sdkCtx.BlockHeight(), 10, fraction) + fraction := math.LegacyNewDecWithPrec(5, 1) + burnedCoins, err := f.stakingKeeper.Slash(f.sdkCtx, consAddr, f.sdkCtx.BlockHeight(), 10, fraction) + assert.NilError(t, err) assert.Assert(t, burnedCoins.GT(math.ZeroInt())) // test the case where the validator was not found, which should return no coins _, addrVals := generateAddresses(f, 100) - noBurned := f.stakingKeeper.Slash(f.sdkCtx, sdk.ConsAddress(addrVals[0]), f.sdkCtx.BlockHeight(), 10, fraction) - assert.Assert(t, sdk.NewInt(0).Equal(noBurned)) + noBurned, err := f.stakingKeeper.Slash(f.sdkCtx, sdk.ConsAddress(addrVals[0]), f.sdkCtx.BlockHeight(), 10, fraction) + assert.NilError(t, err) + assert.Assert(t, math.NewInt(0).Equal(noBurned)) } diff --git a/tests/integration/staking/keeper/unbonding_test.go b/tests/integration/staking/keeper/unbonding_test.go index b61fc93653ac..a61189f88382 100644 --- a/tests/integration/staking/keeper/unbonding_test.go +++ b/tests/integration/staking/keeper/unbonding_test.go @@ -4,10 +4,11 @@ import ( "testing" "time" - "cosmossdk.io/math" "github.com/golang/mock/gomock" "gotest.tools/v3/assert" + "cosmossdk.io/math" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" banktestutil "github.com/cosmos/cosmos-sdk/x/bank/testutil" @@ -49,11 +50,11 @@ func SetupUnbondingTests(t *testing.T, f *fixture, hookCalled *bool, ubdeID *uin valTokens := f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 10) startTokens := f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 20) - bondDenom = f.stakingKeeper.BondDenom(f.sdkCtx) + bondDenom, err := f.stakingKeeper.BondDenom(f.sdkCtx) + assert.NilError(t, err) notBondedPool := f.stakingKeeper.GetNotBondedPool(f.sdkCtx) assert.NilError(t, banktestutil.FundModuleAccount(f.sdkCtx, f.bankKeeper, notBondedPool.GetName(), sdk.NewCoins(sdk.NewCoin(bondDenom, startTokens)))) - f.bankKeeper.SendCoinsFromModuleToModule(f.sdkCtx, types.BondedPoolName, types.NotBondedPoolName, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, startTokens))) f.accountKeeper.SetModuleAccount(f.sdkCtx, notBondedPool) // Create a validator @@ -66,8 +67,8 @@ func SetupUnbondingTests(t *testing.T, f *fixture, hookCalled *bool, ubdeID *uin assert.Assert(t, validator1.IsBonded()) // Create a delegator - delegation := types.NewDelegation(addrDels[0], addrVals[0], issuedShares1) - f.stakingKeeper.SetDelegation(f.sdkCtx, delegation) + delegation := types.NewDelegation(addrDels[0].String(), addrVals[0].String(), issuedShares1) + assert.NilError(t, f.stakingKeeper.SetDelegation(f.sdkCtx, delegation)) // Create a validator to redelegate to validator2 := testutil.NewValidator(t, addrVals[1], PKs[1]) @@ -110,7 +111,8 @@ func doUnbondingDelegation( assert.Assert(math.IntEq(t, notBondedAmt1.AddRaw(1), notBondedAmt2)) // Check that the unbonding happened- we look up the entry and see that it has the correct number of shares - unbondingDelegations := stakingKeeper.GetUnbondingDelegationsFromValidator(ctx, addrVals[0]) + unbondingDelegations, err := stakingKeeper.GetUnbondingDelegationsFromValidator(ctx, addrVals[0]) + assert.NilError(t, err) assert.DeepEqual(t, math.NewInt(1), unbondingDelegations[0].Entries[0].Balance) // check that our hook was called @@ -132,7 +134,8 @@ func doRedelegation( assert.NilError(t, err) // Check that the redelegation happened- we look up the entry and see that it has the correct number of shares - redelegations := stakingKeeper.GetRedelegationsFromSrcValidator(ctx, addrVals[0]) + redelegations, err := stakingKeeper.GetRedelegationsFromSrcValidator(ctx, addrVals[0]) + assert.NilError(t, err) assert.Equal(t, 1, len(redelegations)) assert.DeepEqual(t, math.LegacyNewDec(1), redelegations[0].Entries[0].SharesDst) @@ -188,26 +191,28 @@ func TestValidatorUnbondingOnHold1(t *testing.T) { assert.NilError(t, err) // Try to unbond validator - f.stakingKeeper.UnbondAllMatureValidators(f.sdkCtx) + assert.NilError(t, f.stakingKeeper.UnbondAllMatureValidators(f.sdkCtx)) // Check that validator unbonding is not complete (is not mature yet) validator, found := f.stakingKeeper.GetValidator(f.sdkCtx, addrVals[0]) assert.Assert(t, found) assert.Equal(t, types.Unbonding, validator.Status) - unbondingVals := f.stakingKeeper.GetUnbondingValidators(f.sdkCtx, completionTime, completionHeight) + unbondingVals, err := f.stakingKeeper.GetUnbondingValidators(f.sdkCtx, completionTime, completionHeight) + assert.NilError(t, err) assert.Equal(t, 1, len(unbondingVals)) assert.Equal(t, validator.OperatorAddress, unbondingVals[0]) // PROVIDER CHAIN'S UNBONDING PERIOD ENDS - BUT UNBONDING CANNOT COMPLETE f.sdkCtx = f.sdkCtx.WithBlockTime(completionTime.Add(time.Duration(1))) f.sdkCtx = f.sdkCtx.WithBlockHeight(completionHeight + 1) - f.stakingKeeper.UnbondAllMatureValidators(f.sdkCtx) + assert.NilError(t, f.stakingKeeper.UnbondAllMatureValidators(f.sdkCtx)) // Check that validator unbonding is complete validator, found = f.stakingKeeper.GetValidator(f.sdkCtx, addrVals[0]) assert.Assert(t, found) assert.Equal(t, types.Unbonded, validator.Status) - unbondingVals = f.stakingKeeper.GetUnbondingValidators(f.sdkCtx, completionTime, completionHeight) + unbondingVals, err = f.stakingKeeper.GetUnbondingValidators(f.sdkCtx, completionTime, completionHeight) + assert.NilError(t, err) assert.Equal(t, 0, len(unbondingVals)) } @@ -246,7 +251,7 @@ func TestValidatorUnbondingOnHold2(t *testing.T) { // PROVIDER CHAIN'S UNBONDING PERIOD ENDS - BUT UNBONDING CANNOT COMPLETE f.sdkCtx = f.sdkCtx.WithBlockTime(completionTime.Add(time.Duration(1))) f.sdkCtx = f.sdkCtx.WithBlockHeight(completionHeight + 1) - f.stakingKeeper.UnbondAllMatureValidators(f.sdkCtx) + assert.NilError(t, f.stakingKeeper.UnbondAllMatureValidators(f.sdkCtx)) // Check that unbonding is not complete for both validators validator1, found := f.stakingKeeper.GetValidator(f.sdkCtx, addrVals[0]) @@ -255,17 +260,18 @@ func TestValidatorUnbondingOnHold2(t *testing.T) { validator2, found = f.stakingKeeper.GetValidator(f.sdkCtx, addrVals[1]) assert.Assert(t, found) assert.Equal(t, types.Unbonding, validator2.Status) - unbondingVals := f.stakingKeeper.GetUnbondingValidators(f.sdkCtx, completionTime, completionHeight) + unbondingVals, err := f.stakingKeeper.GetUnbondingValidators(f.sdkCtx, completionTime, completionHeight) + assert.NilError(t, err) assert.Equal(t, 2, len(unbondingVals)) assert.Equal(t, validator1.OperatorAddress, unbondingVals[0]) assert.Equal(t, validator2.OperatorAddress, unbondingVals[1]) // CONSUMER CHAIN'S UNBONDING PERIOD ENDS - STOPPED UNBONDING CAN NOW COMPLETE - err := f.stakingKeeper.UnbondingCanComplete(f.sdkCtx, ubdeIDs[0]) + err = f.stakingKeeper.UnbondingCanComplete(f.sdkCtx, ubdeIDs[0]) assert.NilError(t, err) // Try again to unbond validators - f.stakingKeeper.UnbondAllMatureValidators(f.sdkCtx) + assert.NilError(t, f.stakingKeeper.UnbondAllMatureValidators(f.sdkCtx)) // Check that unbonding is complete for validator1, but not for validator2 validator1, found = f.stakingKeeper.GetValidator(f.sdkCtx, addrVals[0]) @@ -274,7 +280,8 @@ func TestValidatorUnbondingOnHold2(t *testing.T) { validator2, found = f.stakingKeeper.GetValidator(f.sdkCtx, addrVals[1]) assert.Assert(t, found) assert.Equal(t, types.Unbonding, validator2.Status) - unbondingVals = f.stakingKeeper.GetUnbondingValidators(f.sdkCtx, completionTime, completionHeight) + unbondingVals, err = f.stakingKeeper.GetUnbondingValidators(f.sdkCtx, completionTime, completionHeight) + assert.NilError(t, err) assert.Equal(t, 1, len(unbondingVals)) assert.Equal(t, validator2.OperatorAddress, unbondingVals[0]) @@ -283,13 +290,14 @@ func TestValidatorUnbondingOnHold2(t *testing.T) { assert.NilError(t, err) // Try again to unbond validators - f.stakingKeeper.UnbondAllMatureValidators(f.sdkCtx) + assert.NilError(t, f.stakingKeeper.UnbondAllMatureValidators(f.sdkCtx)) // Check that unbonding is complete for validator2 validator2, found = f.stakingKeeper.GetValidator(f.sdkCtx, addrVals[1]) assert.Assert(t, found) assert.Equal(t, types.Unbonded, validator2.Status) - unbondingVals = f.stakingKeeper.GetUnbondingValidators(f.sdkCtx, completionTime, completionHeight) + unbondingVals, err = f.stakingKeeper.GetUnbondingValidators(f.sdkCtx, completionTime, completionHeight) + assert.NilError(t, err) assert.Equal(t, 0, len(unbondingVals)) } @@ -311,7 +319,8 @@ func TestRedelegationOnHold1(t *testing.T) { assert.NilError(t, err) // Redelegation is not complete - still exists - redelegations := f.stakingKeeper.GetRedelegationsFromSrcValidator(f.sdkCtx, addrVals[0]) + redelegations, err := f.stakingKeeper.GetRedelegationsFromSrcValidator(f.sdkCtx, addrVals[0]) + assert.NilError(t, err) assert.Equal(t, 1, len(redelegations)) // PROVIDER CHAIN'S UNBONDING PERIOD ENDS - STOPPED UNBONDING CAN NOW COMPLETE @@ -320,7 +329,8 @@ func TestRedelegationOnHold1(t *testing.T) { assert.NilError(t, err) // Redelegation is complete and record is gone - redelegations = f.stakingKeeper.GetRedelegationsFromSrcValidator(f.sdkCtx, addrVals[0]) + redelegations, err = f.stakingKeeper.GetRedelegationsFromSrcValidator(f.sdkCtx, addrVals[0]) + assert.NilError(t, err) assert.Equal(t, 0, len(redelegations)) } @@ -343,7 +353,8 @@ func TestRedelegationOnHold2(t *testing.T) { assert.NilError(t, err) // Redelegation is not complete - still exists - redelegations := f.stakingKeeper.GetRedelegationsFromSrcValidator(f.sdkCtx, addrVals[0]) + redelegations, err := f.stakingKeeper.GetRedelegationsFromSrcValidator(f.sdkCtx, addrVals[0]) + assert.NilError(t, err) assert.Equal(t, 1, len(redelegations)) // CONSUMER CHAIN'S UNBONDING PERIOD ENDS - STOPPED UNBONDING CAN NOW COMPLETE @@ -351,7 +362,8 @@ func TestRedelegationOnHold2(t *testing.T) { assert.NilError(t, err) // Redelegation is complete and record is gone - redelegations = f.stakingKeeper.GetRedelegationsFromSrcValidator(f.sdkCtx, addrVals[0]) + redelegations, err = f.stakingKeeper.GetRedelegationsFromSrcValidator(f.sdkCtx, addrVals[0]) + assert.NilError(t, err) assert.Equal(t, 0, len(redelegations)) } diff --git a/tests/integration/staking/keeper/validator_bench_test.go b/tests/integration/staking/keeper/validator_bench_test.go index b63e0d4f0710..d69d6fe4f329 100644 --- a/tests/integration/staking/keeper/validator_bench_test.go +++ b/tests/integration/staking/keeper/validator_bench_test.go @@ -1,6 +1,7 @@ package keeper_test import ( + "bytes" "fmt" "testing" @@ -58,9 +59,12 @@ func BenchmarkGetValidatorDelegations(b *testing.B) { for i := 0; i < delegationsNum; i++ { delegator := sdk.AccAddress(fmt.Sprintf("address%d", i)) banktestutil.FundAccount(f.sdkCtx, f.bankKeeper, delegator, - sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(int64(i))))) - NewDel := types.NewDelegation(delegator, val, math.LegacyNewDec(int64(i))) - f.stakingKeeper.SetDelegation(f.sdkCtx, NewDel) + sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(int64(i))))) + NewDel := types.NewDelegation(delegator.String(), val.String(), math.LegacyNewDec(int64(i))) + + if err := f.stakingKeeper.SetDelegation(f.sdkCtx, NewDel); err != nil { + panic(err) + } } } @@ -90,10 +94,11 @@ func BenchmarkGetValidatorDelegationsLegacy(b *testing.B) { for _, val := range valAddrs { for i := 0; i < delegationsNum; i++ { delegator := sdk.AccAddress(fmt.Sprintf("address%d", i)) - banktestutil.FundAccount(f.sdkCtx, f.bankKeeper, delegator, - sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(int64(i))))) - NewDel := types.NewDelegation(delegator, val, math.LegacyNewDec(int64(i))) - f.stakingKeeper.SetDelegation(f.sdkCtx, NewDel) + banktestutil.FundAccount(f.sdkCtx, f.bankKeeper, delegator, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(int64(i))))) + NewDel := types.NewDelegation(delegator.String(), val.String(), math.LegacyNewDec(int64(i))) + if err := f.stakingKeeper.SetDelegation(f.sdkCtx, NewDel); err != nil { + panic(err) + } } } @@ -114,8 +119,15 @@ func updateValidatorDelegationsLegacy(f *fixture, existingValAddr, newValAddr sd for ; iterator.Valid(); iterator.Next() { delegation := types.MustUnmarshalDelegation(cdc, iterator.Value()) - if delegation.GetValidatorAddr().Equals(existingValAddr) { - k.RemoveDelegation(f.sdkCtx, delegation) + valAddr, err := k.ValidatorAddressCodec().StringToBytes(delegation.GetValidatorAddr()) + if err != nil { + panic(err) + } + + if bytes.EqualFold(valAddr, existingValAddr) { + if err := k.RemoveDelegation(f.sdkCtx, delegation); err != nil { + panic(err) + } delegation.ValidatorAddress = newValAddr.String() k.SetDelegation(f.sdkCtx, delegation) } diff --git a/tests/integration/staking/keeper/validator_test.go b/tests/integration/staking/keeper/validator_test.go index 3cf24ad300ed..06b8f8d38123 100644 --- a/tests/integration/staking/keeper/validator_test.go +++ b/tests/integration/staking/keeper/validator_test.go @@ -4,10 +4,11 @@ import ( "fmt" "testing" - "cosmossdk.io/math" abci "github.com/cometbft/cometbft/abci/types" "gotest.tools/v3/assert" + "cosmossdk.io/math" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" @@ -17,9 +18,10 @@ import ( "github.com/cosmos/cosmos-sdk/x/staking/types" ) -func newMonikerValidator(t testing.TB, operator sdk.ValAddress, pubKey cryptotypes.PubKey, moniker string) types.Validator { - v, err := types.NewValidator(operator, pubKey, types.Description{Moniker: moniker}) - assert.NilError(t, err) +func newMonikerValidator(tb testing.TB, operator sdk.ValAddress, pubKey cryptotypes.PubKey, moniker string) types.Validator { + tb.Helper() + v, err := types.NewValidator(operator.String(), pubKey, types.Description{Moniker: moniker}) + assert.NilError(tb, err) return v } @@ -28,8 +30,11 @@ func bootstrapValidatorTest(t testing.TB, power int64, numAddrs int) (*fixture, addrDels, addrVals := generateAddresses(f, numAddrs) + bondDenom, err := f.stakingKeeper.BondDenom(f.sdkCtx) + assert.NilError(t, err) + amt := f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, power) - totalSupply := sdk.NewCoins(sdk.NewCoin(f.stakingKeeper.BondDenom(f.sdkCtx), amt.MulRaw(int64(len(addrDels))))) + totalSupply := sdk.NewCoins(sdk.NewCoin(bondDenom, amt.MulRaw(int64(len(addrDels))))) notBondedPool := f.stakingKeeper.GetNotBondedPool(f.sdkCtx) @@ -65,13 +70,17 @@ func TestUpdateBondedValidatorsDecreaseCliff(t *testing.T) { notBondedPool := f.stakingKeeper.GetNotBondedPool(f.sdkCtx) // create keeper parameters - params := f.stakingKeeper.GetParams(f.sdkCtx) + params, err := f.stakingKeeper.GetParams(f.sdkCtx) + assert.NilError(t, err) params.MaxValidators = uint32(maxVals) - f.stakingKeeper.SetParams(f.sdkCtx, params) + assert.NilError(t, f.stakingKeeper.SetParams(f.sdkCtx, params)) + + bondDenom, err := f.stakingKeeper.BondDenom(f.sdkCtx) + assert.NilError(t, err) // create a random pool - assert.NilError(t, banktestutil.FundModuleAccount(f.sdkCtx, f.bankKeeper, bondedPool.GetName(), sdk.NewCoins(sdk.NewCoin(f.stakingKeeper.BondDenom(f.sdkCtx), f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 1234))))) - assert.NilError(t, banktestutil.FundModuleAccount(f.sdkCtx, f.bankKeeper, notBondedPool.GetName(), sdk.NewCoins(sdk.NewCoin(f.stakingKeeper.BondDenom(f.sdkCtx), f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 10000))))) + assert.NilError(t, banktestutil.FundModuleAccount(f.sdkCtx, f.bankKeeper, bondedPool.GetName(), sdk.NewCoins(sdk.NewCoin(bondDenom, f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 1234))))) + assert.NilError(t, banktestutil.FundModuleAccount(f.sdkCtx, f.bankKeeper, notBondedPool.GetName(), sdk.NewCoins(sdk.NewCoin(bondDenom, f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 10000))))) f.accountKeeper.SetModuleAccount(f.sdkCtx, bondedPool) f.accountKeeper.SetModuleAccount(f.sdkCtx, notBondedPool) @@ -93,7 +102,7 @@ func TestUpdateBondedValidatorsDecreaseCliff(t *testing.T) { // validator and next in line cliff validator f.stakingKeeper.DeleteValidatorByPowerIndex(f.sdkCtx, nextCliffVal) shares := f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 21) - nextCliffVal, _ = nextCliffVal.RemoveDelShares(sdk.NewDecFromInt(shares)) + nextCliffVal, _ = nextCliffVal.RemoveDelShares(math.LegacyNewDecFromInt(shares)) _ = keeper.TestingUpdateValidator(f.stakingKeeper, f.sdkCtx, nextCliffVal, true) expectedValStatus := map[int]types.BondStatus{ @@ -124,8 +133,9 @@ func TestSlashToZeroPowerRemoved(t *testing.T) { valTokens := f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 100) bondedPool := f.stakingKeeper.GetBondedPool(f.sdkCtx) - - assert.NilError(t, banktestutil.FundModuleAccount(f.sdkCtx, f.bankKeeper, bondedPool.GetName(), sdk.NewCoins(sdk.NewCoin(f.stakingKeeper.BondDenom(f.sdkCtx), valTokens)))) + bondDenom, err := f.stakingKeeper.BondDenom(f.sdkCtx) + assert.NilError(t, err) + assert.NilError(t, banktestutil.FundModuleAccount(f.sdkCtx, f.bankKeeper, bondedPool.GetName(), sdk.NewCoins(sdk.NewCoin(bondDenom, valTokens)))) f.accountKeeper.SetModuleAccount(f.sdkCtx, bondedPool) @@ -163,18 +173,19 @@ func TestGetValidatorSortingUnmixed(t *testing.T) { validators[i] = testutil.NewValidator(t, sdk.ValAddress(addrs[i]), PKs[i]) validators[i].Status = types.Bonded validators[i].Tokens = amt - validators[i].DelegatorShares = sdk.NewDecFromInt(amt) + validators[i].DelegatorShares = math.LegacyNewDecFromInt(amt) keeper.TestingUpdateValidator(f.stakingKeeper, f.sdkCtx, validators[i], true) } // first make sure everything made it in to the gotValidator group - resValidators := f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + resValidators, err := f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + assert.NilError(t, err) assert.Equal(t, n, len(resValidators)) - assert.DeepEqual(t, sdk.NewInt(400).Mul(f.stakingKeeper.PowerReduction(f.sdkCtx)), resValidators[0].BondedTokens()) - assert.DeepEqual(t, sdk.NewInt(200).Mul(f.stakingKeeper.PowerReduction(f.sdkCtx)), resValidators[1].BondedTokens()) - assert.DeepEqual(t, sdk.NewInt(100).Mul(f.stakingKeeper.PowerReduction(f.sdkCtx)), resValidators[2].BondedTokens()) - assert.DeepEqual(t, sdk.NewInt(1).Mul(f.stakingKeeper.PowerReduction(f.sdkCtx)), resValidators[3].BondedTokens()) - assert.DeepEqual(t, sdk.NewInt(0), resValidators[4].BondedTokens()) + assert.DeepEqual(t, math.NewInt(400).Mul(f.stakingKeeper.PowerReduction(f.sdkCtx)), resValidators[0].BondedTokens()) + assert.DeepEqual(t, math.NewInt(200).Mul(f.stakingKeeper.PowerReduction(f.sdkCtx)), resValidators[1].BondedTokens()) + assert.DeepEqual(t, math.NewInt(100).Mul(f.stakingKeeper.PowerReduction(f.sdkCtx)), resValidators[2].BondedTokens()) + assert.DeepEqual(t, math.NewInt(1).Mul(f.stakingKeeper.PowerReduction(f.sdkCtx)), resValidators[3].BondedTokens()) + assert.DeepEqual(t, math.NewInt(0), resValidators[4].BondedTokens()) assert.Equal(t, validators[3].OperatorAddress, resValidators[0].OperatorAddress, "%v", resValidators) assert.Equal(t, validators[4].OperatorAddress, resValidators[1].OperatorAddress, "%v", resValidators) assert.Equal(t, validators[1].OperatorAddress, resValidators[2].OperatorAddress, "%v", resValidators) @@ -182,25 +193,28 @@ func TestGetValidatorSortingUnmixed(t *testing.T) { assert.Equal(t, validators[0].OperatorAddress, resValidators[4].OperatorAddress, "%v", resValidators) // test a basic increase in voting power - validators[3].Tokens = sdk.NewInt(500).Mul(f.stakingKeeper.PowerReduction(f.sdkCtx)) + validators[3].Tokens = math.NewInt(500).Mul(f.stakingKeeper.PowerReduction(f.sdkCtx)) keeper.TestingUpdateValidator(f.stakingKeeper, f.sdkCtx, validators[3], true) - resValidators = f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + resValidators, err = f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + assert.NilError(t, err) assert.Equal(t, len(resValidators), n) assert.Assert(ValEq(t, validators[3], resValidators[0])) // test a decrease in voting power - validators[3].Tokens = sdk.NewInt(300).Mul(f.stakingKeeper.PowerReduction(f.sdkCtx)) + validators[3].Tokens = math.NewInt(300).Mul(f.stakingKeeper.PowerReduction(f.sdkCtx)) keeper.TestingUpdateValidator(f.stakingKeeper, f.sdkCtx, validators[3], true) - resValidators = f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + resValidators, err = f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + assert.NilError(t, err) assert.Equal(t, len(resValidators), n) assert.Assert(ValEq(t, validators[3], resValidators[0])) assert.Assert(ValEq(t, validators[4], resValidators[1])) // test equal voting power, different age - validators[3].Tokens = sdk.NewInt(200).Mul(f.stakingKeeper.PowerReduction(f.sdkCtx)) + validators[3].Tokens = math.NewInt(200).Mul(f.stakingKeeper.PowerReduction(f.sdkCtx)) f.sdkCtx = f.sdkCtx.WithBlockHeight(10) keeper.TestingUpdateValidator(f.stakingKeeper, f.sdkCtx, validators[3], true) - resValidators = f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + resValidators, err = f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + assert.NilError(t, err) assert.Equal(t, len(resValidators), n) assert.Assert(ValEq(t, validators[3], resValidators[0])) assert.Assert(ValEq(t, validators[4], resValidators[1])) @@ -208,20 +222,23 @@ func TestGetValidatorSortingUnmixed(t *testing.T) { // no change in voting power - no change in sort f.sdkCtx = f.sdkCtx.WithBlockHeight(20) keeper.TestingUpdateValidator(f.stakingKeeper, f.sdkCtx, validators[4], true) - resValidators = f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + resValidators, err = f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + assert.NilError(t, err) assert.Equal(t, len(resValidators), n) assert.Assert(ValEq(t, validators[3], resValidators[0])) assert.Assert(ValEq(t, validators[4], resValidators[1])) // change in voting power of both validators, both still in v-set, no age change - validators[3].Tokens = sdk.NewInt(300).Mul(f.stakingKeeper.PowerReduction(f.sdkCtx)) - validators[4].Tokens = sdk.NewInt(300).Mul(f.stakingKeeper.PowerReduction(f.sdkCtx)) + validators[3].Tokens = math.NewInt(300).Mul(f.stakingKeeper.PowerReduction(f.sdkCtx)) + validators[4].Tokens = math.NewInt(300).Mul(f.stakingKeeper.PowerReduction(f.sdkCtx)) keeper.TestingUpdateValidator(f.stakingKeeper, f.sdkCtx, validators[3], true) - resValidators = f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + resValidators, err = f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + assert.NilError(t, err) assert.Equal(t, len(resValidators), n) f.sdkCtx = f.sdkCtx.WithBlockHeight(30) keeper.TestingUpdateValidator(f.stakingKeeper, f.sdkCtx, validators[4], true) - resValidators = f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + resValidators, err = f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + assert.NilError(t, err) assert.Equal(t, len(resValidators), n, "%v", resValidators) assert.Assert(ValEq(t, validators[3], resValidators[0])) assert.Assert(ValEq(t, validators[4], resValidators[1])) @@ -232,16 +249,20 @@ func TestGetValidatorSortingMixed(t *testing.T) { bondedPool := f.stakingKeeper.GetBondedPool(f.sdkCtx) notBondedPool := f.stakingKeeper.GetNotBondedPool(f.sdkCtx) - assert.NilError(t, banktestutil.FundModuleAccount(f.sdkCtx, f.bankKeeper, bondedPool.GetName(), sdk.NewCoins(sdk.NewCoin(f.stakingKeeper.BondDenom(f.sdkCtx), f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 501))))) - assert.NilError(t, banktestutil.FundModuleAccount(f.sdkCtx, f.bankKeeper, notBondedPool.GetName(), sdk.NewCoins(sdk.NewCoin(f.stakingKeeper.BondDenom(f.sdkCtx), f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 0))))) + bondDenom, err := f.stakingKeeper.BondDenom(f.sdkCtx) + assert.NilError(t, err) + + assert.NilError(t, banktestutil.FundModuleAccount(f.sdkCtx, f.bankKeeper, bondedPool.GetName(), sdk.NewCoins(sdk.NewCoin(bondDenom, f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 501))))) + assert.NilError(t, banktestutil.FundModuleAccount(f.sdkCtx, f.bankKeeper, notBondedPool.GetName(), sdk.NewCoins(sdk.NewCoin(bondDenom, f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 0))))) f.accountKeeper.SetModuleAccount(f.sdkCtx, notBondedPool) f.accountKeeper.SetModuleAccount(f.sdkCtx, bondedPool) // now 2 max resValidators - params := f.stakingKeeper.GetParams(f.sdkCtx) + params, err := f.stakingKeeper.GetParams(f.sdkCtx) + assert.NilError(t, err) params.MaxValidators = 2 - f.stakingKeeper.SetParams(f.sdkCtx, params) + assert.NilError(t, f.stakingKeeper.SetParams(f.sdkCtx, params)) // initialize some validators into the state amts := []math.Int{ @@ -255,7 +276,7 @@ func TestGetValidatorSortingMixed(t *testing.T) { var validators [5]types.Validator for i, amt := range amts { validators[i] = testutil.NewValidator(t, sdk.ValAddress(addrs[i]), PKs[i]) - validators[i].DelegatorShares = sdk.NewDecFromInt(amt) + validators[i].DelegatorShares = math.LegacyNewDecFromInt(amt) validators[i].Status = types.Bonded validators[i].Tokens = amt keeper.TestingUpdateValidator(f.stakingKeeper, f.sdkCtx, validators[i], true) @@ -278,11 +299,12 @@ func TestGetValidatorSortingMixed(t *testing.T) { assert.Equal(t, types.Bonded, val4.Status) // first make sure everything made it in to the gotValidator group - resValidators := f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + resValidators, err := f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + assert.NilError(t, err) // The validators returned should match the max validators assert.Equal(t, 2, len(resValidators)) - assert.DeepEqual(t, sdk.NewInt(400).Mul(f.stakingKeeper.PowerReduction(f.sdkCtx)), resValidators[0].BondedTokens()) - assert.DeepEqual(t, sdk.NewInt(200).Mul(f.stakingKeeper.PowerReduction(f.sdkCtx)), resValidators[1].BondedTokens()) + assert.DeepEqual(t, math.NewInt(400).Mul(f.stakingKeeper.PowerReduction(f.sdkCtx)), resValidators[0].BondedTokens()) + assert.DeepEqual(t, math.NewInt(200).Mul(f.stakingKeeper.PowerReduction(f.sdkCtx)), resValidators[1].BondedTokens()) assert.Equal(t, validators[3].OperatorAddress, resValidators[0].OperatorAddress, "%v", resValidators) assert.Equal(t, validators[4].OperatorAddress, resValidators[1].OperatorAddress, "%v", resValidators) } @@ -292,7 +314,8 @@ func TestGetValidatorsEdgeCases(t *testing.T) { f, addrs, _ := bootstrapValidatorTest(t, 1000, 20) // set max validators to 2 - params := f.stakingKeeper.GetParams(f.sdkCtx) + params, err := f.stakingKeeper.GetParams(f.sdkCtx) + assert.NilError(t, err) nMax := uint32(2) params.MaxValidators = nMax f.stakingKeeper.SetParams(f.sdkCtx, params) @@ -314,7 +337,8 @@ func TestGetValidatorsEdgeCases(t *testing.T) { } // ensure that the first two bonded validators are the largest validators - resValidators := f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + resValidators, err := f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + assert.NilError(t, err) assert.Equal(t, nMax, uint32(len(resValidators))) assert.Assert(ValEq(t, validators[2], resValidators[0])) assert.Assert(ValEq(t, validators[3], resValidators[1])) @@ -334,7 +358,8 @@ func TestGetValidatorsEdgeCases(t *testing.T) { // a) validator 0 with 500 tokens // b) validator 2 with 400 tokens (delegated before validator 3) validators[0] = keeper.TestingUpdateValidator(f.stakingKeeper, f.sdkCtx, validators[0], true) - resValidators = f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + resValidators, err = f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + assert.NilError(t, err) assert.Equal(t, nMax, uint32(len(resValidators))) assert.Assert(ValEq(t, validators[0], resValidators[0])) assert.Assert(ValEq(t, validators[2], resValidators[1])) @@ -351,9 +376,11 @@ func TestGetValidatorsEdgeCases(t *testing.T) { // validator 3 enters bonded validator set f.sdkCtx = f.sdkCtx.WithBlockHeight(40) - var found bool - validators[3], found = f.stakingKeeper.GetValidator(f.sdkCtx, validators[3].GetOperator()) - assert.Assert(t, found) + valbz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(validators[3].GetOperator()) + assert.NilError(t, err) + + validators[3], err = f.stakingKeeper.GetValidator(f.sdkCtx, valbz) + assert.NilError(t, err) f.stakingKeeper.DeleteValidatorByPowerIndex(f.sdkCtx, validators[3]) validators[3], _ = validators[3].AddTokensFromDel(f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 1)) @@ -363,7 +390,8 @@ func TestGetValidatorsEdgeCases(t *testing.T) { f.accountKeeper.SetModuleAccount(f.sdkCtx, notBondedPool) validators[3] = keeper.TestingUpdateValidator(f.stakingKeeper, f.sdkCtx, validators[3], true) - resValidators = f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + resValidators, err = f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + assert.NilError(t, err) assert.Equal(t, nMax, uint32(len(resValidators))) assert.Assert(ValEq(t, validators[0], resValidators[0])) assert.Assert(ValEq(t, validators[3], resValidators[1])) @@ -378,25 +406,27 @@ func TestGetValidatorsEdgeCases(t *testing.T) { f.accountKeeper.SetModuleAccount(f.sdkCtx, bondedPool) validators[3] = keeper.TestingUpdateValidator(f.stakingKeeper, f.sdkCtx, validators[3], true) - resValidators = f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + resValidators, err = f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + assert.NilError(t, err) assert.Equal(t, nMax, uint32(len(resValidators))) assert.Assert(ValEq(t, validators[0], resValidators[0])) assert.Assert(ValEq(t, validators[2], resValidators[1])) // validator 3 does not get spot back f.stakingKeeper.DeleteValidatorByPowerIndex(f.sdkCtx, validators[3]) - validators[3], _ = validators[3].AddTokensFromDel(sdk.NewInt(200)) + validators[3], _ = validators[3].AddTokensFromDel(math.NewInt(200)) notBondedPool = f.stakingKeeper.GetNotBondedPool(f.sdkCtx) - assert.NilError(t, banktestutil.FundModuleAccount(f.sdkCtx, f.bankKeeper, notBondedPool.GetName(), sdk.NewCoins(sdk.NewCoin(params.BondDenom, sdk.NewInt(200))))) + assert.NilError(t, banktestutil.FundModuleAccount(f.sdkCtx, f.bankKeeper, notBondedPool.GetName(), sdk.NewCoins(sdk.NewCoin(params.BondDenom, math.NewInt(200))))) f.accountKeeper.SetModuleAccount(f.sdkCtx, notBondedPool) validators[3] = keeper.TestingUpdateValidator(f.stakingKeeper, f.sdkCtx, validators[3], true) - resValidators = f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + resValidators, err = f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + assert.NilError(t, err) assert.Equal(t, nMax, uint32(len(resValidators))) assert.Assert(ValEq(t, validators[0], resValidators[0])) assert.Assert(ValEq(t, validators[2], resValidators[1])) - _, exists := f.stakingKeeper.GetValidator(f.sdkCtx, validators[3].GetOperator()) + _, exists := f.stakingKeeper.GetValidator(f.sdkCtx, valbz) assert.Assert(t, exists) } @@ -404,7 +434,8 @@ func TestValidatorBondHeight(t *testing.T) { f, addrs, _ := bootstrapValidatorTest(t, 1000, 20) // now 2 max resValidators - params := f.stakingKeeper.GetParams(f.sdkCtx) + params, err := f.stakingKeeper.GetParams(f.sdkCtx) + assert.NilError(t, err) params.MaxValidators = 2 f.stakingKeeper.SetParams(f.sdkCtx, params) @@ -429,7 +460,8 @@ func TestValidatorBondHeight(t *testing.T) { validators[1] = keeper.TestingUpdateValidator(f.stakingKeeper, f.sdkCtx, validators[1], true) validators[2] = keeper.TestingUpdateValidator(f.stakingKeeper, f.sdkCtx, validators[2], true) - resValidators := f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + resValidators, err := f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + assert.NilError(t, err) assert.Equal(t, uint32(len(resValidators)), params.MaxValidators) assert.Assert(ValEq(t, validators[0], resValidators[0])) @@ -440,7 +472,8 @@ func TestValidatorBondHeight(t *testing.T) { validators[1], _ = validators[1].AddTokensFromDel(delTokens) validators[2], _ = validators[2].AddTokensFromDel(delTokens) validators[2] = keeper.TestingUpdateValidator(f.stakingKeeper, f.sdkCtx, validators[2], true) - resValidators = f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + resValidators, err = f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + assert.NilError(t, err) assert.Equal(t, params.MaxValidators, uint32(len(resValidators))) validators[1] = keeper.TestingUpdateValidator(f.stakingKeeper, f.sdkCtx, validators[1], true) assert.Assert(ValEq(t, validators[0], resValidators[0])) @@ -449,10 +482,11 @@ func TestValidatorBondHeight(t *testing.T) { func TestFullValidatorSetPowerChange(t *testing.T) { f, addrs, _ := bootstrapValidatorTest(t, 1000, 20) - params := f.stakingKeeper.GetParams(f.sdkCtx) + params, err := f.stakingKeeper.GetParams(f.sdkCtx) + assert.NilError(t, err) max := 2 params.MaxValidators = uint32(2) - f.stakingKeeper.SetParams(f.sdkCtx, params) + assert.NilError(t, f.stakingKeeper.SetParams(f.sdkCtx, params)) // initialize some validators into the state powers := []int64{0, 100, 400, 400, 200} @@ -464,16 +498,19 @@ func TestFullValidatorSetPowerChange(t *testing.T) { keeper.TestingUpdateValidator(f.stakingKeeper, f.sdkCtx, validators[i], true) } for i := range powers { - var found bool - validators[i], found = f.stakingKeeper.GetValidator(f.sdkCtx, validators[i].GetOperator()) - assert.Assert(t, found) + valbz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(validators[i].GetOperator()) + assert.NilError(t, err) + + validators[i], err = f.stakingKeeper.GetValidator(f.sdkCtx, valbz) + assert.NilError(t, err) } assert.Equal(t, types.Unbonded, validators[0].Status) assert.Equal(t, types.Unbonding, validators[1].Status) assert.Equal(t, types.Bonded, validators[2].Status) assert.Equal(t, types.Bonded, validators[3].Status) assert.Equal(t, types.Unbonded, validators[4].Status) - resValidators := f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + resValidators, err := f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + assert.NilError(t, err) assert.Equal(t, max, len(resValidators)) assert.Assert(ValEq(t, validators[2], resValidators[0])) // in the order of txs assert.Assert(ValEq(t, validators[3], resValidators[1])) @@ -483,7 +520,8 @@ func TestFullValidatorSetPowerChange(t *testing.T) { tokens := f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 600) validators[0], _ = validators[0].AddTokensFromDel(tokens) validators[0] = keeper.TestingUpdateValidator(f.stakingKeeper, f.sdkCtx, validators[0], true) - resValidators = f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + resValidators, err = f.stakingKeeper.GetBondedValidatorsByPower(f.sdkCtx) + assert.NilError(t, err) assert.Equal(t, max, len(resValidators)) assert.Assert(ValEq(t, validators[0], resValidators[0])) assert.Assert(ValEq(t, validators[2], resValidators[1])) @@ -512,8 +550,12 @@ func TestApplyAndReturnValidatorSetUpdatesAllNone(t *testing.T) { f.stakingKeeper.SetValidatorByPowerIndex(f.sdkCtx, validators[1]) updates := applyValidatorSetUpdates(t, f.sdkCtx, f.stakingKeeper, 2) - validators[0], _ = f.stakingKeeper.GetValidator(f.sdkCtx, validators[0].GetOperator()) - validators[1], _ = f.stakingKeeper.GetValidator(f.sdkCtx, validators[1].GetOperator()) + val0bz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(validators[0].GetOperator()) + assert.NilError(t, err) + val1bz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(validators[1].GetOperator()) + assert.NilError(t, err) + validators[0], _ = f.stakingKeeper.GetValidator(f.sdkCtx, val0bz) + validators[1], _ = f.stakingKeeper.GetValidator(f.sdkCtx, val1bz) assert.DeepEqual(t, validators[0].ABCIValidatorUpdate(f.stakingKeeper.PowerReduction(f.sdkCtx)), updates[1]) assert.DeepEqual(t, validators[1].ABCIValidatorUpdate(f.stakingKeeper.PowerReduction(f.sdkCtx)), updates[0]) } @@ -603,7 +645,9 @@ func TestApplyAndReturnValidatorSetUpdatesInserted(t *testing.T) { f.stakingKeeper.SetValidator(f.sdkCtx, validators[2]) f.stakingKeeper.SetValidatorByPowerIndex(f.sdkCtx, validators[2]) updates := applyValidatorSetUpdates(t, f.sdkCtx, f.stakingKeeper, 1) - validators[2], _ = f.stakingKeeper.GetValidator(f.sdkCtx, validators[2].GetOperator()) + val2bz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(validators[2].GetOperator()) + assert.NilError(t, err) + validators[2], _ = f.stakingKeeper.GetValidator(f.sdkCtx, val2bz) assert.DeepEqual(t, validators[2].ABCIValidatorUpdate(f.stakingKeeper.PowerReduction(f.sdkCtx)), updates[0]) // test validtor added at the beginning @@ -611,7 +655,9 @@ func TestApplyAndReturnValidatorSetUpdatesInserted(t *testing.T) { f.stakingKeeper.SetValidator(f.sdkCtx, validators[3]) f.stakingKeeper.SetValidatorByPowerIndex(f.sdkCtx, validators[3]) updates = applyValidatorSetUpdates(t, f.sdkCtx, f.stakingKeeper, 1) - validators[3], _ = f.stakingKeeper.GetValidator(f.sdkCtx, validators[3].GetOperator()) + val3bz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(validators[3].GetOperator()) + assert.NilError(t, err) + validators[3], _ = f.stakingKeeper.GetValidator(f.sdkCtx, val3bz) assert.DeepEqual(t, validators[3].ABCIValidatorUpdate(f.stakingKeeper.PowerReduction(f.sdkCtx)), updates[0]) // test validtor added at the end @@ -619,7 +665,9 @@ func TestApplyAndReturnValidatorSetUpdatesInserted(t *testing.T) { f.stakingKeeper.SetValidator(f.sdkCtx, validators[4]) f.stakingKeeper.SetValidatorByPowerIndex(f.sdkCtx, validators[4]) updates = applyValidatorSetUpdates(t, f.sdkCtx, f.stakingKeeper, 1) - validators[4], _ = f.stakingKeeper.GetValidator(f.sdkCtx, validators[4].GetOperator()) + val4bz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(validators[4].GetOperator()) + assert.NilError(t, err) + validators[4], _ = f.stakingKeeper.GetValidator(f.sdkCtx, val4bz) assert.DeepEqual(t, validators[4].ABCIValidatorUpdate(f.stakingKeeper.PowerReduction(f.sdkCtx)), updates[0]) } @@ -654,17 +702,20 @@ func TestApplyAndReturnValidatorSetUpdatesWithCliffValidator(t *testing.T) { f.stakingKeeper.SetValidator(f.sdkCtx, validators[2]) f.stakingKeeper.SetValidatorByPowerIndex(f.sdkCtx, validators[2]) updates := applyValidatorSetUpdates(t, f.sdkCtx, f.stakingKeeper, 2) - validators[2], _ = f.stakingKeeper.GetValidator(f.sdkCtx, validators[2].GetOperator()) + val2bz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(validators[2].GetOperator()) + assert.NilError(t, err) + validators[2], _ = f.stakingKeeper.GetValidator(f.sdkCtx, val2bz) assert.DeepEqual(t, validators[0].ABCIValidatorUpdateZero(), updates[1]) assert.DeepEqual(t, validators[2].ABCIValidatorUpdate(f.stakingKeeper.PowerReduction(f.sdkCtx)), updates[0]) } func TestApplyAndReturnValidatorSetUpdatesNewValidator(t *testing.T) { f, _, _ := bootstrapValidatorTest(t, 1000, 20) - params := f.stakingKeeper.GetParams(f.sdkCtx) + params, err := f.stakingKeeper.GetParams(f.sdkCtx) + assert.NilError(t, err) params.MaxValidators = uint32(3) - f.stakingKeeper.SetParams(f.sdkCtx, params) + assert.NilError(t, f.stakingKeeper.SetParams(f.sdkCtx, params)) powers := []int64{100, 100} var validators [2]types.Validator @@ -684,8 +735,13 @@ func TestApplyAndReturnValidatorSetUpdatesNewValidator(t *testing.T) { // verify initial CometBFT updates are correct updates := applyValidatorSetUpdates(t, f.sdkCtx, f.stakingKeeper, len(validators)) - validators[0], _ = f.stakingKeeper.GetValidator(f.sdkCtx, validators[0].GetOperator()) - validators[1], _ = f.stakingKeeper.GetValidator(f.sdkCtx, validators[1].GetOperator()) + + val0bz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(validators[0].GetOperator()) + assert.NilError(t, err) + val1bz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(validators[1].GetOperator()) + assert.NilError(t, err) + validators[0], _ = f.stakingKeeper.GetValidator(f.sdkCtx, val0bz) + validators[1], _ = f.stakingKeeper.GetValidator(f.sdkCtx, val1bz) assert.DeepEqual(t, validators[0].ABCIValidatorUpdate(f.stakingKeeper.PowerReduction(f.sdkCtx)), updates[0]) assert.DeepEqual(t, validators[1].ABCIValidatorUpdate(f.stakingKeeper.PowerReduction(f.sdkCtx)), updates[1]) @@ -706,14 +762,14 @@ func TestApplyAndReturnValidatorSetUpdatesNewValidator(t *testing.T) { // zero power valPubKey := PKs[len(validators)+1] valAddr := sdk.ValAddress(valPubKey.Address().Bytes()) - amt := sdk.NewInt(100) + amt := math.NewInt(100) validator := testutil.NewValidator(t, valAddr, valPubKey) validator, _ = validator.AddTokensFromDel(amt) f.stakingKeeper.SetValidator(f.sdkCtx, validator) - validator, _ = validator.RemoveDelShares(sdk.NewDecFromInt(amt)) + validator, _ = validator.RemoveDelShares(math.LegacyNewDecFromInt(amt)) f.stakingKeeper.SetValidator(f.sdkCtx, validator) f.stakingKeeper.SetValidatorByPowerIndex(f.sdkCtx, validator) @@ -729,9 +785,11 @@ func TestApplyAndReturnValidatorSetUpdatesNewValidator(t *testing.T) { // verify initial CometBFT updates are correct updates = applyValidatorSetUpdates(t, f.sdkCtx, f.stakingKeeper, len(validators)+1) - validator, _ = f.stakingKeeper.GetValidator(f.sdkCtx, validator.GetOperator()) - validators[0], _ = f.stakingKeeper.GetValidator(f.sdkCtx, validators[0].GetOperator()) - validators[1], _ = f.stakingKeeper.GetValidator(f.sdkCtx, validators[1].GetOperator()) + valbz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) + assert.NilError(t, err) + validator, _ = f.stakingKeeper.GetValidator(f.sdkCtx, valbz) + validators[0], _ = f.stakingKeeper.GetValidator(f.sdkCtx, val0bz) + validators[1], _ = f.stakingKeeper.GetValidator(f.sdkCtx, val1bz) assert.DeepEqual(t, validator.ABCIValidatorUpdate(f.stakingKeeper.PowerReduction(f.sdkCtx)), updates[0]) assert.DeepEqual(t, validators[0].ABCIValidatorUpdate(f.stakingKeeper.PowerReduction(f.sdkCtx)), updates[1]) assert.DeepEqual(t, validators[1].ABCIValidatorUpdate(f.stakingKeeper.PowerReduction(f.sdkCtx)), updates[2]) @@ -739,10 +797,11 @@ func TestApplyAndReturnValidatorSetUpdatesNewValidator(t *testing.T) { func TestApplyAndReturnValidatorSetUpdatesBondTransition(t *testing.T) { f, _, _ := bootstrapValidatorTest(t, 1000, 20) - params := f.stakingKeeper.GetParams(f.sdkCtx) + params, err := f.stakingKeeper.GetParams(f.sdkCtx) + assert.NilError(t, err) params.MaxValidators = uint32(2) - f.stakingKeeper.SetParams(f.sdkCtx, params) + assert.NilError(t, f.stakingKeeper.SetParams(f.sdkCtx, params)) powers := []int64{100, 200, 300} var validators [3]types.Validator @@ -762,8 +821,12 @@ func TestApplyAndReturnValidatorSetUpdatesBondTransition(t *testing.T) { // verify initial CometBFT updates are correct updates := applyValidatorSetUpdates(t, f.sdkCtx, f.stakingKeeper, 2) - validators[2], _ = f.stakingKeeper.GetValidator(f.sdkCtx, validators[2].GetOperator()) - validators[1], _ = f.stakingKeeper.GetValidator(f.sdkCtx, validators[1].GetOperator()) + val1bz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(validators[1].GetOperator()) + assert.NilError(t, err) + val2bz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(validators[2].GetOperator()) + assert.NilError(t, err) + validators[2], _ = f.stakingKeeper.GetValidator(f.sdkCtx, val2bz) + validators[1], _ = f.stakingKeeper.GetValidator(f.sdkCtx, val1bz) assert.DeepEqual(t, validators[2].ABCIValidatorUpdate(f.stakingKeeper.PowerReduction(f.sdkCtx)), updates[0]) assert.DeepEqual(t, validators[1].ABCIValidatorUpdate(f.stakingKeeper.PowerReduction(f.sdkCtx)), updates[1]) @@ -772,9 +835,10 @@ func TestApplyAndReturnValidatorSetUpdatesBondTransition(t *testing.T) { // delegate to validator with lowest power but not enough to bond f.sdkCtx = f.sdkCtx.WithBlockHeight(1) - var found bool - validators[0], found = f.stakingKeeper.GetValidator(f.sdkCtx, validators[0].GetOperator()) - assert.Assert(t, found) + val0bz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(validators[0].GetOperator()) + assert.NilError(t, err) + validators[0], err = f.stakingKeeper.GetValidator(f.sdkCtx, val0bz) + assert.NilError(t, err) f.stakingKeeper.DeleteValidatorByPowerIndex(f.sdkCtx, validators[0]) tokens := f.stakingKeeper.TokensFromConsensusPower(f.sdkCtx, 1) @@ -789,8 +853,8 @@ func TestApplyAndReturnValidatorSetUpdatesBondTransition(t *testing.T) { // lowest power in a single block context (height) f.sdkCtx = f.sdkCtx.WithBlockHeight(2) - validators[1], found = f.stakingKeeper.GetValidator(f.sdkCtx, validators[1].GetOperator()) - assert.Assert(t, found) + validators[1], err = f.stakingKeeper.GetValidator(f.sdkCtx, val1bz) + assert.NilError(t, err) f.stakingKeeper.DeleteValidatorByPowerIndex(f.sdkCtx, validators[0]) validators[0], _ = validators[0].RemoveDelShares(validators[0].DelegatorShares) diff --git a/tests/integration/staking/keeper/vote_extensions_test.go b/tests/integration/staking/keeper/vote_extensions_test.go new file mode 100644 index 000000000000..8b6e3d355e9a --- /dev/null +++ b/tests/integration/staking/keeper/vote_extensions_test.go @@ -0,0 +1,148 @@ +package keeper_test + +import ( + "bytes" + "sort" + "testing" + + abci "github.com/cometbft/cometbft/abci/types" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + protoio "github.com/cosmos/gogoproto/io" + "github.com/cosmos/gogoproto/proto" + "gotest.tools/v3/assert" + + "cosmossdk.io/core/comet" + "cosmossdk.io/core/header" + "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/baseapp" + ed25519 "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/staking/testutil" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +const chainID = "chain-id-123" + +// TestValidateVoteExtensions is a unit test function that tests the validation of vote extensions. +// It sets up the necessary fixtures and validators, generates vote extensions for each validator, +// and validates the vote extensions using the baseapp.ValidateVoteExtensions function. +func TestValidateVoteExtensions(t *testing.T) { + t.Parallel() + f := initFixture(t) + + // enable vote extensions + cp := simtestutil.DefaultConsensusParams + cp.Abci = &cmtproto.ABCIParams{VoteExtensionsEnableHeight: 1} + f.sdkCtx = f.sdkCtx.WithConsensusParams(*cp).WithHeaderInfo(header.Info{Height: 2, ChainID: chainID}) + + // setup the validators + numVals := 1 + privKeys := []cryptotypes.PrivKey{} + for i := 0; i < numVals; i++ { + privKeys = append(privKeys, ed25519.GenPrivKey()) + } + + vals := []stakingtypes.Validator{} + for _, v := range privKeys { + valAddr := sdk.ValAddress(v.PubKey().Address()) + simtestutil.AddTestAddrsFromPubKeys(f.bankKeeper, f.stakingKeeper, f.sdkCtx, []cryptotypes.PubKey{v.PubKey()}, math.NewInt(100000000000)) + vals = append(vals, testutil.NewValidator(t, valAddr, v.PubKey())) + } + + votes := []abci.ExtendedVoteInfo{} + + for i, v := range vals { + v.Tokens = math.NewInt(1000000) + v.Status = stakingtypes.Bonded + assert.NilError(t, f.stakingKeeper.SetValidator(f.sdkCtx, v)) + assert.NilError(t, f.stakingKeeper.SetValidatorByConsAddr(f.sdkCtx, v)) + assert.NilError(t, f.stakingKeeper.SetNewValidatorByPowerIndex(f.sdkCtx, v)) + _, err := f.stakingKeeper.Delegate(f.sdkCtx, sdk.AccAddress(privKeys[i].PubKey().Address()), v.Tokens, stakingtypes.Unbonded, v, true) + assert.NilError(t, err) + + // each val produces a vote + voteExt := []byte("something" + v.OperatorAddress) + cve := cmtproto.CanonicalVoteExtension{ + Extension: voteExt, + Height: f.sdkCtx.HeaderInfo().Height - 1, // the vote extension was signed in the previous height + Round: 0, + ChainId: chainID, + } + + extSignBytes, err := mashalVoteExt(&cve) + assert.NilError(t, err) + + sig, err := privKeys[i].Sign(extSignBytes) + assert.NilError(t, err) + + valbz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(v.GetOperator()) + assert.NilError(t, err) + ve := abci.ExtendedVoteInfo{ + Validator: abci.Validator{ + Address: valbz, + Power: 1000, + }, + VoteExtension: voteExt, + ExtensionSignature: sig, + BlockIdFlag: cmtproto.BlockIDFlagCommit, + } + votes = append(votes, ve) + } + + eci, ci := extendedCommitToLastCommit(abci.ExtendedCommitInfo{Round: 0, Votes: votes}) + f.sdkCtx = f.sdkCtx.WithCometInfo(ci) + + err := baseapp.ValidateVoteExtensions(f.sdkCtx, f.stakingKeeper, 0, "", eci) + assert.NilError(t, err) +} + +func mashalVoteExt(msg proto.Message) ([]byte, error) { + var buf bytes.Buffer + if err := protoio.NewDelimitedWriter(&buf).WriteMsg(msg); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +func extendedCommitToLastCommit(ec abci.ExtendedCommitInfo) (abci.ExtendedCommitInfo, comet.BlockInfo) { + // sort the extended commit info + sort.Sort(extendedVoteInfos(ec.Votes)) + + // convert the extended commit info to last commit info + lastCommit := abci.CommitInfo{ + Round: ec.Round, + Votes: make([]abci.VoteInfo, len(ec.Votes)), + } + + for i, vote := range ec.Votes { + lastCommit.Votes[i] = abci.VoteInfo{ + Validator: abci.Validator{ + Address: vote.Validator.Address, + Power: vote.Validator.Power, + }, + } + } + + return ec, baseapp.NewBlockInfo(nil, nil, nil, lastCommit) +} + +type extendedVoteInfos []abci.ExtendedVoteInfo + +func (v extendedVoteInfos) Len() int { + return len(v) +} + +func (v extendedVoteInfos) Less(i, j int) bool { + if v[i].Validator.Power == v[j].Validator.Power { + return bytes.Compare(v[i].Validator.Address, v[j].Validator.Address) == -1 + } + return v[i].Validator.Power > v[j].Validator.Power +} + +func (v extendedVoteInfos) Swap(i, j int) { + v[i], v[j] = v[j], v[i] +} diff --git a/tests/integration/store/rootmulti/rollback_test.go b/tests/integration/store/rootmulti/rollback_test.go index 947a41ab9e97..9e4454bdcb1b 100644 --- a/tests/integration/store/rootmulti/rollback_test.go +++ b/tests/integration/store/rootmulti/rollback_test.go @@ -4,13 +4,14 @@ import ( "fmt" "testing" - "cosmossdk.io/log" - "cosmossdk.io/simapp" abci "github.com/cometbft/cometbft/abci/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "gotest.tools/v3/assert" + "cosmossdk.io/log" + "cosmossdk.io/simapp" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" ) diff --git a/tests/integration/tx/aminojson/aminojson_test.go b/tests/integration/tx/aminojson/aminojson_test.go index 9c7a0ce06e61..eb271308f8d6 100644 --- a/tests/integration/tx/aminojson/aminojson_test.go +++ b/tests/integration/tx/aminojson/aminojson_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - gov_v1_api "cosmossdk.io/api/cosmos/gov/v1" - msgv1 "cosmossdk.io/api/cosmos/msg/v1" + "github.com/cosmos/cosmos-proto/rapidproto" + gogoproto "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/anypb" @@ -16,9 +16,6 @@ import ( "google.golang.org/protobuf/types/known/timestamppb" "pgregory.net/rapid" - "github.com/cosmos/cosmos-proto/rapidproto" - gogoproto "github.com/cosmos/gogoproto/proto" - authapi "cosmossdk.io/api/cosmos/auth/v1beta1" authzapi "cosmossdk.io/api/cosmos/authz/v1beta1" bankapi "cosmossdk.io/api/cosmos/bank/v1beta1" @@ -27,7 +24,9 @@ import ( multisigapi "cosmossdk.io/api/cosmos/crypto/multisig" "cosmossdk.io/api/cosmos/crypto/secp256k1" distapi "cosmossdk.io/api/cosmos/distribution/v1beta1" + gov_v1_api "cosmossdk.io/api/cosmos/gov/v1" gov_v1beta1_api "cosmossdk.io/api/cosmos/gov/v1beta1" + msgv1 "cosmossdk.io/api/cosmos/msg/v1" slashingapi "cosmossdk.io/api/cosmos/slashing/v1beta1" stakingapi "cosmossdk.io/api/cosmos/staking/v1beta1" txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" @@ -50,7 +49,6 @@ import ( "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/bech32" "github.com/cosmos/cosmos-sdk/types/module/testutil" - txtypes "github.com/cosmos/cosmos-sdk/types/tx" signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" @@ -150,10 +148,6 @@ func TestAminoJSON_Equivalence(t *testing.T) { AccNum: 1, AccSeq: 2, SignerAddress: "signerAddress", - Tip: &txv1beta1.Tip{ - Tipper: "tipper", - Amount: []*v1beta1.Coin{{Denom: "uatom", Amount: "1000"}}, - }, Fee: &txv1beta1.Fee{ Amount: []*v1beta1.Coin{{Denom: "uatom", Amount: "1000"}}, }, @@ -171,10 +165,6 @@ func TestAminoJSON_Equivalence(t *testing.T) { require.NoError(t, txBuilder.SetMsgs([]types.Msg{tt.Gogo}...)) txBuilder.SetMemo(handlerOptions.Memo) txBuilder.SetFeeAmount(types.Coins{types.NewInt64Coin("uatom", 1000)}) - txBuilder.SetTip(&txtypes.Tip{ - Amount: types.Coins{types.NewInt64Coin("uatom", 1000)}, - Tipper: "tipper", - }) theTx := txBuilder.GetTx() legacySigningData := signing.SignerData{ @@ -218,7 +208,7 @@ func TestAminoJSON_LegacyParity(t *testing.T) { pubkeyAny, _ := codectypes.NewAnyWithValue(&secp256k1types.PubKey{Key: []byte("foo")}) pubkeyAnyPulsar := newAny(t, &secp256k1.PubKey{Key: []byte("foo")}) dec10bz, _ := math.LegacyNewDec(10).Marshal() - int123bz, _ := types.NewInt(123).Marshal() + int123bz, _ := math.NewInt(123).Marshal() cases := map[string]struct { gogo gogoproto.Message @@ -278,7 +268,7 @@ func TestAminoJSON_LegacyParity(t *testing.T) { }, "distribution/community_pool_spend_proposal_with_deposit": { gogo: &disttypes.CommunityPoolSpendProposalWithDeposit{}, - pulsar: &distapi.CommunityPoolSpendProposalWithDeposit{}, + pulsar: &distapi.CommunityPoolSpendProposalWithDeposit{}, //nolint:staticcheck // keep test as is testing legacy parity }, "distribution/msg_withdraw_delegator_reward": { gogo: &disttypes.MsgWithdrawDelegatorReward{DelegatorAddress: "foo"}, @@ -397,7 +387,7 @@ func TestAminoJSON_LegacyParity(t *testing.T) { pulsar: &vestingapi.BaseVestingAccount{BaseAccount: &authapi.BaseAccount{PubKey: pubkeyAnyPulsar}}, }, "math/int_as_string": { - gogo: &gogo_testpb.IntAsString{IntAsString: types.NewInt(123)}, + gogo: &gogo_testpb.IntAsString{IntAsString: math.NewInt(123)}, pulsar: &pulsar_testpb.IntAsString{IntAsString: "123"}, }, "math/int_as_string/empty": { @@ -405,7 +395,7 @@ func TestAminoJSON_LegacyParity(t *testing.T) { pulsar: &pulsar_testpb.IntAsString{}, }, "math/int_as_bytes": { - gogo: &gogo_testpb.IntAsBytes{IntAsBytes: types.NewInt(123)}, + gogo: &gogo_testpb.IntAsBytes{IntAsBytes: math.NewInt(123)}, pulsar: &pulsar_testpb.IntAsBytes{IntAsBytes: int123bz}, }, "math/int_as_bytes/empty": { diff --git a/tests/integration/tx/aminojson/repeated_test.go b/tests/integration/tx/aminojson/repeated_test.go index 081d43c172b9..41a335e2e699 100644 --- a/tests/integration/tx/aminojson/repeated_test.go +++ b/tests/integration/tx/aminojson/repeated_test.go @@ -5,9 +5,8 @@ import ( "testing" gogoproto "github.com/cosmos/gogoproto/proto" - "google.golang.org/protobuf/proto" - "github.com/stretchr/testify/require" + "google.golang.org/protobuf/proto" "cosmossdk.io/x/tx/signing/aminojson" diff --git a/tests/integration/tx/context_test.go b/tests/integration/tx/context_test.go index 62daad659ded..2210c9c934fd 100644 --- a/tests/integration/tx/context_test.go +++ b/tests/integration/tx/context_test.go @@ -3,11 +3,12 @@ package tx import ( "testing" + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/proto" + "cosmossdk.io/depinject" "cosmossdk.io/log" "cosmossdk.io/x/tx/signing" - "github.com/stretchr/testify/require" - "google.golang.org/protobuf/proto" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/tests/integration/tx/internal/pulsar/testpb" diff --git a/tests/integration/tx/decode_test.go b/tests/integration/tx/decode_test.go index 0e601a7e97d3..f22123e79732 100644 --- a/tests/integration/tx/decode_test.go +++ b/tests/integration/tx/decode_test.go @@ -3,13 +3,14 @@ package tx import ( "testing" - msgv1 "cosmossdk.io/api/cosmos/msg/v1" "github.com/cosmos/cosmos-proto/rapidproto" gogoproto "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" "pgregory.net/rapid" + msgv1 "cosmossdk.io/api/cosmos/msg/v1" + "cosmossdk.io/math" "cosmossdk.io/x/evidence" feegrantmodule "cosmossdk.io/x/feegrant/module" "cosmossdk.io/x/tx/decode" @@ -48,7 +49,7 @@ func TestDecode(t *testing.T) { slashing.AppModuleBasic{}, staking.AppModuleBasic{}, upgrade.AppModuleBasic{}, vesting.AppModuleBasic{}) legacytx.RegressionTestingAminoCodec = encCfg.Amino - fee := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) + fee := sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(100))) gas := uint64(200) memo := "memo" accSeq := uint64(2) diff --git a/tests/integration/tx/internal/buf.lock b/tests/integration/tx/internal/buf.lock index 88709c98ef99..6cfbc809c3f1 100644 --- a/tests/integration/tx/internal/buf.lock +++ b/tests/integration/tx/internal/buf.lock @@ -5,7 +5,15 @@ deps: owner: cosmos repository: cosmos-proto commit: 1935555c206d4afb9e94615dfd0fad31 + - remote: buf.build + owner: cosmos + repository: cosmos-sdk + commit: 4067d92aa6344f549e84824ab7f22d4f - remote: buf.build owner: cosmos repository: gogo-proto - commit: 34d970b699f84aa382f3c29773a60836 + commit: 5e5b9fdd01804356895f8f79a6f1ddc1 + - remote: buf.build + owner: googleapis + repository: googleapis + commit: cc916c31859748a68fd229a3c8d7a2e8 diff --git a/tests/integration/tx/internal/buf.yaml b/tests/integration/tx/internal/buf.yaml index 5aee45ac2b4f..02f98c15634b 100644 --- a/tests/integration/tx/internal/buf.yaml +++ b/tests/integration/tx/internal/buf.yaml @@ -1,5 +1,6 @@ version: v1 deps: + - buf.build/cosmos/cosmos-sdk - buf.build/cosmos/cosmos-proto - buf.build/cosmos/gogo-proto lint: diff --git a/tests/integration/tx/internal/gogo/testpb/test.pb.go b/tests/integration/tx/internal/gogo/testpb/test.pb.go index 9ae36d6492cd..e84c944140ac 100644 --- a/tests/integration/tx/internal/gogo/testpb/test.pb.go +++ b/tests/integration/tx/internal/gogo/testpb/test.pb.go @@ -5,9 +5,9 @@ package testpb import ( context "context" + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" _ "github.com/cosmos/cosmos-proto" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" @@ -222,7 +222,7 @@ func (m *TestNullableFields) GetNonNullableDontOmitempty() Streng { } type IntAsString struct { - IntAsString github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=int_as_string,json=intAsString,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"int_as_string"` + IntAsString cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=int_as_string,json=intAsString,proto3,customtype=cosmossdk.io/math.Int" json:"int_as_string"` } func (m *IntAsString) Reset() { *m = IntAsString{} } @@ -259,7 +259,7 @@ func (m *IntAsString) XXX_DiscardUnknown() { var xxx_messageInfo_IntAsString proto.InternalMessageInfo type IntAsBytes struct { - IntAsBytes github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=int_as_bytes,json=intAsBytes,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"int_as_bytes"` + IntAsBytes cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=int_as_bytes,json=intAsBytes,proto3,customtype=cosmossdk.io/math.Int" json:"int_as_bytes"` } func (m *IntAsBytes) Reset() { *m = IntAsBytes{} } @@ -306,37 +306,37 @@ func init() { func init() { proto.RegisterFile("testpb/test.proto", fileDescriptor_41c67e33ca9d1f26) } var fileDescriptor_41c67e33ca9d1f26 = []byte{ - // 473 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x4f, 0x6b, 0x13, 0x41, - 0x14, 0xdf, 0x69, 0x9b, 0x40, 0x5f, 0xaa, 0x90, 0x21, 0xda, 0xb8, 0xc2, 0xb6, 0xe4, 0x20, 0x45, - 0xe8, 0x2e, 0xd6, 0xb3, 0x87, 0x06, 0x29, 0x44, 0xa8, 0xc2, 0xda, 0x83, 0xb7, 0x65, 0x37, 0x19, - 0xd6, 0xc1, 0xdd, 0x37, 0x6b, 0xe6, 0xa5, 0x98, 0x9b, 0x1f, 0xc1, 0x8f, 0xe1, 0xd1, 0x83, 0x1f, - 0x22, 0xc7, 0xe2, 0x49, 0x3c, 0x14, 0x49, 0x0e, 0x7e, 0x0d, 0x99, 0x9d, 0xdd, 0xb4, 0xb5, 0x41, - 0x41, 0x72, 0xd9, 0x79, 0xff, 0xe6, 0xf7, 0xfb, 0xf1, 0xe3, 0xcd, 0x42, 0x9b, 0x84, 0xa6, 0x22, - 0x09, 0xcc, 0xe1, 0x17, 0x63, 0x45, 0x8a, 0x37, 0x6d, 0xc9, 0xdd, 0x1d, 0x2a, 0x9d, 0x2b, 0x1d, - 0xe4, 0x3a, 0x0d, 0xce, 0x9f, 0x98, 0xc3, 0x0e, 0xb8, 0x9d, 0x54, 0xa5, 0xaa, 0x0c, 0x03, 0x13, - 0x55, 0xd5, 0x76, 0x9c, 0x4b, 0x54, 0x41, 0xf9, 0xad, 0x4a, 0x0f, 0x2c, 0x42, 0x64, 0x67, 0x6d, - 0x62, 0x5b, 0x3d, 0x0f, 0x9a, 0x9a, 0xc6, 0x02, 0x53, 0xde, 0x81, 0xc6, 0x79, 0x9c, 0x4d, 0x44, - 0x97, 0xed, 0xb3, 0x83, 0xed, 0xd0, 0x26, 0xbd, 0xd9, 0x06, 0xf0, 0x33, 0xa1, 0x29, 0x14, 0x85, - 0x88, 0x49, 0x8c, 0x4e, 0xa4, 0xc8, 0x46, 0x9a, 0x3f, 0x03, 0x8e, 0x93, 0x2c, 0x8b, 0x93, 0x4c, - 0x44, 0x2a, 0x97, 0x24, 0xf2, 0x82, 0xa6, 0x5d, 0xb6, 0xbf, 0x79, 0xd0, 0x3a, 0xba, 0xeb, 0x5b, - 0xe1, 0xbe, 0x05, 0x0e, 0xdb, 0xf5, 0xe4, 0xab, 0x7a, 0x90, 0x9f, 0xc2, 0xee, 0xf2, 0xfa, 0x48, - 0x21, 0x5d, 0xc3, 0xd8, 0x58, 0x85, 0xd1, 0x6f, 0x7c, 0xfe, 0xf5, 0xe5, 0x31, 0x0b, 0xef, 0xd5, - 0xb7, 0x9e, 0x2b, 0xa4, 0x2b, 0xb8, 0x17, 0x70, 0x1f, 0x15, 0x46, 0x2b, 0x14, 0x6d, 0xae, 0x44, - 0xdb, 0x9a, 0x5d, 0xee, 0x39, 0x61, 0x07, 0x15, 0xbe, 0xbc, 0x25, 0xed, 0x0d, 0x3c, 0xbc, 0x81, - 0xf5, 0x87, 0xbc, 0xad, 0x95, 0x80, 0xdb, 0x06, 0xd0, 0x4a, 0xec, 0x5e, 0x43, 0xbd, 0xa1, 0x72, - 0x69, 0x65, 0xdd, 0xfd, 0x87, 0x95, 0x6c, 0x0d, 0x56, 0xb2, 0xb5, 0x5a, 0xc9, 0xd6, 0x6d, 0x25, - 0xfb, 0x5f, 0x2b, 0x09, 0x5a, 0x03, 0xa4, 0x63, 0xfd, 0x9a, 0xc6, 0x12, 0x53, 0x2e, 0xe0, 0x8e, - 0x44, 0x8a, 0x62, 0x1d, 0xe9, 0xb2, 0x60, 0x57, 0xb8, 0x7f, 0x6c, 0xa0, 0x7e, 0x5c, 0xee, 0x3d, - 0x4a, 0x25, 0xbd, 0x9d, 0x24, 0xfe, 0x50, 0xe5, 0xd5, 0xf2, 0x57, 0xc7, 0xa1, 0x1e, 0xbd, 0x0b, - 0x68, 0x5a, 0x08, 0xed, 0x0f, 0x90, 0xbe, 0x7d, 0x3d, 0x84, 0xea, 0x6d, 0x0c, 0x90, 0xac, 0x84, - 0x96, 0xbc, 0xa2, 0xe9, 0xbd, 0x07, 0x28, 0x59, 0xfb, 0x53, 0x12, 0x9a, 0x0f, 0x61, 0xa7, 0x22, - 0x4d, 0x4c, 0x5e, 0x72, 0xee, 0xac, 0x83, 0x13, 0xe4, 0x92, 0xe4, 0x48, 0x40, 0x67, 0x80, 0x24, - 0xd2, 0x71, 0x4c, 0x52, 0xe1, 0xd9, 0x07, 0xb3, 0x3f, 0xa7, 0x3a, 0xe5, 0x27, 0x00, 0x26, 0xac, - 0x56, 0xc8, 0xad, 0x3d, 0xbc, 0xfd, 0x52, 0xdd, 0xbf, 0xf4, 0x7a, 0x8e, 0xdb, 0xf8, 0x68, 0x28, - 0xfb, 0xdd, 0xd9, 0xdc, 0x63, 0x17, 0x73, 0x8f, 0xfd, 0x9c, 0x7b, 0xec, 0xd3, 0xc2, 0x73, 0x2e, - 0x16, 0x9e, 0xf3, 0x7d, 0xe1, 0x39, 0x49, 0xb3, 0xfc, 0x4d, 0x3c, 0xfd, 0x1d, 0x00, 0x00, 0xff, - 0xff, 0xde, 0xf7, 0xd7, 0x03, 0xa0, 0x04, 0x00, 0x00, + // 466 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0x41, 0x6b, 0xd4, 0x40, + 0x14, 0xc7, 0x33, 0x6d, 0x77, 0xa1, 0x6f, 0xab, 0xb0, 0xc3, 0xd6, 0xae, 0x11, 0xd2, 0xb2, 0xa7, + 0x22, 0x98, 0x68, 0x3d, 0x7b, 0x70, 0x91, 0xc2, 0x0a, 0x55, 0x88, 0x7b, 0xf0, 0x16, 0xb3, 0xdd, + 0x21, 0x0e, 0x26, 0x6f, 0x42, 0xe6, 0xb5, 0xd8, 0x9b, 0x1f, 0xc1, 0x8f, 0xe1, 0xd1, 0x83, 0x1f, + 0x62, 0x8f, 0xc5, 0x93, 0x78, 0x28, 0xb2, 0x7b, 0xf0, 0x6b, 0xc8, 0x64, 0x92, 0x6d, 0x6b, 0x83, + 0x42, 0xd9, 0x4b, 0x66, 0xe6, 0xbd, 0x37, 0xbf, 0xf7, 0xe7, 0xcf, 0x9b, 0x40, 0x97, 0x84, 0xa6, + 0x7c, 0x12, 0x98, 0xc5, 0xcf, 0x0b, 0x45, 0x8a, 0xb7, 0x6d, 0xc8, 0xdd, 0x39, 0x56, 0x3a, 0x53, + 0x3a, 0xc8, 0x74, 0x12, 0x9c, 0x3e, 0x31, 0x8b, 0x2d, 0x70, 0x7b, 0x89, 0x4a, 0x54, 0xb9, 0x0d, + 0xcc, 0xae, 0x8a, 0x76, 0xe3, 0x4c, 0xa2, 0x0a, 0xca, 0x6f, 0x15, 0xba, 0x6f, 0x09, 0x91, 0xad, + 0xb5, 0x07, 0x9b, 0x1a, 0x78, 0xd0, 0xd6, 0x54, 0x08, 0x4c, 0x78, 0x0f, 0x5a, 0xa7, 0x71, 0x7a, + 0x22, 0xfa, 0x6c, 0x8f, 0xed, 0x6f, 0x86, 0xf6, 0x30, 0x98, 0xad, 0x01, 0x1f, 0x0b, 0x4d, 0xa1, + 0xc8, 0x45, 0x4c, 0x62, 0x7a, 0x28, 0x45, 0x3a, 0xd5, 0xfc, 0x19, 0x70, 0x3c, 0x49, 0xd3, 0x78, + 0x92, 0x8a, 0x48, 0x65, 0x92, 0x44, 0x96, 0xd3, 0x59, 0x9f, 0xed, 0xad, 0xef, 0x77, 0x0e, 0xee, + 0xfa, 0x56, 0xb8, 0x6f, 0xc1, 0x61, 0xb7, 0xae, 0x7c, 0x5d, 0x17, 0xf2, 0x23, 0xd8, 0x59, 0x5e, + 0x9f, 0x2a, 0xa4, 0x2b, 0x8c, 0xb5, 0x26, 0xc6, 0xb0, 0xf5, 0xe5, 0xf7, 0xd7, 0x87, 0x2c, 0xdc, + 0xae, 0x6f, 0xbd, 0x50, 0x48, 0x97, 0xb8, 0x97, 0x70, 0x0f, 0x15, 0x46, 0x0d, 0x8a, 0xd6, 0x1b, + 0x69, 0x1b, 0xb3, 0x8b, 0x5d, 0x27, 0xec, 0xa1, 0xc2, 0x57, 0x37, 0xa4, 0xbd, 0x85, 0x07, 0xd7, + 0x58, 0x7f, 0xc9, 0xdb, 0x68, 0x04, 0x6e, 0x1a, 0xa0, 0x95, 0xd8, 0xbf, 0x42, 0xbd, 0xa6, 0x72, + 0x69, 0x65, 0x9d, 0xfd, 0x8f, 0x95, 0x6c, 0x05, 0x56, 0xb2, 0x95, 0x5a, 0xc9, 0x56, 0x6d, 0x25, + 0xbb, 0xad, 0x95, 0xc7, 0xd0, 0x19, 0x21, 0x3d, 0xd7, 0x6f, 0xa8, 0x90, 0x98, 0xf0, 0x31, 0xdc, + 0x91, 0x48, 0x51, 0xac, 0x23, 0x5d, 0x06, 0xec, 0x08, 0x0f, 0x1f, 0x1b, 0xd4, 0xcf, 0x8b, 0xdd, + 0x6d, 0x3b, 0xf1, 0x7a, 0xfa, 0xc1, 0x97, 0x2a, 0xc8, 0x62, 0x7a, 0xef, 0x8f, 0x90, 0xbe, 0x7f, + 0x7b, 0x04, 0xd5, 0x53, 0x18, 0x21, 0xd9, 0x8e, 0x1d, 0x79, 0x49, 0x1d, 0xbc, 0x03, 0x28, 0x9b, + 0x0c, 0xcf, 0x48, 0x68, 0x1e, 0xc2, 0x56, 0xd5, 0x63, 0x62, 0xce, 0x65, 0x8b, 0xad, 0x5b, 0xb4, + 0x00, 0xb9, 0x64, 0x1e, 0x08, 0xe8, 0x8d, 0x90, 0x44, 0x52, 0xc4, 0x24, 0x15, 0x8e, 0x3f, 0x9a, + 0xe9, 0x38, 0xd2, 0x09, 0x3f, 0x04, 0x30, 0xdb, 0x6a, 0x40, 0xdc, 0xda, 0xa1, 0x9b, 0xef, 0xd0, + 0xfd, 0x47, 0x6e, 0xe0, 0xb8, 0xad, 0x4f, 0xa6, 0xe5, 0xb0, 0x3f, 0x9b, 0x7b, 0xec, 0x7c, 0xee, + 0xb1, 0x5f, 0x73, 0x8f, 0x7d, 0x5e, 0x78, 0xce, 0xf9, 0xc2, 0x73, 0x7e, 0x2c, 0x3c, 0x67, 0xd2, + 0x2e, 0x7f, 0x02, 0x4f, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x5e, 0x48, 0xa0, 0x81, 0x7e, 0x04, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/tests/integration/tx/internal/pulsar/testpb/test.pulsar.go b/tests/integration/tx/internal/pulsar/testpb/test.pulsar.go index c42b16edf217..9e5118b48666 100644 --- a/tests/integration/tx/internal/pulsar/testpb/test.pulsar.go +++ b/tests/integration/tx/internal/pulsar/testpb/test.pulsar.go @@ -3156,39 +3156,37 @@ var file_testpb_test_proto_rawDesc = []byte{ 0x70, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x18, 0x6e, 0x6f, 0x6e, 0x4e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, - 0x65, 0x44, 0x6f, 0x6e, 0x74, 0x4f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x74, - 0x0a, 0x0b, 0x49, 0x6e, 0x74, 0x41, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x65, 0x0a, + 0x65, 0x44, 0x6f, 0x6e, 0x74, 0x4f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x63, + 0x0a, 0x0b, 0x49, 0x6e, 0x74, 0x41, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x54, 0x0a, 0x0d, 0x69, 0x6e, 0x74, 0x5f, 0x61, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x41, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, - 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x69, 0x6e, 0x74, 0x41, 0x73, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x22, 0x71, 0x0a, 0x0a, 0x49, 0x6e, 0x74, 0x41, 0x73, 0x42, 0x79, 0x74, - 0x65, 0x73, 0x12, 0x63, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x5f, 0x61, 0x73, 0x5f, 0x62, 0x79, 0x74, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x41, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, - 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x69, 0x6e, 0x74, - 0x41, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x32, 0x65, 0x0a, 0x14, 0x49, 0x6e, 0x74, 0x65, 0x67, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x78, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x12, - 0x46, 0x0a, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x1a, 0x2e, - 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x70, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x1a, 0x1a, 0x2e, 0x74, 0x65, 0x73, 0x74, - 0x70, 0x62, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x73, 0x22, 0x00, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xa7, - 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x42, 0x09, 0x54, - 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x56, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x69, - 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, - 0x6a, 0x73, 0x6f, 0x6e, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, - 0x73, 0x74, 0x70, 0x62, 0x2f, 0x70, 0x75, 0x6c, 0x73, 0x61, 0x72, 0x2f, 0x74, 0x65, 0x73, 0x74, - 0x70, 0x62, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, - 0x62, 0xca, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0xe2, 0x02, 0x12, 0x54, 0x65, 0x73, - 0x74, 0x70, 0x62, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, + 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, + 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x69, 0x6e, 0x74, 0x41, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x22, 0x60, 0x0a, 0x0a, 0x49, 0x6e, 0x74, 0x41, 0x73, 0x42, 0x79, 0x74, 0x65, + 0x73, 0x12, 0x52, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x5f, 0x61, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, + 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, + 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x41, 0x73, + 0x42, 0x79, 0x74, 0x65, 0x73, 0x32, 0x65, 0x0a, 0x14, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x78, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x12, 0x46, 0x0a, + 0x0a, 0x54, 0x65, 0x73, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x1a, 0x2e, 0x74, 0x65, + 0x73, 0x74, 0x70, 0x62, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x1a, 0x1a, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, + 0x2e, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x73, 0x22, 0x00, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xa7, 0x01, 0x0a, + 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x42, 0x09, 0x54, 0x65, 0x73, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x56, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x69, 0x6e, 0x74, + 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x6a, 0x73, + 0x6f, 0x6e, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, + 0x70, 0x62, 0x2f, 0x70, 0x75, 0x6c, 0x73, 0x61, 0x72, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, + 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0xca, + 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0xe2, 0x02, 0x12, 0x54, 0x65, 0x73, 0x74, 0x70, + 0x62, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, + 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/tests/integration/tx/internal/testpb/test.proto b/tests/integration/tx/internal/testpb/test.proto index e20d6996a5ab..d25ff40e5f2e 100644 --- a/tests/integration/tx/internal/testpb/test.proto +++ b/tests/integration/tx/internal/testpb/test.proto @@ -43,7 +43,7 @@ message TestNullableFields { message IntAsString { string int_as_string = 1 [ (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (amino.dont_omitempty) = true, (gogoproto.nullable) = false ]; @@ -52,7 +52,7 @@ message IntAsString { message IntAsBytes { bytes int_as_bytes = 1 [ (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (amino.dont_omitempty) = true, (gogoproto.nullable) = false ]; diff --git a/testutil/cli/cmd.go b/testutil/cli/cmd.go index 6e36bc2c6622..57b5b11ee6e5 100644 --- a/testutil/cli/cmd.go +++ b/testutil/cli/cmd.go @@ -4,11 +4,11 @@ import ( "context" "fmt" - "cosmossdk.io/core/address" "github.com/spf13/cobra" + "cosmossdk.io/core/address" + "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/x/bank/client/cli" ) @@ -36,10 +36,3 @@ func MsgSendExec(clientCtx client.Context, from, to, amount fmt.Stringer, ac add return ExecTestCLICmd(clientCtx, cli.NewSendTxCmd(ac), args) } - -func QueryBalancesExec(clientCtx client.Context, address fmt.Stringer, ac address.Codec, extraArgs ...string) (testutil.BufferWriter, error) { - args := []string{address.String(), fmt.Sprintf("--%s=json", flags.FlagOutput)} - args = append(args, extraArgs...) - - return ExecTestCLICmd(clientCtx, cli.GetBalancesCmd(ac), args) -} diff --git a/testutil/configurator/configurator.go b/testutil/configurator/configurator.go index e96d05971bb2..d671b2d82884 100644 --- a/testutil/configurator/configurator.go +++ b/testutil/configurator/configurator.go @@ -25,82 +25,117 @@ import ( "cosmossdk.io/depinject" ) -var beginBlockOrder = []string{ - "upgrade", - "mint", - "distribution", - "slashing", - "evidence", - "staking", - "auth", - "bank", - "gov", - "crisis", - "genutil", - "authz", - "feegrant", - "nft", - "group", - "params", - "consensus", - "vesting", - "circuit", +// Config should never need to be instantiated manually and is solely used for ModuleOption. +type Config struct { + ModuleConfigs map[string]*appv1alpha1.ModuleConfig + PreBlockersOrder []string + BeginBlockersOrder []string + EndBlockersOrder []string + InitGenesisOrder []string + setInitGenesis bool } -var endBlockersOrder = []string{ - "crisis", - "gov", - "staking", - "auth", - "bank", - "distribution", - "slashing", - "mint", - "genutil", - "evidence", - "authz", - "feegrant", - "nft", - "group", - "params", - "consensus", - "upgrade", - "vesting", - "circuit", +func defaultConfig() *Config { + return &Config{ + ModuleConfigs: make(map[string]*appv1alpha1.ModuleConfig), + PreBlockersOrder: []string{ + "upgrade", + }, + BeginBlockersOrder: []string{ + "mint", + "distribution", + "slashing", + "evidence", + "staking", + "auth", + "bank", + "gov", + "crisis", + "genutil", + "authz", + "feegrant", + "nft", + "group", + "params", + "consensus", + "vesting", + "circuit", + }, + EndBlockersOrder: []string{ + "crisis", + "gov", + "staking", + "auth", + "bank", + "distribution", + "slashing", + "mint", + "genutil", + "evidence", + "authz", + "feegrant", + "nft", + "group", + "params", + "consensus", + "upgrade", + "vesting", + "circuit", + }, + InitGenesisOrder: []string{ + "auth", + "bank", + "distribution", + "staking", + "slashing", + "gov", + "mint", + "crisis", + "genutil", + "evidence", + "authz", + "feegrant", + "nft", + "group", + "params", + "consensus", + "upgrade", + "vesting", + "circuit", + }, + setInitGenesis: true, + } } -var initGenesisOrder = []string{ - "auth", - "bank", - "distribution", - "staking", - "slashing", - "gov", - "mint", - "crisis", - "genutil", - "evidence", - "authz", - "feegrant", - "nft", - "group", - "params", - "consensus", - "upgrade", - "vesting", - "circuit", +type ModuleOption func(config *Config) + +func WithCustomPreBlockersOrder(preBlockOrder ...string) ModuleOption { + return func(config *Config) { + config.PreBlockersOrder = preBlockOrder + } } -type appConfig struct { - moduleConfigs map[string]*appv1alpha1.ModuleConfig - setInitGenesis bool +func WithCustomBeginBlockersOrder(beginBlockOrder ...string) ModuleOption { + return func(config *Config) { + config.BeginBlockersOrder = beginBlockOrder + } } -type ModuleOption func(config *appConfig) +func WithCustomEndBlockersOrder(endBlockersOrder ...string) ModuleOption { + return func(config *Config) { + config.EndBlockersOrder = endBlockersOrder + } +} + +func WithCustomInitGenesisOrder(initGenesisOrder ...string) ModuleOption { + return func(config *Config) { + config.InitGenesisOrder = initGenesisOrder + } +} func BankModule() ModuleOption { - return func(config *appConfig) { - config.moduleConfigs["bank"] = &appv1alpha1.ModuleConfig{ + return func(config *Config) { + config.ModuleConfigs["bank"] = &appv1alpha1.ModuleConfig{ Name: "bank", Config: appconfig.WrapAny(&bankmodulev1.Module{}), } @@ -108,8 +143,8 @@ func BankModule() ModuleOption { } func AuthModule() ModuleOption { - return func(config *appConfig) { - config.moduleConfigs["auth"] = &appv1alpha1.ModuleConfig{ + return func(config *Config) { + config.ModuleConfigs["auth"] = &appv1alpha1.ModuleConfig{ Name: "auth", Config: appconfig.WrapAny(&authmodulev1.Module{ Bech32Prefix: "cosmos", @@ -128,8 +163,8 @@ func AuthModule() ModuleOption { } func ParamsModule() ModuleOption { - return func(config *appConfig) { - config.moduleConfigs["params"] = &appv1alpha1.ModuleConfig{ + return func(config *Config) { + config.ModuleConfigs["params"] = &appv1alpha1.ModuleConfig{ Name: "params", Config: appconfig.WrapAny(¶msmodulev1.Module{}), } @@ -137,8 +172,8 @@ func ParamsModule() ModuleOption { } func TxModule() ModuleOption { - return func(config *appConfig) { - config.moduleConfigs["tx"] = &appv1alpha1.ModuleConfig{ + return func(config *Config) { + config.ModuleConfigs["tx"] = &appv1alpha1.ModuleConfig{ Name: "tx", Config: appconfig.WrapAny(&txconfigv1.Config{}), } @@ -146,8 +181,8 @@ func TxModule() ModuleOption { } func StakingModule() ModuleOption { - return func(config *appConfig) { - config.moduleConfigs["staking"] = &appv1alpha1.ModuleConfig{ + return func(config *Config) { + config.ModuleConfigs["staking"] = &appv1alpha1.ModuleConfig{ Name: "staking", Config: appconfig.WrapAny(&stakingmodulev1.Module{}), } @@ -155,8 +190,8 @@ func StakingModule() ModuleOption { } func SlashingModule() ModuleOption { - return func(config *appConfig) { - config.moduleConfigs["slashing"] = &appv1alpha1.ModuleConfig{ + return func(config *Config) { + config.ModuleConfigs["slashing"] = &appv1alpha1.ModuleConfig{ Name: "slashing", Config: appconfig.WrapAny(&slashingmodulev1.Module{}), } @@ -164,8 +199,8 @@ func SlashingModule() ModuleOption { } func GenutilModule() ModuleOption { - return func(config *appConfig) { - config.moduleConfigs["genutil"] = &appv1alpha1.ModuleConfig{ + return func(config *Config) { + config.ModuleConfigs["genutil"] = &appv1alpha1.ModuleConfig{ Name: "genutil", Config: appconfig.WrapAny(&genutilmodulev1.Module{}), } @@ -173,8 +208,8 @@ func GenutilModule() ModuleOption { } func DistributionModule() ModuleOption { - return func(config *appConfig) { - config.moduleConfigs["distribution"] = &appv1alpha1.ModuleConfig{ + return func(config *Config) { + config.ModuleConfigs["distribution"] = &appv1alpha1.ModuleConfig{ Name: "distribution", Config: appconfig.WrapAny(&distrmodulev1.Module{}), } @@ -182,8 +217,8 @@ func DistributionModule() ModuleOption { } func FeegrantModule() ModuleOption { - return func(config *appConfig) { - config.moduleConfigs["feegrant"] = &appv1alpha1.ModuleConfig{ + return func(config *Config) { + config.ModuleConfigs["feegrant"] = &appv1alpha1.ModuleConfig{ Name: "feegrant", Config: appconfig.WrapAny(&feegrantmodulev1.Module{}), } @@ -191,8 +226,8 @@ func FeegrantModule() ModuleOption { } func VestingModule() ModuleOption { - return func(config *appConfig) { - config.moduleConfigs["vesting"] = &appv1alpha1.ModuleConfig{ + return func(config *Config) { + config.ModuleConfigs["vesting"] = &appv1alpha1.ModuleConfig{ Name: "vesting", Config: appconfig.WrapAny(&vestingmodulev1.Module{}), } @@ -200,8 +235,8 @@ func VestingModule() ModuleOption { } func GovModule() ModuleOption { - return func(config *appConfig) { - config.moduleConfigs["gov"] = &appv1alpha1.ModuleConfig{ + return func(config *Config) { + config.ModuleConfigs["gov"] = &appv1alpha1.ModuleConfig{ Name: "gov", Config: appconfig.WrapAny(&govmodulev1.Module{}), } @@ -209,8 +244,8 @@ func GovModule() ModuleOption { } func ConsensusModule() ModuleOption { - return func(config *appConfig) { - config.moduleConfigs["consensus"] = &appv1alpha1.ModuleConfig{ + return func(config *Config) { + config.ModuleConfigs["consensus"] = &appv1alpha1.ModuleConfig{ Name: "consensus", Config: appconfig.WrapAny(&consensusmodulev1.Module{}), } @@ -218,8 +253,8 @@ func ConsensusModule() ModuleOption { } func MintModule() ModuleOption { - return func(config *appConfig) { - config.moduleConfigs["mint"] = &appv1alpha1.ModuleConfig{ + return func(config *Config) { + config.ModuleConfigs["mint"] = &appv1alpha1.ModuleConfig{ Name: "mint", Config: appconfig.WrapAny(&mintmodulev1.Module{}), GolangBindings: []*appv1alpha1.GolangBinding{ @@ -233,8 +268,8 @@ func MintModule() ModuleOption { } func EvidenceModule() ModuleOption { - return func(config *appConfig) { - config.moduleConfigs["evidence"] = &appv1alpha1.ModuleConfig{ + return func(config *Config) { + config.ModuleConfigs["evidence"] = &appv1alpha1.ModuleConfig{ Name: "evidence", Config: appconfig.WrapAny(&evidencemodulev1.Module{}), } @@ -242,8 +277,8 @@ func EvidenceModule() ModuleOption { } func AuthzModule() ModuleOption { - return func(config *appConfig) { - config.moduleConfigs["authz"] = &appv1alpha1.ModuleConfig{ + return func(config *Config) { + config.ModuleConfigs["authz"] = &appv1alpha1.ModuleConfig{ Name: "authz", Config: appconfig.WrapAny(&authzmodulev1.Module{}), } @@ -251,8 +286,8 @@ func AuthzModule() ModuleOption { } func GroupModule() ModuleOption { - return func(config *appConfig) { - config.moduleConfigs["group"] = &appv1alpha1.ModuleConfig{ + return func(config *Config) { + config.ModuleConfigs["group"] = &appv1alpha1.ModuleConfig{ Name: "group", Config: appconfig.WrapAny(&groupmodulev1.Module{}), } @@ -260,8 +295,8 @@ func GroupModule() ModuleOption { } func NFTModule() ModuleOption { - return func(config *appConfig) { - config.moduleConfigs["nft"] = &appv1alpha1.ModuleConfig{ + return func(config *Config) { + config.ModuleConfigs["nft"] = &appv1alpha1.ModuleConfig{ Name: "nft", Config: appconfig.WrapAny(&nftmodulev1.Module{}), } @@ -269,8 +304,8 @@ func NFTModule() ModuleOption { } func CircuitModule() ModuleOption { - return func(config *appConfig) { - config.moduleConfigs["circuit"] = &appv1alpha1.ModuleConfig{ + return func(config *Config) { + config.ModuleConfigs["circuit"] = &appv1alpha1.ModuleConfig{ Name: "circuit", Config: appconfig.WrapAny(&circuitmodulev1.Module{}), } @@ -278,49 +313,54 @@ func CircuitModule() ModuleOption { } func OmitInitGenesis() ModuleOption { - return func(config *appConfig) { + return func(config *Config) { config.setInitGenesis = false } } func NewAppConfig(opts ...ModuleOption) depinject.Config { - cfg := &appConfig{ - moduleConfigs: make(map[string]*appv1alpha1.ModuleConfig), - setInitGenesis: true, - } + cfg := defaultConfig() for _, opt := range opts { opt(cfg) } + preBlockers := make([]string, 0) beginBlockers := make([]string, 0) endBlockers := make([]string, 0) initGenesis := make([]string, 0) overrides := make([]*runtimev1alpha1.StoreKeyConfig, 0) - for _, s := range beginBlockOrder { - if _, ok := cfg.moduleConfigs[s]; ok { + for _, s := range cfg.PreBlockersOrder { + if _, ok := cfg.ModuleConfigs[s]; ok { + preBlockers = append(preBlockers, s) + } + } + + for _, s := range cfg.BeginBlockersOrder { + if _, ok := cfg.ModuleConfigs[s]; ok { beginBlockers = append(beginBlockers, s) } } - for _, s := range endBlockersOrder { - if _, ok := cfg.moduleConfigs[s]; ok { + for _, s := range cfg.EndBlockersOrder { + if _, ok := cfg.ModuleConfigs[s]; ok { endBlockers = append(endBlockers, s) } } - for _, s := range initGenesisOrder { - if _, ok := cfg.moduleConfigs[s]; ok { + for _, s := range cfg.InitGenesisOrder { + if _, ok := cfg.ModuleConfigs[s]; ok { initGenesis = append(initGenesis, s) } } - if _, ok := cfg.moduleConfigs["auth"]; ok { + if _, ok := cfg.ModuleConfigs["auth"]; ok { overrides = append(overrides, &runtimev1alpha1.StoreKeyConfig{ModuleName: "auth", KvStoreKey: "acc"}) } runtimeConfig := &runtimev1alpha1.Module{ AppName: "TestApp", + PreBlockers: preBlockers, BeginBlockers: beginBlockers, EndBlockers: endBlockers, OverrideStoreKeys: overrides, @@ -334,7 +374,7 @@ func NewAppConfig(opts ...ModuleOption) depinject.Config { Config: appconfig.WrapAny(runtimeConfig), }} - for _, m := range cfg.moduleConfigs { + for _, m := range cfg.ModuleConfigs { modules = append(modules, m) } diff --git a/testutil/context.go b/testutil/context.go index f2a9bdaf922f..a43e96295ae2 100644 --- a/testutil/context.go +++ b/testutil/context.go @@ -4,11 +4,11 @@ import ( "testing" "time" - "cosmossdk.io/log" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/assert" + "cosmossdk.io/log" "cosmossdk.io/store" "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" @@ -31,6 +31,36 @@ func DefaultContext(key, tkey storetypes.StoreKey) sdk.Context { return ctx } +// DefaultContextWithKeys creates a sdk.Context with a fresh MemDB, mounting the providing keys for usage in the multistore. +// This function is intended to be used for testing purposes only. +func DefaultContextWithKeys( + keys map[string]*storetypes.KVStoreKey, + transKeys map[string]*storetypes.TransientStoreKey, + memKeys map[string]*storetypes.MemoryStoreKey, +) sdk.Context { + db := dbm.NewMemDB() + cms := store.NewCommitMultiStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics()) + + for _, key := range keys { + cms.MountStoreWithDB(key, storetypes.StoreTypeIAVL, db) + } + + for _, tKey := range transKeys { + cms.MountStoreWithDB(tKey, storetypes.StoreTypeTransient, db) + } + + for _, memkey := range memKeys { + cms.MountStoreWithDB(memkey, storetypes.StoreTypeMemory, db) + } + + err := cms.LoadLatestVersion() + if err != nil { + panic(err) + } + + return sdk.NewContext(cms, cmtproto.Header{}, false, log.NewNopLogger()) +} + type TestContext struct { Ctx sdk.Context DB *dbm.MemDB diff --git a/testutil/integration/example_test.go b/testutil/integration/example_test.go index 549b2cc12005..b395324c1917 100644 --- a/testutil/integration/example_test.go +++ b/testutil/integration/example_test.go @@ -4,13 +4,14 @@ import ( "fmt" "io" - "cosmossdk.io/log" - storetypes "cosmossdk.io/store/types" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" - "github.com/google/go-cmp/cmp" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" + + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil/integration" sdk "github.com/cosmos/cosmos-sdk/types" @@ -44,6 +45,7 @@ func Example() { runtime.NewKVStoreService(keys[authtypes.StoreKey]), authtypes.ProtoBaseAccount, map[string][]string{minttypes.ModuleName: {authtypes.Minter}}, + addresscodec.NewBech32Codec("cosmos"), "cosmos", authority, ) @@ -62,7 +64,10 @@ func Example() { logger, keys, encodingCfg.Codec, - authModule, mintModule, + map[string]appmodule.AppModule{ + authtypes.ModuleName: authModule, + minttypes.ModuleName: mintModule, + }, ) // register the message and query servers @@ -129,6 +134,7 @@ func Example_oneModule() { runtime.NewKVStoreService(keys[authtypes.StoreKey]), authtypes.ProtoBaseAccount, map[string][]string{minttypes.ModuleName: {authtypes.Minter}}, + addresscodec.NewBech32Codec("cosmos"), "cosmos", authority, ) @@ -142,7 +148,9 @@ func Example_oneModule() { logger, keys, encodingCfg.Codec, - authModule, + map[string]appmodule.AppModule{ + authtypes.ModuleName: authModule, + }, ) // register the message and query servers diff --git a/testutil/integration/router.go b/testutil/integration/router.go index fc4cebee89fc..0bb9d6e7921c 100644 --- a/testutil/integration/router.go +++ b/testutil/integration/router.go @@ -4,13 +4,15 @@ import ( "context" "fmt" + cmtabcitypes "github.com/cometbft/cometbft/abci/types" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + dbm "github.com/cosmos/cosmos-db" + + "cosmossdk.io/core/appmodule" "cosmossdk.io/log" "cosmossdk.io/store" "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" - cmtabcitypes "github.com/cometbft/cometbft/abci/types" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" - dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" @@ -44,30 +46,30 @@ func NewIntegrationApp( logger log.Logger, keys map[string]*storetypes.KVStoreKey, appCodec codec.Codec, - modules ...module.AppModule, + modules map[string]appmodule.AppModule, + baseAppOptions ...func(*baseapp.BaseApp), ) *App { db := dbm.NewMemDB() interfaceRegistry := codectypes.NewInterfaceRegistry() - for _, module := range modules { - module.RegisterInterfaces(interfaceRegistry) - } + moduleManager := module.NewManagerFromMap(modules) + basicModuleManager := module.NewBasicManagerFromManager(moduleManager, nil) + basicModuleManager.RegisterInterfaces(interfaceRegistry) txConfig := authtx.NewTxConfig(codec.NewProtoCodec(interfaceRegistry), authtx.DefaultSignModes) - bApp := baseapp.NewBaseApp(appName, logger, db, txConfig.TxDecoder(), baseapp.SetChainID(appName)) + bApp := baseapp.NewBaseApp(appName, logger, db, txConfig.TxDecoder(), append(baseAppOptions, baseapp.SetChainID(appName))...) bApp.MountKVStores(keys) - bApp.SetInitChainer(func(ctx sdk.Context, _ *cmtabcitypes.RequestInitChain) (*cmtabcitypes.ResponseInitChain, error) { + bApp.SetInitChainer(func(_ sdk.Context, _ *cmtabcitypes.RequestInitChain) (*cmtabcitypes.ResponseInitChain, error) { for _, mod := range modules { if m, ok := mod.(module.HasGenesis); ok { - m.InitGenesis(ctx, appCodec, m.DefaultGenesis(appCodec)) + m.InitGenesis(sdkCtx, appCodec, m.DefaultGenesis(appCodec)) } } return &cmtabcitypes.ResponseInitChain{}, nil }) - moduleManager := module.NewManager(modules...) bApp.SetBeginBlocker(func(_ sdk.Context) (sdk.BeginBlock, error) { return moduleManager.BeginBlock(sdkCtx) }) diff --git a/testutil/mock/db/types.go b/testutil/mock/db/types.go deleted file mode 100644 index 40deb6e7a6f0..000000000000 --- a/testutil/mock/db/types.go +++ /dev/null @@ -1,745 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: db/types.go - -// Package mock is a generated GoMock package. -package mock - -import ( - reflect "reflect" - - db "github.com/cosmos/cosmos-sdk/db" - gomock "github.com/golang/mock/gomock" -) - -// MockConnection is a mock of Connection interface. -type MockConnection struct { - ctrl *gomock.Controller - recorder *MockConnectionMockRecorder -} - -// MockConnectionMockRecorder is the mock recorder for MockConnection. -type MockConnectionMockRecorder struct { - mock *MockConnection -} - -// NewMockConnection creates a new mock instance. -func NewMockConnection(ctrl *gomock.Controller) *MockConnection { - mock := &MockConnection{ctrl: ctrl} - mock.recorder = &MockConnectionMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockConnection) EXPECT() *MockConnectionMockRecorder { - return m.recorder -} - -// Close mocks base method. -func (m *MockConnection) Close() error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Close") - ret0, _ := ret[0].(error) - return ret0 -} - -// Close indicates an expected call of Close. -func (mr *MockConnectionMockRecorder) Close() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockConnection)(nil).Close)) -} - -// DeleteVersion mocks base method. -func (m *MockConnection) DeleteVersion(arg0 uint64) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteVersion", arg0) - ret0, _ := ret[0].(error) - return ret0 -} - -// DeleteVersion indicates an expected call of DeleteVersion. -func (mr *MockConnectionMockRecorder) DeleteVersion(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteVersion", reflect.TypeOf((*MockConnection)(nil).DeleteVersion), arg0) -} - -// ReadWriter mocks base method. -func (m *MockConnection) ReadWriter() db.ReadWriter { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ReadWriter") - ret0, _ := ret[0].(db.ReadWriter) - return ret0 -} - -// ReadWriter indicates an expected call of ReadWriter. -func (mr *MockConnectionMockRecorder) ReadWriter() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadWriter", reflect.TypeOf((*MockConnection)(nil).ReadWriter)) -} - -// Reader mocks base method. -func (m *MockConnection) Reader() db.Reader { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Reader") - ret0, _ := ret[0].(db.Reader) - return ret0 -} - -// Reader indicates an expected call of Reader. -func (mr *MockConnectionMockRecorder) Reader() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reader", reflect.TypeOf((*MockConnection)(nil).Reader)) -} - -// ReaderAt mocks base method. -func (m *MockConnection) ReaderAt(arg0 uint64) (db.Reader, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ReaderAt", arg0) - ret0, _ := ret[0].(db.Reader) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// ReaderAt indicates an expected call of ReaderAt. -func (mr *MockConnectionMockRecorder) ReaderAt(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReaderAt", reflect.TypeOf((*MockConnection)(nil).ReaderAt), arg0) -} - -// Revert mocks base method. -func (m *MockConnection) Revert() error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Revert") - ret0, _ := ret[0].(error) - return ret0 -} - -// Revert indicates an expected call of Revert. -func (mr *MockConnectionMockRecorder) Revert() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revert", reflect.TypeOf((*MockConnection)(nil).Revert)) -} - -// SaveNextVersion mocks base method. -func (m *MockConnection) SaveNextVersion() (uint64, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SaveNextVersion") - ret0, _ := ret[0].(uint64) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// SaveNextVersion indicates an expected call of SaveNextVersion. -func (mr *MockConnectionMockRecorder) SaveNextVersion() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveNextVersion", reflect.TypeOf((*MockConnection)(nil).SaveNextVersion)) -} - -// SaveVersion mocks base method. -func (m *MockConnection) SaveVersion(arg0 uint64) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SaveVersion", arg0) - ret0, _ := ret[0].(error) - return ret0 -} - -// SaveVersion indicates an expected call of SaveVersion. -func (mr *MockConnectionMockRecorder) SaveVersion(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveVersion", reflect.TypeOf((*MockConnection)(nil).SaveVersion), arg0) -} - -// Versions mocks base method. -func (m *MockConnection) Versions() (db.VersionSet, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Versions") - ret0, _ := ret[0].(db.VersionSet) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Versions indicates an expected call of Versions. -func (mr *MockConnectionMockRecorder) Versions() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Versions", reflect.TypeOf((*MockConnection)(nil).Versions)) -} - -// Writer mocks base method. -func (m *MockConnection) Writer() db.Writer { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Writer") - ret0, _ := ret[0].(db.Writer) - return ret0 -} - -// Writer indicates an expected call of Writer. -func (mr *MockConnectionMockRecorder) Writer() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Writer", reflect.TypeOf((*MockConnection)(nil).Writer)) -} - -// MockReader is a mock of Reader interface. -type MockReader struct { - ctrl *gomock.Controller - recorder *MockReaderMockRecorder -} - -// MockReaderMockRecorder is the mock recorder for MockReader. -type MockReaderMockRecorder struct { - mock *MockReader -} - -// NewMockReader creates a new mock instance. -func NewMockReader(ctrl *gomock.Controller) *MockReader { - mock := &MockReader{ctrl: ctrl} - mock.recorder = &MockReaderMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockReader) EXPECT() *MockReaderMockRecorder { - return m.recorder -} - -// Discard mocks base method. -func (m *MockReader) Discard() error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Discard") - ret0, _ := ret[0].(error) - return ret0 -} - -// Discard indicates an expected call of Discard. -func (mr *MockReaderMockRecorder) Discard() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Discard", reflect.TypeOf((*MockReader)(nil).Discard)) -} - -// Get mocks base method. -func (m *MockReader) Get(arg0 []byte) ([]byte, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0) - ret0, _ := ret[0].([]byte) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Get indicates an expected call of Get. -func (mr *MockReaderMockRecorder) Get(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockReader)(nil).Get), arg0) -} - -// Has mocks base method. -func (m *MockReader) Has(key []byte) (bool, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Has", key) - ret0, _ := ret[0].(bool) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Has indicates an expected call of Has. -func (mr *MockReaderMockRecorder) Has(key interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Has", reflect.TypeOf((*MockReader)(nil).Has), key) -} - -// Iterator mocks base method. -func (m *MockReader) Iterator(start, end []byte) (db.Iterator, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Iterator", start, end) - ret0, _ := ret[0].(db.Iterator) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Iterator indicates an expected call of Iterator. -func (mr *MockReaderMockRecorder) Iterator(start, end interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Iterator", reflect.TypeOf((*MockReader)(nil).Iterator), start, end) -} - -// ReverseIterator mocks base method. -func (m *MockReader) ReverseIterator(start, end []byte) (db.Iterator, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ReverseIterator", start, end) - ret0, _ := ret[0].(db.Iterator) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// ReverseIterator indicates an expected call of ReverseIterator. -func (mr *MockReaderMockRecorder) ReverseIterator(start, end interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReverseIterator", reflect.TypeOf((*MockReader)(nil).ReverseIterator), start, end) -} - -// MockWriter is a mock of Writer interface. -type MockWriter struct { - ctrl *gomock.Controller - recorder *MockWriterMockRecorder -} - -// MockWriterMockRecorder is the mock recorder for MockWriter. -type MockWriterMockRecorder struct { - mock *MockWriter -} - -// NewMockWriter creates a new mock instance. -func NewMockWriter(ctrl *gomock.Controller) *MockWriter { - mock := &MockWriter{ctrl: ctrl} - mock.recorder = &MockWriterMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockWriter) EXPECT() *MockWriterMockRecorder { - return m.recorder -} - -// Commit mocks base method. -func (m *MockWriter) Commit() error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Commit") - ret0, _ := ret[0].(error) - return ret0 -} - -// Commit indicates an expected call of Commit. -func (mr *MockWriterMockRecorder) Commit() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Commit", reflect.TypeOf((*MockWriter)(nil).Commit)) -} - -// Delete mocks base method. -func (m *MockWriter) Delete(arg0 []byte) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", arg0) - ret0, _ := ret[0].(error) - return ret0 -} - -// Delete indicates an expected call of Delete. -func (mr *MockWriterMockRecorder) Delete(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockWriter)(nil).Delete), arg0) -} - -// Discard mocks base method. -func (m *MockWriter) Discard() error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Discard") - ret0, _ := ret[0].(error) - return ret0 -} - -// Discard indicates an expected call of Discard. -func (mr *MockWriterMockRecorder) Discard() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Discard", reflect.TypeOf((*MockWriter)(nil).Discard)) -} - -// Set mocks base method. -func (m *MockWriter) Set(arg0, arg1 []byte) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Set", arg0, arg1) - ret0, _ := ret[0].(error) - return ret0 -} - -// Set indicates an expected call of Set. -func (mr *MockWriterMockRecorder) Set(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockWriter)(nil).Set), arg0, arg1) -} - -// MockReadWriter is a mock of ReadWriter interface. -type MockReadWriter struct { - ctrl *gomock.Controller - recorder *MockReadWriterMockRecorder -} - -// MockReadWriterMockRecorder is the mock recorder for MockReadWriter. -type MockReadWriterMockRecorder struct { - mock *MockReadWriter -} - -// NewMockReadWriter creates a new mock instance. -func NewMockReadWriter(ctrl *gomock.Controller) *MockReadWriter { - mock := &MockReadWriter{ctrl: ctrl} - mock.recorder = &MockReadWriterMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockReadWriter) EXPECT() *MockReadWriterMockRecorder { - return m.recorder -} - -// Commit mocks base method. -func (m *MockReadWriter) Commit() error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Commit") - ret0, _ := ret[0].(error) - return ret0 -} - -// Commit indicates an expected call of Commit. -func (mr *MockReadWriterMockRecorder) Commit() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Commit", reflect.TypeOf((*MockReadWriter)(nil).Commit)) -} - -// Delete mocks base method. -func (m *MockReadWriter) Delete(arg0 []byte) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", arg0) - ret0, _ := ret[0].(error) - return ret0 -} - -// Delete indicates an expected call of Delete. -func (mr *MockReadWriterMockRecorder) Delete(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockReadWriter)(nil).Delete), arg0) -} - -// Discard mocks base method. -func (m *MockReadWriter) Discard() error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Discard") - ret0, _ := ret[0].(error) - return ret0 -} - -// Discard indicates an expected call of Discard. -func (mr *MockReadWriterMockRecorder) Discard() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Discard", reflect.TypeOf((*MockReadWriter)(nil).Discard)) -} - -// Get mocks base method. -func (m *MockReadWriter) Get(arg0 []byte) ([]byte, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0) - ret0, _ := ret[0].([]byte) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Get indicates an expected call of Get. -func (mr *MockReadWriterMockRecorder) Get(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockReadWriter)(nil).Get), arg0) -} - -// Has mocks base method. -func (m *MockReadWriter) Has(key []byte) (bool, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Has", key) - ret0, _ := ret[0].(bool) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Has indicates an expected call of Has. -func (mr *MockReadWriterMockRecorder) Has(key interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Has", reflect.TypeOf((*MockReadWriter)(nil).Has), key) -} - -// Iterator mocks base method. -func (m *MockReadWriter) Iterator(start, end []byte) (db.Iterator, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Iterator", start, end) - ret0, _ := ret[0].(db.Iterator) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Iterator indicates an expected call of Iterator. -func (mr *MockReadWriterMockRecorder) Iterator(start, end interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Iterator", reflect.TypeOf((*MockReadWriter)(nil).Iterator), start, end) -} - -// ReverseIterator mocks base method. -func (m *MockReadWriter) ReverseIterator(start, end []byte) (db.Iterator, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ReverseIterator", start, end) - ret0, _ := ret[0].(db.Iterator) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// ReverseIterator indicates an expected call of ReverseIterator. -func (mr *MockReadWriterMockRecorder) ReverseIterator(start, end interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReverseIterator", reflect.TypeOf((*MockReadWriter)(nil).ReverseIterator), start, end) -} - -// Set mocks base method. -func (m *MockReadWriter) Set(arg0, arg1 []byte) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Set", arg0, arg1) - ret0, _ := ret[0].(error) - return ret0 -} - -// Set indicates an expected call of Set. -func (mr *MockReadWriterMockRecorder) Set(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockReadWriter)(nil).Set), arg0, arg1) -} - -// MockIterator is a mock of Iterator interface. -type MockIterator struct { - ctrl *gomock.Controller - recorder *MockIteratorMockRecorder -} - -// MockIteratorMockRecorder is the mock recorder for MockIterator. -type MockIteratorMockRecorder struct { - mock *MockIterator -} - -// NewMockIterator creates a new mock instance. -func NewMockIterator(ctrl *gomock.Controller) *MockIterator { - mock := &MockIterator{ctrl: ctrl} - mock.recorder = &MockIteratorMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockIterator) EXPECT() *MockIteratorMockRecorder { - return m.recorder -} - -// Close mocks base method. -func (m *MockIterator) Close() error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Close") - ret0, _ := ret[0].(error) - return ret0 -} - -// Close indicates an expected call of Close. -func (mr *MockIteratorMockRecorder) Close() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockIterator)(nil).Close)) -} - -// Domain mocks base method. -func (m *MockIterator) Domain() ([]byte, []byte) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Domain") - ret0, _ := ret[0].([]byte) - ret1, _ := ret[1].([]byte) - return ret0, ret1 -} - -// Domain indicates an expected call of Domain. -func (mr *MockIteratorMockRecorder) Domain() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Domain", reflect.TypeOf((*MockIterator)(nil).Domain)) -} - -// Error mocks base method. -func (m *MockIterator) Error() error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Error") - ret0, _ := ret[0].(error) - return ret0 -} - -// Error indicates an expected call of Error. -func (mr *MockIteratorMockRecorder) Error() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Error", reflect.TypeOf((*MockIterator)(nil).Error)) -} - -// Key mocks base method. -func (m *MockIterator) Key() []byte { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Key") - ret0, _ := ret[0].([]byte) - return ret0 -} - -// Key indicates an expected call of Key. -func (mr *MockIteratorMockRecorder) Key() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Key", reflect.TypeOf((*MockIterator)(nil).Key)) -} - -// Next mocks base method. -func (m *MockIterator) Next() bool { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Next") - ret0, _ := ret[0].(bool) - return ret0 -} - -// Next indicates an expected call of Next. -func (mr *MockIteratorMockRecorder) Next() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Next", reflect.TypeOf((*MockIterator)(nil).Next)) -} - -// Value mocks base method. -func (m *MockIterator) Value() []byte { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Value") - ret0, _ := ret[0].([]byte) - return ret0 -} - -// Value indicates an expected call of Value. -func (mr *MockIteratorMockRecorder) Value() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockIterator)(nil).Value)) -} - -// MockVersionSet is a mock of VersionSet interface. -type MockVersionSet struct { - ctrl *gomock.Controller - recorder *MockVersionSetMockRecorder -} - -// MockVersionSetMockRecorder is the mock recorder for MockVersionSet. -type MockVersionSetMockRecorder struct { - mock *MockVersionSet -} - -// NewMockVersionSet creates a new mock instance. -func NewMockVersionSet(ctrl *gomock.Controller) *MockVersionSet { - mock := &MockVersionSet{ctrl: ctrl} - mock.recorder = &MockVersionSetMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockVersionSet) EXPECT() *MockVersionSetMockRecorder { - return m.recorder -} - -// Count mocks base method. -func (m *MockVersionSet) Count() int { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Count") - ret0, _ := ret[0].(int) - return ret0 -} - -// Count indicates an expected call of Count. -func (mr *MockVersionSetMockRecorder) Count() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Count", reflect.TypeOf((*MockVersionSet)(nil).Count)) -} - -// Equal mocks base method. -func (m *MockVersionSet) Equal(arg0 db.VersionSet) bool { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Equal", arg0) - ret0, _ := ret[0].(bool) - return ret0 -} - -// Equal indicates an expected call of Equal. -func (mr *MockVersionSetMockRecorder) Equal(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Equal", reflect.TypeOf((*MockVersionSet)(nil).Equal), arg0) -} - -// Exists mocks base method. -func (m *MockVersionSet) Exists(arg0 uint64) bool { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Exists", arg0) - ret0, _ := ret[0].(bool) - return ret0 -} - -// Exists indicates an expected call of Exists. -func (mr *MockVersionSetMockRecorder) Exists(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exists", reflect.TypeOf((*MockVersionSet)(nil).Exists), arg0) -} - -// Iterator mocks base method. -func (m *MockVersionSet) Iterator() db.VersionIterator { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Iterator") - ret0, _ := ret[0].(db.VersionIterator) - return ret0 -} - -// Iterator indicates an expected call of Iterator. -func (mr *MockVersionSetMockRecorder) Iterator() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Iterator", reflect.TypeOf((*MockVersionSet)(nil).Iterator)) -} - -// Last mocks base method. -func (m *MockVersionSet) Last() uint64 { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Last") - ret0, _ := ret[0].(uint64) - return ret0 -} - -// Last indicates an expected call of Last. -func (mr *MockVersionSetMockRecorder) Last() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Last", reflect.TypeOf((*MockVersionSet)(nil).Last)) -} - -// MockVersionIterator is a mock of VersionIterator interface. -type MockVersionIterator struct { - ctrl *gomock.Controller - recorder *MockVersionIteratorMockRecorder -} - -// MockVersionIteratorMockRecorder is the mock recorder for MockVersionIterator. -type MockVersionIteratorMockRecorder struct { - mock *MockVersionIterator -} - -// NewMockVersionIterator creates a new mock instance. -func NewMockVersionIterator(ctrl *gomock.Controller) *MockVersionIterator { - mock := &MockVersionIterator{ctrl: ctrl} - mock.recorder = &MockVersionIteratorMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockVersionIterator) EXPECT() *MockVersionIteratorMockRecorder { - return m.recorder -} - -// Next mocks base method. -func (m *MockVersionIterator) Next() bool { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Next") - ret0, _ := ret[0].(bool) - return ret0 -} - -// Next indicates an expected call of Next. -func (mr *MockVersionIteratorMockRecorder) Next() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Next", reflect.TypeOf((*MockVersionIterator)(nil).Next)) -} - -// Value mocks base method. -func (m *MockVersionIterator) Value() uint64 { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Value") - ret0, _ := ret[0].(uint64) - return ret0 -} - -// Value indicates an expected call of Value. -func (mr *MockVersionIteratorMockRecorder) Value() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockVersionIterator)(nil).Value)) -} diff --git a/testutil/mock/logger.go b/testutil/mock/logger.go index b17f076d0255..800210aa241e 100644 --- a/testutil/mock/logger.go +++ b/testutil/mock/logger.go @@ -99,6 +99,23 @@ func (mr *MockLoggerMockRecorder) Info(arg0 interface{}, arg1 ...interface{}) *g return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Info", reflect.TypeOf((*MockLogger)(nil).Info), varargs...) } +// Warn mocks base method. +func (m *MockLogger) Warn(arg0 string, arg1 ...interface{}) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + m.ctrl.Call(m, "Warn", varargs...) +} + +// Warn indicates an expected call of Warn. +func (mr *MockLoggerMockRecorder) Warn(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warn", reflect.TypeOf((*MockLogger)(nil).Warn), varargs...) +} + // With mocks base method. func (m *MockLogger) With(arg0 ...interface{}) log.Logger { m.ctrl.T.Helper() diff --git a/testutil/mock/types_mock_appmodule.go b/testutil/mock/types_mock_appmodule.go index dd31281640ad..8336f707da23 100644 --- a/testutil/mock/types_mock_appmodule.go +++ b/testutil/mock/types_mock_appmodule.go @@ -18,7 +18,6 @@ import ( module "github.com/cosmos/cosmos-sdk/types/module" gomock "github.com/golang/mock/gomock" runtime "github.com/grpc-ecosystem/grpc-gateway/runtime" - cobra "github.com/spf13/cobra" ) // MockAppModuleWithAllExtensions is a mock of AppModuleWithAllExtensions interface. @@ -101,46 +100,40 @@ func (mr *MockAppModuleWithAllExtensionsMockRecorder) ExportGenesis(arg0, arg1 i return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensions)(nil).ExportGenesis), arg0, arg1) } -// GetQueryCmd mocks base method. -func (m *MockAppModuleWithAllExtensions) GetQueryCmd() *cobra.Command { +// InitGenesis mocks base method. +func (m *MockAppModuleWithAllExtensions) InitGenesis(arg0 types1.Context, arg1 codec.JSONCodec, arg2 json.RawMessage) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetQueryCmd") - ret0, _ := ret[0].(*cobra.Command) - return ret0 + m.ctrl.Call(m, "InitGenesis", arg0, arg1, arg2) } -// GetQueryCmd indicates an expected call of GetQueryCmd. -func (mr *MockAppModuleWithAllExtensionsMockRecorder) GetQueryCmd() *gomock.Call { +// InitGenesis indicates an expected call of InitGenesis. +func (mr *MockAppModuleWithAllExtensionsMockRecorder) InitGenesis(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetQueryCmd", reflect.TypeOf((*MockAppModuleWithAllExtensions)(nil).GetQueryCmd)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensions)(nil).InitGenesis), arg0, arg1, arg2) } -// GetTxCmd mocks base method. -func (m *MockAppModuleWithAllExtensions) GetTxCmd() *cobra.Command { +// IsAppModule mocks base method. +func (m *MockAppModuleWithAllExtensions) IsAppModule() { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetTxCmd") - ret0, _ := ret[0].(*cobra.Command) - return ret0 + m.ctrl.Call(m, "IsAppModule") } -// GetTxCmd indicates an expected call of GetTxCmd. -func (mr *MockAppModuleWithAllExtensionsMockRecorder) GetTxCmd() *gomock.Call { +// IsAppModule indicates an expected call of IsAppModule. +func (mr *MockAppModuleWithAllExtensionsMockRecorder) IsAppModule() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTxCmd", reflect.TypeOf((*MockAppModuleWithAllExtensions)(nil).GetTxCmd)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAppModule", reflect.TypeOf((*MockAppModuleWithAllExtensions)(nil).IsAppModule)) } -// InitGenesis mocks base method. -func (m *MockAppModuleWithAllExtensions) InitGenesis(arg0 types1.Context, arg1 codec.JSONCodec, arg2 json.RawMessage) []types.ValidatorUpdate { +// IsOnePerModuleType mocks base method. +func (m *MockAppModuleWithAllExtensions) IsOnePerModuleType() { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "InitGenesis", arg0, arg1, arg2) - ret0, _ := ret[0].([]types.ValidatorUpdate) - return ret0 + m.ctrl.Call(m, "IsOnePerModuleType") } -// InitGenesis indicates an expected call of InitGenesis. -func (mr *MockAppModuleWithAllExtensionsMockRecorder) InitGenesis(arg0, arg1, arg2 interface{}) *gomock.Call { +// IsOnePerModuleType indicates an expected call of IsOnePerModuleType. +func (mr *MockAppModuleWithAllExtensionsMockRecorder) IsOnePerModuleType() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensions)(nil).InitGenesis), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsOnePerModuleType", reflect.TypeOf((*MockAppModuleWithAllExtensions)(nil).IsOnePerModuleType)) } // Name mocks base method. @@ -231,6 +224,212 @@ func (mr *MockAppModuleWithAllExtensionsMockRecorder) ValidateGenesis(arg0, arg1 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensions)(nil).ValidateGenesis), arg0, arg1, arg2) } +// MockAppModuleWithAllExtensionsABCI is a mock of AppModuleWithAllExtensionsABCI interface. +type MockAppModuleWithAllExtensionsABCI struct { + ctrl *gomock.Controller + recorder *MockAppModuleWithAllExtensionsABCIMockRecorder +} + +// MockAppModuleWithAllExtensionsABCIMockRecorder is the mock recorder for MockAppModuleWithAllExtensionsABCI. +type MockAppModuleWithAllExtensionsABCIMockRecorder struct { + mock *MockAppModuleWithAllExtensionsABCI +} + +// NewMockAppModuleWithAllExtensionsABCI creates a new mock instance. +func NewMockAppModuleWithAllExtensionsABCI(ctrl *gomock.Controller) *MockAppModuleWithAllExtensionsABCI { + mock := &MockAppModuleWithAllExtensionsABCI{ctrl: ctrl} + mock.recorder = &MockAppModuleWithAllExtensionsABCIMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockAppModuleWithAllExtensionsABCI) EXPECT() *MockAppModuleWithAllExtensionsABCIMockRecorder { + return m.recorder +} + +// ConsensusVersion mocks base method. +func (m *MockAppModuleWithAllExtensionsABCI) ConsensusVersion() uint64 { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ConsensusVersion") + ret0, _ := ret[0].(uint64) + return ret0 +} + +// ConsensusVersion indicates an expected call of ConsensusVersion. +func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) ConsensusVersion() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConsensusVersion", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).ConsensusVersion)) +} + +// DefaultGenesis mocks base method. +func (m *MockAppModuleWithAllExtensionsABCI) DefaultGenesis(arg0 codec.JSONCodec) json.RawMessage { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DefaultGenesis", arg0) + ret0, _ := ret[0].(json.RawMessage) + return ret0 +} + +// DefaultGenesis indicates an expected call of DefaultGenesis. +func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) DefaultGenesis(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).DefaultGenesis), arg0) +} + +// EndBlock mocks base method. +func (m *MockAppModuleWithAllExtensionsABCI) EndBlock(arg0 context.Context) ([]types.ValidatorUpdate, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EndBlock", arg0) + ret0, _ := ret[0].([]types.ValidatorUpdate) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EndBlock indicates an expected call of EndBlock. +func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) EndBlock(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndBlock", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).EndBlock), arg0) +} + +// ExportGenesis mocks base method. +func (m *MockAppModuleWithAllExtensionsABCI) ExportGenesis(arg0 types1.Context, arg1 codec.JSONCodec) json.RawMessage { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ExportGenesis", arg0, arg1) + ret0, _ := ret[0].(json.RawMessage) + return ret0 +} + +// ExportGenesis indicates an expected call of ExportGenesis. +func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) ExportGenesis(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).ExportGenesis), arg0, arg1) +} + +// InitGenesis mocks base method. +func (m *MockAppModuleWithAllExtensionsABCI) InitGenesis(arg0 types1.Context, arg1 codec.JSONCodec, arg2 json.RawMessage) []types.ValidatorUpdate { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "InitGenesis", arg0, arg1, arg2) + ret0, _ := ret[0].([]types.ValidatorUpdate) + return ret0 +} + +// InitGenesis indicates an expected call of InitGenesis. +func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) InitGenesis(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).InitGenesis), arg0, arg1, arg2) +} + +// IsAppModule mocks base method. +func (m *MockAppModuleWithAllExtensionsABCI) IsAppModule() { + m.ctrl.T.Helper() + m.ctrl.Call(m, "IsAppModule") +} + +// IsAppModule indicates an expected call of IsAppModule. +func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) IsAppModule() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAppModule", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).IsAppModule)) +} + +// IsOnePerModuleType mocks base method. +func (m *MockAppModuleWithAllExtensionsABCI) IsOnePerModuleType() { + m.ctrl.T.Helper() + m.ctrl.Call(m, "IsOnePerModuleType") +} + +// IsOnePerModuleType indicates an expected call of IsOnePerModuleType. +func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) IsOnePerModuleType() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsOnePerModuleType", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).IsOnePerModuleType)) +} + +// Name mocks base method. +func (m *MockAppModuleWithAllExtensionsABCI) Name() string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Name") + ret0, _ := ret[0].(string) + return ret0 +} + +// Name indicates an expected call of Name. +func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) Name() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).Name)) +} + +// RegisterGRPCGatewayRoutes mocks base method. +func (m *MockAppModuleWithAllExtensionsABCI) RegisterGRPCGatewayRoutes(arg0 client.Context, arg1 *runtime.ServeMux) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "RegisterGRPCGatewayRoutes", arg0, arg1) +} + +// RegisterGRPCGatewayRoutes indicates an expected call of RegisterGRPCGatewayRoutes. +func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) RegisterGRPCGatewayRoutes(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterGRPCGatewayRoutes", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).RegisterGRPCGatewayRoutes), arg0, arg1) +} + +// RegisterInterfaces mocks base method. +func (m *MockAppModuleWithAllExtensionsABCI) RegisterInterfaces(arg0 types0.InterfaceRegistry) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "RegisterInterfaces", arg0) +} + +// RegisterInterfaces indicates an expected call of RegisterInterfaces. +func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) RegisterInterfaces(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterInterfaces", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).RegisterInterfaces), arg0) +} + +// RegisterInvariants mocks base method. +func (m *MockAppModuleWithAllExtensionsABCI) RegisterInvariants(arg0 types1.InvariantRegistry) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "RegisterInvariants", arg0) +} + +// RegisterInvariants indicates an expected call of RegisterInvariants. +func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) RegisterInvariants(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterInvariants", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).RegisterInvariants), arg0) +} + +// RegisterLegacyAminoCodec mocks base method. +func (m *MockAppModuleWithAllExtensionsABCI) RegisterLegacyAminoCodec(arg0 *codec.LegacyAmino) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "RegisterLegacyAminoCodec", arg0) +} + +// RegisterLegacyAminoCodec indicates an expected call of RegisterLegacyAminoCodec. +func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) RegisterLegacyAminoCodec(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterLegacyAminoCodec", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).RegisterLegacyAminoCodec), arg0) +} + +// RegisterServices mocks base method. +func (m *MockAppModuleWithAllExtensionsABCI) RegisterServices(arg0 module.Configurator) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "RegisterServices", arg0) +} + +// RegisterServices indicates an expected call of RegisterServices. +func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) RegisterServices(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterServices", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).RegisterServices), arg0) +} + +// ValidateGenesis mocks base method. +func (m *MockAppModuleWithAllExtensionsABCI) ValidateGenesis(arg0 codec.JSONCodec, arg1 client.TxEncodingConfig, arg2 json.RawMessage) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ValidateGenesis", arg0, arg1, arg2) + ret0, _ := ret[0].(error) + return ret0 +} + +// ValidateGenesis indicates an expected call of ValidateGenesis. +func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) ValidateGenesis(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).ValidateGenesis), arg0, arg1, arg2) +} + // MockCoreAppModule is a mock of CoreAppModule interface. type MockCoreAppModule struct { ctrl *gomock.Controller @@ -389,3 +588,177 @@ func (mr *MockCoreAppModuleMockRecorder) ValidateGenesis(arg0 interface{}) *gomo mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateGenesis", reflect.TypeOf((*MockCoreAppModule)(nil).ValidateGenesis), arg0) } + +// MockCoreAppModuleWithPreBlock is a mock of CoreAppModuleWithPreBlock interface. +type MockCoreAppModuleWithPreBlock struct { + ctrl *gomock.Controller + recorder *MockCoreAppModuleWithPreBlockMockRecorder +} + +// MockCoreAppModuleWithPreBlockMockRecorder is the mock recorder for MockCoreAppModuleWithPreBlock. +type MockCoreAppModuleWithPreBlockMockRecorder struct { + mock *MockCoreAppModuleWithPreBlock +} + +// NewMockCoreAppModuleWithPreBlock creates a new mock instance. +func NewMockCoreAppModuleWithPreBlock(ctrl *gomock.Controller) *MockCoreAppModuleWithPreBlock { + mock := &MockCoreAppModuleWithPreBlock{ctrl: ctrl} + mock.recorder = &MockCoreAppModuleWithPreBlockMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockCoreAppModuleWithPreBlock) EXPECT() *MockCoreAppModuleWithPreBlockMockRecorder { + return m.recorder +} + +// BeginBlock mocks base method. +func (m *MockCoreAppModuleWithPreBlock) BeginBlock(arg0 context.Context) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "BeginBlock", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// BeginBlock indicates an expected call of BeginBlock. +func (mr *MockCoreAppModuleWithPreBlockMockRecorder) BeginBlock(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeginBlock", reflect.TypeOf((*MockCoreAppModuleWithPreBlock)(nil).BeginBlock), arg0) +} + +// DefaultGenesis mocks base method. +func (m *MockCoreAppModuleWithPreBlock) DefaultGenesis(arg0 appmodule.GenesisTarget) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DefaultGenesis", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// DefaultGenesis indicates an expected call of DefaultGenesis. +func (mr *MockCoreAppModuleWithPreBlockMockRecorder) DefaultGenesis(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultGenesis", reflect.TypeOf((*MockCoreAppModuleWithPreBlock)(nil).DefaultGenesis), arg0) +} + +// EndBlock mocks base method. +func (m *MockCoreAppModuleWithPreBlock) EndBlock(arg0 context.Context) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EndBlock", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// EndBlock indicates an expected call of EndBlock. +func (mr *MockCoreAppModuleWithPreBlockMockRecorder) EndBlock(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndBlock", reflect.TypeOf((*MockCoreAppModuleWithPreBlock)(nil).EndBlock), arg0) +} + +// ExportGenesis mocks base method. +func (m *MockCoreAppModuleWithPreBlock) ExportGenesis(arg0 context.Context, arg1 appmodule.GenesisTarget) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ExportGenesis", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// ExportGenesis indicates an expected call of ExportGenesis. +func (mr *MockCoreAppModuleWithPreBlockMockRecorder) ExportGenesis(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportGenesis", reflect.TypeOf((*MockCoreAppModuleWithPreBlock)(nil).ExportGenesis), arg0, arg1) +} + +// InitGenesis mocks base method. +func (m *MockCoreAppModuleWithPreBlock) InitGenesis(arg0 context.Context, arg1 appmodule.GenesisSource) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "InitGenesis", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// InitGenesis indicates an expected call of InitGenesis. +func (mr *MockCoreAppModuleWithPreBlockMockRecorder) InitGenesis(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitGenesis", reflect.TypeOf((*MockCoreAppModuleWithPreBlock)(nil).InitGenesis), arg0, arg1) +} + +// IsAppModule mocks base method. +func (m *MockCoreAppModuleWithPreBlock) IsAppModule() { + m.ctrl.T.Helper() + m.ctrl.Call(m, "IsAppModule") +} + +// IsAppModule indicates an expected call of IsAppModule. +func (mr *MockCoreAppModuleWithPreBlockMockRecorder) IsAppModule() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAppModule", reflect.TypeOf((*MockCoreAppModuleWithPreBlock)(nil).IsAppModule)) +} + +// IsOnePerModuleType mocks base method. +func (m *MockCoreAppModuleWithPreBlock) IsOnePerModuleType() { + m.ctrl.T.Helper() + m.ctrl.Call(m, "IsOnePerModuleType") +} + +// IsOnePerModuleType indicates an expected call of IsOnePerModuleType. +func (mr *MockCoreAppModuleWithPreBlockMockRecorder) IsOnePerModuleType() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsOnePerModuleType", reflect.TypeOf((*MockCoreAppModuleWithPreBlock)(nil).IsOnePerModuleType)) +} + +// PreBlock mocks base method. +func (m *MockCoreAppModuleWithPreBlock) PreBlock(arg0 context.Context) (appmodule.ResponsePreBlock, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "PreBlock", arg0) + ret0, _ := ret[0].(appmodule.ResponsePreBlock) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// PreBlock indicates an expected call of PreBlock. +func (mr *MockCoreAppModuleWithPreBlockMockRecorder) PreBlock(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PreBlock", reflect.TypeOf((*MockCoreAppModuleWithPreBlock)(nil).PreBlock), arg0) +} + +// Precommit mocks base method. +func (m *MockCoreAppModuleWithPreBlock) Precommit(arg0 context.Context) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Precommit", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// Precommit indicates an expected call of Precommit. +func (mr *MockCoreAppModuleWithPreBlockMockRecorder) Precommit(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Precommit", reflect.TypeOf((*MockCoreAppModuleWithPreBlock)(nil).Precommit), arg0) +} + +// PrepareCheckState mocks base method. +func (m *MockCoreAppModuleWithPreBlock) PrepareCheckState(arg0 context.Context) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "PrepareCheckState", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// PrepareCheckState indicates an expected call of PrepareCheckState. +func (mr *MockCoreAppModuleWithPreBlockMockRecorder) PrepareCheckState(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareCheckState", reflect.TypeOf((*MockCoreAppModuleWithPreBlock)(nil).PrepareCheckState), arg0) +} + +// ValidateGenesis mocks base method. +func (m *MockCoreAppModuleWithPreBlock) ValidateGenesis(arg0 appmodule.GenesisSource) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ValidateGenesis", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// ValidateGenesis indicates an expected call of ValidateGenesis. +func (mr *MockCoreAppModuleWithPreBlockMockRecorder) ValidateGenesis(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateGenesis", reflect.TypeOf((*MockCoreAppModuleWithPreBlock)(nil).ValidateGenesis), arg0) +} diff --git a/testutil/mock/types_module_module.go b/testutil/mock/types_module_module.go index 550628701c8e..b86f7ef22dd3 100644 --- a/testutil/mock/types_module_module.go +++ b/testutil/mock/types_module_module.go @@ -17,7 +17,6 @@ import ( module "github.com/cosmos/cosmos-sdk/types/module" gomock "github.com/golang/mock/gomock" runtime "github.com/grpc-ecosystem/grpc-gateway/runtime" - cobra "github.com/spf13/cobra" ) // MockAppModuleBasic is a mock of AppModuleBasic interface. @@ -43,34 +42,6 @@ func (m *MockAppModuleBasic) EXPECT() *MockAppModuleBasicMockRecorder { return m.recorder } -// GetQueryCmd mocks base method. -func (m *MockAppModuleBasic) GetQueryCmd() *cobra.Command { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetQueryCmd") - ret0, _ := ret[0].(*cobra.Command) - return ret0 -} - -// GetQueryCmd indicates an expected call of GetQueryCmd. -func (mr *MockAppModuleBasicMockRecorder) GetQueryCmd() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetQueryCmd", reflect.TypeOf((*MockAppModuleBasic)(nil).GetQueryCmd)) -} - -// GetTxCmd mocks base method. -func (m *MockAppModuleBasic) GetTxCmd() *cobra.Command { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetTxCmd") - ret0, _ := ret[0].(*cobra.Command) - return ret0 -} - -// GetTxCmd indicates an expected call of GetTxCmd. -func (mr *MockAppModuleBasicMockRecorder) GetTxCmd() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTxCmd", reflect.TypeOf((*MockAppModuleBasic)(nil).GetTxCmd)) -} - // Name mocks base method. func (m *MockAppModuleBasic) Name() string { m.ctrl.T.Helper() @@ -209,31 +180,31 @@ func (mr *MockHasGenesisBasicsMockRecorder) ValidateGenesis(arg0, arg1, arg2 int return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateGenesis", reflect.TypeOf((*MockHasGenesisBasics)(nil).ValidateGenesis), arg0, arg1, arg2) } -// MockAppModuleGenesis is a mock of AppModuleGenesis interface. -type MockAppModuleGenesis struct { +// MockHasGenesis is a mock of HasGenesis interface. +type MockHasGenesis struct { ctrl *gomock.Controller - recorder *MockAppModuleGenesisMockRecorder + recorder *MockHasGenesisMockRecorder } -// MockAppModuleGenesisMockRecorder is the mock recorder for MockAppModuleGenesis. -type MockAppModuleGenesisMockRecorder struct { - mock *MockAppModuleGenesis +// MockHasGenesisMockRecorder is the mock recorder for MockHasGenesis. +type MockHasGenesisMockRecorder struct { + mock *MockHasGenesis } -// NewMockAppModuleGenesis creates a new mock instance. -func NewMockAppModuleGenesis(ctrl *gomock.Controller) *MockAppModuleGenesis { - mock := &MockAppModuleGenesis{ctrl: ctrl} - mock.recorder = &MockAppModuleGenesisMockRecorder{mock} +// NewMockHasGenesis creates a new mock instance. +func NewMockHasGenesis(ctrl *gomock.Controller) *MockHasGenesis { + mock := &MockHasGenesis{ctrl: ctrl} + mock.recorder = &MockHasGenesisMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockAppModuleGenesis) EXPECT() *MockAppModuleGenesisMockRecorder { +func (m *MockHasGenesis) EXPECT() *MockHasGenesisMockRecorder { return m.recorder } // DefaultGenesis mocks base method. -func (m *MockAppModuleGenesis) DefaultGenesis(arg0 codec.JSONCodec) json.RawMessage { +func (m *MockHasGenesis) DefaultGenesis(arg0 codec.JSONCodec) json.RawMessage { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "DefaultGenesis", arg0) ret0, _ := ret[0].(json.RawMessage) @@ -241,13 +212,13 @@ func (m *MockAppModuleGenesis) DefaultGenesis(arg0 codec.JSONCodec) json.RawMess } // DefaultGenesis indicates an expected call of DefaultGenesis. -func (mr *MockAppModuleGenesisMockRecorder) DefaultGenesis(arg0 interface{}) *gomock.Call { +func (mr *MockHasGenesisMockRecorder) DefaultGenesis(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultGenesis", reflect.TypeOf((*MockAppModuleGenesis)(nil).DefaultGenesis), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultGenesis", reflect.TypeOf((*MockHasGenesis)(nil).DefaultGenesis), arg0) } // ExportGenesis mocks base method. -func (m *MockAppModuleGenesis) ExportGenesis(arg0 types1.Context, arg1 codec.JSONCodec) json.RawMessage { +func (m *MockHasGenesis) ExportGenesis(arg0 types1.Context, arg1 codec.JSONCodec) json.RawMessage { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ExportGenesis", arg0, arg1) ret0, _ := ret[0].(json.RawMessage) @@ -255,105 +226,25 @@ func (m *MockAppModuleGenesis) ExportGenesis(arg0 types1.Context, arg1 codec.JSO } // ExportGenesis indicates an expected call of ExportGenesis. -func (mr *MockAppModuleGenesisMockRecorder) ExportGenesis(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportGenesis", reflect.TypeOf((*MockAppModuleGenesis)(nil).ExportGenesis), arg0, arg1) -} - -// GetQueryCmd mocks base method. -func (m *MockAppModuleGenesis) GetQueryCmd() *cobra.Command { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetQueryCmd") - ret0, _ := ret[0].(*cobra.Command) - return ret0 -} - -// GetQueryCmd indicates an expected call of GetQueryCmd. -func (mr *MockAppModuleGenesisMockRecorder) GetQueryCmd() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetQueryCmd", reflect.TypeOf((*MockAppModuleGenesis)(nil).GetQueryCmd)) -} - -// GetTxCmd mocks base method. -func (m *MockAppModuleGenesis) GetTxCmd() *cobra.Command { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetTxCmd") - ret0, _ := ret[0].(*cobra.Command) - return ret0 -} - -// GetTxCmd indicates an expected call of GetTxCmd. -func (mr *MockAppModuleGenesisMockRecorder) GetTxCmd() *gomock.Call { +func (mr *MockHasGenesisMockRecorder) ExportGenesis(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTxCmd", reflect.TypeOf((*MockAppModuleGenesis)(nil).GetTxCmd)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportGenesis", reflect.TypeOf((*MockHasGenesis)(nil).ExportGenesis), arg0, arg1) } // InitGenesis mocks base method. -func (m *MockAppModuleGenesis) InitGenesis(arg0 types1.Context, arg1 codec.JSONCodec, arg2 json.RawMessage) []types.ValidatorUpdate { +func (m *MockHasGenesis) InitGenesis(arg0 types1.Context, arg1 codec.JSONCodec, arg2 json.RawMessage) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "InitGenesis", arg0, arg1, arg2) - ret0, _ := ret[0].([]types.ValidatorUpdate) - return ret0 + m.ctrl.Call(m, "InitGenesis", arg0, arg1, arg2) } // InitGenesis indicates an expected call of InitGenesis. -func (mr *MockAppModuleGenesisMockRecorder) InitGenesis(arg0, arg1, arg2 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitGenesis", reflect.TypeOf((*MockAppModuleGenesis)(nil).InitGenesis), arg0, arg1, arg2) -} - -// Name mocks base method. -func (m *MockAppModuleGenesis) Name() string { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Name") - ret0, _ := ret[0].(string) - return ret0 -} - -// Name indicates an expected call of Name. -func (mr *MockAppModuleGenesisMockRecorder) Name() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockAppModuleGenesis)(nil).Name)) -} - -// RegisterGRPCGatewayRoutes mocks base method. -func (m *MockAppModuleGenesis) RegisterGRPCGatewayRoutes(arg0 client.Context, arg1 *runtime.ServeMux) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "RegisterGRPCGatewayRoutes", arg0, arg1) -} - -// RegisterGRPCGatewayRoutes indicates an expected call of RegisterGRPCGatewayRoutes. -func (mr *MockAppModuleGenesisMockRecorder) RegisterGRPCGatewayRoutes(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterGRPCGatewayRoutes", reflect.TypeOf((*MockAppModuleGenesis)(nil).RegisterGRPCGatewayRoutes), arg0, arg1) -} - -// RegisterInterfaces mocks base method. -func (m *MockAppModuleGenesis) RegisterInterfaces(arg0 types0.InterfaceRegistry) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "RegisterInterfaces", arg0) -} - -// RegisterInterfaces indicates an expected call of RegisterInterfaces. -func (mr *MockAppModuleGenesisMockRecorder) RegisterInterfaces(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterInterfaces", reflect.TypeOf((*MockAppModuleGenesis)(nil).RegisterInterfaces), arg0) -} - -// RegisterLegacyAminoCodec mocks base method. -func (m *MockAppModuleGenesis) RegisterLegacyAminoCodec(arg0 *codec.LegacyAmino) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "RegisterLegacyAminoCodec", arg0) -} - -// RegisterLegacyAminoCodec indicates an expected call of RegisterLegacyAminoCodec. -func (mr *MockAppModuleGenesisMockRecorder) RegisterLegacyAminoCodec(arg0 interface{}) *gomock.Call { +func (mr *MockHasGenesisMockRecorder) InitGenesis(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterLegacyAminoCodec", reflect.TypeOf((*MockAppModuleGenesis)(nil).RegisterLegacyAminoCodec), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitGenesis", reflect.TypeOf((*MockHasGenesis)(nil).InitGenesis), arg0, arg1, arg2) } // ValidateGenesis mocks base method. -func (m *MockAppModuleGenesis) ValidateGenesis(arg0 codec.JSONCodec, arg1 client.TxEncodingConfig, arg2 json.RawMessage) error { +func (m *MockHasGenesis) ValidateGenesis(arg0 codec.JSONCodec, arg1 client.TxEncodingConfig, arg2 json.RawMessage) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ValidateGenesis", arg0, arg1, arg2) ret0, _ := ret[0].(error) @@ -361,36 +252,36 @@ func (m *MockAppModuleGenesis) ValidateGenesis(arg0 codec.JSONCodec, arg1 client } // ValidateGenesis indicates an expected call of ValidateGenesis. -func (mr *MockAppModuleGenesisMockRecorder) ValidateGenesis(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockHasGenesisMockRecorder) ValidateGenesis(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateGenesis", reflect.TypeOf((*MockAppModuleGenesis)(nil).ValidateGenesis), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateGenesis", reflect.TypeOf((*MockHasGenesis)(nil).ValidateGenesis), arg0, arg1, arg2) } -// MockHasGenesis is a mock of HasGenesis interface. -type MockHasGenesis struct { +// MockHasABCIGenesis is a mock of HasABCIGenesis interface. +type MockHasABCIGenesis struct { ctrl *gomock.Controller - recorder *MockHasGenesisMockRecorder + recorder *MockHasABCIGenesisMockRecorder } -// MockHasGenesisMockRecorder is the mock recorder for MockHasGenesis. -type MockHasGenesisMockRecorder struct { - mock *MockHasGenesis +// MockHasABCIGenesisMockRecorder is the mock recorder for MockHasABCIGenesis. +type MockHasABCIGenesisMockRecorder struct { + mock *MockHasABCIGenesis } -// NewMockHasGenesis creates a new mock instance. -func NewMockHasGenesis(ctrl *gomock.Controller) *MockHasGenesis { - mock := &MockHasGenesis{ctrl: ctrl} - mock.recorder = &MockHasGenesisMockRecorder{mock} +// NewMockHasABCIGenesis creates a new mock instance. +func NewMockHasABCIGenesis(ctrl *gomock.Controller) *MockHasABCIGenesis { + mock := &MockHasABCIGenesis{ctrl: ctrl} + mock.recorder = &MockHasABCIGenesisMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockHasGenesis) EXPECT() *MockHasGenesisMockRecorder { +func (m *MockHasABCIGenesis) EXPECT() *MockHasABCIGenesisMockRecorder { return m.recorder } // DefaultGenesis mocks base method. -func (m *MockHasGenesis) DefaultGenesis(arg0 codec.JSONCodec) json.RawMessage { +func (m *MockHasABCIGenesis) DefaultGenesis(arg0 codec.JSONCodec) json.RawMessage { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "DefaultGenesis", arg0) ret0, _ := ret[0].(json.RawMessage) @@ -398,13 +289,13 @@ func (m *MockHasGenesis) DefaultGenesis(arg0 codec.JSONCodec) json.RawMessage { } // DefaultGenesis indicates an expected call of DefaultGenesis. -func (mr *MockHasGenesisMockRecorder) DefaultGenesis(arg0 interface{}) *gomock.Call { +func (mr *MockHasABCIGenesisMockRecorder) DefaultGenesis(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultGenesis", reflect.TypeOf((*MockHasGenesis)(nil).DefaultGenesis), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultGenesis", reflect.TypeOf((*MockHasABCIGenesis)(nil).DefaultGenesis), arg0) } // ExportGenesis mocks base method. -func (m *MockHasGenesis) ExportGenesis(arg0 types1.Context, arg1 codec.JSONCodec) json.RawMessage { +func (m *MockHasABCIGenesis) ExportGenesis(arg0 types1.Context, arg1 codec.JSONCodec) json.RawMessage { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ExportGenesis", arg0, arg1) ret0, _ := ret[0].(json.RawMessage) @@ -412,13 +303,13 @@ func (m *MockHasGenesis) ExportGenesis(arg0 types1.Context, arg1 codec.JSONCodec } // ExportGenesis indicates an expected call of ExportGenesis. -func (mr *MockHasGenesisMockRecorder) ExportGenesis(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockHasABCIGenesisMockRecorder) ExportGenesis(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportGenesis", reflect.TypeOf((*MockHasGenesis)(nil).ExportGenesis), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportGenesis", reflect.TypeOf((*MockHasABCIGenesis)(nil).ExportGenesis), arg0, arg1) } // InitGenesis mocks base method. -func (m *MockHasGenesis) InitGenesis(arg0 types1.Context, arg1 codec.JSONCodec, arg2 json.RawMessage) []types.ValidatorUpdate { +func (m *MockHasABCIGenesis) InitGenesis(arg0 types1.Context, arg1 codec.JSONCodec, arg2 json.RawMessage) []types.ValidatorUpdate { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "InitGenesis", arg0, arg1, arg2) ret0, _ := ret[0].([]types.ValidatorUpdate) @@ -426,13 +317,13 @@ func (m *MockHasGenesis) InitGenesis(arg0 types1.Context, arg1 codec.JSONCodec, } // InitGenesis indicates an expected call of InitGenesis. -func (mr *MockHasGenesisMockRecorder) InitGenesis(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockHasABCIGenesisMockRecorder) InitGenesis(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitGenesis", reflect.TypeOf((*MockHasGenesis)(nil).InitGenesis), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitGenesis", reflect.TypeOf((*MockHasABCIGenesis)(nil).InitGenesis), arg0, arg1, arg2) } // ValidateGenesis mocks base method. -func (m *MockHasGenesis) ValidateGenesis(arg0 codec.JSONCodec, arg1 client.TxEncodingConfig, arg2 json.RawMessage) error { +func (m *MockHasABCIGenesis) ValidateGenesis(arg0 codec.JSONCodec, arg1 client.TxEncodingConfig, arg2 json.RawMessage) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ValidateGenesis", arg0, arg1, arg2) ret0, _ := ret[0].(error) @@ -440,9 +331,9 @@ func (m *MockHasGenesis) ValidateGenesis(arg0 codec.JSONCodec, arg1 client.TxEnc } // ValidateGenesis indicates an expected call of ValidateGenesis. -func (mr *MockHasGenesisMockRecorder) ValidateGenesis(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockHasABCIGenesisMockRecorder) ValidateGenesis(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateGenesis", reflect.TypeOf((*MockHasGenesis)(nil).ValidateGenesis), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateGenesis", reflect.TypeOf((*MockHasABCIGenesis)(nil).ValidateGenesis), arg0, arg1, arg2) } // MockAppModule is a mock of AppModule interface. @@ -468,32 +359,28 @@ func (m *MockAppModule) EXPECT() *MockAppModuleMockRecorder { return m.recorder } -// GetQueryCmd mocks base method. -func (m *MockAppModule) GetQueryCmd() *cobra.Command { +// IsAppModule mocks base method. +func (m *MockAppModule) IsAppModule() { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetQueryCmd") - ret0, _ := ret[0].(*cobra.Command) - return ret0 + m.ctrl.Call(m, "IsAppModule") } -// GetQueryCmd indicates an expected call of GetQueryCmd. -func (mr *MockAppModuleMockRecorder) GetQueryCmd() *gomock.Call { +// IsAppModule indicates an expected call of IsAppModule. +func (mr *MockAppModuleMockRecorder) IsAppModule() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetQueryCmd", reflect.TypeOf((*MockAppModule)(nil).GetQueryCmd)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAppModule", reflect.TypeOf((*MockAppModule)(nil).IsAppModule)) } -// GetTxCmd mocks base method. -func (m *MockAppModule) GetTxCmd() *cobra.Command { +// IsOnePerModuleType mocks base method. +func (m *MockAppModule) IsOnePerModuleType() { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetTxCmd") - ret0, _ := ret[0].(*cobra.Command) - return ret0 + m.ctrl.Call(m, "IsOnePerModuleType") } -// GetTxCmd indicates an expected call of GetTxCmd. -func (mr *MockAppModuleMockRecorder) GetTxCmd() *gomock.Call { +// IsOnePerModuleType indicates an expected call of IsOnePerModuleType. +func (mr *MockAppModuleMockRecorder) IsOnePerModuleType() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTxCmd", reflect.TypeOf((*MockAppModule)(nil).GetTxCmd)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsOnePerModuleType", reflect.TypeOf((*MockAppModule)(nil).IsOnePerModuleType)) } // Name mocks base method. @@ -653,31 +540,31 @@ func (mr *MockHasConsensusVersionMockRecorder) ConsensusVersion() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConsensusVersion", reflect.TypeOf((*MockHasConsensusVersion)(nil).ConsensusVersion)) } -// MockHasABCIEndblock is a mock of HasABCIEndblock interface. -type MockHasABCIEndblock struct { +// MockHasABCIEndBlock is a mock of HasABCIEndBlock interface. +type MockHasABCIEndBlock struct { ctrl *gomock.Controller - recorder *MockHasABCIEndblockMockRecorder + recorder *MockHasABCIEndBlockMockRecorder } -// MockHasABCIEndblockMockRecorder is the mock recorder for MockHasABCIEndblock. -type MockHasABCIEndblockMockRecorder struct { - mock *MockHasABCIEndblock +// MockHasABCIEndBlockMockRecorder is the mock recorder for MockHasABCIEndBlock. +type MockHasABCIEndBlockMockRecorder struct { + mock *MockHasABCIEndBlock } -// NewMockHasABCIEndblock creates a new mock instance. -func NewMockHasABCIEndblock(ctrl *gomock.Controller) *MockHasABCIEndblock { - mock := &MockHasABCIEndblock{ctrl: ctrl} - mock.recorder = &MockHasABCIEndblockMockRecorder{mock} +// NewMockHasABCIEndBlock creates a new mock instance. +func NewMockHasABCIEndBlock(ctrl *gomock.Controller) *MockHasABCIEndBlock { + mock := &MockHasABCIEndBlock{ctrl: ctrl} + mock.recorder = &MockHasABCIEndBlockMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockHasABCIEndblock) EXPECT() *MockHasABCIEndblockMockRecorder { +func (m *MockHasABCIEndBlock) EXPECT() *MockHasABCIEndBlockMockRecorder { return m.recorder } // EndBlock mocks base method. -func (m *MockHasABCIEndblock) EndBlock(arg0 context.Context) ([]types.ValidatorUpdate, error) { +func (m *MockHasABCIEndBlock) EndBlock(arg0 context.Context) ([]types.ValidatorUpdate, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "EndBlock", arg0) ret0, _ := ret[0].([]types.ValidatorUpdate) @@ -686,41 +573,152 @@ func (m *MockHasABCIEndblock) EndBlock(arg0 context.Context) ([]types.ValidatorU } // EndBlock indicates an expected call of EndBlock. -func (mr *MockHasABCIEndblockMockRecorder) EndBlock(arg0 interface{}) *gomock.Call { +func (mr *MockHasABCIEndBlockMockRecorder) EndBlock(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndBlock", reflect.TypeOf((*MockHasABCIEndBlock)(nil).EndBlock), arg0) +} + +// IsAppModule mocks base method. +func (m *MockHasABCIEndBlock) IsAppModule() { + m.ctrl.T.Helper() + m.ctrl.Call(m, "IsAppModule") +} + +// IsAppModule indicates an expected call of IsAppModule. +func (mr *MockHasABCIEndBlockMockRecorder) IsAppModule() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAppModule", reflect.TypeOf((*MockHasABCIEndBlock)(nil).IsAppModule)) +} + +// IsOnePerModuleType mocks base method. +func (m *MockHasABCIEndBlock) IsOnePerModuleType() { + m.ctrl.T.Helper() + m.ctrl.Call(m, "IsOnePerModuleType") +} + +// IsOnePerModuleType indicates an expected call of IsOnePerModuleType. +func (mr *MockHasABCIEndBlockMockRecorder) IsOnePerModuleType() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsOnePerModuleType", reflect.TypeOf((*MockHasABCIEndBlock)(nil).IsOnePerModuleType)) +} + +// Name mocks base method. +func (m *MockHasABCIEndBlock) Name() string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Name") + ret0, _ := ret[0].(string) + return ret0 +} + +// Name indicates an expected call of Name. +func (mr *MockHasABCIEndBlockMockRecorder) Name() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockHasABCIEndBlock)(nil).Name)) +} + +// RegisterGRPCGatewayRoutes mocks base method. +func (m *MockHasABCIEndBlock) RegisterGRPCGatewayRoutes(arg0 client.Context, arg1 *runtime.ServeMux) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "RegisterGRPCGatewayRoutes", arg0, arg1) +} + +// RegisterGRPCGatewayRoutes indicates an expected call of RegisterGRPCGatewayRoutes. +func (mr *MockHasABCIEndBlockMockRecorder) RegisterGRPCGatewayRoutes(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterGRPCGatewayRoutes", reflect.TypeOf((*MockHasABCIEndBlock)(nil).RegisterGRPCGatewayRoutes), arg0, arg1) +} + +// RegisterInterfaces mocks base method. +func (m *MockHasABCIEndBlock) RegisterInterfaces(arg0 types0.InterfaceRegistry) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "RegisterInterfaces", arg0) +} + +// RegisterInterfaces indicates an expected call of RegisterInterfaces. +func (mr *MockHasABCIEndBlockMockRecorder) RegisterInterfaces(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterInterfaces", reflect.TypeOf((*MockHasABCIEndBlock)(nil).RegisterInterfaces), arg0) +} + +// RegisterLegacyAminoCodec mocks base method. +func (m *MockHasABCIEndBlock) RegisterLegacyAminoCodec(arg0 *codec.LegacyAmino) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "RegisterLegacyAminoCodec", arg0) +} + +// RegisterLegacyAminoCodec indicates an expected call of RegisterLegacyAminoCodec. +func (mr *MockHasABCIEndBlockMockRecorder) RegisterLegacyAminoCodec(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterLegacyAminoCodec", reflect.TypeOf((*MockHasABCIEndBlock)(nil).RegisterLegacyAminoCodec), arg0) +} + +// MockAppModuleGenesis is a mock of AppModuleGenesis interface. +type MockAppModuleGenesis struct { + ctrl *gomock.Controller + recorder *MockAppModuleGenesisMockRecorder +} + +// MockAppModuleGenesisMockRecorder is the mock recorder for MockAppModuleGenesis. +type MockAppModuleGenesisMockRecorder struct { + mock *MockAppModuleGenesis +} + +// NewMockAppModuleGenesis creates a new mock instance. +func NewMockAppModuleGenesis(ctrl *gomock.Controller) *MockAppModuleGenesis { + mock := &MockAppModuleGenesis{ctrl: ctrl} + mock.recorder = &MockAppModuleGenesisMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockAppModuleGenesis) EXPECT() *MockAppModuleGenesisMockRecorder { + return m.recorder +} + +// DefaultGenesis mocks base method. +func (m *MockAppModuleGenesis) DefaultGenesis(arg0 codec.JSONCodec) json.RawMessage { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DefaultGenesis", arg0) + ret0, _ := ret[0].(json.RawMessage) + return ret0 +} + +// DefaultGenesis indicates an expected call of DefaultGenesis. +func (mr *MockAppModuleGenesisMockRecorder) DefaultGenesis(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndBlock", reflect.TypeOf((*MockHasABCIEndblock)(nil).EndBlock), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultGenesis", reflect.TypeOf((*MockAppModuleGenesis)(nil).DefaultGenesis), arg0) } -// GetQueryCmd mocks base method. -func (m *MockHasABCIEndblock) GetQueryCmd() *cobra.Command { +// ExportGenesis mocks base method. +func (m *MockAppModuleGenesis) ExportGenesis(arg0 types1.Context, arg1 codec.JSONCodec) json.RawMessage { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetQueryCmd") - ret0, _ := ret[0].(*cobra.Command) + ret := m.ctrl.Call(m, "ExportGenesis", arg0, arg1) + ret0, _ := ret[0].(json.RawMessage) return ret0 } -// GetQueryCmd indicates an expected call of GetQueryCmd. -func (mr *MockHasABCIEndblockMockRecorder) GetQueryCmd() *gomock.Call { +// ExportGenesis indicates an expected call of ExportGenesis. +func (mr *MockAppModuleGenesisMockRecorder) ExportGenesis(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetQueryCmd", reflect.TypeOf((*MockHasABCIEndblock)(nil).GetQueryCmd)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportGenesis", reflect.TypeOf((*MockAppModuleGenesis)(nil).ExportGenesis), arg0, arg1) } -// GetTxCmd mocks base method. -func (m *MockHasABCIEndblock) GetTxCmd() *cobra.Command { +// InitGenesis mocks base method. +func (m *MockAppModuleGenesis) InitGenesis(arg0 types1.Context, arg1 codec.JSONCodec, arg2 json.RawMessage) []types.ValidatorUpdate { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetTxCmd") - ret0, _ := ret[0].(*cobra.Command) + ret := m.ctrl.Call(m, "InitGenesis", arg0, arg1, arg2) + ret0, _ := ret[0].([]types.ValidatorUpdate) return ret0 } -// GetTxCmd indicates an expected call of GetTxCmd. -func (mr *MockHasABCIEndblockMockRecorder) GetTxCmd() *gomock.Call { +// InitGenesis indicates an expected call of InitGenesis. +func (mr *MockAppModuleGenesisMockRecorder) InitGenesis(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTxCmd", reflect.TypeOf((*MockHasABCIEndblock)(nil).GetTxCmd)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitGenesis", reflect.TypeOf((*MockAppModuleGenesis)(nil).InitGenesis), arg0, arg1, arg2) } // Name mocks base method. -func (m *MockHasABCIEndblock) Name() string { +func (m *MockAppModuleGenesis) Name() string { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Name") ret0, _ := ret[0].(string) @@ -728,43 +726,57 @@ func (m *MockHasABCIEndblock) Name() string { } // Name indicates an expected call of Name. -func (mr *MockHasABCIEndblockMockRecorder) Name() *gomock.Call { +func (mr *MockAppModuleGenesisMockRecorder) Name() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockHasABCIEndblock)(nil).Name)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockAppModuleGenesis)(nil).Name)) } // RegisterGRPCGatewayRoutes mocks base method. -func (m *MockHasABCIEndblock) RegisterGRPCGatewayRoutes(arg0 client.Context, arg1 *runtime.ServeMux) { +func (m *MockAppModuleGenesis) RegisterGRPCGatewayRoutes(arg0 client.Context, arg1 *runtime.ServeMux) { m.ctrl.T.Helper() m.ctrl.Call(m, "RegisterGRPCGatewayRoutes", arg0, arg1) } // RegisterGRPCGatewayRoutes indicates an expected call of RegisterGRPCGatewayRoutes. -func (mr *MockHasABCIEndblockMockRecorder) RegisterGRPCGatewayRoutes(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockAppModuleGenesisMockRecorder) RegisterGRPCGatewayRoutes(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterGRPCGatewayRoutes", reflect.TypeOf((*MockHasABCIEndblock)(nil).RegisterGRPCGatewayRoutes), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterGRPCGatewayRoutes", reflect.TypeOf((*MockAppModuleGenesis)(nil).RegisterGRPCGatewayRoutes), arg0, arg1) } // RegisterInterfaces mocks base method. -func (m *MockHasABCIEndblock) RegisterInterfaces(arg0 types0.InterfaceRegistry) { +func (m *MockAppModuleGenesis) RegisterInterfaces(arg0 types0.InterfaceRegistry) { m.ctrl.T.Helper() m.ctrl.Call(m, "RegisterInterfaces", arg0) } // RegisterInterfaces indicates an expected call of RegisterInterfaces. -func (mr *MockHasABCIEndblockMockRecorder) RegisterInterfaces(arg0 interface{}) *gomock.Call { +func (mr *MockAppModuleGenesisMockRecorder) RegisterInterfaces(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterInterfaces", reflect.TypeOf((*MockHasABCIEndblock)(nil).RegisterInterfaces), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterInterfaces", reflect.TypeOf((*MockAppModuleGenesis)(nil).RegisterInterfaces), arg0) } // RegisterLegacyAminoCodec mocks base method. -func (m *MockHasABCIEndblock) RegisterLegacyAminoCodec(arg0 *codec.LegacyAmino) { +func (m *MockAppModuleGenesis) RegisterLegacyAminoCodec(arg0 *codec.LegacyAmino) { m.ctrl.T.Helper() m.ctrl.Call(m, "RegisterLegacyAminoCodec", arg0) } // RegisterLegacyAminoCodec indicates an expected call of RegisterLegacyAminoCodec. -func (mr *MockHasABCIEndblockMockRecorder) RegisterLegacyAminoCodec(arg0 interface{}) *gomock.Call { +func (mr *MockAppModuleGenesisMockRecorder) RegisterLegacyAminoCodec(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterLegacyAminoCodec", reflect.TypeOf((*MockHasABCIEndblock)(nil).RegisterLegacyAminoCodec), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterLegacyAminoCodec", reflect.TypeOf((*MockAppModuleGenesis)(nil).RegisterLegacyAminoCodec), arg0) +} + +// ValidateGenesis mocks base method. +func (m *MockAppModuleGenesis) ValidateGenesis(arg0 codec.JSONCodec, arg1 client.TxEncodingConfig, arg2 json.RawMessage) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ValidateGenesis", arg0, arg1, arg2) + ret0, _ := ret[0].(error) + return ret0 +} + +// ValidateGenesis indicates an expected call of ValidateGenesis. +func (mr *MockAppModuleGenesisMockRecorder) ValidateGenesis(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateGenesis", reflect.TypeOf((*MockAppModuleGenesis)(nil).ValidateGenesis), arg0, arg1, arg2) } diff --git a/testutil/network/network.go b/testutil/network/network.go index ae6eaf454c08..ac6d4593d324 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -17,11 +17,6 @@ import ( "testing" "time" - "cosmossdk.io/depinject" - "cosmossdk.io/log" - sdkmath "cosmossdk.io/math" - "cosmossdk.io/math/unsafe" - pruningtypes "cosmossdk.io/store/pruning/types" "github.com/cometbft/cometbft/node" cmtclient "github.com/cometbft/cometbft/rpc/client" dbm "github.com/cosmos/cosmos-db" @@ -29,6 +24,12 @@ import ( "golang.org/x/sync/errgroup" "google.golang.org/grpc" + "cosmossdk.io/depinject" + "cosmossdk.io/log" + sdkmath "cosmossdk.io/math" + "cosmossdk.io/math/unsafe" + pruningtypes "cosmossdk.io/store/pruning/types" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" @@ -272,6 +273,7 @@ type ( ValAddress sdk.ValAddress RPCClient cmtclient.Client + app servertypes.Application tmNode *node.Node api *api.Server grpc *grpc.Server @@ -520,7 +522,7 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) { } createValMsg, err := stakingtypes.NewMsgCreateValidator( - sdk.ValAddress(addr), + sdk.ValAddress(addr).String(), valPubKeys[i], sdk.NewCoin(cfg.BondDenom, cfg.BondedTokens), stakingtypes.NewDescription(nodeDirName, "", "", "", ""), @@ -578,7 +580,8 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) { WithCodec(cfg.Codec). WithLegacyAmino(cfg.LegacyAmino). WithTxConfig(cfg.TxConfig). - WithAccountRetriever(cfg.AccountRetriever) + WithAccountRetriever(cfg.AccountRetriever). + WithNodeURI(cmtCfg.RPC.ListenAddress) // Provide ChainID here since we can't modify it in the Comet config. ctx.Viper.Set(flags.FlagChainID, cfg.ChainID) @@ -610,8 +613,7 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) { l.Log("starting test network...") for idx, v := range network.Validators { - err := startInProcess(cfg, v) - if err != nil { + if err := startInProcess(cfg, v); err != nil { return nil, err } l.Log("started validator", idx) @@ -802,6 +804,12 @@ func (n *Network) Cleanup() { if v.grpcWeb != nil { _ = v.grpcWeb.Close() } + + if v.app != nil { + if err := v.app.Close(); err != nil { + n.Logger.Log("failed to stop validator ABCI application", "err", err) + } + } } time.Sleep(100 * time.Millisecond) diff --git a/testutil/network/util.go b/testutil/network/util.go index c70108535c74..072184cea25d 100644 --- a/testutil/network/util.go +++ b/testutil/network/util.go @@ -18,6 +18,8 @@ import ( cmttime "github.com/cometbft/cometbft/types/time" "golang.org/x/sync/errgroup" + "cosmossdk.io/log" + "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/server/api" servergrpc "github.com/cosmos/cosmos-sdk/server/grpc" @@ -43,6 +45,8 @@ func startInProcess(cfg Config, val *Validator) error { } app := cfg.AppConstructor(*val) + val.app = app + appGenesisProvider := func() (*cmttypes.GenesisDoc, error) { appGenesis, err := genutiltypes.AppGenesisFromFile(cmtCfg.GenesisFile()) if err != nil { @@ -101,14 +105,14 @@ func startInProcess(cfg Config, val *Validator) error { // Start the gRPC server in a goroutine. Note, the provided ctx will ensure // that the server is gracefully shut down. val.errGroup.Go(func() error { - return servergrpc.StartGRPCServer(ctx, logger.With("module", "grpc-server"), grpcCfg, grpcSrv) + return servergrpc.StartGRPCServer(ctx, logger.With(log.ModuleKey, "grpc-server"), grpcCfg, grpcSrv) }) val.grpc = grpcSrv } if val.APIAddress != "" { - apiSrv := api.New(val.ClientCtx, logger.With("module", "api-server"), val.grpc) + apiSrv := api.New(val.ClientCtx, logger.With(log.ModuleKey, "api-server"), val.grpc) app.RegisterAPIRoutes(apiSrv, val.AppConfig.API) val.errGroup.Go(func() error { @@ -142,7 +146,7 @@ func collectGenFiles(cfg Config, vals []*Validator, outputDir string) error { } appState, err := genutil.GenAppStateFromConfig(cfg.Codec, cfg.TxConfig, - cmtCfg, initCfg, appGenesis, banktypes.GenesisBalancesIterator{}, genutiltypes.DefaultMessageValidator) + cmtCfg, initCfg, appGenesis, banktypes.GenesisBalancesIterator{}, genutiltypes.DefaultMessageValidator, cfg.TxConfig.SigningContext().ValidatorAddressCodec()) if err != nil { return err } @@ -216,7 +220,7 @@ func writeFile(name, dir string, contents []byte) error { // Get a free address for a test CometBFT server // protocol is either tcp, http, etc func FreeTCPAddr() (addr, port string, closeFn func() error, err error) { - l, err := net.Listen("tcp", "localhost:0") + l, err := net.Listen("tcp", "127.0.0.1:0") if err != nil { return "", "", nil, err } diff --git a/testutil/sims/address_helpers.go b/testutil/sims/address_helpers.go index 52f1db8faffe..4bd7ef65e415 100644 --- a/testutil/sims/address_helpers.go +++ b/testutil/sims/address_helpers.go @@ -2,6 +2,7 @@ package sims import ( "bytes" + "context" "encoding/hex" "fmt" "strconv" @@ -23,12 +24,16 @@ type GenerateAccountStrategy func(int) []sdk.AccAddress // provides the staking bond denom. It is used in arguments in this package's // functions so that a mock staking keeper can be passed instead of the real one. type BondDenomProvider interface { - BondDenom(ctx sdk.Context) string + BondDenom(ctx context.Context) (string, error) } // AddTestAddrsFromPubKeys adds the addresses into the SimApp providing only the public keys. func AddTestAddrsFromPubKeys(bankKeeper bankkeeper.Keeper, stakingKeeper BondDenomProvider, ctx sdk.Context, pubKeys []cryptotypes.PubKey, accAmt math.Int) { - initCoins := sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), accAmt)) + bondDenom, err := stakingKeeper.BondDenom(ctx) + if err != nil { + panic(err) + } + initCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, accAmt)) for _, pk := range pubKeys { initAccountWithCoins(bankKeeper, ctx, sdk.AccAddress(pk.Address()), initCoins) @@ -48,7 +53,11 @@ func AddTestAddrsIncremental(bankKeeper bankkeeper.Keeper, stakingKeeper BondDen func addTestAddrs(bankKeeper bankkeeper.Keeper, stakingKeeper BondDenomProvider, ctx sdk.Context, accNum int, accAmt math.Int, strategy GenerateAccountStrategy) []sdk.AccAddress { testAddrs := strategy(accNum) - initCoins := sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), accAmt)) + bondDenom, err := stakingKeeper.BondDenom(ctx) + if err != nil { + panic(err) + } + initCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, accAmt)) for _, addr := range testAddrs { initAccountWithCoins(bankKeeper, ctx, addr, initCoins) diff --git a/testutil/sims/app_helpers.go b/testutil/sims/app_helpers.go index 6fdbec1f5b71..7c7e6c942f1b 100644 --- a/testutil/sims/app_helpers.go +++ b/testutil/sims/app_helpers.go @@ -5,14 +5,16 @@ import ( "fmt" "time" - "cosmossdk.io/depinject" - sdkmath "cosmossdk.io/math" abci "github.com/cometbft/cometbft/abci/types" cmtjson "github.com/cometbft/cometbft/libs/json" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" cmttypes "github.com/cometbft/cometbft/types" dbm "github.com/cosmos/cosmos-db" + coreheader "cosmossdk.io/core/header" + "cosmossdk.io/depinject" + sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -34,7 +36,7 @@ const DefaultGenTxGas = 10000000 var DefaultConsensusParams = &cmtproto.ConsensusParams{ Block: &cmtproto.BlockParams{ MaxBytes: 200000, - MaxGas: 2000000, + MaxGas: 100_000_000, }, Evidence: &cmtproto.EvidenceParams{ MaxAgeNumBlocks: 302400, @@ -106,6 +108,35 @@ func SetupAtGenesis(appConfig depinject.Config, extraOutputs ...interface{}) (*r return SetupWithConfiguration(appConfig, cfg, extraOutputs...) } +// NextBlock starts a new block. +func NextBlock(app *runtime.App, ctx sdk.Context, jumpTime time.Duration) (sdk.Context, error) { + _, err := app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: ctx.BlockHeight(), Time: ctx.BlockTime()}) + if err != nil { + return sdk.Context{}, err + } + _, err = app.Commit() + if err != nil { + return sdk.Context{}, err + } + + newBlockTime := ctx.BlockTime().Add(jumpTime) + + header := ctx.BlockHeader() + header.Time = newBlockTime + header.Height++ + + newCtx := app.BaseApp.NewUncachedContext(false, header).WithHeaderInfo(coreheader.Info{ + Height: header.Height, + Time: header.Time, + }) + + if err != nil { + return sdk.Context{}, err + } + + return newCtx, err +} + // SetupWithConfiguration initializes a new runtime.App. A Nop logger is set in runtime.App. // appConfig defines the application configuration (f.e. app_config.go). // extraOutputs defines the extra outputs to be assigned by the dependency injector (depinject). @@ -222,7 +253,7 @@ func GenesisStateWithValSet( MinSelfDelegation: sdkmath.ZeroInt(), } validators = append(validators, validator) - delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].GetAddress(), val.Address.Bytes(), sdkmath.LegacyOneDec())) + delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].GetAddress().String(), sdk.ValAddress(val.Address).String(), sdkmath.LegacyOneDec())) } diff --git a/testutil/sims/state_helpers.go b/testutil/sims/state_helpers.go index e0d643a90fb2..d1a320e983ef 100644 --- a/testutil/sims/state_helpers.go +++ b/testutil/sims/state_helpers.go @@ -1,11 +1,13 @@ package sims import ( + "bufio" "encoding/json" "fmt" "io" "math/rand" "os" + "path/filepath" "time" "github.com/cosmos/gogoproto/proto" @@ -13,6 +15,7 @@ import ( "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" @@ -205,11 +208,11 @@ func AppStateRandomizedFn( ) appParams.GetOrGenerate( StakePerAccount, &initialStake, r, - func(r *rand.Rand) { initialStake = math.NewInt(r.Int63n(1e12)) }, + func(r *rand.Rand) { initialStake = sdk.DefaultPowerReduction.AddRaw(r.Int63n(1e12)) }, ) appParams.GetOrGenerate( InitiallyBondedValidators, &numInitiallyBonded, r, - func(r *rand.Rand) { numInitiallyBonded = int64(r.Intn(300)) }, + func(r *rand.Rand) { numInitiallyBonded = int64(r.Intn(299) + 1) }, ) if numInitiallyBonded > numAccs { @@ -222,7 +225,7 @@ func AppStateRandomizedFn( stake_per_account: "%d", initially_bonded_validators: "%d" } -`, initialStake, numInitiallyBonded, +`, initialStake.Uint64(), numInitiallyBonded, ) simState := &module.SimulationState{ @@ -250,19 +253,23 @@ func AppStateRandomizedFn( // AppStateFromGenesisFileFn util function to generate the genesis AppState // from a genesis.json file. func AppStateFromGenesisFileFn(r io.Reader, cdc codec.JSONCodec, genesisFile string) (genutiltypes.AppGenesis, []simtypes.Account, error) { - bytes, err := os.ReadFile(genesisFile) + file, err := os.Open(filepath.Clean(genesisFile)) if err != nil { panic(err) } - var genesis genutiltypes.AppGenesis - if err = json.Unmarshal(bytes, &genesis); err != nil { - return genesis, nil, err + genesis, err := genutiltypes.AppGenesisFromReader(bufio.NewReader(file)) + if err != nil { + return *genesis, nil, err + } + + if err := file.Close(); err != nil { + return *genesis, nil, err } var appState map[string]json.RawMessage if err = json.Unmarshal(genesis.AppState, &appState); err != nil { - return genesis, nil, err + return *genesis, nil, err } var authGenesis authtypes.GenesisState @@ -284,13 +291,13 @@ func AppStateFromGenesisFileFn(r io.Reader, cdc codec.JSONCodec, genesisFile str a, ok := acc.GetCachedValue().(sdk.AccountI) if !ok { - return genesis, nil, fmt.Errorf("expected account") + return *genesis, nil, fmt.Errorf("expected account") } // create simulator accounts - simAcc := simtypes.Account{PrivKey: privKey, PubKey: privKey.PubKey(), Address: a.GetAddress()} + simAcc := simtypes.Account{PrivKey: privKey, PubKey: privKey.PubKey(), Address: a.GetAddress(), ConsKey: ed25519.GenPrivKeyFromSecret(privkeySeed)} newAccs[i] = simAcc } - return genesis, newAccs, nil + return *genesis, newAccs, nil } diff --git a/testutil/sims/tx_helpers.go b/testutil/sims/tx_helpers.go index 56c42bfc551d..0557e6b647b1 100644 --- a/testutil/sims/tx_helpers.go +++ b/testutil/sims/tx_helpers.go @@ -6,11 +6,12 @@ import ( "testing" "time" - "cosmossdk.io/errors" types2 "github.com/cometbft/cometbft/abci/types" "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/require" + "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" @@ -78,10 +79,10 @@ func GenSignedMockTx(r *rand.Rand, txConfig client.TxConfig, msgs []sdk.Msg, fee panic(err) } sigs[i].Data.(*signing.SingleSignatureData).Signature = sig - err = tx.SetSignatures(sigs...) - if err != nil { - panic(err) - } + } + err = tx.SetSignatures(sigs...) + if err != nil { + panic(err) } return tx.GetTx(), nil diff --git a/testutil/testdata/testpb/tx.proto b/testutil/testdata/testpb/tx.proto index 13e48c7702a7..d3b97193acf7 100644 --- a/testutil/testdata/testpb/tx.proto +++ b/testutil/testdata/testpb/tx.proto @@ -19,8 +19,8 @@ service Msg { message MsgCreateDog { option (cosmos.msg.v1.signer) = "owner"; - testpb.Dog dog = 1; - string owner = 2; + testpb.Dog dog = 1; + string owner = 2; } message MsgCreateDogResponse { @@ -30,9 +30,9 @@ message MsgCreateDogResponse { // TestMsg is msg type for testing protobuf message using any, as defined in // https://github.com/cosmos/cosmos-sdk/issues/6213. message TestMsg { - option (cosmos.msg.v1.signer) = "signers"; + option (cosmos.msg.v1.signer) = "signers"; option (gogoproto.goproto_getters) = false; - option (amino.name) = "testpb/TestMsg"; + option (amino.name) = "testpb/TestMsg"; - repeated string signers = 1; + repeated string signers = 1; } diff --git a/testutil/testnet/cometrpclock.go b/testutil/testnet/cometrpclock.go deleted file mode 100644 index 17c05440d3e4..000000000000 --- a/testutil/testnet/cometrpclock.go +++ /dev/null @@ -1,100 +0,0 @@ -package testnet - -import ( - "fmt" - "runtime/debug" - "sync" - - "github.com/cometbft/cometbft/node" -) - -// CometBFT v0.37 uses a singleton to manage the RPC "environment". -// v0.38 will not have that restriction, which was removed in commit: -// https://github.com/cometbft/cometbft/commit/3324f49fb7e7b40189726746493e83b82a61b558 -// -// We manage a corresponding global lock to ensure -// we don't attempt to use multiple active RPC servers in one process, -// which would result in unpredictable or incorrect behavior. -// Once the SDK adopts Comet v0.38+, we can remove this global lock mechanism. - -// Our singleton complementing Comet's global RPC state. -var globalCometMu = new(cometRPCMutex) - -type cometRPCMutex struct { - mu sync.Mutex - - prevLockStack []byte -} - -// CometRPCInUseError is returned on a failure to acquire -// the global comet RPC lock. -// -// This type will be removed once the Cosmos SDK adopts CometBFT v0.38 or newer. -type CometRPCInUseError struct { - prevStack []byte -} - -func (e CometRPCInUseError) Error() string { - return fmt.Sprintf(`Failed to acquire global lock for Comet RPC servers. - -If this in a test using t.Parallel(), remove the call to t.Parallel(). - -If this is in a test NOT using t.Parallel, -ensure that other callers call both Stop() and Wait() on the nodes. - -If there are multiple comet instances in one test using RPC servers, -ensure that only one instance has the RPC listener enabled. - -These restrictions will be loosened once cosmos-sdk adopts comet-bft v0.38 or newer. - -Stack where lock was previously acquired: -%s -`, e.prevStack) -} - -// Acquire attempts to acquire the underlying mutex. -// If it cannot be acquired on the first attempt, -// Acquire returns a [CometRPCInUseError] value. -func (m *cometRPCMutex) Acquire() error { - if !m.mu.TryLock() { - // If we can't acquire the lock, - // there is another active comet node using RPC. - // - // This was initially going to be a panic, - // but we can't easily write tests against that since - // the panic occurs in a separate goroutine - // when called through NewNetwork. - // - // Note, reading m.prevLockStack without holding m.mu - // is technically a data race, - // since it is possible that the previous caller was about to unlock. - // Nonetheless, the programmer is responsible for avoiding that situation, - // and a data race during a failure isn't particularly concerning. - return CometRPCInUseError{prevStack: m.prevLockStack} - } - - // Now we hold the lock, so first record the stack when the lock was taken. - m.prevLockStack = debug.Stack() - - return nil -} - -// Release unlocks m depending on n. -// If n is nil, m is unlocked immediately. -// If n is not nil, a new goroutine is created -// and n is released after the node has finished running. -func (m *cometRPCMutex) Release(n *node.Node) { - if n == nil { - m.prevLockStack = nil - m.mu.Unlock() - return - } - - go m.releaseAfterWait(n) -} - -func (m *cometRPCMutex) releaseAfterWait(n *node.Node) { - n.Wait() - m.prevLockStack = nil - m.mu.Unlock() -} diff --git a/testutil/testnet/cometstarter.go b/testutil/testnet/cometstarter.go deleted file mode 100644 index 993e5b447528..000000000000 --- a/testutil/testnet/cometstarter.go +++ /dev/null @@ -1,247 +0,0 @@ -package testnet - -import ( - "errors" - "fmt" - "net" - "os" - "path/filepath" - "syscall" - - "cosmossdk.io/log" - cmtcfg "github.com/cometbft/cometbft/config" - cmted25519 "github.com/cometbft/cometbft/crypto/ed25519" - "github.com/cometbft/cometbft/node" - "github.com/cometbft/cometbft/p2p" - "github.com/cometbft/cometbft/privval" - "github.com/cometbft/cometbft/proxy" - cmttypes "github.com/cometbft/cometbft/types" - - "github.com/cosmos/cosmos-sdk/server" - servercmtlog "github.com/cosmos/cosmos-sdk/server/log" - servertypes "github.com/cosmos/cosmos-sdk/server/types" - genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" -) - -// CometStarter offers a builder-pattern interface to -// starting a Comet instance with an ABCI application running alongside. -// -// As CometStart is more broadly used in the codebase, -// the number of available methods on CometStarter will grow. -type CometStarter struct { - logger log.Logger - app servertypes.ABCI - cfg *cmtcfg.Config - valPrivKey cmted25519.PrivKey - genesis []byte - rootDir string - rpcListen bool - tcpAddrChooser func() string - startTries int -} - -// NewCometStarter accepts a minimal set of arguments to start comet with an ABCI app. -// For further configuration, chain other CometStarter methods before calling Start: -// -// NewCometStarter(...).Logger(...).Start() -func NewCometStarter( - app servertypes.ABCI, - cfg *cmtcfg.Config, - valPrivKey cmted25519.PrivKey, - genesis []byte, - rootDir string, -) *CometStarter { - cfg.SetRoot(rootDir) - - // CometStarter won't work without these settings, - // so set them unconditionally. - cfg.P2P.AllowDuplicateIP = true - cfg.P2P.AddrBookStrict = false - - // For now, we disallow RPC listening. - // Comet v0.37 uses a global value such that multiple comet nodes in one process - // end up contending over one "rpc environment" and only the last-started validator - // will control the RPC service. - // - // The "rpc environment" was removed as a global in - // https://github.com/cometbft/cometbft/commit/3324f49fb7e7b40189726746493e83b82a61b558 - // which is due to land in v0.38. - // - // At that point, we should keep the default as RPC off, - // but we should add a RPCListen method to opt in to enabling it. - - // If RPC.ListenAddress is the default value, clear it. - const defaultRPCListenAddr = "tcp://127.0.0.1:26657" - if cfg.RPC.ListenAddress == defaultRPCListenAddr { - cfg.RPC.ListenAddress = "" - } - - // Then if it was set to anything other than empty or the default value, - // fail with a clear explanation on how to enable RPC. - // The RPCListen method must be used in order to correctly pick an available listen address. - if cfg.RPC.ListenAddress != "" { - panic(fmt.Errorf("NewCometStarter: cfg.RPC.ListenAddress must be empty (but was %q); use (*CometStarter).RPCListen() instead", cfg.RPC.ListenAddress)) - } - - // defaultStartTries is somewhat arbitrary. - // Occasionally TestCometStarter_PortContention would fail with 10 tries, - // and bumping it up to 12 makes it almost never fail. - const defaultStartTries = 12 - return &CometStarter{ - logger: log.NewNopLogger(), - app: app, - cfg: cfg, - genesis: genesis, - valPrivKey: valPrivKey, - rootDir: rootDir, - startTries: defaultStartTries, - } -} - -// Logger sets the logger for s and for the eventual started comet instance. -func (s *CometStarter) Logger(logger log.Logger) *CometStarter { - s.logger = logger - return s -} - -// RPCListen enables the RPC listener service on the underlying Comet node. -// The RPC service must be enabled this way so that s can choose a dynamic port, -// retrying if necessary. -// -// Note that there is a limitation in CometBFT v0.37 that -// prevents more than one RPC server running at a time. -// Once the Cosmos SDK has adopted CometBFT v0.38 or newer, -// that limitation will be removed. -func (s *CometStarter) RPCListen() *CometStarter { - s.rpcListen = true - return s -} - -// Start returns a started Comet node. -func (s *CometStarter) Start() (n *node.Node, err error) { - if s.rpcListen { - if err := globalCometMu.Acquire(); err != nil { - return nil, err - } - - // Wrap this defer in an anonymous function so we don't immediately evaluate - // n, which would always be nil at this point. - defer func() { - globalCometMu.Release(n) - }() - } - - fpv, nodeKey, err := s.initDisk() - if err != nil { - return nil, err - } - - appGenesisProvider := func() (*cmttypes.GenesisDoc, error) { - appGenesis, err := genutiltypes.AppGenesisFromFile(s.cfg.GenesisFile()) - if err != nil { - return nil, err - } - - return appGenesis.ToGenesisDoc() - } - - cmtApp := server.NewCometABCIWrapper(s.app) - for i := 0; i < s.startTries; i++ { - s.cfg.P2P.ListenAddress = s.likelyAvailableAddress() - if s.rpcListen { - s.cfg.RPC.ListenAddress = s.likelyAvailableAddress() - } - - n, err := node.NewNode( - s.cfg, - fpv, - nodeKey, - proxy.NewLocalClientCreator(cmtApp), - appGenesisProvider, - cmtcfg.DefaultDBProvider, - node.DefaultMetricsProvider(s.cfg.Instrumentation), - servercmtlog.CometLoggerWrapper{Logger: s.logger}, - ) - if err != nil { - return nil, fmt.Errorf("failed to create comet node: %w", err) - } - - err = n.Start() - if err == nil { - return n, nil - } - - // Error isn't nil -- if it is EADDRINUSE then we can try again. - if errors.Is(err, syscall.EADDRINUSE) { - continue - } - - // Non-nil error that isn't EADDRINUSE, just return the error. - return nil, err - } - - // If we didn't return a node from inside the loop, - // then we must have exhausted our try limit. - return nil, fmt.Errorf("failed to start a comet node within %d tries", s.startTries) -} - -// initDisk creates the config and data directories on disk, -// and other required files, so that comet and the validator work correctly. -// It also generates a node key for validators. -func (s *CometStarter) initDisk() (cmttypes.PrivValidator, *p2p.NodeKey, error) { - if err := os.MkdirAll(filepath.Join(s.rootDir, "config"), 0o750); err != nil { - return nil, nil, fmt.Errorf("failed to make config directory: %w", err) - } - if err := os.MkdirAll(filepath.Join(s.rootDir, "data"), 0o750); err != nil { - return nil, nil, fmt.Errorf("failed to make data directory: %w", err) - } - - fpv := privval.NewFilePV(s.valPrivKey, s.cfg.PrivValidatorKeyFile(), s.cfg.PrivValidatorStateFile()) - fpv.Save() - - if err := os.WriteFile(s.cfg.GenesisFile(), s.genesis, 0o600); err != nil { - return nil, nil, fmt.Errorf("failed to write genesis file: %w", err) - } - - nodeKey, err := p2p.LoadOrGenNodeKey(s.cfg.NodeKeyFile()) - if err != nil { - return nil, nil, err - } - - return fpv, nodeKey, nil -} - -// TCPAddrChooser sets the function to use when selecting a (likely to be free) -// TCP address for comet's P2P port. -// -// This should only be used when testing CometStarter. -// -// It must return a string in format "tcp://IP:PORT". -func (s *CometStarter) TCPAddrChooser(fn func() string) *CometStarter { - s.tcpAddrChooser = fn - return s -} - -// likelyAvailableAddress provides a TCP address that is likely to be available -// for comet or other processes to listen on. -// -// Generally, it is better to directly provide a net.Listener that is already bound to an address, -// but unfortunately comet does not offer that as part of its API. -// Instead, we locally bind to :0 and then report that as a "likely available" port. -// If another process steals that port before our comet instance can bind to it, -// the Start method handles retries. -func (s *CometStarter) likelyAvailableAddress() string { - // If s.TCPAddrChooser was called, use that implementation. - if s.tcpAddrChooser != nil { - return s.tcpAddrChooser() - } - - // Fall back to attempting a random port. - ln, err := net.Listen("tcp", "127.0.0.1:0") - if err != nil { - panic(fmt.Errorf("failed to bind to random port: %w", err)) - } - - defer ln.Close() - return "tcp://" + ln.Addr().String() -} diff --git a/testutil/testnet/delegator.go b/testutil/testnet/delegator.go deleted file mode 100644 index 5ed8ef0ed6d5..000000000000 --- a/testutil/testnet/delegator.go +++ /dev/null @@ -1,59 +0,0 @@ -package testnet - -import ( - "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" -) - -// DelegatorPrivKeys is a slice of secp256k1.PrivKey. -type DelegatorPrivKeys []*secp256k1.PrivKey - -// NewDelegatorPrivKeysreturns a DelegatorPrivKeys of length n, -// where each set of keys is dynamically generated. -func NewDelegatorPrivKeys(n int) DelegatorPrivKeys { - dpk := make(DelegatorPrivKeys, n) - - for i := range dpk { - dpk[i] = secp256k1.GenPrivKey() - } - - return dpk -} - -// BaseAccounts returns the base accounts corresponding to the delegators' public keys. -func (dpk DelegatorPrivKeys) BaseAccounts() BaseAccounts { - ba := make(BaseAccounts, len(dpk)) - - for i, pk := range dpk { - pubKey := pk.PubKey() - - const accountNumber = 0 - const sequenceNumber = 0 - - ba[i] = authtypes.NewBaseAccount( - pubKey.Address().Bytes(), pubKey, accountNumber, sequenceNumber, - ) - } - - return ba -} - -// BaseAccounts is a slice of [*authtypes.BaseAccount]. -type BaseAccounts []*authtypes.BaseAccount - -// Balances creates a slice of [banktypes.Balance] for each account in ba, -// where each balance has an identical Coins value of the singleBalance argument. -func (ba BaseAccounts) Balances(singleBalance sdk.Coins) []banktypes.Balance { - balances := make([]banktypes.Balance, len(ba)) - - for i, b := range ba { - balances[i] = banktypes.Balance{ - Address: b.GetAddress().String(), - Coins: singleBalance, - } - } - - return balances -} diff --git a/testutil/testnet/doc.go b/testutil/testnet/doc.go deleted file mode 100644 index 55d4dbe441d4..000000000000 --- a/testutil/testnet/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// Package testnet provides APIs for easily create and configure -// validators, genesis files, and comet instances, -// to support testing app chain instances in-process. -package testnet diff --git a/testutil/testnet/genesis.go b/testutil/testnet/genesis.go deleted file mode 100644 index c4c6eb3578b4..000000000000 --- a/testutil/testnet/genesis.go +++ /dev/null @@ -1,527 +0,0 @@ -package testnet - -import ( - "context" - "encoding/json" - "fmt" - "strconv" - "time" - - "cosmossdk.io/math" - cmttypes "github.com/cometbft/cometbft/types" - - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" - - authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" - distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" - slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" -) - -// GenesisBuilder enables constructing a genesis file, -// following a builder pattern. -// -// None of the methods on GenesisBuilder return an error, -// choosing instead to panic. -// GenesisBuilder is only intended for use in tests, -// where inputs are predetermined and expected to succeed. -type GenesisBuilder struct { - amino *codec.LegacyAmino - codec *codec.ProtoCodec - - // The value used in ChainID. - // Some other require this value, - // so store it as a field instead of re-parsing it from JSON. - chainID string - - // The outer JSON object. - // Most data goes into app_state, but there are some top-level fields. - outer map[string]json.RawMessage - - // Many of GenesisBuilder's methods operate on the app_state JSON object, - // so we track that separately and nest it inside outer upon a call to JSON(). - appState map[string]json.RawMessage - - gentxs []sdk.Tx -} - -// NewGenesisBuilder returns an initialized GenesisBuilder. -// -// The returned GenesisBuilder has an initial height of 1 -// and a genesis_time of the current time when the function was called. -func NewGenesisBuilder() *GenesisBuilder { - ir := codectypes.NewInterfaceRegistry() - cryptocodec.RegisterInterfaces(ir) - stakingtypes.RegisterInterfaces(ir) - banktypes.RegisterInterfaces(ir) - authtypes.RegisterInterfaces(ir) - pCodec := codec.NewProtoCodec(ir) - - return &GenesisBuilder{ - amino: codec.NewLegacyAmino(), - codec: pCodec, - - outer: map[string]json.RawMessage{ - "initial_height": json.RawMessage(`"1"`), - "genesis_time": json.RawMessage( - strconv.AppendQuote(nil, time.Now().UTC().Format(time.RFC3339Nano)), - ), - }, - appState: map[string]json.RawMessage{}, - } -} - -// GenTx emulates the gentx CLI, creating a message to create a validator -// represented by val, with "amount" self delegation, -// and signed by privVal. -func (b *GenesisBuilder) GenTx(privVal secp256k1.PrivKey, val cmttypes.GenesisValidator, amount sdk.Coin) *GenesisBuilder { - if b.chainID == "" { - panic(fmt.Errorf("(*GenesisBuilder).GenTx must not be called before (*GenesisBuilder).ChainID")) - } - - pubKey, err := cryptocodec.FromCmtPubKeyInterface(val.PubKey) - if err != nil { - panic(err) - } - - // Produce the create validator message. - msg, err := stakingtypes.NewMsgCreateValidator( - privVal.PubKey().Address().Bytes(), - pubKey, - amount, - stakingtypes.Description{ - Moniker: "TODO", - }, - stakingtypes.CommissionRates{ - Rate: sdk.MustNewDecFromStr("0.1"), - MaxRate: sdk.MustNewDecFromStr("0.2"), - MaxChangeRate: sdk.MustNewDecFromStr("0.01"), - }, - math.OneInt(), - ) - if err != nil { - panic(err) - } - - if err := msg.Validate(); err != nil { - panic(err) - } - - txConf := authtx.NewTxConfig(b.codec, authtx.DefaultSignModes) - - txb := txConf.NewTxBuilder() - if err := txb.SetMsgs(msg); err != nil { - panic(err) - } - - const signMode = signing.SignMode_SIGN_MODE_DIRECT - - // Need to set the signature object on the tx builder first, - // otherwise we end up signing a different total message - // compared to what gets eventually verified. - if err := txb.SetSignatures( - signing.SignatureV2{ - PubKey: privVal.PubKey(), - Data: &signing.SingleSignatureData{ - SignMode: signMode, - }, - }, - ); err != nil { - panic(err) - } - - // Generate bytes to be signed. - bytesToSign, err := authsigning.GetSignBytesAdapter( - context.Background(), - txConf.SignModeHandler(), - signing.SignMode_SIGN_MODE_DIRECT, - authsigning.SignerData{ - ChainID: b.chainID, - PubKey: privVal.PubKey(), - Address: sdk.MustBech32ifyAddressBytes("cosmos", privVal.PubKey().Address()), // TODO: don't hardcode cosmos1! - - // No account or sequence number for gentx. - }, - txb.GetTx(), - ) - if err != nil { - panic(err) - } - - // Produce the signature. - signed, err := privVal.Sign(bytesToSign) - if err != nil { - panic(err) - } - - // Set the signature on the builder. - if err := txb.SetSignatures( - signing.SignatureV2{ - PubKey: privVal.PubKey(), - Data: &signing.SingleSignatureData{ - SignMode: signMode, - Signature: signed, - }, - }, - ); err != nil { - panic(err) - } - - b.gentxs = append(b.gentxs, txb.GetTx()) - - return b -} - -// ChainID sets the genesis's "chain_id" field. -func (b *GenesisBuilder) ChainID(id string) *GenesisBuilder { - b.chainID = id - - var err error - b.outer["chain_id"], err = json.Marshal(id) - if err != nil { - panic(err) - } - - return b -} - -// GenesisTime sets the genesis's "genesis_time" field. -// Note that [NewGenesisBuilder] sets the genesis time to the current time by default. -func (b *GenesisBuilder) GenesisTime(t time.Time) *GenesisBuilder { - var err error - b.outer["genesis_time"], err = json.Marshal(t.Format(time.RFC3339Nano)) - if err != nil { - panic(err) - } - return b -} - -// InitialHeight sets the genesis's "initial_height" field to h. -// Note that [NewGenesisBuilder] sets the initial height to 1 by default. -func (b *GenesisBuilder) InitialHeight(h int64) *GenesisBuilder { - var err error - b.outer["initial_height"], err = json.Marshal(strconv.FormatInt(h, 10)) - if err != nil { - panic(err) - } - return b -} - -// AuthParams sets the auth params on the genesis. -func (b *GenesisBuilder) AuthParams(params authtypes.Params) *GenesisBuilder { - var err error - b.appState[authtypes.ModuleName], err = json.Marshal(map[string]any{ - "params": params, - }) - if err != nil { - panic(err) - } - - return b -} - -// DefaultAuthParams calls b.AuthParams with [authtypes.DefaultParams], -// as a convenience so that callers do not have to import the authtypes package. -func (b *GenesisBuilder) DefaultAuthParams() *GenesisBuilder { - return b.AuthParams(authtypes.DefaultParams()) -} - -// Consensus sets the consensus parameters and initial validators. -// -// If params is nil, [cmttypes.DefaultConsensusParams] is used. -func (b *GenesisBuilder) Consensus(params *cmttypes.ConsensusParams, vals CometGenesisValidators) *GenesisBuilder { - if params == nil { - params = cmttypes.DefaultConsensusParams() - } - - var err error - b.outer[consensusparamtypes.ModuleName], err = (&genutiltypes.ConsensusGenesis{ - Params: params, - Validators: vals.ToComet(), - }).MarshalJSON() - if err != nil { - panic(err) - } - - return b -} - -// Staking sets the staking parameters, validators, and delegations on the genesis. -// -// This also modifies the bank state's balances to include the bonded pool balance. -func (b *GenesisBuilder) Staking( - params stakingtypes.Params, - vals StakingValidators, - delegations []stakingtypes.Delegation, -) *GenesisBuilder { - var err error - b.appState[stakingtypes.ModuleName], err = b.codec.MarshalJSON( - stakingtypes.NewGenesisState(params, vals.ToStakingType(), delegations), - ) - if err != nil { - panic(err) - } - - // Modify bank state for bonded pool. - - var coins sdk.Coins - for _, v := range vals { - coins = coins.Add(sdk.NewCoin(sdk.DefaultBondDenom, v.V.Tokens)) - } - - bondedPoolBalance := banktypes.Balance{ - Address: authtypes.NewModuleAddress(stakingtypes.BondedPoolName).String(), - Coins: coins, - } - - // get bank types genesis, add account - - bankGenesis := banktypes.GetGenesisStateFromAppState(b.codec, b.appState) - bankGenesis.Balances = append(bankGenesis.Balances, bondedPoolBalance) - - b.appState[banktypes.ModuleName], err = b.codec.MarshalJSON(bankGenesis) - if err != nil { - panic(err) - } - - return b -} - -// StakingWithDefaultParams calls b.Staking, providing [stakingtypes.DefaultParams] -// so that callers don't necessarily have to import [stakingtypes]. -func (b *GenesisBuilder) StakingWithDefaultParams(vals StakingValidators, delegations []stakingtypes.Delegation) *GenesisBuilder { - return b.Staking(stakingtypes.DefaultParams(), vals, delegations) -} - -// DefaultStaking is shorthand for b.StakingWithDefaultParams with nil validators and delegations. -func (b *GenesisBuilder) DefaultStaking() *GenesisBuilder { - return b.StakingWithDefaultParams(nil, nil) -} - -// Banking sets the banking genesis state. -func (b *GenesisBuilder) Banking( - params banktypes.Params, - balances []banktypes.Balance, - totalSupply sdk.Coins, - denomMetadata []banktypes.Metadata, - sendEnabled []banktypes.SendEnabled, -) *GenesisBuilder { - var err error - b.appState[banktypes.ModuleName], err = b.codec.MarshalJSON( - banktypes.NewGenesisState( - params, - balances, - totalSupply, - denomMetadata, - sendEnabled, - ), - ) - if err != nil { - panic(err) - } - return b -} - -// BankingWithDefaultParams calls b.Banking with [banktypes.DefaultParams], -// so that callers don't necessarily have to import [banktypes]. -func (b *GenesisBuilder) BankingWithDefaultParams( - balances []banktypes.Balance, - totalSupply sdk.Coins, - denomMetadata []banktypes.Metadata, - sendEnabled []banktypes.SendEnabled, -) *GenesisBuilder { - return b.Banking( - banktypes.DefaultParams(), - balances, - totalSupply, - denomMetadata, - sendEnabled, - ) -} - -// Mint sets the mint genesis state. -func (b *GenesisBuilder) Mint(m minttypes.Minter, p minttypes.Params) *GenesisBuilder { - var err error - b.appState[minttypes.ModuleName], err = b.codec.MarshalJSON( - minttypes.NewGenesisState(m, p), - ) - if err != nil { - panic(err) - } - return b -} - -// DefaultMint calls b.Mint with [minttypes.DefaultInitialMinter] and [minttypes.DefaultParams]. -func (b *GenesisBuilder) DefaultMint() *GenesisBuilder { - return b.Mint(minttypes.DefaultInitialMinter(), minttypes.DefaultParams()) -} - -// Slashing sets the slashing genesis state. -func (b *GenesisBuilder) Slashing( - params slashingtypes.Params, - si []slashingtypes.SigningInfo, - mb []slashingtypes.ValidatorMissedBlocks, -) *GenesisBuilder { - var err error - b.appState[slashingtypes.ModuleName], err = b.codec.MarshalJSON( - slashingtypes.NewGenesisState(params, si, mb), - ) - if err != nil { - panic(err) - } - return b -} - -// SlashingWithDefaultParams calls b.Slashing with [slashingtypes.DefaultParams], -// so that callers don't necessarily have to import [slashingtypes]. -func (b *GenesisBuilder) SlashingWithDefaultParams( - si []slashingtypes.SigningInfo, - mb []slashingtypes.ValidatorMissedBlocks, -) *GenesisBuilder { - return b.Slashing(slashingtypes.DefaultParams(), si, mb) -} - -// DefaultSlashing is shorthand for b.SlashingWithDefaultParams -// with nil signing info and validator missed blocks. -func (b *GenesisBuilder) DefaultSlashing() *GenesisBuilder { - return b.SlashingWithDefaultParams(nil, nil) -} - -// BaseAccounts sets the initial base accounts and balances. -func (b *GenesisBuilder) BaseAccounts(ba BaseAccounts, balances []banktypes.Balance) *GenesisBuilder { - // Logic mostly copied from AddGenesisAccount. - - authGenState := authtypes.GetGenesisStateFromAppState(b.codec, b.appState) - bankGenState := banktypes.GetGenesisStateFromAppState(b.codec, b.appState) - - accs, err := authtypes.UnpackAccounts(authGenState.Accounts) - if err != nil { - panic(err) - } - - for _, a := range ba { - accs = append(accs, a) - } - accs = authtypes.SanitizeGenesisAccounts(accs) - - genAccs, err := authtypes.PackAccounts(accs) - if err != nil { - panic(err) - } - - authGenState.Accounts = genAccs - jAuthGenState, err := b.codec.MarshalJSON(&authGenState) - if err != nil { - panic(err) - } - b.appState[authtypes.ModuleName] = jAuthGenState - - bankGenState.Balances = append(bankGenState.Balances, balances...) - bankGenState.Balances = banktypes.SanitizeGenesisBalances(bankGenState.Balances) - - jBankState, err := b.codec.MarshalJSON(bankGenState) - if err != nil { - panic(err) - } - b.appState[banktypes.ModuleName] = jBankState - return b -} - -func (b *GenesisBuilder) Distribution(g *distributiontypes.GenesisState) *GenesisBuilder { - j, err := b.codec.MarshalJSON(g) - if err != nil { - panic(err) - } - - b.appState[distributiontypes.ModuleName] = j - return b -} - -func (b *GenesisBuilder) DefaultDistribution() *GenesisBuilder { - return b.Distribution(distributiontypes.DefaultGenesisState()) -} - -// JSON returns the map of the genesis after applying some final transformations. -func (b *GenesisBuilder) JSON() map[string]json.RawMessage { - gentxGenesisState := genutiltypes.NewGenesisStateFromTx( - authtx.NewTxConfig(b.codec, authtx.DefaultSignModes).TxJSONEncoder(), - b.gentxs, - ) - - if err := genutiltypes.ValidateGenesis( - gentxGenesisState, - authtx.NewTxConfig(b.codec, authtx.DefaultSignModes).TxJSONDecoder(), - genutiltypes.DefaultMessageValidator, - ); err != nil { - panic(err) - } - - b.appState = genutiltypes.SetGenesisStateInAppState( - b.codec, b.appState, gentxGenesisState, - ) - - appState, err := b.amino.MarshalJSON(b.appState) - if err != nil { - panic(err) - } - - b.outer["app_state"] = appState - - return b.outer -} - -// Encode returns the JSON-encoded, finalized genesis. -func (b *GenesisBuilder) Encode() []byte { - j, err := b.amino.MarshalJSON(b.JSON()) - if err != nil { - panic(err) - } - - return j -} - -// DefaultGenesisBuilderOnlyValidators returns a GenesisBuilder configured only with the given StakingValidators, -// with default parameters everywhere else. -// validatorAmount is the amount to give each validator during gentx. -// -// This is a convenience for the common case of nothing special in the genesis. -// For anything outside of the defaults, -// the longhand form of NewGenesisBuilder().ChainID(chainID)... should be used. -func DefaultGenesisBuilderOnlyValidators( - chainID string, - sv StakingValidators, - validatorAmount sdk.Coin, -) *GenesisBuilder { - cmtVals := make(CometGenesisValidators, len(sv)) - for i := range sv { - cmtVals[i] = sv[i].C - } - - b := NewGenesisBuilder(). - ChainID(chainID). - DefaultAuthParams(). - Consensus(nil, cmtVals). - BaseAccounts(sv.BaseAccounts(), nil). - StakingWithDefaultParams(nil, nil). - BankingWithDefaultParams(sv.Balances(), nil, nil, nil). - DefaultDistribution(). - DefaultMint(). - SlashingWithDefaultParams(nil, nil) - - for _, v := range sv { - b.GenTx(*v.PK.Del, v.C.V, sdk.NewCoin(sdk.DefaultBondDenom, sdk.DefaultPowerReduction)) - } - - return b -} diff --git a/testutil/testnet/genesis_test.go b/testutil/testnet/genesis_test.go deleted file mode 100644 index 0947d86d3bd5..000000000000 --- a/testutil/testnet/genesis_test.go +++ /dev/null @@ -1,244 +0,0 @@ -package testnet_test - -import ( - "encoding/base64" - "encoding/json" - "testing" - "time" - - cmted25519 "github.com/cometbft/cometbft/crypto/ed25519" - "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - "github.com/cosmos/cosmos-sdk/testutil/testnet" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/bech32" - "github.com/stretchr/testify/require" -) - -func TestGenesisBuilder_GenesisTime(t *testing.T) { - t.Run("defaults to current time", func(t *testing.T) { - before := time.Now() - time.Sleep(time.Millisecond) // So that the genesis time will be strictly after "before". - gb := testnet.NewGenesisBuilder() - time.Sleep(time.Millisecond) // So that the genesis time will be strictly before "after". - after := time.Now() - - var gts string - require.NoError(t, json.Unmarshal(gb.JSON()["genesis_time"], >s)) - - gt, err := time.Parse(time.RFC3339Nano, gts) - require.NoError(t, err) - - require.True(t, gt.After(before)) - require.True(t, after.After(gt)) - }) - - t.Run("can be set to arbitrary time", func(t *testing.T) { - want := time.Date(2023, 3, 27, 9, 50, 23, 0, time.UTC) - - gb := testnet.NewGenesisBuilder().GenesisTime(want) - - var gts string - require.NoError(t, json.Unmarshal(gb.JSON()["genesis_time"], >s)) - - gt, err := time.Parse(time.RFC3339Nano, gts) - require.NoError(t, err) - - require.True(t, gt.Equal(want)) - }) -} - -func TestGenesisBuilder_InitialHeight(t *testing.T) { - t.Run("defaults to 1", func(t *testing.T) { - var ih string - require.NoError( - t, - json.Unmarshal( - testnet.NewGenesisBuilder().JSON()["initial_height"], - &ih, - ), - ) - - require.Equal(t, ih, "1") - }) - - t.Run("can be set to arbitrary value", func(t *testing.T) { - var ih string - require.NoError( - t, - json.Unmarshal( - testnet.NewGenesisBuilder().InitialHeight(12345).JSON()["initial_height"], - &ih, - ), - ) - - require.Equal(t, ih, "12345") - }) -} - -func TestGenesisBuilder_ChainID(t *testing.T) { - // No default. - gb := testnet.NewGenesisBuilder() - m := gb.JSON() - _, ok := m["chain_id"] - require.False(t, ok) - - var id string - require.NoError( - t, - json.Unmarshal( - gb.ChainID("my-chain").JSON()["chain_id"], - &id, - ), - ) - require.Equal(t, id, "my-chain") -} - -// Use known keys and addresses to assert that correct validator and delegator keys -// occur in the expected locations (i.e. we didn't mistakenly swap the keys anywhere). -func TestGenesisBuilder_GentxAddresses(t *testing.T) { - const valSecret0 = "val-secret-0" - const valAddr0 = "3F3B076353767F046477A6E0982F808C24D1870A" - const valPubKey0 = "ZhVhrOUHnUwYw/GlBSBrw/0X6A261gchCRYkAxGF2jk=" - valKey0 := cmted25519.GenPrivKeyFromSecret([]byte(valSecret0)) - if addr := valKey0.PubKey().Address().String(); addr != valAddr0 { - t.Fatalf("unexpected address %q for validator key 0 (expected %q)", addr, valAddr0) - } - if pub := base64.StdEncoding.EncodeToString(valKey0.PubKey().Bytes()); pub != valPubKey0 { - t.Fatalf("unexpected public key %q for validator key 0 (expected %q)", pub, valAddr0) - } - - const delSecret0 = "del-secret-0" - const delAddr0 = "30D7E04DA313C31B59A46408494B4272F0A9A256" - const delPubKey0 = "Aol+ZF9xBuZmYJrT1QFLpZBvSfr/zEKifWyg0Xi1tsFV" - const delAccAddr0 = "cosmos1xrt7qndrz0p3kkdyvsyyjj6zwtc2ngjky8dcpe" - delKey0 := secp256k1.GenPrivKeyFromSecret([]byte(delSecret0)) - if addr := delKey0.PubKey().Address().String(); addr != delAddr0 { - t.Fatalf("unexpected address %q for delegator key 0 (expected %q)", addr, delAddr0) - } - if pub := base64.StdEncoding.EncodeToString(delKey0.PubKey().Bytes()); pub != delPubKey0 { - t.Fatalf("unexpected public key %q for delegator key 0 (expected %q)", pub, delAddr0) - } - da, err := bech32.ConvertAndEncode("cosmos", delKey0.PubKey().Address().Bytes()) - require.NoError(t, err) - if da != delAccAddr0 { - t.Fatalf("unexpected account address %q for delegator key 0 (expected %q)", da, delAccAddr0) - } - - valPKs := testnet.ValidatorPrivKeys{ - &testnet.ValidatorPrivKey{ - Val: valKey0, - Del: delKey0, - }, - } - cmtVals := valPKs.CometGenesisValidators() - stakingVals := cmtVals.StakingValidators() - valBaseAccounts := stakingVals.BaseAccounts() - - b := testnet.NewGenesisBuilder(). - ChainID("my-test-chain"). - DefaultAuthParams(). - Consensus(nil, cmtVals). - BaseAccounts(valBaseAccounts, nil). - StakingWithDefaultParams(stakingVals, nil) - - for i, v := range valPKs { - b.GenTx(*v.Del, cmtVals[i].V, sdk.NewCoin(sdk.DefaultBondDenom, sdk.DefaultPowerReduction)) - } - - var g struct { - Consensus struct { - Validators []struct { - Address string `json:"address"` - PubKey struct { - Value string `json:"value"` - } `json:"pub_key"` - } `json:"validators"` - } `json:"consensus"` - - AppState struct { - Genutil struct { - GenTxs []struct { - Body struct { - Messages []struct { - Type string `json:"@type"` - DelegatorAddress string `json:"delegator_address"` - ValidatorAddress string `json:"validator_address"` - PubKey struct { - Key string `json:"key"` - } `json:"pubkey"` - } `json:"messages"` - } `json:"body"` - AuthInfo struct { - SignerInfos []struct { - PublicKey struct { - Key string `json:"key"` - } `json:"public_key"` - } `json:"signer_infos"` - } `json:"auth_info"` - } `json:"gen_txs"` - } `json:"genutil"` - - Auth struct { - Accounts []struct { - Address string `json:"address"` - PubKey struct { - Key string `json:"key"` - } `json:"pub_key"` - } `json:"accounts"` - } `json:"auth"` - } `json:"app_state"` - } - if err := json.Unmarshal(b.Encode(), &g); err != nil { - t.Fatal(err) - } - - // Validator encoded as expected. - vals := g.Consensus.Validators - require.Equal(t, vals[0].Address, valAddr0) - require.Equal(t, vals[0].PubKey.Value, valPubKey0) - - // Public keys on gentx message match correct keys (no ed25519/secp256k1 mismatch). - gentxs := g.AppState.Genutil.GenTxs - require.Equal(t, gentxs[0].Body.Messages[0].PubKey.Key, valPubKey0) - require.Equal(t, gentxs[0].AuthInfo.SignerInfos[0].PublicKey.Key, delPubKey0) - - // The only base account in this genesis, matches the secp256k1 key. - acct := g.AppState.Auth.Accounts[0] - require.Equal(t, acct.Address, delAccAddr0) - require.Equal(t, acct.PubKey.Key, delPubKey0) -} - -func ExampleGenesisBuilder() { - const nVals = 4 - - // Generate random private keys for validators. - valPKs := testnet.NewValidatorPrivKeys(nVals) - - // Produce the comet representation of those validators. - cmtVals := valPKs.CometGenesisValidators() - - stakingVals := cmtVals.StakingValidators() - - // Configure a new genesis builder - // with a fairly thorough set of defaults. - // - // If you only ever need defaults, you can use DefaultGenesisBuilderOnlyValidators(). - b := testnet.NewGenesisBuilder(). - ChainID("my-chain-id"). - DefaultAuthParams(). - Consensus(nil, cmtVals). - BaseAccounts(stakingVals.BaseAccounts(), nil). - DefaultStaking(). - BankingWithDefaultParams(stakingVals.Balances(), nil, nil, nil). - DefaultDistribution(). - DefaultMint(). - DefaultSlashing() - - for i := range stakingVals { - b.GenTx(*valPKs[i].Del, cmtVals[i].V, sdk.NewCoin(sdk.DefaultBondDenom, sdk.DefaultPowerReduction)) - } - - // Now, you can access b.JSON() if you need to make further modifications - // not (yet) supported by the GenesisBuilder API, - // or you can use b.Encode() for the serialzed JSON of the genesis. -} diff --git a/testutil/testnet/network.go b/testutil/testnet/network.go deleted file mode 100644 index ecba45fa0580..000000000000 --- a/testutil/testnet/network.go +++ /dev/null @@ -1,116 +0,0 @@ -package testnet - -import ( - "errors" - "fmt" - "sync" - - "github.com/cometbft/cometbft/p2p" -) - -// NewNetwork concurrently calls createCometStarter, nVals times; -// then it returns a slice of started comet nodes, -// in order corresponding with the number passed to createCometStarter. -// The returned nodes will all be peered together, -// by dialing each node's [github.com/cometbft/cometbft/p2p/pex.Reactor] to each other. -// -// Every node is attempted to be started, -// and any errors collected are joined together and returned. -// -// In the event of errors, a non-nil Nodes slice may still be returned -// and some elements may be nil. -// Callers should call [Nodes.Stop] and [Nodes.Wait] to perform cleanup, -// regardless of the returned error. -func NewNetwork(nVals int, createCometStarter func(int) *CometStarter) (Nodes, error) { - // The ordered slice of nodes; correct indexing is important. - // The creator goroutines will write directly into this slice. - nodes := make(Nodes, nVals) - - // Every node will be started in its own goroutine. - // We collect the switches so that each node can dial every other node. - switchCh := make(chan *p2p.Switch, nVals) - errCh := make(chan error, nVals) - - var wg sync.WaitGroup - // Start goroutines to populate nodes slice and notify as each node is available. - for i := 0; i < nVals; i++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - - n, err := createCometStarter(i).Start() - if err != nil { - errCh <- fmt.Errorf("failed to start node %d: %w", i, err) - return - } - - // Notify that the new node's switch is available, so this node can be - // peered with the other nodes. - switchCh <- n.Switch() - - // And assign the node into its correct index in the ordered slice. - nodes[i] = n - }(i) - } - - // Once all the creation goroutines are complete, close the channels, - // to signal to the collection goroutines. - go func() { - wg.Wait() - close(errCh) - close(switchCh) - }() - - joinPeersDone := make(chan struct{}) - go joinPeers(switchCh, joinPeersDone) - - finalErrCh := make(chan error, 1) - go collectErrors(errCh, finalErrCh) - - // If there were any errors, return them. - // And return any set nodes, so that they can be cleaned up properly. - if err := <-finalErrCh; err != nil { - return nodes, err - } - - // No errors, so wait for peer joining to complete - // before returning the ordered nodes. - <-joinPeersDone - return nodes, nil -} - -// collectErrors collects all errors that arrive on the in channel, -// joins them, then sends the joined final error on the out channel. -func collectErrors(in <-chan error, out chan<- error) { - var errs []error - for err := range in { - errs = append(errs, err) - } - - var res error - if len(errs) > 0 { - res = errors.Join(errs...) - } - out <- res -} - -// joinPeers collects each switch arriving on newSwitches; -// each time a new switch arrives, it dials every previously seen switch. -// -// This allows each node to be started independently and concurrently -// without predetermined p2p ports. -func joinPeers(newSwitches <-chan *p2p.Switch, done chan<- struct{}) { - defer close(done) - - var readySwitches []*p2p.Switch - for newSwitch := range newSwitches { - newNetAddr := newSwitch.NetAddress() - for _, s := range readySwitches { - // For every new switch, connect with all the previously seen switches. - // It might not be necessary to dial in both directions, but it shouldn't hurt. - _ = s.DialPeerWithAddress(newNetAddr) - _ = newSwitch.DialPeerWithAddress(s.NetAddress()) - } - readySwitches = append(readySwitches, newSwitch) - } -} diff --git a/testutil/testnet/nodehelpers.go b/testutil/testnet/nodehelpers.go deleted file mode 100644 index dee10aeb7f30..000000000000 --- a/testutil/testnet/nodehelpers.go +++ /dev/null @@ -1,43 +0,0 @@ -package testnet - -import ( - "fmt" - "time" - - "github.com/cometbft/cometbft/node" -) - -// WaitForNodeHeight blocks until the node's consensus state reports -// a last height equal to or greater than desiredHeight. -// If totalWait has elapsed and the desired height has not been reached, -// an error is returned. -func WaitForNodeHeight(n *node.Node, desiredHeight int64, totalWait time.Duration) error { - const backOff = 100 * time.Millisecond - attempts := int64(totalWait / backOff) - - // In Comet 0.37, the consensus state was exposed directly on the Node. - // As of 0.38, the node no longer exposes consensus state, - // but the consensus state is available as a field on the RPC environment. - // - // Luckily, in 0.38 the RPC environment is no longer a package-level singleton, - // so retrieving the RPC environment for a single node should be safe. - env, err := n.ConfigureRPC() - if err != nil { - return fmt.Errorf("failed to configure RPC to reach into consensus state: %w", err) - } - - curHeight := int64(-1) - for i := int64(0); i < attempts; i++ { - curHeight = env.ConsensusState.GetState().LastBlockHeight - - if curHeight < desiredHeight { - time.Sleep(backOff) - continue - } - - // Met or exceeded target height. - return nil - } - - return fmt.Errorf("node did not reach desired height %d in %s; only reached height %d", desiredHeight, totalWait, curHeight) -} diff --git a/testutil/testnet/nodes.go b/testutil/testnet/nodes.go deleted file mode 100644 index d47699fc6fe2..000000000000 --- a/testutil/testnet/nodes.go +++ /dev/null @@ -1,70 +0,0 @@ -package testnet - -import ( - "errors" - "fmt" - "time" - - "github.com/cometbft/cometbft/node" -) - -// Nodes is a slice of comet nodes, -// with some additional convenience methods. -// -// Nodes may contain nil elements, -// so that a partially failed call to NewNetwork -// can still be properly cleaned up. -type Nodes []*node.Node - -// Stop stops each node sequentially. -// All errors occurring during stop are returned as a joined error. -// -// Nil elements in ns are skipped. -func (ns Nodes) Stop() error { - var errs []error - for i, n := range ns { - if n == nil { - continue - } - if err := n.Stop(); err != nil { - errs = append(errs, fmt.Errorf("failed to stop node %d: %w", i, err)) - } - } - - if len(errs) > 0 { - return errors.Join(errs...) - } - - return nil -} - -// Wait blocks until every node in ns has completely stopped. -// -// Nil elements in ns are skipped. -func (ns Nodes) Wait() { - for _, n := range ns { - if n == nil { - continue - } - n.Wait() - } -} - -// StopAndWait is shorthand for calling both Stop() and Wait(), -// useful as a deferred call in tests. -func (ns Nodes) StopAndWait() error { - err := ns.Stop() - ns.Wait() - - // TODO(mr): remove this sleep call after we are using a version of Comet - // that includes a fix for https://github.com/cometbft/cometbft/issues/646. - // - // On my machine, this sleep appears to completely eliminate the late file write. - // It also almost always works around https://github.com/cometbft/cometbft/issues/652. - // - // Presumably the fix for those two issues will be included in a v0.37.1 release. - // If not, I assume they will be part of the first v0.38 series release. - time.Sleep(250 * time.Millisecond) - - return err -} diff --git a/testutil/testnet/nodes_test.go b/testutil/testnet/nodes_test.go deleted file mode 100644 index 55fd3f4b8e98..000000000000 --- a/testutil/testnet/nodes_test.go +++ /dev/null @@ -1,29 +0,0 @@ -package testnet_test - -import ( - "testing" - - "github.com/cometbft/cometbft/node" - "github.com/cosmos/cosmos-sdk/testutil/testnet" - "github.com/stretchr/testify/require" -) - -// Nil entries in a Nodes slice don't fail Stop or Wait. -func TestNodes_StopWaitNil(t *testing.T) { - for _, tc := range []struct { - Name string - Nodes []*node.Node - }{ - {Name: "nil slice", Nodes: nil}, - {Name: "slice with nil elements", Nodes: []*node.Node{nil}}, - } { - ns := testnet.Nodes(tc.Nodes) - t.Run(tc.Name, func(t *testing.T) { - require.NoError(t, ns.Stop()) - - // Nothing special to assert about Wait(). - // It should return immediately, without panicking. - ns.Wait() - }) - } -} diff --git a/testutil/testnet/validator.go b/testutil/testnet/validator.go deleted file mode 100644 index 2e795393a5d3..000000000000 --- a/testutil/testnet/validator.go +++ /dev/null @@ -1,187 +0,0 @@ -package testnet - -import ( - "fmt" - - sdkmath "cosmossdk.io/math" - cmted25519 "github.com/cometbft/cometbft/crypto/ed25519" - cmttypes "github.com/cometbft/cometbft/types" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/bech32" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" -) - -// ValidatorPrivKeys is a slice of [*ValidatorPrivKey]. -type ValidatorPrivKeys []*ValidatorPrivKey - -// ValidatorPrivKey holds a validator key (a comet ed25519 key) -// and the validator's delegator or account key (a Cosmos SDK secp256k1 key). -type ValidatorPrivKey struct { - Val cmted25519.PrivKey - Del *secp256k1.PrivKey -} - -// NewValidatorPrivKeys returns a ValidatorPrivKeys of length n, -// where each set of keys is dynamically generated. -// -// If writing a test where deterministic keys are required, -// the caller should manually construct a slice and assign each key as needed. -func NewValidatorPrivKeys(n int) ValidatorPrivKeys { - vpk := make(ValidatorPrivKeys, n) - - for i := range vpk { - vpk[i] = &ValidatorPrivKey{ - Val: cmted25519.GenPrivKey(), - Del: secp256k1.GenPrivKey(), - } - } - - return vpk -} - -// CometGenesisValidators derives the CometGenesisValidators belonging to vpk. -func (vpk ValidatorPrivKeys) CometGenesisValidators() CometGenesisValidators { - cgv := make(CometGenesisValidators, len(vpk)) - - for i, pk := range vpk { - pubKey := pk.Val.PubKey() - - const votingPower = 1 - cmtVal := cmttypes.NewValidator(pubKey, votingPower) - - cgv[i] = &CometGenesisValidator{ - V: cmttypes.GenesisValidator{ - Address: cmtVal.Address, - PubKey: cmtVal.PubKey, - Power: cmtVal.VotingPower, - Name: fmt.Sprintf("val-%d", i), - }, - PK: pk, - } - } - - return cgv -} - -// CometGenesisValidators is a slice of [*CometGenesisValidator]. -type CometGenesisValidators []*CometGenesisValidator - -// CometGenesisValidator holds a comet GenesisValidator -// and a reference to the ValidatorPrivKey from which the CometGenesisValidator was derived. -type CometGenesisValidator struct { - V cmttypes.GenesisValidator - PK *ValidatorPrivKey -} - -// ToComet returns a new slice of [cmttypes.GenesisValidator], -// useful for some interactions. -func (cgv CometGenesisValidators) ToComet() []cmttypes.GenesisValidator { - vs := make([]cmttypes.GenesisValidator, len(cgv)) - for i, v := range cgv { - vs[i] = v.V - } - return vs -} - -// StakingValidators derives the StakingValidators belonging to cgv. -func (cgv CometGenesisValidators) StakingValidators() StakingValidators { - vals := make(StakingValidators, len(cgv)) - for i, v := range cgv { - pk, err := cryptocodec.FromCmtPubKeyInterface(v.V.PubKey) - if err != nil { - panic(fmt.Errorf("failed to extract comet pub key: %w", err)) - } - - pkAny, err := codectypes.NewAnyWithValue(pk) - if err != nil { - panic(fmt.Errorf("failed to wrap pub key in any type: %w", err)) - } - - vals[i] = &StakingValidator{ - V: stakingtypes.Validator{ - OperatorAddress: sdk.ValAddress(v.V.Address).String(), // TODO: this relies on global bech32 config. - ConsensusPubkey: pkAny, - Status: stakingtypes.Bonded, - Tokens: sdk.DefaultPowerReduction, - DelegatorShares: sdkmath.LegacyOneDec(), - MinSelfDelegation: sdkmath.ZeroInt(), - - // more fields uncopied from testutil/sims/app_helpers.go:220 - }, - C: v, - PK: v.PK, - } - } - - return vals -} - -// StakingValidators is a slice of [*StakingValidator]. -type StakingValidators []*StakingValidator - -// StakingValidator holds a [stakingtypes.Validator], -// and the CometGenesisValidator and ValidatorPrivKey required to derive the StakingValidator. -type StakingValidator struct { - V stakingtypes.Validator - C *CometGenesisValidator - PK *ValidatorPrivKey -} - -// ToStakingType returns a new slice of [stakingtypes.Validator], -// useful for some interactions. -func (sv StakingValidators) ToStakingType() []stakingtypes.Validator { - vs := make([]stakingtypes.Validator, len(sv)) - for i, v := range sv { - vs[i] = v.V - } - return vs -} - -// BaseAccounts returns the BaseAccounts for this set of StakingValidators. -// The base accounts are important for [*GenesisBuilder.BaseAccounts]. -func (sv StakingValidators) BaseAccounts() BaseAccounts { - ba := make(BaseAccounts, len(sv)) - - for i, v := range sv { - const accountNumber = 0 - const sequenceNumber = 0 - - pubKey := v.PK.Del.PubKey() - bech, err := bech32.ConvertAndEncode("cosmos", pubKey.Address().Bytes()) // TODO: this shouldn't be hardcoded to cosmos! - if err != nil { - panic(err) - } - accAddr, err := sdk.AccAddressFromBech32(bech) - if err != nil { - panic(err) - } - ba[i] = authtypes.NewBaseAccount( - accAddr, pubKey, accountNumber, sequenceNumber, - ) - } - - return ba -} - -// Balances returns the balances held by this set of StakingValidators. -func (sv StakingValidators) Balances() []banktypes.Balance { - bals := make([]banktypes.Balance, len(sv)) - - for i, v := range sv { - addr, err := bech32.ConvertAndEncode("cosmos", v.PK.Del.PubKey().Address().Bytes()) // TODO: this shouldn't be hardcoded to cosmos! - if err != nil { - panic(err) - } - bals[i] = banktypes.Balance{ - Address: addr, - Coins: sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, v.V.Tokens)}, - } - } - - return bals -} diff --git a/tools/confix/CHANGELOG.md b/tools/confix/CHANGELOG.md index 902c1f7f60b6..9bf487642a84 100644 --- a/tools/confix/CHANGELOG.md +++ b/tools/confix/CHANGELOG.md @@ -31,5 +31,16 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +## [v0.1.2](https://github.com/cosmos/cosmos-sdk/releases/tag/tools/confix/v0.1.2) - 2024-08-13 + +* (confix) [#21202](https://github.com/cosmos/cosmos-sdk/pull/21202) Allow customization of migration `PlanBuilder`. + +## [v0.1.1](https://github.com/cosmos/cosmos-sdk/releases/tag/tools/confix/v0.1.1) - 2023-12-11 + +* [#18496](https://github.com/cosmos/cosmos-sdk/pull/18496) Remove invalid non SDK config from app.toml migration templates. + +## [v0.1.0](https://github.com/cosmos/cosmos-sdk/releases/tag/tools/confix/v0.1.0) - 2023-11-07 + +* [#17904](https://github.com/cosmos/cosmos-sdk/pull/17904) Add `view` command. * [#14568](https://github.com/cosmos/cosmos-sdk/pull/14568) Add `diff` and `home` commands. * [#14342](https://github.com/cosmos/cosmos-sdk/pull/14342) Add `confix` tool to manage configuration files. diff --git a/tools/confix/README.md b/tools/confix/README.md index 19c637ba90b6..f6badd49734f 100644 --- a/tools/confix/README.md +++ b/tools/confix/README.md @@ -12,7 +12,7 @@ It is based on the [CometBFT RFC 019](https://github.com/cometbft/cometbft/blob/ ### Add Config Command -To add the confix tool, it's required to add the `ConfigCommand` to your application's root command file (e.g. `simd/cmd/root.go`). +To add the confix tool, it's required to add the `ConfigCommand` to your application's root command file (e.g. `/cmd/root.go`). Import the `confixCmd` package: @@ -47,11 +47,6 @@ To use Confix standalone, without having to add it in your application, install go install cosmossdk.io/tools/confix/cmd/confix@latest ``` -:::warning -Currently, due to the replace directive in the Confix go.mod, it is not possible to use `go install`. -Building from source or importing in an application is required until that replace directive is removed. -::: - Alternatively, for building from source, simply run `make confix`. The binary will be located in `tools/confix`. ## Usage @@ -120,6 +115,18 @@ simd config diff v0.47 # gets the diff between defaultHome/config/app.toml and t confix diff v0.47 ~/.simapp/config/app.toml # gets the diff between ~/.simapp/config/app.toml and the latest v0.47 config ``` +### View + +View a configuration file, e.g: + +```shell +simd config view client # views the current app client config +``` + +```shell +confix view ~/.simapp/config/client.toml # views the current app client conf +``` + ### Maintainer At each SDK modification of the default configuration, add the default SDK config under `data/v0.XX-app.toml`. diff --git a/tools/confix/cmd/condiff/main.go b/tools/confix/cmd/condiff/main.go index 19fb2769dfb5..5e364d448a09 100644 --- a/tools/confix/cmd/condiff/main.go +++ b/tools/confix/cmd/condiff/main.go @@ -3,8 +3,9 @@ package main import ( "os" - "cosmossdk.io/tools/confix" "github.com/spf13/cobra" + + "cosmossdk.io/tools/confix" ) func main() { diff --git a/tools/confix/cmd/config.go b/tools/confix/cmd/config.go index 8ee2e371a992..3b3196aabfa1 100644 --- a/tools/confix/cmd/config.go +++ b/tools/confix/cmd/config.go @@ -4,7 +4,7 @@ import ( "github.com/spf13/cobra" ) -// ConfigComamnd contains all the confix commands +// ConfigCommand contains all the confix commands // These command can be used to interactively update an application config value. func ConfigCommand() *cobra.Command { cmd := &cobra.Command{ @@ -17,6 +17,7 @@ func ConfigCommand() *cobra.Command { DiffCommand(), GetCommand(), SetCommand(), + ViewCommand(), HomeCommand(), ) diff --git a/tools/confix/cmd/diff.go b/tools/confix/cmd/diff.go index 4dc86dbf16b1..237ae51b605b 100644 --- a/tools/confix/cmd/diff.go +++ b/tools/confix/cmd/diff.go @@ -3,10 +3,12 @@ package cmd import ( "fmt" - "cosmossdk.io/tools/confix" - "github.com/cosmos/cosmos-sdk/client" "github.com/spf13/cobra" "golang.org/x/exp/maps" + + "cosmossdk.io/tools/confix" + + "github.com/cosmos/cosmos-sdk/client" ) func DiffCommand() *cobra.Command { diff --git a/tools/confix/cmd/home.go b/tools/confix/cmd/home.go index 21ecdb388498..1210303a1cc4 100644 --- a/tools/confix/cmd/home.go +++ b/tools/confix/cmd/home.go @@ -1,14 +1,16 @@ package cmd import ( - "github.com/cosmos/cosmos-sdk/client" "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/client" ) func HomeCommand() *cobra.Command { return &cobra.Command{ Use: "home", - Short: "Outputs the string being used as the home path. No home directory is set when using the tool standalone.", + Short: "Outputs the folder used as the binary home. No home directory is set when using the `confix` tool standalone.", + Long: `Outputs the folder used as the binary home. In order to change the home directory path, set the $APPD_HOME environment variable, or use the "--home" flag.`, Args: cobra.NoArgs, Run: func(cmd *cobra.Command, args []string) { clientCtx := client.GetClientContextFromCmd(cmd) diff --git a/tools/confix/cmd/migrate.go b/tools/confix/cmd/migrate.go index 18546b200f8a..8a92ce903a92 100644 --- a/tools/confix/cmd/migrate.go +++ b/tools/confix/cmd/migrate.go @@ -4,10 +4,12 @@ import ( "context" "fmt" - "cosmossdk.io/tools/confix" - "github.com/cosmos/cosmos-sdk/client" "github.com/spf13/cobra" "golang.org/x/exp/maps" + + "cosmossdk.io/tools/confix" + + "github.com/cosmos/cosmos-sdk/client" ) var ( diff --git a/tools/confix/cmd/migrate_test.go b/tools/confix/cmd/migrate_test.go index 344527c94d66..e16134106f61 100644 --- a/tools/confix/cmd/migrate_test.go +++ b/tools/confix/cmd/migrate_test.go @@ -5,10 +5,12 @@ import ( "strings" "testing" + "gotest.tools/v3/assert" + "cosmossdk.io/tools/confix/cmd" + "github.com/cosmos/cosmos-sdk/client" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - "gotest.tools/v3/assert" ) func TestMigradeCmd(t *testing.T) { diff --git a/tools/confix/cmd/mutate.go b/tools/confix/cmd/mutate.go index cf3d37454026..6d42b3c6e35f 100644 --- a/tools/confix/cmd/mutate.go +++ b/tools/confix/cmd/mutate.go @@ -6,12 +6,13 @@ import ( "fmt" "strings" - "cosmossdk.io/tools/confix" "github.com/creachadair/tomledit" "github.com/creachadair/tomledit/parser" "github.com/creachadair/tomledit/transform" "github.com/spf13/cobra" + "cosmossdk.io/tools/confix" + "github.com/cosmos/cosmos-sdk/client" ) @@ -20,7 +21,7 @@ func SetCommand() *cobra.Command { cmd := &cobra.Command{ Use: "set [config] [key] [value]", Short: "Set an application config value", - Long: "Set an application config value. The [config] argument must be the path of the file when using the tool standalone, otherwise it must be the name of the config file without the .toml extension.", + Long: "Set an application config value. The [config] argument must be the path of the file when using the `confix` tool standalone, otherwise it must be the name of the config file without the .toml extension.", Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) error { filename, inputValue := args[0], args[2] @@ -76,8 +77,8 @@ func SetCommand() *cobra.Command { } cmd.Flags().BoolVar(&FlagStdOut, "stdout", false, "print the updated config to stdout") - cmd.Flags().BoolVar(&FlagVerbose, "verbose", false, "log changes to stderr") - cmd.Flags().BoolVar(&FlagSkipValidate, "skip-validate", false, "skip configuration validation (allows to mutate unknown configurations)") + cmd.Flags().BoolVarP(&FlagVerbose, "verbose", "v", false, "log changes to stderr") + cmd.Flags().BoolVarP(&FlagSkipValidate, "skip-validate", "s", false, "skip configuration validation (allows to mutate unknown configurations)") return cmd } @@ -87,7 +88,7 @@ func GetCommand() *cobra.Command { cmd := &cobra.Command{ Use: "get [config] [key]", Short: "Get an application config value", - Long: "Get an application config value. The [config] argument must be the path of the file when using the too standalone, otherwise it must be the name of the config file without the .toml extension.", + Long: "Get an application config value. The [config] argument must be the path of the file when using the `confix` tool standalone, otherwise it must be the name of the config file without the .toml extension.", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { filename, key := args[0], args[1] diff --git a/tools/confix/cmd/mutate_test.go b/tools/confix/cmd/mutate_test.go index 214af6254959..377b1df86c67 100644 --- a/tools/confix/cmd/mutate_test.go +++ b/tools/confix/cmd/mutate_test.go @@ -6,11 +6,13 @@ import ( "strings" "testing" + "gotest.tools/v3/assert" + "cosmossdk.io/tools/confix/cmd" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - "gotest.tools/v3/assert" ) // initClientContext initiates client Context for tests diff --git a/tools/confix/cmd/view.go b/tools/confix/cmd/view.go new file mode 100644 index 000000000000..26c3b6a16fdd --- /dev/null +++ b/tools/confix/cmd/view.go @@ -0,0 +1,55 @@ +package cmd + +import ( + "encoding/json" + "fmt" + "os" + + "github.com/pelletier/go-toml/v2" + "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/client" +) + +func ViewCommand() *cobra.Command { + flagOutputFomat := "output-format" + + cmd := &cobra.Command{ + Use: "view [config]", + Short: "View the config file", + Long: "View the config file. The [config] argument must be the path of the file when using the `confix` tool standalone, otherwise it must be the name of the config file without the .toml extension.", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + filename := args[0] + + clientCtx := client.GetClientContextFromCmd(cmd) + if clientCtx.HomeDir != "" { + filename = fmt.Sprintf("%s/config/%s.toml", clientCtx.HomeDir, filename) + } + + file, err := os.ReadFile(filename) + if err != nil { + return err + } + + if format, _ := cmd.Flags().GetString(flagOutputFomat); format == "toml" { + cmd.Println(string(file)) + return nil + } + + var v interface{} + if err := toml.Unmarshal(file, &v); err != nil { + return fmt.Errorf("failed to decode config file: %w", err) + } + + e := json.NewEncoder(cmd.OutOrStdout()) + e.SetIndent("", " ") + return e.Encode(v) + }, + } + + // output flag + cmd.Flags().String(flagOutputFomat, "toml", "Output format (json|toml)") + + return cmd +} diff --git a/tools/confix/cmd/view_test.go b/tools/confix/cmd/view_test.go new file mode 100644 index 000000000000..c022af1576ed --- /dev/null +++ b/tools/confix/cmd/view_test.go @@ -0,0 +1,39 @@ +package cmd_test + +import ( + "fmt" + "os" + "strings" + "testing" + + "gotest.tools/v3/assert" + + "cosmossdk.io/tools/confix/cmd" + + "github.com/cosmos/cosmos-sdk/client" + clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" +) + +func TestViewCmd(t *testing.T) { + clientCtx, cleanup := initClientContext(t) + defer cleanup() + + _, err := clitestutil.ExecTestCLICmd(clientCtx, cmd.ViewCommand(), []string{"unexisting"}) + assert.ErrorContains(t, err, "no such file or directory") + + expectedCfg := fmt.Sprintf("%s/config/client.toml", clientCtx.HomeDir) + bz, err := os.ReadFile(expectedCfg) + assert.NilError(t, err) + + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd.ViewCommand(), []string{"client"}) + assert.NilError(t, err) + assert.DeepEqual(t, strings.TrimSpace(out.String()), strings.TrimSpace(string(bz))) + + out, err = clitestutil.ExecTestCLICmd(client.Context{}, cmd.ViewCommand(), []string{fmt.Sprintf("%s/config/client.toml", clientCtx.HomeDir)}) + assert.NilError(t, err) + assert.DeepEqual(t, strings.TrimSpace(out.String()), strings.TrimSpace(string(bz))) + + out, err = clitestutil.ExecTestCLICmd(clientCtx, cmd.ViewCommand(), []string{"client", "--output-format", "json"}) + assert.NilError(t, err) + assert.Assert(t, strings.Contains(out.String(), `"chain-id": "test-chain"`)) +} diff --git a/tools/confix/data/v0.45-app.toml b/tools/confix/data/v0.45-app.toml index e6f15079c8cd..b0f6dff8237f 100644 --- a/tools/confix/data/v0.45-app.toml +++ b/tools/confix/data/v0.45-app.toml @@ -99,8 +99,7 @@ prometheus-retention-time = 0 # # Example: # [["chain_id", "cosmoshub-1"]] -global-labels = [ -] +global-labels = [] ############################################################################### ### API Configuration ### @@ -208,7 +207,7 @@ streamers = [] [streamers] [streamers.file] -keys = ["*", ] +keys = ["*"] write_dir = "" prefix = "" @@ -221,10 +220,3 @@ stop-node-on-error = "true" # fsync specifies if call fsync after writing the files. fsync = "false" - -[wasm] -# This is the maximum sdk gas (wasm and storage) that we allow for any x/wasm "smart" queries -query_gas_limit = 300000 -# This is the number of wasm vm instances we keep cached in memory for speed-up -# Warning: this is currently unstable and may lead to crashes, best to keep for 0 unless testing locally -lru_size = 0 diff --git a/tools/confix/data/v0.46-app.toml b/tools/confix/data/v0.46-app.toml index 6dd5e64fbfeb..28a108751900 100644 --- a/tools/confix/data/v0.46-app.toml +++ b/tools/confix/data/v0.46-app.toml @@ -108,8 +108,7 @@ prometheus-retention-time = 0 # # Example: # [["chain_id", "cosmoshub-1"]] -global-labels = [ -] +global-labels = [] ############################################################################### ### API Configuration ### @@ -237,7 +236,7 @@ streamers = [] [streamers] [streamers.file] -keys = ["*", ] +keys = ["*"] write_dir = "" prefix = "" @@ -250,10 +249,3 @@ stop-node-on-error = "true" # fsync specifies if call fsync after writing the files. fsync = "false" - -[wasm] -# This is the maximum sdk gas (wasm and storage) that we allow for any x/wasm "smart" queries -query_gas_limit = 300000 -# This is the number of wasm vm instances we keep cached in memory for speed-up -# Warning: this is currently unstable and may lead to crashes, best to keep for 0 unless testing locally -lru_size = 0 diff --git a/tools/confix/data/v0.47-app.toml b/tools/confix/data/v0.47-app.toml index 6f26abc13c09..8bf5374f99b9 100644 --- a/tools/confix/data/v0.47-app.toml +++ b/tools/confix/data/v0.47-app.toml @@ -7,7 +7,7 @@ # The minimum gas prices a validator is willing to accept for processing a # transaction. A transaction's fees must meet the minimum of any denomination -# specified in this config (e.g. 0.25token1;0.0001token2). +# specified in this config (e.g. 0.25token1,0.0001token2). minimum-gas-prices = "0stake" # default: the last 362880 states are kept, pruning at 10 block intervals @@ -59,8 +59,7 @@ inter-block-cache = true # ["message.sender", "message.recipient"] index-events = [] -# IavlCacheSize set the size of the iavl tree cache. -# Default cache size is 50mb. +# IavlCacheSize set the size of the iavl tree cache (in number of nodes). iavl-cache-size = 781250 # IAVLDisableFastNode enables or disables the fast node feature of IAVL. @@ -73,8 +72,7 @@ iavl-lazy-loading = false # AppDBBackend defines the database backend type to use for the application and snapshots DBs. # An empty string indicates that a fallback will be used. -# First fallback is the deprecated compile-time types.DBBackend value. -# Second fallback (if the types.DBBackend also isn't set), is the db-backend value set in Tendermint's config.toml. +# The fallback is the db_backend value set in Tendermint's config.toml. app-db-backend = "" ############################################################################### @@ -108,8 +106,7 @@ prometheus-retention-time = 0 # # Example: # [["chain_id", "cosmoshub-1"]] -global-labels = [ -] +global-labels = [] ############################################################################### ### API Configuration ### @@ -141,6 +138,42 @@ rpc-max-body-bytes = 1000000 # EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk). enabled-unsafe-cors = false +############################################################################### +### Rosetta Configuration ### +############################################################################### + +[rosetta] + +# Enable defines if the Rosetta API server should be enabled. +enable = false + +# Address defines the Rosetta API server to listen on. +address = ":8080" + +# Network defines the name of the blockchain that will be returned by Rosetta. +blockchain = "app" + +# Network defines the name of the network that will be returned by Rosetta. +network = "network" + +# Retries defines the number of retries when connecting to the node before failing. +retries = 3 + +# Offline defines if Rosetta server should run in offline mode. +offline = false + +# EnableDefaultSuggestedFee defines if the server should suggest fee by default. +# If 'construction/medata' is called without gas limit and gas price, +# suggested fee based on gas-to-suggest and denom-to-suggest will be given. +enable-fee-suggestion = false + +# GasToSuggest defines gas limit when calculating the fee +gas-to-suggest = 200000 + +# DenomToSuggest defines the defult denom for fee suggestion. +# Price must be in minimum-gas-prices. +denom-to-suggest = "uatom" + ############################################################################### ### gRPC Configuration ### ############################################################################### @@ -201,7 +234,7 @@ streamers = [] [streamers] [streamers.file] -keys = ["*", ] +keys = ["*"] write_dir = "" prefix = "" @@ -226,11 +259,4 @@ fsync = "false" # # Note, this configuration only applies to SDK built-in app-side mempool # implementations. -max-txs = "5000" - -[wasm] -# This is the maximum sdk gas (wasm and storage) that we allow for any x/wasm "smart" queries -query_gas_limit = 300000 -# This is the number of wasm vm instances we keep cached in memory for speed-up -# Warning: this is currently unstable and may lead to crashes, best to keep for 0 unless testing locally -lru_size = 0 +max-txs = 5000 diff --git a/tools/confix/data/v0.48-app.toml b/tools/confix/data/v0.50-app.toml similarity index 91% rename from tools/confix/data/v0.48-app.toml rename to tools/confix/data/v0.50-app.toml index 4b997ab00cf8..32d9af06b90e 100644 --- a/tools/confix/data/v0.48-app.toml +++ b/tools/confix/data/v0.50-app.toml @@ -7,9 +7,13 @@ # The minimum gas prices a validator is willing to accept for processing a # transaction. A transaction's fees must meet the minimum of any denomination -# specified in this config (e.g. 0.25token1;0.0001token2). +# specified in this config (e.g. 0.25token1,0.0001token2). minimum-gas-prices = "0stake" +# The maximum gas a query coming over rest/grpc may consume. +# If this is set to zero, the query can consume an unbounded amount of gas. +query-gas-limit = "0" + # default: the last 362880 states are kept, pruning at 10 block intervals # nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) # everything: 2 latest states will be kept; pruning at 10 block intervals. @@ -66,14 +70,9 @@ iavl-cache-size = 781250 # Default is false. iavl-disable-fastnode = false -# IAVLLazyLoading enable/disable the lazy loading of iavl store. -# Default is false. -iavl-lazy-loading = false - # AppDBBackend defines the database backend type to use for the application and snapshots DBs. # An empty string indicates that a fallback will be used. -# First fallback is the deprecated compile-time types.DBBackend value. -# Second fallback (if the types.DBBackend also isn't set), is the db-backend value set in CometBFT's config.toml. +# The fallback is the db_backend value set in CometBFT's config.toml. app-db-backend = "" ############################################################################### @@ -107,8 +106,18 @@ prometheus-retention-time = 0 # # Example: # [["chain_id", "cosmoshub-1"]] -global-labels = [ -] +global-labels = [] + +# MetricsSink defines the type of metrics sink to use. +metrics-sink = "mem" + +# StatsdAddr defines the address of a statsd server to send metrics to. +# Only utilized if MetricsSink is set to "statsd" or "dogstatsd". +statsd-addr = "" + +# DatadogHostname defines the hostname to use when emitting metrics to +# Datadog. Only utilized if MetricsSink is set to "dogstatsd". +datadog-hostname = "" ############################################################################### ### API Configuration ### @@ -218,16 +227,9 @@ stop-node-on-err = true [mempool] # Setting max-txs to 0 will allow for a unbounded amount of transactions in the mempool. -# Setting max_txs to negative 1 (-1) will disable transactions from being inserted into the mempool. +# Setting max_txs to negative 1 (-1) will disable transactions from being inserted into the mempool (no-op mempool). # Setting max_txs to a positive number (> 0) will limit the number of transactions in the mempool, by the specified amount. # # Note, this configuration only applies to SDK built-in app-side mempool # implementations. -max-txs = "5000" - -[wasm] -# This is the maximum sdk gas (wasm and storage) that we allow for any x/wasm "smart" queries -query_gas_limit = 300000 -# This is the number of wasm vm instances we keep cached in memory for speed-up -# Warning: this is currently unstable and may lead to crashes, best to keep for 0 unless testing locally -lru_size = 0 \ No newline at end of file +max-txs = -1 diff --git a/tools/confix/diff.go b/tools/confix/diff.go index 9abc4cd87aff..6cb3ea048bdc 100644 --- a/tools/confix/diff.go +++ b/tools/confix/diff.go @@ -10,9 +10,11 @@ import ( "github.com/creachadair/tomledit/transform" ) +type DiffType string + const ( - Section = "S" - Mapping = "M" + Section DiffType = "S" + Mapping DiffType = "M" ) type KV struct { @@ -22,7 +24,7 @@ type KV struct { } type Diff struct { - Type string // "section" or "mapping" + Type DiffType Deleted bool KV KV @@ -41,7 +43,6 @@ func DiffKeys(lhs, rhs *tomledit.Document) []Diff { i, j := 0, 0 for i < len(lsec) && j < len(rsec) { switch { - case lsec[i].Name.Before(rsec[j].Name): diff = append(diff, Diff{Type: Section, Deleted: true, KV: KV{Key: lsec[i].Name.String()}}) for _, kv := range allKVs(lsec[i]) { diff --git a/tools/confix/go.mod b/tools/confix/go.mod index 426046d108f0..46b669bf38c9 100644 --- a/tools/confix/go.mod +++ b/tools/confix/go.mod @@ -1,162 +1,159 @@ module cosmossdk.io/tools/confix -go 1.20 +go 1.21 require ( - github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20230607182757-cfeb10287d61 + github.com/cosmos/cosmos-sdk v0.50.6 github.com/creachadair/atomicfile v0.3.1 github.com/creachadair/tomledit v0.0.24 - github.com/spf13/cobra v1.7.0 - github.com/spf13/viper v1.16.0 - golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 - gotest.tools/v3 v3.4.0 + github.com/pelletier/go-toml/v2 v2.2.2 + github.com/spf13/cobra v1.8.1 + github.com/spf13/viper v1.19.0 + golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 + gotest.tools/v3 v3.5.1 ) require ( - cosmossdk.io/api v0.4.2 // indirect - cosmossdk.io/collections v0.2.0 // indirect - cosmossdk.io/core v0.8.0 // indirect - cosmossdk.io/depinject v1.0.0-alpha.3 // indirect - cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741 // indirect - cosmossdk.io/log v1.1.0 // indirect - cosmossdk.io/math v1.0.1 // indirect - cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c // indirect - cosmossdk.io/x/tx v0.8.0 // indirect + cosmossdk.io/api v0.7.5 // indirect + cosmossdk.io/collections v0.4.0 // indirect + cosmossdk.io/core v0.11.0 // indirect + cosmossdk.io/depinject v1.0.0-alpha.4 // indirect + cosmossdk.io/errors v1.0.1 // indirect + cosmossdk.io/log v1.4.1 // indirect + cosmossdk.io/math v1.3.0 // indirect + cosmossdk.io/store v1.1.0 // indirect + cosmossdk.io/x/tx v0.13.4 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect + github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect - github.com/armon/go-metrics v0.4.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/cockroachdb/errors v1.9.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect + github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f // indirect - github.com/cockroachdb/redact v1.1.4 // indirect - github.com/cometbft/cometbft v0.38.0-rc1 // indirect - github.com/cometbft/cometbft-db v0.7.0 // indirect + github.com/cockroachdb/pebble v1.1.1 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/cometbft/cometbft v0.38.12 // indirect + github.com/cometbft/cometbft-db v0.11.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-db v1.0.0 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect + github.com/cosmos/cosmos-db v1.0.2 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/gogoproto v1.4.10 // indirect - github.com/cosmos/iavl v1.0.0-beta.2 // indirect - github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.13.0 // indirect + github.com/cosmos/gogoproto v1.7.0 // indirect + github.com/cosmos/iavl v1.1.2 // indirect + github.com/cosmos/ics23/go v0.11.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/danieljoos/wincred v1.1.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect - github.com/emicklei/dot v1.4.2 // indirect + github.com/dvsekhvalnov/jose2go v1.6.0 // indirect + github.com/emicklei/dot v1.6.1 // indirect github.com/fatih/color v1.15.0 // indirect - github.com/felixge/httpsnoop v1.0.2 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/getsentry/sentry-go v0.21.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.1.0 // indirect + github.com/golang/glog v1.2.0 // indirect github.com/golang/mock v1.6.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/mux v1.8.0 // indirect - github.com/gorilla/websocket v1.5.0 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-plugin v1.4.10 // indirect - github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect + github.com/hashicorp/go-metrics v0.5.3 // indirect + github.com/hashicorp/go-plugin v1.5.2 // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/huandu/skiplist v1.2.0 // indirect - github.com/iancoleman/strcase v0.2.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.16.5 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect - github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.0 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect - github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 // indirect + github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.15.1 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.20.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect - github.com/rs/cors v1.8.3 // indirect - github.com/rs/zerolog v1.29.1 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rs/cors v1.11.1 // indirect + github.com/rs/zerolog v1.33.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/cast v1.5.1 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/stretchr/testify v1.8.4 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/stretchr/testify v1.9.0 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tidwall/btree v1.6.0 // indirect - github.com/zondax/hid v0.9.1 // indirect - github.com/zondax/ledger-go v0.14.1 // indirect - go.etcd.io/bbolt v1.3.6 // indirect - golang.org/x/crypto v0.9.0 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect - google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect - google.golang.org/grpc v1.55.0 // indirect - google.golang.org/protobuf v1.30.0 // indirect + github.com/tidwall/btree v1.7.0 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect + go.etcd.io/bbolt v1.3.10 // indirect + go.uber.org/multierr v1.10.0 // indirect + golang.org/x/crypto v0.26.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.6 // indirect - pgregory.net/rapid v0.6.2 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + pgregory.net/rapid v1.1.0 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) - -// Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities. -// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 -// TODO investigate if we can outright delete this dependency, otherwise go install won't work :( -replace github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.0 - -replace github.com/cosmos/cosmos-sdk => ../../ diff --git a/tools/confix/go.sum b/tools/confix/go.sum index bdaf35b6dbbb..10578d2e1345 100644 --- a/tools/confix/go.sum +++ b/tools/confix/go.sum @@ -1,58 +1,23 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.4.2 h1:lQBMl4xINnMnBOR/tQLtjlDnR4exr4e6/SfHR8PILE0= -cosmossdk.io/api v0.4.2/go.mod h1:qrVgOp7DIeAXa+Tt5dDjOC47bZCDrwx8ZHxrmy7STNE= -cosmossdk.io/collections v0.2.0 h1:CgMfLtE16+qox3zBYrGh60i4yKV8SeExLnIdOS2sbQs= -cosmossdk.io/collections v0.2.0/go.mod h1:Oc1FK0vlmxJZsgUn9/o3ldE6zNyWKvobVzaLhWknZJE= -cosmossdk.io/core v0.8.0 h1:LcJnu52E1a8f8E317VfQ1xK/RZe+IuhMNQAjnDLh25M= -cosmossdk.io/core v0.8.0/go.mod h1:LF6VLOv2DdCiaHxYVmr0MZcZpaSM9ZgvyrQSYTeg6D0= -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.0.20230524212735-6cabb6aa5741 h1:BCRz06fvddw7cKGiEGDiSox3qMsjQ97f92K+PDZDHdc= -cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741/go.mod h1:TB05o6YXkZkzsc+6bZFAV5kZRBtoCU9tUkbeMIqEg0w= -cosmossdk.io/log v1.1.0 h1:v0ogPHYeTzPcBTcPR1A3j1hkei4pZama8kz8LKlCMv0= -cosmossdk.io/log v1.1.0/go.mod h1:6zjroETlcDs+mm62gd8Ig7mZ+N+fVOZS91V17H+M4N4= -cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c h1:A+FMPW9GtfcPBDQNtFeDFN27h1SAP6OVjnGgPLlYXmI= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c/go.mod h1:RbYGvXCbz8uNBCXrwS9Z8SyydeWi+W5x5MZ33muyzMw= -cosmossdk.io/x/tx v0.8.0 h1:gLiGRL/Fy7fs6dd0IX8jOf0PrVr56/SG6XVMGQjyvJU= -cosmossdk.io/x/tx v0.8.0/go.mod h1:T9uEumGNgKU61gJYRv1t3uzQwLnASpJGmSE229HM3xA= +cosmossdk.io/api v0.7.5 h1:eMPTReoNmGUm8DeiQL9DyM8sYDjEhWzL1+nLbI9DqtQ= +cosmossdk.io/api v0.7.5/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= +cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= +cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= +cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= +cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= +cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= +cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= +cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= +cosmossdk.io/store v1.1.0 h1:LnKwgYMc9BInn9PhpTFEQVbL9UK475G2H911CGGnWHk= +cosmossdk.io/store v1.1.0/go.mod h1:oZfW/4Fc/zYqu3JmQcQdUJ3fqu5vnYTn3LZFFy8P8ng= +cosmossdk.io/x/tx v0.13.4 h1:Eg0PbJgeO0gM8p5wx6xa0fKR7hIV6+8lC56UrsvSo0Y= +cosmossdk.io/x/tx v0.13.4/go.mod h1:BkFqrnGGgW50Y6cwTy+JvgAhiffbGEKW6KF9ufcDpvk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= @@ -60,30 +25,28 @@ github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMb github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= +github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -95,14 +58,11 @@ github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -111,15 +71,16 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.7.0 h1:YjAGVd3XmtK9ktAbX8Zg2g2PwLIMjGREZJHlV4j7NEo= -github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= -github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= -github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= +github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= +github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ= +github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c= +github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= -github.com/bufbuild/protocompile v0.5.1 h1:mixz5lJX4Hiz4FpqFREJHIXLfaLBntfaJv1h+/jS+Qg= -github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= -github.com/bytedance/sonic v1.8.0 h1:ea0Xadu+sHlu7x5O3gKhRpQ1IKiMrSiHttPF0ybECuA= -github.com/bytedance/sonic v1.8.0/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= +github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -130,21 +91,18 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA 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.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= +github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= @@ -152,27 +110,29 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= +github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f h1:qQW3qCVRpjYsV4YNaUOjm6YLeliAD2jpgex9+D9tqU4= -github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f/go.mod h1:TkdVsGYRqtULUppt2RbC+YaKtTHnHoWa2apfFrSKABw= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/redact v1.1.4 h1:Y0XrVI2FAyofNyGveodTN//qdpPtFKcKTeCBsK3AHAQ= -github.com/cockroachdb/redact v1.1.4/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= +github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/cometbft/cometbft v0.38.0-rc1 h1:ph6smlqX82aH+d72KuxDHqu29M7LyusSp/obfGsGX/w= -github.com/cometbft/cometbft v0.38.0-rc1/go.mod h1:5Jz0Z8YsHSf0ZaAqGvi/ifioSdVFPtEGrm8Y9T/993k= -github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= -github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= +github.com/cometbft/cometbft v0.38.12 h1:OWsLZN2KcSSFe8bet9xCn07VwhBnavPea3VyPnNq1bg= +github.com/cometbft/cometbft v0.38.12/go.mod h1:GPHp3/pehPqgX1930HmK1BpBLZPxB75v/dZg8Viwy+o= +github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= +github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/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= @@ -181,45 +141,46 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= -github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= -github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= -github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= +github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= +github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/cosmos-sdk v0.50.6 h1:efR3MsvMHX5sxS3be+hOobGk87IzlZbSpsI2x/Vw3hk= +github.com/cosmos/cosmos-sdk v0.50.6/go.mod h1:lVkRY6cdMJ0fG3gp8y4hFrsKZqF4z7y0M2UXFb9Yt40= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cosmos/iavl v1.0.0-beta.2 h1:XOsIM80Yyml/KifCXEYOy9tWCXwMAbLa91n6pReW07Y= -github.com/cosmos/iavl v1.0.0-beta.2/go.mod h1:EA97dJ07TBktRlG/iGzK6g1eCXNj1q3MGoFYkVzrwHE= -github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= -github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= -github.com/cosmos/ledger-cosmos-go v0.13.0 h1:ex0CvCxToSR7j5WjrghPu2Bu9sSXKikjnVvUryNnx4s= -github.com/cosmos/ledger-cosmos-go v0.13.0/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= +github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= +github.com/cosmos/iavl v1.1.2 h1:zL9FK7C4L/P4IF1Dm5fIwz0WXCnn7Bp1M2FxH0ayM7Y= +github.com/cosmos/iavl v1.1.2/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= +github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= +github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creachadair/atomicfile v0.3.1 h1:yQORkHjSYySh/tv5th1dkKcn02NEW5JleB84sjt+W4Q= github.com/creachadair/atomicfile v0.3.1/go.mod h1:mwfrkRxFKwpNAflYZzytbSwxvbK6fdGRRlp0KEQc0qU= github.com/creachadair/tomledit v0.0.24 h1:5Xjr25R2esu1rKCbQEmjZYlrhFkDspoAbAKb6QKQDhQ= github.com/creachadair/tomledit v0.0.24/go.mod h1:9qHbShRWQzSCcn617cMzg4eab1vbLCOjOshAWSzWr8U= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew 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/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= 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= @@ -230,66 +191,57 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUn 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/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= -github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= +github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/emicklei/dot v1.4.2 h1:UbK6gX4yvrpHKlxuUQicwoAis4zl8Dzwit9SnbBAXWw= -github.com/emicklei/dot v1.4.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= +github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -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/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= -github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= 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/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.21.0 h1:c9l5F1nPF30JIppulk4veau90PK6Smu3abgVtVQWon4= -github.com/getsentry/sentry-go v0.21.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.9.0 h1:OjyFBKICoexlu99ctXNR2gg+c5pKrKMuyjgARg9qeY8= -github.com/gin-gonic/gin v1.9.0/go.mod h1:W1Me9+hsUSyj3CePGrd1/QrKJMSJ1Tu/0hFEH89961k= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -304,14 +256,16 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= -github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= -github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= -github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= -github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU= -github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= +github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= +github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= 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= @@ -321,13 +275,11 @@ github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/goccy/go-json v0.10.0 h1:mXKd9Qw4NuzShiRlOXKews24ufknHO7gx30lsDyokKA= -github.com/goccy/go-json v0.10.0/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -338,22 +290,12 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV 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/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -361,7 +303,6 @@ github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= 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= @@ -373,13 +314,12 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 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/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -388,41 +328,22 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a 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.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= @@ -433,8 +354,8 @@ github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= @@ -455,10 +376,12 @@ github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVH github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= +github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v1.4.10 h1:xUbmA4jC6Dq163/fWcp8P3JuHilrHHMLNRxzGQJ9hNk= -github.com/hashicorp/go-plugin v1.4.10/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -470,8 +393,10 @@ github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -488,24 +413,17 @@ github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0Jr github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= -github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= @@ -518,87 +436,60 @@ github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= 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.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= -github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid v1.2.1 h1:vJi+O/nMdFt0vqm8NZBI6wzALWdA2X+egi0ogNyrC/w= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= -github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.0 h1:H4L/LhP7GOMf1j17oQAElHgVlbEje2h14A8Tz9cM2BE= -github.com/linxGnu/grocksdb v1.8.0/go.mod h1:09CeBborffXhXdNpEcOeZrLKEnRtrZFEpFdPNI9Zjjg= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= +github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= @@ -621,9 +512,10 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -639,8 +531,8 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA 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/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce h1:/pEpMk55wH0X+E5zedGEMOdLuWmV8P4+4W3+LZaM6kg= -github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= @@ -648,7 +540,6 @@ github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DV 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.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= @@ -660,10 +551,14 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -673,19 +568,19 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 h1:W04oB3d0J01W5jgYRGKsV8LCM6g9EkCvPkZcmFuy0OE= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= @@ -696,9 +591,9 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -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/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -706,103 +601,102 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/prometheus/client_golang v1.20.1 h1:IMJXHOD6eARkQpxo8KkhgEVFlBNm+nkrFUyGlIu7Na8= +github.com/prometheus/client_golang v1.20.1/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= -github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= 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/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= 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.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= 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= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= +github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/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/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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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= @@ -812,69 +706,43 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= -github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= -github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.9 h1:rmenucSohSTiyL09Y+l2OCk+FrMxGMzho2+tjr5ticU= -github.com/ugorji/go/codec v1.2.9/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= -github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= -github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/bbolt v1.3.10 h1:+BqfJTcCzTItrop8mq/lbzL8wSGtj94UO/3U31shqG0= +go.etcd.io/bbolt v1.3.10/go.mod h1:bK3UQLPJZly7IlNmV7uVHJDxfe5aK9Ll93e/74Y9oEQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -884,70 +752,44 @@ go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -golang.org/x/arch v0.0.0-20210923205945-b76863e36670 h1:18EFjUmQOcUvxNYSkA6jO9VAiXCnxFY6NyDX0bHDmkU= -golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= 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= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 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/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -959,73 +801,37 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/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-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/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-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1037,17 +843,12 @@ golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1056,263 +857,120 @@ golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/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-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-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 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.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -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= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= 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= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 h1:x1vNwUhVOcsYoKyEGCZBH694SBmmBjA2EfauFVEI2+M= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a h1:HiYVD+FGJkTo+9zj1gqz0anapsa1JxjiSrN+BJKyUmE= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 h1:rIo7ocm2roD9DcFIX67Ym8icoGCKSARAiPljFhh5suQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2/go.mod h1:O1cOfN1Cy6QEYr7VxtjOyP5AdAuR0aJ/MYZaaof623Y= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= @@ -1327,8 +985,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1340,10 +998,8 @@ gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= @@ -1358,30 +1014,21 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -pgregory.net/rapid v0.6.2 h1:ErW5sL+UKtfBfUTsWHDCoeB+eZKLKMxrSd1VJY6W4bw= -pgregory.net/rapid v0.6.2/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/tools/confix/migrations.go b/tools/confix/migrations.go index 254fb9fa2dc4..01c14ca8a148 100644 --- a/tools/confix/migrations.go +++ b/tools/confix/migrations.go @@ -19,20 +19,28 @@ const ( // MigrationMap defines a mapping from a version to a transformation plan. type MigrationMap map[string]func(from *tomledit.Document, to string) transform.Plan +// loadDestConfigFile is the function signature to load the destination version +// configuration toml file. +type loadDestConfigFile func(to string) (*tomledit.Document, error) + var Migrations = MigrationMap{ "v0.45": NoPlan, // Confix supports only the current supported SDK version. So we do not support v0.44 -> v0.45. - "v0.46": PlanBuilder, - "v0.47": PlanBuilder, - "v0.50": PlanBuilder, + "v0.46": defaultPlanBuilder, + "v0.47": defaultPlanBuilder, + "v0.50": defaultPlanBuilder, // "v0.xx.x": PlanBuilder, // add specific migration in case of configuration changes in minor versions } +func defaultPlanBuilder(from *tomledit.Document, to string) transform.Plan { + return PlanBuilder(from, to, LoadLocalConfig) +} + // PlanBuilder is a function that returns a transformation plan for a given diff between two files. -func PlanBuilder(from *tomledit.Document, to string) transform.Plan { +func PlanBuilder(from *tomledit.Document, to string, loadFn loadDestConfigFile) transform.Plan { plan := transform.Plan{} deletedSections := map[string]bool{} - target, err := LoadLocalConfig(to) + target, err := loadFn(to) if err != nil { panic(fmt.Errorf("failed to parse file: %w. This file should have been valid", err)) } @@ -51,12 +59,13 @@ func PlanBuilder(from *tomledit.Document, to string) transform.Plan { step = transform.Step{ Desc: fmt.Sprintf("add %s section", kv.Key), T: transform.Func(func(_ context.Context, doc *tomledit.Document) error { + title := fmt.Sprintf("### %s Configuration ###", strings.Title(kv.Key)) doc.Sections = append(doc.Sections, &tomledit.Section{ Heading: &parser.Heading{ Block: parser.Comments{ - "###############################################################################", - fmt.Sprintf("### %s Configuration ###", strings.Title(kv.Key)), - "###############################################################################", + strings.Repeat("#", len(title)), + title, + strings.Repeat("#", len(title)), }, Name: keys, }, @@ -77,9 +86,9 @@ func PlanBuilder(from *tomledit.Document, to string) transform.Plan { } else if len(keys) > 1 { step = transform.Step{ Desc: fmt.Sprintf("add %s key", kv.Key), - T: transform.EnsureKey(parser.Key{keys[0]}, &parser.KeyValue{ + T: transform.EnsureKey(keys[0:len(keys)-1], &parser.KeyValue{ Block: kv.Block, - Name: parser.Key{keys[1]}, + Name: parser.Key{keys[len(keys)-1]}, Value: parser.MustValue(kv.Value), }), } @@ -90,16 +99,20 @@ func PlanBuilder(from *tomledit.Document, to string) transform.Plan { } else { if diff.Type == Section { deletedSections[kv.Key] = true - } - - // when the whole section is deleted we don't need to remove the keys - if len(keys) > 1 && deletedSections[keys[0]] { - continue - } + step = transform.Step{ + Desc: fmt.Sprintf("remove %s section", kv.Key), + T: transform.Remove(keys), + } + } else { + // when the whole section is deleted we don't need to remove the keys + if len(keys) > 1 && deletedSections[keys[0]] { + continue + } - step = transform.Step{ - Desc: fmt.Sprintf("remove %s key", kv.Key), - T: transform.Remove(keys), + step = transform.Step{ + Desc: fmt.Sprintf("remove %s key", kv.Key), + T: transform.Remove(keys), + } } } diff --git a/tools/confix/upgrade.go b/tools/confix/upgrade.go index 203410d163e5..1c01d6fbc22e 100644 --- a/tools/confix/upgrade.go +++ b/tools/confix/upgrade.go @@ -83,7 +83,7 @@ func CheckValid(fileName string, data []byte) error { } if err := cfg.ValidateBasic(); err != nil { - return fmt.Errorf("server config invalid : %w", err) + return fmt.Errorf("server config invalid: %w", err) } case strings.HasSuffix(fileName, ClientConfig): var cfg clientcfg.ClientConfig diff --git a/tools/confix/upgrade_test.go b/tools/confix/upgrade_test.go index 557345469cb0..e3f8f094ec34 100644 --- a/tools/confix/upgrade_test.go +++ b/tools/confix/upgrade_test.go @@ -4,8 +4,9 @@ import ( "os" "testing" - "cosmossdk.io/tools/confix" "gotest.tools/v3/assert" + + "cosmossdk.io/tools/confix" ) func mustReadConfig(t *testing.T, path string) []byte { @@ -17,10 +18,6 @@ func mustReadConfig(t *testing.T, path string) []byte { return f } -func TestUpgrade(t *testing.T) { - // TODO: add more test cases -} - func TestCheckValid(t *testing.T) { err := confix.CheckValid("foo", []byte{}) assert.ErrorContains(t, err, "unknown config") diff --git a/tools/cosmovisor/README.md b/tools/cosmovisor/README.md index be2aded5dbaf..ffd6d83c432a 100644 --- a/tools/cosmovisor/README.md +++ b/tools/cosmovisor/README.md @@ -4,22 +4,24 @@ sidebar_position: 1 # Cosmovisor -`cosmovisor` is a small process manager for Cosmos SDK application binaries that monitors the governance module for incoming chain upgrade proposals. If it sees a proposal that gets approved, `cosmovisor` can automatically download the new binary, stop the current binary, switch from the old binary to the new one, and finally restart the node with the new binary. +`cosmovisor` is a process manager for Cosmos SDK application binaries that automates application binary switch at chain upgrades. +It polls the `upgrade-info.json` file that is created by the x/upgrade module at upgrade height, and then can automatically download the new binary, stop the current binary, switch from the old binary to the new one, and finally restart the node with the new binary. -* [Design](#design) -* [Contributing](#contributing) -* [Setup](#setup) +* [Cosmovisor](#cosmovisor) + * [Design](#design) + * [Contributing](#contributing) + * [Setup](#setup) * [Installation](#installation) * [Command Line Arguments And Environment Variables](#command-line-arguments-and-environment-variables) * [Folder Layout](#folder-layout) -* [Usage](#usage) + * [Usage](#usage) * [Initialization](#initialization) * [Detecting Upgrades](#detecting-upgrades) * [Auto-Download](#auto-download) -* [Example: SimApp Upgrade](#example-simapp-upgrade) + * [Example: SimApp Upgrade](#example-simapp-upgrade) * [Chain Setup](#chain-setup) - * [Prepare Cosmovisor and Start the Chain](#prepare-cosmovisor-and-start-the-chain) - * [Update App](#update-app) + * [Prepare Cosmovisor and Start the Chain](#prepare-cosmovisor-and-start-the-chain) + * [Update App](#update-app) ## Design @@ -32,7 +34,13 @@ Cosmovisor is designed to be used as a wrapper for a `Cosmos SDK` app: *Note: If new versions of the application are not set up to run in-place store migrations, migrations will need to be run manually before restarting `cosmovisor` with the new binary. For this reason, we recommend applications adopt in-place store migrations.* -*Note: If validators would like to enable the auto-download option (which [we don't recommend](#auto-download)), and they are currently running an application using Cosmos SDK `v0.42`, they will need to use Cosmovisor [`v0.1`](https://github.com/cosmos/cosmos-sdk/releases/tag/cosmovisor%2Fv0.1.0). Later versions of Cosmovisor do not support Cosmos SDK `v0.44.3` or earlier if the auto-download option is enabled.* +:::tip +Only the lastest version of cosmovisor is actively developed/maintained. +::: + +:::warning +Versions prior to v1.0.0 have a vulnerability that could lead to a DOS. Please upgrade to the latest version. +::: ## Contributing @@ -114,10 +122,10 @@ Use of `cosmovisor` without one of the action arguments is deprecated. For backw The `cosmovisor/` directory incudes a subdirectory for each version of the application (i.e. `genesis` or `upgrades/`). Within each subdirectory is the application binary (i.e. `bin/$DAEMON_NAME`) and any additional auxiliary files associated with each binary. `current` is a symbolic link to the currently active directory (i.e. `genesis` or `upgrades/`). The `name` variable in `upgrades/` is the lowercased URI-encoded name of the upgrade as specified in the upgrade module plan. Note that the upgrade name path are normalized to be lowercased: for instance, `MyUpgrade` is normalized to `myupgrade`, and its path is `upgrades/myupgrade`. -Please note that `$DAEMON_HOME/cosmovisor` only stores the *application binaries*. The `cosmovisor` binary itself can be stored in any typical location (e.g. `/usr/local/bin`). The application will continue to store its data in the default data directory (e.g. `$HOME/.gaiad`) or the data directory specified with the `--home` flag. `$DAEMON_HOME` is independent of the data directory and can be set to any location. If you set `$DAEMON_HOME` to the same directory as the data directory, you will end up with a configuation like the following: +Please note that `$DAEMON_HOME/cosmovisor` only stores the *application binaries*. The `cosmovisor` binary itself can be stored in any typical location (e.g. `/usr/local/bin`). The application will continue to store its data in the default data directory (e.g. `$HOME/.simapp`) or the data directory specified with the `--home` flag. `$DAEMON_HOME` is independent of the data directory and can be set to any location. If you set `$DAEMON_HOME` to the same directory as the data directory, you will end up with a configuation like the following: ```text -.gaiad +.simapp ├── config ├── data └── cosmovisor @@ -267,8 +275,6 @@ Set up app config: Initialize the node and overwrite any previous genesis file (never do this in a production environment): - - ```shell ./build/simd init test --chain-id test --overwrite ``` @@ -334,7 +340,13 @@ Build the new version `simd` binary: make build ``` -Create the folder for the upgrade binary and copy the `simd` binary: +Add the new `simd` binary and the upgrade name: + +:::warning + +The migration name must match the one defined in the migration plan. + +::: ```shell mkdir -p $DAEMON_HOME/cosmovisor/upgrades/test1/bin diff --git a/tools/cosmovisor/cmd/cosmovisor/add_upgrade.go b/tools/cosmovisor/cmd/cosmovisor/add_upgrade.go index a7b90eb0dc0a..ea2d6d396b71 100644 --- a/tools/cosmovisor/cmd/cosmovisor/add_upgrade.go +++ b/tools/cosmovisor/cmd/cosmovisor/add_upgrade.go @@ -5,10 +5,11 @@ import ( "os" "path" - "cosmossdk.io/log" - "cosmossdk.io/tools/cosmovisor" "github.com/rs/zerolog" "github.com/spf13/cobra" + + "cosmossdk.io/log" + "cosmossdk.io/tools/cosmovisor" ) func NewAddUpgradeCmd() *cobra.Command { diff --git a/tools/cosmovisor/cmd/cosmovisor/config.go b/tools/cosmovisor/cmd/cosmovisor/config.go index c6ef7af28a82..927e005ebf6a 100644 --- a/tools/cosmovisor/cmd/cosmovisor/config.go +++ b/tools/cosmovisor/cmd/cosmovisor/config.go @@ -1,8 +1,9 @@ package main import ( - "cosmossdk.io/tools/cosmovisor" "github.com/spf13/cobra" + + "cosmossdk.io/tools/cosmovisor" ) var configCmd = &cobra.Command{ diff --git a/tools/cosmovisor/cmd/cosmovisor/run.go b/tools/cosmovisor/cmd/cosmovisor/run.go index fe300d58fa62..bce2b944780f 100644 --- a/tools/cosmovisor/cmd/cosmovisor/run.go +++ b/tools/cosmovisor/cmd/cosmovisor/run.go @@ -1,10 +1,11 @@ package main import ( - "cosmossdk.io/log" - "cosmossdk.io/tools/cosmovisor" "github.com/rs/zerolog" "github.com/spf13/cobra" + + "cosmossdk.io/log" + "cosmossdk.io/tools/cosmovisor" ) var runCmd = &cobra.Command{ diff --git a/tools/cosmovisor/cmd/cosmovisor/version.go b/tools/cosmovisor/cmd/cosmovisor/version.go index a1c8e1bcb3c9..9605a5cce873 100644 --- a/tools/cosmovisor/cmd/cosmovisor/version.go +++ b/tools/cosmovisor/cmd/cosmovisor/version.go @@ -6,8 +6,9 @@ import ( "runtime/debug" "strings" - "cosmossdk.io/tools/cosmovisor" "github.com/spf13/cobra" + + "cosmossdk.io/tools/cosmovisor" ) func NewVersionCmd() *cobra.Command { diff --git a/tools/cosmovisor/cmd/cosmovisor/version_test.go b/tools/cosmovisor/cmd/cosmovisor/version_test.go index 0a7d9e586846..8f51ea47dafb 100644 --- a/tools/cosmovisor/cmd/cosmovisor/version_test.go +++ b/tools/cosmovisor/cmd/cosmovisor/version_test.go @@ -5,8 +5,9 @@ import ( "context" "testing" - "cosmossdk.io/log" "github.com/stretchr/testify/require" + + "cosmossdk.io/log" ) func TestVersionCommand_Error(t *testing.T) { diff --git a/tools/cosmovisor/go.mod b/tools/cosmovisor/go.mod index 3decf8853b88..e795b7a85c8f 100644 --- a/tools/cosmovisor/go.mod +++ b/tools/cosmovisor/go.mod @@ -1,30 +1,30 @@ module cosmossdk.io/tools/cosmovisor -go 1.20 +go 1.21 require ( - cosmossdk.io/log v1.1.0 - cosmossdk.io/x/upgrade v0.0.0-20230607190716-2877190997a2 + cosmossdk.io/log v1.4.1 + cosmossdk.io/x/upgrade v0.0.0-20230614103911-b3da8bb4e801 github.com/otiai10/copy v1.11.0 - github.com/rs/zerolog v1.29.1 - github.com/spf13/cobra v1.7.0 - github.com/stretchr/testify v1.8.4 + github.com/rs/zerolog v1.33.0 + github.com/spf13/cobra v1.8.0 + github.com/stretchr/testify v1.9.0 ) require ( - cloud.google.com/go v0.110.0 // indirect - cloud.google.com/go/compute v1.19.0 // indirect + cloud.google.com/go v0.112.0 // indirect + cloud.google.com/go/compute v1.24.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v0.13.0 // indirect - cloud.google.com/go/storage v1.30.0 // indirect - cosmossdk.io/api v0.4.2 // indirect - cosmossdk.io/collections v0.2.0 // indirect - cosmossdk.io/core v0.8.0 // indirect - cosmossdk.io/depinject v1.0.0-alpha.3 // indirect - cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741 // indirect - cosmossdk.io/math v1.0.1 // indirect - cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c // indirect - cosmossdk.io/x/tx v0.8.0 // indirect + cloud.google.com/go/iam v1.1.6 // indirect + cloud.google.com/go/storage v1.36.0 // indirect + cosmossdk.io/api v0.7.5 // indirect + cosmossdk.io/collections v0.4.0 // indirect + cosmossdk.io/core v0.11.0 // indirect + cosmossdk.io/depinject v1.0.0-alpha.4 // indirect + cosmossdk.io/errors v1.0.1 // indirect + cosmossdk.io/math v1.3.0 // indirect + cosmossdk.io/store v1.0.0 // indirect + cosmossdk.io/x/tx v0.13.4 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect @@ -38,24 +38,25 @@ require ( github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/cockroachdb/errors v1.9.1 // indirect + github.com/cockroachdb/errors v1.11.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f // indirect - github.com/cockroachdb/redact v1.1.4 // indirect - github.com/cometbft/cometbft v0.38.0-rc1 // indirect - github.com/cometbft/cometbft-db v0.7.0 // indirect + github.com/cockroachdb/pebble v1.1.0 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/cometbft/cometbft v0.38.11 // indirect + github.com/cometbft/cometbft-db v0.9.1 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-db v1.0.0 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect - github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20230607182757-cfeb10287d61 // indirect + github.com/cosmos/cosmos-db v1.0.2 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect + github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20230614103911-b3da8bb4e801 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/gogoproto v1.4.10 // indirect - github.com/cosmos/iavl v1.0.0-beta.2 // indirect - github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.13.0 // indirect + github.com/cosmos/gogoproto v1.7.0 // indirect + github.com/cosmos/iavl v1.0.1 // indirect + github.com/cosmos/ics23/go v0.11.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/danieljoos/wincred v1.1.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect @@ -63,27 +64,29 @@ require ( github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.5.0 // indirect - github.com/emicklei/dot v1.4.2 // indirect + github.com/emicklei/dot v1.6.1 // indirect github.com/fatih/color v1.15.0 // indirect - github.com/felixge/httpsnoop v1.0.2 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/getsentry/sentry-go v0.21.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.1.0 // indirect + github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect - github.com/google/s2a-go v0.1.3 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect - github.com/googleapis/gax-go/v2 v2.8.0 // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/google/s2a-go v0.1.7 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect + github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/mux v1.8.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect @@ -94,81 +97,87 @@ require ( github.com/hashicorp/go-getter v1.7.1 // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-plugin v1.4.10 // indirect + github.com/hashicorp/go-metrics v0.5.1 // indirect + github.com/hashicorp/go-plugin v1.5.2 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/huandu/skiplist v1.2.0 // indirect - github.com/iancoleman/strcase v0.2.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.16.5 // indirect + github.com/klauspost/compress v1.17.7 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.0 // indirect + github.com/linxGnu/grocksdb v1.8.12 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect - github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 // indirect + github.com/pelletier/go-toml/v2 v2.1.0 // indirect + github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.15.1 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.18.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.47.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/cors v1.8.3 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/cast v1.5.1 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.16.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/spf13/viper v1.18.2 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tidwall/btree v1.6.0 // indirect + github.com/tidwall/btree v1.7.0 // indirect github.com/ulikunitz/xz v0.5.11 // indirect - github.com/zondax/hid v0.9.1 // indirect - github.com/zondax/ledger-go v0.14.1 // indirect - go.etcd.io/bbolt v1.3.6 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect + go.etcd.io/bbolt v1.3.8 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/crypto v0.9.0 // indirect - golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/oauth2 v0.8.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect - golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/api v0.122.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect - google.golang.org/grpc v1.55.0 // indirect - google.golang.org/protobuf v1.30.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect + go.opentelemetry.io/otel v1.22.0 // indirect + go.opentelemetry.io/otel/metric v1.22.0 // indirect + go.opentelemetry.io/otel/trace v1.22.0 // indirect + go.uber.org/multierr v1.10.0 // indirect + golang.org/x/crypto v0.26.0 // indirect + golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/oauth2 v0.17.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect + golang.org/x/time v0.5.0 // indirect + google.golang.org/api v0.162.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - gotest.tools/v3 v3.4.0 // indirect + gotest.tools/v3 v3.5.1 // indirect nhooyr.io/websocket v1.8.6 // indirect - pgregory.net/rapid v0.6.2 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + pgregory.net/rapid v1.1.0 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/tools/cosmovisor/go.sum b/tools/cosmovisor/go.sum index 8501adc4b5a9..dfb946ff5c66 100644 --- a/tools/cosmovisor/go.sum +++ b/tools/cosmovisor/go.sum @@ -3,7 +3,6 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -16,7 +15,6 @@ cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOY cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= @@ -32,8 +30,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= -cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= +cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= +cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -70,8 +68,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.19.0 h1:+9zda3WGgW1ZSTlVppLCYFIr48Pa35q1uG2N1itbCEQ= -cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= +cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= +cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= @@ -111,13 +109,12 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v0.13.0 h1:+CmB+K0J/33d0zSQ9SlFWUeCCEn5XJA0ZMZ3pHE9u8k= -cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= +cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= +cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= -cloud.google.com/go/longrunning v0.4.1 h1:v+yFJOfKC3yZdY6ZUI933pIYdhyhV8S3NpWrXWmg7jM= cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= @@ -171,12 +168,11 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.30.0 h1:g1yrbxAWOrvg/594228pETWkOi00MLTrOWfh56veU5o= -cloud.google.com/go/storage v1.30.0/go.mod h1:xAVretHSROm1BQX4IIsoVgJqw0LqOyX+I/O2GzRAzdE= +cloud.google.com/go/storage v1.36.0 h1:P0mOkAcaJxhCTvAkMhxMfrTKiNcub4YmmPBtlhAyTr8= +cloud.google.com/go/storage v1.36.0/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= @@ -188,26 +184,26 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.4.2 h1:lQBMl4xINnMnBOR/tQLtjlDnR4exr4e6/SfHR8PILE0= -cosmossdk.io/api v0.4.2/go.mod h1:qrVgOp7DIeAXa+Tt5dDjOC47bZCDrwx8ZHxrmy7STNE= -cosmossdk.io/collections v0.2.0 h1:CgMfLtE16+qox3zBYrGh60i4yKV8SeExLnIdOS2sbQs= -cosmossdk.io/collections v0.2.0/go.mod h1:Oc1FK0vlmxJZsgUn9/o3ldE6zNyWKvobVzaLhWknZJE= -cosmossdk.io/core v0.8.0 h1:LcJnu52E1a8f8E317VfQ1xK/RZe+IuhMNQAjnDLh25M= -cosmossdk.io/core v0.8.0/go.mod h1:LF6VLOv2DdCiaHxYVmr0MZcZpaSM9ZgvyrQSYTeg6D0= -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.0.20230524212735-6cabb6aa5741 h1:BCRz06fvddw7cKGiEGDiSox3qMsjQ97f92K+PDZDHdc= -cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741/go.mod h1:TB05o6YXkZkzsc+6bZFAV5kZRBtoCU9tUkbeMIqEg0w= -cosmossdk.io/log v1.1.0 h1:v0ogPHYeTzPcBTcPR1A3j1hkei4pZama8kz8LKlCMv0= -cosmossdk.io/log v1.1.0/go.mod h1:6zjroETlcDs+mm62gd8Ig7mZ+N+fVOZS91V17H+M4N4= -cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c h1:A+FMPW9GtfcPBDQNtFeDFN27h1SAP6OVjnGgPLlYXmI= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c/go.mod h1:RbYGvXCbz8uNBCXrwS9Z8SyydeWi+W5x5MZ33muyzMw= -cosmossdk.io/x/tx v0.8.0 h1:gLiGRL/Fy7fs6dd0IX8jOf0PrVr56/SG6XVMGQjyvJU= -cosmossdk.io/x/tx v0.8.0/go.mod h1:T9uEumGNgKU61gJYRv1t3uzQwLnASpJGmSE229HM3xA= -cosmossdk.io/x/upgrade v0.0.0-20230607190716-2877190997a2 h1:84kBxTNfeRkBUhzhiuZdo5uym9B+wffX8ehRpOREucA= -cosmossdk.io/x/upgrade v0.0.0-20230607190716-2877190997a2/go.mod h1:CTz9FMom9siXKVeb9PKhexmqlixRH2xtXfxIuCWqMIM= +cosmossdk.io/api v0.7.5 h1:eMPTReoNmGUm8DeiQL9DyM8sYDjEhWzL1+nLbI9DqtQ= +cosmossdk.io/api v0.7.5/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= +cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= +cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= +cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= +cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= +cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= +cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= +cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= +cosmossdk.io/store v1.0.0 h1:6tnPgTpTSIskaTmw/4s5C9FARdgFflycIc9OX8i1tOI= +cosmossdk.io/store v1.0.0/go.mod h1:ABMprwjvx6IpMp8l06TwuMrj6694/QP5NIW+X6jaTYc= +cosmossdk.io/x/tx v0.13.4 h1:Eg0PbJgeO0gM8p5wx6xa0fKR7hIV6+8lC56UrsvSo0Y= +cosmossdk.io/x/tx v0.13.4/go.mod h1:BkFqrnGGgW50Y6cwTy+JvgAhiffbGEKW6KF9ufcDpvk= +cosmossdk.io/x/upgrade v0.0.0-20230614103911-b3da8bb4e801 h1:U0jO59nMqMh3/19ktMy0gCd050k7svcrGJG9Vdrri20= +cosmossdk.io/x/upgrade v0.0.0-20230614103911-b3da8bb4e801/go.mod h1:Nqm1dOl9yTTtG+uibprZTQp50rW+pd+XjAYGVQ5+Ojc= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= @@ -215,26 +211,19 @@ github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMb github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -256,7 +245,6 @@ github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX github.com/aws/aws-sdk-go v1.44.224 h1:09CiaaF35nRmxrzWZ2uRq5v6Ghg/d2RiPjZnSgtt+RQ= github.com/aws/aws-sdk-go v1.44.224/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -267,12 +255,16 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.7.0 h1:YjAGVd3XmtK9ktAbX8Zg2g2PwLIMjGREZJHlV4j7NEo= +github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= +github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= +github.com/btcsuite/btcd/btcutil v1.1.3/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/bufbuild/protocompile v0.5.1 h1:mixz5lJX4Hiz4FpqFREJHIXLfaLBntfaJv1h+/jS+Qg= +github.com/bufbuild/protocompile v0.5.1/go.mod h1:G5iLmavmF4NsYtpZFvE3B/zFch2GIY8+wjsYLR/lc40= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= @@ -288,6 +280,7 @@ github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXH github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= +github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= @@ -302,26 +295,26 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZazG8= +github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f h1:qQW3qCVRpjYsV4YNaUOjm6YLeliAD2jpgex9+D9tqU4= -github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f/go.mod h1:TkdVsGYRqtULUppt2RbC+YaKtTHnHoWa2apfFrSKABw= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/redact v1.1.4 h1:Y0XrVI2FAyofNyGveodTN//qdpPtFKcKTeCBsK3AHAQ= -github.com/cockroachdb/redact v1.1.4/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/pebble v1.1.0 h1:pcFh8CdCIt2kmEpK0OIatq67Ln9uGDYY3d5XnE0LJG4= +github.com/cockroachdb/pebble v1.1.0/go.mod h1:sEHm5NOXxyiAoKWhoFxT8xMgd/f3RA6qUqQ1BXKrh2E= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/cometbft/cometbft v0.38.0-rc1 h1:ph6smlqX82aH+d72KuxDHqu29M7LyusSp/obfGsGX/w= -github.com/cometbft/cometbft v0.38.0-rc1/go.mod h1:5Jz0Z8YsHSf0ZaAqGvi/ifioSdVFPtEGrm8Y9T/993k= -github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= -github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= +github.com/cometbft/cometbft v0.38.11 h1:6bNDUB8/xq4uYonYwIfGc9OqK1ZH4NkdaMmR1LZIJqk= +github.com/cometbft/cometbft v0.38.11/go.mod h1:jHPx9vQpWzPHEAiYI/7EDKaB1NXhK6o3SArrrY8ExKc= +github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M= +github.com/cometbft/cometbft-db v0.9.1/go.mod h1:iliyWaoV0mRwBJoizElCwwRA9Tf7jZJOURcRZF9m60U= 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= @@ -330,43 +323,42 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= -github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= -github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= -github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20230607182757-cfeb10287d61 h1:FmBV5mLQ23Aohuted9rOaklAiTHD1WasYGSbwMWoM+A= -github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20230607182757-cfeb10287d61/go.mod h1:/gEylJiGxJatYuGnb+WGnj5jNQ/ysxLZZNqwtoGFJyA= +github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= +github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20230614103911-b3da8bb4e801 h1:Qg0EgcEYtN0RWmxaFWTTCeMDfnbHB6UEzHucafy14i8= +github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20230614103911-b3da8bb4e801/go.mod h1:VwFzgpv4z/Mrx+0sQpWwURCHx4h/iAalMdKIe3VEyBw= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cosmos/iavl v1.0.0-beta.2 h1:XOsIM80Yyml/KifCXEYOy9tWCXwMAbLa91n6pReW07Y= -github.com/cosmos/iavl v1.0.0-beta.2/go.mod h1:EA97dJ07TBktRlG/iGzK6g1eCXNj1q3MGoFYkVzrwHE= -github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= -github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= -github.com/cosmos/ledger-cosmos-go v0.13.0 h1:ex0CvCxToSR7j5WjrghPu2Bu9sSXKikjnVvUryNnx4s= -github.com/cosmos/ledger-cosmos-go v0.13.0/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= +github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= +github.com/cosmos/iavl v1.0.1 h1:D+mYbcRO2wptYzOM1Hxl9cpmmHU1ZEt9T2Wv5nZTeUw= +github.com/cosmos/iavl v1.0.1/go.mod h1:8xIUkgVvwvVrBu81scdPty+/Dx9GqwHnAvXz4cwF7RY= +github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= +github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew 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/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= 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= @@ -386,9 +378,8 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/emicklei/dot v1.4.2 h1:UbK6gX4yvrpHKlxuUQicwoAis4zl8Dzwit9SnbBAXWw= -github.com/emicklei/dot v1.4.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= +github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -400,42 +391,36 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -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/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= -github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= 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/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.21.0 h1:c9l5F1nPF30JIppulk4veau90PK6Smu3abgVtVQWon4= -github.com/getsentry/sentry-go v0.21.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -452,14 +437,21 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= 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= @@ -470,11 +462,10 @@ github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6Wezm github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -485,11 +476,9 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV 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/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -524,13 +513,12 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 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/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -549,19 +537,22 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= +github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -571,7 +562,6 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -579,17 +569,18 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.3 h1:FAgZmpLl/SXurPEZyCMPBIiiYeTbqfjlbdnCNTAkbGE= -github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= -github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -599,10 +590,9 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.8.0 h1:UBtEZqx1bjXtOQ5BVTkuYghXrr3N4V123VKJK67vJZc= -github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= +github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= +github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= @@ -639,10 +629,12 @@ github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVH github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-metrics v0.5.1 h1:rfPwUqFU6uZXNvGl4hzjY8LEBsqFVU4si1H9/Hqck/U= +github.com/hashicorp/go-metrics v0.5.1/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v1.4.10 h1:xUbmA4jC6Dq163/fWcp8P3JuHilrHHMLNRxzGQJ9hNk= -github.com/hashicorp/go-plugin v1.4.10/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= @@ -658,8 +650,10 @@ github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -676,24 +670,18 @@ github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0Jr github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= -github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -709,86 +697,66 @@ github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= 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.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= -github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= -github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= -github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= +github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.0 h1:H4L/LhP7GOMf1j17oQAElHgVlbEje2h14A8Tz9cM2BE= -github.com/linxGnu/grocksdb v1.8.0/go.mod h1:09CeBborffXhXdNpEcOeZrLKEnRtrZFEpFdPNI9Zjjg= +github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= +github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= +github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= +github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -808,7 +776,7 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -826,8 +794,8 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA 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/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce h1:/pEpMk55wH0X+E5zedGEMOdLuWmV8P4+4W3+LZaM6kg= -github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= @@ -835,7 +803,6 @@ github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DV 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.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= @@ -847,6 +814,7 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= @@ -859,18 +827,19 @@ github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnh github.com/otiai10/copy v1.11.0 h1:OKBD80J/mLBrwnzXqGtFCzprFSGioo30JcmR4APsNwc= github.com/otiai10/copy v1.11.0/go.mod h1:rSaLseMUsZFFbsFGc7wCJnnkTAvdc5L6VWxPE4308Ww= github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= +github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 h1:W04oB3d0J01W5jgYRGKsV8LCM6g9EkCvPkZcmFuy0OE= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc h1:8bQZVK1X6BJR/6nYUPxQEP+ReTsceJTKizeuwjWOPUA= +github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= @@ -881,9 +850,9 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -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/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -891,61 +860,59 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= +github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.47.0 h1:p5Cz0FNHo7SnWOmWmoRozVcjEp0bIVU8cV7OShpjL1k= +github.com/prometheus/common v0.47.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= 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/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -955,37 +922,38 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1 github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= 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.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= 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= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= +github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/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/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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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= @@ -996,60 +964,45 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= -github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= -github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= -github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= +go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1062,6 +1015,18 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 h1:UNQQKPfTDe1J81ViolILjTKPr9WetKW6uei2hFgJmFs= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 h1:sv9kVfal0MK0wBMCOGr+HeJm9v803BkJxGrk2au7j08= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0/go.mod h1:SK2UL73Zy1quvRPonmOmRDiWk1KBV3LyIeeIxcEApWw= +go.opentelemetry.io/otel v1.22.0 h1:xS7Ku+7yTFvDfDraDIJVpw7XPyuHlB9MCiqqX5mcJ6Y= +go.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZVCC6pMI= +go.opentelemetry.io/otel/metric v1.22.0 h1:lypMQnGyJYeuYPhOM/bgjbFM6WE44W1/T45er4d8Hhg= +go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY= +go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= +go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= +go.opentelemetry.io/otel/trace v1.22.0 h1:Hg6pPujv0XG9QaVbGOBVHunyuLcCC3jN7WEhPx83XD0= +go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1071,6 +1036,8 @@ go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= @@ -1083,16 +1050,11 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1104,8 +1066,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-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= 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= @@ -1143,7 +1105,6 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -1153,7 +1114,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1174,7 +1134,6 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= @@ -1182,8 +1141,6 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -1196,8 +1153,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1223,8 +1180,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= -golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= +golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= +golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1239,7 +1196,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1250,7 +1208,6 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1260,7 +1217,6 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1289,7 +1245,6 @@ golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/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-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1297,14 +1252,11 @@ golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7w 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-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1317,7 +1269,6 @@ golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1337,17 +1288,17 @@ golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1359,24 +1310,23 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -1424,7 +1374,6 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f 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= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= @@ -1490,8 +1439,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.122.0 h1:zDobeejm3E7pEG1mNHvdxvjs5XJoCMzyNH+CmwL94Es= -google.golang.org/api v0.122.0/go.mod h1:gcitW0lvnyWjSp9nKxAbdHKIZ6vF4aajGueeslZOyms= +google.golang.org/api v0.162.0 h1:Vhs54HkaEpkMBdgGdOT2P6F0csGG/vxDS0hWHJzmmps= +google.golang.org/api v0.162.0/go.mod h1:6SulDkfoBIg4NFmCuZ39XeeAgSHCPecfSUuDyYlAHs0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1499,9 +1448,9 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1540,10 +1489,8 @@ google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1610,13 +1557,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 h1:x1vNwUhVOcsYoKyEGCZBH694SBmmBjA2EfauFVEI2+M= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a h1:HiYVD+FGJkTo+9zj1gqz0anapsa1JxjiSrN+BJKyUmE= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1658,8 +1604,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1676,25 +1622,22 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= @@ -1709,13 +1652,12 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1726,12 +1668,12 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -pgregory.net/rapid v0.6.2 h1:ErW5sL+UKtfBfUTsWHDCoeB+eZKLKMxrSd1VJY6W4bw= -pgregory.net/rapid v0.6.2/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/tools/cosmovisor/scanner.go b/tools/cosmovisor/scanner.go index 506e993de379..435b10f3ef5b 100644 --- a/tools/cosmovisor/scanner.go +++ b/tools/cosmovisor/scanner.go @@ -9,9 +9,10 @@ import ( "strings" "time" + "github.com/rs/zerolog" + "cosmossdk.io/log" upgradetypes "cosmossdk.io/x/upgrade/types" - "github.com/rs/zerolog" ) type fileWatcher struct { diff --git a/tools/cosmovisor/upgrade_test.go b/tools/cosmovisor/upgrade_test.go index 0e8ea169f20d..5c8d867e2ca6 100644 --- a/tools/cosmovisor/upgrade_test.go +++ b/tools/cosmovisor/upgrade_test.go @@ -11,7 +11,6 @@ import ( "testing" "github.com/otiai10/copy" - "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" diff --git a/tools/hubl/go.mod b/tools/hubl/go.mod index 43b0af8c80d5..8d0e6d6effe3 100644 --- a/tools/hubl/go.mod +++ b/tools/hubl/go.mod @@ -1,133 +1,156 @@ module cosmossdk.io/tools/hubl -go 1.20 +go 1.21 require ( - cosmossdk.io/api v0.4.2 - cosmossdk.io/client/v2 v2.0.0-20230607190716-2877190997a2 - cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741 - github.com/cockroachdb/errors v1.9.1 - github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20230607190716-2877190997a2 + cosmossdk.io/api v0.7.5 + cosmossdk.io/client/v2 v2.0.0-20230719143845-dff6b0e26aa4 + cosmossdk.io/errors v1.0.1 + github.com/cockroachdb/errors v1.11.1 + github.com/cosmos/cosmos-sdk v0.50.0-rc.1 github.com/manifoldco/promptui v0.9.0 - github.com/pelletier/go-toml/v2 v2.0.8 - github.com/spf13/cobra v1.7.0 - google.golang.org/grpc v1.55.0 - google.golang.org/protobuf v1.30.0 + github.com/pelletier/go-toml/v2 v2.1.0 + github.com/spf13/cobra v1.8.0 + google.golang.org/grpc v1.63.2 + google.golang.org/protobuf v1.34.2 ) require ( - cosmossdk.io/collections v0.2.0 // indirect - cosmossdk.io/core v0.8.0 // indirect - cosmossdk.io/depinject v1.0.0-alpha.3 // indirect - cosmossdk.io/log v1.1.0 // indirect - cosmossdk.io/math v1.0.1 // indirect - cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c // indirect - cosmossdk.io/x/tx v0.8.0 // indirect + cosmossdk.io/collections v0.4.0 // indirect + cosmossdk.io/core v0.11.0 // indirect + cosmossdk.io/depinject v1.0.0-alpha.4 // indirect + cosmossdk.io/log v1.4.1 // indirect + cosmossdk.io/math v1.3.0 // indirect + cosmossdk.io/store v1.0.0 // indirect + cosmossdk.io/x/tx v0.13.4 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/DataDog/zstd v1.5.5 // indirect - github.com/armon/go-metrics v0.4.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230606202032-d96868fd481e // indirect - github.com/cockroachdb/redact v1.1.4 // indirect - github.com/cometbft/cometbft v0.38.0-rc1 // indirect - github.com/cometbft/cometbft-db v0.7.0 // indirect + github.com/cockroachdb/pebble v1.1.0 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/cometbft/cometbft v0.38.11 // indirect + github.com/cometbft/cometbft-db v0.9.1 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-db v1.0.0 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect + github.com/cosmos/cosmos-db v1.0.2 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect - github.com/cosmos/gogoproto v1.4.10 // indirect - github.com/cosmos/iavl v1.0.0-beta.2 // indirect - github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.13.0 // indirect + github.com/cosmos/gogogateway v1.2.0 // indirect + github.com/cosmos/gogoproto v1.7.0 // indirect + github.com/cosmos/iavl v1.0.1 // indirect + github.com/cosmos/ics23/go v0.11.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/danieljoos/wincred v1.1.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect + github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.5.0 // indirect - github.com/emicklei/dot v1.4.2 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/getsentry/sentry-go v0.21.0 // indirect + github.com/emicklei/dot v1.6.1 // indirect + github.com/fatih/color v1.15.0 // indirect + github.com/felixge/httpsnoop v1.0.2 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect + github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.1.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/glog v1.2.0 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/google/orderedcode v0.0.1 // indirect + github.com/gorilla/handlers v1.5.1 // indirect + github.com/gorilla/mux v1.8.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect + github.com/hashicorp/go-metrics v0.5.1 // indirect + github.com/hashicorp/go-plugin v1.5.2 // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect - github.com/iancoleman/strcase v0.2.0 // indirect + github.com/huandu/skiplist v1.2.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect + github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.16.5 // indirect + github.com/klauspost/compress v1.17.7 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.0 // indirect + github.com/lib/pq v1.10.7 // indirect + github.com/linxGnu/grocksdb v1.8.12 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/minio/highwayhash v1.0.2 // indirect + github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce // indirect - github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect + github.com/oklog/run v1.1.0 // indirect + github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.15.1 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.18.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.47.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect - github.com/rs/zerolog v1.29.1 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rs/cors v1.8.3 // indirect + github.com/rs/zerolog v1.33.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/cast v1.5.1 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.16.0 // indirect - github.com/stretchr/testify v1.8.4 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/spf13/viper v1.18.2 // indirect + github.com/stretchr/testify v1.9.0 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tidwall/btree v1.6.0 // indirect - github.com/zondax/hid v0.9.1 // indirect - github.com/zondax/ledger-go v0.14.1 // indirect - go.etcd.io/bbolt v1.3.6 // indirect - golang.org/x/crypto v0.9.0 // indirect - golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect - google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect + github.com/tidwall/btree v1.7.0 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect + go.etcd.io/bbolt v1.3.8 // indirect + go.uber.org/multierr v1.10.0 // indirect + golang.org/x/crypto v0.26.0 // indirect + golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - gotest.tools/v3 v3.4.0 // indirect - pgregory.net/rapid v0.6.2 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + gotest.tools/v3 v3.5.1 // indirect + nhooyr.io/websocket v1.8.6 // indirect + pgregory.net/rapid v1.1.0 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/tools/hubl/go.sum b/tools/hubl/go.sum index a805d6da81cc..4d1d4bf5ae8e 100644 --- a/tools/hubl/go.sum +++ b/tools/hubl/go.sum @@ -1,60 +1,25 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.4.2 h1:lQBMl4xINnMnBOR/tQLtjlDnR4exr4e6/SfHR8PILE0= -cosmossdk.io/api v0.4.2/go.mod h1:qrVgOp7DIeAXa+Tt5dDjOC47bZCDrwx8ZHxrmy7STNE= -cosmossdk.io/client/v2 v2.0.0-20230607190716-2877190997a2 h1:x4eu8xjihip1U+WCuOrK3rcyMSe28HS9D8ZPyoONrcE= -cosmossdk.io/client/v2 v2.0.0-20230607190716-2877190997a2/go.mod h1:Khq/WZqGHSgFlwPI6Ui47UE9RzblIze7iMX+s3nu3eM= -cosmossdk.io/collections v0.2.0 h1:CgMfLtE16+qox3zBYrGh60i4yKV8SeExLnIdOS2sbQs= -cosmossdk.io/collections v0.2.0/go.mod h1:Oc1FK0vlmxJZsgUn9/o3ldE6zNyWKvobVzaLhWknZJE= -cosmossdk.io/core v0.8.0 h1:LcJnu52E1a8f8E317VfQ1xK/RZe+IuhMNQAjnDLh25M= -cosmossdk.io/core v0.8.0/go.mod h1:LF6VLOv2DdCiaHxYVmr0MZcZpaSM9ZgvyrQSYTeg6D0= -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.0.20230524212735-6cabb6aa5741 h1:BCRz06fvddw7cKGiEGDiSox3qMsjQ97f92K+PDZDHdc= -cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741/go.mod h1:TB05o6YXkZkzsc+6bZFAV5kZRBtoCU9tUkbeMIqEg0w= -cosmossdk.io/log v1.1.0 h1:v0ogPHYeTzPcBTcPR1A3j1hkei4pZama8kz8LKlCMv0= -cosmossdk.io/log v1.1.0/go.mod h1:6zjroETlcDs+mm62gd8Ig7mZ+N+fVOZS91V17H+M4N4= -cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c h1:A+FMPW9GtfcPBDQNtFeDFN27h1SAP6OVjnGgPLlYXmI= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c/go.mod h1:RbYGvXCbz8uNBCXrwS9Z8SyydeWi+W5x5MZ33muyzMw= -cosmossdk.io/x/tx v0.8.0 h1:gLiGRL/Fy7fs6dd0IX8jOf0PrVr56/SG6XVMGQjyvJU= -cosmossdk.io/x/tx v0.8.0/go.mod h1:T9uEumGNgKU61gJYRv1t3uzQwLnASpJGmSE229HM3xA= +cosmossdk.io/api v0.7.5 h1:eMPTReoNmGUm8DeiQL9DyM8sYDjEhWzL1+nLbI9DqtQ= +cosmossdk.io/api v0.7.5/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/client/v2 v2.0.0-20230719143845-dff6b0e26aa4 h1:rXCotxNnD0DUpcVBYojEZWUTEIJ9p+sgkpEtZlV4+pE= +cosmossdk.io/client/v2 v2.0.0-20230719143845-dff6b0e26aa4/go.mod h1:mrwVTC+6n90zDpvn4N12YJVl67QUCDQ3yEqIR4Ovp14= +cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= +cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= +cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= +cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= +cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= +cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= +cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= +cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= +cosmossdk.io/store v1.0.0 h1:6tnPgTpTSIskaTmw/4s5C9FARdgFflycIc9OX8i1tOI= +cosmossdk.io/store v1.0.0/go.mod h1:ABMprwjvx6IpMp8l06TwuMrj6694/QP5NIW+X6jaTYc= +cosmossdk.io/x/tx v0.13.4 h1:Eg0PbJgeO0gM8p5wx6xa0fKR7hIV6+8lC56UrsvSo0Y= +cosmossdk.io/x/tx v0.13.4/go.mod h1:BkFqrnGGgW50Y6cwTy+JvgAhiffbGEKW6KF9ufcDpvk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= @@ -62,42 +27,67 @@ github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMb github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= +github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= +github.com/btcsuite/btcd/btcutil v1.1.3/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= +github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= +github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -115,166 +105,203 @@ github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04= github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= +github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZazG8= +github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230606202032-d96868fd481e h1:6QuLTQCQZueVNzoYYUuFfaRgBOpj6gIwQA1PZT2rfWM= -github.com/cockroachdb/pebble v0.0.0-20230606202032-d96868fd481e/go.mod h1:TkdVsGYRqtULUppt2RbC+YaKtTHnHoWa2apfFrSKABw= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/redact v1.1.4 h1:Y0XrVI2FAyofNyGveodTN//qdpPtFKcKTeCBsK3AHAQ= -github.com/cockroachdb/redact v1.1.4/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/cometbft/cometbft v0.38.0-rc1 h1:ph6smlqX82aH+d72KuxDHqu29M7LyusSp/obfGsGX/w= -github.com/cometbft/cometbft v0.38.0-rc1/go.mod h1:5Jz0Z8YsHSf0ZaAqGvi/ifioSdVFPtEGrm8Y9T/993k= -github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= -github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= +github.com/cockroachdb/pebble v1.1.0 h1:pcFh8CdCIt2kmEpK0OIatq67Ln9uGDYY3d5XnE0LJG4= +github.com/cockroachdb/pebble v1.1.0/go.mod h1:sEHm5NOXxyiAoKWhoFxT8xMgd/f3RA6qUqQ1BXKrh2E= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/cometbft/cometbft v0.38.11 h1:6bNDUB8/xq4uYonYwIfGc9OqK1ZH4NkdaMmR1LZIJqk= +github.com/cometbft/cometbft v0.38.11/go.mod h1:jHPx9vQpWzPHEAiYI/7EDKaB1NXhK6o3SArrrY8ExKc= +github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M= +github.com/cometbft/cometbft-db v0.9.1/go.mod h1:iliyWaoV0mRwBJoizElCwwRA9Tf7jZJOURcRZF9m60U= +github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= -github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= -github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= -github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20230607190716-2877190997a2 h1:upDBxuP9BfUz5DtMJGh1mj9YZ2M+mBOrBvsv7ufb7gI= -github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20230607190716-2877190997a2/go.mod h1:H194vsGW6Qo0RVp5inetgU31+s2rk7RKgeztTnxChgM= +github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= +github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/cosmos-sdk v0.50.0-rc.1 h1:1Z+SgLg8S2+DoiePz9aO5dSjJUgag8VFhFUSD/HGvOU= +github.com/cosmos/cosmos-sdk v0.50.0-rc.1/go.mod h1:JbgPLZrh+yX+4+n1CPJ/uL9HrhZw6QVg0q7cTq2Iwq0= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cosmos/iavl v1.0.0-beta.2 h1:XOsIM80Yyml/KifCXEYOy9tWCXwMAbLa91n6pReW07Y= -github.com/cosmos/iavl v1.0.0-beta.2/go.mod h1:EA97dJ07TBktRlG/iGzK6g1eCXNj1q3MGoFYkVzrwHE= -github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= -github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= -github.com/cosmos/ledger-cosmos-go v0.13.0 h1:ex0CvCxToSR7j5WjrghPu2Bu9sSXKikjnVvUryNnx4s= -github.com/cosmos/ledger-cosmos-go v0.13.0/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= +github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= +github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= +github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= +github.com/cosmos/iavl v1.0.1 h1:D+mYbcRO2wptYzOM1Hxl9cpmmHU1ZEt9T2Wv5nZTeUw= +github.com/cosmos/iavl v1.0.1/go.mod h1:8xIUkgVvwvVrBu81scdPty+/Dx9GqwHnAvXz4cwF7RY= +github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= +github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew 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/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= +github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= 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.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/emicklei/dot v1.4.2 h1:UbK6gX4yvrpHKlxuUQicwoAis4zl8Dzwit9SnbBAXWw= -github.com/emicklei/dot v1.4.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= +github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -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/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= +github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= 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/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.21.0 h1:c9l5F1nPF30JIppulk4veau90PK6Smu3abgVtVQWon4= -github.com/getsentry/sentry-go v0.21.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= -github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= +github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= +github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= +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= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +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/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= 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= @@ -286,12 +313,12 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 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/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -300,195 +327,257 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a 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.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= +github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-plugin v1.4.10 h1:xUbmA4jC6Dq163/fWcp8P3JuHilrHHMLNRxzGQJ9hNk= +github.com/hashicorp/go-metrics v0.5.1 h1:rfPwUqFU6uZXNvGl4hzjY8LEBsqFVU4si1H9/Hqck/U= +github.com/hashicorp/go-metrics v0.5.1/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= +github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= +github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= +github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +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.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= -github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= -github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= -github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= -github.com/linxGnu/grocksdb v1.8.0 h1:H4L/LhP7GOMf1j17oQAElHgVlbEje2h14A8Tz9cM2BE= -github.com/linxGnu/grocksdb v1.8.0/go.mod h1:09CeBborffXhXdNpEcOeZrLKEnRtrZFEpFdPNI9Zjjg= +github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= +github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= +github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= +github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= 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/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce h1:/pEpMk55wH0X+E5zedGEMOdLuWmV8P4+4W3+LZaM6kg= -github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= +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.10.3/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.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= +github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 h1:W04oB3d0J01W5jgYRGKsV8LCM6g9EkCvPkZcmFuy0OE= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc h1:8bQZVK1X6BJR/6nYUPxQEP+ReTsceJTKizeuwjWOPUA= +github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -496,81 +585,113 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= +github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.47.0 h1:p5Cz0FNHo7SnWOmWmoRozVcjEp0bIVU8cV7OShpjL1k= +github.com/prometheus/common v0.47.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= +github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= 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/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +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.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= 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= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= +github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/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/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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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= @@ -580,414 +701,268 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= -github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= -github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= -github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= -go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= +go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= 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= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 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/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/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-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-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-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 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.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/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-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -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= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= 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= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 h1:x1vNwUhVOcsYoKyEGCZBH694SBmmBjA2EfauFVEI2+M= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a h1:HiYVD+FGJkTo+9zj1gqz0anapsa1JxjiSrN+BJKyUmE= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= @@ -1000,51 +975,52 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= -pgregory.net/rapid v0.6.2 h1:ErW5sL+UKtfBfUTsWHDCoeB+eZKLKMxrSd1VJY6W4bw= -pgregory.net/rapid v0.6.2/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/tools/hubl/internal/compat.go b/tools/hubl/internal/compat.go index 8ef10f5524bb..325cd28f8a28 100644 --- a/tools/hubl/internal/compat.go +++ b/tools/hubl/internal/compat.go @@ -6,14 +6,15 @@ import ( "io" "strings" - autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" - reflectionv1beta1 "cosmossdk.io/api/cosmos/base/reflection/v1beta1" "google.golang.org/grpc" "google.golang.org/grpc/reflection/grpc_reflection_v1" "google.golang.org/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" "google.golang.org/protobuf/types/descriptorpb" + + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + reflectionv1beta1 "cosmossdk.io/api/cosmos/base/reflection/v1beta1" ) // loadFileDescriptorsGRPCReflection attempts to load the file descriptor set using gRPC reflection when cosmos.reflection.v1 diff --git a/tools/hubl/internal/config.go b/tools/hubl/internal/config.go index 136c6e7f6068..358eab41dbe3 100644 --- a/tools/hubl/internal/config.go +++ b/tools/hubl/internal/config.go @@ -5,8 +5,9 @@ import ( "os" "path" - "cosmossdk.io/errors" "github.com/pelletier/go-toml/v2" + + "cosmossdk.io/errors" ) type Config struct { diff --git a/tools/hubl/internal/remote.go b/tools/hubl/internal/remote.go index 0f4ef0684f83..d26f10c93251 100644 --- a/tools/hubl/internal/remote.go +++ b/tools/hubl/internal/remote.go @@ -13,10 +13,10 @@ import ( "google.golang.org/protobuf/reflect/protoregistry" "google.golang.org/protobuf/types/dynamicpb" - addresscodec "github.com/cosmos/cosmos-sdk/codec/address" - "cosmossdk.io/client/v2/autocli" "cosmossdk.io/client/v2/autocli/flag" + + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" ) var ( @@ -94,9 +94,11 @@ func RemoteCommand(config *Config, configDir string) ([]*cobra.Command, error) { builder := &autocli.Builder{ Builder: flag.Builder{ - AddressCodec: addresscodec.NewBech32Codec(chainConfig.Bech32Prefix), - TypeResolver: &dynamicTypeResolver{chainInfo}, - FileResolver: chainInfo.ProtoFiles, + AddressCodec: addresscodec.NewBech32Codec(chainConfig.Bech32Prefix), + ValidatorAddressCodec: addresscodec.NewBech32Codec(fmt.Sprintf("%svaloper", chainConfig.Bech32Prefix)), + ConsensusAddressCodec: addresscodec.NewBech32Codec(fmt.Sprintf("%svalcons", chainConfig.Bech32Prefix)), + TypeResolver: &dynamicTypeResolver{chainInfo}, + FileResolver: chainInfo.ProtoFiles, }, GetClientConn: func(command *cobra.Command) (grpc.ClientConnInterface, error) { return chainInfo.OpenClient() diff --git a/tools/rosetta/.gitignore b/tools/rosetta/.gitignore deleted file mode 100644 index 97a2f457a395..000000000000 --- a/tools/rosetta/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/rosetta \ No newline at end of file diff --git a/tools/rosetta/.goreleaser.yml b/tools/rosetta/.goreleaser.yml deleted file mode 100644 index 6604952837e1..000000000000 --- a/tools/rosetta/.goreleaser.yml +++ /dev/null @@ -1,34 +0,0 @@ -project_name: rosetta - -release: - disable: false - name_template: "{{.Tag}}" - -before: - hooks: - - go mod tidy - -builds: - - main: ./cmd/rosetta - goos: - - linux - - windows - - darwin - goarch: - - amd64 - - arm64 - env: - - CGO_ENABLED=0 - -archives: - - name_template: '{{ replace .Version "rosetta/" "rosetta-" }}-{{ .Os }}-{{ .Arch }}' - format_overrides: - - goos: windows - format: zip - -checksum: - name_template: 'SHA256SUMS-{{ replace .Version "rosetta/" "rosetta-" }}.txt' - algorithm: sha256 - -changelog: - skip: false diff --git a/tools/rosetta/CHANGELOG.md b/tools/rosetta/CHANGELOG.md deleted file mode 100644 index 3e8c6b13e1dd..000000000000 --- a/tools/rosetta/CHANGELOG.md +++ /dev/null @@ -1,65 +0,0 @@ - - -# Changelog - -## [Unreleased] - -### Improvements - -* [#14272](https://github.com/cosmos/cosmos-sdk/pull/14272) Use `coinbase/rosetta-sdk-go/types` packages instead of comsos fork. - -### Bug Fixes - -* [#14285](https://github.com/cosmos/cosmos-sdk/pull/14285) Sets tendermint errors status codes to 500 - -## v0.2.0 2022-12-07 - -### Improvements - -* [#14118](https://github.com/cosmos/cosmos-sdk/pull/14118) Allow rosetta to be installed as a standalone application. -* [#14061](https://github.com/cosmos/cosmos-sdk/pull/14061) Adds openapi specification. -* [#13832](https://github.com/cosmos/cosmos-sdk/pull/13832) Correctly populates rosetta's `/network/status` endpoint response. Rosetta's data api is divided into its own go files (account, block, mempool, network). - -### Bug Fixes - -* [#13832](https://github.com/cosmos/cosmos-sdk/pull/13832) Wrap tendermint RPC errors to rosetta errors. - -## v0.1.0 2022-11-04 - -**From `v0.1.0` the minimum version of Tendermint is `v0.37+`, due event type changes.** - -### Improvements - -* [#13583](https://github.com/cosmos/cosmos-sdk/pull/13583) Extract rosetta to its own go.mod. diff --git a/tools/rosetta/Makefile b/tools/rosetta/Makefile deleted file mode 100644 index 60a59993ba83..000000000000 --- a/tools/rosetta/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/make -f - -all: build - -rosetta: - go build -mod=readonly ./cmd/rosetta - -build: - go build ./cmd/rosetta.go - -test: - go test -mod=readonly -race ./... - -.PHONY: all build rosetta test \ No newline at end of file diff --git a/tools/rosetta/README.md b/tools/rosetta/README.md deleted file mode 100644 index 3d8467aea892..000000000000 --- a/tools/rosetta/README.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Rosetta - -The `rosetta` package implements Coinbase's [Rosetta API](https://www.rosetta-api.org). This document provides instructions on how to use the Rosetta API integration. For information about the motivation and design choices, refer to [ADR 035](https://docs.cosmos.network/main/architecture/adr-035-rosetta-api-support). - -## Add Rosetta Command - -The Rosetta API server is a stand-alone server that connects to a node of a chain developed with Cosmos SDK. - -To enable Rosetta API support, it's required to add the `RosettaCommand` to your application's root command file (e.g. `simd/cmd/root.go`). - -Import the `rosettaCmd` package: - -```go -import "cosmossdk.io/tools/rosetta/cmd" -``` - -Find the following line: - -```go -initRootCmd(rootCmd, encodingConfig) -``` - -After that line, add the following: - -```go -rootCmd.AddCommand( - rosettaCmd.RosettaCommand(encodingConfig.InterfaceRegistry, encodingConfig.Codec) -) -``` - -The `RosettaCommand` function builds the `rosetta` root command and is defined in the `rosettaCmd` package (`cosmossdk.io/tools/rosetta/cmd`). - -Since we’ve updated the Cosmos SDK to work with the Rosetta API, updating the application's root command file is all you need to do. - -An implementation example can be found in `simapp` package. - -## Use Rosetta Command - -To run Rosetta in your application CLI, use the following command: - -```shell -simd rosetta --help -``` - -To test and run Rosetta API endpoints for applications that are running and exposed, use the following command: - -```shell -simd rosetta - --blockchain "your application name (ex: gaia)" - --network "your chain identifier (ex: testnet-1)" - --tendermint "tendermint endpoint (ex: localhost:26657)" - --grpc "gRPC endpoint (ex: localhost:9090)" - --addr "rosetta binding address (ex: :8080)" -``` - -## Use Rosetta Standalone - -To use Rosetta standalone, without having to add it in your application, install it with the following command: - -```bash -go install cosmossdk.io/tools/rosetta/cmd/rosetta -``` - -Alternatively, for building from source, simply run `make rosetta`. The binary will be located in `tools/rosetta`. - -## Extensions - -There are two ways in which you can customize and extend the implementation with your custom settings. - -### Message extension - -In order to make an `sdk.Msg` understandable by rosetta the only thing which is required is adding the methods to your messages that satisfy the `rosetta.Msg` interface. Examples on how to do so can be found in the staking types such as `MsgDelegate`, or in bank types such as `MsgSend`. - -### Client interface override - -In case more customization is required, it's possible to embed the Client type and override the methods which require customizations. - -Example: - -```go -package custom_client -import ( - -"context" -"github.com/coinbase/rosetta-sdk-go/types" -"cosmossdk.io/tools/rosetta/lib" -) - -// CustomClient embeds the standard cosmos client -// which means that it implements the cosmos-rosetta-gateway Client -// interface while at the same time allowing to customize certain methods -type CustomClient struct { - *rosetta.Client -} - -func (c *CustomClient) ConstructionPayload(_ context.Context, request *types.ConstructionPayloadsRequest) (resp *types.ConstructionPayloadsResponse, err error) { - // provide custom signature bytes - panic("implement me") -} -``` - -NOTE: when using a customized client, the command cannot be used as the constructors required **may** differ, so it's required to create a new one. We intend to provide a way to init a customized client without writing extra code in the future. - -### Error extension - -Since rosetta requires to provide 'returned' errors to network options. In order to declare a new rosetta error, we use the `errors` package in cosmos-rosetta-gateway. - -Example: - -```go -package custom_errors -import crgerrs "cosmossdk.io/tools/rosetta/lib/errors" - -var customErrRetriable = true -var CustomError = crgerrs.RegisterError(100, "custom message", customErrRetriable, "description") -``` - -Note: errors must be registered before cosmos-rosetta-gateway's `Server`.`Start` method is called. Otherwise the registration will be ignored. Errors with same code will be ignored too. diff --git a/tools/rosetta/RELEASE_NOTES.md b/tools/rosetta/RELEASE_NOTES.md deleted file mode 100644 index 4f21a49207dc..000000000000 --- a/tools/rosetta/RELEASE_NOTES.md +++ /dev/null @@ -1,5 +0,0 @@ -# Rosetta v0.2.0 Release Notes - -## Changelog - -For more details, please see the [CHANGELOG](https://github.com/cosmos/cosmos-sdk/blob/tools/rosetta/v0.2.0/tools/rosetta/CHANGELOG.md). diff --git a/tools/rosetta/client_offline.go b/tools/rosetta/client_offline.go deleted file mode 100644 index ef01d69a113f..000000000000 --- a/tools/rosetta/client_offline.go +++ /dev/null @@ -1,143 +0,0 @@ -package rosetta - -import ( - "context" - "encoding/hex" - - "github.com/coinbase/rosetta-sdk-go/types" - - crgerrs "cosmossdk.io/tools/rosetta/lib/errors" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// ---------- cosmos-rosetta-gateway.types.NetworkInformationProvider implementation ------------ // - -func (c *Client) OperationStatuses() []*types.OperationStatus { - return []*types.OperationStatus{ - { - Status: StatusTxSuccess, - Successful: true, - }, - { - Status: StatusTxReverted, - Successful: false, - }, - } -} - -func (c *Client) Version() string { - return c.version -} - -func (c *Client) SupportedOperations() []string { - return c.supportedOperations -} - -// ---------- cosmos-rosetta-gateway.types.OfflineClient implementation ------------ // - -func (c *Client) SignedTx(_ context.Context, txBytes []byte, signatures []*types.Signature) (signedTxBytes []byte, err error) { - return c.converter.ToSDK().SignedTx(txBytes, signatures) -} - -func (c *Client) ConstructionPayload(_ context.Context, request *types.ConstructionPayloadsRequest) (resp *types.ConstructionPayloadsResponse, err error) { - // check if there is at least one operation - if len(request.Operations) < 1 { - return nil, crgerrs.WrapError(crgerrs.ErrInvalidOperation, "expected at least one operation") - } - - tx, err := c.converter.ToSDK().UnsignedTx(request.Operations) - if err != nil { - return nil, crgerrs.WrapError(crgerrs.ErrInvalidOperation, err.Error()) - } - - metadata := new(ConstructionMetadata) - if err = metadata.FromMetadata(request.Metadata); err != nil { - return nil, err - } - - txBytes, payloads, err := c.converter.ToRosetta().SigningComponents(tx, metadata, request.PublicKeys) - if err != nil { - return nil, err - } - - return &types.ConstructionPayloadsResponse{ - UnsignedTransaction: hex.EncodeToString(txBytes), - Payloads: payloads, - }, nil -} - -func (c *Client) PreprocessOperationsToOptions(_ context.Context, req *types.ConstructionPreprocessRequest) (response *types.ConstructionPreprocessResponse, err error) { - if len(req.Operations) == 0 { - return nil, crgerrs.WrapError(crgerrs.ErrBadArgument, "no operations") - } - - // now we need to parse the operations to cosmos sdk messages - tx, err := c.converter.ToSDK().UnsignedTx(req.Operations) - if err != nil { - return nil, err - } - - // get the signers - signers, err := tx.GetSigners() - if err != nil { - return nil, err - } - - signersStr := make([]string, len(signers)) - accountIdentifiers := make([]*types.AccountIdentifier, len(signers)) - - for i, sig := range signers { - addr, err := c.config.InterfaceRegistry.SigningContext().AddressCodec().BytesToString(sig) - if err != nil { - return nil, err - } - - signersStr[i] = addr - accountIdentifiers[i] = &types.AccountIdentifier{ - Address: addr, - } - } - // get the metadata request information - meta := new(ConstructionPreprocessMetadata) - err = meta.FromMetadata(req.Metadata) - if err != nil { - return nil, err - } - - if meta.GasPrice == "" { - return nil, crgerrs.WrapError(crgerrs.ErrBadArgument, "no gas prices") - } - - if meta.GasLimit == 0 { - return nil, crgerrs.WrapError(crgerrs.ErrBadArgument, "no gas limit") - } - - // prepare the options to return - options := &PreprocessOperationsOptionsResponse{ - ExpectedSigners: signersStr, - Memo: meta.Memo, - GasLimit: meta.GasLimit, - GasPrice: meta.GasPrice, - } - - metaOptions, err := options.ToMetadata() - if err != nil { - return nil, err - } - return &types.ConstructionPreprocessResponse{ - Options: metaOptions, - RequiredPublicKeys: accountIdentifiers, - }, nil -} - -func (c *Client) AccountIdentifierFromPublicKey(pubKey *types.PublicKey) (*types.AccountIdentifier, error) { - pk, err := c.converter.ToSDK().PubKey(pubKey) - if err != nil { - return nil, err - } - - return &types.AccountIdentifier{ - Address: sdk.AccAddress(pk.Address()).String(), - }, nil -} diff --git a/tools/rosetta/client_online.go b/tools/rosetta/client_online.go deleted file mode 100644 index 73b52af3e6f0..000000000000 --- a/tools/rosetta/client_online.go +++ /dev/null @@ -1,559 +0,0 @@ -package rosetta - -import ( - "bytes" - "context" - "encoding/base64" - "encoding/hex" - "errors" - "fmt" - "regexp" - "strconv" - "time" - - "github.com/cosmos/cosmos-sdk/version" - - abcitypes "github.com/cometbft/cometbft/abci/types" - - rosettatypes "github.com/coinbase/rosetta-sdk-go/types" - "google.golang.org/grpc/credentials/insecure" - "google.golang.org/grpc/metadata" - - "github.com/cometbft/cometbft/rpc/client/http" - "google.golang.org/grpc" - - crgerrs "cosmossdk.io/tools/rosetta/lib/errors" - crgtypes "cosmossdk.io/tools/rosetta/lib/types" - - sdk "github.com/cosmos/cosmos-sdk/types" - grpctypes "github.com/cosmos/cosmos-sdk/types/grpc" - authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" - auth "github.com/cosmos/cosmos-sdk/x/auth/types" - bank "github.com/cosmos/cosmos-sdk/x/bank/types" - - tmrpc "github.com/cometbft/cometbft/rpc/client" - - "github.com/cosmos/cosmos-sdk/types/query" -) - -// interface assertion -var _ crgtypes.Client = (*Client)(nil) - -const ( - defaultNodeTimeout = time.Minute - tmWebsocketPath = "/websocket" -) - -// Client implements a single network client to interact with cosmos based chains -type Client struct { - supportedOperations []string - - config *Config - - auth auth.QueryClient - bank bank.QueryClient - tmRPC tmrpc.Client - - version string - - converter Converter -} - -// NewClient instantiates a new online servicer -func NewClient(cfg *Config) (*Client, error) { - info := version.NewInfo() - - v := info.Version - if v == "" { - v = "unknown" - } - - txConfig := authtx.NewTxConfig(cfg.Codec, authtx.DefaultSignModes) - - var supportedOperations []string - for _, ii := range cfg.InterfaceRegistry.ListImplementations(sdk.MsgInterfaceProtoName) { - _, err := cfg.InterfaceRegistry.Resolve(ii) - if err != nil { - continue - } - - supportedOperations = append(supportedOperations, ii) - } - - supportedOperations = append( - supportedOperations, - bank.EventTypeCoinSpent, - bank.EventTypeCoinReceived, - bank.EventTypeCoinBurn, - ) - - return &Client{ - supportedOperations: supportedOperations, - config: cfg, - auth: nil, - bank: nil, - tmRPC: nil, - version: fmt.Sprintf("%s/%s", info.AppName, v), - converter: NewConverter(cfg.Codec, cfg.InterfaceRegistry, txConfig), - }, nil -} - -// ---------- cosmos-rosetta-gateway.types.Client implementation ------------ // - -// Bootstrap is gonna connect the client to the endpoints -func (c *Client) Bootstrap() error { - grpcConn, err := grpc.Dial(c.config.GRPCEndpoint, grpc.WithTransportCredentials(insecure.NewCredentials())) - if err != nil { - return err - } - - tmRPC, err := http.New(c.config.TendermintRPC, tmWebsocketPath) - if err != nil { - return err - } - - authClient := auth.NewQueryClient(grpcConn) - bankClient := bank.NewQueryClient(grpcConn) - - c.auth = authClient - c.bank = bankClient - c.tmRPC = tmRPC - - return nil -} - -// Ready performs a health check and returns an error if the client is not ready. -func (c *Client) Ready() error { - ctx, cancel := context.WithTimeout(context.Background(), defaultNodeTimeout) - defer cancel() - _, err := c.tmRPC.Health(ctx) - if err != nil { - return err - } - - _, err = c.tmRPC.Status(ctx) - if err != nil { - return err - } - - _, err = c.bank.TotalSupply(ctx, &bank.QueryTotalSupplyRequest{}) - if err != nil { - return err - } - return nil -} - -func (c *Client) GenesisBlock(ctx context.Context) (crgtypes.BlockResponse, error) { - var genesisHeight int64 = 1 - return c.BlockByHeight(ctx, &genesisHeight) -} - -func (c *Client) InitialHeightBlock(ctx context.Context) (crgtypes.BlockResponse, error) { - genesisChunk, err := c.tmRPC.GenesisChunked(ctx, 0) - if err != nil { - return crgtypes.BlockResponse{}, err - } - heightNum, err := extractInitialHeightFromGenesisChunk(genesisChunk.Data) - if err != nil { - return crgtypes.BlockResponse{}, err - } - return c.BlockByHeight(ctx, &heightNum) -} - -func (c *Client) OldestBlock(ctx context.Context) (crgtypes.BlockResponse, error) { - status, err := c.tmRPC.Status(ctx) - if err != nil { - return crgtypes.BlockResponse{}, err - } - return c.BlockByHeight(ctx, &status.SyncInfo.EarliestBlockHeight) -} - -func (c *Client) accountInfo(ctx context.Context, addr string, height *int64) (*SignerData, error) { - if height != nil { - strHeight := strconv.FormatInt(*height, 10) - ctx = metadata.AppendToOutgoingContext(ctx, grpctypes.GRPCBlockHeightHeader, strHeight) - } - - accountInfo, err := c.auth.Account(ctx, &auth.QueryAccountRequest{ - Address: addr, - }) - if err != nil { - return nil, crgerrs.FromGRPCToRosettaError(err) - } - - signerData, err := c.converter.ToRosetta().SignerData(accountInfo.Account) - if err != nil { - return nil, err - } - return signerData, nil -} - -func (c *Client) Balances(ctx context.Context, addr string, height *int64) ([]*rosettatypes.Amount, error) { - if height != nil { - strHeight := strconv.FormatInt(*height, 10) - ctx = metadata.AppendToOutgoingContext(ctx, grpctypes.GRPCBlockHeightHeader, strHeight) - } - - balance, err := c.bank.AllBalances(ctx, &bank.QueryAllBalancesRequest{ - Address: addr, - }) - if err != nil { - return nil, crgerrs.FromGRPCToRosettaError(err) - } - - availableCoins, err := c.coins(ctx) - if err != nil { - return nil, err - } - - return c.converter.ToRosetta().Amounts(balance.Balances, availableCoins), nil -} - -func (c *Client) BlockByHash(ctx context.Context, hash string) (crgtypes.BlockResponse, error) { - bHash, err := hex.DecodeString(hash) - if err != nil { - return crgtypes.BlockResponse{}, fmt.Errorf("invalid block hash: %s", err) - } - - block, err := c.tmRPC.BlockByHash(ctx, bHash) - if err != nil { - return crgtypes.BlockResponse{}, crgerrs.WrapError(crgerrs.ErrBadGateway, err.Error()) - } - - return c.converter.ToRosetta().BlockResponse(block), nil -} - -func (c *Client) BlockByHeight(ctx context.Context, height *int64) (crgtypes.BlockResponse, error) { - block, err := c.tmRPC.Block(ctx, height) - if err != nil { - return crgtypes.BlockResponse{}, crgerrs.WrapError(crgerrs.ErrInternal, err.Error()) - } - - return c.converter.ToRosetta().BlockResponse(block), nil -} - -func (c *Client) BlockTransactionsByHash(ctx context.Context, hash string) (crgtypes.BlockTransactionsResponse, error) { - // TODO(fdymylja): use a faster path, by searching the block by hash, instead of doing a double query operation - blockResp, err := c.BlockByHash(ctx, hash) - if err != nil { - return crgtypes.BlockTransactionsResponse{}, err - } - - return c.blockTxs(ctx, &blockResp.Block.Index) -} - -func (c *Client) BlockTransactionsByHeight(ctx context.Context, height *int64) (crgtypes.BlockTransactionsResponse, error) { - blockTxResp, err := c.blockTxs(ctx, height) - if err != nil { - return crgtypes.BlockTransactionsResponse{}, err - } - return blockTxResp, nil -} - -// Coins fetches the existing coins in the application -func (c *Client) coins(ctx context.Context) (sdk.Coins, error) { - var result sdk.Coins - - supply, err := c.bank.TotalSupply(ctx, &bank.QueryTotalSupplyRequest{}) - if err != nil { - return nil, crgerrs.FromGRPCToRosettaError(err) - } - - pages := supply.GetPagination().GetTotal() - for i := uint64(0); i < pages; i++ { - // get next key - page := supply.GetPagination() - if page == nil { - return nil, crgerrs.WrapError(crgerrs.ErrCodec, "error pagination") - } - nextKey := page.GetNextKey() - - supply, err = c.bank.TotalSupply(ctx, &bank.QueryTotalSupplyRequest{Pagination: &query.PageRequest{Key: nextKey}}) - if err != nil { - return nil, crgerrs.FromGRPCToRosettaError(err) - } - - result = append(result[:0], supply.Supply[:]...) - } - - return result, nil -} - -func (c *Client) TxOperationsAndSignersAccountIdentifiers(signed bool, txBytes []byte) (ops []*rosettatypes.Operation, signers []*rosettatypes.AccountIdentifier, err error) { - switch signed { - case false: - rosTx, err := c.converter.ToRosetta().Tx(txBytes, nil) - if err != nil { - return nil, nil, err - } - return rosTx.Operations, nil, err - default: - ops, signers, err = c.converter.ToRosetta().OpsAndSigners(txBytes) - return - } -} - -// GetTx returns a transaction given its hash. For Rosetta we make a synthetic transaction for BeginBlock -// -// and EndBlock to adhere to balance tracking rules. -func (c *Client) GetTx(ctx context.Context, hash string) (*rosettatypes.Transaction, error) { - hashBytes, err := hex.DecodeString(hash) - if err != nil { - return nil, crgerrs.WrapError(crgerrs.ErrCodec, fmt.Sprintf("bad tx hash: %s", err)) - } - - // get tx type and hash - txType, hashBytes := c.converter.ToSDK().HashToTxType(hashBytes) - - // construct rosetta tx - switch txType { - // handle begin block hash - case BeginBlockTx: - // get block height by hash - block, err := c.tmRPC.BlockByHash(ctx, hashBytes) - if err != nil { - return nil, crgerrs.WrapError(crgerrs.ErrUnknown, err.Error()) - } - - // get block txs - fullBlock, err := c.blockTxs(ctx, &block.Block.Height) - if err != nil { - return nil, err - } - - return fullBlock.Transactions[0], nil - // handle deliver tx hash - case DeliverTxTx: - rawTx, err := c.tmRPC.Tx(ctx, hashBytes, true) - if err != nil { - return nil, crgerrs.WrapError(crgerrs.ErrUnknown, err.Error()) - } - return c.converter.ToRosetta().Tx(rawTx.Tx, &rawTx.TxResult) - // handle end block hash - case EndBlockTx: - // get block height by hash - block, err := c.tmRPC.BlockByHash(ctx, hashBytes) - if err != nil { - return nil, crgerrs.WrapError(crgerrs.ErrUnknown, err.Error()) - } - - // get block txs - fullBlock, err := c.blockTxs(ctx, &block.Block.Height) - if err != nil { - return nil, err - } - - // get last tx - return fullBlock.Transactions[len(fullBlock.Transactions)-1], nil - // unrecognized tx - default: - return nil, crgerrs.WrapError(crgerrs.ErrBadArgument, fmt.Sprintf("invalid tx hash provided: %s", hash)) - } -} - -// GetUnconfirmedTx gets an unconfirmed transaction given its hash -func (c *Client) GetUnconfirmedTx(ctx context.Context, hash string) (*rosettatypes.Transaction, error) { - res, err := c.tmRPC.UnconfirmedTxs(ctx, nil) - if err != nil { - return nil, crgerrs.WrapError(crgerrs.ErrNotFound, "unconfirmed tx not found") - } - - hashAsBytes, err := hex.DecodeString(hash) - if err != nil { - return nil, crgerrs.WrapError(crgerrs.ErrInterpreting, "invalid hash") - } - - // assert that correct tx length is provided - switch len(hashAsBytes) { - default: - return nil, crgerrs.WrapError(crgerrs.ErrBadArgument, fmt.Sprintf("unrecognized tx size: %d", len(hashAsBytes))) - case BeginEndBlockTxSize: - return nil, crgerrs.WrapError(crgerrs.ErrBadArgument, "endblock and begin block txs cannot be unconfirmed") - case DeliverTxSize: - break - } - - // iterate over unconfirmed txs to find the one with matching hash - for _, unconfirmedTx := range res.Txs { - if !bytes.Equal(unconfirmedTx.Hash(), hashAsBytes) { - continue - } - - return c.converter.ToRosetta().Tx(unconfirmedTx, nil) - } - return nil, crgerrs.WrapError(crgerrs.ErrNotFound, "transaction not found in mempool: "+hash) -} - -// Mempool returns the unconfirmed transactions in the mempool -func (c *Client) Mempool(ctx context.Context) ([]*rosettatypes.TransactionIdentifier, error) { - txs, err := c.tmRPC.UnconfirmedTxs(ctx, nil) - if err != nil { - return nil, err - } - - return c.converter.ToRosetta().TxIdentifiers(txs.Txs), nil -} - -// Peers gets the number of peers -func (c *Client) Peers(ctx context.Context) ([]*rosettatypes.Peer, error) { - netInfo, err := c.tmRPC.NetInfo(ctx) - if err != nil { - return nil, crgerrs.WrapError(crgerrs.ErrUnknown, err.Error()) - } - return c.converter.ToRosetta().Peers(netInfo.Peers), nil -} - -func (c *Client) Status(ctx context.Context) (*rosettatypes.SyncStatus, error) { - status, err := c.tmRPC.Status(ctx) - if err != nil { - return nil, crgerrs.WrapError(crgerrs.ErrUnknown, err.Error()) - } - return c.converter.ToRosetta().SyncStatus(status), err -} - -func (c *Client) PostTx(txBytes []byte) (*rosettatypes.TransactionIdentifier, map[string]interface{}, error) { - // sync ensures it will go through checkTx - res, err := c.tmRPC.BroadcastTxSync(context.Background(), txBytes) - if err != nil { - return nil, nil, crgerrs.WrapError(crgerrs.ErrUnknown, err.Error()) - } - // check if tx was broadcast successfully - if res.Code != abcitypes.CodeTypeOK { - return nil, nil, crgerrs.WrapError( - crgerrs.ErrUnknown, - fmt.Sprintf("transaction broadcast failure: (%d) %s ", res.Code, res.Log), - ) - } - - return &rosettatypes.TransactionIdentifier{ - Hash: fmt.Sprintf("%X", res.Hash), - }, - map[string]interface{}{ - Log: res.Log, - }, nil -} - -// construction endpoints - -// ConstructionMetadataFromOptions builds the metadata given the options -func (c *Client) ConstructionMetadataFromOptions(ctx context.Context, options map[string]interface{}) (meta map[string]interface{}, err error) { - if len(options) == 0 { - return nil, crgerrs.ErrBadArgument - } - - constructionOptions := new(PreprocessOperationsOptionsResponse) - - err = constructionOptions.FromMetadata(options) - if err != nil { - return nil, err - } - - // if default fees suggestion is enabled and gas limit or price is unset, use default - if c.config.EnableFeeSuggestion { - if constructionOptions.GasLimit <= 0 { - constructionOptions.GasLimit = uint64(c.config.GasToSuggest) - } - if constructionOptions.GasPrice == "" { - denom := c.config.DenomToSuggest - constructionOptions.GasPrice = c.config.GasPrices.AmountOf(denom).String() + denom - } - } - - if constructionOptions.GasLimit > 0 && constructionOptions.GasPrice != "" { - gasPrice, err := sdk.ParseDecCoin(constructionOptions.GasPrice) - if err != nil { - return nil, err - } - if !gasPrice.IsPositive() { - return nil, crgerrs.WrapError(crgerrs.ErrBadArgument, "gas price must be positive") - } - } - - signersData := make([]*SignerData, len(constructionOptions.ExpectedSigners)) - - for i, signer := range constructionOptions.ExpectedSigners { - accountInfo, err := c.accountInfo(ctx, signer, nil) - if err != nil { - return nil, err - } - - signersData[i] = accountInfo - } - - status, err := c.tmRPC.Status(ctx) - if err != nil { - return nil, err - } - - metadataResp := ConstructionMetadata{ - ChainID: status.NodeInfo.Network, - SignersData: signersData, - GasLimit: constructionOptions.GasLimit, - GasPrice: constructionOptions.GasPrice, - Memo: constructionOptions.Memo, - } - - return metadataResp.ToMetadata() -} - -func (c *Client) blockTxs(ctx context.Context, height *int64) (crgtypes.BlockTransactionsResponse, error) { - // get block info - blockInfo, err := c.tmRPC.Block(ctx, height) - if err != nil { - return crgtypes.BlockTransactionsResponse{}, err - } - // get block events - blockResults, err := c.tmRPC.BlockResults(ctx, height) - if err != nil { - return crgtypes.BlockTransactionsResponse{}, err - } - - if len(blockResults.TxsResults) != len(blockInfo.Block.Txs) { - // wtf? - panic("block results transactions do now match block transactions") - } - // process begin and end block txs - finalizeBlockTx := &rosettatypes.Transaction{ - TransactionIdentifier: &rosettatypes.TransactionIdentifier{Hash: c.converter.ToRosetta().BeginBlockTxHash(blockInfo.BlockID.Hash)}, - Operations: AddOperationIndexes( - nil, - c.converter.ToRosetta().BalanceOps(StatusTxSuccess, blockResults.FinalizeBlockEvents), - ), - } - - deliverTx := make([]*rosettatypes.Transaction, len(blockInfo.Block.Txs)) - // process normal txs - for i, tx := range blockInfo.Block.Txs { - rosTx, err := c.converter.ToRosetta().Tx(tx, blockResults.TxsResults[i]) - if err != nil { - return crgtypes.BlockTransactionsResponse{}, err - } - deliverTx[i] = rosTx - } - - finalTxs := make([]*rosettatypes.Transaction, 0, 2+len(deliverTx)) - finalTxs = append(finalTxs, deliverTx...) - finalTxs = append(finalTxs, finalizeBlockTx) - - return crgtypes.BlockTransactionsResponse{ - BlockResponse: c.converter.ToRosetta().BlockResponse(blockInfo), - Transactions: finalTxs, - }, nil -} - -var initialHeightRE = regexp.MustCompile(`"initial_height":"(\d+)"`) - -func extractInitialHeightFromGenesisChunk(genesisChunk string) (int64, error) { - firstChunk, err := base64.StdEncoding.DecodeString(genesisChunk) - if err != nil { - return 0, err - } - - matches := initialHeightRE.FindStringSubmatch(string(firstChunk)) - if len(matches) != 2 { - return 0, errors.New("failed to fetch initial_height") - } - - heightStr := matches[1] - return strconv.ParseInt(heightStr, 10, 64) -} diff --git a/tools/rosetta/client_online_test.go b/tools/rosetta/client_online_test.go deleted file mode 100644 index 9aa8965cf6e9..000000000000 --- a/tools/rosetta/client_online_test.go +++ /dev/null @@ -1,15 +0,0 @@ -package rosetta - -import ( - "encoding/base64" - "testing" - - "github.com/stretchr/testify/require" -) - -func TestRegex(t *testing.T) { - genesisChuck := base64.StdEncoding.EncodeToString([]byte(`"genesis_time":"2021-09-28T09:00:00Z","chain_id":"bombay-12","initial_height":"5900001","consensus_params":{"block":{"max_bytes":"5000000","max_gas":"1000000000","time_iota_ms":"1000"},"evidence":{"max_age_num_blocks":"100000","max_age_duration":"172800000000000","max_bytes":"50000"},"validator":{"pub_key_types":["ed25519"]},"version":{}},"validators":[{"address":"EEA4891F5F8D523A6B4B3EAC84B5C08655A00409","pub_key":{"type":"tendermint/PubKeyEd25519","value":"UX71gTBNumQq42qRd6j/K8XN/y3/HAcuAJxj97utawI="},"power":"60612","name":"BTC.Secure"},{"address":"973F589DE1CC8A54ABE2ABE0E0A4ABF13A9EBAE4","pub_key":{"type":"tendermint/PubKeyEd25519","value":"AmGQvQSAAXzSIscx/6o4rVdRMT9QvairQHaCXsWhY+c="},"power":"835","name":"MoonletWallet"},{"address":"831F402BDA0C9A3F260D4F221780BC22A4C3FB23","pub_key":{"type":"tendermint/PubKeyEd25519","value":"Tw8yKbPNEo113ZNbJJ8joeXokoMdBoazRTwb1NQ77WA="},"power":"102842","name":"BlockNgine"},{"address":"F2683F267D2B4C8714B44D68612DB37A8DD2EED7","pub_key":{"type":"tendermint/PubKeyEd25519","value":"PVE4IcWDE6QEqJSEkx55IDkg5zxBo8tVRzKFMJXYFSQ="},"power":"23200","name":"Luna Station 88"},{"address":"9D2428CBAC68C654BE11BE405344C560E6A0F626","pub_key":{"type":"tendermint/PubKeyEd25519","value":"93hzGmZjPRqOnQkb8BULjqanW3M2p1qIcLVTGkf1Zhk="},"power":"35420","name":"Terra-India"},{"address":"DC9897F22E74BF1B66E2640FA461F785F9BA7627","pub_key":{"type":"tendermint/PubKeyEd25519","value":"mlYb/Dzqwh0YJjfH59OZ4vtp+Zhdq5Oj5MNaGHq1X0E="},"power":"25163","name":"SolidStake"},{"address":"AA1A027E270A2BD7AF154999E6DE9D39C5711DE7","pub_key":{"type":"tendermint/PubKeyEd25519","value":"28z8FlpbC7sR0f1Q8OWFASDNi0FAmdldzetwQ07JJzg="},"power":"34529","name":"syncnode"},{"address":"E548735750DC5015ADDE3B0E7A1294C3B868680B","pub_key":{"type":"tendermint/PubKeyEd25519","value":"BTDtLSKp4wpQrWBwmGvp9isWC5jXaAtX1nrJtsCEWew="},"power":"36082","name":"OneStar"}`)) - height, err := extractInitialHeightFromGenesisChunk(genesisChuck) - require.NoError(t, err) - require.Equal(t, height, int64(5900001)) -} diff --git a/tools/rosetta/cmd/rosetta.go b/tools/rosetta/cmd/rosetta.go deleted file mode 100644 index 9ed7935f5b97..000000000000 --- a/tools/rosetta/cmd/rosetta.go +++ /dev/null @@ -1,42 +0,0 @@ -package cmd - -import ( - "fmt" - - "github.com/spf13/cobra" - - "cosmossdk.io/tools/rosetta" - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" -) - -// RosettaCommand builds the rosetta root command given -// a protocol buffers serializer/deserializer -func RosettaCommand(ir codectypes.InterfaceRegistry, cdc codec.Codec) *cobra.Command { - cmd := &cobra.Command{ - Use: "rosetta", - Short: "spin up a rosetta server", - RunE: func(cmd *cobra.Command, args []string) error { - conf, err := rosetta.FromFlags(cmd.Flags()) - if err != nil { - return err - } - - protoCodec, ok := cdc.(*codec.ProtoCodec) - if !ok { - return fmt.Errorf("exoected *codec.ProtoMarshaler, got: %T", cdc) - } - conf.WithCodec(ir, protoCodec) - - rosettaSrv, err := rosetta.ServerFromConfig(conf) - if err != nil { - fmt.Printf("[Rosetta]- Error while creating server: %s", err.Error()) - return err - } - return rosettaSrv.Start() - }, - } - rosetta.SetFlags(cmd.Flags()) - - return cmd -} diff --git a/tools/rosetta/cmd/rosetta/main.go b/tools/rosetta/cmd/rosetta/main.go deleted file mode 100644 index b5454f2f5490..000000000000 --- a/tools/rosetta/cmd/rosetta/main.go +++ /dev/null @@ -1,23 +0,0 @@ -package main - -import ( - "os" - - "cosmossdk.io/log" - rosettaCmd "cosmossdk.io/tools/rosetta/cmd" - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" -) - -func main() { - var ( - logger = log.NewLogger(os.Stdout).With(log.ModuleKey, "rosetta") - interfaceRegistry = codectypes.NewInterfaceRegistry() - cdc = codec.NewProtoCodec(interfaceRegistry) - ) - - if err := rosettaCmd.RosettaCommand(interfaceRegistry, cdc).Execute(); err != nil { - logger.Error("failed to run rosetta", "error", err) - os.Exit(1) - } -} diff --git a/tools/rosetta/codec.go b/tools/rosetta/codec.go deleted file mode 100644 index 7f284186574e..000000000000 --- a/tools/rosetta/codec.go +++ /dev/null @@ -1,42 +0,0 @@ -package rosetta - -import ( - "cosmossdk.io/x/tx/signing" - "github.com/cosmos/gogoproto/proto" - - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/codec/address" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - authcodec "github.com/cosmos/cosmos-sdk/x/auth/types" - bankcodec "github.com/cosmos/cosmos-sdk/x/bank/types" -) - -// MakeCodec generates the codec required to interact -// with the cosmos APIs used by the rosetta gateway -func MakeCodec() (*codec.ProtoCodec, codectypes.InterfaceRegistry) { - ir, err := codectypes.NewInterfaceRegistryWithOptions( - codectypes.InterfaceRegistryOptions{ - ProtoFiles: proto.HybridResolver, - SigningOptions: signing.Options{ - AddressCodec: address.Bech32Codec{ - Bech32Prefix: sdk.GetConfig().GetBech32AccountAddrPrefix(), - }, - ValidatorAddressCodec: address.Bech32Codec{ - Bech32Prefix: sdk.GetConfig().GetBech32ValidatorAddrPrefix(), - }, - }, - }, - ) - if err != nil { - panic(err) - } - cdc := codec.NewProtoCodec(ir) - - authcodec.RegisterInterfaces(ir) - bankcodec.RegisterInterfaces(ir) - cryptocodec.RegisterInterfaces(ir) - - return cdc, ir -} diff --git a/tools/rosetta/config.go b/tools/rosetta/config.go deleted file mode 100644 index a6c0d61a88e1..000000000000 --- a/tools/rosetta/config.go +++ /dev/null @@ -1,269 +0,0 @@ -package rosetta - -import ( - "fmt" - "strings" - "time" - - "github.com/coinbase/rosetta-sdk-go/types" - "github.com/spf13/pflag" - - crg "cosmossdk.io/tools/rosetta/lib/server" - - clientflags "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// configuration defaults constants -const ( - // DefaultBlockchain defines the default blockchain identifier name - DefaultBlockchain = "app" - // DefaultAddr defines the default rosetta binding address - DefaultAddr = ":8080" - // DefaultRetries is the default number of retries - DefaultRetries = 5 - // DefaultCometEndpoint is the default value for the CometBFT endpoint - DefaultCometEndpoint = "localhost:26657" - // DefaultGRPCEndpoint is the default value for the gRPC endpoint - DefaultGRPCEndpoint = "localhost:9090" - // DefaultNetwork defines the default network name - DefaultNetwork = "network" - // DefaultOffline defines the default offline value - DefaultOffline = false - // DefaultEnableFeeSuggestion indicates to use fee suggestion if `construction/metadata` is called without gas limit and price - DefaultEnableFeeSuggestion = false - // DenomToSuggest defines the default denom for fee suggestion - DenomToSuggest = "uatom" - // DefaultPrices defines the default list of prices to suggest - DefaultPrices = "1uatom,1stake" -) - -// configuration flags -const ( - FlagBlockchain = "blockchain" - FlagNetwork = "network" - FlagTendermintEndpoint = "tendermint" - FlagGRPCEndpoint = "grpc" - FlagAddr = "addr" - FlagRetries = "retries" - FlagOffline = "offline" - FlagEnableFeeSuggestion = "enable-fee-suggestion" - FlagGasToSuggest = "gas-to-suggest" - FlagDenomToSuggest = "denom-to-suggest" - FlagPricesToSuggest = "prices-to-suggest" -) - -// Config defines the configuration of the rosetta server -type Config struct { - // Blockchain defines the blockchain name - // defaults to DefaultBlockchain - Blockchain string - // Network defines the network name - Network string - // TendermintRPC defines the endpoint to connect to - // CometBFT RPC, specifying 'tcp://' before is not - // required, usually it's at port 26657 of the - TendermintRPC string - // GRPCEndpoint defines the cosmos application gRPC endpoint - // usually it is located at 9090 port - GRPCEndpoint string - // Addr defines the default address to bind the rosetta server to - // defaults to DefaultAddr - Addr string - // Retries defines the maximum number of retries - // rosetta will do before quitting - Retries int - // Offline defines if the server must be run in offline mode - Offline bool - // EnableFeeSuggestion indicates to use fee suggestion when `construction/metadata` is called without gas limit and price - EnableFeeSuggestion bool - // GasToSuggest defines the gas limit for fee suggestion - GasToSuggest int - // DenomToSuggest defines the default denom for fee suggestion - DenomToSuggest string - // GasPrices defines the gas prices for fee suggestion - GasPrices sdk.DecCoins - // Codec overrides the default data and construction api client codecs - Codec *codec.ProtoCodec - // InterfaceRegistry overrides the default data and construction api interface registry - InterfaceRegistry codectypes.InterfaceRegistry -} - -// NetworkIdentifier returns the network identifier given the configuration -func (c *Config) NetworkIdentifier() *types.NetworkIdentifier { - return &types.NetworkIdentifier{ - Blockchain: c.Blockchain, - Network: c.Network, - } -} - -// validate validates a configuration and sets -// its defaults in case they were not provided -func (c *Config) validate() error { - if (c.Codec == nil) != (c.InterfaceRegistry == nil) { - return fmt.Errorf("codec and interface registry must be both different from nil or nil") - } - - if c.Addr == "" { - c.Addr = DefaultAddr - } - if c.Blockchain == "" { - c.Blockchain = DefaultBlockchain - } - if c.Retries == 0 { - c.Retries = DefaultRetries - } - // these are must - if c.Network == "" { - return fmt.Errorf("network not provided") - } - if c.GasToSuggest <= 0 { - return fmt.Errorf("gas to suggest must be positive") - } - if c.EnableFeeSuggestion { - found := false - for i := 0; i < c.GasPrices.Len(); i++ { - if c.GasPrices.GetDenomByIndex(i) == c.DenomToSuggest { - found = true - break - } - } - if !found { - return fmt.Errorf("default suggest denom is not found in prices to suggest") - } - } - - // these are optional but it must be online - if c.GRPCEndpoint == "" { - return fmt.Errorf("grpc endpoint not provided") - } - if c.TendermintRPC == "" { - return fmt.Errorf("cometbft rpc not provided") - } - if !strings.HasPrefix(c.TendermintRPC, "tcp://") { - c.TendermintRPC = fmt.Sprintf("tcp://%s", c.TendermintRPC) - } - - return nil -} - -// WithCodec extends the configuration with a predefined Codec -func (c *Config) WithCodec(ir codectypes.InterfaceRegistry, cdc *codec.ProtoCodec) { - c.Codec = cdc - c.InterfaceRegistry = ir -} - -// FromFlags gets the configuration from flags -func FromFlags(flags *pflag.FlagSet) (*Config, error) { - blockchain, err := flags.GetString(FlagBlockchain) - if err != nil { - return nil, err - } - network, err := flags.GetString(FlagNetwork) - if err != nil { - return nil, err - } - tendermintRPC, err := flags.GetString(FlagTendermintEndpoint) - if err != nil { - return nil, err - } - gRPCEndpoint, err := flags.GetString(FlagGRPCEndpoint) - if err != nil { - return nil, err - } - addr, err := flags.GetString(FlagAddr) - if err != nil { - return nil, err - } - retries, err := flags.GetInt(FlagRetries) - if err != nil { - return nil, err - } - offline, err := flags.GetBool(FlagOffline) - if err != nil { - return nil, err - } - enableDefaultFeeSuggestion, err := flags.GetBool(FlagEnableFeeSuggestion) - if err != nil { - return nil, err - } - gasToSuggest, err := flags.GetInt(FlagGasToSuggest) - if err != nil { - return nil, err - } - denomToSuggest, err := flags.GetString(FlagDenomToSuggest) - if err != nil { - return nil, err - } - - var prices sdk.DecCoins - if enableDefaultFeeSuggestion { - pricesToSuggest, err := flags.GetString(FlagPricesToSuggest) - if err != nil { - return nil, err - } - prices, err = sdk.ParseDecCoins(pricesToSuggest) - if err != nil { - return nil, err - } - } - - conf := &Config{ - Blockchain: blockchain, - Network: network, - TendermintRPC: tendermintRPC, - GRPCEndpoint: gRPCEndpoint, - Addr: addr, - Retries: retries, - Offline: offline, - EnableFeeSuggestion: enableDefaultFeeSuggestion, - GasToSuggest: gasToSuggest, - DenomToSuggest: denomToSuggest, - GasPrices: prices, - } - err = conf.validate() - if err != nil { - return nil, err - } - return conf, nil -} - -func ServerFromConfig(conf *Config) (crg.Server, error) { - err := conf.validate() - if err != nil { - return crg.Server{}, err - } - client, err := NewClient(conf) - if err != nil { - return crg.Server{}, err - } - return crg.NewServer( - crg.Settings{ - Network: &types.NetworkIdentifier{ - Blockchain: conf.Blockchain, - Network: conf.Network, - }, - Client: client, - Listen: conf.Addr, - Offline: conf.Offline, - Retries: conf.Retries, - RetryWait: 15 * time.Second, - }) -} - -// SetFlags sets the configuration flags to the given flagset -func SetFlags(flags *pflag.FlagSet) { - flags.String(FlagBlockchain, DefaultBlockchain, "the blockchain type") - flags.String(FlagNetwork, DefaultNetwork, "the network name") - flags.String(FlagTendermintEndpoint, DefaultCometEndpoint, "the CometBFT rpc endpoint, without tcp://") - flags.String(FlagGRPCEndpoint, DefaultGRPCEndpoint, "the app gRPC endpoint") - flags.String(FlagAddr, DefaultAddr, "the address rosetta will bind to") - flags.Int(FlagRetries, DefaultRetries, "the number of retries that will be done before quitting") - flags.Bool(FlagOffline, DefaultOffline, "run rosetta only with construction API") - flags.Bool(FlagEnableFeeSuggestion, DefaultEnableFeeSuggestion, "enable default fee suggestion") - flags.Int(FlagGasToSuggest, clientflags.DefaultGasLimit, "default gas for fee suggestion") - flags.String(FlagDenomToSuggest, DenomToSuggest, "default denom for fee suggestion") - flags.String(FlagPricesToSuggest, DefaultPrices, "default prices for fee suggestion") -} diff --git a/tools/rosetta/converter.go b/tools/rosetta/converter.go deleted file mode 100644 index 317225c2c44f..000000000000 --- a/tools/rosetta/converter.go +++ /dev/null @@ -1,804 +0,0 @@ -package rosetta - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "reflect" - - rosettatypes "github.com/coinbase/rosetta-sdk-go/types" - abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/crypto" - tmcoretypes "github.com/cometbft/cometbft/rpc/core/types" - cmttypes "github.com/cometbft/cometbft/types" - secp "github.com/decred/dcrd/dcrec/secp256k1/v4" - - sdkmath "cosmossdk.io/math" - - crgerrs "cosmossdk.io/tools/rosetta/lib/errors" - crgtypes "cosmossdk.io/tools/rosetta/lib/types" - - sdkclient "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" -) - -// Converter is a utility that can be used to convert -// back and forth from rosetta to sdk and CometBFT types. -// IMPORTANT NOTES: -// - IT SHOULD BE USED ONLY TO DEAL WITH THINGS -// IN A STATELESS WAY! IT SHOULD NEVER INTERACT DIRECTLY -// WITH COMETBFT RPC AND COSMOS GRPC -// -// - IT SHOULD RETURN cosmos rosetta gateway error types! -type Converter interface { - // ToSDK exposes the methods that convert - // rosetta types to cosmos sdk and CometBFT types - ToSDK() ToSDKConverter - // ToRosetta exposes the methods that convert - // sdk and CometBFT types to rosetta types - ToRosetta() ToRosettaConverter -} - -// ToRosettaConverter is an interface that exposes -// all the functions used to convert sdk and -// CometBFT types to rosetta known types -type ToRosettaConverter interface { - // BlockResponse returns a block response given a result block - BlockResponse(block *tmcoretypes.ResultBlock) crgtypes.BlockResponse - // BeginBlockToTx converts the given begin block hash to rosetta transaction hash - BeginBlockTxHash(blockHash []byte) string - // EndBlockTxHash converts the given endblock hash to rosetta transaction hash - EndBlockTxHash(blockHash []byte) string - // Amounts converts sdk.Coins to rosetta.Amounts - Amounts(ownedCoins []sdk.Coin, availableCoins sdk.Coins) []*rosettatypes.Amount - // Ops converts an sdk.Msg to rosetta operations - Ops(status string, msg sdk.Msg) ([]*rosettatypes.Operation, error) - // OpsAndSigners takes raw transaction bytes and returns rosetta operations and the expected signers - OpsAndSigners(txBytes []byte) (ops []*rosettatypes.Operation, signers []*rosettatypes.AccountIdentifier, err error) - // Meta converts an sdk.Msg to rosetta metadata - Meta(msg sdk.Msg) (meta map[string]interface{}, err error) - // SignerData returns account signing data from a queried any account - SignerData(anyAccount *codectypes.Any) (*SignerData, error) - // SigningComponents returns rosetta's components required to build a signable transaction - SigningComponents(tx authsigning.Tx, metadata *ConstructionMetadata, rosPubKeys []*rosettatypes.PublicKey) (txBytes []byte, payloadsToSign []*rosettatypes.SigningPayload, err error) - // Tx converts a CometBFT transaction and tx result if provided to a rosetta tx - Tx(rawTx cmttypes.Tx, txResult *abci.ExecTxResult) (*rosettatypes.Transaction, error) - // TxIdentifiers converts a CometBFT tx to transaction identifiers - TxIdentifiers(txs []cmttypes.Tx) []*rosettatypes.TransactionIdentifier - // BalanceOps converts events to balance operations - BalanceOps(status string, events []abci.Event) []*rosettatypes.Operation - // SyncStatus converts a CometBFT status to sync status - SyncStatus(status *tmcoretypes.ResultStatus) *rosettatypes.SyncStatus - // Peers converts CometBFT peers to rosetta - Peers(peers []tmcoretypes.Peer) []*rosettatypes.Peer -} - -// ToSDKConverter is an interface that exposes -// all the functions used to convert rosetta types -// to CometBFT and sdk types -type ToSDKConverter interface { - // UnsignedTx converts rosetta operations to an unsigned cosmos sdk transactions - UnsignedTx(ops []*rosettatypes.Operation) (tx authsigning.Tx, err error) - // SignedTx adds the provided signatures after decoding the unsigned transaction raw bytes - // and returns the signed tx bytes - SignedTx(txBytes []byte, signatures []*rosettatypes.Signature) (signedTxBytes []byte, err error) - // Msg converts metadata to an sdk message - Msg(meta map[string]interface{}, msg sdk.Msg) (err error) - // HashToTxType returns the transaction type (end block, begin block or deliver tx) - // and the real hash to query in order to get information - HashToTxType(hashBytes []byte) (txType TransactionType, realHash []byte) - // PubKey attempts to convert a rosetta public key to cosmos sdk one - PubKey(pk *rosettatypes.PublicKey) (cryptotypes.PubKey, error) -} - -type converter struct { - newTxBuilder func() sdkclient.TxBuilder - txBuilderFromTx func(tx sdk.Tx) (sdkclient.TxBuilder, error) - txDecode sdk.TxDecoder - txEncode sdk.TxEncoder - bytesToSign func(tx authsigning.Tx, signerData authsigning.SignerData) (b []byte, err error) - ir codectypes.InterfaceRegistry - cdc *codec.ProtoCodec -} - -func NewConverter(cdc *codec.ProtoCodec, ir codectypes.InterfaceRegistry, cfg sdkclient.TxConfig) Converter { - return converter{ - newTxBuilder: cfg.NewTxBuilder, - txBuilderFromTx: cfg.WrapTxBuilder, - txDecode: cfg.TxDecoder(), - txEncode: cfg.TxEncoder(), - bytesToSign: func(tx authsigning.Tx, signerData authsigning.SignerData) (b []byte, err error) { - bytesToSign, err := authsigning.GetSignBytesAdapter( - context.Background(), cfg.SignModeHandler(), - signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON, signerData, tx) - if err != nil { - return nil, err - } - - return crypto.Sha256(bytesToSign), nil - }, - ir: ir, - cdc: cdc, - } -} - -func (c converter) ToSDK() ToSDKConverter { - return c -} - -func (c converter) ToRosetta() ToRosettaConverter { - return c -} - -// OpsToUnsignedTx returns all the sdk.Msgs given the operations -func (c converter) UnsignedTx(ops []*rosettatypes.Operation) (tx authsigning.Tx, err error) { - builder := c.newTxBuilder() - - var msgs []sdk.Msg - - for i := 0; i < len(ops); i++ { - op := ops[i] - - msg, err := c.ir.Resolve(op.Type) - if err != nil { - return nil, crgerrs.WrapError(crgerrs.ErrBadArgument, "operation not found: "+op.Type) - } - - err = c.Msg(op.Metadata, msg) - if err != nil { - return nil, crgerrs.WrapError(crgerrs.ErrCodec, err.Error()) - } - - // verify message correctness - if m, ok := msg.(sdk.HasValidateBasic); ok { - if err = m.ValidateBasic(); err != nil { - return nil, crgerrs.WrapError( - crgerrs.ErrBadArgument, - fmt.Sprintf("validation of operation at index %d failed: %s", op.OperationIdentifier.Index, err), - ) - } - } - - signers, _, err := c.cdc.GetMsgV1Signers(msg) - if err != nil { - return nil, crgerrs.WrapError(crgerrs.ErrBadArgument, err.Error()) - } - - // check if there are enough signers - if len(signers) == 0 { - return nil, crgerrs.WrapError(crgerrs.ErrBadArgument, fmt.Sprintf("operation at index %d got no signers", op.OperationIdentifier.Index)) - } - // append the msg - msgs = append(msgs, msg) - // if there's only one signer then simply continue - if len(signers) == 1 { - continue - } - // after we have got the msg, we need to verify if the message has multiple signers - // if it has got multiple signers, then we need to fetch all the related operations - // which involve the other signers of the msg, we expect to find them in order - // so if the msg is named "v1.test.Send" and it expects 3 signers, the next 3 operations - // must be with the same name "v1.test.Send" and contain the other signers - // then we can just skip their processing - for j := 0; j < len(signers)-1; j++ { - skipOp := ops[i+j] // get the next index - // verify that the operation is equal to the new one - if skipOp.Type != op.Type { - return nil, crgerrs.WrapError( - crgerrs.ErrBadArgument, - fmt.Sprintf("operation at index %d should have had type %s got: %s", i+j, op.Type, skipOp.Type), - ) - } - - if !reflect.DeepEqual(op.Metadata, skipOp.Metadata) { - return nil, crgerrs.WrapError( - crgerrs.ErrBadArgument, - fmt.Sprintf("operation at index %d should have had metadata equal to %#v, got: %#v", i+j, op.Metadata, skipOp.Metadata)) - } - - i++ // increase so we skip it - } - } - - if err := builder.SetMsgs(msgs...); err != nil { - return nil, crgerrs.WrapError(crgerrs.ErrBadArgument, err.Error()) - } - - return builder.GetTx(), nil -} - -// Msg unmarshals the rosetta metadata to the given sdk.Msg -func (c converter) Msg(meta map[string]interface{}, msg sdk.Msg) error { - metaBytes, err := json.Marshal(meta) - if err != nil { - return err - } - return c.cdc.UnmarshalJSON(metaBytes, msg) -} - -func (c converter) Meta(msg sdk.Msg) (meta map[string]interface{}, err error) { - b, err := c.cdc.MarshalJSON(msg) - if err != nil { - return nil, crgerrs.WrapError(crgerrs.ErrCodec, err.Error()) - } - - err = json.Unmarshal(b, &meta) - if err != nil { - return nil, crgerrs.WrapError(crgerrs.ErrCodec, err.Error()) - } - - return -} - -// Ops will create an operation for each msg signer -// with the message proto name as type, and the raw fields -// as metadata -func (c converter) Ops(status string, msg sdk.Msg) ([]*rosettatypes.Operation, error) { - opName := sdk.MsgTypeURL(msg) - - meta, err := c.Meta(msg) - if err != nil { - return nil, err - } - - signers, _, err := c.cdc.GetMsgV1Signers(msg) - if err != nil { - return nil, err - } - - ops := make([]*rosettatypes.Operation, len(signers)) - for i, signer := range signers { - signerStr, err := c.ir.SigningContext().AddressCodec().BytesToString(signer) - if err != nil { - return nil, err - } - - op := &rosettatypes.Operation{ - Type: opName, - Status: &status, - Account: &rosettatypes.AccountIdentifier{Address: signerStr}, - Metadata: meta, - } - - ops[i] = op - } - - return ops, nil -} - -// Tx converts a CometBFT raw transaction and its result (if provided) to a rosetta transaction -func (c converter) Tx(rawTx cmttypes.Tx, txResult *abci.ExecTxResult) (*rosettatypes.Transaction, error) { - // decode tx - tx, err := c.txDecode(rawTx) - if err != nil { - return nil, crgerrs.WrapError(crgerrs.ErrCodec, err.Error()) - } - // get initial status, as per sdk design, if one msg fails - // the whole TX will be considered failing, so we can't have - // 1 msg being success and 1 msg being reverted - status := StatusTxSuccess - switch txResult { - // if nil, we're probably checking an unconfirmed tx - // or trying to build a new transaction, so status - // is not put inside - case nil: - status = "" - // set the status - default: - if txResult.Code != abci.CodeTypeOK { - status = StatusTxReverted - } - } - // get operations from msgs - msgs := tx.GetMsgs() - var rawTxOps []*rosettatypes.Operation - - for _, msg := range msgs { - ops, err := c.Ops(status, msg) - if err != nil { - return nil, err - } - rawTxOps = append(rawTxOps, ops...) - } - - // now get balance events from response deliver tx - var balanceOps []*rosettatypes.Operation - // tx result might be nil, in case we're querying an unconfirmed tx from the mempool - if txResult != nil { - balanceOps = c.BalanceOps(StatusTxSuccess, txResult.Events) // force set to success because no events for failed tx - } - - // now normalize indexes - totalOps := AddOperationIndexes(rawTxOps, balanceOps) - - return &rosettatypes.Transaction{ - TransactionIdentifier: &rosettatypes.TransactionIdentifier{Hash: fmt.Sprintf("%X", rawTx.Hash())}, - Operations: totalOps, - }, nil -} - -func (c converter) BalanceOps(status string, events []abci.Event) []*rosettatypes.Operation { - var ops []*rosettatypes.Operation - - for _, e := range events { - balanceOps, ok := sdkEventToBalanceOperations(status, e) - if !ok { - continue - } - ops = append(ops, balanceOps...) - } - - return ops -} - -// sdkEventToBalanceOperations converts an event to a rosetta balance operation -// it will panic if the event is malformed because it might mean the sdk spec -// has changed and rosetta needs to reflect those changes too. -// The balance operations are multiple, one for each denom. -func sdkEventToBalanceOperations(status string, event abci.Event) (operations []*rosettatypes.Operation, isBalanceEvent bool) { - var ( - accountIdentifier string - coinChange sdk.Coins - isSub bool - ) - - switch event.Type { - default: - return nil, false - case banktypes.EventTypeCoinSpent: - spender := sdk.MustAccAddressFromBech32(event.Attributes[0].Value) - coins, err := sdk.ParseCoinsNormalized(event.Attributes[1].Value) - if err != nil { - panic(err) - } - - isSub = true - coinChange = coins - accountIdentifier = spender.String() - - case banktypes.EventTypeCoinReceived: - receiver := sdk.MustAccAddressFromBech32(event.Attributes[0].Value) - coins, err := sdk.ParseCoinsNormalized(event.Attributes[1].Value) - if err != nil { - panic(err) - } - - isSub = false - coinChange = coins - accountIdentifier = receiver.String() - - // rosetta does not have the concept of burning coins, so we need to mock - // the burn as a send to an address that cannot be resolved to anything - case banktypes.EventTypeCoinBurn: - coins, err := sdk.ParseCoinsNormalized(event.Attributes[1].Value) - if err != nil { - panic(err) - } - - coinChange = coins - accountIdentifier = BurnerAddressIdentifier - } - - operations = make([]*rosettatypes.Operation, len(coinChange)) - - for i, coin := range coinChange { - - value := coin.Amount.String() - // in case the event is a subtract balance one the rewrite value with - // the negative coin identifier - if isSub { - value = "-" + value - } - - op := &rosettatypes.Operation{ - Type: event.Type, - Status: &status, - Account: &rosettatypes.AccountIdentifier{Address: accountIdentifier}, - Amount: &rosettatypes.Amount{ - Value: value, - Currency: &rosettatypes.Currency{ - Symbol: coin.Denom, - Decimals: 0, - }, - }, - } - - operations[i] = op - } - return operations, true -} - -// Amounts converts []sdk.Coin to rosetta amounts -func (c converter) Amounts(ownedCoins []sdk.Coin, availableCoins sdk.Coins) []*rosettatypes.Amount { - amounts := make([]*rosettatypes.Amount, len(availableCoins)) - ownedCoinsMap := make(map[string]sdkmath.Int, len(availableCoins)) - - for _, ownedCoin := range ownedCoins { - ownedCoinsMap[ownedCoin.Denom] = ownedCoin.Amount - } - - for i, coin := range availableCoins { - value, owned := ownedCoinsMap[coin.Denom] - if !owned { - amounts[i] = &rosettatypes.Amount{ - Value: sdkmath.NewInt(0).String(), - Currency: &rosettatypes.Currency{ - Symbol: coin.Denom, - }, - } - continue - } - amounts[i] = &rosettatypes.Amount{ - Value: value.String(), - Currency: &rosettatypes.Currency{ - Symbol: coin.Denom, - }, - } - } - - return amounts -} - -// AddOperationIndexes adds the indexes to operations adhering to specific rules: -// operations related to messages will be always before than the balance ones -func AddOperationIndexes(msgOps, balanceOps []*rosettatypes.Operation) (finalOps []*rosettatypes.Operation) { - lenMsgOps := len(msgOps) - lenBalanceOps := len(balanceOps) - finalOps = make([]*rosettatypes.Operation, 0, lenMsgOps+lenBalanceOps) - - var currentIndex int64 - // add indexes to msg ops - for _, op := range msgOps { - op.OperationIdentifier = &rosettatypes.OperationIdentifier{ - Index: currentIndex, - } - - finalOps = append(finalOps, op) - currentIndex++ - } - - // add indexes to balance ops - for _, op := range balanceOps { - op.OperationIdentifier = &rosettatypes.OperationIdentifier{ - Index: currentIndex, - } - - finalOps = append(finalOps, op) - currentIndex++ - } - - return finalOps -} - -// EndBlockTxHash produces a mock endblock hash that rosetta can query -// for endblock operations, it also serves the purpose of representing -// part of the state changes happening at endblock level (balance ones) -func (c converter) EndBlockTxHash(hash []byte) string { - final := append([]byte{EndBlockHashStart}, hash...) - return fmt.Sprintf("%X", final) -} - -// BeginBlockTxHash produces a mock beginblock hash that rosetta can query -// for beginblock operations, it also serves the purpose of representing -// part of the state changes happening at beginblock level (balance ones) -func (c converter) BeginBlockTxHash(hash []byte) string { - final := append([]byte{BeginBlockHashStart}, hash...) - return fmt.Sprintf("%X", final) -} - -// HashToTxType takes the provided hash bytes from rosetta and discerns if they are -// a deliver tx type or endblock/begin block hash, returning the real hash afterwards -func (c converter) HashToTxType(hashBytes []byte) (txType TransactionType, realHash []byte) { - switch len(hashBytes) { - case DeliverTxSize: - return DeliverTxTx, hashBytes - - case BeginEndBlockTxSize: - switch hashBytes[0] { - case BeginBlockHashStart: - return BeginBlockTx, hashBytes[1:] - case EndBlockHashStart: - return EndBlockTx, hashBytes[1:] - default: - return UnrecognizedTx, nil - } - - default: - return UnrecognizedTx, nil - } -} - -// StatusToSyncStatus converts a CometBFT status to rosetta sync status -func (c converter) SyncStatus(status *tmcoretypes.ResultStatus) *rosettatypes.SyncStatus { - // determine sync status - stage := StatusPeerSynced - if status.SyncInfo.CatchingUp { - stage = StatusPeerSyncing - } - - return &rosettatypes.SyncStatus{ - CurrentIndex: &status.SyncInfo.LatestBlockHeight, - TargetIndex: nil, // sync info does not allow us to get target height - Stage: &stage, - } -} - -// TxIdentifiers converts a CometBFT raw transactions into an array of rosetta tx identifiers -func (c converter) TxIdentifiers(txs []cmttypes.Tx) []*rosettatypes.TransactionIdentifier { - converted := make([]*rosettatypes.TransactionIdentifier, len(txs)) - for i, tx := range txs { - converted[i] = &rosettatypes.TransactionIdentifier{Hash: fmt.Sprintf("%X", tx.Hash())} - } - - return converted -} - -// tmResultBlockToRosettaBlockResponse converts a CometBFT result block to block response -func (c converter) BlockResponse(block *tmcoretypes.ResultBlock) crgtypes.BlockResponse { - var parentBlock *rosettatypes.BlockIdentifier - - switch block.Block.Height { - case 1: - parentBlock = &rosettatypes.BlockIdentifier{ - Index: 1, - Hash: fmt.Sprintf("%X", block.BlockID.Hash.Bytes()), - } - default: - parentBlock = &rosettatypes.BlockIdentifier{ - Index: block.Block.Height - 1, - Hash: fmt.Sprintf("%X", block.Block.LastBlockID.Hash.Bytes()), - } - } - return crgtypes.BlockResponse{ - Block: &rosettatypes.BlockIdentifier{ - Index: block.Block.Height, - Hash: block.Block.Hash().String(), - }, - ParentBlock: parentBlock, - MillisecondTimestamp: timeToMilliseconds(block.Block.Time), - TxCount: int64(len(block.Block.Txs)), - } -} - -// Peers converts tm peers to rosetta peers -func (c converter) Peers(peers []tmcoretypes.Peer) []*rosettatypes.Peer { - converted := make([]*rosettatypes.Peer, len(peers)) - - for i, peer := range peers { - converted[i] = &rosettatypes.Peer{ - PeerID: peer.NodeInfo.Moniker, - Metadata: map[string]interface{}{ - "addr": peer.NodeInfo.ListenAddr, - }, - } - } - - return converted -} - -// OpsAndSigners takes transactions bytes and returns the operation, is signed is true it will return -// the account identifiers which have signed the transaction -func (c converter) OpsAndSigners(txBytes []byte) (ops []*rosettatypes.Operation, signers []*rosettatypes.AccountIdentifier, err error) { - rosTx, err := c.ToRosetta().Tx(txBytes, nil) - if err != nil { - return nil, nil, err - } - ops = rosTx.Operations - - // get the signers - sdkTx, err := c.txDecode(txBytes) - if err != nil { - return nil, nil, crgerrs.WrapError(crgerrs.ErrCodec, err.Error()) - } - - txBuilder, err := c.txBuilderFromTx(sdkTx) - if err != nil { - return nil, nil, crgerrs.WrapError(crgerrs.ErrCodec, err.Error()) - } - - signerAddrs, err := txBuilder.GetTx().GetSigners() - if err != nil { - return nil, nil, crgerrs.WrapError(crgerrs.ErrBadArgument, err.Error()) - } - - for _, signer := range signerAddrs { - var signerStr string - signerStr, err = c.ir.SigningContext().AddressCodec().BytesToString(signer) - if err != nil { - return - } - - signers = append(signers, &rosettatypes.AccountIdentifier{ - Address: signerStr, - }) - } - - return ops, signers, nil -} - -func (c converter) SignedTx(txBytes []byte, signatures []*rosettatypes.Signature) (signedTxBytes []byte, err error) { - rawTx, err := c.txDecode(txBytes) - if err != nil { - return nil, err - } - - txBuilder, err := c.txBuilderFromTx(rawTx) - if err != nil { - return nil, err - } - - notSignedSigs, err := txBuilder.GetTx().GetSignaturesV2() // - if err != nil { - return nil, crgerrs.WrapError(crgerrs.ErrCodec, err.Error()) - } - - if len(notSignedSigs) != len(signatures) { - return nil, crgerrs.WrapError( - crgerrs.ErrInvalidTransaction, - fmt.Sprintf("expected transaction to have signers data matching the provided signatures: %d <-> %d", len(notSignedSigs), len(signatures))) - } - - signedSigs := make([]signing.SignatureV2, len(notSignedSigs)) - for i, signature := range signatures { - // TODO(fdymylja): here we should check that the public key matches... - signedSigs[i] = signing.SignatureV2{ - PubKey: notSignedSigs[i].PubKey, - Data: &signing.SingleSignatureData{ - SignMode: signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON, - Signature: signature.Bytes, - }, - Sequence: notSignedSigs[i].Sequence, - } - } - - if err = txBuilder.SetSignatures(signedSigs...); err != nil { - return nil, err - } - - txBytes, err = c.txEncode(txBuilder.GetTx()) - if err != nil { - return nil, err - } - - return txBytes, nil -} - -func (c converter) PubKey(pubKey *rosettatypes.PublicKey) (cryptotypes.PubKey, error) { - if pubKey.CurveType != "secp256k1" { - return nil, crgerrs.WrapError(crgerrs.ErrUnsupportedCurve, "only secp256k1 supported") - } - - cmp, err := secp.ParsePubKey(pubKey.Bytes) - if err != nil { - return nil, crgerrs.WrapError(crgerrs.ErrBadArgument, err.Error()) - } - - compressedPublicKey := make([]byte, secp256k1.PubKeySize) - copy(compressedPublicKey, cmp.SerializeCompressed()) - - pk := &secp256k1.PubKey{Key: compressedPublicKey} - - return pk, nil -} - -// SigningComponents takes a sdk tx and construction metadata and returns signable components -func (c converter) SigningComponents(tx authsigning.Tx, metadata *ConstructionMetadata, rosPubKeys []*rosettatypes.PublicKey) (txBytes []byte, payloadsToSign []*rosettatypes.SigningPayload, err error) { - // verify metadata correctness - feeAmount, err := sdk.ParseCoinsNormalized(metadata.GasPrice) - if err != nil { - return nil, nil, crgerrs.WrapError(crgerrs.ErrBadArgument, err.Error()) - } - - signers, err := tx.GetSigners() - if err != nil { - return nil, nil, crgerrs.WrapError(crgerrs.ErrBadArgument, err.Error()) - } - - // assert the signers data provided in options are the same as the expected signing accounts - // and that the number of rosetta provided public keys equals the one of the signers - if len(metadata.SignersData) != len(signers) || len(signers) != len(rosPubKeys) { - return nil, nil, crgerrs.WrapError(crgerrs.ErrBadArgument, "signers data and account identifiers mismatch") - } - - // add transaction metadata - builder, err := c.txBuilderFromTx(tx) - if err != nil { - return nil, nil, crgerrs.WrapError(crgerrs.ErrCodec, err.Error()) - } - builder.SetFeeAmount(feeAmount) - builder.SetGasLimit(metadata.GasLimit) - builder.SetMemo(metadata.Memo) - - // build signatures - partialSignatures := make([]signing.SignatureV2, len(signers)) - payloadsToSign = make([]*rosettatypes.SigningPayload, len(signers)) - - // pub key ordering matters, in a future release this check might be relaxed - for i, signer := range signers { - // assert that the provided public keys are correctly ordered - // by checking if the signer at index i matches the pubkey at index - pubKey, err := c.ToSDK().PubKey(rosPubKeys[0]) - if err != nil { - return nil, nil, err - } - if !bytes.Equal(pubKey.Address().Bytes(), signer) { - return nil, nil, crgerrs.WrapError( - crgerrs.ErrBadArgument, - fmt.Sprintf("public key at index %d does not match the expected transaction signer: %X <-> %X", i, rosPubKeys[i].Bytes, signer), - ) - } - - signerStr, err := c.ir.SigningContext().AddressCodec().BytesToString(signer) - if err != nil { - return nil, nil, crgerrs.WrapError(crgerrs.ErrBadArgument, err.Error()) - } - - // set the signer data - signerData := authsigning.SignerData{ - Address: signerStr, - ChainID: metadata.ChainID, - AccountNumber: metadata.SignersData[i].AccountNumber, - Sequence: metadata.SignersData[i].Sequence, - PubKey: pubKey, - } - - // get signature bytes - signBytes, err := c.bytesToSign(tx, signerData) - if err != nil { - return nil, nil, crgerrs.WrapError(crgerrs.ErrUnknown, fmt.Sprintf("unable to sign tx: %s", err.Error())) - } - - // set payload - payloadsToSign[i] = &rosettatypes.SigningPayload{ - AccountIdentifier: &rosettatypes.AccountIdentifier{Address: signerStr}, - Bytes: signBytes, - SignatureType: rosettatypes.Ecdsa, - } - - // set partial signature - partialSignatures[i] = signing.SignatureV2{ - PubKey: pubKey, - Data: &signing.SingleSignatureData{}, // needs to be set to empty otherwise the codec will cry - Sequence: metadata.SignersData[i].Sequence, - } - - } - - // now we set the partial signatures in the tx - // because we will need to decode the sequence - // information of each account in a stateless way - err = builder.SetSignatures(partialSignatures...) - if err != nil { - return nil, nil, crgerrs.WrapError(crgerrs.ErrCodec, err.Error()) - } - - // finally encode the tx - txBytes, err = c.txEncode(builder.GetTx()) - if err != nil { - return nil, nil, crgerrs.WrapError(crgerrs.ErrCodec, err.Error()) - } - - return txBytes, payloadsToSign, nil -} - -// SignerData converts the given any account to signer data -func (c converter) SignerData(anyAccount *codectypes.Any) (*SignerData, error) { - var acc sdk.AccountI - err := c.ir.UnpackAny(anyAccount, &acc) - if err != nil { - return nil, crgerrs.WrapError(crgerrs.ErrCodec, err.Error()) - } - - return &SignerData{ - AccountNumber: acc.GetAccountNumber(), - Sequence: acc.GetSequence(), - }, nil -} diff --git a/tools/rosetta/converter_test.go b/tools/rosetta/converter_test.go deleted file mode 100644 index 7eba1fde67b1..000000000000 --- a/tools/rosetta/converter_test.go +++ /dev/null @@ -1,341 +0,0 @@ -package rosetta_test - -import ( - "encoding/hex" - "encoding/json" - "testing" - - "cosmossdk.io/tools/rosetta" - crgerrs "cosmossdk.io/tools/rosetta/lib/errors" - - rosettatypes "github.com/coinbase/rosetta-sdk-go/types" - abci "github.com/cometbft/cometbft/abci/types" - "github.com/stretchr/testify/suite" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" - authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" - bank "github.com/cosmos/cosmos-sdk/x/bank/types" -) - -type ConverterTestSuite struct { - suite.Suite - - c rosetta.Converter - unsignedTxBytes []byte - unsignedTx authsigning.Tx - - ir codectypes.InterfaceRegistry - cdc *codec.ProtoCodec - txConf client.TxConfig -} - -func (s *ConverterTestSuite) SetupTest() { - // create an unsigned tx - const unsignedTxHex = "0a8e010a8b010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e64126b0a2d636f736d6f733134376b6c68377468356a6b6a793361616a736a3272717668747668396d666465333777713567122d636f736d6f73316d6e7670386c786b616679346c787777617175356561653764787630647a36687767797436331a0b0a057374616b651202313612600a4c0a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21034c92046950c876f4a5cb6c7797d6eeb9ef80d67ced4d45fb62b1e859240ba9ad12020a0012100a0a0a057374616b651201311090a10f1a00" - unsignedTxBytes, err := hex.DecodeString(unsignedTxHex) - s.Require().NoError(err) - s.unsignedTxBytes = unsignedTxBytes - // instantiate converter - cdc, ir := rosetta.MakeCodec() - txConfig := authtx.NewTxConfig(cdc, authtx.DefaultSignModes) - s.c = rosetta.NewConverter(cdc, ir, txConfig) - // add utils - s.ir = ir - s.cdc = cdc - s.txConf = txConfig - // add authsigning tx - sdkTx, err := txConfig.TxDecoder()(unsignedTxBytes) - s.Require().NoError(err) - builder, err := txConfig.WrapTxBuilder(sdkTx) - s.Require().NoError(err) - - s.unsignedTx = builder.GetTx() -} - -func (s *ConverterTestSuite) TestFromRosettaOpsToTxSuccess() { - addr1 := sdk.AccAddress("address1").String() - addr2 := sdk.AccAddress("address2").String() - - msg1 := &bank.MsgSend{ - FromAddress: addr1, - ToAddress: addr2, - Amount: sdk.NewCoins(sdk.NewInt64Coin("test", 10)), - } - - msg2 := &bank.MsgSend{ - FromAddress: addr2, - ToAddress: addr1, - Amount: sdk.NewCoins(sdk.NewInt64Coin("utxo", 10)), - } - - ops, err := s.c.ToRosetta().Ops("", msg1) - s.Require().NoError(err) - - ops2, err := s.c.ToRosetta().Ops("", msg2) - s.Require().NoError(err) - - ops = append(ops, ops2...) - - tx, err := s.c.ToSDK().UnsignedTx(ops) - s.Require().NoError(err) - - getMsgs := tx.GetMsgs() - - s.Require().Equal(2, len(getMsgs)) - - s.Require().Equal(getMsgs[0], msg1) - s.Require().Equal(getMsgs[1], msg2) -} - -func (s *ConverterTestSuite) TestFromRosettaOpsToTxErrors() { - s.Run("unrecognized op", func() { - op := &rosettatypes.Operation{ - Type: "non-existent", - } - - _, err := s.c.ToSDK().UnsignedTx([]*rosettatypes.Operation{op}) - - s.Require().ErrorIs(err, crgerrs.ErrBadArgument) - }) - - s.Run("codec type but not sdk.Msg", func() { - op := &rosettatypes.Operation{ - Type: "cosmos.crypto.ed25519.PubKey", - } - - _, err := s.c.ToSDK().UnsignedTx([]*rosettatypes.Operation{op}) - - s.Require().ErrorIs(err, crgerrs.ErrBadArgument) - }) -} - -func (s *ConverterTestSuite) TestMsgToMetaMetaToMsg() { - msg := &bank.MsgSend{ - FromAddress: "addr1", - ToAddress: "addr2", - Amount: sdk.NewCoins(sdk.NewInt64Coin("test", 10)), - } - - meta, err := s.c.ToRosetta().Meta(msg) - s.Require().NoError(err) - - copyMsg := new(bank.MsgSend) - err = s.c.ToSDK().Msg(meta, copyMsg) - s.Require().NoError(err) - s.Require().Equal(msg, copyMsg) -} - -func (s *ConverterTestSuite) TestSignedTx() { - s.Run("success", func() { - const payloadsJSON = `[{"hex_bytes":"82ccce81a3e4a7272249f0e25c3037a316ee2acce76eb0c25db00ef6634a4d57303b2420edfdb4c9a635ad8851fe5c7a9379b7bc2baadc7d74f7e76ac97459b5","signing_payload":{"address":"cosmos147klh7th5jkjy3aajsj2rqvhtvh9mfde37wq5g","hex_bytes":"ed574d84b095250280de38bf8c254e4a1f8755e5bd300b1f6ca2671688136ecc","account_identifier":{"address":"cosmos147klh7th5jkjy3aajsj2rqvhtvh9mfde37wq5g"},"signature_type":"ecdsa"},"public_key":{"hex_bytes":"034c92046950c876f4a5cb6c7797d6eeb9ef80d67ced4d45fb62b1e859240ba9ad","curve_type":"secp256k1"},"signature_type":"ecdsa"}]` - const expectedSignedTxHex = "0a8e010a8b010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e64126b0a2d636f736d6f733134376b6c68377468356a6b6a793361616a736a3272717668747668396d666465333777713567122d636f736d6f73316d6e7670386c786b616679346c787777617175356561653764787630647a36687767797436331a0b0a057374616b651202313612620a4e0a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21034c92046950c876f4a5cb6c7797d6eeb9ef80d67ced4d45fb62b1e859240ba9ad12040a02087f12100a0a0a057374616b651201311090a10f1a4082ccce81a3e4a7272249f0e25c3037a316ee2acce76eb0c25db00ef6634a4d57303b2420edfdb4c9a635ad8851fe5c7a9379b7bc2baadc7d74f7e76ac97459b5" - - var payloads []*rosettatypes.Signature - s.Require().NoError(json.Unmarshal([]byte(payloadsJSON), &payloads)) - - signedTx, err := s.c.ToSDK().SignedTx(s.unsignedTxBytes, payloads) - s.Require().NoError(err) - - signedTxHex := hex.EncodeToString(signedTx) - - s.Require().Equal(signedTxHex, expectedSignedTxHex) - }) - - s.Run("signers data and signing payloads mismatch", func() { - _, err := s.c.ToSDK().SignedTx(s.unsignedTxBytes, nil) - s.Require().ErrorIs(err, crgerrs.ErrInvalidTransaction) - }) -} - -func (s *ConverterTestSuite) TestOpsAndSigners() { - s.Run("success", func() { - addr1 := sdk.AccAddress("address1").String() - addr2 := sdk.AccAddress("address2").String() - - msg := &bank.MsgSend{ - FromAddress: addr1, - ToAddress: addr2, - Amount: sdk.NewCoins(sdk.NewInt64Coin("test", 10)), - } - - builder := s.txConf.NewTxBuilder() - s.Require().NoError(builder.SetMsgs(msg)) - - sdkTx := builder.GetTx() - txBytes, err := s.txConf.TxEncoder()(sdkTx) - s.Require().NoError(err) - - ops, signers, err := s.c.ToRosetta().OpsAndSigners(txBytes) - s.Require().NoError(err) - - signerAddrs, err := sdkTx.GetSigners() - s.Require().NoError(err) - s.Require().Equal(len(ops), len(sdkTx.GetMsgs())*len(signerAddrs), "operation number mismatch") - - s.Require().Equal(len(signers), len(signerAddrs), "signers number mismatch") - }) -} - -func (s *ConverterTestSuite) TestBeginEndBlockAndHashToTxType() { - const deliverTxHex = "5229A67AA008B5C5F1A0AEA77D4DEBE146297A30AAEF01777AF10FAD62DD36AB" - - deliverTxBytes, err := hex.DecodeString(deliverTxHex) - s.Require().NoError(err) - - endBlockTxHex := s.c.ToRosetta().EndBlockTxHash(deliverTxBytes) - beginBlockTxHex := s.c.ToRosetta().BeginBlockTxHash(deliverTxBytes) - - txType, hash := s.c.ToSDK().HashToTxType(deliverTxBytes) - - s.Require().Equal(rosetta.DeliverTxTx, txType) - s.Require().Equal(deliverTxBytes, hash, "deliver tx hash should not change") - - endBlockTxBytes, err := hex.DecodeString(endBlockTxHex) - s.Require().NoError(err) - - txType, hash = s.c.ToSDK().HashToTxType(endBlockTxBytes) - - s.Require().Equal(rosetta.EndBlockTx, txType) - s.Require().Equal(deliverTxBytes, hash, "end block tx hash should be equal to a block hash") - - beginBlockTxBytes, err := hex.DecodeString(beginBlockTxHex) - s.Require().NoError(err) - - txType, hash = s.c.ToSDK().HashToTxType(beginBlockTxBytes) - - s.Require().Equal(rosetta.BeginBlockTx, txType) - s.Require().Equal(deliverTxBytes, hash, "begin block tx hash should be equal to a block hash") - - txType, hash = s.c.ToSDK().HashToTxType([]byte("invalid")) - - s.Require().Equal(rosetta.UnrecognizedTx, txType) - s.Require().Nil(hash) - - txType, hash = s.c.ToSDK().HashToTxType(append([]byte{0x3}, deliverTxBytes...)) - s.Require().Equal(rosetta.UnrecognizedTx, txType) - s.Require().Nil(hash) -} - -func (s *ConverterTestSuite) TestSigningComponents() { - s.Run("invalid metadata coins", func() { - _, _, err := s.c.ToRosetta().SigningComponents(nil, &rosetta.ConstructionMetadata{GasPrice: "invalid"}, nil) - s.Require().ErrorIs(err, crgerrs.ErrBadArgument) - }) - - s.Run("length signers data does not match signers", func() { - _, _, err := s.c.ToRosetta().SigningComponents(s.unsignedTx, &rosetta.ConstructionMetadata{GasPrice: "10stake"}, nil) - s.Require().ErrorIs(err, crgerrs.ErrBadArgument) - }) - - s.Run("length pub keys does not match signers", func() { - _, _, err := s.c.ToRosetta().SigningComponents( - s.unsignedTx, - &rosetta.ConstructionMetadata{GasPrice: "10stake", SignersData: []*rosetta.SignerData{ - { - AccountNumber: 0, - Sequence: 0, - }, - }}, - nil) - s.Require().ErrorIs(err, crgerrs.ErrBadArgument) - }) - - s.Run("ros pub key is valid but not the one we expect", func() { - validButUnexpected, err := hex.DecodeString("030da9096a40eb1d6c25f1e26e9cbf8941fc84b8f4dc509c8df5e62a29ab8f2415") - s.Require().NoError(err) - - _, _, err = s.c.ToRosetta().SigningComponents( - s.unsignedTx, - &rosetta.ConstructionMetadata{GasPrice: "10stake", SignersData: []*rosetta.SignerData{ - { - AccountNumber: 0, - Sequence: 0, - }, - }}, - []*rosettatypes.PublicKey{ - { - Bytes: validButUnexpected, - CurveType: rosettatypes.Secp256k1, - }, - }) - s.Require().ErrorIs(err, crgerrs.ErrBadArgument) - }) - - s.Run("success", func() { - expectedPubKey, err := hex.DecodeString("034c92046950c876f4a5cb6c7797d6eeb9ef80d67ced4d45fb62b1e859240ba9ad") - s.Require().NoError(err) - - _, _, err = s.c.ToRosetta().SigningComponents( - s.unsignedTx, - &rosetta.ConstructionMetadata{GasPrice: "10stake", SignersData: []*rosetta.SignerData{ - { - AccountNumber: 0, - Sequence: 0, - }, - }}, - []*rosettatypes.PublicKey{ - { - Bytes: expectedPubKey, - CurveType: rosettatypes.Secp256k1, - }, - }) - s.Require().NoError(err) - }) -} - -func (s *ConverterTestSuite) TestBalanceOps() { - s.Run("not a balance op", func() { - notBalanceOp := abci.Event{ - Type: "not-a-balance-op", - } - - ops := s.c.ToRosetta().BalanceOps("", []abci.Event{notBalanceOp}) - s.Len(ops, 0, "expected no balance ops") - }) - - s.Run("multiple balance ops from 2 multicoins event", func() { - subBalanceOp := bank.NewCoinSpentEvent( - sdk.AccAddress("test"), - sdk.NewCoins(sdk.NewInt64Coin("test", 10), sdk.NewInt64Coin("utxo", 10)), - ) - - addBalanceOp := bank.NewCoinReceivedEvent( - sdk.AccAddress("test"), - sdk.NewCoins(sdk.NewInt64Coin("test", 10), sdk.NewInt64Coin("utxo", 10)), - ) - - ops := s.c.ToRosetta().BalanceOps("", []abci.Event{(abci.Event)(subBalanceOp), (abci.Event)(addBalanceOp)}) - s.Len(ops, 4) - }) - - s.Run("spec broken", func() { - s.Require().Panics(func() { - specBrokenSub := abci.Event{ - Type: bank.EventTypeCoinSpent, - } - _ = s.c.ToRosetta().BalanceOps("", []abci.Event{specBrokenSub}) - }) - - s.Require().Panics(func() { - specBrokenSub := abci.Event{ - Type: bank.EventTypeCoinBurn, - } - _ = s.c.ToRosetta().BalanceOps("", []abci.Event{specBrokenSub}) - }) - - s.Require().Panics(func() { - specBrokenSub := abci.Event{ - Type: bank.EventTypeCoinReceived, - } - _ = s.c.ToRosetta().BalanceOps("", []abci.Event{specBrokenSub}) - }) - }) -} - -func TestConverterTestSuite(t *testing.T) { - suite.Run(t, new(ConverterTestSuite)) -} diff --git a/tools/rosetta/go.mod b/tools/rosetta/go.mod deleted file mode 100644 index d21810d97c48..000000000000 --- a/tools/rosetta/go.mod +++ /dev/null @@ -1,152 +0,0 @@ -module cosmossdk.io/tools/rosetta - -go 1.20 - -require ( - cosmossdk.io/log v1.1.0 - cosmossdk.io/math v1.0.1 - cosmossdk.io/x/tx v0.8.0 - github.com/coinbase/rosetta-sdk-go/types v1.0.0 - github.com/cometbft/cometbft v0.38.0-rc1 - github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20230607182757-cfeb10287d61 - github.com/cosmos/gogoproto v1.4.10 - github.com/cosmos/rosetta-sdk-go v0.10.0 - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 - github.com/spf13/cobra v1.7.0 - github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.4 - google.golang.org/grpc v1.55.0 -) - -require ( - cosmossdk.io/api v0.4.2 // indirect - cosmossdk.io/collections v0.2.0 // indirect - cosmossdk.io/core v0.8.0 // indirect - cosmossdk.io/depinject v1.0.0-alpha.3 // indirect - cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741 // indirect - cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c // indirect - filippo.io/edwards25519 v1.0.0 // indirect - github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect - github.com/99designs/keyring v1.2.1 // indirect - github.com/DataDog/zstd v1.5.5 // indirect - github.com/armon/go-metrics v0.4.1 // indirect - github.com/beorn7/perks v1.0.1 // indirect - github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect - github.com/cenkalti/backoff/v4 v4.1.3 // indirect - github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/cockroachdb/errors v1.9.1 // indirect - github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f // indirect - github.com/cockroachdb/redact v1.1.4 // indirect - github.com/cometbft/cometbft-db v0.7.0 // indirect - github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-db v1.0.0 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect - github.com/cosmos/go-bip39 v1.0.0 // indirect - github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v1.0.0-beta.2 // indirect - github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.13.0 // indirect - github.com/danieljoos/wincred v1.1.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect - github.com/dgraph-io/badger/v2 v2.2007.4 // indirect - github.com/dgraph-io/ristretto v0.1.1 // indirect - github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect - github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect - github.com/emicklei/dot v1.4.2 // indirect - github.com/fatih/color v1.15.0 // indirect - github.com/felixge/httpsnoop v1.0.2 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/getsentry/sentry-go v0.21.0 // indirect - github.com/go-kit/kit v0.12.0 // indirect - github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect - github.com/gogo/googleapis v1.4.1 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.1.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/golang/snappy v0.0.4 // indirect - github.com/google/btree v1.1.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect - github.com/gorilla/handlers v1.5.1 // indirect - github.com/gorilla/mux v1.8.0 // indirect - github.com/gorilla/websocket v1.5.0 // indirect - github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect - github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect - github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect - github.com/hashicorp/go-hclog v1.5.0 // indirect - github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-plugin v1.4.10 // indirect - github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect - github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hashicorp/yamux v0.1.1 // indirect - github.com/hdevalence/ed25519consensus v0.1.0 // indirect - github.com/huandu/skiplist v1.2.0 // indirect - github.com/iancoleman/strcase v0.2.0 // indirect - github.com/improbable-eng/grpc-web v0.15.0 // indirect - github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.16.5 // indirect - github.com/kr/pretty v0.3.1 // indirect - github.com/kr/text v0.2.0 // indirect - github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.0 // indirect - github.com/magiconair/properties v1.8.7 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/mitchellh/go-testing-interface v1.14.1 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/mtibben/percent v0.2.1 // indirect - github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce // indirect - github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect - github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.15.1 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect - github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect - github.com/rs/cors v1.8.3 // indirect - github.com/rs/zerolog v1.29.1 // indirect - github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/cast v1.5.1 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/spf13/viper v1.16.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect - github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tidwall/btree v1.6.0 // indirect - github.com/zondax/hid v0.9.1 // indirect - github.com/zondax/ledger-go v0.14.1 // indirect - go.etcd.io/bbolt v1.3.6 // indirect - golang.org/x/crypto v0.9.0 // indirect - golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect - google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect - google.golang.org/protobuf v1.30.0 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect - gotest.tools/v3 v3.4.0 // indirect - nhooyr.io/websocket v1.8.6 // indirect - pgregory.net/rapid v0.6.2 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect -) - -replace github.com/cosmos/cosmos-sdk => ../.. diff --git a/tools/rosetta/go.sum b/tools/rosetta/go.sum deleted file mode 100644 index 957de466ae3c..000000000000 --- a/tools/rosetta/go.sum +++ /dev/null @@ -1,1329 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.4.2 h1:lQBMl4xINnMnBOR/tQLtjlDnR4exr4e6/SfHR8PILE0= -cosmossdk.io/api v0.4.2/go.mod h1:qrVgOp7DIeAXa+Tt5dDjOC47bZCDrwx8ZHxrmy7STNE= -cosmossdk.io/collections v0.2.0 h1:CgMfLtE16+qox3zBYrGh60i4yKV8SeExLnIdOS2sbQs= -cosmossdk.io/collections v0.2.0/go.mod h1:Oc1FK0vlmxJZsgUn9/o3ldE6zNyWKvobVzaLhWknZJE= -cosmossdk.io/core v0.8.0 h1:LcJnu52E1a8f8E317VfQ1xK/RZe+IuhMNQAjnDLh25M= -cosmossdk.io/core v0.8.0/go.mod h1:LF6VLOv2DdCiaHxYVmr0MZcZpaSM9ZgvyrQSYTeg6D0= -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.0.20230524212735-6cabb6aa5741 h1:BCRz06fvddw7cKGiEGDiSox3qMsjQ97f92K+PDZDHdc= -cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741/go.mod h1:TB05o6YXkZkzsc+6bZFAV5kZRBtoCU9tUkbeMIqEg0w= -cosmossdk.io/log v1.1.0 h1:v0ogPHYeTzPcBTcPR1A3j1hkei4pZama8kz8LKlCMv0= -cosmossdk.io/log v1.1.0/go.mod h1:6zjroETlcDs+mm62gd8Ig7mZ+N+fVOZS91V17H+M4N4= -cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c h1:A+FMPW9GtfcPBDQNtFeDFN27h1SAP6OVjnGgPLlYXmI= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c/go.mod h1:RbYGvXCbz8uNBCXrwS9Z8SyydeWi+W5x5MZ33muyzMw= -cosmossdk.io/x/tx v0.8.0 h1:gLiGRL/Fy7fs6dd0IX8jOf0PrVr56/SG6XVMGQjyvJU= -cosmossdk.io/x/tx v0.8.0/go.mod h1:T9uEumGNgKU61gJYRv1t3uzQwLnASpJGmSE229HM3xA= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= -filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= -github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= -github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= -github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= -github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= -github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= -github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= -github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= -github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= -github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= -github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= -github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= -github.com/bufbuild/protocompile v0.5.1 h1:mixz5lJX4Hiz4FpqFREJHIXLfaLBntfaJv1h+/jS+Qg= -github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= -github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/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.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= -github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= -github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f h1:qQW3qCVRpjYsV4YNaUOjm6YLeliAD2jpgex9+D9tqU4= -github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f/go.mod h1:TkdVsGYRqtULUppt2RbC+YaKtTHnHoWa2apfFrSKABw= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/redact v1.1.4 h1:Y0XrVI2FAyofNyGveodTN//qdpPtFKcKTeCBsK3AHAQ= -github.com/cockroachdb/redact v1.1.4/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= -github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= -github.com/cometbft/cometbft v0.38.0-rc1 h1:ph6smlqX82aH+d72KuxDHqu29M7LyusSp/obfGsGX/w= -github.com/cometbft/cometbft v0.38.0-rc1/go.mod h1:5Jz0Z8YsHSf0ZaAqGvi/ifioSdVFPtEGrm8Y9T/993k= -github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= -github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= -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/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= -github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= -github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= -github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= -github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= -github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= -github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= -github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= -github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cosmos/iavl v1.0.0-beta.2 h1:XOsIM80Yyml/KifCXEYOy9tWCXwMAbLa91n6pReW07Y= -github.com/cosmos/iavl v1.0.0-beta.2/go.mod h1:EA97dJ07TBktRlG/iGzK6g1eCXNj1q3MGoFYkVzrwHE= -github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= -github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= -github.com/cosmos/ledger-cosmos-go v0.13.0 h1:ex0CvCxToSR7j5WjrghPu2Bu9sSXKikjnVvUryNnx4s= -github.com/cosmos/ledger-cosmos-go v0.13.0/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= -github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= -github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= -github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= -github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= -github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= -github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= -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.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= -github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= -github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= -github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= -github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/emicklei/dot v1.4.2 h1:UbK6gX4yvrpHKlxuUQicwoAis4zl8Dzwit9SnbBAXWw= -github.com/emicklei/dot v1.4.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= -github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -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/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= -github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= -github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= -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/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.21.0 h1:c9l5F1nPF30JIppulk4veau90PK6Smu3abgVtVQWon4= -github.com/getsentry/sentry-go v0.21.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= -github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= -github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= -github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= -github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= -github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= -github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= -github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= -github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= -github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= -github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= -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= -github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= -github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= -github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= -github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= -github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= -github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -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/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.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.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -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.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.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/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= -github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= -github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= -github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= -github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= -github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= -github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= -github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v1.4.10 h1:xUbmA4jC6Dq163/fWcp8P3JuHilrHHMLNRxzGQJ9hNk= -github.com/hashicorp/go-plugin v1.4.10/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0= -github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= -github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= -github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= -github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= -github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= -github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= -github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= -github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= -github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= -github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= -github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= -github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= -github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -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.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= -github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= -github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= -github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= -github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= -github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.0 h1:H4L/LhP7GOMf1j17oQAElHgVlbEje2h14A8Tz9cM2BE= -github.com/linxGnu/grocksdb v1.8.0/go.mod h1:09CeBborffXhXdNpEcOeZrLKEnRtrZFEpFdPNI9Zjjg= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= -github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= -github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= -github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -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/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce h1:/pEpMk55wH0X+E5zedGEMOdLuWmV8P4+4W3+LZaM6kg= -github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= -github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= -github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= -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.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= -github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 h1:W04oB3d0J01W5jgYRGKsV8LCM6g9EkCvPkZcmFuy0OE= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= -github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= -github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -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/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= -github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= -github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= -github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -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/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= -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.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= -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= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= -github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/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/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= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= -github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= -github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= -github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= -github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= -github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= -github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -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-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= -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= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -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/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/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-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/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-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/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-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-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -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.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -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= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -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= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 h1:x1vNwUhVOcsYoKyEGCZBH694SBmmBjA2EfauFVEI2+M= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a h1:HiYVD+FGJkTo+9zj1gqz0anapsa1JxjiSrN+BJKyUmE= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= -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.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= -nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -pgregory.net/rapid v0.6.2 h1:ErW5sL+UKtfBfUTsWHDCoeB+eZKLKMxrSd1VJY6W4bw= -pgregory.net/rapid v0.6.2/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/tools/rosetta/lib/errors/errors.go b/tools/rosetta/lib/errors/errors.go deleted file mode 100644 index 4ad034fc3d9a..000000000000 --- a/tools/rosetta/lib/errors/errors.go +++ /dev/null @@ -1,163 +0,0 @@ -package errors - -// errors.go contains all the errors returned by the adapter implementation -// plus some extra utilities to parse those errors - -import ( - "fmt" - "net/http" - - grpccodes "google.golang.org/grpc/codes" - grpcstatus "google.golang.org/grpc/status" - - "github.com/coinbase/rosetta-sdk-go/types" - cmttypes "github.com/cometbft/cometbft/rpc/jsonrpc/types" -) - -// ListErrors lists all the registered errors -func ListErrors() []*types.Error { - return registry.list() -} - -// SealAndListErrors seals the registry and lists its errors -func SealAndListErrors() []*types.Error { - registry.seal() - return registry.list() -} - -// Error defines an error that can be converted to a Rosetta API error. -type Error struct { - rosErr *types.Error -} - -func (e *Error) Error() string { - if e.rosErr == nil { - return ErrUnknown.Error() - } - return fmt.Sprintf("rosetta: (%d) %s", e.rosErr.Code, e.rosErr.Message) -} - -// Is implements errors.Is for *Error, two errors are considered equal -// if their error codes are identical -func (e *Error) Is(err error) bool { - // assert it can be casted - rosErr, ok := err.(*Error) - if rosErr == nil || !ok { - return false - } - // check that both *Error's are correctly initialized to avoid dereference panics - if rosErr.rosErr == nil || e.rosErr == nil { - return false - } - // messages are equal if their error codes match - return rosErr.rosErr.Code == e.rosErr.Code -} - -// WrapError wraps the rosetta error with additional context -func WrapError(err *Error, msg string) *Error { - return &Error{rosErr: &types.Error{ - Code: err.rosErr.Code, - Message: err.rosErr.Message, - Description: err.rosErr.Description, - Retriable: err.rosErr.Retriable, - Details: map[string]interface{}{ - "info": msg, - }, - }} -} - -// ToRosetta attempts to converting an error into a rosetta -// error, if the error cannot be converted it will be parsed as unknown -func ToRosetta(err error) *types.Error { - // if it's null or not known - rosErr, ok := err.(*Error) - if rosErr == nil || !ok { - tmErr, ok := err.(*cmttypes.RPCError) - if tmErr != nil && ok { - return fromCometToRosettaError(tmErr).rosErr - } - return ToRosetta(WrapError(ErrUnknown, ErrUnknown.Error())) - } - return rosErr.rosErr -} - -// fromCometToRosettaError converts a CometBFT jsonrpc error to rosetta error -func fromCometToRosettaError(err *cmttypes.RPCError) *Error { - return &Error{rosErr: &types.Error{ - Code: http.StatusInternalServerError, - Message: err.Message, - Details: map[string]interface{}{ - "info": err.Data, - }, - }} -} - -// FromGRPCToRosettaError converts a gRPC error to rosetta error -func FromGRPCToRosettaError(err error) *Error { - status, ok := grpcstatus.FromError(err) - if !ok { - return WrapError(ErrUnknown, err.Error()) - } - switch status.Code() { - case grpccodes.NotFound: - return WrapError(ErrNotFound, status.Message()) - case grpccodes.FailedPrecondition: - return WrapError(ErrBadArgument, status.Message()) - case grpccodes.InvalidArgument: - return WrapError(ErrBadArgument, status.Message()) - case grpccodes.Internal: - return WrapError(ErrInternal, status.Message()) - default: - return WrapError(ErrUnknown, status.Message()) - } -} - -func RegisterError(code int32, message string, retryable bool, description string) *Error { - e := &Error{rosErr: &types.Error{ - Code: code, - Message: message, - Description: &description, - Retriable: retryable, - Details: nil, - }} - registry.add(e) - return e -} - -// Default error list -var ( - // ErrUnknown defines an unknown error, if this is returned it means - // the library is ignoring an error - ErrUnknown = RegisterError(0, "unknown", false, "unknown error") - // ErrOffline is returned when there is an attempt to query an endpoint in offline mode - ErrOffline = RegisterError(1, "cannot query endpoint in offline mode", false, "returned when querying an online endpoint in offline mode") - // ErrNetworkNotSupported is returned when there is an attempt to query a network which is not supported - ErrNetworkNotSupported = RegisterError(2, "network is not supported", false, "returned when querying a non supported network") - // ErrCodec is returned when there's an error while marshaling or unmarshalling data - ErrCodec = RegisterError(3, "encode/decode error", true, "returned when there are errors encoding or decoding information to and from the node") - // ErrInvalidOperation is returned when the operation supplied to rosetta is not a valid one - ErrInvalidOperation = RegisterError(4, "invalid operation", false, "returned when the operation is not valid") - // ErrInvalidTransaction is returned when the provided hex bytes of a TX are not valid - ErrInvalidTransaction = RegisterError(5, "invalid transaction", false, "returned when the transaction is invalid") - // ErrInvalidAddress is returned when the byte of the address are bad - ErrInvalidAddress = RegisterError(7, "invalid address", false, "returned when the address is malformed") - // ErrInvalidPubkey is returned when the public key is invalid - ErrInvalidPubkey = RegisterError(8, "invalid pubkey", false, "returned when the public key is invalid") - // ErrInterpreting is returned when there are errors interpreting the data from the node, most likely related to breaking changes, version incompatibilities - ErrInterpreting = RegisterError(9, "error interpreting data from node", false, "returned when there are issues interpreting requests or response from node") - ErrInvalidMemo = RegisterError(11, "invalid memo", false, "returned when the memo is invalid") - // ErrBadArgument is returned when the request is malformed - ErrBadArgument = RegisterError(400, "bad argument", false, "request is malformed") - // ErrNotFound is returned when the required object was not found - // retry is set to true because something that is not found now - // might be found later, example: a TX - ErrNotFound = RegisterError(404, "not found", true, "returned when the node does not find what the client is asking for") - // ErrInternal is returned when the node is experiencing internal errors - ErrInternal = RegisterError(500, "internal error", false, "returned when the node experiences internal errors") - // ErrBadGateway is returned when there are problems interacting with the nodes - ErrBadGateway = RegisterError(502, "bad gateway", true, "return when the node is unreachable") - // ErrNotImplemented is returned when a method is not implemented yet - ErrNotImplemented = RegisterError(14, "not implemented", false, "returned when querying an endpoint which is not implemented") - // ErrUnsupportedCurve is returned when the curve specified is not supported - ErrUnsupportedCurve = RegisterError(15, "unsupported curve, expected secp256k1", false, "returned when using an unsupported crypto curve") -) diff --git a/tools/rosetta/lib/errors/errors_test.go b/tools/rosetta/lib/errors/errors_test.go deleted file mode 100644 index 9782c654db6e..000000000000 --- a/tools/rosetta/lib/errors/errors_test.go +++ /dev/null @@ -1,73 +0,0 @@ -package errors - -import ( - "testing" - - cmttypes "github.com/cometbft/cometbft/rpc/jsonrpc/types" - "github.com/stretchr/testify/assert" -) - -func TestRegisterError(t *testing.T) { - var error *Error - // this is the number of errors registered by default in errors.go - registeredErrorsCount := 16 - assert.Equal(t, len(registry.list()), registeredErrorsCount) - assert.ElementsMatch(t, registry.list(), ListErrors()) - // add a new Error - error = RegisterError(69, "nice!", false, "nice!") - assert.NotNil(t, error) - // now we have a new error - registeredErrorsCount++ - assert.Equal(t, len(ListErrors()), registeredErrorsCount) - // re-register an error should not change anything - RegisterError(69, "nice!", false, "nice!") - assert.Equal(t, len(ListErrors()), registeredErrorsCount) - - // test sealing - assert.Equal(t, registry.sealed, false) - errors := SealAndListErrors() - assert.Equal(t, registry.sealed, true) - assert.Equal(t, len(errors), registeredErrorsCount) - // add a new error on a sealed registry - error = RegisterError(1024, "bytes", false, "bytes") - assert.NotNil(t, error) -} - -func TestError_Error(t *testing.T) { - var error *Error - // nil cases - assert.False(t, ErrOffline.Is(error)) - error = &Error{} - assert.False(t, ErrOffline.Is(error)) - // wrong type - assert.False(t, ErrOffline.Is(&MyError{})) - // test with wrapping an error - error = WrapError(ErrOffline, "offline") - assert.True(t, ErrOffline.Is(error)) - - // test equality - assert.False(t, ErrOffline.Is(ErrBadGateway)) - assert.True(t, ErrBadGateway.Is(ErrBadGateway)) -} - -func TestToRosetta(t *testing.T) { - var error *Error - // nil case - assert.NotNil(t, ToRosetta(error)) - // wrong type - assert.NotNil(t, ToRosetta(&MyError{})) - - tmErr := &cmttypes.RPCError{} - // RpcError case - assert.NotNil(t, ToRosetta(tmErr)) -} - -type MyError struct{} - -func (e *MyError) Error() string { - return "" -} - -func (e *MyError) Is(err error) bool { - return true -} diff --git a/tools/rosetta/lib/errors/registry.go b/tools/rosetta/lib/errors/registry.go deleted file mode 100644 index 9cbafcacf7dc..000000000000 --- a/tools/rosetta/lib/errors/registry.go +++ /dev/null @@ -1,48 +0,0 @@ -package errors - -import ( - "fmt" - "os" - "sync" - - "github.com/coinbase/rosetta-sdk-go/types" -) - -type errorRegistry struct { - mu *sync.RWMutex - sealed bool - errors map[int32]*types.Error -} - -func (r *errorRegistry) add(err *Error) { - r.mu.Lock() - defer r.mu.Unlock() - if r.sealed { - _, _ = fmt.Fprintln(os.Stderr, "[ROSETTA] WARNING: attempts to register errors after seal will be ignored") - } - if _, ok := r.errors[err.rosErr.Code]; ok { - _, _ = fmt.Fprintln(os.Stderr, "[ROSETTA] WARNING: attempts to register an already registered error will be ignored, code: ", err.rosErr.Code) - } - r.errors[err.rosErr.Code] = err.rosErr -} - -func (r errorRegistry) list() []*types.Error { - r.mu.RLock() - defer r.mu.RUnlock() - rosErrs := make([]*types.Error, 0, len(registry.errors)) - for _, v := range r.errors { - rosErrs = append(rosErrs, v) - } - return rosErrs -} - -func (r *errorRegistry) seal() { - r.mu.Lock() - defer r.mu.Unlock() - r.sealed = true -} - -var registry = errorRegistry{ - mu: new(sync.RWMutex), - errors: make(map[int32]*types.Error), -} diff --git a/tools/rosetta/lib/internal/service/account.go b/tools/rosetta/lib/internal/service/account.go deleted file mode 100644 index 5636a35b0261..000000000000 --- a/tools/rosetta/lib/internal/service/account.go +++ /dev/null @@ -1,60 +0,0 @@ -package service - -import ( - "context" - - "cosmossdk.io/tools/rosetta/lib/errors" - crgtypes "cosmossdk.io/tools/rosetta/lib/types" - "github.com/coinbase/rosetta-sdk-go/types" -) - -// AccountBalance retrieves the account balance of an address -// rosetta requires us to fetch the block information too -func (on OnlineNetwork) AccountBalance(ctx context.Context, request *types.AccountBalanceRequest) (*types.AccountBalanceResponse, *types.Error) { - var ( - height int64 - block crgtypes.BlockResponse - err error - ) - - switch { - case request.BlockIdentifier == nil: - syncStatus, err := on.client.Status(ctx) - if err != nil { - return nil, errors.ToRosetta(err) - } - block, err = on.client.BlockByHeight(ctx, syncStatus.CurrentIndex) - if err != nil { - return nil, errors.ToRosetta(err) - } - case request.BlockIdentifier.Hash != nil: - block, err = on.client.BlockByHash(ctx, *request.BlockIdentifier.Hash) - if err != nil { - return nil, errors.ToRosetta(err) - } - height = block.Block.Index - case request.BlockIdentifier.Index != nil: - height = *request.BlockIdentifier.Index - block, err = on.client.BlockByHeight(ctx, &height) - if err != nil { - return nil, errors.ToRosetta(err) - } - } - - accountCoins, err := on.client.Balances(ctx, request.AccountIdentifier.Address, &height) - if err != nil { - return nil, errors.ToRosetta(err) - } - - return &types.AccountBalanceResponse{ - BlockIdentifier: block.Block, - Balances: accountCoins, - Metadata: nil, - }, nil -} - -// AccountsCoins - relevant only for UTXO based chain -// see https://www.rosetta-api.org/docs/AccountApi.html#accountcoins -func (on OnlineNetwork) AccountCoins(_ context.Context, _ *types.AccountCoinsRequest) (*types.AccountCoinsResponse, *types.Error) { - return nil, errors.ToRosetta(errors.ErrOffline) -} diff --git a/tools/rosetta/lib/internal/service/block.go b/tools/rosetta/lib/internal/service/block.go deleted file mode 100644 index 2e489dff74f5..000000000000 --- a/tools/rosetta/lib/internal/service/block.go +++ /dev/null @@ -1,78 +0,0 @@ -package service - -import ( - "context" - - "cosmossdk.io/tools/rosetta/lib/errors" - crgtypes "cosmossdk.io/tools/rosetta/lib/types" - "github.com/coinbase/rosetta-sdk-go/types" -) - -// Block gets the transactions in the given block -func (on OnlineNetwork) Block(ctx context.Context, request *types.BlockRequest) (*types.BlockResponse, *types.Error) { - var ( - blockResponse crgtypes.BlockTransactionsResponse - err error - ) - - // When fetching data by BlockIdentifier, it may be possible to only specify the index or hash. - // If neither property is specified, it is assumed that the client is making a request at the current block. - switch { - case request.BlockIdentifier == nil: // unlike AccountBalance(), BlockIdentifer is mandatory by spec 1.4.10. - err := errors.WrapError(errors.ErrBadArgument, "block identifier needs to be specified") - return nil, errors.ToRosetta(err) - - case request.BlockIdentifier.Hash != nil: - blockResponse, err = on.client.BlockTransactionsByHash(ctx, *request.BlockIdentifier.Hash) - if err != nil { - return nil, errors.ToRosetta(err) - } - case request.BlockIdentifier.Index != nil: - blockResponse, err = on.client.BlockTransactionsByHeight(ctx, request.BlockIdentifier.Index) - if err != nil { - return nil, errors.ToRosetta(err) - } - - default: - // both empty - blockResponse, err = on.client.BlockTransactionsByHeight(ctx, nil) - if err != nil { - return nil, errors.ToRosetta(err) - } - } - - // Both of index and hash can be specified in reuqest, so make sure they are not mismatching. - if request.BlockIdentifier.Index != nil && *request.BlockIdentifier.Index != blockResponse.Block.Index { - err := errors.WrapError(errors.ErrBadArgument, "mismatching index") - return nil, errors.ToRosetta(err) - } - - if request.BlockIdentifier.Hash != nil && *request.BlockIdentifier.Hash != blockResponse.Block.Hash { - err := errors.WrapError(errors.ErrBadArgument, "mismatching hash") - return nil, errors.ToRosetta(err) - } - - return &types.BlockResponse{ - Block: &types.Block{ - BlockIdentifier: blockResponse.Block, - ParentBlockIdentifier: blockResponse.ParentBlock, - Timestamp: blockResponse.MillisecondTimestamp, - Transactions: blockResponse.Transactions, - Metadata: nil, - }, - OtherTransactions: nil, - }, nil -} - -// BlockTransaction gets the given transaction in the specified block, we do not need to check the block itself too -// due to the fact that CometBFT achieves instant finality -func (on OnlineNetwork) BlockTransaction(ctx context.Context, request *types.BlockTransactionRequest) (*types.BlockTransactionResponse, *types.Error) { - tx, err := on.client.GetTx(ctx, request.TransactionIdentifier.Hash) - if err != nil { - return nil, errors.ToRosetta(err) - } - - return &types.BlockTransactionResponse{ - Transaction: tx, - }, nil -} diff --git a/tools/rosetta/lib/internal/service/construction.go b/tools/rosetta/lib/internal/service/construction.go deleted file mode 100644 index f338442d4cf7..000000000000 --- a/tools/rosetta/lib/internal/service/construction.go +++ /dev/null @@ -1,174 +0,0 @@ -package service - -import ( - "context" - "crypto/sha256" - "encoding/hex" - "strconv" - "strings" - - sdkmath "cosmossdk.io/math" - "cosmossdk.io/tools/rosetta/lib/errors" - "github.com/coinbase/rosetta-sdk-go/types" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// ConstructionCombine Combine creates a network-specific transaction from an unsigned transaction -// and an array of provided signatures. The signed transaction returned from this method will be -// sent to the /construction/submit endpoint by the caller. -func (on OnlineNetwork) ConstructionCombine(ctx context.Context, request *types.ConstructionCombineRequest) (*types.ConstructionCombineResponse, *types.Error) { - txBytes, err := hex.DecodeString(request.UnsignedTransaction) - if err != nil { - return nil, errors.ToRosetta(err) - } - - signedTx, err := on.client.SignedTx(ctx, txBytes, request.Signatures) - if err != nil { - return nil, errors.ToRosetta(err) - } - - return &types.ConstructionCombineResponse{ - SignedTransaction: hex.EncodeToString(signedTx), - }, nil -} - -// ConstructionDerive Derive returns the AccountIdentifier associated with a public key. -func (on OnlineNetwork) ConstructionDerive(_ context.Context, request *types.ConstructionDeriveRequest) (*types.ConstructionDeriveResponse, *types.Error) { - account, err := on.client.AccountIdentifierFromPublicKey(request.PublicKey) - if err != nil { - return nil, errors.ToRosetta(err) - } - return &types.ConstructionDeriveResponse{ - AccountIdentifier: account, - Metadata: nil, - }, nil -} - -// ConstructionHash TransactionHash returns the network-specific transaction hash for a signed -// transaction. -func (on OnlineNetwork) ConstructionHash(ctx context.Context, request *types.ConstructionHashRequest) (*types.TransactionIdentifierResponse, *types.Error) { - bz, err := hex.DecodeString(request.SignedTransaction) - if err != nil { - return nil, errors.ToRosetta(errors.WrapError(errors.ErrInvalidTransaction, "error decoding tx")) - } - - hash := sha256.Sum256(bz) - bzHash := hash[:] - hashString := hex.EncodeToString(bzHash) - - return &types.TransactionIdentifierResponse{ - TransactionIdentifier: &types.TransactionIdentifier{ - Hash: strings.ToUpper(hashString), - }, - }, nil -} - -// ConstructionMetadata Get any information required to construct a transaction for a specific -// network (i.e. ChainID, Gas, Memo, ...). -func (on OnlineNetwork) ConstructionMetadata(ctx context.Context, request *types.ConstructionMetadataRequest) (*types.ConstructionMetadataResponse, *types.Error) { - metadata, err := on.client.ConstructionMetadataFromOptions(ctx, request.Options) - if err != nil { - return nil, errors.ToRosetta(err) - } - - response := &types.ConstructionMetadataResponse{ - Metadata: metadata, - } - - if metadata["gas_price"] != nil && metadata["gas_limit"] != nil { - gasPrice, ok := metadata["gas_price"].(string) - if !ok { - return nil, errors.ToRosetta(errors.WrapError(errors.ErrBadArgument, "invalid gas_price")) - } - if gasPrice == "" { // gas_price is unset. skip fee suggestion - return response, nil - } - price, err := sdk.ParseDecCoin(gasPrice) - if err != nil { - return nil, errors.ToRosetta(err) - } - - gasLimit, ok := metadata["gas_limit"].(float64) - if !ok { - return nil, errors.ToRosetta(errors.WrapError(errors.ErrBadArgument, "invalid gas_limit")) - } - if gasLimit == 0 { // gas_limit is unset. skip fee suggestion - return response, nil - } - gas := sdkmath.NewIntFromUint64(uint64(gasLimit)) - - suggestedFee := types.Amount{ - Value: strconv.FormatInt(price.Amount.MulInt64(gas.Int64()).Ceil().TruncateInt64(), 10), - Currency: &(types.Currency{ - Symbol: price.Denom, - Decimals: 0, - }), - } - response.SuggestedFee = []*types.Amount{&suggestedFee} - } - - return response, nil -} - -// ConstructionParse Parse is called on both unsigned and signed transactions to understand the -// intent of the formulated transaction. This is run as a sanity check before signing (after -// /construction/payloads) and before broadcast (after /construction/combine). -func (on OnlineNetwork) ConstructionParse(ctx context.Context, request *types.ConstructionParseRequest) (*types.ConstructionParseResponse, *types.Error) { - txBytes, err := hex.DecodeString(request.Transaction) - if err != nil { - err := errors.WrapError(errors.ErrInvalidTransaction, err.Error()) - return nil, errors.ToRosetta(err) - } - ops, signers, err := on.client.TxOperationsAndSignersAccountIdentifiers(request.Signed, txBytes) - if err != nil { - return nil, errors.ToRosetta(err) - } - return &types.ConstructionParseResponse{ - Operations: ops, - AccountIdentifierSigners: signers, - Metadata: nil, - }, nil -} - -// ConstructionPayloads Payloads is called with an array of operations and the response from -// /construction/metadata. It returns an unsigned transaction blob and a collection of payloads that -// must be signed by particular AccountIdentifiers using a certain SignatureType. -func (on OnlineNetwork) ConstructionPayloads(ctx context.Context, request *types.ConstructionPayloadsRequest) (*types.ConstructionPayloadsResponse, *types.Error) { - payload, err := on.client.ConstructionPayload(ctx, request) - if err != nil { - return nil, errors.ToRosetta(err) - } - return payload, nil -} - -// ConstructionPreprocess Preprocess is called prior to /construction/payloads to construct a -// request for any metadata that is needed for transaction construction given (i.e. account nonce). -func (on OnlineNetwork) ConstructionPreprocess(ctx context.Context, request *types.ConstructionPreprocessRequest) (*types.ConstructionPreprocessResponse, *types.Error) { - options, err := on.client.PreprocessOperationsToOptions(ctx, request) - if err != nil { - return nil, errors.ToRosetta(err) - } - - return options, nil -} - -// ConstructionSubmit Submit a pre-signed transaction to the node. This call does not block on the -// transaction being included in a block. Rather, it returns immediately with an indication of -// whether or not the transaction was included in the mempool. -func (on OnlineNetwork) ConstructionSubmit(ctx context.Context, request *types.ConstructionSubmitRequest) (*types.TransactionIdentifierResponse, *types.Error) { - txBytes, err := hex.DecodeString(request.SignedTransaction) - if err != nil { - return nil, errors.ToRosetta(err) - } - - res, meta, err := on.client.PostTx(txBytes) - if err != nil { - return nil, errors.ToRosetta(err) - } - - return &types.TransactionIdentifierResponse{ - TransactionIdentifier: res, - Metadata: meta, - }, nil -} diff --git a/tools/rosetta/lib/internal/service/mempool.go b/tools/rosetta/lib/internal/service/mempool.go deleted file mode 100644 index 9e93085bc090..000000000000 --- a/tools/rosetta/lib/internal/service/mempool.go +++ /dev/null @@ -1,33 +0,0 @@ -package service - -import ( - "context" - - "cosmossdk.io/tools/rosetta/lib/errors" - "github.com/coinbase/rosetta-sdk-go/types" -) - -// Mempool fetches the transactions contained in the mempool -func (on OnlineNetwork) Mempool(ctx context.Context, _ *types.NetworkRequest) (*types.MempoolResponse, *types.Error) { - txs, err := on.client.Mempool(ctx) - if err != nil { - return nil, errors.ToRosetta(err) - } - - return &types.MempoolResponse{ - TransactionIdentifiers: txs, - }, nil -} - -// MempoolTransaction fetches a single transaction in the mempool -// NOTE: it is not implemented yet -func (on OnlineNetwork) MempoolTransaction(ctx context.Context, request *types.MempoolTransactionRequest) (*types.MempoolTransactionResponse, *types.Error) { - tx, err := on.client.GetUnconfirmedTx(ctx, request.TransactionIdentifier.Hash) - if err != nil { - return nil, errors.ToRosetta(err) - } - - return &types.MempoolTransactionResponse{ - Transaction: tx, - }, nil -} diff --git a/tools/rosetta/lib/internal/service/network.go b/tools/rosetta/lib/internal/service/network.go deleted file mode 100644 index a5fd13f8e655..000000000000 --- a/tools/rosetta/lib/internal/service/network.go +++ /dev/null @@ -1,55 +0,0 @@ -package service - -import ( - "context" - - "cosmossdk.io/tools/rosetta/lib/errors" - "github.com/coinbase/rosetta-sdk-go/types" -) - -func (on OnlineNetwork) NetworkList(_ context.Context, _ *types.MetadataRequest) (*types.NetworkListResponse, *types.Error) { - return &types.NetworkListResponse{NetworkIdentifiers: []*types.NetworkIdentifier{on.network}}, nil -} - -func (on OnlineNetwork) NetworkOptions(_ context.Context, _ *types.NetworkRequest) (*types.NetworkOptionsResponse, *types.Error) { - return on.networkOptions, nil -} - -func (on OnlineNetwork) NetworkStatus(ctx context.Context, _ *types.NetworkRequest) (*types.NetworkStatusResponse, *types.Error) { - syncStatus, err := on.client.Status(ctx) - if err != nil { - return nil, errors.ToRosetta(err) - } - - block, err := on.client.BlockByHeight(ctx, syncStatus.CurrentIndex) - if err != nil { - return nil, errors.ToRosetta(err) - } - - oldestBlockIdentifier, err := on.client.OldestBlock(ctx) - if err != nil { - return nil, errors.ToRosetta(err) - } - - genesisBlock, err := on.client.GenesisBlock(ctx) - if err != nil { - genesisBlock, err = on.client.InitialHeightBlock(ctx) - if err != nil { - genesisBlock = oldestBlockIdentifier - } - } - - peers, err := on.client.Peers(ctx) - if err != nil { - return nil, errors.ToRosetta(err) - } - - return &types.NetworkStatusResponse{ - CurrentBlockIdentifier: block.Block, - CurrentBlockTimestamp: block.MillisecondTimestamp, - GenesisBlockIdentifier: genesisBlock.Block, - OldestBlockIdentifier: oldestBlockIdentifier.Block, - SyncStatus: syncStatus, - Peers: peers, - }, nil -} diff --git a/tools/rosetta/lib/internal/service/offline.go b/tools/rosetta/lib/internal/service/offline.go deleted file mode 100644 index 7f4a19bb0b2b..000000000000 --- a/tools/rosetta/lib/internal/service/offline.go +++ /dev/null @@ -1,63 +0,0 @@ -package service - -import ( - "context" - - "github.com/coinbase/rosetta-sdk-go/types" - - crgerrs "cosmossdk.io/tools/rosetta/lib/errors" - crgtypes "cosmossdk.io/tools/rosetta/lib/types" -) - -// NewOffline instantiates the instance of an offline network -// whilst the offline network does not support the DataAPI, -// it supports a subset of the construction API. -func NewOffline(network *types.NetworkIdentifier, client crgtypes.Client) (crgtypes.API, error) { - return OfflineNetwork{ - OnlineNetwork{ - client: client, - network: network, - networkOptions: networkOptionsFromClient(client, nil), - }, - }, nil -} - -// OfflineNetwork implements an offline data API -// which is basically a data API that constantly -// returns errors, because it cannot be used if offline -type OfflineNetwork struct { - OnlineNetwork -} - -// Implement DataAPI in offline mode, which means no method is available -func (o OfflineNetwork) AccountBalance(_ context.Context, _ *types.AccountBalanceRequest) (*types.AccountBalanceResponse, *types.Error) { - return nil, crgerrs.ToRosetta(crgerrs.ErrOffline) -} - -func (o OfflineNetwork) Block(_ context.Context, _ *types.BlockRequest) (*types.BlockResponse, *types.Error) { - return nil, crgerrs.ToRosetta(crgerrs.ErrOffline) -} - -func (o OfflineNetwork) BlockTransaction(_ context.Context, _ *types.BlockTransactionRequest) (*types.BlockTransactionResponse, *types.Error) { - return nil, crgerrs.ToRosetta(crgerrs.ErrOffline) -} - -func (o OfflineNetwork) Mempool(_ context.Context, _ *types.NetworkRequest) (*types.MempoolResponse, *types.Error) { - return nil, crgerrs.ToRosetta(crgerrs.ErrOffline) -} - -func (o OfflineNetwork) MempoolTransaction(_ context.Context, _ *types.MempoolTransactionRequest) (*types.MempoolTransactionResponse, *types.Error) { - return nil, crgerrs.ToRosetta(crgerrs.ErrOffline) -} - -func (o OfflineNetwork) NetworkStatus(_ context.Context, _ *types.NetworkRequest) (*types.NetworkStatusResponse, *types.Error) { - return nil, crgerrs.ToRosetta(crgerrs.ErrOffline) -} - -func (o OfflineNetwork) ConstructionSubmit(_ context.Context, _ *types.ConstructionSubmitRequest) (*types.TransactionIdentifierResponse, *types.Error) { - return nil, crgerrs.ToRosetta(crgerrs.ErrOffline) -} - -func (o OfflineNetwork) ConstructionMetadata(_ context.Context, _ *types.ConstructionMetadataRequest) (*types.ConstructionMetadataResponse, *types.Error) { - return nil, crgerrs.ToRosetta(crgerrs.ErrOffline) -} diff --git a/tools/rosetta/lib/internal/service/online.go b/tools/rosetta/lib/internal/service/online.go deleted file mode 100644 index 213ebe2747bb..000000000000 --- a/tools/rosetta/lib/internal/service/online.go +++ /dev/null @@ -1,65 +0,0 @@ -package service - -import ( - "context" - "time" - - "github.com/coinbase/rosetta-sdk-go/types" - - "cosmossdk.io/log" - crgerrs "cosmossdk.io/tools/rosetta/lib/errors" - crgtypes "cosmossdk.io/tools/rosetta/lib/types" -) - -// genesisBlockFetchTimeout defines a timeout to fetch the genesis block -const ( - genesisBlockFetchTimeout = 15 * time.Second -) - -// NewOnlineNetwork builds a single network adapter. -// It will get the Genesis block on the beginning to avoid calling it everytime. -func NewOnlineNetwork(network *types.NetworkIdentifier, client crgtypes.Client, logger log.Logger) (crgtypes.API, error) { - ctx, cancel := context.WithTimeout(context.Background(), genesisBlockFetchTimeout) - defer cancel() - - var genesisHeight int64 = 1 // to get genesis block height - genesisBlock, err := client.BlockByHeight(ctx, &genesisHeight) - if err != nil { - logger.Error("failed to get genesis block height", "err", err) - } - - return OnlineNetwork{ - client: client, - network: network, - networkOptions: networkOptionsFromClient(client, genesisBlock.Block), - }, nil -} - -// OnlineNetwork groups together all the components required for the full rosetta implementation -type OnlineNetwork struct { - client crgtypes.Client // used to query Cosmos app + CometBFT - - network *types.NetworkIdentifier // identifies the network, it's static - networkOptions *types.NetworkOptionsResponse // identifies the network options, it's static -} - -// networkOptionsFromClient builds network options given the client -func networkOptionsFromClient(client crgtypes.Client, genesisBlock *types.BlockIdentifier) *types.NetworkOptionsResponse { - var tsi *int64 - if genesisBlock != nil { - tsi = &(genesisBlock.Index) - } - return &types.NetworkOptionsResponse{ - Version: &types.Version{ - RosettaVersion: crgtypes.SpecVersion, - NodeVersion: client.Version(), - }, - Allow: &types.Allow{ - OperationStatuses: client.OperationStatuses(), - OperationTypes: client.SupportedOperations(), - Errors: crgerrs.SealAndListErrors(), - HistoricalBalanceLookup: true, - TimestampStartIndex: tsi, - }, - } -} diff --git a/tools/rosetta/lib/server/server.go b/tools/rosetta/lib/server/server.go deleted file mode 100644 index a0809fa8fe59..000000000000 --- a/tools/rosetta/lib/server/server.go +++ /dev/null @@ -1,125 +0,0 @@ -package server - -import ( - "fmt" - "net/http" - "os" - "time" - - "github.com/coinbase/rosetta-sdk-go/types" - assert "github.com/cosmos/rosetta-sdk-go/asserter" - "github.com/cosmos/rosetta-sdk-go/server" - - "cosmossdk.io/log" - "cosmossdk.io/tools/rosetta/lib/internal/service" - crgtypes "cosmossdk.io/tools/rosetta/lib/types" -) - -const ( - DefaultRetries = 5 - DefaultRetryWait = 5 * time.Second -) - -// Settings define the rosetta server settings -type Settings struct { - // Network contains the information regarding the network - Network *types.NetworkIdentifier - // Client is the online API handler - Client crgtypes.Client - // Listen is the address the handler will listen at - Listen string - // Offline defines if the rosetta service should be exposed in offline mode - Offline bool - // Retries is the number of readiness checks that will be attempted when instantiating the handler - // valid only for online API - Retries int - // RetryWait is the time that will be waited between retries - RetryWait time.Duration -} - -type Server struct { - h http.Handler - addr string - logger log.Logger -} - -func (h Server) Start() error { - h.logger.Info(fmt.Sprintf("Rosetta server listening on add %s", h.addr)) - return http.ListenAndServe(h.addr, h.h) //nolint:gosec // users are recommended to operate a proxy in front of this server -} - -func NewServer(settings Settings) (Server, error) { - asserter, err := assert.NewServer( - settings.Client.SupportedOperations(), - true, - []*types.NetworkIdentifier{settings.Network}, - nil, - false, - "", - ) - if err != nil { - return Server{}, fmt.Errorf("cannot build asserter: %w", err) - } - - logger := log.NewLogger(os.Stdout).With(log.ModuleKey, "rosetta") - - var adapter crgtypes.API - switch settings.Offline { - case true: - adapter, err = newOfflineAdapter(settings) - case false: - adapter, err = newOnlineAdapter(settings, logger) - } - if err != nil { - return Server{}, err - } - h := server.NewRouter( - server.NewAccountAPIController(adapter, asserter), - server.NewBlockAPIController(adapter, asserter), - server.NewNetworkAPIController(adapter, asserter), - server.NewMempoolAPIController(adapter, asserter), - server.NewConstructionAPIController(adapter, asserter), - ) - - return Server{ - h: h, - addr: settings.Listen, - logger: logger, - }, nil -} - -func newOfflineAdapter(settings Settings) (crgtypes.API, error) { - if settings.Client == nil { - return nil, fmt.Errorf("client is nil") - } - return service.NewOffline(settings.Network, settings.Client) -} - -func newOnlineAdapter(settings Settings, logger log.Logger) (crgtypes.API, error) { - if settings.Client == nil { - return nil, fmt.Errorf("client is nil") - } - if settings.Retries <= 0 { - settings.Retries = DefaultRetries - } - if settings.RetryWait == 0 { - settings.RetryWait = DefaultRetryWait - } - - var err error - err = settings.Client.Bootstrap() - if err != nil { - return nil, err - } - - for i := 0; i < settings.Retries; i++ { - err = settings.Client.Ready() - if err != nil { - logger.Error("[Rosetta]- Client is not ready. Retrying ...", "error", err) - time.Sleep(settings.RetryWait) - continue - } - return service.NewOnlineNetwork(settings.Network, settings.Client, logger) - } - return nil, fmt.Errorf("maximum number of retries exceeded, last error: %w", err) -} diff --git a/tools/rosetta/lib/types/types.go b/tools/rosetta/lib/types/types.go deleted file mode 100644 index 00711b5bfcf7..000000000000 --- a/tools/rosetta/lib/types/types.go +++ /dev/null @@ -1,171 +0,0 @@ -package types - -import ( - "context" - - "github.com/coinbase/rosetta-sdk-go/types" - "github.com/cosmos/rosetta-sdk-go/server" -) - -// SpecVersion defines the specification of rosetta -const SpecVersion = "" - -// NetworkInformationProvider defines the interface used to provide information regarding -// the network and the version of the cosmos sdk used -type NetworkInformationProvider interface { - // SupportedOperations lists the operations supported by the implementation - SupportedOperations() []string - // OperationStatuses returns the list of statuses supported by the implementation - OperationStatuses() []*types.OperationStatus - // Version returns the version of the node - Version() string -} - -// Client defines the API the client implementation should provide. -type Client interface { - // Bootstrap Needed if the client needs to perform some action before connecting. - Bootstrap() error - // Ready checks if the servicer constraints for queries are satisfied - // for example the node might still not be ready, it's useful in process - // when the rosetta instance might come up before the node itself - // the servicer must return nil if the node is ready - Ready() error - // GenesisBlock gets the genesis block of the chain - GenesisBlock(ctx context.Context) (BlockResponse, error) - // InitialHeightBlock gets block with height InitialHeight - // from GenesisDoc by downloading the blob - InitialHeightBlock(ctx context.Context) (BlockResponse, error) - // OldestBlock gets block with height EarliestBlockHeight from syncStatus - OldestBlock(ctx context.Context) (BlockResponse, error) - - // Data API - - // Balances fetches the balance of the given address - // if height is not nil, then the balance will be displayed - // at the provided height, otherwise last block balance will be returned - Balances(ctx context.Context, addr string, height *int64) ([]*types.Amount, error) - // BlockByHash gets a block and its transaction at the provided height - BlockByHash(ctx context.Context, hash string) (BlockResponse, error) - // BlockByHeight gets a block given its height, if height is nil then last block is returned - BlockByHeight(ctx context.Context, height *int64) (BlockResponse, error) - // BlockTransactionsByHash gets the block, parent block and transactions - // given the block hash. - BlockTransactionsByHash(ctx context.Context, hash string) (BlockTransactionsResponse, error) - // BlockTransactionsByHeight gets the block, parent block and transactions - // given the block hash. - BlockTransactionsByHeight(ctx context.Context, height *int64) (BlockTransactionsResponse, error) - // GetTx gets a transaction given its hash - GetTx(ctx context.Context, hash string) (*types.Transaction, error) - // GetUnconfirmedTx gets an unconfirmed Tx given its hash - // NOTE(fdymylja): NOT IMPLEMENTED YET! - GetUnconfirmedTx(ctx context.Context, hash string) (*types.Transaction, error) - // Mempool returns the list of the current non confirmed transactions - Mempool(ctx context.Context) ([]*types.TransactionIdentifier, error) - // Peers gets the peers currently connected to the node - Peers(ctx context.Context) ([]*types.Peer, error) - // Status returns the node status, such as sync data, version etc - Status(ctx context.Context) (*types.SyncStatus, error) - - // Construction API - - // PostTx posts txBytes to the node and returns the transaction identifier plus metadata related - // to the transaction itself. - PostTx(txBytes []byte) (res *types.TransactionIdentifier, meta map[string]interface{}, err error) - // ConstructionMetadataFromOptions builds metadata map from an option map - ConstructionMetadataFromOptions(ctx context.Context, options map[string]interface{}) (meta map[string]interface{}, err error) - OfflineClient -} - -// OfflineClient defines the functionalities supported without having access to the node -type OfflineClient interface { - NetworkInformationProvider - // SignedTx returns the signed transaction given the tx bytes (msgs) plus the signatures - SignedTx(ctx context.Context, txBytes []byte, sigs []*types.Signature) (signedTxBytes []byte, err error) - // TxOperationsAndSignersAccountIdentifiers returns the operations related to a transaction and the account - // identifiers if the transaction is signed - TxOperationsAndSignersAccountIdentifiers(signed bool, hexBytes []byte) (ops []*types.Operation, signers []*types.AccountIdentifier, err error) - // ConstructionPayload returns the construction payload given the request - ConstructionPayload(ctx context.Context, req *types.ConstructionPayloadsRequest) (resp *types.ConstructionPayloadsResponse, err error) - // PreprocessOperationsToOptions returns the options given the preprocess operations - PreprocessOperationsToOptions(ctx context.Context, req *types.ConstructionPreprocessRequest) (resp *types.ConstructionPreprocessResponse, err error) - // AccountIdentifierFromPublicKey returns the account identifier given the public key - AccountIdentifierFromPublicKey(pubKey *types.PublicKey) (*types.AccountIdentifier, error) -} - -type BlockTransactionsResponse struct { - BlockResponse - Transactions []*types.Transaction -} - -type BlockResponse struct { - Block *types.BlockIdentifier - ParentBlock *types.BlockIdentifier - MillisecondTimestamp int64 - TxCount int64 -} - -// API defines the exposed APIs -// if the service is online -type API interface { - DataAPI - ConstructionAPI -} - -// DataAPI defines the full data API implementation -type DataAPI interface { - server.NetworkAPIServicer - server.AccountAPIServicer - server.BlockAPIServicer - server.MempoolAPIServicer -} - -var _ server.ConstructionAPIServicer = ConstructionAPI(nil) - -// ConstructionAPI defines the full construction API with -// the online and offline endpoints -type ConstructionAPI interface { - ConstructionOnlineAPI - ConstructionOfflineAPI -} - -// ConstructionOnlineAPI defines the construction methods -// allowed in an online implementation -type ConstructionOnlineAPI interface { - ConstructionMetadata( - context.Context, - *types.ConstructionMetadataRequest, - ) (*types.ConstructionMetadataResponse, *types.Error) - ConstructionSubmit( - context.Context, - *types.ConstructionSubmitRequest, - ) (*types.TransactionIdentifierResponse, *types.Error) -} - -// ConstructionOfflineAPI defines the construction methods -// allowed -type ConstructionOfflineAPI interface { - ConstructionCombine( - context.Context, - *types.ConstructionCombineRequest, - ) (*types.ConstructionCombineResponse, *types.Error) - ConstructionDerive( - context.Context, - *types.ConstructionDeriveRequest, - ) (*types.ConstructionDeriveResponse, *types.Error) - ConstructionHash( - context.Context, - *types.ConstructionHashRequest, - ) (*types.TransactionIdentifierResponse, *types.Error) - ConstructionParse( - context.Context, - *types.ConstructionParseRequest, - ) (*types.ConstructionParseResponse, *types.Error) - ConstructionPayloads( - context.Context, - *types.ConstructionPayloadsRequest, - ) (*types.ConstructionPayloadsResponse, *types.Error) - ConstructionPreprocess( - context.Context, - *types.ConstructionPreprocessRequest, - ) (*types.ConstructionPreprocessResponse, *types.Error) -} diff --git a/tools/rosetta/openapi/index.html b/tools/rosetta/openapi/index.html deleted file mode 100644 index d87ae1996fb9..000000000000 --- a/tools/rosetta/openapi/index.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - Rosetta API - - - - - - -
- - - - diff --git a/tools/rosetta/openapi/openapi.yaml b/tools/rosetta/openapi/openapi.yaml deleted file mode 100644 index 57e39563dea6..000000000000 --- a/tools/rosetta/openapi/openapi.yaml +++ /dev/null @@ -1,1227 +0,0 @@ -openapi: 3.0.0 -info: - title: Rosetta API - description: | - version: "main" - license: - name: Apache 2.0 - url: https://github.com/cosmos/cosmos-sdk/blob/main/LICENSE -servers: - - url: http://localhost:8080 - description: Interact with the rosetta API locally on your device -tags: - - name: Account - description: Account endpoints are used to fetch the state of an account. - - name: Block - description: Block endpoints are used to access any data stored in a block - - name: Construction - description: Construction endpoints are used to create and broadcast transactions. - - name: Mempool - description: Mempool endpoints are used to fetch any data stored in the mempool. - - name: Network - description: Network endpoints are used when first connecting to a Rosetta endpoint to determine which network and sub-networks are supported. -paths: - /account/balance: - post: - summary: Get an array of all AccountBalances for an AccountIdentifier and the BlockIdentifier at which the balance lookup was performed. - tags: - - Account - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/AccountBalanceRequest" - responses: - "200": - description: Empty - content: - application/json: - schema: - $ref: "#/components/schemas/AccountBalanceResponse" - "500": - description: Error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - /account/coins: - post: - summary: Get an array of all unspent coins for an AccountIdentifier and the BlockIdentifier at which the lookup was performed. - tags: - - Account - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/AccountCoinsRequest" - responses: - "200": - description: Empty - content: - application/json: - schema: - $ref: "#/components/schemas/AccountCoinsRequest" - "500": - description: Error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - /block: - post: - summary: Get a block by its Block Identifier. - tags: - - Block - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/BlockRequest" - responses: - "200": - description: Empty - content: - application/json: - schema: - $ref: "#/components/schemas/BlockResponse" - "500": - description: Error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - /block/transaction: - post: - summary: Get a transaction in a block by its Transaction Identifier. - tags: - - Block - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/BlockTransactionRequest" - responses: - "200": - description: Empty - content: - application/json: - schema: - $ref: "#/components/schemas/BlockTransactionResponse" - "500": - description: Error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - /mempool: - post: - summary: Get all Transaction Identifiers in the mempool - tags: - - Mempool - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/MempoolRequest" - responses: - "200": - description: Empty - content: - application/json: - schema: - $ref: "#/components/schemas/MempoolResponse" - "500": - description: Error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - /mempool/transaction: - post: - summary: Get a transaction in the mempool by its Transaction Identifier. - tags: - - Mempool - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/MempoolTransactionRequest" - responses: - "200": - description: Empty - content: - application/json: - schema: - $ref: "#/components/schemas/MempoolTransactionResponse" - "500": - description: Error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - /network/list: - post: - summary: Returns a list of NetworkIdentifiers that the Rosetta server supports. - tags: - - Network - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/NetworkListRequest" - responses: - "200": - description: Empty - content: - application/json: - schema: - $ref: "#/components/schemas/NetworkListResponse" - "500": - description: Error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - /network/options: - post: - summary: Returns the version information and allowed network-specific types for a NetworkIdentifier. - tags: - - Network - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/NetworkOptionsRequest" - responses: - "200": - description: Empty - content: - application/json: - schema: - $ref: "#/components/schemas/NetworkOptionsResponse" - "500": - description: Error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - /network/status: - post: - summary: Returns the current status of the network requested. - tags: - - Network - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/NetworkStatusRequest" - responses: - "200": - description: Empty - content: - application/json: - schema: - $ref: "#/components/schemas/NetworkStatusResponse" - "500": - description: Error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - /construction/combine: - post: - summary: Combine creates a network-specific transaction from an unsigned transaction and an array of provided signatures. - tags: - - Construction - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ConstructionCombineRequest" - responses: - "200": - description: Empty - content: - application/json: - schema: - $ref: "#/components/schemas/ConstructionCombineResponse" - "500": - description: Error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - /construction/derive: - post: - summary: Derive returns the AccountIdentifier associated with a public key. - tags: - - Construction - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ConstructionDeriveRequest" - responses: - "200": - description: Empty - content: - application/json: - schema: - $ref: "#/components/schemas/ConstructionDeriveResponse" - "500": - description: Error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - /construction/hash: - post: - summary: Derive returns the AccountIdentifier associated with a public key. - tags: - - Construction - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ConstructionHashRequest" - responses: - "200": - description: Empty - content: - application/json: - schema: - $ref: "#/components/schemas/ConstructionHashResponse" - "500": - description: Error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - /construction/metadata: - post: - summary: Get any information required to construct a transaction for a specific network. - tags: - - Construction - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ConstructionMetadataRequest" - responses: - "200": - description: Empty - content: - application/json: - schema: - $ref: "#/components/schemas/ConstructionMetadataResponse" - "500": - description: Error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - /construction/parse: - post: - summary: Parse is called on both unsigned and signed transactions to understand the intent of the formulated transaction. - tags: - - Construction - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ConstructionParseRequest" - responses: - "200": - description: Empty - content: - application/json: - schema: - $ref: "#/components/schemas/ConstructionParseResponse" - "500": - description: Error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - /construction/payloads: - post: - summary: Payloads is called with an array of operations and the response from `/construction/metadata`. - tags: - - Construction - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ConstructionPayloadsRequest" - responses: - "200": - description: Empty - content: - application/json: - schema: - $ref: "#/components/schemas/ConstructionPayloadsResponse" - "500": - description: Error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - /construction/preprocess: - post: - summary: Preprocess is called prior to /construction/payloads to construct a request for any metadata that is needed for transaction construction given. - tags: - - Construction - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ConstructionPreprocessRequest" - responses: - "200": - description: Empty - content: - application/json: - schema: - $ref: "#/components/schemas/ConstructionPreprocessResponse" - "500": - description: Error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - /construction/submit: - post: - summary: Submit a pre-signed transaction to the node. This call should not block on the transaction being included in a block. - tags: - - Construction - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ConstructionSubmitRequest" - responses: - "200": - description: Empty - content: - application/json: - schema: - $ref: "#/components/schemas/ConstructionSubmitResponse" - "500": - description: Error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" -components: - schemas: - Error: - type: object - required: - - code - - message - - retriable - properties: - code: - type: integer - example: 12 - message: - type: string - example: "" - description: - type: string - example: "" - retriable: - type: boolean - example: true - details: - type: object - - BlockIdentifier: - type: object - required: - - index - - hash - properties: - index: - type: integer - example: 13342095 - hash: - type: string - example: "F7EB233A45FCB1B42457F1ACF50C2574AE14731D0B31BBD5D6B199868023119D" - PartialBlockIdentifier: - type: object - properties: - index: - type: integer - example: 13342095 - hash: - type: string - example: "F7EB233A45FCB1B42457F1ACF50C2574AE14731D0B31BBD5D6B199868023119D" - Block: - type: object - required: - - block_identifier - - parent_block_identifier - - timestamp - - transactions - properties: - block_identifier: - $ref: "#/components/schemas/BlockIdentifier" - parent_block_identifier: - $ref: "#/components/schemas/BlockIdentifier" - timestamp: - type: integer - transactions: - type: array - items: - $ref: "#/components/schemas/Transaction" - metadata: - type: object - - OperationStatus: - type: object - required: - - status - - successful - properties: - status: - type: string - successful: - type: boolean - OperationIdentifier: - type: object - required: - - index - properties: - index: - type: integer - network_index: - type: integer - Operation: - type: object - required: - - operation_identifier - - type - properties: - operation_identifier: - $ref: "#/components/schemas/OperationIdentifier" - related_operations: - type: array - items: - $ref: "#/components/schemas/OperationIdentifier" - type: - type: string - status: - type: string - account: - $ref: "#/components/schemas/AccountIdentifier" - amount: - $ref: "#/components/schemas/Amount" - coin_change: - $ref: "#/components/schemas/CoinChange" - metadata: - type: object - - Direction: - type: string - enum: - - forward - - backward - TransactionIdentifier: - type: object - required: - - hash - properties: - hash: - type: string - RelatedTransaction: - type: object - required: - - transaction_identifier - - direction - properties: - network_identifier: - $ref: "#/components/schemas/NetworkIdentifier" - transaction_identifier: - $ref: "#/components/schemas/TransactionIdentifier" - direction: - $ref: "#/components/schemas/Direction" - - Transaction: - type: object - required: - - transaction_identifier - - operations - properties: - transaction_identifier: - $ref: "#/components/schemas/TransactionIdentifier" - operations: - type: array - items: - $ref: "#/components/schemas/Operation" - related_transactions: - type: array - items: - $ref: "#/components/schemas/RelatedTransaction" - metadata: - type: object - - ExemptionType: - type: string - enum: - - greater_or_equal - - less_or_equal - - dynamic - BalanceExemption: - type: object - properties: - sub_account_address: - type: string - currency: - $ref: "#/components/schemas/Currency" - exemption_type: - $ref: "#/components/schemas/ExemptionType" - Currency: - type: object - required: - - symbol - - decimals - properties: - symbol: - type: string - example: "ATOM" - decimals: - type: integer - example: 8 - metadata: - type: object - Amount: - type: object - required: - - value - - currency - properties: - value: - type: string - currency: - $ref: "#/components/schemas/Currency" - metadata: - type: object - - SubNetworkIdentifier: - type: object - required: - - network - properties: - network: - type: string - metadata: - type: object - NetworkIdentifier: - type: object - required: - - blockchain - - network - properties: - blockchain: - type: string - example: "Cosmos" - network: - type: string - example: "cosmoshub-4" - sub_network_identifier: - $ref: "#/components/schemas/SubNetworkIdentifier" - - SubAccount: - type: object - required: - - address - properties: - address: - type: string - example: "cosmos149hrsy9sze6635a29p7tp33sep35zxqfaknypj" - metadata: - type: object - AccountIdentifier: - type: object - required: - - address - properties: - address: - type: string - sub_account: - $ref: "#/components/schemas/SubAccount" - metadata: - type: object - - CoinAction: - type: string - enum: - - coin_created - - coin_spent - CoinChange: - type: object - required: - - coin_action - - coin_identifier - properties: - coin_identifier: - $ref: "#/components/schemas/CoinIdentifier" - coin_action: - $ref: "#/components/schemas/CoinAction" - CoinIdentifier: - type: object - required: - - identifier - properties: - identifier: - type: string - Coin: - type: object - properties: - coin_identifier: - $ref: "#/components/schemas/CoinIdentifier" - amount: - $ref: "#/components/schemas/Amount" - - Case: - type: string - enum: - - upper_case - - lower_case - - case_sensitive - - null - Version: - type: object - required: - - rosetta_version - - node_version - properties: - rosetta_version: - type: string - node_version: - type: string - middleware_version: - type: string - metadata: - type: object - Allow: - type: object - required: - - operation_statuses - - operation_types - - errors - - historical_balance_lookup - - call_methods - - balance_exemptions - - mempool_coins - properties: - operation_statuses: - type: array - items: - $ref: "#/components/schemas/OperationStatus" - operation_types: - type: array - items: - type: string - errors: - type: array - items: - $ref: "#/components/schemas/Error" - historical_balance_lookup: - type: boolean - timestamp_start_index: - type: integer - call_methods: - type: array - items: - type: string - balance_exemptions: - $ref: "#/components/schemas/BalanceExemption" - mempool_coins: - type: boolean - block_hash_case: - $ref: "#/components/schemas/Case" - transaction_hash_case: - $ref: "#/components/schemas/Case" - - SyncStatus: - type: object - properties: - current_index: - type: integer - target_index: - type: integer - stage: - type: string - synced: - type: boolean - - Peer: - type: object - required: - - peer_id - properties: - peer_id: - type: string - metadata: - type: object - - CurveType: - type: string - enum: - - secp256k1 - - secp256r1 - - edwards25519 - - tweedle - - pallas - PublicKey: - type: object - required: - - hex_bytes - - curve_type - properties: - hex_bytes: - type: string - curve_type: - $ref: "#/components/schemas/CurveType" - SignatureType: - type: string - enum: - - ecdsa - - ecdsa_recovery - - ed25519 - - schnorr_1 - - schnorr_poseidon - SigningPayload: - type: object - required: - - hex_bytes - properties: - address: - type: string - account_identifier: - $ref: "#/components/schemas/AccountIdentifier" - hex_bytes: - type: string - signature_type: - $ref: "#/components/schemas/SignatureType" - Signature: - type: object - required: - - signing_payload - - public_key - - signature_type - - hex_bytes - properties: - signing_payload: - $ref: "#/components/schemas/SigningPayload" - public_key: - $ref: "#/components/schemas/PublicKey" - signature_type: - $ref: "#/components/schemas/SignatureType" - hex_bytes: - type: string - - - AccountBalanceRequest: - type: object - required: - - network_identifier - - account_identifier - properties: - network_identifier: - $ref: "#/components/schemas/NetworkIdentifier" - account_identifier: - $ref: "#/components/schemas/AccountIdentifier" - block_identifier: - $ref: "#/components/schemas/PartialBlockIdentifier" - currency: - $ref: "#/components/schemas/Currency" - AccountBalanceResponse: - type: object - required: - - block_identifier - - balances - properties: - block_identifier: - $ref: "#/components/schemas/BlockIdentifier" - balances: - type: array - items: - $ref: "#/components/schemas/Amount" - metadata: - type: object - AccountCoinsRequest: - type: object - required: - - network_identifier - - account_identifier - - include_mempool - properties: - network_identifier: - $ref: "#/components/schemas/NetworkIdentifier" - account_identifier: - $ref: "#/components/schemas/AccountIdentifier" - include_mempool: - type: boolean - currencies: - type: array - items: - $ref: "#/components/schemas/Currency" - AccountCoinsResponse: - type: object - required: - - block_identifier - - coins - properties: - block_identifier: - $ref: "#/components/schemas/BlockIdentifier" - coins: - type: array - items: - $ref: "#/components/schemas/Coin" - metadata: - type: object - - BlockRequest: - type: object - required: - - network_identifier - - block_identifier - properties: - network_identifier: - $ref: "#/components/schemas/NetworkIdentifier" - block_identifier: - $ref: "#/components/schemas/PartialBlockIdentifier" - BlockResponse: - type: object - properties: - block: - $ref: "#/components/schemas/Block" - other_transactions: - type: array - items: - $ref: "#/components/schemas/TransactionIdentifier" - BlockTransactionRequest: - type: object - required: - - network_identifier - - block_identifier - - transaction_identifier - properties: - network_identifier: - $ref: "#/components/schemas/NetworkIdentifier" - block_identifier: - $ref: "#/components/schemas/BlockIdentifier" - transaction_identifier: - $ref: "#/components/schemas/TransactionIdentifier" - BlockTransactionResponse: - type: object - required: - - transaction - properties: - transaction: - $ref: "#/components/schemas/Transaction" - - MempoolRequest: - type: object - required: - - network_identifier - properties: - network_identifier: - $ref: "#/components/schemas/NetworkIdentifier" - metadata: - type: object - MempoolResponse: - type: object - required: - - transaction_identifiers - properties: - transaction_identifiers: - type: array - items: - $ref: "#/components/schemas/TransactionIdentifier" - MempoolTransactionRequest: - type: object - required: - - network_identifier - - transaction_identifier - properties: - network_identifier: - $ref: "#/components/schemas/NetworkIdentifier" - transaction_identifier: - $ref: "#/components/schemas/TransactionIdentifier" - MempoolTransactionResponse: - type: object - required: - - transaction - properties: - transaction: - $ref: "#/components/schemas/TransactionIdentifier" - metadata: - type: object - - NetworkListRequest: - type: object - properties: - metadata: - type: object - NetworkListResponse: - type: object - required: - - network_identifiers - properties: - network_identifiers: - type: array - items: - $ref: "#/components/schemas/NetworkIdentifier" - NetworkOptionsRequest: - type: object - required: - - network_identifier - properties: - network_identifier: - $ref: "#/components/schemas/NetworkIdentifier" - metadata: - type: object - NetworkOptionsResponse: - type: object - required: - - version - - allow - properties: - version: - $ref: "#/components/schemas/Version" - allow: - $ref: "#/components/schemas/Allow" - NetworkStatusRequest: - type: object - required: - - network_identifier - properties: - network_identifier: - $ref: "#/components/schemas/NetworkIdentifier" - metadata: - type: object - NetworkStatusResponse: - type: object - required: - - current_block_identifier - - current_block_timestamp - - genesis_block_identifier - properties: - current_block_identifier: - $ref: "#/components/schemas/BlockIdentifier" - current_block_timestamp: - type: integer - genesis_block_identifier: - $ref: "#/components/schemas/BlockIdentifier" - oldest_block_identifier: - $ref: "#/components/schemas/BlockIdentifier" - sync_status: - $ref: "#/components/schemas/SyncStatus" - peers: - type: array - items: - $ref: "#/components/schemas/Peer" - ConstructionCombineRequest: - type: object - required: - - network_identifier - - unsigned_transaction - - signatures - properties: - network_identifier: - $ref: "#/components/schemas/NetworkIdentifier" - unsigned_transaction: - type: string - signatures: - type: array - items: - $ref: "#/components/schemas/Signature" - ConstructionCombineResponse: - type: object - required: - - signed_transaction - properties: - signed_transaction: - type: string - ConstructionDeriveRequest: - type: object - required: - - network_identifier - - public_key - properties: - network_identifier: - $ref: "#/components/schemas/NetworkIdentifier" - public_key: - $ref: "#/components/schemas/PublicKey" - metadata: - type: object - ConstructionDeriveResponse: - type: object - properties: - address: - type: string - account_identifier: - $ref: "#/components/schemas/AccountIdentifier" - metadata: - type: object - ConstructionHashRequest: - type: object - required: - - network_identifier - - signed_transaction - properties: - network_identifier: - $ref: "#/components/schemas/NetworkIdentifier" - signed_transaction: - type: string - ConstructionHashResponse: - type: object - required: - - transaction_identifier - properties: - transaction_identifier: - $ref: "#/components/schemas/TransactionIdentifier" - metadata: - type: object - ConstructionMetadataRequest: - type: object - required: - - network_identifier - properties: - network_identifier: - $ref: "#/components/schemas/NetworkIdentifier" - options: - type: object - public_keys: - type: array - items: - $ref: "#/components/schemas/PublicKey" - ConstructionMetadataResponse: - type: object - properties: - metadata: - type: object - suggested_fee: - type: array - items: - $ref: "#/components/schemas/Amount" - ConstructionParseRequest: - type: object - required: - - network_identifier - - signed - - transaction - properties: - network_identifier: - $ref: "#/components/schemas/NetworkIdentifier" - signed: - type: boolean - transaction: - type: string - ConstructionParseResponse: - type: object - required: - - operations - properties: - operations: - type: array - items: - $ref: "#/components/schemas/Operation" - signers: - type: array - items: - type: string - account_identifier_signers: - type: array - items: - $ref: "#/components/schemas/AccountIdentifier" - metadata: - type: object - ConstructionPayloadsRequest: - type: object - required: - - network_identifier - - operations - properties: - network_identifier: - $ref: "#/components/schemas/NetworkIdentifier" - operations: - type: array - items: - $ref: "#/components/schemas/Operation" - metadata.: - type: object - public_keys: - type: array - items: - $ref: "#/components/schemas/PublicKey" - ConstructionPayloadsResponse: - type: object - required: - - unsigned_transaction - - payloads - properties: - unsigned_transaction: - type: string - payloads: - type: array - items: - $ref: "#/components/schemas/SigningPayload" - ConstructionPreprocessRequest: - type: object - required: - - network_identifier - - operations - properties: - network_identifier: - $ref: "#/components/schemas/NetworkIdentifier" - operations: - type: array - items: - $ref: "#/components/schemas/Operation" - metadata: - type: object - ConstructionPreprocessResponse: - type: object - properties: - options: - type: object - required_public_keys: - type: array - items: - $ref: "#/components/schemas/AccountIdentifier" - ConstructionSubmitRequest: - type: object - required: - - network_identifier - - signed_transaction - properties: - network_identifier: - $ref: "#/components/schemas/NetworkIdentifier" - signed_transaction: - type: string - - ConstructionSubmitResponse: - type: object - required: - - transaction_identifier - properties: - transaction_identifier: - $ref: "#/components/schemas/TransactionIdentifier" - metadata: - type: object - - - - - - - - diff --git a/tools/rosetta/sonar-project.properties b/tools/rosetta/sonar-project.properties deleted file mode 100644 index ec76cff28048..000000000000 --- a/tools/rosetta/sonar-project.properties +++ /dev/null @@ -1,14 +0,0 @@ -sonar.projectKey=cosmos-sdk-tools-rosetta -sonar.organization=cosmos - -sonar.projectName=Cosmos SDK - Rosetta -sonar.project.monorepo.enabled=true - -sonar.sources=. -sonar.exclusions=**/*_test.go -sonar.tests=. -sonar.test.inclusions=**/*_test.go -sonar.go.coverage.reportPaths=coverage.out - -sonar.sourceEncoding=UTF-8 -sonar.scm.provider=git \ No newline at end of file diff --git a/tools/rosetta/types.go b/tools/rosetta/types.go deleted file mode 100644 index fbc7f13fa488..000000000000 --- a/tools/rosetta/types.go +++ /dev/null @@ -1,104 +0,0 @@ -package rosetta - -import ( - "crypto/sha256" -) - -// statuses -const ( - StatusTxSuccess = "Success" - StatusTxReverted = "Reverted" - StatusPeerSynced = "synced" - StatusPeerSyncing = "syncing" -) - -// In rosetta all state transitions must be represented as transactions -// since in CometBFT begin block and end block are state transitions -// which are not represented as transactions we mock only the balance changes -// happening at those levels as transactions. (check BeginBlockTxHash for more info) -const ( - DeliverTxSize = sha256.Size - BeginEndBlockTxSize = DeliverTxSize + 1 - EndBlockHashStart = 0x0 - BeginBlockHashStart = 0x1 -) - -const ( - // BurnerAddressIdentifier mocks the account identifier of a burner address - // all coins burned in the sdk will be sent to this identifier, which per sdk.AccAddress - // design we will never be able to query (as of now). - // Rosetta does not understand supply contraction. - BurnerAddressIdentifier = "burner" -) - -// TransactionType is used to distinguish if a rosetta provided hash -// represents endblock, beginblock or deliver tx -type TransactionType int - -const ( - UnrecognizedTx TransactionType = iota - BeginBlockTx - EndBlockTx - DeliverTxTx -) - -// metadata options - -// misc -const ( - Log = "log" -) - -// ConstructionPreprocessMetadata is used to represent -// the metadata rosetta can provide during preprocess options -type ConstructionPreprocessMetadata struct { - Memo string `json:"memo"` - GasLimit uint64 `json:"gas_limit"` - GasPrice string `json:"gas_price"` -} - -func (c *ConstructionPreprocessMetadata) FromMetadata(meta map[string]interface{}) error { - return unmarshalMetadata(meta, c) -} - -// PreprocessOperationsOptionsResponse is the structured metadata options returned by the preprocess operations endpoint -type PreprocessOperationsOptionsResponse struct { - ExpectedSigners []string `json:"expected_signers"` - Memo string `json:"memo"` - GasLimit uint64 `json:"gas_limit"` - GasPrice string `json:"gas_price"` -} - -func (c PreprocessOperationsOptionsResponse) ToMetadata() (map[string]interface{}, error) { - return marshalMetadata(c) -} - -func (c *PreprocessOperationsOptionsResponse) FromMetadata(meta map[string]interface{}) error { - return unmarshalMetadata(meta, c) -} - -// SignerData contains information on the signers when the request -// is being created, used to populate the account information -type SignerData struct { - AccountNumber uint64 `json:"account_number"` - Sequence uint64 `json:"sequence"` -} - -// ConstructionMetadata are the metadata options used to -// construct a transaction. It is returned by ConstructionMetadataFromOptions -// and fed to ConstructionPayload to process the bytes to sign. -type ConstructionMetadata struct { - ChainID string `json:"chain_id"` - SignersData []*SignerData `json:"signer_data"` - GasLimit uint64 `json:"gas_limit"` - GasPrice string `json:"gas_price"` - Memo string `json:"memo"` -} - -func (c ConstructionMetadata) ToMetadata() (map[string]interface{}, error) { - return marshalMetadata(c) -} - -func (c *ConstructionMetadata) FromMetadata(meta map[string]interface{}) error { - return unmarshalMetadata(meta, c) -} diff --git a/tools/rosetta/util.go b/tools/rosetta/util.go deleted file mode 100644 index 5d1bee870eb1..000000000000 --- a/tools/rosetta/util.go +++ /dev/null @@ -1,43 +0,0 @@ -package rosetta - -import ( - "encoding/json" - "time" - - crgerrs "cosmossdk.io/tools/rosetta/lib/errors" -) - -// timeToMilliseconds converts time to milliseconds timestamp -func timeToMilliseconds(t time.Time) int64 { - return t.UnixNano() / (int64(time.Millisecond) / int64(time.Nanosecond)) -} - -// unmarshalMetadata unmarshals the given meta to the target -func unmarshalMetadata(meta map[string]interface{}, target interface{}) error { - b, err := json.Marshal(meta) - if err != nil { - return crgerrs.WrapError(crgerrs.ErrCodec, err.Error()) - } - - err = json.Unmarshal(b, target) - if err != nil { - return crgerrs.WrapError(crgerrs.ErrCodec, err.Error()) - } - - return nil -} - -// marshalMetadata marshals the given interface to map[string]interface{} -func marshalMetadata(o interface{}) (meta map[string]interface{}, err error) { - b, err := json.Marshal(o) - if err != nil { - return nil, crgerrs.WrapError(crgerrs.ErrCodec, err.Error()) - } - meta = make(map[string]interface{}) - err = json.Unmarshal(b, &meta) - if err != nil { - return nil, err - } - - return -} diff --git a/types/abci.go b/types/abci.go index 39e6637cd049..8325f5dadf0c 100644 --- a/types/abci.go +++ b/types/abci.go @@ -30,6 +30,14 @@ type ExtendVoteHandler func(Context, *abci.RequestExtendVote) (*abci.ResponseExt // pre-commit vote extension. type VerifyVoteExtensionHandler func(Context, *abci.RequestVerifyVoteExtension) (*abci.ResponseVerifyVoteExtension, error) +// PreBlocker runs code before the `BeginBlocker` and defines a function type alias for executing logic right +// before FinalizeBlock is called (but after its context has been set up). It is +// intended to allow applications to perform computation on vote extensions and +// persist their results in state. +// +// Note: returning an error will make FinalizeBlock fail. +type PreBlocker func(Context, *abci.RequestFinalizeBlock) (*ResponsePreBlock, error) + // BeginBlocker defines a function type alias for executing application // business logic before transactions are executed. // @@ -58,3 +66,11 @@ type EndBlock struct { type BeginBlock struct { Events []abci.Event } + +type ResponsePreBlock struct { + ConsensusParamsChanged bool +} + +func (r ResponsePreBlock) IsConsensusParamsChanged() bool { + return r.ConsensusParamsChanged +} diff --git a/types/address.go b/types/address.go index d0cb2b04d542..cd913d493e63 100644 --- a/types/address.go +++ b/types/address.go @@ -372,7 +372,7 @@ func (va ValAddress) Equals(va2 Address) bool { return bytes.Equal(va.Bytes(), va2.Bytes()) } -// Returns boolean for whether an AccAddress is empty +// Returns boolean for whether an ValAddress is empty func (va ValAddress) Empty() bool { return len(va) == 0 } @@ -491,6 +491,7 @@ func (va ValAddress) Format(s fmt.State, verb rune) { type ConsAddress []byte // ConsAddressFromHex creates a ConsAddress from a hex string. +// Deprecated: use ConsensusAddressCodec from Staking keeper func ConsAddressFromHex(address string) (addr ConsAddress, err error) { bz, err := addressBytesFromHexString(address) return ConsAddress(bz), err diff --git a/types/bech32/bech32.go b/types/bech32/bech32.go index 59bd8b9541df..8356fa92d3e9 100644 --- a/types/bech32/bech32.go +++ b/types/bech32/bech32.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/btcutil/bech32" ) -// ConvertAndEncode converts from a base64 encoded byte string to base32 encoded byte string and then to bech32. +// ConvertAndEncode converts from a base256 encoded byte string to base32 encoded byte string and then to bech32. func ConvertAndEncode(hrp string, data []byte) (string, error) { converted, err := bech32.ConvertBits(data, 8, 5, true) if err != nil { @@ -16,7 +16,7 @@ func ConvertAndEncode(hrp string, data []byte) (string, error) { return bech32.Encode(hrp, converted) } -// DecodeAndConvert decodes a bech32 encoded string and converts to base64 encoded bytes. +// DecodeAndConvert decodes a bech32 encoded string and converts to base256 encoded bytes. func DecodeAndConvert(bech string) (string, []byte, error) { hrp, data, err := bech32.Decode(bech, 1023) if err != nil { diff --git a/types/codec_test.go b/types/codec_test.go index 4a7ac9cc9769..b4b01c23ecd9 100644 --- a/types/codec_test.go +++ b/types/codec_test.go @@ -4,8 +4,9 @@ import ( "testing" "cosmossdk.io/collections/colltest" + "cosmossdk.io/math" ) func TestIntValue(t *testing.T) { - colltest.TestValueCodec(t, IntValue, NewInt(10005994859)) + colltest.TestValueCodec(t, IntValue, math.NewInt(10005994859)) } diff --git a/types/coin.go b/types/coin.go index c624f4b2bd61..136295eed295 100644 --- a/types/coin.go +++ b/types/coin.go @@ -7,6 +7,8 @@ import ( "regexp" "sort" "strings" + + "cosmossdk.io/math" ) //----------------------------------------------------------------------------- @@ -14,7 +16,7 @@ import ( // NewCoin returns a new coin with a denomination and amount. It will panic if // the amount is negative or if the denomination is invalid. -func NewCoin(denom string, amount Int) Coin { +func NewCoin(denom string, amount math.Int) Coin { coin := Coin{ Denom: denom, Amount: amount, @@ -30,7 +32,7 @@ func NewCoin(denom string, amount Int) Coin { // NewInt64Coin returns a new coin with a denomination and amount. It will panic // if the amount is negative. func NewInt64Coin(denom string, amount int64) Coin { - return NewCoin(denom, NewInt(amount)) + return NewCoin(denom, math.NewInt(amount)) } // String provides a human-readable representation of a coin @@ -113,7 +115,7 @@ func (coin Coin) Add(coinB Coin) Coin { } // AddAmount adds an amount to the Coin. -func (coin Coin) AddAmount(amount Int) Coin { +func (coin Coin) AddAmount(amount math.Int) Coin { return Coin{coin.Denom, coin.Amount.Add(amount)} } @@ -143,7 +145,7 @@ func (coin Coin) SafeSub(coinB Coin) (Coin, error) { } // SubAmount subtracts an amount from the Coin. -func (coin Coin) SubAmount(amount Int) Coin { +func (coin Coin) SubAmount(amount math.Int) Coin { res := Coin{coin.Denom, coin.Amount.Sub(amount)} if res.IsNegative() { panic("negative coin amount") @@ -337,7 +339,7 @@ func (coins Coins) safeAdd(coinsB Coins) (coalesced Coins) { } for denom, cL := range uniqCoins { //#nosec - comboCoin := Coin{Denom: denom, Amount: NewInt(0)} + comboCoin := Coin{Denom: denom, Amount: math.NewInt(0)} for _, c := range cL { comboCoin = comboCoin.Add(c) } @@ -400,7 +402,7 @@ func (coins Coins) SafeSub(coinsB ...Coin) (Coins, bool) { // {2A, 3B} * 2 = {4A, 6B} // {2A} * 0 panics // Note, if IsValid was true on Coins, IsValid stays true. -func (coins Coins) MulInt(x Int) Coins { +func (coins Coins) MulInt(x math.Int) Coins { coins, ok := coins.SafeMulInt(x) if !ok { panic("multiplying by zero is an invalid operation on coins") @@ -411,7 +413,7 @@ func (coins Coins) MulInt(x Int) Coins { // SafeMulInt performs the same arithmetic as MulInt but returns false // if the `multiplier` is zero because it makes IsValid return false. -func (coins Coins) SafeMulInt(x Int) (Coins, bool) { +func (coins Coins) SafeMulInt(x math.Int) (Coins, bool) { if x.IsZero() { return nil, false } @@ -434,7 +436,7 @@ func (coins Coins) SafeMulInt(x Int) (Coins, bool) { // {2A} / 0 = panics // Note, if IsValid was true on Coins, IsValid stays true, // unless the `divisor` is greater than the smallest coin amount. -func (coins Coins) QuoInt(x Int) Coins { +func (coins Coins) QuoInt(x math.Int) Coins { coins, ok := coins.SafeQuoInt(x) if !ok { panic("dividing by zero is an invalid operation on coins") @@ -445,7 +447,7 @@ func (coins Coins) QuoInt(x Int) Coins { // SafeQuoInt performs the same arithmetic as QuoInt but returns an error // if the division cannot be done. -func (coins Coins) SafeQuoInt(x Int) (Coins, bool) { +func (coins Coins) SafeQuoInt(x math.Int) (Coins, bool) { if x.IsZero() { return nil, false } @@ -681,18 +683,18 @@ func (coins Coins) Empty() bool { } // AmountOf returns the amount of a denom from coins -func (coins Coins) AmountOf(denom string) Int { +func (coins Coins) AmountOf(denom string) math.Int { mustValidateDenom(denom) return coins.AmountOfNoDenomValidation(denom) } // AmountOfNoDenomValidation returns the amount of a denom from coins // without validating the denomination. -func (coins Coins) AmountOfNoDenomValidation(denom string) Int { +func (coins Coins) AmountOfNoDenomValidation(denom string) math.Int { if ok, c := coins.Find(denom); ok { return c.Amount } - return ZeroInt() + return math.ZeroInt() } // Find returns true and coin if the denom exists in coins. Otherwise it returns false @@ -818,7 +820,12 @@ var _ sort.Interface = Coins{} // Sort is a helper function to sort the set of coins in-place func (coins Coins) Sort() Coins { - sort.Sort(coins) + // sort.Sort(coins) does a costly runtime copy as part of `runtime.convTSlice` + // So we avoid this heap allocation if len(coins) <= 1. In the future, we should hopefully find + // a strategy to always avoid this. + if len(coins) > 1 { + sort.Sort(coins) + } return coins } diff --git a/types/coin.pb.go b/types/coin.pb.go index 28b017a81459..b1674eb8f70e 100644 --- a/types/coin.pb.go +++ b/types/coin.pb.go @@ -4,6 +4,7 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" @@ -30,8 +31,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // NOTE: The amount field is an Int which implements the custom method // signatures required by gogoproto. type Coin struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - Amount Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=Int" json:"amount"` + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + Amount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` } func (m *Coin) Reset() { *m = Coin{} } @@ -78,8 +79,8 @@ func (m *Coin) GetDenom() string { // NOTE: The amount field is an Dec which implements the custom method // signatures required by gogoproto. type DecCoin struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - Amount Dec `protobuf:"bytes,2,opt,name=amount,proto3,customtype=Dec" json:"amount"` + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + Amount cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=amount,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"amount"` } func (m *DecCoin) Reset() { *m = DecCoin{} } @@ -122,8 +123,9 @@ func (m *DecCoin) GetDenom() string { } // IntProto defines a Protobuf wrapper around an Int object. +// Deprecated: Prefer to use math.Int directly. It supports binary Marshal and Unmarshal. type IntProto struct { - Int Int `protobuf:"bytes,1,opt,name=int,proto3,customtype=Int" json:"int"` + Int cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=int,proto3,customtype=cosmossdk.io/math.Int" json:"int"` } func (m *IntProto) Reset() { *m = IntProto{} } @@ -159,8 +161,9 @@ func (m *IntProto) XXX_DiscardUnknown() { var xxx_messageInfo_IntProto proto.InternalMessageInfo // DecProto defines a Protobuf wrapper around a Dec object. +// Deprecated: Prefer to use math.LegacyDec directly. It supports binary Marshal and Unmarshal. type DecProto struct { - Dec Dec `protobuf:"bytes,1,opt,name=dec,proto3,customtype=Dec" json:"dec"` + Dec cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=dec,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"dec"` } func (m *DecProto) Reset() { *m = DecProto{} } @@ -205,27 +208,29 @@ func init() { func init() { proto.RegisterFile("cosmos/base/v1beta1/coin.proto", fileDescriptor_189a96714eafc2df) } var fileDescriptor_189a96714eafc2df = []byte{ - // 312 bytes of a gzipped FileDescriptorProto + // 341 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0xce, 0xcf, 0xcc, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x86, 0xc8, 0xeb, 0x81, 0xe4, 0xf5, 0xa0, 0xf2, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0x79, 0x7d, 0x10, 0x0b, 0xa2, 0x54, 0x4a, 0x12, 0xa2, 0x34, 0x1e, 0x22, 0x01, 0xd5, 0x07, 0x91, 0x12, 0x4c, 0xcc, 0xcd, 0xcc, - 0xcb, 0xd7, 0x07, 0x93, 0x10, 0x21, 0xa5, 0x28, 0x2e, 0x16, 0xe7, 0xfc, 0xcc, 0x3c, 0x21, 0x11, + 0xcb, 0xd7, 0x07, 0x93, 0x10, 0x21, 0xa5, 0x1c, 0x2e, 0x16, 0xe7, 0xfc, 0xcc, 0x3c, 0x21, 0x11, 0x2e, 0xd6, 0x94, 0xd4, 0xbc, 0xfc, 0x5c, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x08, 0x47, - 0xc8, 0x8c, 0x8b, 0x2d, 0x31, 0x37, 0xbf, 0x34, 0xaf, 0x44, 0x82, 0x09, 0x24, 0xec, 0x24, 0x77, - 0xe2, 0x9e, 0x3c, 0xc3, 0xad, 0x7b, 0xf2, 0xcc, 0x9e, 0x79, 0x25, 0x97, 0xb6, 0xe8, 0x72, 0x41, - 0x4d, 0xf7, 0xcc, 0x2b, 0x59, 0xf1, 0x7c, 0x83, 0x16, 0x63, 0x10, 0x54, 0xb5, 0x15, 0xcb, 0x8b, - 0x05, 0xf2, 0x8c, 0x4a, 0x11, 0x5c, 0xec, 0x2e, 0xa9, 0xc9, 0x78, 0x8c, 0x37, 0x44, 0x33, 0x5e, - 0x12, 0x66, 0xbc, 0x4b, 0x6a, 0x32, 0x92, 0xf1, 0x2e, 0xa9, 0xc9, 0x68, 0x26, 0x9b, 0x73, 0x71, - 0x78, 0xe6, 0x95, 0x04, 0x80, 0x83, 0x46, 0x9b, 0x8b, 0x39, 0x33, 0xaf, 0x04, 0x62, 0x30, 0xc2, - 0x04, 0x0c, 0x07, 0x06, 0x81, 0x54, 0x81, 0x34, 0xba, 0xa4, 0x26, 0xc3, 0x35, 0xa6, 0xa4, 0x26, - 0xa3, 0x6b, 0xc4, 0xb4, 0x1a, 0xa4, 0xca, 0xc9, 0xe5, 0xc6, 0x43, 0x39, 0x86, 0x86, 0x47, 0x72, - 0x0c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, - 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xa5, 0x94, 0x9e, 0x59, 0x92, - 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0x0b, 0x0d, 0x75, 0x28, 0xa5, 0x5b, 0x9c, 0x92, 0xad, 0x5f, - 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0x0e, 0x74, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x33, 0xcc, 0xd5, 0x87, 0xef, 0x01, 0x00, 0x00, + 0xc8, 0x83, 0x8b, 0x2d, 0x31, 0x37, 0xbf, 0x34, 0xaf, 0x44, 0x82, 0x09, 0x24, 0xec, 0x64, 0x70, + 0xe2, 0x9e, 0x3c, 0xc3, 0xad, 0x7b, 0xf2, 0xa2, 0x10, 0x63, 0x8b, 0x53, 0xb2, 0xf5, 0x32, 0xf3, + 0xf5, 0x73, 0x13, 0x4b, 0x32, 0xf4, 0x3c, 0xf3, 0x4a, 0x2e, 0x6d, 0xd1, 0xe5, 0x82, 0xda, 0xe7, + 0x99, 0x57, 0xb2, 0xe2, 0xf9, 0x06, 0x2d, 0xc6, 0x20, 0xa8, 0x7e, 0x2b, 0x96, 0x17, 0x0b, 0xe4, + 0x19, 0x95, 0x0a, 0xb8, 0xd8, 0x5d, 0x52, 0x93, 0xf1, 0x58, 0xe8, 0x89, 0x66, 0xa1, 0x21, 0xd4, + 0x42, 0x69, 0x4c, 0x0b, 0x7d, 0x52, 0xd3, 0x13, 0x93, 0x2b, 0x5d, 0x52, 0x93, 0x91, 0xac, 0x75, + 0x49, 0x4d, 0x46, 0xb3, 0xd1, 0x93, 0x8b, 0xc3, 0x33, 0xaf, 0x24, 0x00, 0x1c, 0x88, 0xb6, 0x5c, + 0xcc, 0x99, 0x79, 0x25, 0x10, 0x0b, 0x9d, 0xb4, 0x49, 0xf0, 0x4a, 0x10, 0x48, 0x9f, 0x92, 0x3f, + 0x17, 0x87, 0x4b, 0x6a, 0x32, 0xc4, 0x28, 0x67, 0x2e, 0xe6, 0x94, 0xd4, 0x64, 0xa8, 0x51, 0x64, + 0x38, 0x12, 0xa4, 0xdb, 0xc9, 0xe5, 0xc6, 0x43, 0x39, 0x86, 0x86, 0x47, 0x72, 0x0c, 0x27, 0x1e, + 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, + 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xa5, 0x94, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, + 0x97, 0x9c, 0x9f, 0x0b, 0x8d, 0x49, 0x28, 0xa5, 0x5b, 0x9c, 0x92, 0xad, 0x5f, 0x52, 0x59, 0x90, + 0x5a, 0x9c, 0xc4, 0x06, 0x8e, 0x48, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd2, 0x0a, 0x5e, + 0xb8, 0x43, 0x02, 0x00, 0x00, } func (this *Coin) Equal(that interface{}) bool { diff --git a/types/coin_benchmark_test.go b/types/coin_benchmark_test.go index 5bb3f843f288..955578cf67a6 100644 --- a/types/coin_benchmark_test.go +++ b/types/coin_benchmark_test.go @@ -3,6 +3,8 @@ package types import ( "fmt" "testing" + + "cosmossdk.io/math" ) func coinName(suffix int) string { @@ -18,10 +20,10 @@ func BenchmarkCoinsAdditionIntersect(b *testing.B) { coinsB := Coins(make([]Coin, numCoinsB)) for i := 0; i < numCoinsA; i++ { - coinsA[i] = NewCoin(coinName(i), NewInt(int64(i))) + coinsA[i] = NewCoin(coinName(i), math.NewInt(int64(i))) } for i := 0; i < numCoinsB; i++ { - coinsB[i] = NewCoin(coinName(i), NewInt(int64(i))) + coinsB[i] = NewCoin(coinName(i), math.NewInt(int64(i))) } b.ResetTimer() @@ -49,10 +51,10 @@ func BenchmarkCoinsAdditionNoIntersect(b *testing.B) { coinsB := Coins(make([]Coin, numCoinsB)) for i := 0; i < numCoinsA; i++ { - coinsA[i] = NewCoin(coinName(numCoinsB+i), NewInt(int64(i))) + coinsA[i] = NewCoin(coinName(numCoinsB+i), math.NewInt(int64(i))) } for i := 0; i < numCoinsB; i++ { - coinsB[i] = NewCoin(coinName(i), NewInt(int64(i))) + coinsB[i] = NewCoin(coinName(i), math.NewInt(int64(i))) } b.ResetTimer() @@ -84,7 +86,7 @@ func BenchmarkSumOfCoinAdds(b *testing.B) { for i := 0; i < numAdds; i++ { intersectCoins := make([]Coin, numIntersectingCoins) - num := NewInt(int64(i)) + num := math.NewInt(int64(i)) for j := 0; j < numIntersectingCoins; j++ { intersectCoins[j] = NewCoin(coinName(j+1_000_000_000), num) } diff --git a/types/coin_internal_test.go b/types/coin_internal_test.go index 709683795c37..0da746852a02 100644 --- a/types/coin_internal_test.go +++ b/types/coin_internal_test.go @@ -4,6 +4,8 @@ import ( "testing" "github.com/stretchr/testify/suite" + + "cosmossdk.io/math" ) func TestCoinTestSuite(t *testing.T) { @@ -15,7 +17,7 @@ type coinInternalSuite struct { } func (s *coinInternalSuite) TestIsSorted() { - v := NewInt(1) + v := math.NewInt(1) cases := []struct { coins Coins expected bool diff --git a/types/coin_test.go b/types/coin_test.go index 536937c1e613..bce1eb8bd84e 100644 --- a/types/coin_test.go +++ b/types/coin_test.go @@ -5,10 +5,11 @@ import ( "strings" "testing" - "cosmossdk.io/math" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/types/collections.go b/types/collections.go index 91d5fb7dcd5a..4d2c84ca8299 100644 --- a/types/collections.go +++ b/types/collections.go @@ -32,6 +32,9 @@ var ( // IntValue represents a collections.ValueCodec to work with Int. IntValue collcodec.ValueCodec[math.Int] = intValueCodec{} + // LegacyDecValue represents a collections.ValueCodec to work with LegacyDec. + LegacyDecValue collcodec.ValueCodec[math.LegacyDec] = legacyDecValueCodec{} + // TimeKey represents a collections.KeyCodec to work with time.Time // Deprecated: exists only for state compatibility reasons, should not // be used for new storage keys using time. Please use the time KeyCodec @@ -39,6 +42,10 @@ var ( TimeKey collcodec.KeyCodec[time.Time] = timeKeyCodec{} ) +const ( + LegacyDec string = "math.LegacyDec" +) + type addressUnion interface { AccAddress | ValAddress | ConsAddress String() string @@ -94,26 +101,26 @@ func (a genericAddressKey[T]) SizeNonTerminal(key T) int { return collections.BytesKey.SizeNonTerminal(key) } -// Deprecated: genericAddressIndexKey is a special key codec used to retain state backwards compatibility +// Deprecated: lengthPrefixedAddressKey is a special key codec used to retain state backwards compatibility // when a generic address key (be: AccAddress, ValAddress, ConsAddress), is used as an index key. -// More docs can be found in the AddressKeyAsIndexKey function. -type genericAddressIndexKey[T addressUnion] struct { +// More docs can be found in the LengthPrefixedAddressKey function. +type lengthPrefixedAddressKey[T addressUnion] struct { collcodec.KeyCodec[T] } -func (g genericAddressIndexKey[T]) Encode(buffer []byte, key T) (int, error) { +func (g lengthPrefixedAddressKey[T]) Encode(buffer []byte, key T) (int, error) { return g.EncodeNonTerminal(buffer, key) } -func (g genericAddressIndexKey[T]) Decode(buffer []byte) (int, T, error) { +func (g lengthPrefixedAddressKey[T]) Decode(buffer []byte) (int, T, error) { return g.DecodeNonTerminal(buffer) } -func (g genericAddressIndexKey[T]) Size(key T) int { return g.SizeNonTerminal(key) } +func (g lengthPrefixedAddressKey[T]) Size(key T) int { return g.SizeNonTerminal(key) } -func (g genericAddressIndexKey[T]) KeyType() string { return "index_key/" + g.KeyCodec.KeyType() } +func (g lengthPrefixedAddressKey[T]) KeyType() string { return "index_key/" + g.KeyCodec.KeyType() } -// Deprecated: AddressKeyAsIndexKey implements an SDK backwards compatible indexing key encoder +// Deprecated: LengthPrefixedAddressKey implements an SDK backwards compatible indexing key encoder // for addresses. // The status quo in the SDK is that address keys are length prefixed even when they're the // last part of a composite key. This should never be used unless to retain state compatibility. @@ -122,8 +129,8 @@ func (g genericAddressIndexKey[T]) KeyType() string { return "index_key/" + g.Ke // byte to the string, then when you know when the string part finishes, it's logical that the // part which remains is the address key. In the SDK instead we prepend to the address key its // length too. -func AddressKeyAsIndexKey[T addressUnion](keyCodec collcodec.KeyCodec[T]) collcodec.KeyCodec[T] { - return genericAddressIndexKey[T]{ +func LengthPrefixedAddressKey[T addressUnion](keyCodec collcodec.KeyCodec[T]) collcodec.KeyCodec[T] { + return lengthPrefixedAddressKey[T]{ keyCodec, } } @@ -137,10 +144,10 @@ func (i intValueCodec) Encode(value math.Int) ([]byte, error) { } func (i intValueCodec) Decode(b []byte) (math.Int, error) { - v := new(Int) + v := new(math.Int) err := v.Unmarshal(b) if err != nil { - return Int{}, err + return math.Int{}, err } return *v, nil } @@ -149,16 +156,16 @@ func (i intValueCodec) EncodeJSON(value math.Int) ([]byte, error) { return value.MarshalJSON() } -func (i intValueCodec) DecodeJSON(b []byte) (Int, error) { - v := new(Int) +func (i intValueCodec) DecodeJSON(b []byte) (math.Int, error) { + v := new(math.Int) err := v.UnmarshalJSON(b) if err != nil { - return Int{}, err + return math.Int{}, err } return *v, nil } -func (i intValueCodec) Stringify(value Int) string { +func (i intValueCodec) Stringify(value math.Int) string { return value.String() } @@ -166,6 +173,42 @@ func (i intValueCodec) ValueType() string { return "math.Int" } +type legacyDecValueCodec struct{} + +func (i legacyDecValueCodec) Encode(value math.LegacyDec) ([]byte, error) { + return value.Marshal() +} + +func (i legacyDecValueCodec) Decode(b []byte) (math.LegacyDec, error) { + v := new(math.LegacyDec) + err := v.Unmarshal(b) + if err != nil { + return math.LegacyDec{}, err + } + return *v, nil +} + +func (i legacyDecValueCodec) EncodeJSON(value math.LegacyDec) ([]byte, error) { + return value.MarshalJSON() +} + +func (i legacyDecValueCodec) DecodeJSON(b []byte) (math.LegacyDec, error) { + v := new(math.LegacyDec) + err := v.UnmarshalJSON(b) + if err != nil { + return math.LegacyDec{}, err + } + return *v, nil +} + +func (i legacyDecValueCodec) Stringify(value math.LegacyDec) string { + return value.String() +} + +func (i legacyDecValueCodec) ValueType() string { + return LegacyDec +} + type timeKeyCodec struct{} func (timeKeyCodec) Encode(buffer []byte, key time.Time) (int, error) { diff --git a/types/collections_test.go b/types/collections_test.go index 222566c27eb0..e6a15608f6b7 100644 --- a/types/collections_test.go +++ b/types/collections_test.go @@ -21,7 +21,7 @@ func TestCollectionsCorrectness(t *testing.T) { }) t.Run("AddressIndexingKey", func(t *testing.T) { - colltest.TestKeyCodec(t, AddressKeyAsIndexKey(AccAddressKey), AccAddress{0x2, 0x5, 0x8}) + colltest.TestKeyCodec(t, LengthPrefixedAddressKey(AccAddressKey), AccAddress{0x2, 0x5, 0x8}) }) t.Run("Time", func(t *testing.T) { diff --git a/types/context.go b/types/context.go index 13f5a09c51fa..a6e304e8d148 100644 --- a/types/context.go +++ b/types/context.go @@ -4,16 +4,15 @@ import ( "context" "time" - "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/gogoproto/proto" - "cosmossdk.io/store/gaskv" - storetypes "cosmossdk.io/store/types" - "cosmossdk.io/core/comet" "cosmossdk.io/core/header" + "cosmossdk.io/log" + "cosmossdk.io/store/gaskv" + storetypes "cosmossdk.io/store/types" ) // ExecMode defines the execution mode which can be set on a Context. @@ -27,6 +26,7 @@ const ( ExecModePrepareProposal ExecModeProcessProposal ExecModeVoteExtension + ExecModeVerifyVoteExtension ExecModeFinalize ) @@ -54,6 +54,7 @@ type Context struct { blockGasMeter storetypes.GasMeter checkTx bool recheckTx bool // if recheckTx == true, then checkTx must also be true + sigverifyTx bool // when run simulation, because the private key corresponding to the account in the genesis.json randomly generated, we must skip the sigverify. execMode ExecMode minGasPrice DecCoins consParams cmtproto.ConsensusParams @@ -82,6 +83,7 @@ func (c Context) GasMeter() storetypes.GasMeter { return c.gasMe func (c Context) BlockGasMeter() storetypes.GasMeter { return c.blockGasMeter } func (c Context) IsCheckTx() bool { return c.checkTx } func (c Context) IsReCheckTx() bool { return c.recheckTx } +func (c Context) IsSigverifyTx() bool { return c.sigverifyTx } func (c Context) ExecMode() ExecMode { return c.execMode } func (c Context) MinGasPrices() DecCoins { return c.minGasPrice } func (c Context) EventManager() EventManagerI { return c.eventManager } @@ -131,6 +133,7 @@ func NewContext(ms storetypes.MultiStore, header cmtproto.Header, isCheckTx bool header: header, chainID: header.ChainID, checkTx: isCheckTx, + sigverifyTx: true, logger: logger, gasMeter: storetypes.NewInfiniteGasMeter(), minGasPrice: DecCoins{}, @@ -260,6 +263,12 @@ func (c Context) WithIsReCheckTx(isRecheckTx bool) Context { return c } +// WithIsSigverifyTx called with true will sigverify in auth module +func (c Context) WithIsSigverifyTx(isSigverifyTx bool) Context { + c.sigverifyTx = isSigverifyTx + return c +} + // WithExecMode returns a Context with an updated ExecMode. func (c Context) WithExecMode(m ExecMode) Context { c.execMode = m diff --git a/types/dec_coin.go b/types/dec_coin.go index 2e56d5f5fb72..14c40bd329b1 100644 --- a/types/dec_coin.go +++ b/types/dec_coin.go @@ -13,17 +13,17 @@ import ( // Decimal Coin // NewDecCoin creates a new DecCoin instance from an Int. -func NewDecCoin(denom string, amount Int) DecCoin { +func NewDecCoin(denom string, amount math.Int) DecCoin { coin := NewCoin(denom, amount) return DecCoin{ Denom: coin.Denom, - Amount: NewDecFromInt(coin.Amount), + Amount: math.LegacyNewDecFromInt(coin.Amount), } } // NewDecCoinFromDec creates a new DecCoin instance from a Dec. -func NewDecCoinFromDec(denom string, amount Dec) DecCoin { +func NewDecCoinFromDec(denom string, amount math.LegacyDec) DecCoin { mustValidateDenom(denom) if amount.IsNegative() { @@ -44,14 +44,14 @@ func NewDecCoinFromCoin(coin Coin) DecCoin { return DecCoin{ Denom: coin.Denom, - Amount: NewDecFromInt(coin.Amount), + Amount: math.LegacyNewDecFromInt(coin.Amount), } } // NewInt64DecCoin returns a new DecCoin with a denomination and amount. It will // panic if the amount is negative or denom is invalid. func NewInt64DecCoin(denom string, amount int64) DecCoin { - return NewDecCoin(denom, NewInt(amount)) + return NewDecCoin(denom, math.NewInt(amount)) } // IsZero returns if the DecCoin amount is zero. @@ -109,7 +109,7 @@ func (coin DecCoin) Sub(coinB DecCoin) DecCoin { // change. Note, the change may be zero. func (coin DecCoin) TruncateDecimal() (Coin, DecCoin) { truncated := coin.Amount.TruncateInt() - change := coin.Amount.Sub(NewDecFromInt(truncated)) + change := coin.Amount.Sub(math.LegacyNewDecFromInt(truncated)) return NewCoin(coin.Denom, truncated), NewDecCoinFromDec(coin.Denom, change) } @@ -359,7 +359,7 @@ func (coins DecCoins) IsAnyNegative() bool { // MulDec multiplies all the coins by a decimal. // // CONTRACT: No zero coins will be returned. -func (coins DecCoins) MulDec(d Dec) DecCoins { +func (coins DecCoins) MulDec(d math.LegacyDec) DecCoins { var res DecCoins for _, coin := range coins { product := DecCoin{ @@ -379,7 +379,7 @@ func (coins DecCoins) MulDec(d Dec) DecCoins { // returns nil DecCoins if d is zero. // // CONTRACT: No zero coins will be returned. -func (coins DecCoins) MulDecTruncate(d Dec) DecCoins { +func (coins DecCoins) MulDecTruncate(d math.LegacyDec) DecCoins { if d.IsZero() { return DecCoins{} } @@ -402,7 +402,7 @@ func (coins DecCoins) MulDecTruncate(d Dec) DecCoins { // QuoDec divides all the decimal coins by a decimal. It panics if d is zero. // // CONTRACT: No zero coins will be returned. -func (coins DecCoins) QuoDec(d Dec) DecCoins { +func (coins DecCoins) QuoDec(d math.LegacyDec) DecCoins { if d.IsZero() { panic("invalid zero decimal") } @@ -426,7 +426,7 @@ func (coins DecCoins) QuoDec(d Dec) DecCoins { // panics if d is zero. // // CONTRACT: No zero coins will be returned. -func (coins DecCoins) QuoDecTruncate(d Dec) DecCoins { +func (coins DecCoins) QuoDecTruncate(d math.LegacyDec) DecCoins { if d.IsZero() { panic("invalid zero decimal") } @@ -452,7 +452,7 @@ func (coins DecCoins) Empty() bool { } // AmountOf returns the amount of a denom from deccoins -func (coins DecCoins) AmountOf(denom string) Dec { +func (coins DecCoins) AmountOf(denom string) math.LegacyDec { mustValidateDenom(denom) switch len(coins) { @@ -491,7 +491,7 @@ func (coins DecCoins) Equal(coinsB DecCoins) bool { coinsB = coinsB.Sort() for i := 0; i < len(coins); i++ { - if !coins[i].IsEqual(coinsB[i]) { + if !coins[i].Equal(coinsB[i]) { return false } } @@ -609,7 +609,12 @@ func (coins DecCoins) Swap(i, j int) { coins[i], coins[j] = coins[j], coins[i] } // Sort is a helper function to sort the set of decimal coins in-place. func (coins DecCoins) Sort() DecCoins { - sort.Sort(coins) + // sort.Sort(coins) does a costly runtime copy as part of `runtime.convTSlice` + // So we avoid this heap allocation if len(coins) <= 1. In the future, we should hopefully find + // a strategy to always avoid this. + if len(coins) > 1 { + sort.Sort(coins) + } return coins } @@ -628,7 +633,7 @@ func ParseDecCoin(coinStr string) (coin DecCoin, err error) { amountStr, denomStr := matches[1], matches[2] - amount, err := NewDecFromStr(amountStr) + amount, err := math.LegacyNewDecFromStr(amountStr) if err != nil { return DecCoin{}, errors.Wrap(err, fmt.Sprintf("failed to parse decimal coin amount: %s", amountStr)) } diff --git a/types/dec_coin_test.go b/types/dec_coin_test.go index ddd78ed61c00..0d88621933c9 100644 --- a/types/dec_coin_test.go +++ b/types/dec_coin_test.go @@ -4,9 +4,10 @@ import ( "strings" "testing" - "cosmossdk.io/math" "github.com/stretchr/testify/suite" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -72,9 +73,9 @@ func (s *decCoinTestSuite) TestDecCoinIsPositive() { } func (s *decCoinTestSuite) TestAddDecCoin() { - decCoinA1 := sdk.NewDecCoinFromDec(testDenom1, sdk.NewDecWithPrec(11, 1)) - decCoinA2 := sdk.NewDecCoinFromDec(testDenom1, sdk.NewDecWithPrec(22, 1)) - decCoinB1 := sdk.NewDecCoinFromDec(testDenom2, sdk.NewDecWithPrec(11, 1)) + decCoinA1 := sdk.NewDecCoinFromDec(testDenom1, math.LegacyNewDecWithPrec(11, 1)) + decCoinA2 := sdk.NewDecCoinFromDec(testDenom1, math.LegacyNewDecWithPrec(22, 1)) + decCoinB1 := sdk.NewDecCoinFromDec(testDenom2, math.LegacyNewDecWithPrec(11, 1)) // regular add res := decCoinA1.Add(decCoinA1) @@ -375,36 +376,36 @@ func (s *decCoinTestSuite) TestParseDecCoins() { expectedErr bool }{ {"", nil, false}, - {"4stake", sdk.DecCoins{sdk.NewDecCoinFromDec("stake", sdk.NewDecFromInt(math.NewInt(4)))}, false}, + {"4stake", sdk.DecCoins{sdk.NewDecCoinFromDec("stake", math.LegacyNewDecFromInt(math.NewInt(4)))}, false}, {"5.5atom,4stake", sdk.DecCoins{ - sdk.NewDecCoinFromDec("atom", sdk.NewDecWithPrec(5500000000000000000, math.LegacyPrecision)), + sdk.NewDecCoinFromDec("atom", math.LegacyNewDecWithPrec(5500000000000000000, math.LegacyPrecision)), sdk.NewDecCoinFromDec("stake", math.LegacyNewDec(4)), }, false}, {"0.0stake", sdk.DecCoins{}, false}, // remove zero coins {"10.0btc,1.0atom,20.0btc", nil, true}, { "0.004STAKE", - sdk.DecCoins{sdk.NewDecCoinFromDec("STAKE", sdk.NewDecWithPrec(4000000000000000, math.LegacyPrecision))}, + sdk.DecCoins{sdk.NewDecCoinFromDec("STAKE", math.LegacyNewDecWithPrec(4000000000000000, math.LegacyPrecision))}, false, }, { "0.004stake", - sdk.DecCoins{sdk.NewDecCoinFromDec("stake", sdk.NewDecWithPrec(4000000000000000, math.LegacyPrecision))}, + sdk.DecCoins{sdk.NewDecCoinFromDec("stake", math.LegacyNewDecWithPrec(4000000000000000, math.LegacyPrecision))}, false, }, { "5.04atom,0.004stake", sdk.DecCoins{ - sdk.NewDecCoinFromDec("atom", sdk.NewDecWithPrec(5040000000000000000, math.LegacyPrecision)), - sdk.NewDecCoinFromDec("stake", sdk.NewDecWithPrec(4000000000000000, math.LegacyPrecision)), + sdk.NewDecCoinFromDec("atom", math.LegacyNewDecWithPrec(5040000000000000000, math.LegacyPrecision)), + sdk.NewDecCoinFromDec("stake", math.LegacyNewDecWithPrec(4000000000000000, math.LegacyPrecision)), }, false, }, { "0.0stake,0.004stake,5.04atom", // remove zero coins sdk.DecCoins{ - sdk.NewDecCoinFromDec("atom", sdk.NewDecWithPrec(5040000000000000000, math.LegacyPrecision)), - sdk.NewDecCoinFromDec("stake", sdk.NewDecWithPrec(4000000000000000, math.LegacyPrecision)), + sdk.NewDecCoinFromDec("atom", math.LegacyNewDecWithPrec(5040000000000000000, math.LegacyPrecision)), + sdk.NewDecCoinFromDec("stake", math.LegacyNewDecWithPrec(4000000000000000, math.LegacyPrecision)), }, false, }, @@ -429,8 +430,8 @@ func (s *decCoinTestSuite) TestDecCoinsString() { {sdk.DecCoins{}, ""}, { sdk.DecCoins{ - sdk.NewDecCoinFromDec("atom", sdk.NewDecWithPrec(5040000000000000000, math.LegacyPrecision)), - sdk.NewDecCoinFromDec("stake", sdk.NewDecWithPrec(4000000000000000, math.LegacyPrecision)), + sdk.NewDecCoinFromDec("atom", math.LegacyNewDecWithPrec(5040000000000000000, math.LegacyPrecision)), + sdk.NewDecCoinFromDec("stake", math.LegacyNewDecWithPrec(4000000000000000, math.LegacyPrecision)), }, "5.040000000000000000atom,0.004000000000000000stake", }, @@ -473,8 +474,8 @@ func (s *decCoinTestSuite) TestDecCoinsIntersect() { } func (s *decCoinTestSuite) TestDecCoinsTruncateDecimal() { - decCoinA := sdk.NewDecCoinFromDec("bar", sdk.MustNewDecFromStr("5.41")) - decCoinB := sdk.NewDecCoinFromDec("foo", sdk.MustNewDecFromStr("6.00")) + decCoinA := sdk.NewDecCoinFromDec("bar", math.LegacyMustNewDecFromStr("5.41")) + decCoinB := sdk.NewDecCoinFromDec("foo", math.LegacyMustNewDecFromStr("6.00")) testCases := []struct { input sdk.DecCoins @@ -485,7 +486,7 @@ func (s *decCoinTestSuite) TestDecCoinsTruncateDecimal() { { sdk.DecCoins{decCoinA, decCoinB}, sdk.Coins{sdk.NewInt64Coin(decCoinA.Denom, 5), sdk.NewInt64Coin(decCoinB.Denom, 6)}, - sdk.DecCoins{sdk.NewDecCoinFromDec(decCoinA.Denom, sdk.MustNewDecFromStr("0.41"))}, + sdk.DecCoins{sdk.NewDecCoinFromDec(decCoinA.Denom, math.LegacyMustNewDecFromStr("0.41"))}, }, { sdk.DecCoins{decCoinB}, @@ -508,8 +509,8 @@ func (s *decCoinTestSuite) TestDecCoinsTruncateDecimal() { } func (s *decCoinTestSuite) TestDecCoinsQuoDecTruncate() { - x := sdk.MustNewDecFromStr("1.00") - y := sdk.MustNewDecFromStr("10000000000000000000.00") + x := math.LegacyMustNewDecFromStr("1.00") + y := math.LegacyMustNewDecFromStr("10000000000000000000.00") testCases := []struct { coins sdk.DecCoins @@ -519,7 +520,7 @@ func (s *decCoinTestSuite) TestDecCoinsQuoDecTruncate() { }{ {sdk.DecCoins{}, math.LegacyZeroDec(), sdk.DecCoins(nil), true}, {sdk.DecCoins{sdk.NewDecCoinFromDec("foo", x)}, y, sdk.DecCoins(nil), false}, - {sdk.DecCoins{sdk.NewInt64DecCoin("foo", 5)}, math.LegacyNewDec(2), sdk.DecCoins{sdk.NewDecCoinFromDec("foo", sdk.MustNewDecFromStr("2.5"))}, false}, + {sdk.DecCoins{sdk.NewInt64DecCoin("foo", 5)}, math.LegacyNewDec(2), sdk.DecCoins{sdk.NewDecCoinFromDec("foo", math.LegacyMustNewDecFromStr("2.5"))}, false}, } for i, tc := range testCases { @@ -846,7 +847,7 @@ func (s *decCoinTestSuite) TestDecCoins_MulDec() { testCases := []struct { name string coins sdk.DecCoins - multiplier sdk.Dec + multiplier math.LegacyDec expectedResult sdk.DecCoins }{ {"No Coins", sdk.DecCoins{}, math.LegacyNewDec(1), sdk.DecCoins(nil)}, @@ -898,39 +899,39 @@ func (s *decCoinTestSuite) TestDecCoins_MulDecTruncate() { testCases := []struct { name string coins sdk.DecCoins - multiplier sdk.Dec + multiplier math.LegacyDec expectedResult sdk.DecCoins expectedPanic bool }{ {"No Coins", sdk.DecCoins{}, math.LegacyNewDec(1), sdk.DecCoins(nil), false}, {"Multiple coins - zero multiplier", sdk.DecCoins{ - sdk.DecCoin{testDenom1, sdk.NewDecWithPrec(10, 3)}, - sdk.DecCoin{testDenom1, sdk.NewDecWithPrec(30, 2)}, + sdk.DecCoin{testDenom1, math.LegacyNewDecWithPrec(10, 3)}, + sdk.DecCoin{testDenom1, math.LegacyNewDecWithPrec(30, 2)}, }, math.LegacyNewDec(0), sdk.DecCoins{}, false}, {"Multiple coins - positive multiplier", sdk.DecCoins{ - sdk.DecCoin{testDenom1, sdk.NewDecWithPrec(15, 1)}, - sdk.DecCoin{testDenom1, sdk.NewDecWithPrec(15, 1)}, + sdk.DecCoin{testDenom1, math.LegacyNewDecWithPrec(15, 1)}, + sdk.DecCoin{testDenom1, math.LegacyNewDecWithPrec(15, 1)}, }, math.LegacyNewDec(1), sdk.DecCoins{ - sdk.DecCoin{testDenom1, sdk.NewDecWithPrec(3, 0)}, + sdk.DecCoin{testDenom1, math.LegacyNewDecWithPrec(3, 0)}, }, false}, {"Multiple coins - positive multiplier", sdk.DecCoins{ - sdk.DecCoin{testDenom1, sdk.NewDecWithPrec(15, 1)}, - sdk.DecCoin{testDenom1, sdk.NewDecWithPrec(15, 1)}, + sdk.DecCoin{testDenom1, math.LegacyNewDecWithPrec(15, 1)}, + sdk.DecCoin{testDenom1, math.LegacyNewDecWithPrec(15, 1)}, }, math.LegacyNewDec(-2), sdk.DecCoins{ - sdk.DecCoin{testDenom1, sdk.NewDecWithPrec(-6, 0)}, + sdk.DecCoin{testDenom1, math.LegacyNewDecWithPrec(-6, 0)}, }, false}, {"Multiple coins - Different denom", sdk.DecCoins{ - sdk.DecCoin{testDenom1, sdk.NewDecWithPrec(15, 1)}, - sdk.DecCoin{testDenom2, sdk.NewDecWithPrec(3333, 4)}, - sdk.DecCoin{testDenom1, sdk.NewDecWithPrec(15, 1)}, - sdk.DecCoin{testDenom2, sdk.NewDecWithPrec(333, 4)}, + sdk.DecCoin{testDenom1, math.LegacyNewDecWithPrec(15, 1)}, + sdk.DecCoin{testDenom2, math.LegacyNewDecWithPrec(3333, 4)}, + sdk.DecCoin{testDenom1, math.LegacyNewDecWithPrec(15, 1)}, + sdk.DecCoin{testDenom2, math.LegacyNewDecWithPrec(333, 4)}, }, math.LegacyNewDec(10), sdk.DecCoins{ - sdk.DecCoin{testDenom1, sdk.NewDecWithPrec(30, 0)}, - sdk.DecCoin{testDenom2, sdk.NewDecWithPrec(3666, 3)}, + sdk.DecCoin{testDenom1, math.LegacyNewDecWithPrec(30, 0)}, + sdk.DecCoin{testDenom2, math.LegacyNewDecWithPrec(3666, 3)}, }, false}, } @@ -951,7 +952,7 @@ func (s *decCoinTestSuite) TestDecCoins_QuoDec() { testCases := []struct { name string coins sdk.DecCoins - input sdk.Dec + input math.LegacyDec expectedResult sdk.DecCoins panics bool }{ @@ -966,14 +967,14 @@ func (s *decCoinTestSuite) TestDecCoins_QuoDec() { sdk.DecCoin{testDenom1, math.LegacyNewDec(3)}, sdk.DecCoin{testDenom1, math.LegacyNewDec(4)}, }, math.LegacyNewDec(2), sdk.DecCoins{ - sdk.DecCoin{testDenom1, sdk.NewDecWithPrec(35, 1)}, + sdk.DecCoin{testDenom1, math.LegacyNewDecWithPrec(35, 1)}, }, false}, {"Multiple coins - negative input", sdk.DecCoins{ sdk.DecCoin{testDenom1, math.LegacyNewDec(3)}, sdk.DecCoin{testDenom1, math.LegacyNewDec(4)}, }, math.LegacyNewDec(-2), sdk.DecCoins{ - sdk.DecCoin{testDenom1, sdk.NewDecWithPrec(-35, 1)}, + sdk.DecCoin{testDenom1, math.LegacyNewDecWithPrec(-35, 1)}, }, false}, {"Multiple coins - Different input", sdk.DecCoins{ @@ -1143,11 +1144,11 @@ func (s *decCoinTestSuite) TestDecCoin_ParseDecCoin() { {"Precision over limit", "9.11111111111111111111stake", empty, true}, - {"Valid upper case denom", "9.3STAKE", sdk.DecCoin{"STAKE", sdk.NewDecWithPrec(93, 1)}, false}, + {"Valid upper case denom", "9.3STAKE", sdk.DecCoin{"STAKE", math.LegacyNewDecWithPrec(93, 1)}, false}, - {"Valid input - amount and denom separated by space", "9.3 stake", sdk.DecCoin{"stake", sdk.NewDecWithPrec(93, 1)}, false}, + {"Valid input - amount and denom separated by space", "9.3 stake", sdk.DecCoin{"stake", math.LegacyNewDecWithPrec(93, 1)}, false}, - {"Valid input - amount and denom concatenated", "9.3stake", sdk.DecCoin{"stake", sdk.NewDecWithPrec(93, 1)}, false}, + {"Valid input - amount and denom concatenated", "9.3stake", sdk.DecCoin{"stake", math.LegacyNewDecWithPrec(93, 1)}, false}, } for i, tc := range testCases { diff --git a/types/denom.go b/types/denom.go index c87a150f5988..5cd0910ad44f 100644 --- a/types/denom.go +++ b/types/denom.go @@ -8,14 +8,14 @@ import ( // denomUnits contains a mapping of denomination mapped to their respective unit // multipliers (e.g. 1atom = 10^-6uatom). -var denomUnits = map[string]Dec{} +var denomUnits = map[string]math.LegacyDec{} // baseDenom is the denom of smallest unit registered var baseDenom string // RegisterDenom registers a denomination with a corresponding unit. If the // denomination is already registered, an error will be returned. -func RegisterDenom(denom string, unit Dec) error { +func RegisterDenom(denom string, unit math.LegacyDec) error { if err := ValidateDenom(denom); err != nil { return err } @@ -34,7 +34,7 @@ func RegisterDenom(denom string, unit Dec) error { // GetDenomUnit returns a unit for a given denomination if it exists. A boolean // is returned if the denomination is registered. -func GetDenomUnit(denom string) (Dec, bool) { +func GetDenomUnit(denom string) (math.LegacyDec, bool) { if err := ValidateDenom(denom); err != nil { return math.LegacyZeroDec(), false } @@ -88,7 +88,7 @@ func ConvertCoin(coin Coin, denom string) (Coin, error) { return NewCoin(denom, coin.Amount), nil } - return NewCoin(denom, NewDecFromInt(coin.Amount).Mul(srcUnit).Quo(dstUnit).TruncateInt()), nil + return NewCoin(denom, math.LegacyNewDecFromInt(coin.Amount).Mul(srcUnit).Quo(dstUnit).TruncateInt()), nil } // ConvertDecCoin attempts to convert a decimal coin to a given denomination. If the given diff --git a/types/denom_internal_test.go b/types/denom_internal_test.go index bb76d80fb9a2..a22c3a211540 100644 --- a/types/denom_internal_test.go +++ b/types/denom_internal_test.go @@ -3,8 +3,9 @@ package types import ( "testing" - "cosmossdk.io/math" "github.com/stretchr/testify/suite" + + "cosmossdk.io/math" ) var ( @@ -45,35 +46,35 @@ func (s *internalDenomTestSuite) TestRegisterDenom() { // reset registration baseDenom = "" - denomUnits = map[string]Dec{} + denomUnits = map[string]math.LegacyDec{} } func (s *internalDenomTestSuite) TestConvertCoins() { atomUnit := math.LegacyOneDec() // 1 (base denom unit) s.Require().NoError(RegisterDenom(atom, atomUnit)) - matomUnit := NewDecWithPrec(1, 3) // 10^-3 (milli) + matomUnit := math.LegacyNewDecWithPrec(1, 3) // 10^-3 (milli) s.Require().NoError(RegisterDenom(matom, matomUnit)) - uatomUnit := NewDecWithPrec(1, 6) // 10^-6 (micro) + uatomUnit := math.LegacyNewDecWithPrec(1, 6) // 10^-6 (micro) s.Require().NoError(RegisterDenom(uatom, uatomUnit)) - natomUnit := NewDecWithPrec(1, 9) // 10^-9 (nano) + natomUnit := math.LegacyNewDecWithPrec(1, 9) // 10^-9 (nano) s.Require().NoError(RegisterDenom(natom, natomUnit)) res, err := GetBaseDenom() s.Require().NoError(err) s.Require().Equal(res, natom) - s.Require().Equal(NormalizeCoin(NewCoin(uatom, NewInt(1))), NewCoin(natom, NewInt(1000))) - s.Require().Equal(NormalizeCoin(NewCoin(matom, NewInt(1))), NewCoin(natom, NewInt(1000000))) - s.Require().Equal(NormalizeCoin(NewCoin(atom, NewInt(1))), NewCoin(natom, NewInt(1000000000))) + s.Require().Equal(NormalizeCoin(NewCoin(uatom, math.NewInt(1))), NewCoin(natom, math.NewInt(1000))) + s.Require().Equal(NormalizeCoin(NewCoin(matom, math.NewInt(1))), NewCoin(natom, math.NewInt(1000000))) + s.Require().Equal(NormalizeCoin(NewCoin(atom, math.NewInt(1))), NewCoin(natom, math.NewInt(1000000000))) coins, err := ParseCoinsNormalized("1atom,1matom,1uatom") s.Require().NoError(err) s.Require().Equal(coins, Coins{ - Coin{natom, NewInt(1000000000)}, - Coin{natom, NewInt(1000000)}, - Coin{natom, NewInt(1000)}, + Coin{natom, math.NewInt(1000000000)}, + Coin{natom, math.NewInt(1000000)}, + Coin{natom, math.NewInt(1000)}, }) testCases := []struct { @@ -82,20 +83,20 @@ func (s *internalDenomTestSuite) TestConvertCoins() { result Coin expErr bool }{ - {NewCoin("foo", ZeroInt()), atom, Coin{}, true}, - {NewCoin(atom, ZeroInt()), "foo", Coin{}, true}, - {NewCoin(atom, ZeroInt()), "FOO", Coin{}, true}, + {NewCoin("foo", math.ZeroInt()), atom, Coin{}, true}, + {NewCoin(atom, math.ZeroInt()), "foo", Coin{}, true}, + {NewCoin(atom, math.ZeroInt()), "FOO", Coin{}, true}, - {NewCoin(atom, NewInt(5)), matom, NewCoin(matom, NewInt(5000)), false}, // atom => matom - {NewCoin(atom, NewInt(5)), uatom, NewCoin(uatom, NewInt(5000000)), false}, // atom => uatom - {NewCoin(atom, NewInt(5)), natom, NewCoin(natom, NewInt(5000000000)), false}, // atom => natom + {NewCoin(atom, math.NewInt(5)), matom, NewCoin(matom, math.NewInt(5000)), false}, // atom => matom + {NewCoin(atom, math.NewInt(5)), uatom, NewCoin(uatom, math.NewInt(5000000)), false}, // atom => uatom + {NewCoin(atom, math.NewInt(5)), natom, NewCoin(natom, math.NewInt(5000000000)), false}, // atom => natom - {NewCoin(uatom, NewInt(5000000)), matom, NewCoin(matom, NewInt(5000)), false}, // uatom => matom - {NewCoin(uatom, NewInt(5000000)), natom, NewCoin(natom, NewInt(5000000000)), false}, // uatom => natom - {NewCoin(uatom, NewInt(5000000)), atom, NewCoin(atom, NewInt(5)), false}, // uatom => atom + {NewCoin(uatom, math.NewInt(5000000)), matom, NewCoin(matom, math.NewInt(5000)), false}, // uatom => matom + {NewCoin(uatom, math.NewInt(5000000)), natom, NewCoin(natom, math.NewInt(5000000000)), false}, // uatom => natom + {NewCoin(uatom, math.NewInt(5000000)), atom, NewCoin(atom, math.NewInt(5)), false}, // uatom => atom - {NewCoin(matom, NewInt(5000)), natom, NewCoin(natom, NewInt(5000000000)), false}, // matom => natom - {NewCoin(matom, NewInt(5000)), uatom, NewCoin(uatom, NewInt(5000000)), false}, // matom => uatom + {NewCoin(matom, math.NewInt(5000)), natom, NewCoin(natom, math.NewInt(5000000000)), false}, // matom => natom + {NewCoin(matom, math.NewInt(5000)), uatom, NewCoin(uatom, math.NewInt(5000000)), false}, // matom => uatom } for i, tc := range testCases { @@ -112,35 +113,35 @@ func (s *internalDenomTestSuite) TestConvertCoins() { // reset registration baseDenom = "" - denomUnits = map[string]Dec{} + denomUnits = map[string]math.LegacyDec{} } func (s *internalDenomTestSuite) TestConvertDecCoins() { atomUnit := math.LegacyOneDec() // 1 (base denom unit) s.Require().NoError(RegisterDenom(atom, atomUnit)) - matomUnit := NewDecWithPrec(1, 3) // 10^-3 (milli) + matomUnit := math.LegacyNewDecWithPrec(1, 3) // 10^-3 (milli) s.Require().NoError(RegisterDenom(matom, matomUnit)) - uatomUnit := NewDecWithPrec(1, 6) // 10^-6 (micro) + uatomUnit := math.LegacyNewDecWithPrec(1, 6) // 10^-6 (micro) s.Require().NoError(RegisterDenom(uatom, uatomUnit)) - natomUnit := NewDecWithPrec(1, 9) // 10^-9 (nano) + natomUnit := math.LegacyNewDecWithPrec(1, 9) // 10^-9 (nano) s.Require().NoError(RegisterDenom(natom, natomUnit)) res, err := GetBaseDenom() s.Require().NoError(err) s.Require().Equal(res, natom) - s.Require().Equal(NormalizeDecCoin(NewDecCoin(uatom, NewInt(1))), NewDecCoin(natom, NewInt(1000))) - s.Require().Equal(NormalizeDecCoin(NewDecCoin(matom, NewInt(1))), NewDecCoin(natom, NewInt(1000000))) - s.Require().Equal(NormalizeDecCoin(NewDecCoin(atom, NewInt(1))), NewDecCoin(natom, NewInt(1000000000))) + s.Require().Equal(NormalizeDecCoin(NewDecCoin(uatom, math.NewInt(1))), NewDecCoin(natom, math.NewInt(1000))) + s.Require().Equal(NormalizeDecCoin(NewDecCoin(matom, math.NewInt(1))), NewDecCoin(natom, math.NewInt(1000000))) + s.Require().Equal(NormalizeDecCoin(NewDecCoin(atom, math.NewInt(1))), NewDecCoin(natom, math.NewInt(1000000000))) coins, err := ParseCoinsNormalized("0.1atom,0.1matom,0.1uatom") s.Require().NoError(err) s.Require().Equal(coins, Coins{ - Coin{natom, NewInt(100000000)}, - Coin{natom, NewInt(100000)}, - Coin{natom, NewInt(100)}, + Coin{natom, math.NewInt(100000000)}, + Coin{natom, math.NewInt(100000)}, + Coin{natom, math.NewInt(100)}, }) testCases := []struct { @@ -149,21 +150,21 @@ func (s *internalDenomTestSuite) TestConvertDecCoins() { result DecCoin expErr bool }{ - {NewDecCoin("foo", ZeroInt()), atom, DecCoin{}, true}, - {NewDecCoin(atom, ZeroInt()), "foo", DecCoin{}, true}, - {NewDecCoin(atom, ZeroInt()), "FOO", DecCoin{}, true}, + {NewDecCoin("foo", math.ZeroInt()), atom, DecCoin{}, true}, + {NewDecCoin(atom, math.ZeroInt()), "foo", DecCoin{}, true}, + {NewDecCoin(atom, math.ZeroInt()), "FOO", DecCoin{}, true}, // 0.5atom - {NewDecCoinFromDec(atom, NewDecWithPrec(5, 1)), matom, NewDecCoin(matom, NewInt(500)), false}, // atom => matom - {NewDecCoinFromDec(atom, NewDecWithPrec(5, 1)), uatom, NewDecCoin(uatom, NewInt(500000)), false}, // atom => uatom - {NewDecCoinFromDec(atom, NewDecWithPrec(5, 1)), natom, NewDecCoin(natom, NewInt(500000000)), false}, // atom => natom + {NewDecCoinFromDec(atom, math.LegacyNewDecWithPrec(5, 1)), matom, NewDecCoin(matom, math.NewInt(500)), false}, // atom => matom + {NewDecCoinFromDec(atom, math.LegacyNewDecWithPrec(5, 1)), uatom, NewDecCoin(uatom, math.NewInt(500000)), false}, // atom => uatom + {NewDecCoinFromDec(atom, math.LegacyNewDecWithPrec(5, 1)), natom, NewDecCoin(natom, math.NewInt(500000000)), false}, // atom => natom - {NewDecCoin(uatom, NewInt(5000000)), matom, NewDecCoin(matom, NewInt(5000)), false}, // uatom => matom - {NewDecCoin(uatom, NewInt(5000000)), natom, NewDecCoin(natom, NewInt(5000000000)), false}, // uatom => natom - {NewDecCoin(uatom, NewInt(5000000)), atom, NewDecCoin(atom, NewInt(5)), false}, // uatom => atom + {NewDecCoin(uatom, math.NewInt(5000000)), matom, NewDecCoin(matom, math.NewInt(5000)), false}, // uatom => matom + {NewDecCoin(uatom, math.NewInt(5000000)), natom, NewDecCoin(natom, math.NewInt(5000000000)), false}, // uatom => natom + {NewDecCoin(uatom, math.NewInt(5000000)), atom, NewDecCoin(atom, math.NewInt(5)), false}, // uatom => atom - {NewDecCoin(matom, NewInt(5000)), natom, NewDecCoin(natom, NewInt(5000000000)), false}, // matom => natom - {NewDecCoin(matom, NewInt(5000)), uatom, NewDecCoin(uatom, NewInt(5000000)), false}, // matom => uatom + {NewDecCoin(matom, math.NewInt(5000)), natom, NewDecCoin(natom, math.NewInt(5000000000)), false}, // matom => natom + {NewDecCoin(matom, math.NewInt(5000)), uatom, NewDecCoin(uatom, math.NewInt(5000000)), false}, // matom => uatom } for i, tc := range testCases { @@ -180,24 +181,24 @@ func (s *internalDenomTestSuite) TestConvertDecCoins() { // reset registration baseDenom = "" - denomUnits = map[string]Dec{} + denomUnits = map[string]math.LegacyDec{} } func (s *internalDenomTestSuite) TestDecOperationOrder() { - dec, err := NewDecFromStr("11") + dec, err := math.LegacyNewDecFromStr("11") s.Require().NoError(err) s.Require().NoError(RegisterDenom("unit1", dec)) - dec, err = NewDecFromStr("100000011") + dec, err = math.LegacyNewDecFromStr("100000011") s.Require().NoError(err) s.Require().NoError(RegisterDenom("unit2", dec)) - coin, err := ConvertCoin(NewCoin("unit1", NewInt(100000011)), "unit2") + coin, err := ConvertCoin(NewCoin("unit1", math.NewInt(100000011)), "unit2") s.Require().NoError(err) - s.Require().Equal(coin, NewCoin("unit2", NewInt(11))) + s.Require().Equal(coin, NewCoin("unit2", math.NewInt(11))) // reset registration baseDenom = "" - denomUnits = map[string]Dec{} + denomUnits = map[string]math.LegacyDec{} } func (s *internalDenomTestSuite) TestSetBaseDenomError() { @@ -206,5 +207,5 @@ func (s *internalDenomTestSuite) TestSetBaseDenomError() { // reset registration baseDenom = "" - denomUnits = map[string]Dec{} + denomUnits = map[string]math.LegacyDec{} } diff --git a/types/errors/abci.go b/types/errors/abci.go index 819b9f3a7069..47accd62d847 100644 --- a/types/errors/abci.go +++ b/types/errors/abci.go @@ -1,8 +1,9 @@ package errors import ( - errorsmod "cosmossdk.io/errors" abci "github.com/cometbft/cometbft/abci/types" + + errorsmod "cosmossdk.io/errors" ) // ResponseCheckTxWithEvents returns an ABCI ResponseCheckTx object with fields filled in diff --git a/types/events.go b/types/events.go index 0ac28b046186..8d1f9d6cb44c 100644 --- a/types/events.go +++ b/types/events.go @@ -6,12 +6,11 @@ import ( "reflect" "strings" - "golang.org/x/exp/maps" - "golang.org/x/exp/slices" - abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/gogoproto/jsonpb" proto "github.com/cosmos/gogoproto/proto" + "golang.org/x/exp/maps" + "golang.org/x/exp/slices" "github.com/cosmos/cosmos-sdk/codec" ) diff --git a/types/events_test.go b/types/events_test.go index 0650af9b1b3a..a5280f0a1730 100644 --- a/types/events_test.go +++ b/types/events_test.go @@ -8,6 +8,8 @@ import ( abci "github.com/cometbft/cometbft/abci/types" "github.com/stretchr/testify/suite" + "cosmossdk.io/math" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" testdata "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" @@ -90,7 +92,7 @@ func (s *eventsTestSuite) TestEmitTypedEvent() { s.Run("deterministic key-value order", func() { for i := 0; i < 10; i++ { em := sdk.NewEventManager() - coin := sdk.NewCoin("fakedenom", sdk.NewInt(1999999)) + coin := sdk.NewCoin("fakedenom", math.NewInt(1999999)) s.Require().NoError(em.EmitTypedEvent(&coin)) s.Require().Len(em.Events(), 1) attrs := em.Events()[0].Attributes @@ -104,7 +106,7 @@ func (s *eventsTestSuite) TestEmitTypedEvent() { func (s *eventsTestSuite) TestEventManagerTypedEvents() { em := sdk.NewEventManager() - coin := sdk.NewCoin("fakedenom", sdk.NewInt(1999999)) + coin := sdk.NewCoin("fakedenom", math.NewInt(1999999)) cat := testdata.Cat{ Moniker: "Garfield", Lives: 6, diff --git a/types/handler.go b/types/handler.go index 7b57dd52f599..456c3904e43c 100644 --- a/types/handler.go +++ b/types/handler.go @@ -1,8 +1,5 @@ package types -// Handler defines the core of the state transition function of an application. -type Handler func(ctx Context, msg Msg) (*Result, error) - // AnteHandler authenticates transactions, before their internal messages are handled. // If newCtx.IsZero(), ctx is used instead. type AnteHandler func(ctx Context, tx Tx, simulate bool) (newCtx Context, err error) @@ -100,6 +97,8 @@ func ChainPostDecorators(chain ...PostDecorator) PostHandler { // \ '\ / \ | | _/ / // \ \ \ | | / / // snd \ \ \ / +// +// Deprecated: Terminator is retired (ref https://github.com/cosmos/cosmos-sdk/pull/16076). type Terminator struct{} // AnteHandle returns the provided Context and nil error diff --git a/types/mapcoins.go b/types/mapcoins.go index 46e9adcd1383..cbebf9691af2 100644 --- a/types/mapcoins.go +++ b/types/mapcoins.go @@ -1,9 +1,11 @@ package types +import "cosmossdk.io/math" + // map coins is a map representation of sdk.Coins // intended solely for use in bulk additions. // All serialization and iteration should be done after conversion to sdk.Coins. -type MapCoins map[string]Int +type MapCoins map[string]math.Int func NewMapCoins(coins Coins) MapCoins { m := make(MapCoins, len(coins)) diff --git a/types/mapcoins_test.go b/types/mapcoins_test.go index 68fd74994c72..d58808910378 100644 --- a/types/mapcoins_test.go +++ b/types/mapcoins_test.go @@ -1,8 +1,9 @@ package types_test import ( - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" + + sdk "github.com/cosmos/cosmos-sdk/types" ) func (s *coinTestSuite) TestMapCoinsAdd() { diff --git a/types/math.go b/types/math.go index 430039f27cb6..b8c4d275c024 100644 --- a/types/math.go +++ b/types/math.go @@ -1,41 +1,9 @@ package types -import ( - sdkmath "cosmossdk.io/math" -) - -// Type aliases to the SDK's math sub-module -// -// Deprecated: Functionality of this package has been moved to it's own module: -// cosmossdk.io/math -// -// Please use the above module instead of this package. -type ( - Int = sdkmath.Int -) - -var ( - NewInt = sdkmath.NewInt - ZeroInt = sdkmath.ZeroInt -) - func (ip IntProto) String() string { return ip.Int.String() } -type ( - Dec = sdkmath.LegacyDec -) - -var ( - NewDecWithPrec = sdkmath.LegacyNewDecWithPrec - NewDecFromInt = sdkmath.LegacyNewDecFromInt - NewDecFromStr = sdkmath.LegacyNewDecFromStr - MustNewDecFromStr = sdkmath.LegacyMustNewDecFromStr -) - -var _ CustomProtobufType = (*Dec)(nil) - func (dp DecProto) String() string { return dp.Dec.String() } diff --git a/types/mempool/mempool.go b/types/mempool/mempool.go index 37f94d8f4d9f..968f2d947666 100644 --- a/types/mempool/mempool.go +++ b/types/mempool/mempool.go @@ -13,8 +13,7 @@ type Mempool interface { Insert(context.Context, sdk.Tx) error // Select returns an Iterator over the app-side mempool. If txs are specified, - // then they shall be incorporated into the Iterator. The Iterator must - // closed by the caller. + // then they shall be incorporated into the Iterator. The Iterator is not thread-safe to use. Select(context.Context, [][]byte) Iterator // CountTx returns the number of transactions currently in the mempool. @@ -25,6 +24,16 @@ type Mempool interface { Remove(sdk.Tx) error } +// ExtMempool is a extension of Mempool interface introduced in v0.50 +// for not be breaking in a patch release. +// In v0.52+, this interface will be merged into Mempool interface. +type ExtMempool interface { + Mempool + + // SelectBy use callback to iterate over the mempool, it's thread-safe to use. + SelectBy(context.Context, [][]byte, func(sdk.Tx) bool) +} + // Iterator defines an app-side mempool iterator interface that is as minimal as // possible. The order of iteration is determined by the app-side mempool // implementation. @@ -41,3 +50,18 @@ var ( ErrTxNotFound = errors.New("tx not found in mempool") ErrMempoolTxMaxCapacity = errors.New("pool reached max tx capacity") ) + +// SelectBy is compatible with old interface to avoid breaking api. +// In v0.52+, this function is removed and SelectBy is merged into Mempool interface. +func SelectBy(ctx context.Context, mempool Mempool, txs [][]byte, callback func(sdk.Tx) bool) { + if ext, ok := mempool.(ExtMempool); ok { + ext.SelectBy(ctx, txs, callback) + return + } + + // fallback to old behavior, without holding the lock while iteration. + iter := mempool.Select(ctx, txs) + for iter != nil && callback(iter.Tx()) { + iter = iter.Next() + } +} diff --git a/types/mempool/mempool_test.go b/types/mempool/mempool_test.go index 9ed3b4d596a9..05f61e46decd 100644 --- a/types/mempool/mempool_test.go +++ b/types/mempool/mempool_test.go @@ -210,7 +210,7 @@ type MempoolTestSuite struct { func (s *MempoolTestSuite) resetMempool() { s.iterations = 0 - s.mempool = mempool.NewSenderNonceMempool() + s.mempool = mempool.NewSenderNonceMempool(mempool.SenderNonceMaxTxOpt(5000)) } func (s *MempoolTestSuite) SetupTest() { diff --git a/types/mempool/noop.go b/types/mempool/noop.go index 73c12639d1d6..0a8fdec6f566 100644 --- a/types/mempool/noop.go +++ b/types/mempool/noop.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) -var _ Mempool = (*NoOpMempool)(nil) +var _ ExtMempool = (*NoOpMempool)(nil) // NoOpMempool defines a no-op mempool. Transactions are completely discarded and // ignored when BaseApp interacts with the mempool. @@ -16,7 +16,8 @@ var _ Mempool = (*NoOpMempool)(nil) // is FIFO-ordered by default. type NoOpMempool struct{} -func (NoOpMempool) Insert(context.Context, sdk.Tx) error { return nil } -func (NoOpMempool) Select(context.Context, [][]byte) Iterator { return nil } -func (NoOpMempool) CountTx() int { return 0 } -func (NoOpMempool) Remove(sdk.Tx) error { return nil } +func (NoOpMempool) Insert(context.Context, sdk.Tx) error { return nil } +func (NoOpMempool) Select(context.Context, [][]byte) Iterator { return nil } +func (NoOpMempool) SelectBy(context.Context, [][]byte, func(sdk.Tx) bool) {} +func (NoOpMempool) CountTx() int { return 0 } +func (NoOpMempool) Remove(sdk.Tx) error { return nil } diff --git a/types/mempool/priority_nonce.go b/types/mempool/priority_nonce.go index 401526b7b254..ba09f37cdbbe 100644 --- a/types/mempool/priority_nonce.go +++ b/types/mempool/priority_nonce.go @@ -4,16 +4,16 @@ import ( "context" "fmt" "math" + "sync" "github.com/huandu/skiplist" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/signing" ) var ( - _ Mempool = (*PriorityNonceMempool[int64])(nil) - _ Iterator = (*PriorityNonceIterator[int64])(nil) + _ ExtMempool = (*PriorityNonceMempool[int64])(nil) + _ Iterator = (*PriorityNonceIterator[int64])(nil) ) type ( @@ -39,6 +39,9 @@ type ( // (sequence number) when evicting transactions. // - if MaxTx < 0, `Insert` is a no-op. MaxTx int + + // SignerExtractor is an implementation which retrieves signer data from a sdk.Tx + SignerExtractor SignerExtractionAdapter } // PriorityNonceMempool is a mempool implementation that stores txs @@ -49,6 +52,7 @@ type ( // priority to other sender txs and must be partially ordered by both sender-nonce // and priority. PriorityNonceMempool[C comparable] struct { + mtx sync.Mutex priorityIndex *skiplist.SkipList priorityCounts map[C]int senderIndices map[string]*skiplist.SkipList @@ -114,7 +118,8 @@ func NewDefaultTxPriority() TxPriority[int64] { func DefaultPriorityNonceMempoolConfig() PriorityNonceMempoolConfig[int64] { return PriorityNonceMempoolConfig[int64]{ - TxPriority: NewDefaultTxPriority(), + TxPriority: NewDefaultTxPriority(), + SignerExtractor: NewDefaultSignerExtractionAdapter(), } } @@ -155,6 +160,9 @@ func skiplistComparable[C comparable](txPriority TxPriority[C]) skiplist.Compara // NewPriorityMempool returns the SDK's default mempool implementation which // returns txs in a partial order by 2 dimensions; priority, and sender-nonce. func NewPriorityMempool[C comparable](cfg PriorityNonceMempoolConfig[C]) *PriorityNonceMempool[C] { + if cfg.SignerExtractor == nil { + cfg.SignerExtractor = NewDefaultSignerExtractionAdapter() + } mp := &PriorityNonceMempool[C]{ priorityIndex: skiplist.New(skiplistComparable(cfg.TxPriority)), priorityCounts: make(map[C]int), @@ -194,13 +202,15 @@ func (mp *PriorityNonceMempool[C]) NextSenderTx(sender string) sdk.Tx { // Inserting a duplicate tx with a different priority overwrites the existing tx, // changing the total order of the mempool. func (mp *PriorityNonceMempool[C]) Insert(ctx context.Context, tx sdk.Tx) error { - if mp.cfg.MaxTx > 0 && mp.CountTx() >= mp.cfg.MaxTx { + mp.mtx.Lock() + defer mp.mtx.Unlock() + if mp.cfg.MaxTx > 0 && mp.priorityIndex.Len() >= mp.cfg.MaxTx { return ErrMempoolTxMaxCapacity } else if mp.cfg.MaxTx < 0 { return nil } - sigs, err := tx.(signing.SigVerifiableTx).GetSignaturesV2() + sigs, err := mp.cfg.SignerExtractor.GetSigners(tx) if err != nil { return err } @@ -209,7 +219,7 @@ func (mp *PriorityNonceMempool[C]) Insert(ctx context.Context, tx sdk.Tx) error } sig := sigs[0] - sender := sdk.AccAddress(sig.PubKey.Address()).String() + sender := sig.Signer.String() priority := mp.cfg.TxPriority.GetTxPriority(ctx, tx) nonce := sig.Sequence key := txMeta[C]{nonce: nonce, priority: priority, sender: sender} @@ -314,7 +324,7 @@ func (i *PriorityNonceIterator[C]) Next() Iterator { // priority in the pool. if i.mempool.cfg.TxPriority.Compare(key.priority, i.nextPriority) < 0 { return i.iteratePriority() - } else if i.mempool.cfg.TxPriority.Compare(key.priority, i.nextPriority) == 0 { + } else if i.priorityNode.Next() != nil && i.mempool.cfg.TxPriority.Compare(key.priority, i.nextPriority) == 0 { // Weight is incorporated into the priority index key only (not sender index) // so we must fetch it here from the scores map. weight := i.mempool.scores[txMeta[C]{nonce: key.nonce, sender: key.sender}].weight @@ -340,7 +350,13 @@ func (i *PriorityNonceIterator[C]) Tx() sdk.Tx { // // NOTE: It is not safe to use this iterator while removing transactions from // the underlying mempool. -func (mp *PriorityNonceMempool[C]) Select(_ context.Context, _ [][]byte) Iterator { +func (mp *PriorityNonceMempool[C]) Select(ctx context.Context, txs [][]byte) Iterator { + mp.mtx.Lock() + defer mp.mtx.Unlock() + return mp.doSelect(ctx, txs) +} + +func (mp *PriorityNonceMempool[C]) doSelect(_ context.Context, _ [][]byte) Iterator { if mp.priorityIndex.Len() == 0 { return nil } @@ -355,6 +371,17 @@ func (mp *PriorityNonceMempool[C]) Select(_ context.Context, _ [][]byte) Iterato return iterator.iteratePriority() } +// SelectBy will hold the mutex during the iteration, callback returns if continue. +func (mp *PriorityNonceMempool[C]) SelectBy(ctx context.Context, txs [][]byte, callback func(sdk.Tx) bool) { + mp.mtx.Lock() + defer mp.mtx.Unlock() + + iter := mp.doSelect(ctx, txs) + for iter != nil && callback(iter.Tx()) { + iter = iter.Next() + } +} + type reorderKey[C comparable] struct { deleteKey txMeta[C] insertKey txMeta[C] @@ -409,13 +436,17 @@ func senderWeight[C comparable](txPriority TxPriority[C], senderCursor *skiplist // CountTx returns the number of transactions in the mempool. func (mp *PriorityNonceMempool[C]) CountTx() int { + mp.mtx.Lock() + defer mp.mtx.Unlock() return mp.priorityIndex.Len() } // Remove removes a transaction from the mempool in O(log n) time, returning an // error if unsuccessful. func (mp *PriorityNonceMempool[C]) Remove(tx sdk.Tx) error { - sigs, err := tx.(signing.SigVerifiableTx).GetSignaturesV2() + mp.mtx.Lock() + defer mp.mtx.Unlock() + sigs, err := mp.cfg.SignerExtractor.GetSigners(tx) if err != nil { return err } @@ -424,7 +455,7 @@ func (mp *PriorityNonceMempool[C]) Remove(tx sdk.Tx) error { } sig := sigs[0] - sender := sdk.AccAddress(sig.PubKey.Address()).String() + sender := sig.Signer.String() nonce := sig.Sequence scoreKey := txMeta[C]{nonce: nonce, sender: sender} diff --git a/types/mempool/priority_nonce_test.go b/types/mempool/priority_nonce_test.go index 6a3a62e13d86..96a047364e8a 100644 --- a/types/mempool/priority_nonce_test.go +++ b/types/mempool/priority_nonce_test.go @@ -1,16 +1,19 @@ package mempool_test import ( + "context" "fmt" "math" "math/rand" + "sync" "testing" "time" - "cosmossdk.io/log" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/require" + "cosmossdk.io/log" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/mempool" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -59,6 +62,87 @@ func TestOutOfOrder(t *testing.T) { require.Error(t, validateOrder(rmtxs)) } +type signerExtractionAdapter struct { + UseOld bool +} + +func (a signerExtractionAdapter) GetSigners(tx sdk.Tx) ([]mempool.SignerData, error) { + if !a.UseOld { + return mempool.NewDefaultSignerExtractionAdapter().GetSigners(tx) + } + sigs, err := tx.(signing.SigVerifiableTx).GetSignaturesV2() + if err != nil { + return nil, err + } + signerData := make([]mempool.SignerData, 0, len(sigs)) + for _, sig := range sigs { + signerData = append(signerData, mempool.SignerData{ + Signer: sig.PubKey.Address().Bytes(), + Sequence: sig.Sequence, + }) + } + return signerData, nil +} + +func (s *MempoolTestSuite) TestPriorityNonceTxOrderWithAdapter() { + t := s.T() + ctx := sdk.NewContext(nil, cmtproto.Header{}, false, log.NewNopLogger()) + accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 5) + sa := accounts[0].Address + sb := accounts[1].Address + + tests := []struct { + txs []txSpec + order []int + fail bool + }{ + { + txs: []txSpec{ + {p: 21, n: 4, a: sa}, + {p: 8, n: 3, a: sa}, + {p: 6, n: 2, a: sa}, + {p: 15, n: 1, a: sb}, + {p: 20, n: 1, a: sa}, + }, + order: []int{4, 3, 2, 1, 0}, + }, + } + for i, tt := range tests { + t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { + adapter := signerExtractionAdapter{} + pool := mempool.NewPriorityMempool(mempool.PriorityNonceMempoolConfig[int64]{ + TxPriority: mempool.NewDefaultTxPriority(), + SignerExtractor: adapter, + }) + + // create test txs and insert into mempool + for i, ts := range tt.txs { + tx := testTx{id: i, priority: int64(ts.p), nonce: uint64(ts.n), address: ts.a} + c := ctx.WithPriority(tx.priority) + err := pool.Insert(c, tx) + require.NoError(t, err) + } + + orderedTxs := fetchTxs(pool.Select(ctx, nil), 1000) + + var txOrder []int + for _, tx := range orderedTxs { + txOrder = append(txOrder, tx.(testTx).id) + } + + require.Equal(t, tt.order, txOrder) + require.NoError(t, validateOrder(orderedTxs)) + + adapter.UseOld = true + for _, tx := range orderedTxs { + require.NoError(t, pool.Remove(tx)) + } + + require.NoError(t, mempool.IsEmpty[int64](pool)) + }) + } +} + func (s *MempoolTestSuite) TestPriorityNonceTxOrder() { t := s.T() ctx := sdk.NewContext(nil, cmtproto.Header{}, false, log.NewNopLogger()) @@ -258,6 +342,145 @@ func (s *MempoolTestSuite) TestPriorityNonceTxOrder() { } } +func (s *MempoolTestSuite) TestIterator() { + t := s.T() + ctx := sdk.NewContext(nil, cmtproto.Header{}, false, log.NewNopLogger()) + accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 2) + sa := accounts[0].Address + sb := accounts[1].Address + + tests := []struct { + txs []txSpec + fail bool + }{ + { + txs: []txSpec{ + {p: 20, n: 1, a: sa}, + {p: 15, n: 1, a: sb}, + {p: 6, n: 2, a: sa}, + {p: 21, n: 4, a: sa}, + {p: 8, n: 2, a: sb}, + }, + }, + { + txs: []txSpec{ + {p: 20, n: 1, a: sa}, + {p: 15, n: 1, a: sb}, + {p: 6, n: 2, a: sa}, + {p: 21, n: 4, a: sa}, + {p: math.MinInt64, n: 2, a: sb}, + }, + }, + } + + for i, tt := range tests { + t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { + pool := mempool.DefaultPriorityMempool() + + // create test txs and insert into mempool + for i, ts := range tt.txs { + tx := testTx{id: i, priority: int64(ts.p), nonce: uint64(ts.n), address: ts.a} + c := ctx.WithPriority(tx.priority) + err := pool.Insert(c, tx) + require.NoError(t, err) + } + + // iterate through txs + iterator := pool.Select(ctx, nil) + for iterator != nil { + tx := iterator.Tx().(testTx) + require.Equal(t, tt.txs[tx.id].p, int(tx.priority)) + require.Equal(t, tt.txs[tx.id].n, int(tx.nonce)) + require.Equal(t, tt.txs[tx.id].a, tx.address) + iterator = iterator.Next() + } + }) + } +} + +func (s *MempoolTestSuite) TestIteratorConcurrency() { + t := s.T() + ctx := sdk.NewContext(nil, cmtproto.Header{}, false, log.NewNopLogger()) + accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 2) + sa := accounts[0].Address + sb := accounts[1].Address + + tests := []struct { + txs []txSpec + fail bool + }{ + { + txs: []txSpec{ + {p: 20, n: 1, a: sa}, + {p: 15, n: 1, a: sb}, + {p: 6, n: 2, a: sa}, + {p: 21, n: 4, a: sa}, + {p: 8, n: 2, a: sb}, + }, + }, + { + txs: []txSpec{ + {p: 20, n: 1, a: sa}, + {p: 15, n: 1, a: sb}, + {p: 6, n: 2, a: sa}, + {p: 21, n: 4, a: sa}, + {p: math.MinInt64, n: 2, a: sb}, + }, + }, + } + + for i, tt := range tests { + t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { + pool := mempool.DefaultPriorityMempool() + + // create test txs and insert into mempool + for i, ts := range tt.txs { + tx := testTx{id: i, priority: int64(ts.p), nonce: uint64(ts.n), address: ts.a} + c := ctx.WithPriority(tx.priority) + err := pool.Insert(c, tx) + require.NoError(t, err) + } + + // iterate through txs + stdCtx, cancel := context.WithCancel(context.Background()) + var wg sync.WaitGroup + wg.Add(1) + go func() { + defer wg.Done() + + id := len(tt.txs) + for { + select { + case <-stdCtx.Done(): + return + default: + id++ + tx := testTx{id: id, priority: int64(rand.Intn(100)), nonce: uint64(id), address: sa} + c := ctx.WithPriority(tx.priority) + err := pool.Insert(c, tx) + require.NoError(t, err) + } + } + }() + + var i int + pool.SelectBy(ctx, nil, func(memTx sdk.Tx) bool { + tx := memTx.(testTx) + if tx.id < len(tt.txs) { + require.Equal(t, tt.txs[tx.id].p, int(tx.priority)) + require.Equal(t, tt.txs[tx.id].n, int(tx.nonce)) + require.Equal(t, tt.txs[tx.id].a, tx.address) + i++ + } + return i < len(tt.txs) + }) + require.Equal(t, i, len(tt.txs)) + cancel() + wg.Wait() + }) + } +} + func (s *MempoolTestSuite) TestPriorityTies() { ctx := sdk.NewContext(nil, cmtproto.Header{}, false, log.NewNopLogger()) accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 3) @@ -378,6 +601,7 @@ func (s *MempoolTestSuite) TestRandomGeneratedTxs() { OnRead: func(tx sdk.Tx) { s.iterations++ }, + SignerExtractor: mempool.NewDefaultSignerExtractionAdapter(), }, ) @@ -641,8 +865,9 @@ func TestNextSenderTx_TxLimit(t *testing.T) { // unlimited mp := mempool.NewPriorityMempool( mempool.PriorityNonceMempoolConfig[int64]{ - TxPriority: mempool.NewDefaultTxPriority(), - MaxTx: 0, + TxPriority: mempool.NewDefaultTxPriority(), + MaxTx: 0, + SignerExtractor: mempool.NewDefaultSignerExtractionAdapter(), }, ) for i, tx := range txs { @@ -661,8 +886,9 @@ func TestNextSenderTx_TxLimit(t *testing.T) { // limit: 3 mp = mempool.NewPriorityMempool( mempool.PriorityNonceMempoolConfig[int64]{ - TxPriority: mempool.NewDefaultTxPriority(), - MaxTx: 3, + TxPriority: mempool.NewDefaultTxPriority(), + MaxTx: 3, + SignerExtractor: mempool.NewDefaultSignerExtractionAdapter(), }, ) for i, tx := range txs { @@ -680,8 +906,9 @@ func TestNextSenderTx_TxLimit(t *testing.T) { // disabled mp = mempool.NewPriorityMempool( mempool.PriorityNonceMempoolConfig[int64]{ - TxPriority: mempool.NewDefaultTxPriority(), - MaxTx: -1, + TxPriority: mempool.NewDefaultTxPriority(), + MaxTx: -1, + SignerExtractor: mempool.NewDefaultSignerExtractionAdapter(), }, ) for _, tx := range txs { @@ -726,6 +953,7 @@ func TestNextSenderTx_TxReplacement(t *testing.T) { threshold := int64(100 + feeBump) return np >= op*threshold/100 }, + SignerExtractor: mempool.NewDefaultSignerExtractionAdapter(), }, ) diff --git a/types/mempool/sender_nonce.go b/types/mempool/sender_nonce.go index c013072dfecd..15d0d079105e 100644 --- a/types/mempool/sender_nonce.go +++ b/types/mempool/sender_nonce.go @@ -6,6 +6,7 @@ import ( "encoding/binary" "fmt" "math/rand" // #nosec // math/rand is used for random selection and seeded from crypto/rand + "sync" "github.com/huandu/skiplist" @@ -14,11 +15,11 @@ import ( ) var ( - _ Mempool = (*SenderNonceMempool)(nil) - _ Iterator = (*senderNonceMempoolIterator)(nil) + _ ExtMempool = (*SenderNonceMempool)(nil) + _ Iterator = (*senderNonceMempoolIterator)(nil) ) -var DefaultMaxTx = 0 +var DefaultMaxTx = -1 // SenderNonceMempool is a mempool that prioritizes transactions within a sender // by nonce, the lowest first, but selects a random sender on each iteration. @@ -31,6 +32,7 @@ var DefaultMaxTx = 0 // Note that PrepareProposal could choose to stop iteration before reaching the // end if maxBytes is reached. type SenderNonceMempool struct { + mtx sync.Mutex senders map[string]*skiplist.SkipList rnd *rand.Rand maxTx int @@ -116,7 +118,9 @@ func (snm *SenderNonceMempool) NextSenderTx(sender string) sdk.Tx { // Insert adds a tx to the mempool. It returns an error if the tx does not have // at least one signer. Note, priority is ignored. func (snm *SenderNonceMempool) Insert(_ context.Context, tx sdk.Tx) error { - if snm.maxTx > 0 && snm.CountTx() >= snm.maxTx { + snm.mtx.Lock() + defer snm.mtx.Unlock() + if snm.maxTx > 0 && len(snm.existingTx) >= snm.maxTx { return ErrMempoolTxMaxCapacity } if snm.maxTx < 0 { @@ -154,7 +158,13 @@ func (snm *SenderNonceMempool) Insert(_ context.Context, tx sdk.Tx) error { // // NOTE: It is not safe to use this iterator while removing transactions from // the underlying mempool. -func (snm *SenderNonceMempool) Select(_ context.Context, _ [][]byte) Iterator { +func (snm *SenderNonceMempool) Select(ctx context.Context, txs [][]byte) Iterator { + snm.mtx.Lock() + defer snm.mtx.Unlock() + return snm.doSelect(ctx, txs) +} + +func (snm *SenderNonceMempool) doSelect(_ context.Context, _ [][]byte) Iterator { var senders []string senderCursors := make(map[string]*skiplist.Element) @@ -182,14 +192,29 @@ func (snm *SenderNonceMempool) Select(_ context.Context, _ [][]byte) Iterator { return iter.Next() } +// SelectBy will hold the mutex during the iteration, callback returns if continue. +func (snm *SenderNonceMempool) SelectBy(ctx context.Context, txs [][]byte, callback func(sdk.Tx) bool) { + snm.mtx.Lock() + defer snm.mtx.Unlock() + + iter := snm.doSelect(ctx, txs) + for iter != nil && callback(iter.Tx()) { + iter = iter.Next() + } +} + // CountTx returns the total count of txs in the mempool. func (snm *SenderNonceMempool) CountTx() int { + snm.mtx.Lock() + defer snm.mtx.Unlock() return len(snm.existingTx) } // Remove removes a tx from the mempool. It returns an error if the tx does not // have at least one signer or the tx was not found in the pool. func (snm *SenderNonceMempool) Remove(tx sdk.Tx) error { + snm.mtx.Lock() + defer snm.mtx.Unlock() sigs, err := tx.(signing.SigVerifiableTx).GetSignaturesV2() if err != nil { return err diff --git a/types/mempool/sender_nonce_property_test.go b/types/mempool/sender_nonce_property_test.go index 5ae29eb31bd1..baaaa4abe9a2 100644 --- a/types/mempool/sender_nonce_property_test.go +++ b/types/mempool/sender_nonce_property_test.go @@ -3,11 +3,11 @@ package mempool_test import ( "sort" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/stretchr/testify/require" "pgregory.net/rapid" "cosmossdk.io/log" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" - "github.com/stretchr/testify/require" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/types/mempool/sender_nonce_test.go b/types/mempool/sender_nonce_test.go index bcaca96529b6..4e6b10cd7e80 100644 --- a/types/mempool/sender_nonce_test.go +++ b/types/mempool/sender_nonce_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/require" "cosmossdk.io/log" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/mempool" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -114,7 +115,7 @@ func (s *MempoolTestSuite) TestTxOrder() { } for i, tt := range tests { t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { - pool := mempool.NewSenderNonceMempool(mempool.SenderNonceSeedOpt(tt.seed)) + pool := mempool.NewSenderNonceMempool(mempool.SenderNonceMaxTxOpt(5000), mempool.SenderNonceSeedOpt(tt.seed)) // create test txs and insert into mempool for i, ts := range tt.txs { tx := testTx{id: i, priority: int64(ts.p), nonce: uint64(ts.n), address: ts.a} @@ -172,7 +173,7 @@ func (s *MempoolTestSuite) TestTxNotFoundOnSender() { t := s.T() ctx := sdk.NewContext(nil, cmtproto.Header{}, false, log.NewNopLogger()) accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 1) - mp := mempool.NewSenderNonceMempool() + mp := mempool.NewSenderNonceMempool(mempool.SenderNonceMaxTxOpt(5000)) txSender := testTx{ nonce: 0, diff --git a/types/mempool/signer_extraction_adapater_test.go b/types/mempool/signer_extraction_adapater_test.go new file mode 100644 index 000000000000..b2218dc8e511 --- /dev/null +++ b/types/mempool/signer_extraction_adapater_test.go @@ -0,0 +1,58 @@ +package mempool_test + +import ( + "fmt" + "math/rand" + "testing" + + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/proto" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/mempool" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + txsigning "github.com/cosmos/cosmos-sdk/types/tx/signing" +) + +type nonVerifiableTx struct{} + +func (n nonVerifiableTx) GetMsgs() []sdk.Msg { + panic("not implemented") +} + +func (n nonVerifiableTx) GetMsgsV2() ([]proto.Message, error) { + panic("not implemented") +} + +func TestDefaultSignerExtractor(t *testing.T) { + accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 1) + sa := accounts[0].Address + ext := mempool.NewDefaultSignerExtractionAdapter() + goodTx := testTx{id: 0, priority: 0, nonce: 0, address: sa} + badTx := &sigErrTx{getSigs: func() ([]txsigning.SignatureV2, error) { + return nil, fmt.Errorf("error") + }} + nonSigVerify := nonVerifiableTx{} + + tests := []struct { + name string + tx sdk.Tx + sea mempool.SignerExtractionAdapter + err error + }{ + {name: "valid tx extracts sigs", tx: goodTx, sea: ext, err: nil}, + {name: "invalid tx fails on sig", tx: badTx, sea: ext, err: fmt.Errorf("err")}, + {name: "non-verifiable tx fails on conversion", tx: nonSigVerify, sea: ext, err: fmt.Errorf("tx of type %T does not implement SigVerifiableTx", nonSigVerify)}, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + sigs, err := test.sea.GetSigners(test.tx) + if test.err != nil { + require.Error(t, err) + return + } + require.NoError(t, err) + require.Equal(t, sigs[0].String(), mempool.SignerData{Signer: sa, Sequence: 0}.String()) + }) + } +} diff --git a/types/mempool/signer_extraction_adapter.go b/types/mempool/signer_extraction_adapter.go new file mode 100644 index 000000000000..10718cb9dddd --- /dev/null +++ b/types/mempool/signer_extraction_adapter.go @@ -0,0 +1,67 @@ +package mempool + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/signing" +) + +// SignerData contains canonical useful information about the signer of a transaction +type SignerData struct { + Signer sdk.AccAddress + Sequence uint64 +} + +// NewSignerData returns a new SignerData instance. +func NewSignerData(signer sdk.AccAddress, sequence uint64) SignerData { + return SignerData{ + Signer: signer, + Sequence: sequence, + } +} + +// String implements the fmt.Stringer interface. +func (s SignerData) String() string { + return fmt.Sprintf("SignerData{Signer: %s, Sequence: %d}", s.Signer, s.Sequence) +} + +// SignerExtractionAdapter is an interface used to determine how the signers of a transaction should be extracted +// from the transaction. +type SignerExtractionAdapter interface { + GetSigners(sdk.Tx) ([]SignerData, error) +} + +var _ SignerExtractionAdapter = DefaultSignerExtractionAdapter{} + +// DefaultSignerExtractionAdapter is the default implementation of SignerExtractionAdapter. It extracts the signers +// from a cosmos-sdk tx via GetSignaturesV2. +type DefaultSignerExtractionAdapter struct{} + +// NewDefaultSignerExtractionAdapter constructs a new DefaultSignerExtractionAdapter instance +func NewDefaultSignerExtractionAdapter() DefaultSignerExtractionAdapter { + return DefaultSignerExtractionAdapter{} +} + +// GetSigners implements the Adapter interface +func (DefaultSignerExtractionAdapter) GetSigners(tx sdk.Tx) ([]SignerData, error) { + sigTx, ok := tx.(signing.SigVerifiableTx) + if !ok { + return nil, fmt.Errorf("tx of type %T does not implement SigVerifiableTx", tx) + } + + sigs, err := sigTx.GetSignaturesV2() + if err != nil { + return nil, err + } + + signers := make([]SignerData, len(sigs)) + for i, sig := range sigs { + signers[i] = NewSignerData( + sig.PubKey.Address().Bytes(), + sig.Sequence, + ) + } + + return signers, nil +} diff --git a/types/module/configurator.go b/types/module/configurator.go index 3024ce1801cd..970f868b3697 100644 --- a/types/module/configurator.go +++ b/types/module/configurator.go @@ -3,13 +3,14 @@ package module import ( "fmt" - cosmosmsg "cosmossdk.io/api/cosmos/msg/v1" - errorsmod "cosmossdk.io/errors" "github.com/cosmos/gogoproto/grpc" googlegrpc "google.golang.org/grpc" protobuf "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" + cosmosmsg "cosmossdk.io/api/cosmos/msg/v1" + errorsmod "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" diff --git a/types/module/core_module.go b/types/module/core_module.go index d4330ecb5e45..c02943e99c04 100644 --- a/types/module/core_module.go +++ b/types/module/core_module.go @@ -3,12 +3,12 @@ package module import ( "encoding/json" - "cosmossdk.io/core/appmodule" - "cosmossdk.io/core/genesis" abci "github.com/cometbft/cometbft/abci/types" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/core/genesis" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/client" @@ -18,27 +18,33 @@ import ( ) var ( - _ AppModuleBasic = coreAppModuleBasicAdapator{} - _ HasGenesis = coreAppModuleBasicAdapator{} - _ HasServices = coreAppModuleBasicAdapator{} + _ appmodule.AppModule = coreAppModuleBasicAdaptor{} + + _ AppModuleBasic = coreAppModuleBasicAdaptor{} + _ HasABCIGenesis = coreAppModuleBasicAdaptor{} + _ HasServices = coreAppModuleBasicAdaptor{} ) -// CoreAppModuleBasicAdaptor wraps the core API module as an AppModule that this version -// of the SDK can use. -func CoreAppModuleBasicAdaptor(name string, module appmodule.AppModule) AppModuleBasic { - return coreAppModuleBasicAdapator{ +// CoreAppModuleAdaptor wraps the core API module as an AppModule that this version of the SDK can use. +func CoreAppModuleAdaptor(name string, module appmodule.AppModule) AppModule { + return coreAppModuleBasicAdaptor{ name: name, module: module, } } -type coreAppModuleBasicAdapator struct { +// CoreAppModuleBasicAdaptor wraps the core API module as an AppModule that this version of the SDK can use. +func CoreAppModuleBasicAdaptor(name string, module appmodule.AppModule) AppModule { + return CoreAppModuleAdaptor(name, module) +} + +type coreAppModuleBasicAdaptor struct { name string module appmodule.AppModule } // DefaultGenesis implements HasGenesis -func (c coreAppModuleBasicAdapator) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { +func (c coreAppModuleBasicAdaptor) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { if mod, ok := c.module.(appmodule.HasGenesis); ok { target := genesis.RawJSONTarget{} err := mod.DefaultGenesis(target.Target()) @@ -62,7 +68,7 @@ func (c coreAppModuleBasicAdapator) DefaultGenesis(cdc codec.JSONCodec) json.Raw } // ValidateGenesis implements HasGenesis -func (c coreAppModuleBasicAdapator) ValidateGenesis(cdc codec.JSONCodec, txConfig client.TxEncodingConfig, bz json.RawMessage) error { +func (c coreAppModuleBasicAdaptor) ValidateGenesis(cdc codec.JSONCodec, txConfig client.TxEncodingConfig, bz json.RawMessage) error { if mod, ok := c.module.(appmodule.HasGenesis); ok { source, err := genesis.SourceFromRawJSON(bz) if err != nil { @@ -82,7 +88,7 @@ func (c coreAppModuleBasicAdapator) ValidateGenesis(cdc codec.JSONCodec, txConfi } // ExportGenesis implements HasGenesis -func (c coreAppModuleBasicAdapator) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { +func (c coreAppModuleBasicAdaptor) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { if module, ok := c.module.(appmodule.HasGenesis); ok { ctx := ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) // avoid race conditions target := genesis.RawJSONTarget{} @@ -103,11 +109,15 @@ func (c coreAppModuleBasicAdapator) ExportGenesis(ctx sdk.Context, cdc codec.JSO return mod.ExportGenesis(ctx, cdc) } + if mod, ok := c.module.(HasABCIGenesis); ok { + return mod.ExportGenesis(ctx, cdc) + } + return nil } // InitGenesis implements HasGenesis -func (c coreAppModuleBasicAdapator) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, bz json.RawMessage) []abci.ValidatorUpdate { +func (c coreAppModuleBasicAdaptor) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, bz json.RawMessage) []abci.ValidatorUpdate { if module, ok := c.module.(appmodule.HasGenesis); ok { // core API genesis source, err := genesis.SourceFromRawJSON(bz) @@ -122,19 +132,22 @@ func (c coreAppModuleBasicAdapator) InitGenesis(ctx sdk.Context, cdc codec.JSONC } if mod, ok := c.module.(HasGenesis); ok { + mod.InitGenesis(ctx, cdc, bz) + return nil + } + if mod, ok := c.module.(HasABCIGenesis); ok { return mod.InitGenesis(ctx, cdc, bz) } - return nil } // Name implements AppModuleBasic -func (c coreAppModuleBasicAdapator) Name() string { +func (c coreAppModuleBasicAdaptor) Name() string { return c.name } // GetQueryCmd implements AppModuleBasic -func (c coreAppModuleBasicAdapator) GetQueryCmd() *cobra.Command { +func (c coreAppModuleBasicAdaptor) GetQueryCmd() *cobra.Command { if mod, ok := c.module.(interface { GetQueryCmd() *cobra.Command }); ok { @@ -145,7 +158,7 @@ func (c coreAppModuleBasicAdapator) GetQueryCmd() *cobra.Command { } // GetTxCmd implements AppModuleBasic -func (c coreAppModuleBasicAdapator) GetTxCmd() *cobra.Command { +func (c coreAppModuleBasicAdaptor) GetTxCmd() *cobra.Command { if mod, ok := c.module.(interface { GetTxCmd() *cobra.Command }); ok { @@ -156,7 +169,7 @@ func (c coreAppModuleBasicAdapator) GetTxCmd() *cobra.Command { } // RegisterGRPCGatewayRoutes implements AppModuleBasic -func (c coreAppModuleBasicAdapator) RegisterGRPCGatewayRoutes(ctx client.Context, mux *runtime.ServeMux) { +func (c coreAppModuleBasicAdaptor) RegisterGRPCGatewayRoutes(ctx client.Context, mux *runtime.ServeMux) { if mod, ok := c.module.(interface { RegisterGRPCGatewayRoutes(context client.Context, mux *runtime.ServeMux) }); ok { @@ -165,7 +178,7 @@ func (c coreAppModuleBasicAdapator) RegisterGRPCGatewayRoutes(ctx client.Context } // RegisterInterfaces implements AppModuleBasic -func (c coreAppModuleBasicAdapator) RegisterInterfaces(registry codectypes.InterfaceRegistry) { +func (c coreAppModuleBasicAdaptor) RegisterInterfaces(registry codectypes.InterfaceRegistry) { if mod, ok := c.module.(interface { RegisterInterfaces(registry codectypes.InterfaceRegistry) }); ok { @@ -174,7 +187,7 @@ func (c coreAppModuleBasicAdapator) RegisterInterfaces(registry codectypes.Inter } // RegisterLegacyAminoCodec implements AppModuleBasic -func (c coreAppModuleBasicAdapator) RegisterLegacyAminoCodec(amino *codec.LegacyAmino) { +func (c coreAppModuleBasicAdaptor) RegisterLegacyAminoCodec(amino *codec.LegacyAmino) { if mod, ok := c.module.(interface { RegisterLegacyAminoCodec(amino *codec.LegacyAmino) }); ok { @@ -183,7 +196,7 @@ func (c coreAppModuleBasicAdapator) RegisterLegacyAminoCodec(amino *codec.Legacy } // RegisterServices implements HasServices -func (c coreAppModuleBasicAdapator) RegisterServices(cfg Configurator) { +func (c coreAppModuleBasicAdaptor) RegisterServices(cfg Configurator) { if module, ok := c.module.(appmodule.HasServices); ok { err := module.RegisterServices(cfg) if err != nil { @@ -191,3 +204,7 @@ func (c coreAppModuleBasicAdapator) RegisterServices(cfg Configurator) { } } } + +func (c coreAppModuleBasicAdaptor) IsOnePerModuleType() {} + +func (c coreAppModuleBasicAdaptor) IsAppModule() {} diff --git a/types/module/genesis.go b/types/module/genesis.go deleted file mode 100644 index b0b78bfd7a25..000000000000 --- a/types/module/genesis.go +++ /dev/null @@ -1 +0,0 @@ -package module diff --git a/types/module/mock_appmodule_test.go b/types/module/mock_appmodule_test.go index 486ae24ed067..07c9c6389f51 100644 --- a/types/module/mock_appmodule_test.go +++ b/types/module/mock_appmodule_test.go @@ -14,7 +14,19 @@ type AppModuleWithAllExtensions interface { module.HasGenesis module.HasInvariants module.HasConsensusVersion - module.HasABCIEndblock + module.HasABCIEndBlock + module.HasName +} + +// mocks to be used in module tests. +type AppModuleWithAllExtensionsABCI interface { + module.AppModule + module.HasServices + module.HasABCIGenesis + module.HasInvariants + module.HasConsensusVersion + module.HasABCIEndBlock + module.HasName } // CoreAppModule is solely here for the purpose of generating @@ -27,3 +39,8 @@ type CoreAppModule interface { appmodule.HasPrecommit appmodule.HasPrepareCheckState } + +type CoreAppModuleWithPreBlock interface { + CoreAppModule + appmodule.HasPreBlocker +} diff --git a/types/module/module.go b/types/module/module.go index 9fc87d700900..7eacde76d097 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -2,7 +2,6 @@ Package module contains application module patterns and associated "manager" functionality. The module pattern has been broken down by: - independent module functionality (AppModuleBasic) - - inter-dependent module genesis functionality (AppModuleGenesis) - inter-dependent module simulation functionality (AppModuleSimulation) - inter-dependent module full functionality (AppModule) @@ -21,7 +20,7 @@ have to manually register all of the codecs for all the modules. This basic procedure as well as other basic patterns are handled through the use of BasicManager. -Lastly the interface for genesis functionality (AppModuleGenesis) has been +Lastly the interface for genesis functionality (HasGenesis & HasABCIGenesis) has been separated out from full module functionality (AppModule) so that modules which are only used for genesis can take advantage of the Module patterns without needlessly defining many placeholder functions @@ -35,16 +34,15 @@ import ( "fmt" "sort" - "cosmossdk.io/core/appmodule" - "cosmossdk.io/core/genesis" abci "github.com/cometbft/cometbft/abci/types" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" "golang.org/x/exp/maps" - storetypes "cosmossdk.io/store/types" - + "cosmossdk.io/core/appmodule" + "cosmossdk.io/core/genesis" errorsmod "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -58,11 +56,7 @@ type AppModuleBasic interface { HasName RegisterLegacyAminoCodec(*codec.LegacyAmino) RegisterInterfaces(types.InterfaceRegistry) - - // client functionality RegisterGRPCGatewayRoutes(client.Context, *runtime.ServeMux) - GetTxCmd() *cobra.Command - GetQueryCmd() *cobra.Command } // HasName allows the module to provide its own name for legacy purposes. @@ -164,8 +158,12 @@ func (bm BasicManager) RegisterGRPCGatewayRoutes(clientCtx client.Context, rtr * // AddTxCommands adds all tx commands to the rootTxCmd. func (bm BasicManager) AddTxCommands(rootTxCmd *cobra.Command) { for _, b := range bm { - if cmd := b.GetTxCmd(); cmd != nil { - rootTxCmd.AddCommand(cmd) + if mod, ok := b.(interface { + GetTxCmd() *cobra.Command + }); ok { + if cmd := mod.GetTxCmd(); cmd != nil { + rootTxCmd.AddCommand(cmd) + } } } } @@ -173,20 +171,25 @@ func (bm BasicManager) AddTxCommands(rootTxCmd *cobra.Command) { // AddQueryCommands adds all query commands to the rootQueryCmd. func (bm BasicManager) AddQueryCommands(rootQueryCmd *cobra.Command) { for _, b := range bm { - if cmd := b.GetQueryCmd(); cmd != nil { - rootQueryCmd.AddCommand(cmd) + if mod, ok := b.(interface { + GetQueryCmd() *cobra.Command + }); ok { + if cmd := mod.GetQueryCmd(); cmd != nil { + rootQueryCmd.AddCommand(cmd) + } } } } -// AppModuleGenesis is the standard form for an application module genesis functions -type AppModuleGenesis interface { - AppModuleBasic - HasGenesis -} - // HasGenesis is the extension interface for stateful genesis methods. type HasGenesis interface { + HasGenesisBasics + InitGenesis(sdk.Context, codec.JSONCodec, json.RawMessage) + ExportGenesis(sdk.Context, codec.JSONCodec) json.RawMessage +} + +// HasABCIGenesis is the extension interface for stateful genesis methods which returns validator updates. +type HasABCIGenesis interface { HasGenesisBasics InitGenesis(sdk.Context, codec.JSONCodec, json.RawMessage) []abci.ValidatorUpdate ExportGenesis(sdk.Context, codec.JSONCodec) json.RawMessage @@ -194,7 +197,10 @@ type HasGenesis interface { // AppModule is the form for an application module. Most of // its functionality has been moved to extension interfaces. +// Deprecated: use appmodule.AppModule with a combination of extension interfaes interfaces instead. type AppModule interface { + appmodule.AppModule + AppModuleBasic } @@ -219,11 +225,27 @@ type HasConsensusVersion interface { ConsensusVersion() uint64 } -type HasABCIEndblock interface { +// HasABCIEndblock is a released typo of HasABCIEndBlock. +// Deprecated: use HasABCIEndBlock instead. +type HasABCIEndblock HasABCIEndBlock + +// HasABCIEndBlock is the interface for modules that need to run code at the end of the block. +type HasABCIEndBlock interface { AppModule EndBlock(context.Context) ([]abci.ValidatorUpdate, error) } +var ( + _ appmodule.AppModule = (*GenesisOnlyAppModule)(nil) + _ AppModuleBasic = (*GenesisOnlyAppModule)(nil) +) + +// AppModuleGenesis is the standard form for an application module genesis functions +type AppModuleGenesis interface { + AppModuleBasic + HasABCIGenesis +} + // GenesisOnlyAppModule is an AppModule that only has import/export functionality type GenesisOnlyAppModule struct { AppModuleGenesis @@ -245,29 +267,16 @@ func (GenesisOnlyAppModule) IsAppModule() {} // RegisterInvariants is a placeholder function register no invariants func (GenesisOnlyAppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} -// QuerierRoute returns an empty module querier route -func (GenesisOnlyAppModule) QuerierRoute() string { return "" } - -// RegisterServices registers all services. -func (gam GenesisOnlyAppModule) RegisterServices(Configurator) {} - // ConsensusVersion implements AppModule/ConsensusVersion. func (gam GenesisOnlyAppModule) ConsensusVersion() uint64 { return 1 } -// BeginBlock returns an empty module begin-block -func (gam GenesisOnlyAppModule) BeginBlock(ctx sdk.Context) error { return nil } - -// EndBlock returns an empty module end-block -func (GenesisOnlyAppModule) EndBlock(sdk.Context) ([]abci.ValidatorUpdate, error) { - return []abci.ValidatorUpdate{}, nil -} - // Manager defines a module manager that provides the high level utility for managing and executing // operations for a group of modules type Manager struct { Modules map[string]interface{} // interface{} is used now to support the legacy AppModule as well as new core appmodule.AppModule. OrderInitGenesis []string OrderExportGenesis []string + OrderPreBlockers []string OrderBeginBlockers []string OrderEndBlockers []string OrderPrepareCheckStaters []string @@ -279,15 +288,24 @@ type Manager struct { func NewManager(modules ...AppModule) *Manager { moduleMap := make(map[string]interface{}) modulesStr := make([]string, 0, len(modules)) + preBlockModulesStr := make([]string, 0) for _, module := range modules { + if _, ok := module.(appmodule.AppModule); !ok { + panic(fmt.Sprintf("module %s does not implement appmodule.AppModule", module.Name())) + } + moduleMap[module.Name()] = module modulesStr = append(modulesStr, module.Name()) + if _, ok := module.(appmodule.HasPreBlocker); ok { + preBlockModulesStr = append(preBlockModulesStr, module.Name()) + } } return &Manager{ Modules: moduleMap, OrderInitGenesis: modulesStr, OrderExportGenesis: modulesStr, + OrderPreBlockers: preBlockModulesStr, OrderBeginBlockers: modulesStr, OrderPrepareCheckStaters: modulesStr, OrderPrecommiters: modulesStr, @@ -300,9 +318,13 @@ func NewManager(modules ...AppModule) *Manager { func NewManagerFromMap(moduleMap map[string]appmodule.AppModule) *Manager { simpleModuleMap := make(map[string]interface{}) modulesStr := make([]string, 0, len(simpleModuleMap)) + preBlockModulesStr := make([]string, 0) for name, module := range moduleMap { simpleModuleMap[name] = module modulesStr = append(modulesStr, name) + if _, ok := module.(appmodule.HasPreBlocker); ok { + preBlockModulesStr = append(preBlockModulesStr, name) + } } // Sort the modules by name. Given that we are using a map above we can't guarantee the order. @@ -312,6 +334,7 @@ func NewManagerFromMap(moduleMap map[string]appmodule.AppModule) *Manager { Modules: simpleModuleMap, OrderInitGenesis: modulesStr, OrderExportGenesis: modulesStr, + OrderPreBlockers: preBlockModulesStr, OrderBeginBlockers: modulesStr, OrderEndBlockers: modulesStr, OrderPrecommiters: modulesStr, @@ -327,6 +350,10 @@ func (m *Manager) SetOrderInitGenesis(moduleNames ...string) { return !hasGenesis } + if _, hasABCIGenesis := module.(HasABCIGenesis); hasABCIGenesis { + return !hasABCIGenesis + } + _, hasGenesis := module.(HasGenesis) return !hasGenesis }) @@ -341,12 +368,27 @@ func (m *Manager) SetOrderExportGenesis(moduleNames ...string) { return !hasGenesis } + if _, hasABCIGenesis := module.(HasABCIGenesis); hasABCIGenesis { + return !hasABCIGenesis + } + _, hasGenesis := module.(HasGenesis) return !hasGenesis }) m.OrderExportGenesis = moduleNames } +// SetOrderPreBlockers sets the order of set pre-blocker calls +func (m *Manager) SetOrderPreBlockers(moduleNames ...string) { + m.assertNoForgottenModules("SetOrderPreBlockers", moduleNames, + func(moduleName string) bool { + module := m.Modules[moduleName] + _, hasBlock := module.(appmodule.HasPreBlocker) + return !hasBlock + }) + m.OrderPreBlockers = moduleNames +} + // SetOrderBeginBlockers sets the order of set begin-blocker calls func (m *Manager) SetOrderBeginBlockers(moduleNames ...string) { m.assertNoForgottenModules("SetOrderBeginBlockers", moduleNames, @@ -363,8 +405,12 @@ func (m *Manager) SetOrderEndBlockers(moduleNames ...string) { m.assertNoForgottenModules("SetOrderEndBlockers", moduleNames, func(moduleName string) bool { module := m.Modules[moduleName] - _, hasEndBlock := module.(HasABCIEndblock) - return !hasEndBlock + if _, hasEndBlock := module.(appmodule.HasEndBlocker); hasEndBlock { + return !hasEndBlock + } + + _, hasABCIEndBlock := module.(HasABCIEndBlock) + return !hasABCIEndBlock }) m.OrderEndBlockers = moduleNames } @@ -455,6 +501,9 @@ func (m *Manager) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, genesisData return &abci.ResponseInitChain{}, err } } else if module, ok := mod.(HasGenesis); ok { + ctx.Logger().Debug("running initialization for module", "module", moduleName) + module.InitGenesis(ctx, cdc, genesisData[moduleName]) + } else if module, ok := mod.(HasABCIGenesis); ok { ctx.Logger().Debug("running initialization for module", "module", moduleName) moduleValUpdates := module.InitGenesis(ctx, cdc, genesisData[moduleName]) @@ -528,6 +577,12 @@ func (m *Manager) ExportGenesisForModules(ctx sdk.Context, cdc codec.JSONCodec, ctx := ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) // avoid race conditions ch <- genesisResult{module.ExportGenesis(ctx, cdc), nil} }(module, channels[moduleName]) + } else if module, ok := mod.(HasABCIGenesis); ok { + channels[moduleName] = make(chan genesisResult) + go func(module HasABCIGenesis, ch chan genesisResult) { + ctx := ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) // avoid race conditions + ch <- genesisResult{module.ExportGenesis(ctx, cdc), nil} + }(module, channels[moduleName]) } } @@ -535,7 +590,7 @@ func (m *Manager) ExportGenesisForModules(ctx sdk.Context, cdc codec.JSONCodec, for moduleName := range channels { res := <-channels[moduleName] if res.err != nil { - return nil, res.err + return nil, fmt.Errorf("genesis export error in %s: %w", moduleName, res.err) } genesisData[moduleName] = res.bz @@ -555,9 +610,9 @@ func (m *Manager) checkModulesExists(moduleName []string) error { return nil } -// assertNoForgottenModules checks that we didn't forget any modules in the -// SetOrder* functions. -// `pass` is a closure which allows one to omit modules from `moduleNames`. If you provide non-nil `pass` and it returns true, the module would not be subject of the assertion. +// assertNoForgottenModules checks that we didn't forget any modules in the SetOrder* functions. +// `pass` is a closure which allows one to omit modules from `moduleNames`. +// If you provide non-nil `pass` and it returns true, the module would not be subject of the assertion. func (m *Manager) assertNoForgottenModules(setOrderFnName string, moduleNames []string, pass func(moduleName string) bool) { ms := make(map[string]bool) for _, m := range moduleNames { @@ -674,6 +729,9 @@ func (m Manager) RunMigrations(ctx context.Context, cfg Configurator, fromVM Ver } else { sdkCtx.Logger().Info(fmt.Sprintf("adding a new module: %s", moduleName)) if module, ok := m.Modules[moduleName].(HasGenesis); ok { + module.InitGenesis(sdkCtx, c.cdc, module.DefaultGenesis(c.cdc)) + } + if module, ok := m.Modules[moduleName].(HasABCIGenesis); ok { moduleValUpdates := module.InitGenesis(sdkCtx, c.cdc, module.DefaultGenesis(c.cdc)) // The module manager assumes only one module will update the // validator set, and it can't be a new module. @@ -689,16 +747,35 @@ func (m Manager) RunMigrations(ctx context.Context, cfg Configurator, fromVM Ver return updatedVM, nil } +// PreBlock performs begin block functionality for upgrade module. +// It takes the current context as a parameter and returns a boolean value +// indicating whether the migration was successfully executed or not. +func (m *Manager) PreBlock(ctx sdk.Context) (*sdk.ResponsePreBlock, error) { + paramsChanged := false + for _, moduleName := range m.OrderPreBlockers { + if module, ok := m.Modules[moduleName].(appmodule.HasPreBlocker); ok { + rsp, err := module.PreBlock(ctx) + if err != nil { + return nil, err + } + if rsp.IsConsensusParamsChanged() { + paramsChanged = true + } + } + } + return &sdk.ResponsePreBlock{ + ConsensusParamsChanged: paramsChanged, + }, nil +} + // BeginBlock performs begin block functionality for all modules. It creates a // child context with an event manager to aggregate events emitted from all // modules. func (m *Manager) BeginBlock(ctx sdk.Context) (sdk.BeginBlock, error) { ctx = ctx.WithEventManager(sdk.NewEventManager()) - for _, moduleName := range m.OrderBeginBlockers { if module, ok := m.Modules[moduleName].(appmodule.HasBeginBlocker); ok { - err := module.BeginBlock(ctx) - if err != nil { + if err := module.BeginBlock(ctx); err != nil { return sdk.BeginBlock{}, err } } @@ -722,7 +799,7 @@ func (m *Manager) EndBlock(ctx sdk.Context) (sdk.EndBlock, error) { if err != nil { return sdk.EndBlock{}, err } - } else if module, ok := m.Modules[moduleName].(HasABCIEndblock); ok { + } else if module, ok := m.Modules[moduleName].(HasABCIEndBlock); ok { moduleValUpdates, err := module.EndBlock(ctx) if err != nil { return sdk.EndBlock{}, err diff --git a/types/module/module_test.go b/types/module/module_test.go index 48769cd325e7..660af10449b8 100644 --- a/types/module/module_test.go +++ b/types/module/module_test.go @@ -7,8 +7,6 @@ import ( "io" "testing" - "cosmossdk.io/core/appmodule" - "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/golang/mock/gomock" @@ -16,6 +14,9 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/grpc" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/log" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil/mock" @@ -26,6 +27,12 @@ import ( var errFoo = errors.New("dummy") +func (MockCoreAppModule) GetQueryCmd() *cobra.Command { + return &cobra.Command{ + Use: "foo", + } +} + func TestBasicManager(t *testing.T) { mockCtrl := gomock.NewController(t) t.Cleanup(mockCtrl.Finish) @@ -51,8 +58,6 @@ func TestBasicManager(t *testing.T) { mockAppModuleBasic1.EXPECT().ValidateGenesis(gomock.Eq(cdc), gomock.Eq(nil), gomock.Eq(expDefaultGenesis["mockAppModuleBasic1"])).AnyTimes().Return(nil) mockAppModuleBasic1.EXPECT().RegisterLegacyAminoCodec(gomock.Eq(legacyAmino)).Times(1) mockAppModuleBasic1.EXPECT().RegisterInterfaces(gomock.Eq(interfaceRegistry)).Times(1) - mockAppModuleBasic1.EXPECT().GetTxCmd().Times(1).Return(nil) - mockAppModuleBasic1.EXPECT().GetQueryCmd().Times(1).Return(nil) // mock core API module mockCoreAppModule2 := mock.NewMockCoreAppModule(mockCtrl) @@ -81,29 +86,17 @@ func TestBasicManager(t *testing.T) { mockCmd := &cobra.Command{Use: "root"} mm.AddTxCommands(mockCmd) - mm.AddQueryCommands(mockCmd) + require.Equal(t, 1, len(mockCmd.Commands())) // validate genesis returns nil require.Nil(t, module.NewBasicManager().ValidateGenesis(cdc, nil, expDefaultGenesis)) } -func TestGenesisOnlyAppModule(t *testing.T) { - mockCtrl := gomock.NewController(t) - t.Cleanup(mockCtrl.Finish) - - mockModule := mock.NewMockAppModuleGenesis(mockCtrl) - mockInvariantRegistry := mock.NewMockInvariantRegistry(mockCtrl) - goam := module.NewGenesisOnlyAppModule(mockModule) - - // no-op - goam.RegisterInvariants(mockInvariantRegistry) -} - func TestAssertNoForgottenModules(t *testing.T) { mockCtrl := gomock.NewController(t) t.Cleanup(mockCtrl.Finish) - mockAppModule1 := mock.NewMockHasABCIEndblock(mockCtrl) + mockAppModule1 := mock.NewMockHasABCIEndBlock(mockCtrl) mockAppModule3 := mock.NewMockCoreAppModule(mockCtrl) mockAppModule1.EXPECT().Name().Times(2).Return("module1") @@ -151,6 +144,10 @@ func TestManagerOrderSetters(t *testing.T) { mm.SetOrderExportGenesis("module2", "module1", "module3") require.Equal(t, []string{"module2", "module1", "module3"}, mm.OrderExportGenesis) + require.Equal(t, []string{}, mm.OrderPreBlockers) + mm.SetOrderPreBlockers("module2", "module1", "module3") + require.Equal(t, []string{"module2", "module1", "module3"}, mm.OrderPreBlockers) + require.Equal(t, []string{"module1", "module2", "module3"}, mm.OrderBeginBlockers) mm.SetOrderBeginBlockers("module2", "module1", "module3") require.Equal(t, []string{"module2", "module1", "module3"}, mm.OrderBeginBlockers) @@ -225,7 +222,7 @@ func TestManager_InitGenesis(t *testing.T) { mockAppModule2 := mock.NewMockAppModuleWithAllExtensions(mockCtrl) mockAppModule3 := mock.NewMockCoreAppModule(mockCtrl) mockAppModule1.EXPECT().Name().Times(2).Return("module1") - mockAppModule2.EXPECT().Name().Times(2).Return("module2") + mockAppModule2.EXPECT().Name().Times(4).Return("module2") mm := module.NewManager(mockAppModule1, mockAppModule2, module.CoreAppModuleBasicAdaptor("module3", mockAppModule3)) require.NotNil(t, mm) require.Equal(t, 3, len(mm.Modules)) @@ -236,7 +233,7 @@ func TestManager_InitGenesis(t *testing.T) { genesisData := map[string]json.RawMessage{"module1": json.RawMessage(`{"key": "value"}`)} // this should panic since the validator set is empty even after init genesis - mockAppModule1.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(cdc), gomock.Eq(genesisData["module1"])).Times(1).Return(nil) + mockAppModule1.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(cdc), gomock.Eq(genesisData["module1"])).Times(1) _, err := mm.InitGenesis(ctx, cdc, genesisData) require.ErrorContains(t, err, "validator set is empty after InitGenesis") @@ -247,17 +244,24 @@ func TestManager_InitGenesis(t *testing.T) { "module3": json.RawMessage(`{"key": "value"}`), } + mockAppModuleABCI1 := mock.NewMockAppModuleWithAllExtensionsABCI(mockCtrl) + mockAppModuleABCI2 := mock.NewMockAppModuleWithAllExtensionsABCI(mockCtrl) + mockAppModuleABCI1.EXPECT().Name().Times(4).Return("module1") + mockAppModuleABCI2.EXPECT().Name().Times(2).Return("module2") + mmABCI := module.NewManager(mockAppModuleABCI1, mockAppModuleABCI2) // panic because more than one module returns validator set updates - mockAppModule1.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(cdc), gomock.Eq(genesisData["module1"])).Times(1).Return([]abci.ValidatorUpdate{{}}) - mockAppModule2.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(cdc), gomock.Eq(genesisData["module2"])).Times(1).Return([]abci.ValidatorUpdate{{}}) - _, err = mm.InitGenesis(ctx, cdc, genesisData) + mockAppModuleABCI1.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(cdc), gomock.Eq(genesisData["module1"])).Times(1).Return([]abci.ValidatorUpdate{{}}) + mockAppModuleABCI2.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(cdc), gomock.Eq(genesisData["module2"])).Times(1).Return([]abci.ValidatorUpdate{{}}) + _, err = mmABCI.InitGenesis(ctx, cdc, genesisData) require.ErrorContains(t, err, "validator InitGenesis updates already set by a previous module") // happy path - mockAppModule1.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(cdc), gomock.Eq(genesisData["module1"])).Times(1).Return([]abci.ValidatorUpdate{{}}) - mockAppModule2.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(cdc), gomock.Eq(genesisData["module2"])).Times(1).Return([]abci.ValidatorUpdate{}) + + mm2 := module.NewManager(mockAppModuleABCI1, mockAppModule2, module.CoreAppModuleBasicAdaptor("module3", mockAppModule3)) + mockAppModuleABCI1.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(cdc), gomock.Eq(genesisData["module1"])).Times(1).Return([]abci.ValidatorUpdate{{}}) + mockAppModule2.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(cdc), gomock.Eq(genesisData["module2"])).Times(1) mockAppModule3.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Any()).Times(1).Return(nil) - _, err = mm.InitGenesis(ctx, cdc, genesisData) + _, err = mm2.InitGenesis(ctx, cdc, genesisData) require.NoError(t, err) } @@ -312,8 +316,8 @@ func TestManager_EndBlock(t *testing.T) { mockCtrl := gomock.NewController(t) t.Cleanup(mockCtrl.Finish) - mockAppModule1 := mock.NewMockHasABCIEndblock(mockCtrl) - mockAppModule2 := mock.NewMockHasABCIEndblock(mockCtrl) + mockAppModule1 := mock.NewMockHasABCIEndBlock(mockCtrl) + mockAppModule2 := mock.NewMockHasABCIEndBlock(mockCtrl) mockAppModule3 := mock.NewMockAppModule(mockCtrl) mockAppModule1.EXPECT().Name().Times(2).Return("module1") mockAppModule2.EXPECT().Name().Times(2).Return("module2") @@ -440,6 +444,10 @@ func TestCoreAPIManagerOrderSetters(t *testing.T) { mm.SetOrderExportGenesis("module2", "module1", "module3") require.Equal(t, []string{"module2", "module1", "module3"}, mm.OrderExportGenesis) + require.Equal(t, []string{}, mm.OrderPreBlockers) + mm.SetOrderPreBlockers("module2", "module1", "module3") + require.Equal(t, []string{"module2", "module1", "module3"}, mm.OrderPreBlockers) + require.Equal(t, []string{"module1", "module2", "module3"}, mm.OrderBeginBlockers) mm.SetOrderBeginBlockers("module2", "module1", "module3") require.Equal(t, []string{"module2", "module1", "module3"}, mm.OrderBeginBlockers) @@ -457,6 +465,40 @@ func TestCoreAPIManagerOrderSetters(t *testing.T) { require.Equal(t, []string{"module3", "module2", "module1"}, mm.OrderPrecommiters) } +func TestCoreAPIManager_PreBlock(t *testing.T) { + mockCtrl := gomock.NewController(t) + t.Cleanup(mockCtrl.Finish) + + mockAppModule1 := mock.NewMockCoreAppModuleWithPreBlock(mockCtrl) + mm := module.NewManagerFromMap(map[string]appmodule.AppModule{ + "module1": mockAppModule1, + "module2": mock.NewMockCoreAppModule(mockCtrl), + }) + require.NotNil(t, mm) + require.Equal(t, 2, len(mm.Modules)) + require.Equal(t, 1, len(mm.OrderPreBlockers)) + + mockAppModule1.EXPECT().PreBlock(gomock.Any()).Times(1).Return(&sdk.ResponsePreBlock{ + ConsensusParamsChanged: true, + }, nil) + res, err := mm.PreBlock(sdk.Context{}) + require.NoError(t, err) + require.True(t, res.ConsensusParamsChanged) + + // test false + mockAppModule1.EXPECT().PreBlock(gomock.Any()).Times(1).Return(&sdk.ResponsePreBlock{ + ConsensusParamsChanged: false, + }, nil) + res, err = mm.PreBlock(sdk.Context{}) + require.NoError(t, err) + require.False(t, res.ConsensusParamsChanged) + + // test error + mockAppModule1.EXPECT().PreBlock(gomock.Any()).Times(1).Return(nil, errors.New("some error")) + _, err = mm.PreBlock(sdk.Context{}) + require.EqualError(t, err, "some error") +} + func TestCoreAPIManager_BeginBlock(t *testing.T) { mockCtrl := gomock.NewController(t) t.Cleanup(mockCtrl.Finish) diff --git a/types/module/simulation.go b/types/module/simulation.go index 79ac42c99d3a..657bbfa2c2eb 100644 --- a/types/module/simulation.go +++ b/types/module/simulation.go @@ -7,6 +7,7 @@ import ( "time" sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/types/simulation" diff --git a/types/msgservice/validate.go b/types/msgservice/validate.go index 77f85193a810..49a183eb89ad 100644 --- a/types/msgservice/validate.go +++ b/types/msgservice/validate.go @@ -9,7 +9,6 @@ import ( "google.golang.org/protobuf/reflect/protoregistry" msg "cosmossdk.io/api/cosmos/msg/v1" - "cosmossdk.io/x/tx/signing" ) diff --git a/types/query/collections_pagination.go b/types/query/collections_pagination.go index 4ef389038dc6..9f6be9168cdc 100644 --- a/types/query/collections_pagination.go +++ b/types/query/collections_pagination.go @@ -35,24 +35,40 @@ type Collection[K, V any] interface { KeyCodec() collcodec.KeyCodec[K] } -// CollectionPaginate follows the same behavior as Paginate but works on a Collection. -func CollectionPaginate[K, V any, C Collection[K, V]]( +// CollectionPaginate follows the same logic as Paginate but for collection types. +// transformFunc is used to transform the result to a different type. +func CollectionPaginate[K, V any, C Collection[K, V], T any]( ctx context.Context, coll C, pageReq *PageRequest, -) ([]collections.KeyValue[K, V], *PageResponse, error) { - return CollectionFilteredPaginate[K, V](ctx, coll, pageReq, nil) + transformFunc func(key K, value V) (T, error), + opts ...func(opt *CollectionsPaginateOptions[K]), +) ([]T, *PageResponse, error) { + return CollectionFilteredPaginate( + ctx, + coll, + pageReq, + nil, + transformFunc, + opts..., + ) } -// CollectionFilteredPaginate works in the same way as FilteredPaginate but for collection types. +// CollectionFilteredPaginate works in the same way as CollectionPaginate but allows to filter +// results using a predicateFunc. // A nil predicateFunc means no filtering is applied and results are collected as is. -func CollectionFilteredPaginate[K, V any, C Collection[K, V]]( +// TransformFunc is applied only to results which are in range of the pagination and allow +// to convert the result to a different type. +// NOTE: do not collect results using the values/keys passed to predicateFunc as they are not +// guaranteed to be in the pagination range requested. +func CollectionFilteredPaginate[K, V any, C Collection[K, V], T any]( ctx context.Context, coll C, pageReq *PageRequest, predicateFunc func(key K, value V) (include bool, err error), + transformFunc func(key K, value V) (T, error), opts ...func(opt *CollectionsPaginateOptions[K]), -) ([]collections.KeyValue[K, V], *PageResponse, error) { +) (results []T, pageRes *PageResponse, err error) { pageReq = initPageRequestDefaults(pageReq) offset := pageReq.Offset @@ -65,12 +81,6 @@ func CollectionFilteredPaginate[K, V any, C Collection[K, V]]( return nil, nil, fmt.Errorf("invalid request, either offset or key is expected, got both") } - var ( - results []collections.KeyValue[K, V] - pageRes *PageResponse - err error - ) - opt := new(CollectionsPaginateOptions[K]) for _, o := range opts { o(opt) @@ -85,9 +95,9 @@ func CollectionFilteredPaginate[K, V any, C Collection[K, V]]( } if len(key) != 0 { - results, pageRes, err = collFilteredPaginateByKey(ctx, coll, prefix, key, reverse, limit, predicateFunc) + results, pageRes, err = collFilteredPaginateByKey(ctx, coll, prefix, key, reverse, limit, predicateFunc, transformFunc) } else { - results, pageRes, err = collFilteredPaginateNoKey(ctx, coll, prefix, reverse, offset, limit, countTotal, predicateFunc) + results, pageRes, err = collFilteredPaginateNoKey(ctx, coll, prefix, reverse, offset, limit, countTotal, predicateFunc, transformFunc) } // invalid iter error is ignored to retain Paginate behavior if errors.Is(err, collections.ErrInvalidIterator) { @@ -102,7 +112,7 @@ func CollectionFilteredPaginate[K, V any, C Collection[K, V]]( // collFilteredPaginateNoKey applies the provided pagination on the collection when the starting key is not set. // If predicateFunc is nil no filtering is applied. -func collFilteredPaginateNoKey[K, V any, C Collection[K, V]]( +func collFilteredPaginateNoKey[K, V any, C Collection[K, V], T any]( ctx context.Context, coll C, prefix []byte, @@ -111,7 +121,8 @@ func collFilteredPaginateNoKey[K, V any, C Collection[K, V]]( limit uint64, countTotal bool, predicateFunc func(K, V) (bool, error), -) ([]collections.KeyValue[K, V], *PageResponse, error) { + transformFunc func(K, V) (T, error), +) ([]T, *PageResponse, error) { iterator, err := getCollIter[K, V](ctx, coll, prefix, nil, reverse) if err != nil { return nil, nil, err @@ -125,7 +136,7 @@ func collFilteredPaginateNoKey[K, V any, C Collection[K, V]]( var ( count uint64 nextKey []byte - results []collections.KeyValue[K, V] + results []T ) for ; iterator.Valid(); iterator.Next() { @@ -138,7 +149,13 @@ func collFilteredPaginateNoKey[K, V any, C Collection[K, V]]( } // if no predicate function is specified then we just include the result if predicateFunc == nil { - results = append(results, kv) + transformed, err := transformFunc(kv.Key, kv.Value) + if err != nil { + return nil, nil, err + } + results = append(results, transformed) + count++ + // if predicate function is defined we check if the result matches the filtering criteria } else { include, err := predicateFunc(kv.Key, kv.Value) @@ -146,10 +163,14 @@ func collFilteredPaginateNoKey[K, V any, C Collection[K, V]]( return nil, nil, err } if include { - results = append(results, kv) + transformed, err := transformFunc(kv.Key, kv.Value) + if err != nil { + return nil, nil, err + } + results = append(results, transformed) + count++ } } - count++ // second case, we found all the objects specified within the limit case count == limit: key, err := iterator.Key() @@ -172,12 +193,31 @@ func collFilteredPaginateNoKey[K, V any, C Collection[K, V]]( // but we need to count how many possible results exist in total. // so we keep increasing the count until the iterator is fully consumed. case count > limit: - count++ + if predicateFunc == nil { + count++ + + // if predicate function is defined we check if the result matches the filtering criteria + } else { + kv, err := iterator.KeyValue() + if err != nil { + return nil, nil, err + } + + include, err := predicateFunc(kv.Key, kv.Value) + if err != nil { + return nil, nil, err + } + if include { + count++ + } + } } } + resp := &PageResponse{ NextKey: nextKey, } + if countTotal { resp.Total = count + offset } @@ -200,15 +240,16 @@ func advanceIter[I interface { // collFilteredPaginateByKey paginates a collection when a starting key // is provided in the PageRequest. Predicate is applied only if not nil. -func collFilteredPaginateByKey[K, V any, C Collection[K, V]]( +func collFilteredPaginateByKey[K, V any, C Collection[K, V], T any]( ctx context.Context, coll C, prefix []byte, key []byte, reverse bool, limit uint64, - predicateFunc func(K, V) (bool, error), -) ([]collections.KeyValue[K, V], *PageResponse, error) { + predicateFunc func(key K, value V) (bool, error), + transformFunc func(key K, value V) (transformed T, err error), +) (results []T, pageRes *PageResponse, err error) { iterator, err := getCollIter[K, V](ctx, coll, prefix, key, reverse) if err != nil { return nil, nil, err @@ -218,7 +259,6 @@ func collFilteredPaginateByKey[K, V any, C Collection[K, V]]( var ( count uint64 nextKey []byte - results []collections.KeyValue[K, V] ) for ; iterator.Valid(); iterator.Next() { @@ -243,7 +283,11 @@ func collFilteredPaginateByKey[K, V any, C Collection[K, V]]( } // if no predicate is specified then we just append the result if predicateFunc == nil { - results = append(results, kv) + transformed, err := transformFunc(kv.Key, kv.Value) + if err != nil { + return nil, nil, err + } + results = append(results, transformed) // if predicate is applied we execute the predicate function // and append only if predicateFunc yields true. } else { @@ -252,7 +296,11 @@ func collFilteredPaginateByKey[K, V any, C Collection[K, V]]( return nil, nil, err } if include { - results = append(results, kv) + transformed, err := transformFunc(kv.Key, kv.Value) + if err != nil { + return nil, nil, err + } + results = append(results, transformed) } } count++ @@ -273,11 +321,11 @@ func encodeCollKey[K, V any, C Collection[K, V]](coll C, key K) ([]byte, error) func getCollIter[K, V any, C Collection[K, V]](ctx context.Context, coll C, prefix, start []byte, reverse bool) (collections.Iterator[K, V], error) { // TODO: maybe can be simplified if reverse { - var end []byte - if prefix != nil { - start = storetypes.PrefixEndBytes(append(prefix, start...)) - end = prefix - } + // if we are in reverse mode, we need to increase the start key + // to include the start key in the iteration. + start = storetypes.PrefixEndBytes(append(prefix, start...)) + end := prefix + return coll.IterateRaw(ctx, end, start, collections.OrderDescending) } var end []byte diff --git a/types/query/collections_pagination_test.go b/types/query/collections_pagination_test.go index ebce41a4f22e..4467355ca263 100644 --- a/types/query/collections_pagination_test.go +++ b/types/query/collections_pagination_test.go @@ -4,10 +4,11 @@ import ( "context" "testing" - "cosmossdk.io/collections" - "cosmossdk.io/core/store" db "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require" + + "cosmossdk.io/collections" + "cosmossdk.io/core/store" ) func TestCollectionPagination(t *testing.T) { @@ -82,6 +83,16 @@ func TestCollectionPagination(t *testing.T) { }, expResults: createResults(299, 200), }, + "with key and reverse": { + req: &PageRequest{ + Key: encodeKey(199), + Reverse: true, + }, + expResp: &PageResponse{ + NextKey: encodeKey(99), + }, + expResults: createResults(199, 100), + }, "with offset and count total": { req: &PageRequest{ Offset: 50, @@ -99,7 +110,7 @@ func TestCollectionPagination(t *testing.T) { Limit: 3, }, expResp: &PageResponse{ - NextKey: encodeKey(3), + NextKey: encodeKey(5), }, filter: func(key, value uint64) (bool, error) { return key%2 == 0, nil @@ -107,6 +118,7 @@ func TestCollectionPagination(t *testing.T) { expResults: []collections.KeyValue[uint64, uint64]{ {Key: 0, Value: 0}, {Key: 2, Value: 2}, + {Key: 4, Value: 4}, }, }, "filtered with key": { @@ -130,7 +142,15 @@ func TestCollectionPagination(t *testing.T) { for name, tc := range tcs { tc := tc t.Run(name, func(t *testing.T) { - gotResults, gotResponse, err := CollectionFilteredPaginate(ctx, m, tc.req, tc.filter) + gotResults, gotResponse, err := CollectionFilteredPaginate( + ctx, + m, + tc.req, + tc.filter, + func(key, value uint64) (collections.KeyValue[uint64, uint64], error) { + return collections.KeyValue[uint64, uint64]{Key: key, Value: value}, nil + }, + ) if tc.wantErr != nil { require.ErrorIs(t, err, tc.wantErr) return diff --git a/types/query/filtered_pagination.go b/types/query/filtered_pagination.go index b5730693c25a..af2d2dd176e4 100644 --- a/types/query/filtered_pagination.go +++ b/types/query/filtered_pagination.go @@ -3,9 +3,10 @@ package query import ( "fmt" - "cosmossdk.io/store/types" proto "github.com/cosmos/gogoproto/proto" + "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" ) diff --git a/types/query/fuzz_test.go b/types/query/fuzz_test.go index 2082e6e2a7fa..8df5f1a0201a 100644 --- a/types/query/fuzz_test.go +++ b/types/query/fuzz_test.go @@ -4,9 +4,9 @@ import ( "fmt" "testing" - "cosmossdk.io/math" fuzz "github.com/google/gofuzz" + "cosmossdk.io/math" "cosmossdk.io/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/types/query/pagination_test.go b/types/query/pagination_test.go index 7f3c5d846103..13fbe98efa8a 100644 --- a/types/query/pagination_test.go +++ b/types/query/pagination_test.go @@ -5,12 +5,12 @@ import ( "fmt" "testing" - "cosmossdk.io/depinject" - "cosmossdk.io/log" - "cosmossdk.io/math" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/suite" + "cosmossdk.io/depinject" + "cosmossdk.io/log" + "cosmossdk.io/math" "cosmossdk.io/store/prefix" "github.com/cosmos/cosmos-sdk/baseapp" diff --git a/types/result.go b/types/result.go index 46ff994f8295..ea3d491025fa 100644 --- a/types/result.go +++ b/types/result.go @@ -6,11 +6,10 @@ import ( "strings" abci "github.com/cometbft/cometbft/abci/types" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" coretypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/cosmos/gogoproto/proto" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" - "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" ) diff --git a/types/result_test.go b/types/result_test.go index 210e85370b4b..5911bda5b972 100644 --- a/types/result_test.go +++ b/types/result_test.go @@ -8,13 +8,13 @@ import ( "time" abci "github.com/cometbft/cometbft/abci/types" + cmtt "github.com/cometbft/cometbft/proto/tendermint/types" coretypes "github.com/cometbft/cometbft/rpc/core/types" + cmt "github.com/cometbft/cometbft/types" "github.com/golang/protobuf/proto" //nolint:staticcheck // grpc-gateway uses deprecated golang/protobuf "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - cmtt "github.com/cometbft/cometbft/proto/tendermint/types" - cmt "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/types/simulation/collections_test.go b/types/simulation/collections_test.go index 8c2e2f6cf88d..3f94910d2eb9 100644 --- a/types/simulation/collections_test.go +++ b/types/simulation/collections_test.go @@ -3,10 +3,12 @@ package simulation import ( "testing" + "github.com/stretchr/testify/require" + "cosmossdk.io/collections" "cosmossdk.io/collections/colltest" + "github.com/cosmos/cosmos-sdk/types/kv" - "github.com/stretchr/testify/require" ) func TestNewStoreDecoderFuncFromCollectionsSchema(t *testing.T) { diff --git a/types/simulation/config.go b/types/simulation/config.go index 7f520004d478..4ed9530a92bc 100644 --- a/types/simulation/config.go +++ b/types/simulation/config.go @@ -22,5 +22,6 @@ type Config struct { OnOperation bool // run slow invariants every operation AllInvariants bool // print all failed invariants if a broken invariant is found - DBBackend string // custom db backend type + DBBackend string // custom db backend type + BlockMaxGas int64 // custom max gas for block } diff --git a/types/simulation/rand_util.go b/types/simulation/rand_util.go index 0f8fa11e432b..adacd90ad436 100644 --- a/types/simulation/rand_util.go +++ b/types/simulation/rand_util.go @@ -7,7 +7,7 @@ import ( "time" "unsafe" - sdkmath "cosmossdk.io/math" + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -42,19 +42,19 @@ func RandStringOfLength(r *rand.Rand, n int) string { } // RandPositiveInt get a rand positive math.Int -func RandPositiveInt(r *rand.Rand, max sdkmath.Int) (sdkmath.Int, error) { - if !max.GTE(sdkmath.OneInt()) { - return sdkmath.Int{}, errors.New("max too small") +func RandPositiveInt(r *rand.Rand, max math.Int) (math.Int, error) { + if !max.GTE(math.OneInt()) { + return math.Int{}, errors.New("max too small") } - max = max.Sub(sdkmath.OneInt()) + max = max.Sub(math.OneInt()) - return sdkmath.NewIntFromBigInt(new(big.Int).Rand(r, max.BigInt())).Add(sdkmath.OneInt()), nil + return math.NewIntFromBigInt(new(big.Int).Rand(r, max.BigInt())).Add(math.OneInt()), nil } // RandomAmount generates a random amount // Note: The range of RandomAmount includes max, and is, in fact, biased to return max as well as 0. -func RandomAmount(r *rand.Rand, max sdkmath.Int) sdkmath.Int { +func RandomAmount(r *rand.Rand, max math.Int) math.Int { randInt := big.NewInt(0) switch r.Intn(10) { @@ -66,12 +66,12 @@ func RandomAmount(r *rand.Rand, max sdkmath.Int) sdkmath.Int { randInt = big.NewInt(0).Rand(r, max.BigInt()) // up to max - 1 } - return sdkmath.NewIntFromBigInt(randInt) + return math.NewIntFromBigInt(randInt) } // RandomDecAmount generates a random decimal amount // Note: The range of RandomDecAmount includes max, and is, in fact, biased to return max as well as 0. -func RandomDecAmount(r *rand.Rand, max sdkmath.LegacyDec) sdkmath.LegacyDec { +func RandomDecAmount(r *rand.Rand, max math.LegacyDec) math.LegacyDec { randInt := big.NewInt(0) switch r.Intn(10) { @@ -83,7 +83,7 @@ func RandomDecAmount(r *rand.Rand, max sdkmath.LegacyDec) sdkmath.LegacyDec { randInt = big.NewInt(0).Rand(r, max.BigInt()) } - return sdkmath.LegacyNewDecFromBigIntWithPrec(randInt, sdkmath.LegacyPrecision) + return math.LegacyNewDecFromBigIntWithPrec(randInt, math.LegacyPrecision) } // RandTimestamp generates a random timestamp diff --git a/types/staking_test.go b/types/staking_test.go index fe6c36bd991b..4a68df6b619f 100644 --- a/types/staking_test.go +++ b/types/staking_test.go @@ -5,6 +5,8 @@ import ( "github.com/stretchr/testify/suite" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -21,6 +23,6 @@ func (s *stakingTestSuite) SetupSuite() { } func (s *stakingTestSuite) TestTokensToConsensusPower() { - s.Require().Equal(int64(0), sdk.TokensToConsensusPower(sdk.NewInt(999_999), sdk.DefaultPowerReduction)) - s.Require().Equal(int64(1), sdk.TokensToConsensusPower(sdk.NewInt(1_000_000), sdk.DefaultPowerReduction)) + s.Require().Equal(int64(0), sdk.TokensToConsensusPower(math.NewInt(999_999), sdk.DefaultPowerReduction)) + s.Require().Equal(int64(1), sdk.TokensToConsensusPower(math.NewInt(1_000_000), sdk.DefaultPowerReduction)) } diff --git a/types/tx/direct_aux.go b/types/tx/direct_aux.go index 73189ff840c5..de6346fbf03c 100644 --- a/types/tx/direct_aux.go +++ b/types/tx/direct_aux.go @@ -17,12 +17,6 @@ func (s *SignDocDirectAux) ValidateBasic() error { return sdkerrors.ErrInvalidPubKey.Wrap("public key cannot be empty") } - if s.Tip != nil { - if s.Tip.Tipper == "" { - return sdkerrors.ErrInvalidRequest.Wrap("tipper cannot be empty") - } - } - return nil } diff --git a/types/tx/direct_aux_test.go b/types/tx/direct_aux_test.go index 5f8c7aefc335..f9e90b8e27e7 100644 --- a/types/tx/direct_aux_test.go +++ b/types/tx/direct_aux_test.go @@ -14,7 +14,7 @@ import ( func TestSignDocDirectAux(t *testing.T) { bodyBz := []byte{42} - _, pk, addr := testdata.KeyTestPubAddr() + _, pk, _ := testdata.KeyTestPubAddr() pkAny, err := codectypes.NewAnyWithValue(pk) require.NoError(t, err) @@ -25,12 +25,10 @@ func TestSignDocDirectAux(t *testing.T) { }{ {"empty bodyBz", tx.SignDocDirectAux{}, true}, {"empty pubkey", tx.SignDocDirectAux{BodyBytes: bodyBz}, true}, - {"empty tipper", tx.SignDocDirectAux{BodyBytes: bodyBz, PublicKey: pkAny, Tip: &tx.Tip{Amount: testdata.NewTestFeeAmount()}}, true}, {"happy case w/o tip", tx.SignDocDirectAux{BodyBytes: bodyBz, PublicKey: pkAny}, false}, {"happy case w/ tip", tx.SignDocDirectAux{ BodyBytes: bodyBz, PublicKey: pkAny, - Tip: &tx.Tip{Tipper: addr.String(), Amount: testdata.NewTestFeeAmount()}, }, false}, } diff --git a/types/tx/signing/signing.pb.go b/types/tx/signing/signing.pb.go index 54beb1b1fbf7..6266b113ec9c 100644 --- a/types/tx/signing/signing.pb.go +++ b/types/tx/signing/signing.pb.go @@ -43,14 +43,13 @@ const ( SignMode_SIGN_MODE_DIRECT SignMode = 1 // SIGN_MODE_TEXTUAL is a future signing mode that will verify some // human-readable textual representation on top of the binary representation - // from SIGN_MODE_DIRECT. It is currently experimental, and should be used - // for testing purposes only, until Textual is fully released. Please follow - // the tracking issue https://github.com/cosmos/cosmos-sdk/issues/11970. + // from SIGN_MODE_DIRECT. + // + // Since: cosmos-sdk 0.50 SignMode_SIGN_MODE_TEXTUAL SignMode = 2 // SIGN_MODE_DIRECT_AUX specifies a signing mode which uses // SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not - // require signers signing over other signers' `signer_info`. It also allows - // for adding Tips in transactions. + // require signers signing over other signers' `signer_info`. // // Since: cosmos-sdk 0.46 SignMode_SIGN_MODE_DIRECT_AUX SignMode = 3 diff --git a/types/tx/tips.go b/types/tx/tips.go deleted file mode 100644 index ca8afb36d5ae..000000000000 --- a/types/tx/tips.go +++ /dev/null @@ -1,11 +0,0 @@ -package tx - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// TipTx defines the interface to be implemented by Txs that handle Tips. -type TipTx interface { - sdk.FeeTx - GetTip() *Tip -} diff --git a/types/tx/tx.pb.go b/types/tx/tx.pb.go index 6782890cc9e4..8173108d3904 100644 --- a/types/tx/tx.pb.go +++ b/types/tx/tx.pb.go @@ -264,13 +264,8 @@ type SignDocDirectAux struct { AccountNumber uint64 `protobuf:"varint,4,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` // sequence is the sequence number of the signing account. Sequence uint64 `protobuf:"varint,5,opt,name=sequence,proto3" json:"sequence,omitempty"` - // Tip is the optional tip used for transactions fees paid in another denom. - // It should be left empty if the signer is not the tipper for this - // transaction. - // - // This field is ignored if the chain didn't enable tips, i.e. didn't add the - // `TipDecorator` in its posthandler. - Tip *Tip `protobuf:"bytes,6,opt,name=tip,proto3" json:"tip,omitempty"` + // tips have been depreacted and should not be used + Tip *Tip `protobuf:"bytes,6,opt,name=tip,proto3" json:"tip,omitempty"` // Deprecated: Do not use. } func (m *SignDocDirectAux) Reset() { *m = SignDocDirectAux{} } @@ -341,6 +336,7 @@ func (m *SignDocDirectAux) GetSequence() uint64 { return 0 } +// Deprecated: Do not use. func (m *SignDocDirectAux) GetTip() *Tip { if m != nil { return m.Tip @@ -462,7 +458,7 @@ type AuthInfo struct { // `TipDecorator` in its posthandler. // // Since: cosmos-sdk 0.46 - Tip *Tip `protobuf:"bytes,3,opt,name=tip,proto3" json:"tip,omitempty"` + Tip *Tip `protobuf:"bytes,3,opt,name=tip,proto3" json:"tip,omitempty"` // Deprecated: Do not use. } func (m *AuthInfo) Reset() { *m = AuthInfo{} } @@ -512,6 +508,7 @@ func (m *AuthInfo) GetFee() *Fee { return nil } +// Deprecated: Do not use. func (m *AuthInfo) GetTip() *Tip { if m != nil { return m.Tip @@ -866,6 +863,8 @@ func (m *Fee) GetGranter() string { // Tip is the tip used for meta-transactions. // // Since: cosmos-sdk 0.46 +// +// Deprecated: Do not use. type Tip struct { // amount is the amount of the tip Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` @@ -1021,73 +1020,74 @@ func init() { func init() { proto.RegisterFile("cosmos/tx/v1beta1/tx.proto", fileDescriptor_96d1575ffde80842) } var fileDescriptor_96d1575ffde80842 = []byte{ - // 1052 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0x41, 0x6f, 0x1b, 0xc5, - 0x17, 0xf7, 0x7a, 0x6d, 0xc7, 0x7e, 0x4d, 0xda, 0x64, 0x14, 0xfd, 0xe5, 0x38, 0xaa, 0x9b, 0xbf, - 0xab, 0x82, 0x55, 0x29, 0xbb, 0x6d, 0x7a, 0xa0, 0x20, 0x04, 0xd8, 0x0d, 0x51, 0xaa, 0x52, 0x90, - 0x36, 0x39, 0xf5, 0xb2, 0x1a, 0xaf, 0x27, 0xeb, 0x51, 0xbd, 0x33, 0xcb, 0xce, 0x2c, 0x78, 0x8f, - 0x7c, 0x00, 0xa4, 0x0a, 0x09, 0x21, 0x71, 0xe2, 0x88, 0x38, 0x55, 0x88, 0x0f, 0xd1, 0x13, 0xaa, - 0x38, 0x71, 0x82, 0x2a, 0x39, 0xf4, 0xc6, 0x57, 0x00, 0xcd, 0xec, 0xec, 0x26, 0x2d, 0xa9, 0x0d, - 0x02, 0x89, 0x8b, 0x3d, 0xf3, 0xf6, 0xf7, 0xde, 0xfc, 0xe6, 0xbd, 0xdf, 0xbc, 0x07, 0x9d, 0x80, - 0x8b, 0x88, 0x0b, 0x57, 0xce, 0xdc, 0x4f, 0x6e, 0x8e, 0x88, 0xc4, 0x37, 0x5d, 0x39, 0x73, 0xe2, - 0x84, 0x4b, 0x8e, 0xd6, 0xf2, 0x6f, 0x8e, 0x9c, 0x39, 0xe6, 0x5b, 0x67, 0x0d, 0x47, 0x94, 0x71, - 0x57, 0xff, 0xe6, 0xa8, 0xce, 0x7a, 0xc8, 0x43, 0xae, 0x97, 0xae, 0x5a, 0x19, 0xeb, 0xb6, 0x89, - 0x1b, 0x24, 0x59, 0x2c, 0xb9, 0x1b, 0xa5, 0x53, 0x49, 0x05, 0x0d, 0xcb, 0x43, 0x0a, 0x83, 0x81, - 0x77, 0x0d, 0x7c, 0x84, 0x05, 0x29, 0x31, 0x01, 0xa7, 0xcc, 0x7c, 0x7f, 0xfd, 0x94, 0xa6, 0xa0, - 0x21, 0xa3, 0xec, 0x34, 0x92, 0xd9, 0x1b, 0xe0, 0x46, 0xc8, 0x79, 0x38, 0x25, 0xae, 0xde, 0x8d, - 0xd2, 0x23, 0x17, 0xb3, 0xac, 0xf8, 0x94, 0xc7, 0xf0, 0x73, 0xae, 0xe6, 0x6e, 0x7a, 0xd3, 0xfb, - 0xdc, 0x82, 0xea, 0xe1, 0x0c, 0x6d, 0x43, 0x6d, 0xc4, 0xc7, 0x59, 0xdb, 0xda, 0xb2, 0xfa, 0x17, - 0x76, 0x36, 0x9c, 0x3f, 0xdd, 0xdf, 0x39, 0x9c, 0x0d, 0xf9, 0x38, 0xf3, 0x34, 0x0c, 0xdd, 0x86, - 0x16, 0x4e, 0xe5, 0xc4, 0xa7, 0xec, 0x88, 0xb7, 0xab, 0xda, 0x67, 0xf3, 0x1c, 0x9f, 0x41, 0x2a, - 0x27, 0x77, 0xd9, 0x11, 0xf7, 0x9a, 0xd8, 0xac, 0x50, 0x17, 0x40, 0xd1, 0xc6, 0x32, 0x4d, 0x88, - 0x68, 0xdb, 0x5b, 0x76, 0x7f, 0xd9, 0x3b, 0x63, 0xe9, 0x31, 0xa8, 0x1f, 0xce, 0x3c, 0xfc, 0x29, - 0xba, 0x0c, 0xa0, 0x8e, 0xf2, 0x47, 0x99, 0x24, 0x42, 0xf3, 0x5a, 0xf6, 0x5a, 0xca, 0x32, 0x54, - 0x06, 0xf4, 0x1a, 0x5c, 0x2a, 0x19, 0x18, 0x4c, 0x55, 0x63, 0x56, 0x8a, 0xa3, 0x72, 0xdc, 0xa2, - 0xf3, 0xbe, 0xb0, 0x60, 0xe9, 0x80, 0x86, 0x6c, 0x97, 0x07, 0xff, 0xd6, 0x91, 0x1b, 0xd0, 0x0c, - 0x26, 0x98, 0x32, 0x9f, 0x8e, 0xdb, 0xf6, 0x96, 0xd5, 0x6f, 0x79, 0x4b, 0x7a, 0x7f, 0x77, 0x8c, - 0xae, 0xc1, 0x45, 0x1c, 0x04, 0x3c, 0x65, 0xd2, 0x67, 0x69, 0x34, 0x22, 0x49, 0xbb, 0xb6, 0x65, - 0xf5, 0x6b, 0xde, 0x8a, 0xb1, 0x7e, 0xa8, 0x8d, 0xbd, 0xdf, 0x2c, 0x58, 0x35, 0xa4, 0x76, 0x69, - 0x42, 0x02, 0x39, 0x48, 0x67, 0x8b, 0xd8, 0xdd, 0x02, 0x88, 0xd3, 0xd1, 0x94, 0x06, 0xfe, 0x43, - 0x92, 0x99, 0x9a, 0xac, 0x3b, 0xb9, 0x26, 0x9c, 0x42, 0x13, 0xce, 0x80, 0x65, 0x5e, 0x2b, 0xc7, - 0xdd, 0x23, 0xd9, 0x3f, 0xa7, 0x8a, 0x3a, 0xd0, 0x14, 0xe4, 0xe3, 0x94, 0xb0, 0x80, 0xb4, 0xeb, - 0x1a, 0x50, 0xee, 0x51, 0x1f, 0x6c, 0x49, 0xe3, 0x76, 0x43, 0x73, 0xf9, 0xdf, 0x79, 0x9a, 0xa2, - 0xb1, 0xa7, 0x20, 0xbd, 0x2f, 0xab, 0xd0, 0xc8, 0x05, 0x86, 0x6e, 0x40, 0x33, 0x22, 0x42, 0xe0, - 0x50, 0x5f, 0xd2, 0x7e, 0xe5, 0x2d, 0x4a, 0x14, 0x42, 0x50, 0x8b, 0x48, 0x94, 0xeb, 0xb0, 0xe5, - 0xe9, 0xb5, 0x62, 0x2f, 0x69, 0x44, 0x78, 0x2a, 0xfd, 0x09, 0xa1, 0xe1, 0x44, 0xea, 0xeb, 0xd5, - 0xbc, 0x15, 0x63, 0xdd, 0xd7, 0x46, 0x34, 0x84, 0x35, 0x32, 0x93, 0x84, 0x09, 0xca, 0x99, 0xcf, - 0x63, 0x49, 0x39, 0x13, 0xed, 0xdf, 0x97, 0xe6, 0x1c, 0xbb, 0x5a, 0xe2, 0x3f, 0xca, 0xe1, 0xe8, - 0x01, 0x74, 0x19, 0x67, 0x7e, 0x90, 0x50, 0x49, 0x03, 0x3c, 0xf5, 0xcf, 0x09, 0x78, 0x69, 0x4e, - 0xc0, 0x4d, 0xc6, 0xd9, 0x1d, 0xe3, 0xfb, 0xfe, 0x4b, 0xb1, 0x7b, 0xdf, 0x58, 0xd0, 0x2c, 0x1e, - 0x11, 0x7a, 0x0f, 0x96, 0x95, 0x70, 0x49, 0xa2, 0x15, 0x58, 0x64, 0xe7, 0xf2, 0x39, 0x79, 0x3d, - 0xd0, 0x30, 0xfd, 0xf2, 0x2e, 0x88, 0x72, 0x2d, 0x54, 0x41, 0x8e, 0x08, 0x31, 0xe2, 0x38, 0xaf, - 0x20, 0x7b, 0x84, 0x78, 0x0a, 0x52, 0x94, 0xce, 0x5e, 0x5c, 0xba, 0xaf, 0x2c, 0x80, 0xd3, 0xf3, - 0x5e, 0x92, 0xa1, 0xf5, 0xd7, 0x64, 0x78, 0x1b, 0x5a, 0x11, 0x1f, 0x93, 0x45, 0xed, 0xe4, 0x3e, - 0x1f, 0x93, 0xbc, 0x9d, 0x44, 0x66, 0xf5, 0x82, 0xfc, 0xec, 0x17, 0xe5, 0xd7, 0x7b, 0x56, 0x85, - 0x66, 0xe1, 0x82, 0xde, 0x86, 0x86, 0xa0, 0x2c, 0x9c, 0x12, 0xc3, 0xa9, 0x37, 0x27, 0xbe, 0x73, - 0xa0, 0x91, 0xfb, 0x15, 0xcf, 0xf8, 0xa0, 0x37, 0xa1, 0xae, 0xdb, 0xb6, 0x21, 0xf7, 0xff, 0x79, - 0xce, 0xf7, 0x15, 0x70, 0xbf, 0xe2, 0xe5, 0x1e, 0x9d, 0x01, 0x34, 0xf2, 0x70, 0xe8, 0x0d, 0xa8, - 0x29, 0xde, 0x9a, 0xc0, 0xc5, 0x9d, 0xab, 0x67, 0x62, 0x14, 0x8d, 0xfc, 0x6c, 0xfd, 0x54, 0x3c, - 0x4f, 0x3b, 0x74, 0x1e, 0x59, 0x50, 0xd7, 0x51, 0xd1, 0x3d, 0x68, 0x8e, 0xa8, 0xc4, 0x49, 0x82, - 0x8b, 0xdc, 0xba, 0x45, 0x98, 0x7c, 0xdc, 0x38, 0xe5, 0x74, 0x29, 0x62, 0xdd, 0xe1, 0x51, 0x8c, - 0x03, 0x39, 0xa4, 0x72, 0xa0, 0xdc, 0xbc, 0x32, 0x00, 0x7a, 0x0b, 0xa0, 0xcc, 0xba, 0x6a, 0x65, - 0xf6, 0xa2, 0xb4, 0xb7, 0x8a, 0xb4, 0x8b, 0x61, 0x1d, 0x6c, 0x91, 0x46, 0xbd, 0xcf, 0xaa, 0x60, - 0xef, 0x11, 0x82, 0x32, 0x68, 0xe0, 0x48, 0x75, 0x05, 0x23, 0xca, 0x72, 0x80, 0xa8, 0xa9, 0x76, - 0x86, 0x0a, 0x65, 0xc3, 0xbd, 0x27, 0xbf, 0x5c, 0xa9, 0x7c, 0xf7, 0xeb, 0x95, 0x7e, 0x48, 0xe5, - 0x24, 0x1d, 0x39, 0x01, 0x8f, 0xdc, 0x62, 0x62, 0xea, 0xbf, 0x6d, 0x31, 0x7e, 0xe8, 0xca, 0x2c, - 0x26, 0x42, 0x3b, 0x88, 0xaf, 0x9f, 0x3f, 0xbe, 0xbe, 0x3c, 0x25, 0x21, 0x0e, 0x32, 0x5f, 0xcd, - 0x45, 0xf1, 0xed, 0xf3, 0xc7, 0xd7, 0x2d, 0xcf, 0x1c, 0x88, 0x36, 0xa1, 0x15, 0x62, 0xe1, 0x4f, - 0x69, 0x44, 0xa5, 0x2e, 0x4f, 0xcd, 0x6b, 0x86, 0x58, 0x7c, 0xa0, 0xf6, 0xc8, 0x81, 0x7a, 0x8c, - 0x33, 0x92, 0xe4, 0xcd, 0x6d, 0xd8, 0xfe, 0xe9, 0x87, 0xed, 0x75, 0xc3, 0x6c, 0x30, 0x1e, 0x27, - 0x44, 0x88, 0x03, 0x99, 0x50, 0x16, 0x7a, 0x39, 0x0c, 0xed, 0xc0, 0x52, 0x98, 0x60, 0x26, 0x4d, - 0xb7, 0x9b, 0xe7, 0x51, 0x00, 0x7b, 0xdf, 0x5b, 0x60, 0x1f, 0xd2, 0xf8, 0xbf, 0xcc, 0xc1, 0x0d, - 0x68, 0x48, 0x1a, 0xc7, 0x24, 0xc9, 0x7b, 0xe0, 0x1c, 0xd6, 0x06, 0xd7, 0xfb, 0xd1, 0x82, 0x95, - 0x41, 0x3a, 0xcb, 0x1f, 0xee, 0x2e, 0x96, 0x58, 0x5d, 0x1d, 0xe7, 0x50, 0xad, 0xac, 0xb9, 0x57, - 0x37, 0x40, 0xf4, 0x0e, 0x34, 0x95, 0x74, 0xfd, 0x31, 0x0f, 0xcc, 0xcb, 0xb8, 0xfa, 0x8a, 0x6e, - 0x74, 0x76, 0x92, 0x79, 0x4b, 0xc2, 0x0c, 0xdc, 0xe2, 0x45, 0xd8, 0x7f, 0xf3, 0x45, 0xa0, 0x55, - 0xb0, 0x05, 0x0d, 0x75, 0x8d, 0x96, 0x3d, 0xb5, 0x1c, 0xbe, 0xfb, 0xe4, 0xb8, 0x6b, 0x3d, 0x3d, - 0xee, 0x5a, 0xcf, 0x8e, 0xbb, 0xd6, 0xa3, 0x93, 0x6e, 0xe5, 0xe9, 0x49, 0xb7, 0xf2, 0xf3, 0x49, - 0xb7, 0xf2, 0xe0, 0xda, 0xe2, 0x24, 0xbb, 0x72, 0x36, 0x6a, 0xe8, 0xe6, 0x74, 0xeb, 0x8f, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x1f, 0x66, 0x4c, 0xda, 0x17, 0x0a, 0x00, 0x00, + // 1059 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0x41, 0x6f, 0x1b, 0x45, + 0x14, 0xf6, 0x7a, 0x6d, 0xc7, 0x7e, 0x4d, 0xda, 0x64, 0x14, 0x21, 0xc7, 0x51, 0xdd, 0xe0, 0xaa, + 0x60, 0x55, 0x64, 0xb7, 0x4d, 0x0f, 0x94, 0x0a, 0x01, 0x76, 0x43, 0x94, 0xaa, 0x14, 0xa4, 0x4d, + 0x4e, 0xbd, 0xac, 0xc6, 0xeb, 0xc9, 0x7a, 0x54, 0xef, 0xcc, 0xb2, 0x33, 0x0b, 0xde, 0x23, 0x3f, + 0x00, 0xa9, 0x42, 0x42, 0x48, 0x9c, 0x39, 0x20, 0x4e, 0x3d, 0x20, 0x7e, 0x43, 0x4f, 0xa8, 0xe2, + 0xc4, 0x09, 0xaa, 0xe4, 0xd0, 0x3b, 0x7f, 0x00, 0x34, 0xb3, 0xb3, 0x9b, 0xb4, 0xa4, 0x4e, 0x11, + 0x48, 0x5c, 0xec, 0x99, 0xb7, 0xdf, 0x7b, 0xf3, 0xbd, 0x37, 0xdf, 0xbc, 0x07, 0x9d, 0x80, 0x8b, + 0x88, 0x0b, 0x57, 0xce, 0xdc, 0xcf, 0xae, 0x8f, 0x88, 0xc4, 0xd7, 0x5d, 0x39, 0x73, 0xe2, 0x84, + 0x4b, 0x8e, 0x56, 0xf2, 0x6f, 0x8e, 0x9c, 0x39, 0xe6, 0x5b, 0x67, 0x05, 0x47, 0x94, 0x71, 0x57, + 0xff, 0xe6, 0xa8, 0xce, 0x6a, 0xc8, 0x43, 0xae, 0x97, 0xae, 0x5a, 0x19, 0xeb, 0xa6, 0x89, 0x1b, + 0x24, 0x59, 0x2c, 0xb9, 0x1b, 0xa5, 0x53, 0x49, 0x05, 0x0d, 0xcb, 0x43, 0x0a, 0x83, 0x81, 0x77, + 0x0d, 0x7c, 0x84, 0x05, 0x29, 0x31, 0x01, 0xa7, 0xcc, 0x7c, 0x7f, 0xf3, 0x98, 0xa6, 0xa0, 0x21, + 0xa3, 0xec, 0x38, 0x92, 0xd9, 0x1b, 0xe0, 0x5a, 0xc8, 0x79, 0x38, 0x25, 0xae, 0xde, 0x8d, 0xd2, + 0x03, 0x17, 0xb3, 0xac, 0xf8, 0x94, 0xc7, 0xf0, 0x73, 0xae, 0x26, 0x37, 0xbd, 0xe9, 0x7d, 0x69, + 0x41, 0x75, 0x7f, 0x86, 0x36, 0xa1, 0x36, 0xe2, 0xe3, 0xac, 0x6d, 0x6d, 0x58, 0xfd, 0x73, 0x5b, + 0x6b, 0xce, 0xdf, 0xf2, 0x77, 0xf6, 0x67, 0x43, 0x3e, 0xce, 0x3c, 0x0d, 0x43, 0x37, 0xa1, 0x85, + 0x53, 0x39, 0xf1, 0x29, 0x3b, 0xe0, 0xed, 0xaa, 0xf6, 0x59, 0x3f, 0xc5, 0x67, 0x90, 0xca, 0xc9, + 0x1d, 0x76, 0xc0, 0xbd, 0x26, 0x36, 0x2b, 0xd4, 0x05, 0x50, 0xb4, 0xb1, 0x4c, 0x13, 0x22, 0xda, + 0xf6, 0x86, 0xdd, 0x5f, 0xf4, 0x4e, 0x58, 0x7a, 0x0c, 0xea, 0xfb, 0x33, 0x0f, 0x7f, 0x8e, 0x2e, + 0x02, 0xa8, 0xa3, 0xfc, 0x51, 0x26, 0x89, 0xd0, 0xbc, 0x16, 0xbd, 0x96, 0xb2, 0x0c, 0x95, 0x01, + 0xbd, 0x01, 0x17, 0x4a, 0x06, 0x06, 0x53, 0xd5, 0x98, 0xa5, 0xe2, 0xa8, 0x1c, 0x77, 0xd6, 0x79, + 0x5f, 0x59, 0xb0, 0xb0, 0x47, 0x43, 0xb6, 0xcd, 0x83, 0xff, 0xea, 0xc8, 0x35, 0x68, 0x06, 0x13, + 0x4c, 0x99, 0x4f, 0xc7, 0x6d, 0x7b, 0xc3, 0xea, 0xb7, 0xbc, 0x05, 0xbd, 0xbf, 0x33, 0x46, 0x57, + 0xe0, 0x3c, 0x0e, 0x02, 0x9e, 0x32, 0xe9, 0xb3, 0x34, 0x1a, 0x91, 0xa4, 0x5d, 0xdb, 0xb0, 0xfa, + 0x35, 0x6f, 0xc9, 0x58, 0x3f, 0xd6, 0xc6, 0xde, 0x1f, 0x16, 0x2c, 0x1b, 0x52, 0xdb, 0x34, 0x21, + 0x81, 0x1c, 0xa4, 0xb3, 0xb3, 0xd8, 0xdd, 0x00, 0x88, 0xd3, 0xd1, 0x94, 0x06, 0xfe, 0x03, 0x92, + 0x99, 0x3b, 0x59, 0x75, 0x72, 0x4d, 0x38, 0x85, 0x26, 0x9c, 0x01, 0xcb, 0xbc, 0x56, 0x8e, 0xbb, + 0x4b, 0xb2, 0x7f, 0x4f, 0x15, 0x75, 0xa0, 0x29, 0xc8, 0xa7, 0x29, 0x61, 0x01, 0x69, 0xd7, 0x35, + 0xa0, 0xdc, 0xa3, 0xb7, 0xc0, 0x96, 0x34, 0x6e, 0x37, 0x34, 0x97, 0xd7, 0x4e, 0xd3, 0x14, 0x8d, + 0x87, 0xd5, 0xb6, 0xe5, 0x29, 0x58, 0xef, 0xeb, 0x2a, 0x34, 0x72, 0x91, 0xa1, 0x6b, 0xd0, 0x8c, + 0x88, 0x10, 0x38, 0xd4, 0x89, 0xda, 0x2f, 0xcd, 0xa4, 0x44, 0x21, 0x04, 0xb5, 0x88, 0x44, 0xb9, + 0x16, 0x5b, 0x9e, 0x5e, 0xab, 0x0c, 0x24, 0x8d, 0x08, 0x4f, 0xa5, 0x3f, 0x21, 0x34, 0x9c, 0x48, + 0x9d, 0x62, 0xcd, 0x5b, 0x32, 0xd6, 0x5d, 0x6d, 0x44, 0x43, 0x58, 0x21, 0x33, 0x49, 0x98, 0xa0, + 0x9c, 0xf9, 0x3c, 0x96, 0x94, 0x33, 0xd1, 0xfe, 0x73, 0x61, 0xce, 0xb1, 0xcb, 0x25, 0xfe, 0x93, + 0x1c, 0x8e, 0xee, 0x43, 0x97, 0x71, 0xe6, 0x07, 0x09, 0x95, 0x34, 0xc0, 0x53, 0xff, 0x94, 0x80, + 0x17, 0xe6, 0x04, 0x5c, 0x67, 0x9c, 0xdd, 0x36, 0xbe, 0x1f, 0xbe, 0x10, 0xbb, 0xf7, 0x9d, 0x05, + 0xcd, 0xe2, 0x21, 0xa1, 0x0f, 0x60, 0x51, 0x89, 0x97, 0x24, 0x5a, 0x85, 0x45, 0x75, 0x2e, 0x9e, + 0x52, 0xdb, 0x3d, 0x0d, 0xd3, 0xaf, 0xef, 0x9c, 0x28, 0xd7, 0x02, 0xf5, 0xc1, 0x3e, 0x20, 0xc4, + 0x08, 0xe4, 0xb4, 0x4b, 0xd9, 0x21, 0xc4, 0x53, 0x90, 0xe2, 0xfa, 0xec, 0x57, 0xbb, 0xbe, 0x6f, + 0x2c, 0x80, 0xe3, 0x33, 0x5f, 0x90, 0xa3, 0xf5, 0x6a, 0x72, 0xbc, 0x09, 0xad, 0x88, 0x8f, 0xc9, + 0x59, 0x6d, 0xe5, 0x1e, 0x1f, 0x93, 0xbc, 0xad, 0x44, 0x66, 0xf5, 0x9c, 0x0c, 0xed, 0xe7, 0x65, + 0xd8, 0x7b, 0x5a, 0x85, 0x66, 0xe1, 0x82, 0xde, 0x85, 0x86, 0xa0, 0x2c, 0x9c, 0x12, 0xc3, 0xa9, + 0x37, 0x27, 0xbe, 0xb3, 0xa7, 0x91, 0xbb, 0x15, 0xcf, 0xf8, 0xa0, 0x77, 0xa0, 0xae, 0xdb, 0xb7, + 0x21, 0xf7, 0xfa, 0x3c, 0xe7, 0x7b, 0x0a, 0xb8, 0x5b, 0xf1, 0x72, 0x8f, 0xce, 0x00, 0x1a, 0x79, + 0x38, 0xf4, 0x36, 0xd4, 0x14, 0x6f, 0x4d, 0xe0, 0xfc, 0xd6, 0xe5, 0x13, 0x31, 0x8a, 0x86, 0x7e, + 0xf2, 0x0e, 0x55, 0x3c, 0x4f, 0x3b, 0x74, 0x1e, 0x5a, 0x50, 0xd7, 0x51, 0xd1, 0x5d, 0x68, 0x8e, + 0xa8, 0xc4, 0x49, 0x82, 0x8b, 0xda, 0xba, 0x45, 0x98, 0x7c, 0xec, 0x38, 0xe5, 0x94, 0x29, 0x62, + 0xdd, 0xe6, 0x51, 0x8c, 0x03, 0x39, 0xa4, 0x72, 0xa0, 0xdc, 0xbc, 0x32, 0x00, 0xba, 0x05, 0x50, + 0x56, 0x5d, 0xb5, 0x34, 0xfb, 0xac, 0xb2, 0xb7, 0x8a, 0xb2, 0x8b, 0x61, 0x1d, 0x6c, 0x91, 0x46, + 0xbd, 0x2f, 0xaa, 0x60, 0xef, 0x10, 0x82, 0x32, 0x68, 0xe0, 0x48, 0x75, 0x07, 0x23, 0xcc, 0x72, + 0x90, 0xa8, 0xe9, 0x76, 0x82, 0x0a, 0x65, 0xc3, 0x9d, 0xc7, 0xbf, 0x5d, 0xaa, 0xfc, 0xf0, 0xfb, + 0xa5, 0x7e, 0x48, 0xe5, 0x24, 0x1d, 0x39, 0x01, 0x8f, 0xdc, 0x62, 0x72, 0xea, 0xbf, 0x4d, 0x31, + 0x7e, 0xe0, 0xca, 0x2c, 0x26, 0x42, 0x3b, 0x88, 0x6f, 0x9f, 0x3d, 0xba, 0xba, 0x38, 0x25, 0x21, + 0x0e, 0x32, 0x5f, 0xcd, 0x47, 0xf1, 0xfd, 0xb3, 0x47, 0x57, 0x2d, 0xcf, 0x1c, 0x88, 0xd6, 0xa1, + 0x15, 0x62, 0xe1, 0x4f, 0x69, 0x44, 0xa5, 0xbe, 0x9e, 0x9a, 0xd7, 0x0c, 0xb1, 0xf8, 0x48, 0xed, + 0x91, 0x03, 0xf5, 0x18, 0x67, 0x24, 0xc9, 0x9b, 0xdc, 0xb0, 0xfd, 0xcb, 0x8f, 0x9b, 0xab, 0x86, + 0xd9, 0x60, 0x3c, 0x4e, 0x88, 0x10, 0x7b, 0x32, 0xa1, 0x2c, 0xf4, 0x72, 0x18, 0xda, 0x82, 0x85, + 0x30, 0xc1, 0x4c, 0x9a, 0xae, 0x37, 0xcf, 0xa3, 0x00, 0xf6, 0x7e, 0xb2, 0xc0, 0xde, 0xa7, 0xf1, + 0xff, 0x59, 0x83, 0x6b, 0xd0, 0x90, 0x34, 0x8e, 0x49, 0x92, 0xf7, 0xc1, 0x39, 0xac, 0x0d, 0xee, + 0x56, 0xb5, 0x6d, 0xf5, 0x7e, 0xb6, 0x60, 0x69, 0x90, 0xce, 0xf2, 0xc7, 0xbb, 0x8d, 0x25, 0x56, + 0xe9, 0xe3, 0x1c, 0xae, 0xd5, 0x35, 0x37, 0x7d, 0x03, 0x44, 0xef, 0x41, 0x53, 0xc9, 0xd7, 0x1f, + 0xf3, 0xc0, 0xbc, 0x8e, 0xcb, 0x2f, 0xe9, 0x4a, 0x27, 0xa7, 0x9a, 0xb7, 0x20, 0xcc, 0xf0, 0x2d, + 0x5e, 0x85, 0xfd, 0x0f, 0x5f, 0x05, 0x5a, 0x06, 0x5b, 0xd0, 0x50, 0xdf, 0xd3, 0xa2, 0xa7, 0x96, + 0xc3, 0xf7, 0x1f, 0x1f, 0x76, 0xad, 0x27, 0x87, 0x5d, 0xeb, 0xe9, 0x61, 0xd7, 0x7a, 0x78, 0xd4, + 0xad, 0x3c, 0x39, 0xea, 0x56, 0x7e, 0x3d, 0xea, 0x56, 0xee, 0x5f, 0x39, 0xbb, 0xd0, 0xae, 0x9c, + 0x8d, 0x1a, 0xba, 0x41, 0xdd, 0xf8, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x24, 0x52, 0x64, 0xe6, 0x23, + 0x0a, 0x00, 0x00, } func (m *Tx) Marshal() (dAtA []byte, err error) { diff --git a/types/tx/types.go b/types/tx/types.go index 4df21dea7fc5..9e2c5c306688 100644 --- a/types/tx/types.go +++ b/types/tx/types.go @@ -3,9 +3,10 @@ package tx import ( "fmt" - errorsmod "cosmossdk.io/errors" protov2 "google.golang.org/protobuf/proto" + errorsmod "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" @@ -161,10 +162,15 @@ func (t *Tx) FeePayer(cdc codec.Codec) []byte { return signers[0] } -func (t *Tx) FeeGranter() sdk.AccAddress { - feePayer := t.AuthInfo.Fee.Granter - if feePayer != "" { - return sdk.MustAccAddressFromBech32(feePayer) +func (t *Tx) FeeGranter(cdc codec.Codec) []byte { + feeGranter := t.AuthInfo.Fee.Granter + if feeGranter != "" { + feeGranterAddr, err := cdc.InterfaceRegistry().SigningContext().AddressCodec().StringToBytes(feeGranter) + if err != nil { + panic(err) + } + + return feeGranterAddr } return nil } diff --git a/types/tx_msg.go b/types/tx_msg.go index 898a8f6ea6d3..399dafd4cc43 100644 --- a/types/tx_msg.go +++ b/types/tx_msg.go @@ -9,6 +9,7 @@ import ( protov2 "google.golang.org/protobuf/proto" "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" ) @@ -61,7 +62,7 @@ type ( GetGas() uint64 GetFee() Coins FeePayer() []byte - FeeGranter() string + FeeGranter() []byte } // TxWithMemo must have GetMemo() method to use ValidateMemoDecorator @@ -95,13 +96,7 @@ type TxDecoder func(txBytes []byte) (Tx, error) type TxEncoder func(tx Tx) ([]byte, error) // MsgTypeURL returns the TypeURL of a `sdk.Msg`. -func MsgTypeURL(msg proto.Message) string { - if m, ok := msg.(protov2.Message); ok { - return "/" + string(m.ProtoReflect().Descriptor().FullName()) - } - - return "/" + proto.MessageName(msg) -} +var MsgTypeURL = codectypes.MsgTypeURL // GetMsgFromTypeURL returns a `sdk.Msg` message type from a type URL func GetMsgFromTypeURL(cdc codec.Codec, input string) (Msg, error) { diff --git a/types/utils.go b/types/utils.go index 02f022d1d402..b912be36f46a 100644 --- a/types/utils.go +++ b/types/utils.go @@ -16,6 +16,7 @@ import ( // This method can be used to canonicalize JSON to be returned by GetSignBytes, // e.g. for the ledger integration. // If the passed JSON isn't valid it will return an error. +// Deprecated: SortJSON was used for GetSignbytes, this is now automatic with amino signing func SortJSON(toSortJSON []byte) ([]byte, error) { var c interface{} err := json.Unmarshal(toSortJSON, &c) @@ -31,6 +32,7 @@ func SortJSON(toSortJSON []byte) ([]byte, error) { // MustSortJSON is like SortJSON but panic if an error occurs, e.g., if // the passed JSON isn't valid. +// Deprecated: SortJSON was used for GetSignbytes, this is now automatic with amino signing func MustSortJSON(toSortJSON []byte) []byte { js, err := SortJSON(toSortJSON) if err != nil { diff --git a/types/utils_test.go b/types/utils_test.go index 8bdba4082b35..22675a2c5990 100644 --- a/types/utils_test.go +++ b/types/utils_test.go @@ -23,53 +23,6 @@ func (s *utilsTestSuite) SetupSuite() { s.T().Parallel() } -func (s *utilsTestSuite) TestSortJSON() { - cases := []struct { - unsortedJSON string - want string - wantErr bool - }{ - // simple case - { - unsortedJSON: `{"cosmos":"foo", "atom":"bar", "tendermint":"foobar"}`, - want: `{"atom":"bar","cosmos":"foo","tendermint":"foobar"}`, wantErr: false, - }, - // failing case (invalid JSON): - { - unsortedJSON: `"cosmos":"foo",,,, "atom":"bar", "tendermint":"foobar"}`, - want: "", - wantErr: true, - }, - // genesis.json - { - unsortedJSON: `{"consensus_params":{"block_size_params":{"max_bytes":22020096,"max_txs":100000,"max_gas":-1},"tx_size_params":{"max_bytes":10240,"max_gas":-1},"block_gossip_params":{"block_part_size_bytes":65536},"evidence_params":{"max_age":100000}},"validators":[{"pub_key":{"type":"AC26791624DE60","value":"c7UMMAbjFuc5GhGPy0E5q5tefy12p9Tq0imXqdrKXwo="},"power":100,"name":""}],"app_hash":"","genesis_time":"2018-05-11T15:52:25.424795506Z","chain_id":"test-chain-Q6VeoW","app_state":{"accounts":[{"address":"718C9C23F98C9642569742ADDD9F9AB9743FBD5D","coins":[{"denom":"Token","amount":1000},{"denom":"stake","amount":50}]}],"stake":{"pool":{"total_supply":50,"bonded_shares":"0","unbonded_shares":"0","bonded_pool":0,"unbonded_pool":0,"inflation_last_time":0,"inflation":"7/100"},"params":{"inflation_rate_change":"13/100","inflation_max":"1/5","inflation_min":"7/100","goal_bonded":"67/100","max_validators":100,"bond_denom":"stake"},"candidates":null,"bonds":null}}}`, - want: `{"app_hash":"","app_state":{"accounts":[{"address":"718C9C23F98C9642569742ADDD9F9AB9743FBD5D","coins":[{"amount":1000,"denom":"Token"},{"amount":50,"denom":"stake"}]}],"stake":{"bonds":null,"candidates":null,"params":{"bond_denom":"stake","goal_bonded":"67/100","inflation_max":"1/5","inflation_min":"7/100","inflation_rate_change":"13/100","max_validators":100},"pool":{"bonded_pool":0,"bonded_shares":"0","inflation":"7/100","inflation_last_time":0,"total_supply":50,"unbonded_pool":0,"unbonded_shares":"0"}}},"chain_id":"test-chain-Q6VeoW","consensus_params":{"block_gossip_params":{"block_part_size_bytes":65536},"block_size_params":{"max_bytes":22020096,"max_gas":-1,"max_txs":100000},"evidence_params":{"max_age":100000},"tx_size_params":{"max_bytes":10240,"max_gas":-1}},"genesis_time":"2018-05-11T15:52:25.424795506Z","validators":[{"name":"","power":100,"pub_key":{"type":"AC26791624DE60","value":"c7UMMAbjFuc5GhGPy0E5q5tefy12p9Tq0imXqdrKXwo="}}]}`, - wantErr: false, - }, - // from the TXSpec: - { - unsortedJSON: `{"chain_id":"test-chain-1","sequence":1,"fee_bytes":{"amount":[{"amount":5,"denom":"photon"}],"gas":10000},"msg_bytes":{"inputs":[{"address":"696E707574","coins":[{"amount":10,"denom":"atom"}]}],"outputs":[{"address":"6F7574707574","coins":[{"amount":10,"denom":"atom"}]}]},"alt_bytes":null}`, - want: `{"alt_bytes":null,"chain_id":"test-chain-1","fee_bytes":{"amount":[{"amount":5,"denom":"photon"}],"gas":10000},"msg_bytes":{"inputs":[{"address":"696E707574","coins":[{"amount":10,"denom":"atom"}]}],"outputs":[{"address":"6F7574707574","coins":[{"amount":10,"denom":"atom"}]}]},"sequence":1}`, - wantErr: false, - }, - } - - for tcIndex, tc := range cases { - tc := tc - got, err := sdk.SortJSON([]byte(tc.unsortedJSON)) - if tc.wantErr { - s.Require().NotNil(err, "tc #%d", tcIndex) - s.Require().Panics(func() { sdk.MustSortJSON([]byte(tc.unsortedJSON)) }) - } else { - s.Require().Nil(err, "tc #%d, err=%s", tcIndex, err) - s.Require().NotPanics(func() { sdk.MustSortJSON([]byte(tc.unsortedJSON)) }) - s.Require().Equal(got, sdk.MustSortJSON([]byte(tc.unsortedJSON))) - } - - s.Require().Equal(string(got), tc.want) - } -} - func (s *utilsTestSuite) TestTimeFormatAndParse() { cases := []struct { RFC3339NanoStr string diff --git a/version/command.go b/version/command.go index 451173400c22..d52a69668685 100644 --- a/version/command.go +++ b/version/command.go @@ -15,6 +15,11 @@ const ( ) // NewVersionCommand returns a CLI command to interactively print the application binary version information. +// Note: When seeking to add the extra info to the context +// The below can be added to the initRootCmd to include the extraInfo field +// +// cmdContext := context.WithValue(context.Background(), version.ContextKey{}, extraInfo) +// rootCmd.SetContext(cmdContext) func NewVersionCommand() *cobra.Command { cmd := &cobra.Command{ Use: "version", @@ -28,6 +33,9 @@ func NewVersionCommand() *cobra.Command { return nil } + // Extract and set extra information from the context + verInfo.ExtraInfo = extraInfoFromContext(cmd) + var ( bz []byte err error @@ -56,3 +64,14 @@ func NewVersionCommand() *cobra.Command { return cmd } + +func extraInfoFromContext(cmd *cobra.Command) ExtraInfo { + ctx := cmd.Context() + if ctx != nil { + extraInfo, ok := ctx.Value(ContextKey{}).(ExtraInfo) + if ok { + return extraInfo + } + } + return nil +} diff --git a/version/version.go b/version/version.go index a41834e336c2..8f1f040d471c 100644 --- a/version/version.go +++ b/version/version.go @@ -23,6 +23,9 @@ import ( "runtime/debug" ) +// ContextKey is used to store the ExtraInfo in the context. +type ContextKey struct{} + var ( // application's name Name = "" @@ -44,13 +47,20 @@ func getSDKVersion() string { var sdkVersion string for _, dep := range deps.Deps { if dep.Path == "github.com/cosmos/cosmos-sdk" { - sdkVersion = dep.Version + if dep.Replace != nil && dep.Replace.Version != "(devel)" { + sdkVersion = dep.Replace.Version + } else { + sdkVersion = dep.Version + } } } return sdkVersion } +// ExtraInfo contains a set of extra information provided by apps +type ExtraInfo map[string]string + // Info defines the application version information. type Info struct { Name string `json:"name" yaml:"name"` @@ -61,6 +71,7 @@ type Info struct { GoVersion string `json:"go" yaml:"go"` BuildDeps []buildDep `json:"build_deps" yaml:"build_deps"` CosmosSdkVersion string `json:"cosmos_sdk_version" yaml:"cosmos_sdk_version"` + ExtraInfo ExtraInfo `json:"extra_info,omitempty" yaml:"extra_info,omitempty"` } func NewInfo() Info { diff --git a/version/version_test.go b/version/version_test.go index caf0a5fb6b60..75e52d8076cd 100644 --- a/version/version_test.go +++ b/version/version_test.go @@ -1,13 +1,13 @@ package version_test import ( + context "context" "encoding/json" "fmt" "runtime" "strings" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/client/flags" @@ -149,7 +149,7 @@ func Test_runVersionCmd(t *testing.T) { }) require.NoError(t, cmd.Execute()) - assert.Equal(t, "\n", mockOut.String()) + require.Equal(t, "\n", mockOut.String()) mockOut.Reset() cmd.SetArgs([]string{ @@ -158,7 +158,21 @@ func Test_runVersionCmd(t *testing.T) { info := version.NewInfo() stringInfo, err := json.Marshal(info) + + extraInfo := &version.ExtraInfo{"key1": "value1"} + ctx := context.WithValue(context.Background(), version.ContextKey{}, extraInfo) + require.NoError(t, err) require.NoError(t, cmd.Execute()) - assert.Equal(t, string(stringInfo)+"\n", mockOut.String()) + + extraInfoFromContext := ctx.Value(version.ContextKey{}) + require.NotNil(t, extraInfoFromContext) + + castedExtraInfo, ok := extraInfoFromContext.(*version.ExtraInfo) + require.True(t, ok) + + key1Value := (*castedExtraInfo)["key1"] + require.Equal(t, "value1", key1Value) + + require.Equal(t, string(stringInfo)+"\n", mockOut.String()) } diff --git a/x/README.md b/x/README.md index 157836977994..d65a66f8fd91 100644 --- a/x/README.md +++ b/x/README.md @@ -1,6 +1,5 @@ --- sidebar_position: 0 -slug : /modules --- # List of Modules diff --git a/x/auth/README.md b/x/auth/README.md index 4b5a2ad1f45b..c51d10634ad4 100644 --- a/x/auth/README.md +++ b/x/auth/README.md @@ -447,6 +447,22 @@ simd tx multisign transaction.json k1k2k3 k1sig.json k2sig.json k3sig.json Where `k1k2k3` is the multisig account address, `k1sig.json` is the signature of the first signer, `k2sig.json` is the signature of the second signer, and `k3sig.json` is the signature of the third signer. +##### Nested multisig transactions + +To allow transactions to be signed by nested multisigs, meaning that a participant of a multisig account can be another multisig account, the `--skip-signature-verification` flag must be used. + +```bash +# First aggregate signatures of the multisig participant +simd tx multi-sign transaction.json ms1 ms1p1sig.json ms1p2sig.json --signature-only --skip-signature-verification > ms1sig.json + +# Then use the aggregated signatures and the other signatures to sign the final transaction +simd tx multi-sign transaction.json k1ms1 k1sig.json ms1sig.json --skip-signature-verification +``` + +Where `ms1` is the nested multisig account address, `ms1p1sig.json` is the signature of the first participant of the nested multisig account, `ms1p2sig.json` is the signature of the second participant of the nested multisig account, and `ms1sig.json` is the aggregated signature of the nested multisig account. + +`k1ms1` is a multisig account comprised of an individual signer and another nested multisig account (`ms1`). `k1sig.json` is the signature of the first signer of the individual member. + More information about the `multi-sign` command can be found running `simd tx multi-sign --help`. #### `multisign-batch` @@ -481,17 +497,6 @@ simd tx broadcast tx.signed.json More information about the `broadcast` command can be found running `simd tx broadcast --help`. -#### `aux-to-fee` - -The `aux-to-fee` comamnds includes the aux signer data in the tx, broadcast the tx, and sends the tip amount to the broadcaster. -[Learn more about tip transaction](https://docs.cosmos.network/main/core/tips). - -```bash -# simd tx bank send --aux (optional: --tip --tipper ) -simd tx aux-to-fee tx.aux.signed.json -``` - -More information about the `aux-to-fee` command can be found running `simd tx aux-to-fee --help`. ### gRPC diff --git a/x/auth/ante/ante.go b/x/auth/ante/ante.go index 05c5eb102657..8b2277aeb88b 100644 --- a/x/auth/ante/ante.go +++ b/x/auth/ante/ante.go @@ -1,11 +1,10 @@ package ante import ( + errorsmod "cosmossdk.io/errors" storetypes "cosmossdk.io/store/types" txsigning "cosmossdk.io/x/tx/signing" - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/tx/signing" diff --git a/x/auth/ante/ante_test.go b/x/auth/ante/ante_test.go index 21a6d6bcb1dd..8c7be921954e 100644 --- a/x/auth/ante/ante_test.go +++ b/x/auth/ante/ante_test.go @@ -7,13 +7,12 @@ import ( "strings" "testing" - "cosmossdk.io/math" "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" - storetypes "cosmossdk.io/store/types" - errorsmod "cosmossdk.io/errors" + "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" diff --git a/x/auth/ante/basic.go b/x/auth/ante/basic.go index 750824570ac4..46a2e27f0136 100644 --- a/x/auth/ante/basic.go +++ b/x/auth/ante/basic.go @@ -1,9 +1,8 @@ package ante import ( - storetypes "cosmossdk.io/store/types" - errorsmod "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec/legacy" "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" diff --git a/x/auth/ante/basic_test.go b/x/auth/ante/basic_test.go index 636061aff682..baac049acc6a 100644 --- a/x/auth/ante/basic_test.go +++ b/x/auth/ante/basic_test.go @@ -4,9 +4,10 @@ import ( "strings" "testing" - storetypes "cosmossdk.io/store/types" "github.com/stretchr/testify/require" + storetypes "cosmossdk.io/store/types" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/crypto/types/multisig" "github.com/cosmos/cosmos-sdk/testutil/testdata" diff --git a/x/auth/ante/expected_keepers.go b/x/auth/ante/expected_keepers.go index 1fec5fdf1712..139204cedf78 100644 --- a/x/auth/ante/expected_keepers.go +++ b/x/auth/ante/expected_keepers.go @@ -4,6 +4,7 @@ import ( "context" "cosmossdk.io/core/address" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/types" ) diff --git a/x/auth/ante/ext_test.go b/x/auth/ante/ext_test.go index 8230b5205e75..9181c7664a78 100644 --- a/x/auth/ante/ext_test.go +++ b/x/auth/ante/ext_test.go @@ -3,12 +3,13 @@ package ante_test import ( "testing" + "github.com/stretchr/testify/require" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/ante" "github.com/cosmos/cosmos-sdk/x/auth/tx" - "github.com/stretchr/testify/require" ) func TestRejectExtensionOptionsDecorator(t *testing.T) { diff --git a/x/auth/ante/fee.go b/x/auth/ante/fee.go index b6131d59e1fc..7581765ecf7d 100644 --- a/x/auth/ante/fee.go +++ b/x/auth/ante/fee.go @@ -15,9 +15,9 @@ import ( // the effective fee should be deducted later, and the priority should be returned in abci response. type TxFeeChecker func(ctx sdk.Context, tx sdk.Tx) (sdk.Coins, int64, error) -// DeductFeeDecorator deducts fees from the first signer of the tx -// If the first signer does not have the funds to pay for the fees, return with InsufficientFunds error -// Call next AnteHandler if fees successfully deducted +// DeductFeeDecorator deducts fees from the fee payer. The fee payer is the fee granter (if specified) or first signer of the tx. +// If the fee payer does not have the funds to pay for the fees, return an InsufficientFunds error. +// Call next AnteHandler if fees successfully deducted. // CONTRACT: Tx must implement FeeTx interface to use DeductFeeDecorator type DeductFeeDecorator struct { accountKeeper AccountKeeper @@ -86,11 +86,8 @@ func (dfd DeductFeeDecorator) checkDeductFee(ctx sdk.Context, sdkTx sdk.Tx, fee // if feegranter set deduct fee from feegranter account. // this works with only when feegrant enabled. - if feeGranter != "" { - feeGranterAddr, err := sdk.AccAddressFromBech32(feeGranter) - if err != nil { - return err - } + if feeGranter != nil { + feeGranterAddr := sdk.AccAddress(feeGranter) if dfd.feegrantKeeper == nil { return sdkerrors.ErrInvalidRequest.Wrap("fee grants are not enabled") diff --git a/x/auth/ante/fee_test.go b/x/auth/ante/fee_test.go index 182e5ae8f0d2..3cb46158f104 100644 --- a/x/auth/ante/fee_test.go +++ b/x/auth/ante/fee_test.go @@ -3,7 +3,11 @@ package ante_test import ( "testing" + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" + "cosmossdk.io/math" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" @@ -11,8 +15,6 @@ import ( "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth/ante" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/require" ) func TestDeductFeeDecorator_ZeroGas(t *testing.T) { diff --git a/x/auth/ante/setup.go b/x/auth/ante/setup.go index 4b6e281ac394..35ba2dc36308 100644 --- a/x/auth/ante/setup.go +++ b/x/auth/ante/setup.go @@ -3,9 +3,8 @@ package ante import ( "fmt" - storetypes "cosmossdk.io/store/types" - errorsmod "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -40,6 +39,14 @@ func (sud SetUpContextDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate newCtx = SetGasMeter(simulate, ctx, gasTx.GetGas()) + if cp := ctx.ConsensusParams(); cp.Block != nil { + // If there exists a maximum block gas limit, we must ensure that the tx + // does not exceed it. + if cp.Block.MaxGas > 0 && gasTx.GetGas() > uint64(cp.Block.MaxGas) { + return newCtx, errorsmod.Wrapf(sdkerrors.ErrInvalidGasLimit, "tx gas limit %d exceeds block max gas %d", gasTx.GetGas(), cp.Block.MaxGas) + } + } + // Decorator will catch an OutOfGasPanic caused in the next antehandler // AnteHandlers must have their own defer/recover in order for the BaseApp // to know how much gas was used! This is because the GasMeter is created in diff --git a/x/auth/ante/setup_test.go b/x/auth/ante/setup_test.go index 67c408218af1..e806a9b24489 100644 --- a/x/auth/ante/setup_test.go +++ b/x/auth/ante/setup_test.go @@ -3,9 +3,11 @@ package ante_test import ( "testing" - storetypes "cosmossdk.io/store/types" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/require" + storetypes "cosmossdk.io/store/types" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" @@ -14,6 +16,40 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/ante" ) +func TestSetupDecorator_BlockMaxGas(t *testing.T) { + suite := SetupTestSuite(t, true) + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() + + // keys and addresses + priv1, _, addr1 := testdata.KeyTestPubAddr() + + // msg and signatures + msg := testdata.NewTestMsg(addr1) + feeAmount := testdata.NewTestFeeAmount() + require.NoError(t, suite.txBuilder.SetMsgs(msg)) + suite.txBuilder.SetFeeAmount(feeAmount) + suite.txBuilder.SetGasLimit(101) + + privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} + tx, err := suite.CreateTestTx(suite.ctx, privs, accNums, accSeqs, suite.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) + require.NoError(t, err) + + sud := ante.NewSetUpContextDecorator() + antehandler := sdk.ChainAnteDecorators(sud) + + suite.ctx = suite.ctx. + WithBlockHeight(1). + WithGasMeter(storetypes.NewGasMeter(0)). + WithConsensusParams(cmtproto.ConsensusParams{ + Block: &cmtproto.BlockParams{ + MaxGas: 100, + }, + }) + + _, err = antehandler(suite.ctx, tx, false) + require.Error(t, err) +} + func TestSetup(t *testing.T) { suite := SetupTestSuite(t, true) suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() diff --git a/x/auth/ante/sigverify.go b/x/auth/ante/sigverify.go index 7cd4e5cf2dce..c588f2b78276 100644 --- a/x/auth/ante/sigverify.go +++ b/x/auth/ante/sigverify.go @@ -9,12 +9,10 @@ import ( "google.golang.org/protobuf/types/known/anypb" errorsmod "cosmossdk.io/errors" - storetypes "cosmossdk.io/store/types" txsigning "cosmossdk.io/x/tx/signing" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" @@ -92,7 +90,7 @@ func (spkd SetPubKeyDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate b pk = simSecp256k1Pubkey } // Only make check if simulate=false - if !simulate && !bytes.Equal(pk.Address(), signers[i]) { + if !simulate && !bytes.Equal(pk.Address(), signers[i]) && ctx.IsSigverifyTx() { return ctx, errorsmod.Wrapf(sdkerrors.ErrInvalidPubKey, "pubKey does not match signer address %s with signer index: %d", signerStrs[i], i) } @@ -304,7 +302,7 @@ func (svd SigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simul } // no need to verify signatures on recheck tx - if !simulate && !ctx.IsReCheckTx() { + if !simulate && !ctx.IsReCheckTx() && ctx.IsSigverifyTx() { anyPk, _ := codectypes.NewAnyWithValue(pubKey) signerData := txsigning.SignerData{ diff --git a/x/auth/ante/sigverify_test.go b/x/auth/ante/sigverify_test.go index cd803f3fac32..150fdff31ee1 100644 --- a/x/auth/ante/sigverify_test.go +++ b/x/auth/ante/sigverify_test.go @@ -9,8 +9,6 @@ import ( storetypes "cosmossdk.io/store/types" - authsign "github.com/cosmos/cosmos-sdk/x/auth/signing" - "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" @@ -23,6 +21,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth/ante" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" + authsign "github.com/cosmos/cosmos-sdk/x/auth/signing" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" txmodule "github.com/cosmos/cosmos-sdk/x/auth/tx/config" "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -191,23 +190,26 @@ func TestSigVerification(t *testing.T) { accSeqs []uint64 invalidSigs bool // used for testing sigverify on RecheckTx recheck bool + sigverify bool shouldErr bool } validSigs := false testCases := []testCase{ - {"no signers", []cryptotypes.PrivKey{}, []uint64{}, []uint64{}, validSigs, false, true}, - {"not enough signers", []cryptotypes.PrivKey{priv1, priv2}, []uint64{accs[0].GetAccountNumber(), accs[1].GetAccountNumber()}, []uint64{0, 0}, validSigs, false, true}, - {"wrong order signers", []cryptotypes.PrivKey{priv3, priv2, priv1}, []uint64{accs[2].GetAccountNumber(), accs[1].GetAccountNumber(), accs[0].GetAccountNumber()}, []uint64{0, 0, 0}, validSigs, false, true}, - {"wrong accnums", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{7, 8, 9}, []uint64{0, 0, 0}, validSigs, false, true}, - {"wrong sequences", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{accs[0].GetAccountNumber(), accs[1].GetAccountNumber(), accs[2].GetAccountNumber()}, []uint64{3, 4, 5}, validSigs, false, true}, - {"valid tx", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{accs[0].GetAccountNumber(), accs[1].GetAccountNumber(), accs[2].GetAccountNumber()}, []uint64{0, 0, 0}, validSigs, false, false}, - {"no err on recheck", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 0, 0}, []uint64{0, 0, 0}, !validSigs, true, false}, + {"no signers", []cryptotypes.PrivKey{}, []uint64{}, []uint64{}, validSigs, false, true, true}, + {"not enough signers", []cryptotypes.PrivKey{priv1, priv2}, []uint64{accs[0].GetAccountNumber(), accs[1].GetAccountNumber()}, []uint64{0, 0}, validSigs, false, true, true}, + {"wrong order signers", []cryptotypes.PrivKey{priv3, priv2, priv1}, []uint64{accs[2].GetAccountNumber(), accs[1].GetAccountNumber(), accs[0].GetAccountNumber()}, []uint64{0, 0, 0}, validSigs, false, true, true}, + {"wrong accnums", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{7, 8, 9}, []uint64{0, 0, 0}, validSigs, false, true, true}, + {"wrong sequences", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{accs[0].GetAccountNumber(), accs[1].GetAccountNumber(), accs[2].GetAccountNumber()}, []uint64{3, 4, 5}, validSigs, false, true, true}, + {"valid tx", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{accs[0].GetAccountNumber(), accs[1].GetAccountNumber(), accs[2].GetAccountNumber()}, []uint64{0, 0, 0}, validSigs, false, true, false}, + {"sigverify tx with wrong order signers", []cryptotypes.PrivKey{priv3, priv2, priv1}, []uint64{accs[0].GetAccountNumber(), accs[1].GetAccountNumber(), accs[2].GetAccountNumber()}, []uint64{0, 0, 0}, validSigs, false, true, true}, + {"skip sigverify tx with wrong order signers", []cryptotypes.PrivKey{priv3, priv2, priv1}, []uint64{accs[0].GetAccountNumber(), accs[1].GetAccountNumber(), accs[2].GetAccountNumber()}, []uint64{0, 0, 0}, validSigs, false, false, false}, + {"no err on recheck", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 0, 0}, []uint64{0, 0, 0}, !validSigs, true, true, false}, } for i, tc := range testCases { for _, signMode := range enabledSignModes { t.Run(fmt.Sprintf("%s with %s", tc.name, signMode), func(t *testing.T) { - suite.ctx = suite.ctx.WithIsReCheckTx(tc.recheck) + suite.ctx = suite.ctx.WithIsReCheckTx(tc.recheck).WithIsSigverifyTx(tc.sigverify) suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() // Create new txBuilder for each test require.NoError(t, suite.txBuilder.SetMsgs(msgs...)) diff --git a/x/auth/ante/testutil_test.go b/x/auth/ante/testutil_test.go index c22c4b7bd71e..a1f5762fdf92 100644 --- a/x/auth/ante/testutil_test.go +++ b/x/auth/ante/testutil_test.go @@ -11,24 +11,23 @@ import ( // ref: https://github.com/cosmos/cosmos-sdk/issues/14647 _ "cosmossdk.io/api/cosmos/bank/v1beta1" _ "cosmossdk.io/api/cosmos/crypto/secp256k1" - - "github.com/cosmos/cosmos-sdk/runtime" - _ "github.com/cosmos/cosmos-sdk/testutil/testdata/testpb" - storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/cosmos/cosmos-sdk/testutil/testdata" + _ "github.com/cosmos/cosmos-sdk/testutil/testdata/testpb" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/ante" antetestutil "github.com/cosmos/cosmos-sdk/x/auth/ante/testutil" + authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" "github.com/cosmos/cosmos-sdk/x/auth/keeper" xauthsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" authtestutil "github.com/cosmos/cosmos-sdk/x/auth/testutil" @@ -79,7 +78,8 @@ func SetupTestSuite(t *testing.T, isCheckTx bool) *AnteTestSuite { } suite.accountKeeper = keeper.NewAccountKeeper( - suite.encCfg.Codec, runtime.NewKVStoreService(key), types.ProtoBaseAccount, maccPerms, sdk.Bech32MainPrefix, types.NewModuleAddress("gov").String(), + suite.encCfg.Codec, runtime.NewKVStoreService(key), types.ProtoBaseAccount, maccPerms, authcodec.NewBech32Codec("cosmos"), + sdk.Bech32MainPrefix, types.NewModuleAddress("gov").String(), ) suite.accountKeeper.GetModuleAccount(suite.ctx, types.FeeCollectorName) err := suite.accountKeeper.Params.Set(suite.ctx, types.DefaultParams()) diff --git a/x/auth/autocli.go b/x/auth/autocli.go index 3eaa323cc70a..6d60e1d8becc 100644 --- a/x/auth/autocli.go +++ b/x/auth/autocli.go @@ -1,8 +1,14 @@ package auth import ( + "fmt" + authv1beta1 "cosmossdk.io/api/cosmos/auth/v1beta1" autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + _ "cosmossdk.io/api/cosmos/crypto/secp256k1" // register to that it shows up in protoregistry.GlobalTypes + _ "cosmossdk.io/api/cosmos/crypto/secp256r1" // register to that it shows up in protoregistry.GlobalTypes + + "github.com/cosmos/cosmos-sdk/version" ) // AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. @@ -11,20 +17,73 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { Query: &autocliv1.ServiceCommandDescriptor{ Service: authv1beta1.Query_ServiceDesc.ServiceName, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Accounts", + Use: "accounts", + Short: "Query all the accounts", + }, { RpcMethod: "Account", Use: "account [address]", - Short: "query account by address", + Short: "Query account by address", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "address"}}, + }, + { + RpcMethod: "AccountInfo", + Use: "account-info [address]", + Short: "Query account info which is common to all account types.", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "address"}}, }, { RpcMethod: "AccountAddressByID", Use: "address-by-acc-num [acc-num]", - Short: "query account address by account number", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "id"}}, + Short: "Query account address by account number", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "account_id"}}, + }, + { + RpcMethod: "ModuleAccounts", + Use: "module-accounts", + Short: "Query all module accounts", + }, + { + RpcMethod: "ModuleAccountByName", + Use: "module-account [module-name]", + Short: "Query module account info by module name", + Example: fmt.Sprintf("%s q auth module-account gov", version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "name"}}, + }, + { + RpcMethod: "AddressBytesToString", + Use: "address-bytes-to-string [address-bytes]", + Short: "Transform an address bytes to string", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "address_bytes"}}, + }, + { + RpcMethod: "AddressStringToBytes", + Use: "address-string-to-bytes [address-string]", + Short: "Transform an address string to bytes", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "address_string"}}, + }, + { + RpcMethod: "Bech32Prefix", + Use: "bech32-prefix", + Short: "Query the chain bech32 prefix (if applicable)", + }, + { + RpcMethod: "Params", + Use: "params", + Short: "Query the current auth parameters", + }, + }, + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: authv1beta1.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "UpdateParams", + Skip: true, // skipped because authority gated }, }, }, - // Tx is purposely left empty, as the only tx is MsgUpdateParams which is gov gated. } } diff --git a/x/auth/client/cli/decode.go b/x/auth/client/cli/decode.go index 72a8a600ce73..2d49806b1244 100644 --- a/x/auth/client/cli/decode.go +++ b/x/auth/client/cli/decode.go @@ -48,6 +48,7 @@ func GetDecodeCommand() *cobra.Command { cmd.Flags().BoolP(flagHex, "x", false, "Treat input as hexadecimal instead of base64") flags.AddTxFlagsToCmd(cmd) + _ = cmd.Flags().MarkHidden(flags.FlagOutput) // decoding makes sense to output only json return cmd } diff --git a/x/auth/client/cli/encode.go b/x/auth/client/cli/encode.go index 0a04c7c21665..65a13c6d1ae5 100644 --- a/x/auth/client/cli/encode.go +++ b/x/auth/client/cli/encode.go @@ -42,6 +42,7 @@ If you supply a dash (-) argument in place of an input filename, the command rea } flags.AddTxFlagsToCmd(cmd) + _ = cmd.Flags().MarkHidden(flags.FlagOutput) // encoding makes sense to output only json return cmd } diff --git a/x/auth/client/cli/query.go b/x/auth/client/cli/query.go index 1cc788a711d2..8d3ee8e793db 100644 --- a/x/auth/client/cli/query.go +++ b/x/auth/client/cli/query.go @@ -1,13 +1,9 @@ package cli import ( - "context" "fmt" - "strconv" "strings" - "cosmossdk.io/core/address" - errorsmod "cosmossdk.io/errors" "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" @@ -17,11 +13,9 @@ import ( querytypes "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/version" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" - "github.com/cosmos/cosmos-sdk/x/auth/types" ) const ( - FlagEvents = "events" // TODO: Remove when #14758 is merged FlagQuery = "query" FlagType = "type" FlagOrderBy = "order_by" @@ -34,232 +28,6 @@ const ( EventFormat = "{eventType}.{eventAttribute}={value}" ) -// GetQueryCmd returns the transaction commands for this module -func GetQueryCmd(ac address.Codec) *cobra.Command { - cmd := &cobra.Command{ - Use: types.ModuleName, - Short: "Querying commands for the auth module", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - cmd.AddCommand( - GetAccountCmd(ac), - GetAccountAddressByIDCmd(), - GetAccountsCmd(), - QueryParamsCmd(), - QueryModuleAccountsCmd(), - QueryModuleAccountByNameCmd(), - ) - - return cmd -} - -// QueryParamsCmd returns the command handler for evidence parameter querying. -func QueryParamsCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "params", - Short: "Query the current auth parameters", - Args: cobra.NoArgs, - Long: strings.TrimSpace(`Query the current auth parameters: - -$ query auth params -`), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.Params(cmd.Context(), &types.QueryParamsRequest{}) - if err != nil { - return err - } - - return clientCtx.PrintProto(&res.Params) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetAccountCmd returns a query account that will display the state of the -// account at a given address. -func GetAccountCmd(ac address.Codec) *cobra.Command { - cmd := &cobra.Command{ - Use: "account [address]", - Short: "Query for account by address", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - _, err = ac.StringToBytes(args[0]) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.Account(cmd.Context(), &types.QueryAccountRequest{Address: args[0]}) - if err != nil { - node, err2 := clientCtx.GetNode() - if err2 != nil { - return err2 - } - status, err2 := node.Status(context.Background()) - if err2 != nil { - return err2 - } - catchingUp := status.SyncInfo.CatchingUp - if !catchingUp { - return errorsmod.Wrapf(err, "your node may be syncing, please check node status using `/status`") - } - return err - } - - return clientCtx.PrintProto(res.Account) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetAccountAddressByIDCmd returns a query account that will display the account address of a given account id. -func GetAccountAddressByIDCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "address-by-acc-num [acc-num]", - Aliases: []string{"address-by-id"}, - Short: "Query for an address by account number", - Args: cobra.ExactArgs(1), - Example: fmt.Sprintf("%s q auth address-by-acc-num 1", version.AppName), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - accNum, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.AccountAddressByID(cmd.Context(), &types.QueryAccountAddressByIDRequest{ - AccountId: accNum, - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetAccountsCmd returns a query command that will display a list of accounts -func GetAccountsCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "accounts", - Short: "Query all the accounts", - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.Accounts(cmd.Context(), &types.QueryAccountsRequest{Pagination: pageReq}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "all-accounts") - - return cmd -} - -// QueryAllModuleAccountsCmd returns a list of all the existing module accounts with their account information and permissions -func QueryModuleAccountsCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "module-accounts", - Short: "Query all module accounts", - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.ModuleAccounts(context.Background(), &types.QueryModuleAccountsRequest{}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - 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/client/cli/query_test.go b/x/auth/client/cli/query_test.go index 6258beed2e2d..58ee64fba217 100644 --- a/x/auth/client/cli/query_test.go +++ b/x/auth/client/cli/query_test.go @@ -3,8 +3,9 @@ package cli_test import ( "testing" - "github.com/cosmos/cosmos-sdk/x/auth/client/cli" "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/x/auth/client/cli" ) func TestParseSigs(t *testing.T) { diff --git a/x/auth/client/cli/tips.go b/x/auth/client/cli/tips.go deleted file mode 100644 index 82904c6ab064..000000000000 --- a/x/auth/client/cli/tips.go +++ /dev/null @@ -1,93 +0,0 @@ -package cli - -import ( - "fmt" - "os" - - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - clienttx "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/types/tx" - authclient "github.com/cosmos/cosmos-sdk/x/auth/client" -) - -func GetAuxToFeeCommand() *cobra.Command { - cmd := &cobra.Command{ - Use: "aux-to-fee ", - Short: "Includes the aux signer data in the tx, broadcast the tx, and sends the tip amount to the broadcaster", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - auxSignerData := tx.AuxSignerData{} - err = readAuxSignerData(clientCtx.Codec, &auxSignerData, args[0]) - if err != nil { - return err - } - - if auxSignerData.SignDoc.ChainId != clientCtx.ChainID { - return fmt.Errorf("expected chain-id %s, got %s in aux signer data", clientCtx.ChainID, auxSignerData.SignDoc.ChainId) - } - - f, err := clienttx.NewFactoryCLI(clientCtx, cmd.Flags()) - if err != nil { - return err - } - - txBuilder := clientCtx.TxConfig.NewTxBuilder() - err = txBuilder.AddAuxSignerData(auxSignerData) - if err != nil { - return err - } - - txBuilder.SetFeePayer(clientCtx.FromAddress) - txBuilder.SetFeeAmount(f.Fees()) - txBuilder.SetGasLimit(f.Gas()) - - if clientCtx.GenerateOnly { - json, err := clientCtx.TxConfig.TxJSONEncoder()(txBuilder.GetTx()) - if err != nil { - return err - } - return clientCtx.PrintString(fmt.Sprintf("%s\n", json)) - } - - err = authclient.SignTx(f, clientCtx, clientCtx.FromName, txBuilder, clientCtx.Offline, false) - if err != nil { - return err - } - - txBytes, err := clientCtx.TxConfig.TxEncoder()(txBuilder.GetTx()) - if err != nil { - return err - } - - // broadcast to a CometBFT node - res, err := clientCtx.BroadcastTx(txBytes) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} - -func readAuxSignerData(cdc codec.Codec, auxSignerData *tx.AuxSignerData, filename string) error { - bytes, err := os.ReadFile(filename) - if err != nil { - return err - } - - return cdc.UnmarshalJSON(bytes, auxSignerData) -} diff --git a/x/auth/client/cli/tx_multisign.go b/x/auth/client/cli/tx_multisign.go index 6d03db5949e6..d4195585aa2b 100644 --- a/x/auth/client/cli/tx_multisign.go +++ b/x/auth/client/cli/tx_multisign.go @@ -10,8 +10,8 @@ import ( "google.golang.org/protobuf/types/known/anypb" errorsmod "cosmossdk.io/errors" - txsigning "cosmossdk.io/x/tx/signing" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" @@ -48,6 +48,10 @@ If the --offline flag is on, the client will not reach out to an external node. Account number or sequence number lookups are not performed so you must set these parameters manually. +If the --skip-signature-verification flag is on, the command will not verify the +signatures in the provided signature files. This is useful when the multisig +account is a signer in a nested multisig scenario. + The current multisig implementation defaults to amino-json sign mode. The SIGN_MODE_DIRECT sign mode is not supported.' `, @@ -58,9 +62,11 @@ The SIGN_MODE_DIRECT sign mode is not supported.' Args: cobra.MinimumNArgs(3), } + cmd.Flags().Bool(flagSkipSignatureVerification, false, "Skip signature verification") cmd.Flags().Bool(flagSigOnly, false, "Print only the generated signature, then exit") cmd.Flags().String(flags.FlagOutputDocument, "", "The document is written to the given file instead of STDOUT") flags.AddTxFlagsToCmd(cmd) + _ = cmd.Flags().MarkHidden(flags.FlagOutput) return cmd } @@ -104,6 +110,10 @@ func makeMultiSignCmd() func(cmd *cobra.Command, args []string) (err error) { return err } + // avoid signature verification if the sender of the tx is different than + // the multisig key (useful for nested multisigs). + skipSigVerify, _ := cmd.Flags().GetBool(flagSkipSignatureVerification) + multisigPub := pubKey.(*kmultisig.LegacyAminoPubKey) multisigSig := multisig.NewMultisig(len(multisigPub.PubKeys)) if !clientCtx.Offline { @@ -148,11 +158,13 @@ func makeMultiSignCmd() func(cmd *cobra.Command, args []string) (err error) { } txData := adaptableTx.GetSigningTxData() - err = signing.VerifySignature(cmd.Context(), sig.PubKey, txSignerData, sig.Data, - txCfg.SignModeHandler(), txData) - if err != nil { - addr, _ := sdk.AccAddressFromHexUnsafe(sig.PubKey.Address().String()) - return fmt.Errorf("couldn't verify signature for address %s", addr) + if !skipSigVerify { + err = signing.VerifySignature(cmd.Context(), sig.PubKey, txSignerData, sig.Data, + txCfg.SignModeHandler(), txData) + if err != nil { + addr, _ := sdk.AccAddressFromHexUnsafe(sig.PubKey.Address().String()) + return fmt.Errorf("couldn't verify signature for address %s %w", addr, err) + } } if err := multisig.AddSignatureV2(multisigSig, sig, multisigPub.GetPubKeys()); err != nil { @@ -180,27 +192,15 @@ func makeMultiSignCmd() func(cmd *cobra.Command, args []string) (err error) { return err } - outputDoc, _ := cmd.Flags().GetString(flags.FlagOutputDocument) - if outputDoc == "" { - cmd.Printf("%s\n", json) - return - } - - fp, err := os.OpenFile(outputDoc, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0o644) + closeFunc, err := setOutputFile(cmd) if err != nil { return err } - defer func() { - err2 := fp.Close() - if err == nil { - err = err2 - } - }() - - err = clientCtx.PrintBytes(json) + defer closeFunc() - return + cmd.Printf("%s\n", json) + return nil } } @@ -235,6 +235,7 @@ The SIGN_MODE_DIRECT sign mode is not supported.' ) cmd.Flags().String(flags.FlagOutputDocument, "", "The document is written to the given file instead of STDOUT") flags.AddTxFlagsToCmd(cmd) + _ = cmd.Flags().MarkHidden(flags.FlagOutput) // signing makes sense to output only json return cmd } diff --git a/x/auth/client/cli/tx_sign.go b/x/auth/client/cli/tx_sign.go index 986ca95d6783..a5dec4d00fb7 100644 --- a/x/auth/client/cli/tx_sign.go +++ b/x/auth/client/cli/tx_sign.go @@ -10,17 +10,18 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" - authclient "github.com/cosmos/cosmos-sdk/x/auth/client" ) const ( - flagMultisig = "multisig" - flagOverwrite = "overwrite" - flagSigOnly = "signature-only" - flagNoAutoIncrement = "no-auto-increment" - flagAppend = "append" + flagMultisig = "multisig" + flagOverwrite = "overwrite" + flagSigOnly = "signature-only" + flagSkipSignatureVerification = "skip-signature-verification" + flagNoAutoIncrement = "no-auto-increment" + flagAppend = "append" ) // GetSignBatchCommand returns the transaction sign-batch command. @@ -122,7 +123,8 @@ func makeSignBatchCmd() func(cmd *cobra.Command, args []string) error { appendMessagesToSingleTx, _ := cmd.Flags().GetBool(flagAppend) // Combines all tx msgs and create single signed transaction if appendMessagesToSingleTx { - txBuilder := clientCtx.TxConfig.NewTxBuilder() + var totalFees sdk.Coins + txBuilder := txCfg.NewTxBuilder() msgs := make([]sdk.Msg, 0) newGasLimit := uint64(0) @@ -134,6 +136,13 @@ func makeSignBatchCmd() func(cmd *cobra.Command, args []string) error { } // increment the gas newGasLimit += fe.GetTx().GetGas() + // Individual fee values from each transaction need to be + // aggregated to calculate the total fee for the batch of transactions. + // https://github.com/cosmos/cosmos-sdk/issues/18064 + unmergedFees := fe.GetTx().GetFee() + for _, fee := range unmergedFees { + totalFees = totalFees.Add(fee) + } // append messages msgs = append(msgs, unsignedStdTx.GetMsgs()...) } @@ -142,13 +151,15 @@ func makeSignBatchCmd() func(cmd *cobra.Command, args []string) error { // set the memo,fees,feeGranter,feePayer from cmd flags txBuilder.SetMemo(txFactory.Memo()) - txBuilder.SetFeeAmount(txFactory.Fees()) txBuilder.SetFeeGranter(clientCtx.FeeGranter) txBuilder.SetFeePayer(clientCtx.FeePayer) // set the gasLimit txBuilder.SetGasLimit(newGasLimit) + // set the feeAmount + txBuilder.SetFeeAmount(totalFees) + // sign the txs if ms == "" { from, _ := cmd.Flags().GetString(flags.FlagFrom) @@ -219,11 +230,40 @@ func sign(clientCtx client.Context, txBuilder client.TxBuilder, txFactory tx.Fac } func multisigSign(clientCtx client.Context, txBuilder client.TxBuilder, txFactory tx.Factory, multisig string) error { - multisigAddr, _, _, err := client.GetFromFields(clientCtx, txFactory.Keybase(), multisig) + multisigAddr, multisigName, _, err := client.GetFromFields(clientCtx, txFactory.Keybase(), multisig) + if err != nil { + return fmt.Errorf("error getting account from keybase: %w", err) + } + + fromRecord, err := clientCtx.Keyring.Key(clientCtx.FromName) if err != nil { return fmt.Errorf("error getting account from keybase: %w", err) } + fromPubKey, err := fromRecord.GetPubKey() + if err != nil { + return err + } + + multisigkey, err := clientCtx.Keyring.Key(multisigName) + if err != nil { + return err + } + + multisigPubKey, err := multisigkey.GetPubKey() + if err != nil { + return err + } + + isSigner, err := isMultisigSigner(clientCtx, multisigPubKey, fromPubKey) + if err != nil { + return err + } + + if !isSigner { + return fmt.Errorf("signing key is not a part of multisig key") + } + if err = authclient.SignTxWithSignerAddress( txFactory, clientCtx, @@ -239,6 +279,33 @@ func multisigSign(clientCtx client.Context, txBuilder client.TxBuilder, txFactor return nil } +// isMultisigSigner checks if the given pubkey is a signer in the multisig or in +// any of the nested multisig signers. +func isMultisigSigner(clientCtx client.Context, multisigPubKey, fromPubKey cryptotypes.PubKey) (bool, error) { + multisigLegacyPub := multisigPubKey.(*kmultisig.LegacyAminoPubKey) + + var found bool + for _, pubkey := range multisigLegacyPub.GetPubKeys() { + if pubkey.Equals(fromPubKey) { + found = true + break + } + + if nestedMultisig, ok := pubkey.(*kmultisig.LegacyAminoPubKey); ok { + var err error + found, err = isMultisigSigner(clientCtx, nestedMultisig, fromPubKey) + if err != nil { + return false, err + } + if found { + break + } + } + } + + return found, nil +} + func setOutputFile(cmd *cobra.Command) (func(), error) { outputDoc, _ := cmd.Flags().GetString(flags.FlagOutputDocument) if outputDoc == "" { @@ -364,7 +431,6 @@ func signTx(cmd *cobra.Command, clientCtx client.Context, txF tx.Factory, newTx if err != nil { return err } - multisigLegacyPub := multisigPubKey.(*kmultisig.LegacyAminoPubKey) fromRecord, err := clientCtx.Keyring.Key(fromName) if err != nil { @@ -375,15 +441,14 @@ func signTx(cmd *cobra.Command, clientCtx client.Context, txF tx.Factory, newTx return err } - var found bool - for _, pubkey := range multisigLegacyPub.GetPubKeys() { - if pubkey.Equals(fromPubKey) { - found = true - } + isSigner, err := isMultisigSigner(clientCtx, multisigPubKey, fromPubKey) + if err != nil { + return err } - if !found { + if !isSigner { return fmt.Errorf("signing key is not a part of multisig key") } + err = authclient.SignTxWithSignerAddress( txF, clientCtx, multisigAddr, fromName, txBuilder, clientCtx.Offline, overwrite) if err != nil { diff --git a/x/auth/client/cli/tx_simulate.go b/x/auth/client/cli/tx_simulate.go new file mode 100644 index 000000000000..9cb49e4778d6 --- /dev/null +++ b/x/auth/client/cli/tx_simulate.go @@ -0,0 +1,101 @@ +package cli + +import ( + "strings" + + "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/tx" + authclient "github.com/cosmos/cosmos-sdk/x/auth/client" +) + +// GetSimulateCmd returns a command that simulates whether a transaction will be +// successful. +func GetSimulateCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "simulate /path/to/unsigned-tx.json --from keyname", + Short: "Simulate the gas usage of a transaction", + Long: strings.TrimSpace(`Simulate whether a transaction will be successful: + +- if successful, the simulation result is printed, which includes the gas + consumption, message response data, and events emitted; +- if unsuccessful, the error message is printed. + +The user must provide the path to a JSON-encoded unsigned transaction, typically +generated by any transaction command with the --generate-only flag. It should +look like below. Note that the "signer_infos" and "signatures" fields are left +empty; they will be auto-populated by dummy data for simulation purpose. + +{ + "body": { + "messages": [ + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "cosmos1...", + "to_address": "cosmos1...", + "amount": [ + { + "denom": "utoken", + "amount": "12345" + } + ] + } + ], + "memo": "", + "timeout_height": "0", + "extension_options": [], + "non_critical_extension_options": [] + }, + "auth_info": { + "signer_infos": [], + "fee": { + "amount": [], + "gas_limit": "200000", + "payer": "", + "granter": "" + }, + "tip": null + }, + "signatures": [] +} + +The --from flag is mandatory, as the signer account's correct sequence number is +necessary for simulation. +`), + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + txf, err := tx.NewFactoryCLI(clientCtx, cmd.Flags()) + if err != nil { + return err + } + + txf, err = txf.Prepare(clientCtx) + if err != nil { + return err + } + + stdTx, err := authclient.ReadTxFromFile(clientCtx, args[0]) + if err != nil { + return err + } + + simRes, _, err := tx.CalculateGas(clientCtx, txf, stdTx.GetMsgs()...) + if err != nil { + return err + } + + return clientCtx.PrintProto(simRes) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/x/auth/client/cli/validate_sigs.go b/x/auth/client/cli/validate_sigs.go index 4d599218d378..f9c1fee0e1fe 100644 --- a/x/auth/client/cli/validate_sigs.go +++ b/x/auth/client/cli/validate_sigs.go @@ -8,6 +8,7 @@ import ( "google.golang.org/protobuf/types/known/anypb" txsigning "cosmossdk.io/x/tx/signing" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" diff --git a/x/auth/client/testutil/helpers.go b/x/auth/client/testutil/helpers.go index 5d53a35c09e8..092b061a83c2 100644 --- a/x/auth/client/testutil/helpers.go +++ b/x/auth/client/testutil/helpers.go @@ -4,7 +4,6 @@ import ( "fmt" "strings" - "cosmossdk.io/core/address" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/crypto/keyring" @@ -81,21 +80,6 @@ func TxDecodeExec(clientCtx client.Context, encodedTx string, extraArgs ...strin return clitestutil.ExecTestCLICmd(clientCtx, cli.GetDecodeCommand(), append(args, extraArgs...)) } -// TxAuxToFeeExec executes `GetAuxToFeeCommand` cli command with given args. -func TxAuxToFeeExec(clientCtx client.Context, filename string, extraArgs ...string) (testutil.BufferWriter, error) { - args := []string{ - filename, - } - - return clitestutil.ExecTestCLICmd(clientCtx, cli.GetAuxToFeeCommand(), append(args, extraArgs...)) -} - -func QueryAccountExec(clientCtx client.Context, address fmt.Stringer, ac address.Codec, extraArgs ...string) (testutil.BufferWriter, error) { - args := []string{address.String(), fmt.Sprintf("--%s=json", flags.FlagOutput)} - - return clitestutil.ExecTestCLICmd(clientCtx, cli.GetAccountCmd(ac), append(args, extraArgs...)) -} - func TxMultiSignBatchExec(clientCtx client.Context, filename, from, sigFile1, sigFile2 string, extraArgs ...string) (testutil.BufferWriter, error) { args := []string{ fmt.Sprintf("--%s=%s", flags.FlagKeyringBackend, keyring.BackendTest), diff --git a/x/auth/client/tx.go b/x/auth/client/tx.go index a2e829641f1f..027e27d3b05c 100644 --- a/x/auth/client/tx.go +++ b/x/auth/client/tx.go @@ -78,16 +78,6 @@ func SignTxWithSignerAddress(txFactory tx.Factory, clientCtx client.Context, add txFactory = txFactory.WithSignMode(signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON) } - // check whether the address is a signer - signers, err := txBuilder.GetTx().GetSigners() - if err != nil { - return err - } - - if !isTxSigner(addr, signers) { - return fmt.Errorf("%s: %s", errors.ErrorInvalidSigner, name) - } - if !offline { txFactory, err = populateAccountFromState(txFactory, clientCtx, addr) if err != nil { diff --git a/x/auth/keeper/deterministic_test.go b/x/auth/keeper/deterministic_test.go index 63fb8cc4d193..630fa173fd4c 100644 --- a/x/auth/keeper/deterministic_test.go +++ b/x/auth/keeper/deterministic_test.go @@ -21,6 +21,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/auth" + authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" "github.com/cosmos/cosmos-sdk/x/auth/keeper" "github.com/cosmos/cosmos-sdk/x/auth/types" ) @@ -72,6 +73,7 @@ func (suite *DeterministicTestSuite) SetupTest() { storeService, types.ProtoBaseAccount, maccPerms, + authcodec.NewBech32Codec("cosmos"), "cosmos", types.NewModuleAddress("gov").String(), ) @@ -291,6 +293,7 @@ func (suite *DeterministicTestSuite) TestGRPCQueryModuleAccounts() { suite.storeService, types.ProtoBaseAccount, maccPerms, + authcodec.NewBech32Codec("cosmos"), "cosmos", types.NewModuleAddress("gov").String(), ) @@ -337,6 +340,7 @@ func (suite *DeterministicTestSuite) TestGRPCQueryModuleAccountByName() { suite.storeService, types.ProtoBaseAccount, maccPerms, + authcodec.NewBech32Codec("cosmos"), "cosmos", types.NewModuleAddress("gov").String(), ) diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index 57e8b113a2c9..f480bb0a87d2 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -6,13 +6,12 @@ import ( "sort" "strings" - "github.com/cosmos/cosmos-sdk/types/query" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/x/auth/types" ) @@ -37,7 +36,7 @@ func (s queryServer) AccountAddressByID(ctx context.Context, req *types.QueryAcc address, err := s.k.Accounts.Indexes.Number.MatchExact(ctx, accID) if err != nil { - return nil, status.Errorf(codes.NotFound, "account address not found with account number %d", req.Id) + return nil, status.Errorf(codes.NotFound, "account address not found with account number %d", accID) } return &types.QueryAccountAddressByIDResponse{AccountAddress: address.String()}, nil @@ -48,15 +47,14 @@ func (s queryServer) Accounts(ctx context.Context, req *types.QueryAccountsReque return nil, status.Error(codes.InvalidArgument, "empty request") } - var accounts []*codectypes.Any - _, pageRes, err := query.CollectionFilteredPaginate(ctx, s.k.Accounts, req.Pagination, func(_ sdk.AccAddress, value sdk.AccountI) (include bool, err error) { - accountAny, err := codectypes.NewAnyWithValue(value) - if err != nil { - return false, err - } - accounts = append(accounts, accountAny) - return false, nil // we don't include it since we're already appending the account - }) + accounts, pageRes, err := query.CollectionPaginate( + ctx, + s.k.Accounts, + req.Pagination, + func(_ sdk.AccAddress, value sdk.AccountI) (*codectypes.Any, error) { + return codectypes.NewAnyWithValue(value) + }, + ) return &types.QueryAccountsResponse{Accounts: accounts, Pagination: pageRes}, err } @@ -163,6 +161,10 @@ func (s queryServer) Bech32Prefix(ctx context.Context, req *types.Bech32PrefixRe return nil, err } + if bech32Prefix == "" { + return &types.Bech32PrefixResponse{Bech32Prefix: "bech32 is not used on this chain"}, nil + } + return &types.Bech32PrefixResponse{Bech32Prefix: bech32Prefix}, nil } @@ -224,9 +226,14 @@ func (s queryServer) AccountInfo(ctx context.Context, req *types.QueryAccountInf return nil, status.Errorf(codes.NotFound, "account %s not found", req.Address) } - pkAny, err := codectypes.NewAnyWithValue(account.GetPubKey()) - if err != nil { - return nil, status.Errorf(codes.Internal, err.Error()) + // if there is no public key, avoid serializing the nil value + pubKey := account.GetPubKey() + var pkAny *codectypes.Any + if pubKey != nil { + pkAny, err = codectypes.NewAnyWithValue(account.GetPubKey()) + if err != nil { + return nil, status.Errorf(codes.Internal, err.Error()) + } } return &types.QueryAccountInfoResponse{ diff --git a/x/auth/keeper/grpc_query_test.go b/x/auth/keeper/grpc_query_test.go index f2d0a766648c..82e9cfe573fc 100644 --- a/x/auth/keeper/grpc_query_test.go +++ b/x/auth/keeper/grpc_query_test.go @@ -222,7 +222,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryAccountAddressByID() { } } -func (suite *KeeperTestSuite) TestGRPCQueryParameters() { +func (suite *KeeperTestSuite) TestGRPCQueryParams() { var ( req *types.QueryParamsRequest expParams types.Params @@ -521,3 +521,17 @@ func (suite *KeeperTestSuite) TestQueryAccountInfo() { suite.Require().NoError(err) suite.Require().Equal(pkBz, res.Info.PubKey.Value) } + +func (suite *KeeperTestSuite) TestQueryAccountInfoWithoutPubKey() { + acc := suite.accountKeeper.NewAccountWithAddress(suite.ctx, addr) + suite.accountKeeper.SetAccount(suite.ctx, acc) + + res, err := suite.queryClient.AccountInfo(context.Background(), &types.QueryAccountInfoRequest{ + Address: addr.String(), + }) + + suite.Require().NoError(err) + suite.Require().NotNil(res.Info) + suite.Require().Equal(addr.String(), res.Info.Address) + suite.Require().Nil(res.Info.PubKey) +} diff --git a/x/auth/keeper/keeper.go b/x/auth/keeper/keeper.go index 5ef50152dda8..393ed99907d3 100644 --- a/x/auth/keeper/keeper.go +++ b/x/auth/keeper/keeper.go @@ -5,21 +5,17 @@ import ( "errors" "fmt" - "cosmossdk.io/collections/indexes" - "cosmossdk.io/collections" - - errorsmod "cosmossdk.io/errors" - "cosmossdk.io/log" - + "cosmossdk.io/collections/indexes" "cosmossdk.io/core/address" "cosmossdk.io/core/store" + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/codec" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" "github.com/cosmos/cosmos-sdk/x/auth/types" ) @@ -58,6 +54,7 @@ type AccountKeeperI interface { // GetModulePermissions fetches per-module account permissions GetModulePermissions() map[string]types.PermissionsForAddress + // AddressCodec returns the account address codec. AddressCodec() address.Codec } @@ -117,7 +114,7 @@ var _ AccountKeeperI = &AccountKeeper{} // may use auth.Keeper to access the accounts permissions map. func NewAccountKeeper( cdc codec.BinaryCodec, storeService store.KVStoreService, proto func() sdk.AccountI, - maccPerms map[string][]string, bech32Prefix, authority string, + maccPerms map[string][]string, ac address.Codec, bech32Prefix, authority string, ) AccountKeeper { permAddrs := make(map[string]types.PermissionsForAddress) for name, perms := range maccPerms { @@ -127,7 +124,7 @@ func NewAccountKeeper( sb := collections.NewSchemaBuilder(storeService) ak := AccountKeeper{ - addressCodec: authcodec.NewBech32Codec(bech32Prefix), + addressCodec: ac, bech32Prefix: bech32Prefix, storeService: storeService, proto: proto, @@ -151,7 +148,7 @@ func (ak AccountKeeper) GetAuthority() string { return ak.authority } -// AddressCodec returns the x/auth module's address. +// AddressCodec returns the x/auth account address codec. // x/auth is tied to bech32 encoded user accounts func (ak AccountKeeper) AddressCodec() address.Codec { return ak.addressCodec diff --git a/x/auth/keeper/keeper_bench_test.go b/x/auth/keeper/keeper_bench_test.go index 716afc2e0f34..55203dc99bd3 100644 --- a/x/auth/keeper/keeper_bench_test.go +++ b/x/auth/keeper/keeper_bench_test.go @@ -3,9 +3,10 @@ package keeper_test import ( "testing" + "github.com/stretchr/testify/require" + "cosmossdk.io/depinject" "cosmossdk.io/log" - "github.com/stretchr/testify/require" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/auth/keeper/keeper_test.go b/x/auth/keeper/keeper_test.go index 628bcdbc1640..8eff83d1dddb 100644 --- a/x/auth/keeper/keeper_test.go +++ b/x/auth/keeper/keeper_test.go @@ -3,8 +3,6 @@ package keeper_test import ( "testing" - "github.com/cosmos/cosmos-sdk/runtime" - "github.com/stretchr/testify/suite" "cosmossdk.io/core/header" @@ -13,10 +11,12 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/auth" + authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" "github.com/cosmos/cosmos-sdk/x/auth/keeper" "github.com/cosmos/cosmos-sdk/x/auth/types" ) @@ -65,6 +65,7 @@ func (suite *KeeperTestSuite) SetupTest() { storeService, types.ProtoBaseAccount, maccPerms, + authcodec.NewBech32Codec("cosmos"), "cosmos", types.NewModuleAddress("gov").String(), ) diff --git a/x/auth/migrations/legacytx/stdsign.go b/x/auth/migrations/legacytx/stdsign.go index c4ef01b9d69f..e5a4e454cb90 100644 --- a/x/auth/migrations/legacytx/stdsign.go +++ b/x/auth/migrations/legacytx/stdsign.go @@ -14,7 +14,6 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/crypto/types/multisig" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" ) @@ -41,30 +40,34 @@ type StdSignDoc struct { Memo string `json:"memo" yaml:"memo"` Fee json.RawMessage `json:"fee" yaml:"fee"` Msgs []json.RawMessage `json:"msgs" yaml:"msgs"` - Tip *StdTip `json:"tip,omitempty" yaml:"tip"` } var RegressionTestingAminoCodec *codec.LegacyAmino +// Deprecated: please delete this code eventually. +func mustSortJSON(bz []byte) []byte { + var c any + err := json.Unmarshal(bz, &c) + if err != nil { + panic(err) + } + js, err := json.Marshal(c) + if err != nil { + panic(err) + } + return js +} + // StdSignBytes returns the bytes to sign for a transaction. // Deprecated: Please use x/tx/signing/aminojson instead. -func StdSignBytes(chainID string, accnum, sequence, timeout uint64, fee StdFee, msgs []sdk.Msg, memo string, tip *tx.Tip) []byte { +func StdSignBytes(chainID string, accnum, sequence, timeout uint64, fee StdFee, msgs []sdk.Msg, memo string) []byte { if RegressionTestingAminoCodec == nil { panic(fmt.Errorf("must set RegressionTestingAminoCodec before calling StdSignBytes")) } msgsBytes := make([]json.RawMessage, 0, len(msgs)) for _, msg := range msgs { bz := RegressionTestingAminoCodec.MustMarshalJSON(msg) - msgsBytes = append(msgsBytes, sdk.MustSortJSON(bz)) - } - - var stdTip *StdTip - if tip != nil { - if tip.Tipper == "" { - panic(fmt.Errorf("tipper cannot be empty")) - } - - stdTip = &StdTip{Amount: tip.Amount, Tipper: tip.Tipper} + msgsBytes = append(msgsBytes, mustSortJSON(bz)) } bz, err := legacy.Cdc.MarshalJSON(StdSignDoc{ @@ -75,13 +78,12 @@ func StdSignBytes(chainID string, accnum, sequence, timeout uint64, fee StdFee, Msgs: msgsBytes, Sequence: sequence, TimeoutHeight: timeout, - Tip: stdTip, }) if err != nil { panic(err) } - return sdk.MustSortJSON(bz) + return mustSortJSON(bz) } // Deprecated: StdSignature represents a sig diff --git a/x/auth/migrations/legacytx/stdtx.go b/x/auth/migrations/legacytx/stdtx.go index d2a16cfb0b14..900991c01450 100644 --- a/x/auth/migrations/legacytx/stdtx.go +++ b/x/auth/migrations/legacytx/stdtx.go @@ -8,7 +8,6 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" ) @@ -170,9 +169,6 @@ func (tx StdTx) FeeGranter() sdk.AccAddress { return nil } -// GetTip always returns nil for StdTx -func (tx StdTx) GetTip() *tx.Tip { return nil } - func (tx StdTx) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { for _, m := range tx.Msgs { err := codectypes.UnpackInterfaces(m, unpacker) diff --git a/x/auth/migrations/legacytx/stdtx_builder.go b/x/auth/migrations/legacytx/stdtx_builder.go index 80d3450a441b..3965c79cc723 100644 --- a/x/auth/migrations/legacytx/stdtx_builder.go +++ b/x/auth/migrations/legacytx/stdtx_builder.go @@ -45,10 +45,6 @@ func (s *StdTxBuilder) SetGasLimit(limit uint64) { s.StdTx.Fee.Gas = limit } -func (s *StdTxBuilder) SetTip(tip *tx.Tip) { - panic("StdTxBuilder does not support tips") -} - // SetMemo implements TxBuilder.SetMemo func (s *StdTxBuilder) SetMemo(memo string) { s.Memo = memo diff --git a/x/auth/migrations/legacytx/stdtx_test.go b/x/auth/migrations/legacytx/stdtx_test.go index f697f68ec04d..f49357ca6398 100644 --- a/x/auth/migrations/legacytx/stdtx_test.go +++ b/x/auth/migrations/legacytx/stdtx_test.go @@ -13,6 +13,7 @@ import ( txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" txsigning "cosmossdk.io/x/tx/signing" "cosmossdk.io/x/tx/signing/aminojson" + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" @@ -38,16 +39,11 @@ func TestStdSignBytes(t *testing.T) { fee *txv1beta1.Fee msgs []sdk.Msg memo string - tip *txv1beta1.Tip } defaultFee := &txv1beta1.Fee{ Amount: []*basev1beta1.Coin{{Denom: "atom", Amount: "150"}}, GasLimit: 100000, } - defaultTip := &txv1beta1.Tip{ - Amount: []*basev1beta1.Coin{{Denom: "tiptoken", Amount: "150"}}, - Tipper: addr.String(), - } msgStr := fmt.Sprintf(`{"type":"testpb/TestMsg","value":{"signers":["%s"]}}`, addr) tests := []struct { name string @@ -56,54 +52,39 @@ func TestStdSignBytes(t *testing.T) { }{ { "with timeout height", - args{"1234", 3, 6, 10, defaultFee, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo", nil}, + args{"1234", 3, 6, 10, defaultFee, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo"}, fmt.Sprintf(`{"account_number":"3","chain_id":"1234","fee":{"amount":[{"amount":"150","denom":"atom"}],"gas":"100000"},"memo":"memo","msgs":[%s],"sequence":"6","timeout_height":"10"}`, msgStr), }, { "no timeout height (omitempty)", - args{"1234", 3, 6, 0, defaultFee, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo", nil}, + args{"1234", 3, 6, 0, defaultFee, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo"}, fmt.Sprintf(`{"account_number":"3","chain_id":"1234","fee":{"amount":[{"amount":"150","denom":"atom"}],"gas":"100000"},"memo":"memo","msgs":[%s],"sequence":"6"}`, msgStr), }, { "empty fee", - args{"1234", 3, 6, 0, &txv1beta1.Fee{}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo", nil}, + args{"1234", 3, 6, 0, &txv1beta1.Fee{}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo"}, fmt.Sprintf(`{"account_number":"3","chain_id":"1234","fee":{"amount":[],"gas":"0"},"memo":"memo","msgs":[%s],"sequence":"6"}`, msgStr), }, { "no fee payer and fee granter (both omitempty)", - args{"1234", 3, 6, 0, &txv1beta1.Fee{Amount: defaultFee.Amount, GasLimit: defaultFee.GasLimit}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo", nil}, + args{"1234", 3, 6, 0, &txv1beta1.Fee{Amount: defaultFee.Amount, GasLimit: defaultFee.GasLimit}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo"}, fmt.Sprintf(`{"account_number":"3","chain_id":"1234","fee":{"amount":[{"amount":"150","denom":"atom"}],"gas":"100000"},"memo":"memo","msgs":[%s],"sequence":"6"}`, msgStr), }, { "with fee granter, no fee payer (omitempty)", - args{"1234", 3, 6, 0, &txv1beta1.Fee{Amount: defaultFee.Amount, GasLimit: defaultFee.GasLimit, Granter: addr.String()}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo", nil}, + args{"1234", 3, 6, 0, &txv1beta1.Fee{Amount: defaultFee.Amount, GasLimit: defaultFee.GasLimit, Granter: addr.String()}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo"}, fmt.Sprintf(`{"account_number":"3","chain_id":"1234","fee":{"amount":[{"amount":"150","denom":"atom"}],"gas":"100000","granter":"%s"},"memo":"memo","msgs":[%s],"sequence":"6"}`, addr, msgStr), }, { "with fee payer, no fee granter (omitempty)", - args{"1234", 3, 6, 0, &txv1beta1.Fee{Amount: defaultFee.Amount, GasLimit: defaultFee.GasLimit, Payer: addr.String()}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo", nil}, + args{"1234", 3, 6, 0, &txv1beta1.Fee{Amount: defaultFee.Amount, GasLimit: defaultFee.GasLimit, Payer: addr.String()}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo"}, fmt.Sprintf(`{"account_number":"3","chain_id":"1234","fee":{"amount":[{"amount":"150","denom":"atom"}],"gas":"100000","payer":"%s"},"memo":"memo","msgs":[%s],"sequence":"6"}`, addr, msgStr), }, { "with fee payer and fee granter", - args{"1234", 3, 6, 0, &txv1beta1.Fee{Amount: defaultFee.Amount, GasLimit: defaultFee.GasLimit, Payer: addr.String(), Granter: addr.String()}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo", nil}, + args{"1234", 3, 6, 0, &txv1beta1.Fee{Amount: defaultFee.Amount, GasLimit: defaultFee.GasLimit, Payer: addr.String(), Granter: addr.String()}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo"}, fmt.Sprintf(`{"account_number":"3","chain_id":"1234","fee":{"amount":[{"amount":"150","denom":"atom"}],"gas":"100000","granter":"%s","payer":"%s"},"memo":"memo","msgs":[%s],"sequence":"6"}`, addr, addr, msgStr), }, - { - "no fee, with tip", - args{"1234", 3, 6, 0, &txv1beta1.Fee{}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo", defaultTip}, - fmt.Sprintf(`{"account_number":"3","chain_id":"1234","fee":{"amount":[],"gas":"0"},"memo":"memo","msgs":[%s],"sequence":"6","tip":{"amount":[{"amount":"150","denom":"tiptoken"}],"tipper":"%s"}}`, msgStr, addr), - }, - { - "with fee and with tip", - args{"1234", 3, 6, 0, &txv1beta1.Fee{Amount: defaultFee.Amount, GasLimit: defaultFee.GasLimit, Payer: addr.String()}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo", defaultTip}, - fmt.Sprintf(`{"account_number":"3","chain_id":"1234","fee":{"amount":[{"amount":"150","denom":"atom"}],"gas":"100000","payer":"%s"},"memo":"memo","msgs":[%s],"sequence":"6","tip":{"amount":[{"amount":"150","denom":"tiptoken"}],"tipper":"%s"}}`, addr, msgStr, addr), - }, - { - "with empty tip (but not nil), tipper cannot be empty", - args{"1234", 3, 6, 0, defaultFee, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo", &txv1beta1.Tip{Tipper: addr.String()}}, - fmt.Sprintf(`{"account_number":"3","chain_id":"1234","fee":{"amount":[{"amount":"150","denom":"atom"}],"gas":"100000"},"memo":"memo","msgs":[%s],"sequence":"6","tip":{"amount":[],"tipper":"%s"}}`, msgStr, addr), - }, } handler := aminojson.NewSignModeHandler(aminojson.SignModeHandlerOptions{ FileResolver: proto.HybridResolver, @@ -136,7 +117,6 @@ func TestStdSignBytes(t *testing.T) { }, AuthInfo: &txv1beta1.AuthInfo{ Fee: tc.args.fee, - Tip: tc.args.tip, }, }, ) diff --git a/x/auth/migrations/v2/store_test.go b/x/auth/migrations/v2/store_test.go index bcc3a29c18a1..83989a1c1756 100644 --- a/x/auth/migrations/v2/store_test.go +++ b/x/auth/migrations/v2/store_test.go @@ -95,12 +95,15 @@ func TestMigrateVestingAccounts(t *testing.T) { "delayed vesting has vested, multiple delegations less than the total account balance", func(ctx sdk.Context, validator stakingtypes.Validator, delegatorAddr sdk.AccAddress) { baseAccount := createBaseAccount(delegatorAddr) - vestedCoins := sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdkmath.NewInt(200))) - delayedAccount := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().Unix()) + bondDenom, err := stakingKeeper.BondDenom(ctx) + require.NoError(t, err) + vestedCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(200))) + delayedAccount, err := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().Unix()) + require.NoError(t, err) ctx = ctx.WithBlockTime(ctx.BlockTime().AddDate(1, 0, 0)) - err := accountKeeper.Params.Set(ctx, authtypes.DefaultParams()) + err = accountKeeper.Params.Set(ctx, authtypes.DefaultParams()) require.NoError(t, err) accountKeeper.SetAccount(ctx, delayedAccount) @@ -121,10 +124,12 @@ func TestMigrateVestingAccounts(t *testing.T) { { "delayed vesting has vested, single delegations which exceed the vested amount", func(ctx sdk.Context, validator stakingtypes.Validator, delegatorAddr sdk.AccAddress) { + bondDenom, err := stakingKeeper.BondDenom(ctx) require.NoError(t, err) baseAccount := createBaseAccount(delegatorAddr) - vestedCoins := sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdkmath.NewInt(200))) - delayedAccount := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().Unix()) + vestedCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(200))) + delayedAccount, err := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().Unix()) + require.NoError(t, err) ctx = ctx.WithBlockTime(ctx.BlockTime().AddDate(1, 0, 0)) @@ -143,8 +148,11 @@ func TestMigrateVestingAccounts(t *testing.T) { "delayed vesting has vested, multiple delegations which exceed the vested amount", func(ctx sdk.Context, validator stakingtypes.Validator, delegatorAddr sdk.AccAddress) { baseAccount := createBaseAccount(delegatorAddr) - vestedCoins := sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdkmath.NewInt(200))) - delayedAccount := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().Unix()) + bondDenom, err := stakingKeeper.BondDenom(ctx) + require.NoError(t, err) + vestedCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(200))) + delayedAccount, err := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().Unix()) + require.NoError(t, err) ctx = ctx.WithBlockTime(ctx.BlockTime().AddDate(1, 0, 0)) @@ -167,8 +175,11 @@ func TestMigrateVestingAccounts(t *testing.T) { "delayed vesting has not vested, single delegations which exceed the vested amount", func(ctx sdk.Context, validator stakingtypes.Validator, delegatorAddr sdk.AccAddress) { baseAccount := createBaseAccount(delegatorAddr) - vestedCoins := sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdkmath.NewInt(200))) - delayedAccount := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().AddDate(1, 0, 0).Unix()) + bondDenom, err := stakingKeeper.BondDenom(ctx) + require.NoError(t, err) + vestedCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(200))) + delayedAccount, err := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().AddDate(1, 0, 0).Unix()) + require.NoError(t, err) accountKeeper.SetAccount(ctx, delayedAccount) @@ -185,8 +196,11 @@ func TestMigrateVestingAccounts(t *testing.T) { "delayed vesting has not vested, multiple delegations which exceed the vested amount", func(ctx sdk.Context, validator stakingtypes.Validator, delegatorAddr sdk.AccAddress) { baseAccount := createBaseAccount(delegatorAddr) - vestedCoins := sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdkmath.NewInt(200))) - delayedAccount := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().AddDate(1, 0, 0).Unix()) + bondDenom, err := stakingKeeper.BondDenom(ctx) + require.NoError(t, err) + vestedCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(200))) + delayedAccount, err := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().AddDate(1, 0, 0).Unix()) + require.NoError(t, err) accountKeeper.SetAccount(ctx, delayedAccount) @@ -207,8 +221,11 @@ func TestMigrateVestingAccounts(t *testing.T) { "not end time", func(ctx sdk.Context, validator stakingtypes.Validator, delegatorAddr sdk.AccAddress) { baseAccount := createBaseAccount(delegatorAddr) - vestedCoins := sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdkmath.NewInt(300))) - delayedAccount := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().AddDate(1, 0, 0).Unix()) + bondDenom, err := stakingKeeper.BondDenom(ctx) + require.NoError(t, err) + vestedCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(300))) + delayedAccount, err := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().AddDate(1, 0, 0).Unix()) + require.NoError(t, err) accountKeeper.SetAccount(ctx, delayedAccount) @@ -229,8 +246,11 @@ func TestMigrateVestingAccounts(t *testing.T) { "delayed vesting has not vested, single delegation greater than the total account balance", func(ctx sdk.Context, validator stakingtypes.Validator, delegatorAddr sdk.AccAddress) { baseAccount := createBaseAccount(delegatorAddr) - vestedCoins := sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdkmath.NewInt(300))) - delayedAccount := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().AddDate(1, 0, 0).Unix()) + bondDenom, err := stakingKeeper.BondDenom(ctx) + require.NoError(t, err) + vestedCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(300))) + delayedAccount, err := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().AddDate(1, 0, 0).Unix()) + require.NoError(t, err) accountKeeper.SetAccount(ctx, delayedAccount) @@ -247,8 +267,11 @@ func TestMigrateVestingAccounts(t *testing.T) { "delayed vesting has vested, single delegation greater than the total account balance", func(ctx sdk.Context, validator stakingtypes.Validator, delegatorAddr sdk.AccAddress) { baseAccount := createBaseAccount(delegatorAddr) - vestedCoins := sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdkmath.NewInt(300))) - delayedAccount := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().Unix()) + bondDenom, err := stakingKeeper.BondDenom(ctx) + require.NoError(t, err) + vestedCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(300))) + delayedAccount, err := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().Unix()) + require.NoError(t, err) ctx = ctx.WithBlockTime(ctx.BlockTime().AddDate(1, 0, 0)) @@ -269,8 +292,11 @@ func TestMigrateVestingAccounts(t *testing.T) { startTime := ctx.BlockTime().AddDate(1, 0, 0).Unix() endTime := ctx.BlockTime().AddDate(2, 0, 0).Unix() baseAccount := createBaseAccount(delegatorAddr) - vestedCoins := sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdkmath.NewInt(300))) - delayedAccount := types.NewContinuousVestingAccount(baseAccount, vestedCoins, startTime, endTime) + bondDenom, err := stakingKeeper.BondDenom(ctx) + require.NoError(t, err) + vestedCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(300))) + delayedAccount, err := types.NewContinuousVestingAccount(baseAccount, vestedCoins, startTime, endTime) + require.NoError(t, err) ctx = ctx.WithBlockTime(ctx.BlockTime().AddDate(1, 0, 0)) @@ -291,8 +317,11 @@ func TestMigrateVestingAccounts(t *testing.T) { startTime := ctx.BlockTime().AddDate(-1, 0, 0).Unix() endTime := ctx.BlockTime().AddDate(2, 0, 0).Unix() baseAccount := createBaseAccount(delegatorAddr) - vestedCoins := sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdkmath.NewInt(300))) - delayedAccount := types.NewContinuousVestingAccount(baseAccount, vestedCoins, startTime, endTime) + bondDenom, err := stakingKeeper.BondDenom(ctx) + require.NoError(t, err) + vestedCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(300))) + delayedAccount, err := types.NewContinuousVestingAccount(baseAccount, vestedCoins, startTime, endTime) + require.NoError(t, err) ctx = ctx.WithBlockTime(ctx.BlockTime().AddDate(1, 0, 0)) @@ -313,8 +342,11 @@ func TestMigrateVestingAccounts(t *testing.T) { startTime := ctx.BlockTime().AddDate(-2, 0, 0).Unix() endTime := ctx.BlockTime().AddDate(-1, 0, 0).Unix() baseAccount := createBaseAccount(delegatorAddr) - vestedCoins := sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdkmath.NewInt(300))) - delayedAccount := types.NewContinuousVestingAccount(baseAccount, vestedCoins, startTime, endTime) + bondDenom, err := stakingKeeper.BondDenom(ctx) + require.NoError(t, err) + vestedCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(300))) + delayedAccount, err := types.NewContinuousVestingAccount(baseAccount, vestedCoins, startTime, endTime) + require.NoError(t, err) ctx = ctx.WithBlockTime(ctx.BlockTime().AddDate(1, 0, 0)) @@ -333,7 +365,9 @@ func TestMigrateVestingAccounts(t *testing.T) { "periodic vesting account, yet to be vested, some rewards delegated", func(ctx sdk.Context, validator stakingtypes.Validator, delegatorAddr sdk.AccAddress) { baseAccount := createBaseAccount(delegatorAddr) - vestedCoins := sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdkmath.NewInt(100))) + bondDenom, err := stakingKeeper.BondDenom(ctx) + require.NoError(t, err) + vestedCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(100))) start := ctx.BlockTime().Unix() + int64(time.Hour/time.Second) @@ -344,11 +378,12 @@ func TestMigrateVestingAccounts(t *testing.T) { }, } - account := types.NewPeriodicVestingAccount(baseAccount, vestedCoins, start, periods) + account, err := types.NewPeriodicVestingAccount(baseAccount, vestedCoins, start, periods) + require.NoError(t, err) accountKeeper.SetAccount(ctx, account) - _, err = stakingKeeper.Delegate(ctx, delegatorAddr, sdk.NewInt(150), stakingtypes.Unbonded, validator, true) + _, err = stakingKeeper.Delegate(ctx, delegatorAddr, sdkmath.NewInt(150), stakingtypes.Unbonded, validator, true) require.NoError(t, err) }, cleartTrackingFields, @@ -371,28 +406,31 @@ func TestMigrateVestingAccounts(t *testing.T) { */ startTime := int64(1601042400) baseAccount := createBaseAccount(delegatorAddr) - vestedCoins := sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdk.NewInt(3666666670000))) + bondDenom, err := stakingKeeper.BondDenom(ctx) + require.NoError(t, err) + vestedCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(3666666670000))) periods := []types.Period{ { Length: 31536000, - Amount: sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdk.NewInt(1833333335000))), + Amount: sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(1833333335000))), }, { Length: 15638400, - Amount: sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdk.NewInt(916666667500))), + Amount: sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(916666667500))), }, { Length: 15897600, - Amount: sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdk.NewInt(916666667500))), + Amount: sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(916666667500))), }, } - delayedAccount := types.NewPeriodicVestingAccount(baseAccount, vestedCoins, startTime, periods) + delayedAccount, err := types.NewPeriodicVestingAccount(baseAccount, vestedCoins, startTime, periods) + require.NoError(t, err) accountKeeper.SetAccount(ctx, delayedAccount) // delegation of the original vesting - _, err = stakingKeeper.Delegate(ctx, delegatorAddr, sdk.NewInt(3666666670000), stakingtypes.Unbonded, validator, true) + _, err = stakingKeeper.Delegate(ctx, delegatorAddr, sdkmath.NewInt(3666666670000), stakingtypes.Unbonded, validator, true) require.NoError(t, err) }, cleartTrackingFields, @@ -415,30 +453,33 @@ func TestMigrateVestingAccounts(t *testing.T) { */ startTime := int64(1601042400) baseAccount := createBaseAccount(delegatorAddr) - vestedCoins := sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdk.NewInt(3666666670000))) + bondDenom, err := stakingKeeper.BondDenom(ctx) + require.NoError(t, err) + vestedCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(3666666670000))) periods := []types.Period{ { Length: 31536000, - Amount: sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdk.NewInt(1833333335000))), + Amount: sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(1833333335000))), }, { Length: 15638400, - Amount: sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdk.NewInt(916666667500))), + Amount: sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(916666667500))), }, { Length: 15897600, - Amount: sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdk.NewInt(916666667500))), + Amount: sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(916666667500))), }, } - delayedAccount := types.NewPeriodicVestingAccount(baseAccount, vestedCoins, startTime, periods) + delayedAccount, err := types.NewPeriodicVestingAccount(baseAccount, vestedCoins, startTime, periods) + require.NoError(t, err) ctx = ctx.WithBlockTime(time.Unix(1601042400+31536000+15897600+15897600+1, 0)) accountKeeper.SetAccount(ctx, delayedAccount) // delegation of the original vesting - _, err = stakingKeeper.Delegate(ctx, delegatorAddr, sdk.NewInt(3666666670000), stakingtypes.Unbonded, validator, true) + _, err = stakingKeeper.Delegate(ctx, delegatorAddr, sdkmath.NewInt(3666666670000), stakingtypes.Unbonded, validator, true) require.NoError(t, err) }, cleartTrackingFields, @@ -461,30 +502,33 @@ func TestMigrateVestingAccounts(t *testing.T) { */ startTime := int64(1601042400) baseAccount := createBaseAccount(delegatorAddr) - vestedCoins := sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdk.NewInt(3666666670000))) + bondDenom, err := stakingKeeper.BondDenom(ctx) + require.NoError(t, err) + vestedCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(3666666670000))) periods := []types.Period{ { Length: 31536000, - Amount: sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdk.NewInt(1833333335000))), + Amount: sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(1833333335000))), }, { Length: 15638400, - Amount: sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdk.NewInt(916666667500))), + Amount: sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(916666667500))), }, { Length: 15897600, - Amount: sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdk.NewInt(916666667500))), + Amount: sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(916666667500))), }, } - delayedAccount := types.NewPeriodicVestingAccount(baseAccount, vestedCoins, startTime, periods) + delayedAccount, err := types.NewPeriodicVestingAccount(baseAccount, vestedCoins, startTime, periods) + require.NoError(t, err) ctx = ctx.WithBlockTime(time.Unix(1601042400+31536000+1, 0)) accountKeeper.SetAccount(ctx, delayedAccount) // delegation of the original vesting - _, err = stakingKeeper.Delegate(ctx, delegatorAddr, sdk.NewInt(3666666670000), stakingtypes.Unbonded, validator, true) + _, err = stakingKeeper.Delegate(ctx, delegatorAddr, sdkmath.NewInt(3666666670000), stakingtypes.Unbonded, validator, true) require.NoError(t, err) }, cleartTrackingFields, @@ -507,30 +551,33 @@ func TestMigrateVestingAccounts(t *testing.T) { */ startTime := int64(1601042400) baseAccount := createBaseAccount(delegatorAddr) - vestedCoins := sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdk.NewInt(3666666670000))) + bondDenom, err := stakingKeeper.BondDenom(ctx) + require.NoError(t, err) + vestedCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(3666666670000))) periods := []types.Period{ { Length: 31536000, - Amount: sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdk.NewInt(1833333335000))), + Amount: sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(1833333335000))), }, { Length: 15638400, - Amount: sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdk.NewInt(916666667500))), + Amount: sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(916666667500))), }, { Length: 15897600, - Amount: sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdk.NewInt(916666667500))), + Amount: sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(916666667500))), }, } - delayedAccount := types.NewPeriodicVestingAccount(baseAccount, vestedCoins, startTime, periods) + delayedAccount, err := types.NewPeriodicVestingAccount(baseAccount, vestedCoins, startTime, periods) + require.NoError(t, err) ctx = ctx.WithBlockTime(time.Unix(1601042400+31536000+15638400+1, 0)) accountKeeper.SetAccount(ctx, delayedAccount) // delegation of the original vesting - _, err = stakingKeeper.Delegate(ctx, delegatorAddr, sdk.NewInt(3666666670000), stakingtypes.Unbonded, validator, true) + _, err = stakingKeeper.Delegate(ctx, delegatorAddr, sdkmath.NewInt(3666666670000), stakingtypes.Unbonded, validator, true) require.NoError(t, err) }, cleartTrackingFields, @@ -543,14 +590,17 @@ func TestMigrateVestingAccounts(t *testing.T) { "vesting account has unbonding delegations in place", func(ctx sdk.Context, validator stakingtypes.Validator, delegatorAddr sdk.AccAddress) { baseAccount := createBaseAccount(delegatorAddr) - vestedCoins := sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdk.NewInt(300))) + bondDenom, err := stakingKeeper.BondDenom(ctx) + require.NoError(t, err) + vestedCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(300))) - delayedAccount := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().AddDate(10, 0, 0).Unix()) + delayedAccount, err := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().AddDate(10, 0, 0).Unix()) + require.NoError(t, err) accountKeeper.SetAccount(ctx, delayedAccount) // delegation of the original vesting - _, err = stakingKeeper.Delegate(ctx, delegatorAddr, sdk.NewInt(300), stakingtypes.Unbonded, validator, true) + _, err = stakingKeeper.Delegate(ctx, delegatorAddr, sdkmath.NewInt(300), stakingtypes.Unbonded, validator, true) require.NoError(t, err) ctx = ctx.WithBlockTime(ctx.BlockTime().AddDate(1, 0, 0)) @@ -559,7 +609,7 @@ func TestMigrateVestingAccounts(t *testing.T) { require.NoError(t, err) // un-delegation of the original vesting - _, _, err = stakingKeeper.Undelegate(ctx, delegatorAddr, valAddr, sdk.NewDecFromInt(sdk.NewInt(300))) + _, _, err = stakingKeeper.Undelegate(ctx, delegatorAddr, valAddr, sdkmath.LegacyNewDecFromInt(sdkmath.NewInt(300))) require.NoError(t, err) }, cleartTrackingFields, @@ -572,9 +622,12 @@ func TestMigrateVestingAccounts(t *testing.T) { "vesting account has never delegated anything", func(ctx sdk.Context, validator stakingtypes.Validator, delegatorAddr sdk.AccAddress) { baseAccount := createBaseAccount(delegatorAddr) - vestedCoins := sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdk.NewInt(300))) + bondDenom, err := stakingKeeper.BondDenom(ctx) + require.NoError(t, err) + vestedCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(300))) - delayedAccount := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().AddDate(10, 0, 0).Unix()) + delayedAccount, err := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().AddDate(10, 0, 0).Unix()) + require.NoError(t, err) accountKeeper.SetAccount(ctx, delayedAccount) }, @@ -588,9 +641,12 @@ func TestMigrateVestingAccounts(t *testing.T) { "vesting account has no delegation but dirty DelegatedFree and DelegatedVesting fields", func(ctx sdk.Context, validator stakingtypes.Validator, delegatorAddr sdk.AccAddress) { baseAccount := createBaseAccount(delegatorAddr) - vestedCoins := sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdk.NewInt(300))) + bondDenom, err := stakingKeeper.BondDenom(ctx) + require.NoError(t, err) + vestedCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(300))) - delayedAccount := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().AddDate(10, 0, 0).Unix()) + delayedAccount, err := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().AddDate(10, 0, 0).Unix()) + require.NoError(t, err) accountKeeper.SetAccount(ctx, delayedAccount) }, @@ -608,12 +664,12 @@ func TestMigrateVestingAccounts(t *testing.T) { err := accountKeeper.Params.Set(ctx, authtypes.DefaultParams()) require.NoError(t, err) - addrs := simtestutil.AddTestAddrs(bankKeeper, stakingKeeper, ctx, 1, sdk.NewInt(tc.tokenAmount)) + addrs := simtestutil.AddTestAddrs(bankKeeper, stakingKeeper, ctx, 1, sdkmath.NewInt(tc.tokenAmount)) delegatorAddr := addrs[0] _, valAddr := createValidator(t, ctx, bankKeeper, stakingKeeper, tc.tokenAmount*2) - validator, found := stakingKeeper.GetValidator(ctx, valAddr) - require.True(t, found) + validator, err := stakingKeeper.GetValidator(ctx, valAddr) + require.NoError(t, err) tc.prepareFunc(ctx, validator, delegatorAddr) @@ -633,12 +689,15 @@ func TestMigrateVestingAccounts(t *testing.T) { var expVested sdk.Coins var expFree sdk.Coins + bondDenom, err := stakingKeeper.BondDenom(ctx) + require.NoError(t, err) + if tc.expVested != 0 { - expVested = sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdk.NewInt(tc.expVested))) + expVested = sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(tc.expVested))) } if tc.expFree != 0 { - expFree = sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdk.NewInt(tc.expFree))) + expFree = sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(tc.expFree))) } trackingCorrected( @@ -715,7 +774,7 @@ func createValidator(t *testing.T, ctx sdk.Context, bankKeeper bankkeeper.Keeper valAddrs := simtestutil.ConvertAddrsToValAddrs(addrs) pks := simtestutil.CreateTestPubKeys(1) - val1, err := stakingtypes.NewValidator(valAddrs[0], pks[0], stakingtypes.Description{}) + val1, err := stakingtypes.NewValidator(valAddrs[0].String(), pks[0], stakingtypes.Description{}) require.NoError(t, err) stakingKeeper.SetValidator(ctx, val1) diff --git a/x/auth/migrations/v3/store_test.go b/x/auth/migrations/v3/store_test.go index 0b1939220dd1..5ff190ca23fa 100644 --- a/x/auth/migrations/v3/store_test.go +++ b/x/auth/migrations/v3/store_test.go @@ -5,11 +5,10 @@ import ( "testing" "time" - "cosmossdk.io/collections" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/require" + "cosmossdk.io/collections" "cosmossdk.io/depinject" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" diff --git a/x/auth/migrations/v5/migrate.go b/x/auth/migrations/v5/migrate.go index ba1c32c769fa..44fcf970c359 100644 --- a/x/auth/migrations/v5/migrate.go +++ b/x/auth/migrations/v5/migrate.go @@ -3,9 +3,10 @@ package v5 import ( "context" + "github.com/cosmos/gogoproto/types" + "cosmossdk.io/collections" storetypes "cosmossdk.io/core/store" - "github.com/cosmos/gogoproto/types" ) var LegacyGlobalAccountNumberKey = []byte("globalAccountNumber") diff --git a/x/auth/migrations/v5/migrate_test.go b/x/auth/migrations/v5/migrate_test.go index 75e8b65ff042..c0c7113fb580 100644 --- a/x/auth/migrations/v5/migrate_test.go +++ b/x/auth/migrations/v5/migrate_test.go @@ -3,10 +3,11 @@ package v5 import ( "testing" - "cosmossdk.io/collections" - "cosmossdk.io/collections/colltest" "github.com/cosmos/gogoproto/types" "github.com/stretchr/testify/require" + + "cosmossdk.io/collections" + "cosmossdk.io/collections/colltest" ) func TestMigrate(t *testing.T) { diff --git a/x/auth/module.go b/x/auth/module.go index 40bd46896d63..c8f46a9efe58 100644 --- a/x/auth/module.go +++ b/x/auth/module.go @@ -5,20 +5,13 @@ import ( "encoding/json" "fmt" - abci "github.com/cometbft/cometbft/abci/types" gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/spf13/cobra" - - "cosmossdk.io/depinject" - - authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" + modulev1 "cosmossdk.io/api/cosmos/auth/module/v1" "cosmossdk.io/core/address" "cosmossdk.io/core/appmodule" - - modulev1 "cosmossdk.io/api/cosmos/auth/module/v1" - "cosmossdk.io/core/store" + "cosmossdk.io/depinject" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -26,7 +19,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/cosmos-sdk/x/auth/client/cli" "github.com/cosmos/cosmos-sdk/x/auth/exported" "github.com/cosmos/cosmos-sdk/x/auth/keeper" "github.com/cosmos/cosmos-sdk/x/auth/simulation" @@ -40,9 +32,12 @@ const ( ) var ( - _ module.AppModule = AppModule{} - _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModuleBasic = AppModule{} _ module.AppModuleSimulation = AppModule{} + _ module.HasGenesis = AppModule{} + _ module.HasServices = AppModule{} + + _ appmodule.AppModule = AppModule{} ) // AppModuleBasic defines the basic application module used by the auth module. @@ -83,16 +78,6 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *g } } -// GetTxCmd returns the root tx command for the auth module. -func (AppModuleBasic) GetTxCmd() *cobra.Command { - return nil -} - -// GetQueryCmd returns the root query command for the auth module. -func (ab AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.GetQueryCmd(ab.ac) -} - // RegisterInterfaces registers interfaces and implementations of the auth module. func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { types.RegisterInterfaces(registry) @@ -109,8 +94,6 @@ type AppModule struct { legacySubspace exported.Subspace } -var _ appmodule.AppModule = AppModule{} - // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} @@ -127,11 +110,6 @@ func NewAppModule(cdc codec.Codec, accountKeeper keeper.AccountKeeper, randGenAc } } -// Name returns the auth module's name. -func (AppModule) Name() string { - return types.ModuleName -} - // RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { @@ -158,11 +136,10 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { // InitGenesis performs genesis initialization for the auth module. It returns // no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) { var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) am.accountKeeper.InitGenesis(ctx, genesisState) - return []abci.ValidatorUpdate{} } // ExportGenesis returns the exported genesis state as raw bytes for the auth @@ -203,17 +180,10 @@ func (AppModule) WeightedOperations(_ module.SimulationState) []simtypes.Weighte func init() { appmodule.Register(&modulev1.Module{}, - appmodule.Provide(ProvideAddressCodec), appmodule.Provide(ProvideModule), ) } -// ProvideAddressCodec provides an address.Codec to the container for any -// modules that want to do address string <> bytes conversion. -func ProvideAddressCodec(config *modulev1.Module) address.Codec { - return authcodec.NewBech32Codec(config.Bech32Prefix) -} - type ModuleInputs struct { depinject.In @@ -221,6 +191,7 @@ type ModuleInputs struct { StoreService store.KVStoreService Cdc codec.Codec + AddressCodec address.Codec RandomGenesisAccountsFn types.RandomGenesisAccountsFn `optional:"true"` AccountI func() sdk.AccountI `optional:"true"` @@ -255,7 +226,7 @@ func ProvideModule(in ModuleInputs) ModuleOutputs { in.AccountI = types.ProtoBaseAccount } - k := keeper.NewAccountKeeper(in.Cdc, in.StoreService, in.AccountI, maccPerms, in.Config.Bech32Prefix, authority.String()) + k := keeper.NewAccountKeeper(in.Cdc, in.StoreService, in.AccountI, maccPerms, in.AddressCodec, in.Config.Bech32Prefix, authority.String()) m := NewAppModule(in.Cdc, k, in.RandomGenesisAccountsFn, in.LegacySubspace) return ModuleOutputs{AccountKeeper: k, Module: m} diff --git a/x/auth/module_test.go b/x/auth/module_test.go index 961dd362d6fa..742658e5caac 100644 --- a/x/auth/module_test.go +++ b/x/auth/module_test.go @@ -3,9 +3,10 @@ package auth_test import ( "testing" + "github.com/stretchr/testify/require" + "cosmossdk.io/depinject" "cosmossdk.io/log" - "github.com/stretchr/testify/require" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" "github.com/cosmos/cosmos-sdk/x/auth/keeper" diff --git a/x/auth/posthandler/tips.go b/x/auth/posthandler/tips.go deleted file mode 100644 index 33a5f69e9081..000000000000 --- a/x/auth/posthandler/tips.go +++ /dev/null @@ -1,58 +0,0 @@ -package posthandler - -import ( - "fmt" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/cosmos/cosmos-sdk/x/auth/types" -) - -// ValidateBasicDecorator will call tx.ValidateBasic and return any non-nil error. -// If ValidateBasic passes, decorator calls next AnteHandler in chain. Note, -// ValidateBasicDecorator decorator will not get executed on ReCheckTx since it -// is not dependent on application state. -type tipDecorator struct { - bankKeeper types.BankKeeper -} - -// NewTipDecorator returns a new decorator for handling transactions with -// tips. -// -// IMPORTANT: This decorator is still in beta, please use it at your own risk. -func NewTipDecorator(bankKeeper types.BankKeeper) sdk.AnteDecorator { - return tipDecorator{ - bankKeeper: bankKeeper, - } -} - -func (d tipDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { - err := d.transferTip(ctx, tx) - if err != nil { - return ctx, err - } - - return next(ctx, tx, simulate) -} - -// transferTip transfers the tip from the tipper to the fee payer. -func (d tipDecorator) transferTip(ctx sdk.Context, sdkTx sdk.Tx) error { - tipTx, ok := sdkTx.(tx.TipTx) - - // No-op if the tx doesn't have tips. - if !ok || tipTx.GetTip() == nil { - return nil - } - - tipper, err := sdk.AccAddressFromBech32(tipTx.GetTip().Tipper) - if err != nil { - return err - } - - coins := tipTx.GetTip().Amount - if err := d.bankKeeper.IsSendEnabledCoins(ctx, coins...); err != nil { - return fmt.Errorf("cannot tip these coins: %w", err) - } - - return d.bankKeeper.SendCoins(ctx, tipper, tipTx.FeePayer(), coins) -} diff --git a/x/auth/signing/adapter.go b/x/auth/signing/adapter.go index db1bb5fc65c8..42b1b82fdc48 100644 --- a/x/auth/signing/adapter.go +++ b/x/auth/signing/adapter.go @@ -7,6 +7,7 @@ import ( "google.golang.org/protobuf/types/known/anypb" txsigning "cosmossdk.io/x/tx/signing" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" @@ -40,20 +41,24 @@ func GetSignBytesAdapter( return nil, err } - anyPk, err := codectypes.NewAnyWithValue(signerData.PubKey) - if err != nil { - return nil, err - } + var pubKey *anypb.Any + if signerData.PubKey != nil { + anyPk, err := codectypes.NewAnyWithValue(signerData.PubKey) + if err != nil { + return nil, err + } + pubKey = &anypb.Any{ + TypeUrl: anyPk.TypeUrl, + Value: anyPk.Value, + } + } txSignerData := txsigning.SignerData{ ChainID: signerData.ChainID, AccountNumber: signerData.AccountNumber, Sequence: signerData.Sequence, Address: signerData.Address, - PubKey: &anypb.Any{ - TypeUrl: anyPk.TypeUrl, - Value: anyPk.Value, - }, + PubKey: pubKey, } // Generate the bytes to be signed. return handlerMap.GetSignBytes(ctx, txSignMode, txSignerData, txData) diff --git a/x/auth/signing/adapter_test.go b/x/auth/signing/adapter_test.go new file mode 100644 index 000000000000..aa22ef0a35af --- /dev/null +++ b/x/auth/signing/adapter_test.go @@ -0,0 +1,33 @@ +package signing_test + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/testutil/testdata" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + authsign "github.com/cosmos/cosmos-sdk/x/auth/signing" +) + +func TestGetSignBytesAdapterNoPublicKey(t *testing.T) { + encodingConfig := moduletestutil.MakeTestEncodingConfig() + txConfig := encodingConfig.TxConfig + _, _, addr := testdata.KeyTestPubAddr() + signerData := authsign.SignerData{ + Address: addr.String(), + ChainID: "test-chain", + AccountNumber: 11, + Sequence: 15, + } + w := txConfig.NewTxBuilder() + _, err := authsign.GetSignBytesAdapter( + context.Background(), + txConfig.SignModeHandler(), + signing.SignMode_SIGN_MODE_DIRECT, + signerData, + w.GetTx()) + require.NoError(t, err) +} diff --git a/x/auth/signing/handler_map.go b/x/auth/signing/handler_map.go index fcb935c4d586..3794e12f99d8 100644 --- a/x/auth/signing/handler_map.go +++ b/x/auth/signing/handler_map.go @@ -4,9 +4,8 @@ import ( "context" "fmt" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx/signing" ) // SignModeHandlerMap is SignModeHandler that aggregates multiple SignModeHandler's into diff --git a/x/auth/signing/sig_verifiable_tx.go b/x/auth/signing/sig_verifiable_tx.go index 7aa05219f1cd..c8a752e7e475 100644 --- a/x/auth/signing/sig_verifiable_tx.go +++ b/x/auth/signing/sig_verifiable_tx.go @@ -3,7 +3,6 @@ package signing import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" ) @@ -17,13 +16,12 @@ type SigVerifiableTx interface { } // Tx defines a transaction interface that supports all standard message, signature -// fee, memo, tips, and auxiliary interfaces. +// fee, memo and auxiliary interfaces. type Tx interface { SigVerifiableTx types.TxWithMemo types.FeeTx - tx.TipTx types.TxWithTimeoutHeight types.HasValidateBasic } diff --git a/x/auth/signing/verify.go b/x/auth/signing/verify.go index 6dbf7543a26e..a025687c1189 100644 --- a/x/auth/signing/verify.go +++ b/x/auth/signing/verify.go @@ -6,6 +6,7 @@ import ( signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" txsigning "cosmossdk.io/x/tx/signing" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/crypto/types/multisig" "github.com/cosmos/cosmos-sdk/types/tx/signing" diff --git a/x/auth/simulation/genesis.go b/x/auth/simulation/genesis.go index 1f9d45e55275..c6984cc355e8 100644 --- a/x/auth/simulation/genesis.go +++ b/x/auth/simulation/genesis.go @@ -47,7 +47,10 @@ func RandomGenesisAccounts(simState *module.SimulationState) types.GenesisAccoun endTime = int64(simulation.RandIntBetween(simState.Rand, int(startTime)+1, int(startTime+(60*60*12)))) } - bva := vestingtypes.NewBaseVestingAccount(bacc, initialVesting, endTime) + bva, err := vestingtypes.NewBaseVestingAccount(bacc, initialVesting, endTime) + if err != nil { + panic(err) + } if simState.Rand.Intn(100) < 50 { genesisAccs[i] = vestingtypes.NewContinuousVestingAccountRaw(bva, startTime) diff --git a/x/auth/simulation/genesis_test.go b/x/auth/simulation/genesis_test.go index 4b8f48ef76b0..1ad07afd32f8 100644 --- a/x/auth/simulation/genesis_test.go +++ b/x/auth/simulation/genesis_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/require" sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/types/module" diff --git a/x/auth/testutil/app_config.go b/x/auth/testutil/app_config.go index ceeafe403b72..c8e88f2bc6b2 100644 --- a/x/auth/testutil/app_config.go +++ b/x/auth/testutil/app_config.go @@ -2,7 +2,6 @@ package testutil import ( "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/auth/vesting" // import as blank for app wiring diff --git a/x/auth/tx/README.md b/x/auth/tx/README.md index 0460f69d8b6c..1706690d324d 100644 --- a/x/auth/tx/README.md +++ b/x/auth/tx/README.md @@ -4,9 +4,7 @@ sidebar_position: 1 # `x/auth/tx` -:::note - -### Pre-requisite Readings +:::note Pre-requisite Readings * [Transactions](https://docs.cosmos.network/main/core/transactions#transaction-generation) * [Encoding](https://docs.cosmos.network/main/core/encoding#transaction-encoding) diff --git a/x/auth/tx/adapter.go b/x/auth/tx/adapter.go index 1c2f113a7b83..5ce5c8a91981 100644 --- a/x/auth/tx/adapter.go +++ b/x/auth/tx/adapter.go @@ -8,11 +8,15 @@ import ( signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" txsigning "cosmossdk.io/x/tx/signing" + "github.com/cosmos/cosmos-sdk/types/tx" ) // GetSigningTxData returns an x/tx/signing.TxData representation of a transaction for use in the signing -// API defined in x/tx. +// API defined in x/tx. The reason for all of this conversion is that x/tx depends on the protoreflect API +// defined in google.golang.org/protobuf while x/auth/tx depends on the legacy proto API defined in +// github.com/gogo/protobuf and the downstream SDK fork of that library, github.com/cosmos/gogoproto. +// Therefore we need to convert between the two APIs. func (w *wrapper) GetSigningTxData() txsigning.TxData { body := w.tx.Body authInfo := w.tx.AuthInfo @@ -50,23 +54,6 @@ func (w *wrapper) GetSigningTxData() txsigning.TxData { } } - var txTip *txv1beta1.Tip - tip := authInfo.Tip - if tip != nil { - tipCoins := tip.GetAmount() - tipAmount := make([]*basev1beta1.Coin, len(tipCoins)) - for i, coin := range tipCoins { - tipAmount[i] = &basev1beta1.Coin{ - Denom: coin.Denom, - Amount: coin.Amount.String(), - } - } - txTip = &txv1beta1.Tip{ - Amount: tipAmount, - Tipper: tip.Tipper, - } - } - txSignerInfos := make([]*txv1beta1.SignerInfo, len(authInfo.SignerInfos)) for i, signerInfo := range authInfo.SignerInfos { modeInfo := &txv1beta1.ModeInfo{} @@ -90,7 +77,6 @@ func (w *wrapper) GetSigningTxData() txsigning.TxData { Payer: authInfo.Fee.Payer, Granter: authInfo.Fee.Granter, }, - Tip: txTip, } txBody := &txv1beta1.TxBody{ diff --git a/x/auth/tx/aux_test.go b/x/auth/tx/aux_test.go index 6f461c246c74..68f342c8e6df 100644 --- a/x/auth/tx/aux_test.go +++ b/x/auth/tx/aux_test.go @@ -4,7 +4,6 @@ import ( "context" "testing" - "cosmossdk.io/math" "github.com/stretchr/testify/require" clienttx "github.com/cosmos/cosmos-sdk/client/tx" @@ -13,7 +12,6 @@ import ( _ "github.com/cosmos/cosmos-sdk/testutil/testdata/testpb" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - txtypes "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" ) @@ -24,9 +22,9 @@ var ( aux2Priv, aux2Pk, aux2Addr = testdata.KeyTestPubAddr() feepayerPriv, feepayerPk, feepayerAddr = testdata.KeyTestPubAddr() - msg = testdata.NewTestMsg(tipperAddr, aux2Addr) - memo = "test-memo" - tip = &txtypes.Tip{Tipper: tipperAddr.String(), Amount: sdk.NewCoins(sdk.NewCoin("tip-denom", math.NewIntFromUint64(123)))} + msg = testdata.NewTestMsg(tipperAddr, aux2Addr) + memo = "test-memo" + chainID = "test-chain" gas = testdata.NewTestGasLimit() fee = testdata.NewTestFeeAmount() @@ -46,8 +44,8 @@ func TestBuilderWithAux(t *testing.T) { testdata.RegisterInterfaces(interfaceRegistry) // Create an AuxTxBuilder for tipper (1st signer) - tipperBuilder, tipperSig := makeTipperTxBuilder(t) - tipperSignerData, err := tipperBuilder.GetAuxSignerData() + txBuilder, txSig := makeTxBuilder(t) + txSignerData, err := txBuilder.GetAuxSignerData() require.NoError(t, err) // Create an AuxTxBuilder for aux2 (2nd signer) @@ -58,9 +56,10 @@ func TestBuilderWithAux(t *testing.T) { aux2Builder.SetTimeoutHeight(3) aux2Builder.SetMemo(memo) aux2Builder.SetChainID(chainID) - aux2Builder.SetMsgs(msg) - aux2Builder.SetPubKey(aux2Pk) - aux2Builder.SetTip(tip) + err = aux2Builder.SetMsgs(msg) + require.NoError(t, err) + err = aux2Builder.SetPubKey(aux2Pk) + require.NoError(t, err) extOptAny, err := codectypes.NewAnyWithValue(extOpt) require.NoError(t, err) aux2Builder.SetExtensionOptions(extOptAny) @@ -89,30 +88,28 @@ func TestBuilderWithAux(t *testing.T) { malleate func() expErr bool }{ - {"address and msg signer mistacher", func() { tipperBuilder.SetAddress("foobar") }, true}, - {"memo mismatch", func() { tipperBuilder.SetMemo("mismatch") }, true}, - {"timeout height mismatch", func() { tipperBuilder.SetTimeoutHeight(98) }, true}, - {"extension options length mismatch", func() { tipperBuilder.SetExtensionOptions() }, true}, - {"extension options member mismatch", func() { tipperBuilder.SetExtensionOptions(&codectypes.Any{}) }, true}, - {"non-critical extension options length mismatch", func() { tipperBuilder.SetNonCriticalExtensionOptions() }, true}, - {"non-critical extension options member mismatch", func() { tipperBuilder.SetNonCriticalExtensionOptions(&codectypes.Any{}) }, true}, - {"tip amount mismatch", func() { tipperBuilder.SetTip(&txtypes.Tip{Tipper: tip.Tipper, Amount: sdk.NewCoins()}) }, true}, - {"tipper mismatch", func() { tipperBuilder.SetTip(&txtypes.Tip{Tipper: "mismatch", Amount: tip.Amount}) }, true}, + {"address and msg signer mistacher", func() { txBuilder.SetAddress("foobar") }, true}, + {"memo mismatch", func() { txBuilder.SetMemo("mismatch") }, true}, + {"timeout height mismatch", func() { txBuilder.SetTimeoutHeight(98) }, true}, + {"extension options length mismatch", func() { txBuilder.SetExtensionOptions() }, true}, + {"extension options member mismatch", func() { txBuilder.SetExtensionOptions(&codectypes.Any{}) }, true}, + {"non-critical extension options length mismatch", func() { txBuilder.SetNonCriticalExtensionOptions() }, true}, + {"non-critical extension options member mismatch", func() { txBuilder.SetNonCriticalExtensionOptions(&codectypes.Any{}) }, true}, {"happy case", func() {}, false}, } for _, tc := range testcases { tc := tc t.Run(tc.name, func(t *testing.T) { - tipperBuilder, tipperSig = makeTipperTxBuilder(t) + txBuilder, txSig = makeTxBuilder(t) tc.malleate() - _, err := tipperBuilder.GetSignBytes() + _, err := txBuilder.GetSignBytes() require.NoError(t, err) - tipperSignerData, err = tipperBuilder.GetAuxSignerData() + txSignerData, err = txBuilder.GetAuxSignerData() require.NoError(t, err) - err = w.AddAuxSignerData(tipperSignerData) + err = w.AddAuxSignerData(txSignerData) if tc.expErr { require.Error(t, err) } else { @@ -126,10 +123,10 @@ func TestBuilderWithAux(t *testing.T) { w.SetGasLimit(gas) sigs, err := w.(authsigning.SigVerifiableTx).GetSignaturesV2() require.NoError(t, err) - tipperSigV2 := sigs[0] + txSigV2 := sigs[0] aux2SigV2 := sigs[1] // Set all signer infos. - w.SetSignatures(tipperSigV2, aux2SigV2, signing.SignatureV2{ + w.SetSignatures(txSigV2, aux2SigV2, signing.SignatureV2{ PubKey: feepayerPk, Sequence: 15, }) @@ -149,7 +146,7 @@ func TestBuilderWithAux(t *testing.T) { feepayerSig, err := feepayerPriv.Sign(signBz) require.NoError(t, err) // Set all signatures. - w.SetSignatures(tipperSigV2, aux2SigV2, signing.SignatureV2{ + w.SetSignatures(txSigV2, aux2SigV2, signing.SignatureV2{ PubKey: feepayerPk, Data: &signing.SingleSignatureData{ SignMode: signing.SignMode_SIGN_MODE_DIRECT, @@ -166,7 +163,6 @@ func TestBuilderWithAux(t *testing.T) { require.Equal(t, tx.(sdk.FeeTx).FeePayer(), []byte(feepayerAddr)) require.Equal(t, tx.(sdk.FeeTx).GetFee(), fee) require.Equal(t, tx.(sdk.FeeTx).GetGas(), gas) - require.Equal(t, tip, tx.(txtypes.TipTx).GetTip()) require.Equal(t, msg, tx.GetMsgs()[0]) require.Equal(t, memo, tx.(sdk.TxWithMemo).GetMemo()) require.Equal(t, uint64(3), tx.(sdk.TxWithTimeoutHeight).GetTimeoutHeight()) @@ -175,7 +171,7 @@ func TestBuilderWithAux(t *testing.T) { require.Len(t, sigs, 3) require.Equal(t, signing.SignatureV2{ PubKey: tipperPk, - Data: &signing.SingleSignatureData{SignMode: signing.SignMode_SIGN_MODE_DIRECT_AUX, Signature: tipperSig}, + Data: &signing.SingleSignatureData{SignMode: signing.SignMode_SIGN_MODE_DIRECT_AUX, Signature: txSig}, Sequence: 2, }, sigs[0]) require.Equal(t, signing.SignatureV2{ @@ -190,28 +186,30 @@ func TestBuilderWithAux(t *testing.T) { }, sigs[2]) } -func makeTipperTxBuilder(t *testing.T) (clienttx.AuxTxBuilder, []byte) { - tipperBuilder := clienttx.NewAuxTxBuilder() - tipperBuilder.SetAddress(tipperAddr.String()) - tipperBuilder.SetAccountNumber(1) - tipperBuilder.SetSequence(2) - tipperBuilder.SetTimeoutHeight(3) - tipperBuilder.SetMemo(memo) - tipperBuilder.SetChainID(chainID) - tipperBuilder.SetMsgs(msg) - tipperBuilder.SetPubKey(tipperPk) - tipperBuilder.SetTip(tip) +func makeTxBuilder(t *testing.T) (clienttx.AuxTxBuilder, []byte) { + t.Helper() + txBuilder := clienttx.NewAuxTxBuilder() + txBuilder.SetAddress(tipperAddr.String()) + txBuilder.SetAccountNumber(1) + txBuilder.SetSequence(2) + txBuilder.SetTimeoutHeight(3) + txBuilder.SetMemo(memo) + txBuilder.SetChainID(chainID) + err := txBuilder.SetMsgs(msg) + require.NoError(t, err) + err = txBuilder.SetPubKey(tipperPk) + require.NoError(t, err) extOptAny, err := codectypes.NewAnyWithValue(extOpt) require.NoError(t, err) - tipperBuilder.SetExtensionOptions(extOptAny) - tipperBuilder.SetNonCriticalExtensionOptions(extOptAny) - err = tipperBuilder.SetSignMode(signing.SignMode_SIGN_MODE_DIRECT_AUX) + txBuilder.SetExtensionOptions(extOptAny) + txBuilder.SetNonCriticalExtensionOptions(extOptAny) + err = txBuilder.SetSignMode(signing.SignMode_SIGN_MODE_DIRECT_AUX) require.NoError(t, err) - signBz, err := tipperBuilder.GetSignBytes() + signBz, err := txBuilder.GetSignBytes() require.NoError(t, err) tipperSig, err := tipperPriv.Sign(signBz) require.NoError(t, err) - tipperBuilder.SetSignature(tipperSig) + txBuilder.SetSignature(tipperSig) - return tipperBuilder, tipperSig + return txBuilder, tipperSig } diff --git a/x/auth/tx/builder.go b/x/auth/tx/builder.go index 7cd594235873..628c9618fcd5 100644 --- a/x/auth/tx/builder.go +++ b/x/auth/tx/builder.go @@ -45,10 +45,8 @@ type wrapper struct { var ( _ authsigning.Tx = &wrapper{} _ client.TxBuilder = &wrapper{} - _ tx.TipTx = &wrapper{} _ ante.HasExtensionOptionsTx = &wrapper{} _ ExtensionOptionsTxBuilder = &wrapper{} - _ tx.TipTx = &wrapper{} ) // ExtensionOptionsTxBuilder defines a TxBuilder that can also set extensions. @@ -210,16 +208,8 @@ func (w *wrapper) FeePayer() []byte { return signers[0] } -func (w *wrapper) FeeGranter() string { - feeGranter := w.tx.AuthInfo.Fee.Granter - if feeGranter != "" { - return feeGranter - } - return "" -} - -func (w *wrapper) GetTip() *tx.Tip { - return w.tx.AuthInfo.Tip +func (w *wrapper) FeeGranter() []byte { + return w.tx.FeeGranter(w.cdc) } func (w *wrapper) GetMemo() string { @@ -322,13 +312,6 @@ func (w *wrapper) SetFeeAmount(coins sdk.Coins) { w.authInfoBz = nil } -func (w *wrapper) SetTip(tip *tx.Tip) { - w.tx.AuthInfo.Tip = tip - - // set authInfoBz to nil because the cached authInfoBz no longer matches tx.AuthInfo - w.authInfoBz = nil -} - func (w *wrapper) SetFeePayer(feePayer sdk.AccAddress) { if w.tx.AuthInfo.Fee == nil { w.tx.AuthInfo.Fee = &tx.Fee{} @@ -357,11 +340,17 @@ func (w *wrapper) SetSignatures(signatures ...signing.SignatureV2) error { rawSigs := make([][]byte, n) for i, sig := range signatures { - var modeInfo *tx.ModeInfo + var ( + modeInfo *tx.ModeInfo + pubKey *codectypes.Any + err error + ) modeInfo, rawSigs[i] = SignatureDataToModeInfoAndSig(sig.Data) - pubKey, err := codectypes.NewAnyWithValue(sig.PubKey) - if err != nil { - return err + if sig.PubKey != nil { + pubKey, err = codectypes.NewAnyWithValue(sig.PubKey) + if err != nil { + return err + } } signerInfos[i] = &tx.SignerInfo{ PublicKey: pubKey, @@ -503,14 +492,6 @@ func (w *wrapper) AddAuxSignerData(data tx.AuxSignerData) error { } } } - if w.tx.AuthInfo.Tip != nil && data.SignDoc.Tip != nil { - if !w.tx.AuthInfo.Tip.Amount.Equal(data.SignDoc.Tip.Amount) { - return sdkerrors.ErrInvalidRequest.Wrapf("TxBuilder has tip %+v, got %+v in AuxSignerData", w.tx.AuthInfo.Tip.Amount, data.SignDoc.Tip.Amount) - } - if w.tx.AuthInfo.Tip.Tipper != data.SignDoc.Tip.Tipper { - return sdkerrors.ErrInvalidRequest.Wrapf("TxBuilder has tipper %s, got %s in AuxSignerData", w.tx.AuthInfo.Tip.Tipper, data.SignDoc.Tip.Tipper) - } - } w.SetMemo(body.Memo) w.SetTimeoutHeight(body.TimeoutHeight) @@ -524,7 +505,6 @@ func (w *wrapper) AddAuxSignerData(data tx.AuxSignerData) error { if err != nil { return err } - w.SetTip(data.GetSignDoc().GetTip()) // Get the aux signer's index in GetSigners. signerIndex := -1 diff --git a/x/auth/tx/builder_test.go b/x/auth/tx/builder_test.go index c817b1718d80..2fb88905beb2 100644 --- a/x/auth/tx/builder_test.go +++ b/x/auth/tx/builder_test.go @@ -127,6 +127,20 @@ func TestTxBuilder(t *testing.T) { }) } +func TestSetSignaturesNoPublicKey(t *testing.T) { + _, pubkey, _ := testdata.KeyTestPubAddr() + txBuilder := newBuilder(nil) + sig2 := signing.SignatureV2{ + Data: &signing.SingleSignatureData{ + SignMode: signing.SignMode_SIGN_MODE_DIRECT, + Signature: legacy.Cdc.MustMarshal(pubkey), + }, + Sequence: 1, + } + err := txBuilder.SetSignatures(sig2) + require.NoError(t, err) +} + func TestBuilderValidateBasic(t *testing.T) { // keys and addresses _, pubKey1, addr1 := testdata.KeyTestPubAddr() @@ -307,7 +321,7 @@ func TestBuilderFeeGranter(t *testing.T) { feeAmount := testdata.NewTestFeeAmount() msgs := []sdk.Msg{msg1} - txBuilder := newBuilder(nil) + txBuilder := newBuilder(testutil.CodecOptions{}.NewCodec()) err := txBuilder.SetMsgs(msgs...) require.NoError(t, err) txBuilder.SetGasLimit(200000) @@ -317,5 +331,5 @@ func TestBuilderFeeGranter(t *testing.T) { // set fee granter txBuilder.SetFeeGranter(addr1) - require.Equal(t, addr1.String(), txBuilder.GetTx().FeeGranter()) + require.Equal(t, addr1.String(), sdk.AccAddress(txBuilder.GetTx().FeeGranter()).String()) } diff --git a/x/auth/tx/config.go b/x/auth/tx/config.go index 1f0a05f48dc6..8aab60c5192f 100644 --- a/x/auth/tx/config.go +++ b/x/auth/tx/config.go @@ -22,7 +22,7 @@ type config struct { encoder sdk.TxEncoder jsonDecoder sdk.TxDecoder jsonEncoder sdk.TxEncoder - protoCodec codec.ProtoCodecMarshaler + protoCodec codec.Codec signingContext *txsigning.Context } @@ -73,7 +73,7 @@ var DefaultSignModes = []signingtypes.SignMode{ // We prefer to use depinject to provide client.TxConfig, but we permit this constructor usage. Within the SDK, // this constructor is primarily used in tests, but also sees usage in app chains like: // https://github.com/evmos/evmos/blob/719363fbb92ff3ea9649694bd088e4c6fe9c195f/encoding/config.go#L37 -func NewTxConfig(protoCodec codec.ProtoCodecMarshaler, enabledSignModes []signingtypes.SignMode, +func NewTxConfig(protoCodec codec.Codec, enabledSignModes []signingtypes.SignMode, customSignModes ...txsigning.SignModeHandler, ) client.TxConfig { txConfig, err := NewTxConfigWithOptions(protoCodec, ConfigOptions{ @@ -99,9 +99,8 @@ func NewDefaultSigningOptions() (*txsigning.Options, error) { // NewSigningHandlerMap returns a new txsigning.HandlerMap using the provided ConfigOptions. // It is recommended to use types.InterfaceRegistry in the field ConfigOptions.FileResolver as shown in // NewTxConfigWithOptions but this fn does not enforce it. -func NewSigningHandlerMap(configOptions ConfigOptions) (*txsigning.HandlerMap, error) { +func NewSigningHandlerMap(configOpts ConfigOptions) (*txsigning.HandlerMap, error) { var err error - configOpts := &configOptions if configOpts.SigningOptions == nil { configOpts.SigningOptions, err = NewDefaultSigningOptions() if err != nil { @@ -165,9 +164,13 @@ func NewSigningHandlerMap(configOptions ConfigOptions) (*txsigning.HandlerMap, e // NewTxConfigWithOptions returns a new protobuf TxConfig using the provided ProtoCodec, ConfigOptions and // custom sign mode handlers. If ConfigOptions is an empty struct then default values will be used. -func NewTxConfigWithOptions(protoCodec codec.ProtoCodecMarshaler, configOptions ConfigOptions) (client.TxConfig, error) { +func NewTxConfigWithOptions(protoCodec codec.Codec, configOptions ConfigOptions) (client.TxConfig, error) { txConfig := &config{ - protoCodec: protoCodec, + protoCodec: protoCodec, + decoder: configOptions.ProtoDecoder, + encoder: configOptions.ProtoEncoder, + jsonDecoder: configOptions.JSONDecoder, + jsonEncoder: configOptions.JSONEncoder, } if configOptions.ProtoDecoder == nil { txConfig.decoder = DefaultTxDecoder(protoCodec) @@ -183,27 +186,25 @@ func NewTxConfigWithOptions(protoCodec codec.ProtoCodecMarshaler, configOptions } var err error - opts := &configOptions - if opts.SigningContext == nil { - signingOpts := configOptions.SigningOptions - if signingOpts == nil { - signingOpts, err = NewDefaultSigningOptions() + if configOptions.SigningContext == nil { + if configOptions.SigningOptions == nil { + configOptions.SigningOptions, err = NewDefaultSigningOptions() if err != nil { return nil, err } } - if signingOpts.FileResolver == nil { - signingOpts.FileResolver = protoCodec.InterfaceRegistry() + if configOptions.SigningOptions.FileResolver == nil { + configOptions.SigningOptions.FileResolver = protoCodec.InterfaceRegistry() } - opts.SigningContext, err = txsigning.NewContext(*signingOpts) + configOptions.SigningContext, err = txsigning.NewContext(*configOptions.SigningOptions) if err != nil { return nil, err } } - txConfig.signingContext = opts.SigningContext + txConfig.signingContext = configOptions.SigningContext - if opts.SigningHandler != nil { - txConfig.handler = opts.SigningHandler + if configOptions.SigningHandler != nil { + txConfig.handler = configOptions.SigningHandler return txConfig, nil } diff --git a/x/auth/tx/config/config.go b/x/auth/tx/config/config.go index b249dbf94390..1a6bba6b4da5 100644 --- a/x/auth/tx/config/config.go +++ b/x/auth/tx/config/config.go @@ -7,25 +7,23 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" grpcstatus "google.golang.org/grpc/status" + "google.golang.org/protobuf/reflect/protoreflect" bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" txconfigv1 "cosmossdk.io/api/cosmos/tx/config/v1" - "cosmossdk.io/depinject" - + "cosmossdk.io/core/address" "cosmossdk.io/core/appmodule" + "cosmossdk.io/depinject" txsigning "cosmossdk.io/x/tx/signing" "cosmossdk.io/x/tx/signing/textual" - signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" - - authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" - "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/registry" + signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth/ante" "github.com/cosmos/cosmos-sdk/x/auth/posthandler" "github.com/cosmos/cosmos-sdk/x/auth/tx" @@ -42,22 +40,27 @@ func init() { type ModuleInputs struct { depinject.In - Config *txconfigv1.Config - ProtoCodecMarshaler codec.ProtoCodecMarshaler - ProtoFileResolver txsigning.ProtoFileResolver + + Config *txconfigv1.Config + AddressCodec address.Codec + ValidatorAddressCodec runtime.ValidatorAddressCodec + Codec codec.Codec + ProtoFileResolver txsigning.ProtoFileResolver // BankKeeper is the expected bank keeper to be passed to AnteHandlers BankKeeper authtypes.BankKeeper `optional:"true"` MetadataBankKeeper BankKeeper `optional:"true"` AccountKeeper ante.AccountKeeper `optional:"true"` FeeGrantKeeper ante.FeegrantKeeper `optional:"true"` CustomSignModeHandlers func() []txsigning.SignModeHandler `optional:"true"` + CustomGetSigners []txsigning.CustomGetSigner `optional:"true"` } type ModuleOutputs struct { depinject.Out - TxConfig client.TxConfig - BaseAppOption runtime.BaseAppOption + TxConfig client.TxConfig + TxConfigOptions tx.ConfigOptions + BaseAppOption runtime.BaseAppOption } func ProvideProtoRegistry() txsigning.ProtoFileResolver { @@ -69,29 +72,29 @@ func ProvideModule(in ModuleInputs) ModuleOutputs { if in.CustomSignModeHandlers != nil { customSignModeHandlers = in.CustomSignModeHandlers() } - sdkConfig := sdk.GetConfig() txConfigOptions := tx.ConfigOptions{ EnabledSignModes: tx.DefaultSignModes, SigningOptions: &txsigning.Options{ - FileResolver: in.ProtoFileResolver, - // From static config? But this is already in auth config. - // - Provide codecs there as types? - // - Provide static prefix there exported from config? - // - Just do as below? - AddressCodec: authcodec.NewBech32Codec(sdkConfig.GetBech32AccountAddrPrefix()), - ValidatorAddressCodec: authcodec.NewBech32Codec(sdkConfig.GetBech32ValidatorAddrPrefix()), + FileResolver: in.ProtoFileResolver, + AddressCodec: in.AddressCodec, + ValidatorAddressCodec: in.ValidatorAddressCodec, + CustomGetSigners: make(map[protoreflect.FullName]txsigning.GetSignersFunc), }, CustomSignModes: customSignModeHandlers, } + for _, mode := range in.CustomGetSigners { + txConfigOptions.SigningOptions.CustomGetSigners[mode.MsgType] = mode.Fn + } + // enable SIGN_MODE_TEXTUAL only if bank keeper is available if in.MetadataBankKeeper != nil { txConfigOptions.EnabledSignModes = append(txConfigOptions.EnabledSignModes, signingtypes.SignMode_SIGN_MODE_TEXTUAL) txConfigOptions.TextualCoinMetadataQueryFn = NewBankKeeperCoinMetadataQueryFn(in.MetadataBankKeeper) } - txConfig, err := tx.NewTxConfigWithOptions(in.ProtoCodecMarshaler, txConfigOptions) + txConfig, err := tx.NewTxConfigWithOptions(in.Codec, txConfigOptions) if err != nil { panic(err) } @@ -135,7 +138,7 @@ func ProvideModule(in ModuleInputs) ModuleOutputs { app.SetTxEncoder(txConfig.TxEncoder()) } - return ModuleOutputs{TxConfig: txConfig, BaseAppOption: baseAppOption} + return ModuleOutputs{TxConfig: txConfig, TxConfigOptions: txConfigOptions, BaseAppOption: baseAppOption} } func newAnteHandler(txConfig client.TxConfig, in ModuleInputs) (sdk.AnteHandler, error) { @@ -162,9 +165,7 @@ func newAnteHandler(txConfig client.TxConfig, in ModuleInputs) (sdk.AnteHandler, // NewBankKeeperCoinMetadataQueryFn creates a new Textual struct using the given // BankKeeper to retrieve coin metadata. // -// Note: Once we switch to ADR-033, and keepers become ADR-033 clients to each -// other, this function could probably be deprecated in favor of -// `NewTextualWithGRPCConn`. +// This function should be used in the server (app.go) and is already injected thanks to app wiring for app_v2. func NewBankKeeperCoinMetadataQueryFn(bk BankKeeper) textual.CoinMetadataQueryFn { return func(ctx context.Context, denom string) (*bankv1beta1.Metadata, error) { res, err := bk.DenomMetadata(ctx, &types.QueryDenomMetadataRequest{Denom: denom}) @@ -203,7 +204,9 @@ func NewBankKeeperCoinMetadataQueryFn(bk BankKeeper) textual.CoinMetadataQueryFn // Example: // // clientCtx := client.GetClientContextFromCmd(cmd) -// txt := tx.NewTextualWithGRPCConn(clientCtxx) +// txt := tx.NewTextualWithGRPCConn(clientCtx) +// +// This should be used in the client (root.go) of an application. func NewGRPCCoinMetadataQueryFn(grpcConn grpc.ClientConnInterface) textual.CoinMetadataQueryFn { return func(ctx context.Context, denom string) (*bankv1beta1.Metadata, error) { bankQueryClient := bankv1beta1.NewQueryClient(grpcConn) diff --git a/x/auth/tx/config_test.go b/x/auth/tx/config_test.go index ebfb3d628977..c07b39b171b7 100644 --- a/x/auth/tx/config_test.go +++ b/x/auth/tx/config_test.go @@ -1,15 +1,18 @@ -package tx +package tx_test import ( "testing" + "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/testutil" + "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/std" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/tx" txtestutil "github.com/cosmos/cosmos-sdk/x/auth/tx/testutil" ) @@ -18,5 +21,16 @@ func TestGenerator(t *testing.T) { std.RegisterInterfaces(interfaceRegistry) interfaceRegistry.RegisterImplementations((*sdk.Msg)(nil), &testdata.TestMsg{}) protoCodec := codec.NewProtoCodec(interfaceRegistry) - suite.Run(t, txtestutil.NewTxConfigTestSuite(NewTxConfig(protoCodec, DefaultSignModes))) + suite.Run(t, txtestutil.NewTxConfigTestSuite(tx.NewTxConfig(protoCodec, tx.DefaultSignModes))) +} + +func TestConfigOptions(t *testing.T) { + interfaceRegistry := types.NewInterfaceRegistry() + protoCodec := codec.NewProtoCodec(interfaceRegistry) + configOptions := tx.ConfigOptions{} + txConfig, err := tx.NewTxConfigWithOptions(protoCodec, configOptions) + require.NoError(t, err) + require.NotNil(t, txConfig) + handler := txConfig.SignModeHandler() + require.NotNil(t, handler) } diff --git a/x/auth/tx/decoder.go b/x/auth/tx/decoder.go index 16253a4ba154..d74c7f206597 100644 --- a/x/auth/tx/decoder.go +++ b/x/auth/tx/decoder.go @@ -15,7 +15,7 @@ import ( ) // DefaultTxDecoder returns a default protobuf TxDecoder using the provided Marshaler. -func DefaultTxDecoder(cdc codec.ProtoCodecMarshaler) sdk.TxDecoder { +func DefaultTxDecoder(cdc codec.Codec) sdk.TxDecoder { return func(txBytes []byte) (sdk.Tx, error) { // Make sure txBytes follow ADR-027. err := rejectNonADR027TxRaw(txBytes) @@ -79,7 +79,7 @@ func DefaultTxDecoder(cdc codec.ProtoCodecMarshaler) sdk.TxDecoder { } // DefaultJSONTxDecoder returns a default protobuf JSON TxDecoder using the provided Marshaler. -func DefaultJSONTxDecoder(cdc codec.ProtoCodecMarshaler) sdk.TxDecoder { +func DefaultJSONTxDecoder(cdc codec.Codec) sdk.TxDecoder { return func(txBytes []byte) (sdk.Tx, error) { var theTx tx.Tx err := cdc.UnmarshalJSON(txBytes, &theTx) diff --git a/x/auth/tx/direct.go b/x/auth/tx/direct.go index 4acc52a08dd6..f679e39d10ae 100644 --- a/x/auth/tx/direct.go +++ b/x/auth/tx/direct.go @@ -3,10 +3,9 @@ package tx import ( "fmt" - signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" - sdk "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types/tx" + signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth/signing" ) diff --git a/x/auth/tx/direct_aux.go b/x/auth/tx/direct_aux.go index 75671a0fc409..31a3d9572384 100644 --- a/x/auth/tx/direct_aux.go +++ b/x/auth/tx/direct_aux.go @@ -1,8 +1,8 @@ package tx import ( - "bytes" "fmt" + "strings" errorsmod "cosmossdk.io/errors" @@ -56,13 +56,8 @@ func (signModeDirectAuxHandler) GetSignBytes( // Fee payer cannot use SIGN_MODE_DIRECT_AUX, because SIGN_MODE_DIRECT_AUX // does not sign over fees, which would create malleability issues. - addrBz, err := sdk.AccAddressFromBech32(data.Address) - if err != nil { - return nil, err - } - - if bytes.Equal(feePayer, addrBz) { - return nil, sdkerrors.ErrUnauthorized.Wrapf("fee payer %s cannot sign with %s", feePayer, signingtypes.SignMode_SIGN_MODE_DIRECT_AUX) + if strings.EqualFold(sdk.AccAddress(feePayer).String(), data.Address) { + return nil, sdkerrors.ErrUnauthorized.Wrapf("fee payer %s cannot sign with %s", sdk.AccAddress(feePayer).String(), signingtypes.SignMode_SIGN_MODE_DIRECT_AUX) } signDocDirectAux := types.SignDocDirectAux{ diff --git a/x/auth/tx/direct_aux_test.go b/x/auth/tx/direct_aux_test.go index 32f76b17fbb8..7492b43431eb 100644 --- a/x/auth/tx/direct_aux_test.go +++ b/x/auth/tx/direct_aux_test.go @@ -50,7 +50,6 @@ func TestDirectAuxHandler(t *testing.T) { } fee := txtypes.Fee{Amount: sdk.NewCoins(sdk.NewInt64Coin("atom", 150)), GasLimit: 20000} - tip := &txtypes.Tip{Amount: sdk.NewCoins(sdk.NewInt64Coin("tip-token", 10))} err = txBuilder.SetMsgs(msgs...) require.NoError(t, err) @@ -58,7 +57,6 @@ func TestDirectAuxHandler(t *testing.T) { txBuilder.SetFeeAmount(fee.Amount) txBuilder.SetFeePayer(feePayerAddr) txBuilder.SetGasLimit(fee.GasLimit) - txBuilder.SetTip(tip) err = txBuilder.SetSignatures(sig, feePayerSig) require.NoError(t, err) @@ -82,7 +80,7 @@ func TestDirectAuxHandler(t *testing.T) { t.Log("verify fee payer cannot use SIGN_MODE_DIRECT_AUX") _, err = modeHandler.GetSignBytes(signingtypes.SignMode_SIGN_MODE_DIRECT_AUX, feePayerSigningData, txBuilder.GetTx()) - require.EqualError(t, err, fmt.Sprintf("fee payer %s cannot sign with %s: unauthorized", []byte(feePayerAddr), signingtypes.SignMode_SIGN_MODE_DIRECT_AUX)) + require.EqualError(t, err, fmt.Sprintf("fee payer %s cannot sign with %s: unauthorized", feePayerAddr.String(), signingtypes.SignMode_SIGN_MODE_DIRECT_AUX)) t.Log("verify GetSignBytes with generating sign bytes by marshaling signDocDirectAux") signBytes, err := modeHandler.GetSignBytes(signingtypes.SignMode_SIGN_MODE_DIRECT_AUX, signingData, txBuilder.GetTx()) @@ -110,7 +108,6 @@ func TestDirectAuxHandler(t *testing.T) { ChainId: "test-chain", PublicKey: any, Sequence: accSeq, - Tip: tip, } expectedSignBytes, err := signDocDirectAux.Marshal() diff --git a/x/auth/tx/encoder.go b/x/auth/tx/encoder.go index e98106a89a82..fc60b6a04e06 100644 --- a/x/auth/tx/encoder.go +++ b/x/auth/tx/encoder.go @@ -29,7 +29,7 @@ func DefaultTxEncoder() sdk.TxEncoder { } // DefaultJSONTxEncoder returns a default protobuf JSON TxEncoder using the provided Marshaler. -func DefaultJSONTxEncoder(cdc codec.ProtoCodecMarshaler) sdk.TxEncoder { +func DefaultJSONTxEncoder(cdc codec.Codec) sdk.TxEncoder { return func(tx sdk.Tx) ([]byte, error) { txWrapper, ok := tx.(*wrapper) if ok { diff --git a/x/auth/tx/legacy_amino_json.go b/x/auth/tx/legacy_amino_json.go index 3d7f1efcae0c..0c76158e5d26 100644 --- a/x/auth/tx/legacy_amino_json.go +++ b/x/auth/tx/legacy_amino_json.go @@ -63,20 +63,6 @@ func (s signModeLegacyAminoJSONHandler) GetSignBytes(mode signingtypes.SignMode, return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "got empty address in %s handler", signingtypes.SignMode_SIGN_MODE_LEGACY_AMINO_JSON) } - tip := protoTx.GetTip() - isTipper := tip != nil && tip.Tipper == addr - - // We set a convention that if the tipper signs with LEGACY_AMINO_JSON, then - // they sign over empty fees and 0 gas. - if isTipper { - return legacytx.StdSignBytes( - data.ChainID, data.AccountNumber, data.Sequence, protoTx.GetTimeoutHeight(), - // The tipper signs over 0 fee and 0 gas, no feepayer, no feegranter by convention. - legacytx.StdFee{}, - tx.GetMsgs(), protoTx.GetMemo(), tip, - ), nil - } - return legacytx.StdSignBytes( data.ChainID, data.AccountNumber, data.Sequence, protoTx.GetTimeoutHeight(), legacytx.StdFee{ @@ -85,6 +71,6 @@ func (s signModeLegacyAminoJSONHandler) GetSignBytes(mode signingtypes.SignMode, Payer: protoTx.tx.AuthInfo.Fee.Payer, Granter: protoTx.tx.AuthInfo.Fee.Granter, }, - tx.GetMsgs(), protoTx.GetMemo(), tip, + tx.GetMsgs(), protoTx.GetMemo(), ), nil } diff --git a/x/auth/tx/legacy_amino_json_test.go b/x/auth/tx/legacy_amino_json_test.go index cdb7ee284d20..dcfbe319069f 100644 --- a/x/auth/tx/legacy_amino_json_test.go +++ b/x/auth/tx/legacy_amino_json_test.go @@ -4,16 +4,16 @@ import ( "context" "testing" + "github.com/stretchr/testify/require" + txsigning "cosmossdk.io/x/tx/signing" "cosmossdk.io/x/tx/signing/aminojson" - "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/legacy" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" "github.com/cosmos/cosmos-sdk/x/auth/signing" @@ -45,7 +45,6 @@ func TestLegacyAminoJSONHandler_GetSignBytes(t *testing.T) { chainID = "test-chain" accNum uint64 = 7 seqNum uint64 = 7 - tip = &tx.Tip{Tipper: addr1.String(), Amount: coins} ) testcases := []struct { @@ -57,22 +56,18 @@ func TestLegacyAminoJSONHandler_GetSignBytes(t *testing.T) { { "signer which is also fee payer (no tips)", addr1.String(), func(w *wrapper) {}, - legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas}, []sdk.Msg{msg}, memo, nil), - }, - { - "signer which is also fee payer (with tips)", addr2.String(), - func(w *wrapper) { w.SetTip(tip) }, - legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas}, []sdk.Msg{msg}, memo, tip), + legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas}, []sdk.Msg{msg}, memo), }, + { "explicit fee payer", addr1.String(), func(w *wrapper) { w.SetFeePayer(addr2) }, - legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas, Payer: addr2.String()}, []sdk.Msg{msg}, memo, nil), + legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas, Payer: addr2.String()}, []sdk.Msg{msg}, memo), }, { "explicit fee granter", addr1.String(), func(w *wrapper) { w.SetFeeGranter(addr2) }, - legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas, Granter: addr2.String()}, []sdk.Msg{msg}, memo, nil), + legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas, Granter: addr2.String()}, []sdk.Msg{msg}, memo), }, { "explicit fee payer and fee granter", addr1.String(), @@ -80,12 +75,7 @@ func TestLegacyAminoJSONHandler_GetSignBytes(t *testing.T) { w.SetFeePayer(addr2) w.SetFeeGranter(addr2) }, - legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas, Payer: addr2.String(), Granter: addr2.String()}, []sdk.Msg{msg}, memo, nil), - }, - { - "signer which is also tipper", addr1.String(), - func(w *wrapper) { w.SetTip(tip) }, - legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{}, []sdk.Msg{msg}, memo, tip), + legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas, Payer: addr2.String(), Granter: addr2.String()}, []sdk.Msg{msg}, memo), }, } @@ -150,7 +140,6 @@ func TestLegacyAminoJSONHandler_AllGetSignBytesComparison(t *testing.T) { chainID = "test-chain" accNum uint64 seqNum uint64 = 7 - tip = &tx.Tip{Tipper: addr1.String(), Amount: coins} ) modeHandler := aminojson.NewSignModeHandler(aminojson.SignModeHandlerOptions{}) @@ -168,22 +157,18 @@ func TestLegacyAminoJSONHandler_AllGetSignBytesComparison(t *testing.T) { { "signer which is also fee payer (no tips)", addr1.String(), func(w *wrapper) {}, - legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas}, []sdk.Msg{msg}, memo, nil), - }, - { - "signer which is also fee payer (with tips)", addr2.String(), - func(w *wrapper) { w.SetTip(tip) }, - legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas}, []sdk.Msg{msg}, memo, tip), + legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas}, []sdk.Msg{msg}, memo), }, + { "explicit fee payer", addr1.String(), func(w *wrapper) { w.SetFeePayer(addr2) }, - legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas, Payer: addr2.String()}, []sdk.Msg{msg}, memo, nil), + legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas, Payer: addr2.String()}, []sdk.Msg{msg}, memo), }, { "explicit fee granter", addr1.String(), func(w *wrapper) { w.SetFeeGranter(addr2) }, - legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas, Granter: addr2.String()}, []sdk.Msg{msg}, memo, nil), + legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas, Granter: addr2.String()}, []sdk.Msg{msg}, memo), }, { "explicit fee payer and fee granter", addr1.String(), @@ -191,12 +176,7 @@ func TestLegacyAminoJSONHandler_AllGetSignBytesComparison(t *testing.T) { w.SetFeePayer(addr2) w.SetFeeGranter(addr2) }, - legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas, Payer: addr2.String(), Granter: addr2.String()}, []sdk.Msg{msg}, memo, nil), - }, - { - "signer which is also tipper", addr1.String(), - func(w *wrapper) { w.SetTip(tip) }, - legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{}, []sdk.Msg{msg}, memo, tip), + legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas, Payer: addr2.String(), Granter: addr2.String()}, []sdk.Msg{msg}, memo), }, } diff --git a/x/auth/tx/service.go b/x/auth/tx/service.go index 9f4d56a93164..a96ac8cae0b4 100644 --- a/x/auth/tx/service.go +++ b/x/auth/tx/service.go @@ -97,7 +97,7 @@ func (s txServer) Simulate(ctx context.Context, req *txtypes.SimulateRequest) (* gasInfo, result, err := s.simulate(txBytes) if err != nil { - return nil, status.Errorf(codes.Unknown, "%v With gas wanted: '%d' and gas used: '%d' ", err, gasInfo.GasWanted, gasInfo.GasUsed) + return nil, status.Errorf(codes.Unknown, "%v with gas used: '%d'", err, gasInfo.GasUsed) } return &txtypes.SimulateResponse{ @@ -195,13 +195,13 @@ func (s txServer) GetBlockWithTxs(ctx context.Context, req *txtypes.GetBlockWith if req.Pagination != nil && req.Pagination.Reverse { for i, count := offset, uint64(0); i > 0 && count != limit; i, count = i-1, count+1 { if err = decodeTxAt(i); err != nil { - return nil, err + sdkCtx.Logger().Error("failed to decode tx", "error", err) } } } else { for i, count := offset, uint64(0); i < blockTxsLn && count != limit; i, count = i+1, count+1 { if err = decodeTxAt(i); err != nil { - return nil, err + sdkCtx.Logger().Error("failed to decode tx", "error", err) } } } diff --git a/x/auth/tx/sigs_test.go b/x/auth/tx/sigs_test.go index ab868db1cdef..75a2355b7558 100644 --- a/x/auth/tx/sigs_test.go +++ b/x/auth/tx/sigs_test.go @@ -6,7 +6,6 @@ import ( "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/cosmos/cosmos-sdk/testutil/testdata" ) diff --git a/x/auth/tx/textual.go b/x/auth/tx/textual.go index a804280adfb5..028248d61958 100644 --- a/x/auth/tx/textual.go +++ b/x/auth/tx/textual.go @@ -4,17 +4,16 @@ import ( "context" "fmt" - txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" - "cosmossdk.io/x/tx/signing/textual" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/anypb" - signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" - + txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" txsigning "cosmossdk.io/x/tx/signing" + "cosmossdk.io/x/tx/signing/textual" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth/signing" ) diff --git a/x/auth/types/account.go b/x/auth/types/account.go index 9345d819d240..b111cf0c1688 100644 --- a/x/auth/types/account.go +++ b/x/auth/types/account.go @@ -218,6 +218,10 @@ func (ma ModuleAccount) Validate() error { return errors.New("module account name cannot be blank") } + if ma.BaseAccount == nil { + return errors.New("uninitialized ModuleAccount: BaseAccount is nil") + } + if ma.Address != sdk.AccAddress(crypto.AddressHash([]byte(ma.Name))).String() { return fmt.Errorf("address %s cannot be derived from the module name '%s'", ma.Address, ma.Name) } diff --git a/x/auth/types/account_test.go b/x/auth/types/account_test.go index 545e3beef5d1..d29372dcd081 100644 --- a/x/auth/types/account_test.go +++ b/x/auth/types/account_test.go @@ -193,3 +193,8 @@ func TestNewModuleAddressOrBech32Address(t *testing.T) { require.Equal(t, input, types.NewModuleAddressOrBech32Address(input).String()) require.Equal(t, "cosmos1jv65s3grqf6v6jl3dp4t6c9t9rk99cd88lyufl", types.NewModuleAddressOrBech32Address("distribution").String()) } + +func TestModuleAccountValidateNilBaseAccount(t *testing.T) { + ma := &types.ModuleAccount{Name: "foo"} + _ = ma.Validate() +} diff --git a/x/auth/types/credentials_test.go b/x/auth/types/credentials_test.go index 4c3f1a5bf64d..1e5a0ce6d1e2 100644 --- a/x/auth/types/credentials_test.go +++ b/x/auth/types/credentials_test.go @@ -3,10 +3,11 @@ package types_test import ( "testing" + "github.com/stretchr/testify/require" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/stretchr/testify/require" ) func TestNewModuleCrendentials(t *testing.T) { diff --git a/x/auth/types/msgs.go b/x/auth/types/msgs.go deleted file mode 100644 index 8beea7684e68..000000000000 --- a/x/auth/types/msgs.go +++ /dev/null @@ -1,13 +0,0 @@ -package types - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -var _ sdk.Msg = &MsgUpdateParams{} - -// GetSigners returns the expected signers for a MsgUpdateParams message. -func (msg MsgUpdateParams) GetSigners() []sdk.AccAddress { - addr, _ := sdk.AccAddressFromBech32(msg.Authority) - return []sdk.AccAddress{addr} -} diff --git a/x/auth/vesting/autocli.go b/x/auth/vesting/autocli.go new file mode 100644 index 000000000000..2ff4585db1ae --- /dev/null +++ b/x/auth/vesting/autocli.go @@ -0,0 +1,47 @@ +package vesting + +import ( + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + vestingv1beta1 "cosmossdk.io/api/cosmos/vesting/v1beta1" +) + +// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: vestingv1beta1.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "CreateVestingAccount", + Use: "create-vesting-account [to_address] [end_time] [amount]", + Short: "Create a new vesting account funded with an allocation of tokens.", + Long: `Create a new vesting account funded with an allocation of tokens. The +account can either be a delayed or continuous vesting account, which is determined +by the '--delayed' flag. All vesting accounts created will have their start time +set by the committed block's time. The end_time must be provided as a UNIX epoch +timestamp.`, + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "to_address"}, + {ProtoField: "end_time"}, + {ProtoField: "amount", Varargs: true}, + }, + FlagOptions: map[string]*autocliv1.FlagOptions{ + "delayed": {Name: "delayed", Usage: "Create a delayed vesting account if true"}, + }, + }, + { + RpcMethod: "CreatePermanentLockedAccount", + Use: "create-permanent-locked-account [to_address] [amount]", + Short: "Create a new permanently locked account funded with an allocation of tokens.", + Long: `Create a new account funded with an allocation of permanently locked tokens. +These tokens may be used for staking but are non-transferable. Staking rewards will acrue as liquid and transferable tokens.`, + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "to_address"}, + {ProtoField: "amount", Varargs: true}, + }, + }, + }, + EnhanceCustomCommand: false, // use custom commands only until v0.51 + }, + } +} diff --git a/x/auth/vesting/client/cli/tx.go b/x/auth/vesting/client/cli/tx.go index fe983856e0d5..fe6a0c341f21 100644 --- a/x/auth/vesting/client/cli/tx.go +++ b/x/auth/vesting/client/cli/tx.go @@ -7,9 +7,10 @@ import ( "os" "strconv" - "cosmossdk.io/core/address" "github.com/spf13/cobra" + "cosmossdk.io/core/address" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" diff --git a/x/auth/vesting/client/cli/tx_test.go b/x/auth/vesting/client/cli/tx_test.go index f2591446034d..4df054f0e2f1 100644 --- a/x/auth/vesting/client/cli/tx_test.go +++ b/x/auth/vesting/client/cli/tx_test.go @@ -7,10 +7,11 @@ import ( "testing" "time" - sdkmath "cosmossdk.io/math" rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" "github.com/stretchr/testify/suite" + sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec/address" diff --git a/x/auth/vesting/module.go b/x/auth/vesting/module.go index 0a3dc9a8e75f..139efb1af0de 100644 --- a/x/auth/vesting/module.go +++ b/x/auth/vesting/module.go @@ -8,6 +8,9 @@ import ( "github.com/spf13/cobra" "google.golang.org/grpc" + modulev1 "cosmossdk.io/api/cosmos/vesting/module/v1" + "cosmossdk.io/core/address" + "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" "github.com/cosmos/cosmos-sdk/client" @@ -15,19 +18,16 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - - modulev1 "cosmossdk.io/api/cosmos/vesting/module/v1" - "cosmossdk.io/core/address" - "cosmossdk.io/core/appmodule" - "github.com/cosmos/cosmos-sdk/x/auth/keeper" "github.com/cosmos/cosmos-sdk/x/auth/vesting/client/cli" "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" ) var ( - _ module.AppModule = AppModule{} - _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModuleBasic = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasServices = AppModule{} ) // AppModuleBasic defines the basic application module used by the sub-vesting @@ -72,11 +72,6 @@ func (ab AppModuleBasic) GetTxCmd() *cobra.Command { return cli.GetTxCmd(ab.ac) } -// GetQueryCmd returns the module's root query command. Currently, this is a no-op. -func (AppModuleBasic) GetQueryCmd() *cobra.Command { - return nil -} - // AppModule extends the AppModuleBasic implementation by implementing the // AppModule interface. type AppModule struct { @@ -94,11 +89,6 @@ func NewAppModule(ak keeper.AccountKeeper, bk types.BankKeeper) AppModule { } } -var ( - _ appmodule.AppModule = AppModule{} - _ appmodule.HasServices = AppModule{} -) - // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} diff --git a/x/auth/vesting/msg_server.go b/x/auth/vesting/msg_server.go index 27eb3e110b54..222fc262a291 100644 --- a/x/auth/vesting/msg_server.go +++ b/x/auth/vesting/msg_server.go @@ -3,7 +3,7 @@ package vesting import ( "context" - "github.com/armon/go-metrics" + "github.com/hashicorp/go-metrics" errorsmod "cosmossdk.io/errors" @@ -62,7 +62,10 @@ func (s msgServer) CreateVestingAccount(goCtx context.Context, msg *types.MsgCre baseAccount := authtypes.NewBaseAccountWithAddress(to) baseAccount = s.AccountKeeper.NewAccount(ctx, baseAccount).(*authtypes.BaseAccount) - baseVestingAccount := types.NewBaseVestingAccount(baseAccount, msg.Amount.Sort(), msg.EndTime) + baseVestingAccount, err := types.NewBaseVestingAccount(baseAccount, msg.Amount.Sort(), msg.EndTime) + if err != nil { + return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, err.Error()) + } var vestingAccount sdk.AccountI if msg.Delayed { @@ -124,7 +127,10 @@ func (s msgServer) CreatePermanentLockedAccount(goCtx context.Context, msg *type baseAccount := authtypes.NewBaseAccountWithAddress(to) baseAccount = s.AccountKeeper.NewAccount(ctx, baseAccount).(*authtypes.BaseAccount) - vestingAccount := types.NewPermanentLockedAccount(baseAccount, msg.Amount) + vestingAccount, err := types.NewPermanentLockedAccount(baseAccount, msg.Amount) + if err != nil { + return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, err.Error()) + } s.AccountKeeper.SetAccount(ctx, vestingAccount) @@ -170,9 +176,17 @@ func (s msgServer) CreatePeriodicVestingAccount(goCtx context.Context, msg *type return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid period length of %d in period %d, length must be greater than 0", period.Length, i) } + if err := validateAmount(period.Amount); err != nil { + return nil, err + } + totalCoins = totalCoins.Add(period.Amount...) } + if s.BankKeeper.BlockedAddr(to) { + return nil, errorsmod.Wrapf(sdkerrors.ErrUnauthorized, "%s is not allowed to receive funds", msg.ToAddress) + } + ctx := sdk.UnwrapSDKContext(goCtx) if acc := s.AccountKeeper.GetAccount(ctx, to); acc != nil { return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "account %s already exists", msg.ToAddress) @@ -184,7 +198,10 @@ func (s msgServer) CreatePeriodicVestingAccount(goCtx context.Context, msg *type baseAccount := authtypes.NewBaseAccountWithAddress(to) baseAccount = s.AccountKeeper.NewAccount(ctx, baseAccount).(*authtypes.BaseAccount) - vestingAccount := types.NewPeriodicVestingAccount(baseAccount, totalCoins.Sort(), msg.StartTime, msg.VestingPeriods) + vestingAccount, err := types.NewPeriodicVestingAccount(baseAccount, totalCoins.Sort(), msg.StartTime, msg.VestingPeriods) + if err != nil { + return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, err.Error()) + } s.AccountKeeper.SetAccount(ctx, vestingAccount) diff --git a/x/auth/vesting/msg_server_test.go b/x/auth/vesting/msg_server_test.go index 2a121271e10a..45f7502f989b 100644 --- a/x/auth/vesting/msg_server_test.go +++ b/x/auth/vesting/msg_server_test.go @@ -9,12 +9,14 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" + "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/auth/vesting" @@ -56,6 +58,7 @@ func (s *VestingTestSuite) SetupTest() { storeService, authtypes.ProtoBaseAccount, maccPerms, + authcodec.NewBech32Codec("cosmos"), "cosmos", authtypes.NewModuleAddress("gov").String(), ) @@ -94,7 +97,18 @@ func (s *VestingTestSuite) TestCreateVestingAccount() { expErr: true, expErrMsg: "invalid 'to' address", }, - "": { + "invalid coins": { + input: vestingtypes.NewMsgCreateVestingAccount( + fromAddr, + to1Addr, + sdk.Coins{sdk.Coin{Denom: "stake", Amount: math.NewInt(-1)}}, + time.Now().Unix(), + true, + ), + expErr: true, + expErrMsg: "-1stake: invalid coins", + }, + "invalid end time": { input: vestingtypes.NewMsgCreateVestingAccount( fromAddr, to1Addr, @@ -122,6 +136,21 @@ func (s *VestingTestSuite) TestCreateVestingAccount() { expErr: true, expErrMsg: "already exists", }, + "create for blocked account": { + preRun: func() { + s.bankKeeper.EXPECT().IsSendEnabledCoins(gomock.Any(), fooCoin).Return(nil) + s.bankKeeper.EXPECT().BlockedAddr(to1Addr).Return(true) + }, + input: vestingtypes.NewMsgCreateVestingAccount( + fromAddr, + to1Addr, + sdk.Coins{fooCoin}, + time.Now().Unix(), + true, + ), + expErr: true, + expErrMsg: "not allowed to receive funds", + }, "create a valid delayed vesting account": { preRun: func() { s.bankKeeper.EXPECT().IsSendEnabledCoins(gomock.Any(), fooCoin).Return(nil) @@ -197,6 +226,15 @@ func (s *VestingTestSuite) TestCreatePermanentLockedAccount() { expErr: true, expErrMsg: "invalid 'to' address", }, + "invalid coins": { + input: vestingtypes.NewMsgCreatePermanentLockedAccount( + fromAddr, + to1Addr, + sdk.Coins{sdk.Coin{Denom: "stake", Amount: math.NewInt(-1)}}, + ), + expErr: true, + expErrMsg: "-1stake: invalid coins", + }, "create for existing account": { preRun: func() { toAcc := s.accountKeeper.NewAccountWithAddress(s.ctx, to1Addr) @@ -212,6 +250,22 @@ func (s *VestingTestSuite) TestCreatePermanentLockedAccount() { expErr: true, expErrMsg: "already exists", }, + "create for blocked account": { + preRun: func() { + toAcc := s.accountKeeper.NewAccountWithAddress(s.ctx, to1Addr) + s.bankKeeper.EXPECT().IsSendEnabledCoins(gomock.Any(), fooCoin).Return(nil) + s.bankKeeper.EXPECT().BlockedAddr(to1Addr).Return(true) + s.accountKeeper.SetAccount(s.ctx, toAcc) + }, + input: vestingtypes.NewMsgCreatePermanentLockedAccount( + fromAddr, + to1Addr, + sdk.Coins{fooCoin}, + ), + expErr: true, + expErrMsg: "not allowed to receive funds", + }, + "create a valid permanent locked account": { preRun: func() { s.bankKeeper.EXPECT().IsSendEnabledCoins(gomock.Any(), fooCoin).Return(nil) @@ -317,9 +371,26 @@ func (s *VestingTestSuite) TestCreatePeriodicVestingAccount() { expErr: true, expErrMsg: "invalid period", }, + { + name: "invalid coins", + input: vestingtypes.NewMsgCreatePeriodicVestingAccount( + fromAddr, + to1Addr, + time.Now().Unix(), + []vestingtypes.Period{ + { + Length: 1, + Amount: sdk.Coins{sdk.Coin{Denom: "stake", Amount: math.NewInt(-1)}}, + }, + }, + ), + expErr: true, + expErrMsg: "-1stake: invalid coins", + }, { name: "create for existing account", preRun: func() { + s.bankKeeper.EXPECT().BlockedAddr(to1Addr).Return(false) toAcc := s.accountKeeper.NewAccountWithAddress(s.ctx, to1Addr) s.accountKeeper.SetAccount(s.ctx, toAcc) }, @@ -337,10 +408,34 @@ func (s *VestingTestSuite) TestCreatePeriodicVestingAccount() { expErr: true, expErrMsg: "already exists", }, + { + name: "create for blocked address", + preRun: func() { + s.bankKeeper.EXPECT().BlockedAddr(to2Addr).Return(true) + }, + input: vestingtypes.NewMsgCreatePeriodicVestingAccount( + fromAddr, + to2Addr, + time.Now().Unix(), + []vestingtypes.Period{ + { + Length: 10, + Amount: sdk.NewCoins(periodCoin), + }, + { + Length: 20, + Amount: sdk.NewCoins(fooCoin), + }, + }, + ), + expErr: true, + expErrMsg: "not allowed to receive funds", + }, { name: "create a valid periodic vesting account", preRun: func() { s.bankKeeper.EXPECT().IsSendEnabledCoins(gomock.Any(), periodCoin.Add(fooCoin)).Return(nil) + s.bankKeeper.EXPECT().BlockedAddr(to2Addr).Return(false) s.bankKeeper.EXPECT().SendCoins(gomock.Any(), fromAddr, to2Addr, gomock.Any()).Return(nil) }, input: vestingtypes.NewMsgCreatePeriodicVestingAccount( diff --git a/x/auth/vesting/types/genesis_test.go b/x/auth/vesting/types/genesis_test.go index 98aabb15cfde..31971396dd8f 100644 --- a/x/auth/vesting/types/genesis_test.go +++ b/x/auth/vesting/types/genesis_test.go @@ -21,7 +21,8 @@ var ( func TestValidateGenesisInvalidAccounts(t *testing.T) { acc1 := authtypes.NewBaseAccountWithAddress(sdk.AccAddress(addr1)) acc1Balance := sdk.NewCoins(sdk.NewInt64Coin(sdk.DefaultBondDenom, 150)) - baseVestingAcc := NewBaseVestingAccount(acc1, acc1Balance, 1548775410) + baseVestingAcc, err := NewBaseVestingAccount(acc1, acc1Balance, 1548775410) + require.NoError(t, err) // invalid delegated vesting baseVestingAcc.DelegatedVesting = acc1Balance.Add(acc1Balance...) diff --git a/x/auth/vesting/types/msgs.go b/x/auth/vesting/types/msgs.go index 3d31b05bb26d..296fa8845921 100644 --- a/x/auth/vesting/types/msgs.go +++ b/x/auth/vesting/types/msgs.go @@ -21,12 +21,6 @@ func NewMsgCreateVestingAccount(fromAddr, toAddr sdk.AccAddress, amount sdk.Coin } } -// GetSigners returns the expected signers for a MsgCreateVestingAccount. -func (msg MsgCreateVestingAccount) GetSigners() []sdk.AccAddress { - addr, _ := sdk.AccAddressFromBech32(msg.FromAddress) - return []sdk.AccAddress{addr} -} - // NewMsgCreatePermanentLockedAccount returns a reference to a new MsgCreatePermanentLockedAccount. func NewMsgCreatePermanentLockedAccount(fromAddr, toAddr sdk.AccAddress, amount sdk.Coins) *MsgCreatePermanentLockedAccount { return &MsgCreatePermanentLockedAccount{ @@ -36,12 +30,6 @@ func NewMsgCreatePermanentLockedAccount(fromAddr, toAddr sdk.AccAddress, amount } } -// GetSigners returns the expected signers for a MsgCreatePermanentLockedAccount. -func (msg MsgCreatePermanentLockedAccount) GetSigners() []sdk.AccAddress { - from, _ := sdk.AccAddressFromBech32(msg.FromAddress) - return []sdk.AccAddress{from} -} - // NewMsgCreatePeriodicVestingAccount returns a reference to a new MsgCreatePeriodicVestingAccount. func NewMsgCreatePeriodicVestingAccount(fromAddr, toAddr sdk.AccAddress, startTime int64, periods []Period) *MsgCreatePeriodicVestingAccount { return &MsgCreatePeriodicVestingAccount{ @@ -51,12 +39,3 @@ func NewMsgCreatePeriodicVestingAccount(fromAddr, toAddr sdk.AccAddress, startTi VestingPeriods: periods, } } - -// GetSigners returns the expected signers for a MsgCreatePeriodicVestingAccount. -func (msg MsgCreatePeriodicVestingAccount) GetSigners() []sdk.AccAddress { - from, err := sdk.AccAddressFromBech32(msg.FromAddress) - if err != nil { - panic(err) - } - return []sdk.AccAddress{from} -} diff --git a/x/auth/vesting/types/test_common.go b/x/auth/vesting/types/test_common.go index 0e22ea2352dd..fc29080d3e97 100644 --- a/x/auth/vesting/types/test_common.go +++ b/x/auth/vesting/types/test_common.go @@ -4,7 +4,6 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" - sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/auth/vesting/types/vesting_account.go b/x/auth/vesting/types/vesting_account.go index 8ecb1f420d76..868dc49588e7 100644 --- a/x/auth/vesting/types/vesting_account.go +++ b/x/auth/vesting/types/vesting_account.go @@ -2,6 +2,7 @@ package types import ( "errors" + "fmt" "time" "cosmossdk.io/math" @@ -24,14 +25,16 @@ var ( // NewBaseVestingAccount creates a new BaseVestingAccount object. It is the // callers responsibility to ensure the base account has sufficient funds with // regards to the original vesting amount. -func NewBaseVestingAccount(baseAccount *authtypes.BaseAccount, originalVesting sdk.Coins, endTime int64) *BaseVestingAccount { - return &BaseVestingAccount{ +func NewBaseVestingAccount(baseAccount *authtypes.BaseAccount, originalVesting sdk.Coins, endTime int64) (*BaseVestingAccount, error) { + baseVestingAccount := &BaseVestingAccount{ BaseAccount: baseAccount, OriginalVesting: originalVesting, DelegatedFree: sdk.NewCoins(), DelegatedVesting: sdk.NewCoins(), EndTime: endTime, } + + return baseVestingAccount, baseVestingAccount.Validate() } // LockedCoinsFromVesting returns all the coins that are not spendable (i.e. locked) @@ -144,9 +147,18 @@ func (bva BaseVestingAccount) GetEndTime() int64 { // Validate checks for errors on the account fields func (bva BaseVestingAccount) Validate() error { + if bva.EndTime < 0 { + return errors.New("end time cannot be negative") + } + + if !bva.OriginalVesting.IsValid() || !bva.OriginalVesting.IsAllPositive() { + return fmt.Errorf("invalid coins: %s", bva.OriginalVesting.String()) + } + if !(bva.DelegatedVesting.IsAllLTE(bva.OriginalVesting)) { return errors.New("delegated vesting amount cannot be greater than original vesting amount") } + return bva.BaseAccount.Validate() } @@ -166,17 +178,19 @@ func NewContinuousVestingAccountRaw(bva *BaseVestingAccount, startTime int64) *C } // NewContinuousVestingAccount returns a new ContinuousVestingAccount -func NewContinuousVestingAccount(baseAcc *authtypes.BaseAccount, originalVesting sdk.Coins, startTime, endTime int64) *ContinuousVestingAccount { +func NewContinuousVestingAccount(baseAcc *authtypes.BaseAccount, originalVesting sdk.Coins, startTime, endTime int64) (*ContinuousVestingAccount, error) { baseVestingAcc := &BaseVestingAccount{ BaseAccount: baseAcc, OriginalVesting: originalVesting, EndTime: endTime, } - return &ContinuousVestingAccount{ + continuousVestingAccount := &ContinuousVestingAccount{ StartTime: startTime, BaseVestingAccount: baseVestingAcc, } + + return continuousVestingAccount, continuousVestingAccount.Validate() } // GetVestedCoins returns the total number of vested coins. If no coins are vested, @@ -199,7 +213,7 @@ func (cva ContinuousVestingAccount) GetVestedCoins(blockTime time.Time) sdk.Coin s := math.LegacyNewDec(x).Quo(math.LegacyNewDec(y)) for _, ovc := range cva.OriginalVesting { - vestedAmt := sdk.NewDecFromInt(ovc.Amount).Mul(s).RoundInt() + vestedAmt := math.LegacyNewDecFromInt(ovc.Amount).Mul(s).RoundInt() vestedCoins = append(vestedCoins, sdk.NewCoin(ovc.Denom, vestedAmt)) } @@ -257,22 +271,25 @@ func NewPeriodicVestingAccountRaw(bva *BaseVestingAccount, startTime int64, peri } // NewPeriodicVestingAccount returns a new PeriodicVestingAccount -func NewPeriodicVestingAccount(baseAcc *authtypes.BaseAccount, originalVesting sdk.Coins, startTime int64, periods Periods) *PeriodicVestingAccount { +func NewPeriodicVestingAccount(baseAcc *authtypes.BaseAccount, originalVesting sdk.Coins, startTime int64, periods Periods) (*PeriodicVestingAccount, error) { endTime := startTime for _, p := range periods { endTime += p.Length } + baseVestingAcc := &BaseVestingAccount{ BaseAccount: baseAcc, OriginalVesting: originalVesting, EndTime: endTime, } - return &PeriodicVestingAccount{ + periodicVestingAccount := &PeriodicVestingAccount{ BaseVestingAccount: baseVestingAcc, StartTime: startTime, VestingPeriods: periods, } + + return periodicVestingAccount, periodicVestingAccount.Validate() } // GetVestedCoins returns the total number of vested coins. If no coins are vested, @@ -345,15 +362,26 @@ func (pva PeriodicVestingAccount) Validate() error { } endTime := pva.StartTime originalVesting := sdk.NewCoins() - for _, p := range pva.VestingPeriods { + for i, p := range pva.VestingPeriods { + if p.Length < 0 { + return fmt.Errorf("period #%d has a negative length: %d", i, p.Length) + } endTime += p.Length + + if !p.Amount.IsValid() || !p.Amount.IsAllPositive() { + return fmt.Errorf("period #%d has invalid coins: %s", i, p.Amount.String()) + } + originalVesting = originalVesting.Add(p.Amount...) } if endTime != pva.EndTime { return errors.New("vesting end time does not match length of all vesting periods") } + if endTime < pva.GetStartTime() { + return errors.New("cumulative endTime overflowed, and/or is less than startTime") + } if !originalVesting.Equal(pva.OriginalVesting) { - return errors.New("original vesting coins does not match the sum of all coins in vesting periods") + return fmt.Errorf("original vesting coins (%v) does not match the sum of all coins in vesting periods (%v)", pva.OriginalVesting, originalVesting) } return pva.BaseVestingAccount.Validate() @@ -374,14 +402,16 @@ func NewDelayedVestingAccountRaw(bva *BaseVestingAccount) *DelayedVestingAccount } // NewDelayedVestingAccount returns a DelayedVestingAccount -func NewDelayedVestingAccount(baseAcc *authtypes.BaseAccount, originalVesting sdk.Coins, endTime int64) *DelayedVestingAccount { +func NewDelayedVestingAccount(baseAcc *authtypes.BaseAccount, originalVesting sdk.Coins, endTime int64) (*DelayedVestingAccount, error) { baseVestingAcc := &BaseVestingAccount{ BaseAccount: baseAcc, OriginalVesting: originalVesting, EndTime: endTime, } - return &DelayedVestingAccount{baseVestingAcc} + delayedVestingAccount := &DelayedVestingAccount{baseVestingAcc} + + return delayedVestingAccount, delayedVestingAccount.Validate() } // GetVestedCoins returns the total amount of vested coins for a delayed vesting @@ -432,14 +462,16 @@ var ( ) // NewPermanentLockedAccount returns a PermanentLockedAccount -func NewPermanentLockedAccount(baseAcc *authtypes.BaseAccount, coins sdk.Coins) *PermanentLockedAccount { +func NewPermanentLockedAccount(baseAcc *authtypes.BaseAccount, coins sdk.Coins) (*PermanentLockedAccount, error) { baseVestingAcc := &BaseVestingAccount{ BaseAccount: baseAcc, OriginalVesting: coins, EndTime: 0, // ensure EndTime is set to 0, as PermanentLockedAccount's do not have an EndTime } - return &PermanentLockedAccount{baseVestingAcc} + permanentLockedAccount := &PermanentLockedAccount{baseVestingAcc} + + return permanentLockedAccount, permanentLockedAccount.Validate() } // GetVestedCoins returns the total amount of vested coins for a permanent locked vesting diff --git a/x/auth/vesting/types/vesting_account_test.go b/x/auth/vesting/types/vesting_account_test.go index dd60e2ae21a2..74cdfe59c5a5 100644 --- a/x/auth/vesting/types/vesting_account_test.go +++ b/x/auth/vesting/types/vesting_account_test.go @@ -17,6 +17,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" "github.com/cosmos/cosmos-sdk/x/auth/keeper" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/auth/vesting" @@ -58,6 +59,7 @@ func (s *VestingAccountTestSuite) SetupTest() { storeService, authtypes.ProtoBaseAccount, maccPerms, + authcodec.NewBech32Codec("cosmos"), "cosmos", authtypes.NewModuleAddress("gov").String(), ) @@ -68,7 +70,8 @@ func TestGetVestedCoinsContVestingAcc(t *testing.T) { endTime := now.Add(24 * time.Hour) bacc, origCoins := initBaseAccount() - cva := types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) + cva, err := types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) + require.NoError(t, err) // require no coins vested in the very beginning of the vesting schedule vestedCoins := cva.GetVestedCoins(now) @@ -92,7 +95,8 @@ func TestGetVestingCoinsContVestingAcc(t *testing.T) { endTime := now.Add(24 * time.Hour) bacc, origCoins := initBaseAccount() - cva := types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) + cva, err := types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) + require.NoError(t, err) // require all coins vesting in the beginning of the vesting schedule vestingCoins := cva.GetVestingCoins(now) @@ -112,7 +116,8 @@ func TestSpendableCoinsContVestingAcc(t *testing.T) { endTime := now.Add(24 * time.Hour) bacc, origCoins := initBaseAccount() - cva := types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) + cva, err := types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) + require.NoError(t, err) // require that all original coins are locked at the end of the vesting // schedule @@ -135,19 +140,22 @@ func TestTrackDelegationContVestingAcc(t *testing.T) { bacc, origCoins := initBaseAccount() // require the ability to delegate all vesting coins - cva := types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) + cva, err := types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) + require.NoError(t, err) cva.TrackDelegation(now, origCoins, origCoins) require.Equal(t, origCoins, cva.DelegatedVesting) require.Nil(t, cva.DelegatedFree) // require the ability to delegate all vested coins - cva = types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) + cva, err = types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) + require.NoError(t, err) cva.TrackDelegation(endTime, origCoins, origCoins) require.Nil(t, cva.DelegatedVesting) require.Equal(t, origCoins, cva.DelegatedFree) // require the ability to delegate all vesting coins (50%) and all vested coins (50%) - cva = types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) + cva, err = types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) + require.NoError(t, err) cva.TrackDelegation(now.Add(12*time.Hour), origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}, cva.DelegatedVesting) require.Nil(t, cva.DelegatedFree) @@ -157,7 +165,8 @@ func TestTrackDelegationContVestingAcc(t *testing.T) { require.Equal(t, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}, cva.DelegatedFree) // require no modifications when delegation amount is zero or not enough funds - cva = types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) + cva, err = types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) + require.NoError(t, err) require.Panics(t, func() { cva.TrackDelegation(endTime, origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 1000000)}) }) @@ -172,23 +181,24 @@ func TestTrackUndelegationContVestingAcc(t *testing.T) { bacc, origCoins := initBaseAccount() // require the ability to undelegate all vesting coins - cva := types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) + cva, err := types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) + require.NoError(t, err) cva.TrackDelegation(now, origCoins, origCoins) cva.TrackUndelegation(origCoins) require.Nil(t, cva.DelegatedFree) require.Equal(t, emptyCoins, cva.DelegatedVesting) // require the ability to undelegate all vested coins - cva = types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) - + cva, err = types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) + require.NoError(t, err) cva.TrackDelegation(endTime, origCoins, origCoins) cva.TrackUndelegation(origCoins) require.Equal(t, emptyCoins, cva.DelegatedFree) require.Nil(t, cva.DelegatedVesting) // require no modifications when the undelegation amount is zero - cva = types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) - + cva, err = types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) + require.NoError(t, err) require.Panics(t, func() { cva.TrackUndelegation(sdk.Coins{sdk.NewInt64Coin(stakeDenom, 0)}) }) @@ -196,7 +206,8 @@ func TestTrackUndelegationContVestingAcc(t *testing.T) { require.Nil(t, cva.DelegatedVesting) // vest 50% and delegate to two validators - cva = types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) + cva, err = types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) + require.NoError(t, err) cva.TrackDelegation(now.Add(12*time.Hour), origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) cva.TrackDelegation(now.Add(12*time.Hour), origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) @@ -218,7 +229,8 @@ func TestGetVestedCoinsDelVestingAcc(t *testing.T) { bacc, origCoins := initBaseAccount() // require no coins are vested until schedule maturation - dva := types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) + dva, err := types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) + require.NoError(t, err) vestedCoins := dva.GetVestedCoins(now) require.Nil(t, vestedCoins) @@ -234,7 +246,8 @@ func TestGetVestingCoinsDelVestingAcc(t *testing.T) { bacc, origCoins := initBaseAccount() // require all coins vesting at the beginning of the schedule - dva := types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) + dva, err := types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) + require.NoError(t, err) vestingCoins := dva.GetVestingCoins(now) require.Equal(t, origCoins, vestingCoins) @@ -251,7 +264,8 @@ func TestSpendableCoinsDelVestingAcc(t *testing.T) { // require that all coins are locked in the beginning of the vesting // schedule - dva := types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) + dva, err := types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) + require.NoError(t, err) lockedCoins := dva.LockedCoins(now) require.True(t, lockedCoins.Equal(origCoins)) @@ -279,27 +293,30 @@ func TestTrackDelegationDelVestingAcc(t *testing.T) { bacc, origCoins := initBaseAccount() // require the ability to delegate all vesting coins - dva := types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) + dva, err := types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) + require.NoError(t, err) dva.TrackDelegation(now, origCoins, origCoins) require.Equal(t, origCoins, dva.DelegatedVesting) require.Nil(t, dva.DelegatedFree) // require the ability to delegate all vested coins - dva = types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) + dva, err = types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) + require.NoError(t, err) dva.TrackDelegation(endTime, origCoins, origCoins) require.Nil(t, dva.DelegatedVesting) require.Equal(t, origCoins, dva.DelegatedFree) // require the ability to delegate all coins half way through the vesting // schedule - dva = types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) + dva, err = types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) + require.NoError(t, err) dva.TrackDelegation(now.Add(12*time.Hour), origCoins, origCoins) require.Equal(t, origCoins, dva.DelegatedVesting) require.Nil(t, dva.DelegatedFree) // require no modifications when delegation amount is zero or not enough funds - dva = types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) - + dva, err = types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) + require.NoError(t, err) require.Panics(t, func() { dva.TrackDelegation(endTime, origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 1000000)}) }) @@ -314,22 +331,24 @@ func TestTrackUndelegationDelVestingAcc(t *testing.T) { bacc, origCoins := initBaseAccount() // require the ability to undelegate all vesting coins - dva := types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) + dva, err := types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) + require.NoError(t, err) dva.TrackDelegation(now, origCoins, origCoins) dva.TrackUndelegation(origCoins) require.Nil(t, dva.DelegatedFree) require.Equal(t, emptyCoins, dva.DelegatedVesting) // require the ability to undelegate all vested coins - dva = types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) + dva, err = types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) + require.NoError(t, err) dva.TrackDelegation(endTime, origCoins, origCoins) dva.TrackUndelegation(origCoins) require.Equal(t, emptyCoins, dva.DelegatedFree) require.Nil(t, dva.DelegatedVesting) // require no modifications when the undelegation amount is zero - dva = types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) - + dva, err = types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) + require.NoError(t, err) require.Panics(t, func() { dva.TrackUndelegation(sdk.Coins{sdk.NewInt64Coin(stakeDenom, 0)}) }) @@ -337,7 +356,8 @@ func TestTrackUndelegationDelVestingAcc(t *testing.T) { require.Nil(t, dva.DelegatedVesting) // vest 50% and delegate to two validators - dva = types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) + dva, err = types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) + require.NoError(t, err) dva.TrackDelegation(now.Add(12*time.Hour), origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) dva.TrackDelegation(now.Add(12*time.Hour), origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) @@ -363,7 +383,8 @@ func TestGetVestedCoinsPeriodicVestingAcc(t *testing.T) { } bacc, origCoins := initBaseAccount() - pva := types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + pva, err := types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + require.NoError(t, err) // require no coins vested at the beginning of the vesting schedule vestedCoins := pva.GetVestedCoins(now) @@ -397,6 +418,57 @@ func TestGetVestedCoinsPeriodicVestingAcc(t *testing.T) { require.Equal(t, origCoins, vestedCoins) } +func TestOverflowAndNegativeVestedCoinsPeriods(t *testing.T) { + now := tmtime.Now() + tests := []struct { + name string + periods []types.Period + wantErr string + }{ + { + "negative .Length", + types.Periods{ + types.Period{Length: -1, Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}}, + types.Period{Length: 6 * 60 * 60, Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 250), sdk.NewInt64Coin(stakeDenom, 25)}}, + }, + "period #0 has a negative length: -1", + }, + { + "overflow after .Length additions", + types.Periods{ + types.Period{Length: 9223372036854775108, Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}}, + types.Period{Length: 6 * 60 * 60, Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 250), sdk.NewInt64Coin(stakeDenom, 25)}}, + }, + "vesting start-time cannot be before end-time", // it overflow to a negative number, making start-time > end-time + }, + { + "good periods that are not negative nor overflow", + types.Periods{ + types.Period{Length: now.Unix() - 1000, Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}}, + types.Period{Length: 60, Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 250), sdk.NewInt64Coin(stakeDenom, 25)}}, + types.Period{Length: 30, Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 250), sdk.NewInt64Coin(stakeDenom, 25)}}, + }, + "", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + bacc, origCoins := initBaseAccount() + pva, err := types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), tt.periods) + if tt.wantErr != "" { + require.ErrorContains(t, err, tt.wantErr) + return + } + + require.NoError(t, err) + if pbva := pva.BaseVestingAccount; pbva.EndTime < 0 { + t.Fatalf("Unfortunately we still have negative .EndTime :-(: %d", pbva.EndTime) + } + }) + } +} + func TestGetVestingCoinsPeriodicVestingAcc(t *testing.T) { now := tmtime.Now() endTime := now.Add(24 * time.Hour) @@ -407,7 +479,8 @@ func TestGetVestingCoinsPeriodicVestingAcc(t *testing.T) { } bacc, origCoins := initBaseAccount() - pva := types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + pva, err := types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + require.NoError(t, err) // require all coins vesting at the beginning of the vesting schedule vestingCoins := pva.GetVestingCoins(now) @@ -444,7 +517,8 @@ func TestSpendableCoinsPeriodicVestingAcc(t *testing.T) { } bacc, origCoins := initBaseAccount() - pva := types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + pva, err := types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + require.NoError(t, err) // require that there exist no spendable coins at the beginning of the // vesting schedule @@ -473,33 +547,38 @@ func TestTrackDelegationPeriodicVestingAcc(t *testing.T) { bacc, origCoins := initBaseAccount() // require the ability to delegate all vesting coins - pva := types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + pva, err := types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + require.NoError(t, err) pva.TrackDelegation(now, origCoins, origCoins) require.Equal(t, origCoins, pva.DelegatedVesting) require.Nil(t, pva.DelegatedFree) // require the ability to delegate all vested coins - pva = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + pva, err = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + require.NoError(t, err) pva.TrackDelegation(endTime, origCoins, origCoins) require.Nil(t, pva.DelegatedVesting) require.Equal(t, origCoins, pva.DelegatedFree) // delegate half of vesting coins - pva = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + pva, err = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + require.NoError(t, err) pva.TrackDelegation(now, origCoins, periods[0].Amount) // require that all delegated coins are delegated vesting require.Equal(t, pva.DelegatedVesting, periods[0].Amount) require.Nil(t, pva.DelegatedFree) // delegate 75% of coins, split between vested and vesting - pva = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + pva, err = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + require.NoError(t, err) pva.TrackDelegation(now.Add(12*time.Hour), origCoins, periods[0].Amount.Add(periods[1].Amount...)) // require that the maximum possible amount of vesting coins are chosen for delegation. require.Equal(t, pva.DelegatedFree, periods[1].Amount) require.Equal(t, pva.DelegatedVesting, periods[0].Amount) // require the ability to delegate all vesting coins (50%) and all vested coins (50%) - pva = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + pva, err = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + require.NoError(t, err) pva.TrackDelegation(now.Add(12*time.Hour), origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}, pva.DelegatedVesting) require.Nil(t, pva.DelegatedFree) @@ -509,7 +588,8 @@ func TestTrackDelegationPeriodicVestingAcc(t *testing.T) { require.Equal(t, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}, pva.DelegatedFree) // require no modifications when delegation amount is zero or not enough funds - pva = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + pva, err = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + require.NoError(t, err) require.Panics(t, func() { pva.TrackDelegation(endTime, origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 1000000)}) }) @@ -529,30 +609,32 @@ func TestTrackUndelegationPeriodicVestingAcc(t *testing.T) { bacc, origCoins := initBaseAccount() // require the ability to undelegate all vesting coins at the beginning of vesting - pva := types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + pva, err := types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + require.NoError(t, err) pva.TrackDelegation(now, origCoins, origCoins) pva.TrackUndelegation(origCoins) require.Nil(t, pva.DelegatedFree) require.Equal(t, emptyCoins, pva.DelegatedVesting) // require the ability to undelegate all vested coins at the end of vesting - pva = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) - + pva, err = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + require.NoError(t, err) pva.TrackDelegation(endTime, origCoins, origCoins) pva.TrackUndelegation(origCoins) require.Equal(t, emptyCoins, pva.DelegatedFree) require.Nil(t, pva.DelegatedVesting) // require the ability to undelegate half of coins - pva = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + pva, err = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + require.NoError(t, err) pva.TrackDelegation(endTime, origCoins, periods[0].Amount) pva.TrackUndelegation(periods[0].Amount) require.Equal(t, emptyCoins, pva.DelegatedFree) require.Nil(t, pva.DelegatedVesting) // require no modifications when the undelegation amount is zero - pva = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) - + pva, err = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + require.NoError(t, err) require.Panics(t, func() { pva.TrackUndelegation(sdk.Coins{sdk.NewInt64Coin(stakeDenom, 0)}) }) @@ -560,7 +642,8 @@ func TestTrackUndelegationPeriodicVestingAcc(t *testing.T) { require.Nil(t, pva.DelegatedVesting) // vest 50% and delegate to two validators - pva = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + pva, err = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) + require.NoError(t, err) pva.TrackDelegation(now.Add(12*time.Hour), origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) pva.TrackDelegation(now.Add(12*time.Hour), origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) @@ -582,7 +665,8 @@ func TestGetVestedCoinsPermLockedVestingAcc(t *testing.T) { bacc, origCoins := initBaseAccount() // require no coins are vested - plva := types.NewPermanentLockedAccount(bacc, origCoins) + plva, err := types.NewPermanentLockedAccount(bacc, origCoins) + require.NoError(t, err) vestedCoins := plva.GetVestedCoins(now) require.Nil(t, vestedCoins) @@ -598,7 +682,8 @@ func TestGetVestingCoinsPermLockedVestingAcc(t *testing.T) { bacc, origCoins := initBaseAccount() // require all coins vesting at the beginning of the schedule - plva := types.NewPermanentLockedAccount(bacc, origCoins) + plva, err := types.NewPermanentLockedAccount(bacc, origCoins) + require.NoError(t, err) vestingCoins := plva.GetVestingCoins(now) require.Equal(t, origCoins, vestingCoins) @@ -615,7 +700,8 @@ func TestSpendableCoinsPermLockedVestingAcc(t *testing.T) { // require that all coins are locked in the beginning of the vesting // schedule - plva := types.NewPermanentLockedAccount(bacc, origCoins) + plva, err := types.NewPermanentLockedAccount(bacc, origCoins) + require.NoError(t, err) lockedCoins := plva.LockedCoins(now) require.True(t, lockedCoins.Equal(origCoins)) @@ -638,20 +724,22 @@ func TestTrackDelegationPermLockedVestingAcc(t *testing.T) { bacc, origCoins := initBaseAccount() // require the ability to delegate all vesting coins - plva := types.NewPermanentLockedAccount(bacc, origCoins) + plva, err := types.NewPermanentLockedAccount(bacc, origCoins) + require.NoError(t, err) plva.TrackDelegation(now, origCoins, origCoins) require.Equal(t, origCoins, plva.DelegatedVesting) require.Nil(t, plva.DelegatedFree) // require the ability to delegate all vested coins at endTime - plva = types.NewPermanentLockedAccount(bacc, origCoins) + plva, err = types.NewPermanentLockedAccount(bacc, origCoins) + require.NoError(t, err) plva.TrackDelegation(endTime, origCoins, origCoins) require.Equal(t, origCoins, plva.DelegatedVesting) require.Nil(t, plva.DelegatedFree) // require no modifications when delegation amount is zero or not enough funds - plva = types.NewPermanentLockedAccount(bacc, origCoins) - + plva, err = types.NewPermanentLockedAccount(bacc, origCoins) + require.NoError(t, err) require.Panics(t, func() { plva.TrackDelegation(endTime, origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 1000000)}) }) @@ -666,21 +754,24 @@ func TestTrackUndelegationPermLockedVestingAcc(t *testing.T) { bacc, origCoins := initBaseAccount() // require the ability to undelegate all vesting coins - plva := types.NewPermanentLockedAccount(bacc, origCoins) + plva, err := types.NewPermanentLockedAccount(bacc, origCoins) + require.NoError(t, err) plva.TrackDelegation(now, origCoins, origCoins) plva.TrackUndelegation(origCoins) require.Nil(t, plva.DelegatedFree) require.Equal(t, emptyCoins, plva.DelegatedVesting) // require the ability to undelegate all vesting coins at endTime - plva = types.NewPermanentLockedAccount(bacc, origCoins) + plva, err = types.NewPermanentLockedAccount(bacc, origCoins) + require.NoError(t, err) plva.TrackDelegation(endTime, origCoins, origCoins) plva.TrackUndelegation(origCoins) require.Nil(t, plva.DelegatedFree) require.Equal(t, emptyCoins, plva.DelegatedVesting) // require no modifications when the undelegation amount is zero - plva = types.NewPermanentLockedAccount(bacc, origCoins) + plva, err = types.NewPermanentLockedAccount(bacc, origCoins) + require.NoError(t, err) require.Panics(t, func() { plva.TrackUndelegation(sdk.Coins{sdk.NewInt64Coin(stakeDenom, 0)}) }) @@ -688,7 +779,8 @@ func TestTrackUndelegationPermLockedVestingAcc(t *testing.T) { require.Nil(t, plva.DelegatedVesting) // delegate to two validators - plva = types.NewPermanentLockedAccount(bacc, origCoins) + plva, err = types.NewPermanentLockedAccount(bacc, origCoins) + require.NoError(t, err) plva.TrackDelegation(now, origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) plva.TrackDelegation(now, origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) @@ -709,7 +801,8 @@ func TestGenesisAccountValidate(t *testing.T) { addr := sdk.AccAddress(pubkey.Address()) baseAcc := authtypes.NewBaseAccount(addr, pubkey, 0, 0) initialVesting := sdk.NewCoins(sdk.NewInt64Coin(sdk.DefaultBondDenom, 50)) - baseVestingWithCoins := types.NewBaseVestingAccount(baseAcc, initialVesting, 100) + baseVestingWithCoins, err := types.NewBaseVestingAccount(baseAcc, initialVesting, 100) + require.NoError(t, err) tests := []struct { name string acc authtypes.GenesisAccount @@ -732,17 +825,26 @@ func TestGenesisAccountValidate(t *testing.T) { }, { "valid continuous vesting account", - types.NewContinuousVestingAccount(baseAcc, initialVesting, 100, 200), + func() authtypes.GenesisAccount { + acc, _ := types.NewContinuousVestingAccount(baseAcc, initialVesting, 100, 200) + return acc + }(), false, }, { "invalid vesting times", - types.NewContinuousVestingAccount(baseAcc, initialVesting, 1654668078, 1554668078), + func() authtypes.GenesisAccount { + acc, _ := types.NewContinuousVestingAccount(baseAcc, initialVesting, 1654668078, 1554668078) + return acc + }(), true, }, { "valid periodic vesting account", - types.NewPeriodicVestingAccount(baseAcc, initialVesting, 0, types.Periods{types.Period{Length: int64(100), Amount: sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 50)}}}), + func() authtypes.GenesisAccount { + acc, _ := types.NewPeriodicVestingAccount(baseAcc, initialVesting, 0, types.Periods{types.Period{Length: int64(100), Amount: sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 50)}}}) + return acc + }(), false, }, { @@ -761,7 +863,10 @@ func TestGenesisAccountValidate(t *testing.T) { }, { "valid permanent locked vesting account", - types.NewPermanentLockedAccount(baseAcc, initialVesting), + func() authtypes.GenesisAccount { + acc, _ := types.NewPermanentLockedAccount(baseAcc, initialVesting) + return acc + }(), false, }, { diff --git a/x/authz/README.md b/x/authz/README.md index 2ab2dcba7c74..c58326aa21ee 100644 --- a/x/authz/README.md +++ b/x/authz/README.md @@ -82,7 +82,7 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/bank/types/send_authoriz #### StakeAuthorization -`StakeAuthorization` implements the `Authorization` interface for messages in the [staking module](https://docs.cosmos.network/v0.44/modules/staking/). It takes an `AuthorizationType` to specify whether you want to authorise delegating, undelegating or redelegating (i.e. these have to be authorised seperately). It also takes a required `MaxTokens` that keeps track of a limit to the amount of tokens that can be delegated/undelegated/redelegated. If left empty, the amount is unlimited. Additionally, this Msg takes an `AllowList` or a `DenyList`, which allows you to select which validators you allow or deny grantees to stake with. +`StakeAuthorization` implements the `Authorization` interface for messages in the [staking module](https://docs.cosmos.network/v0.50/build/modules/staking). It takes an `AuthorizationType` to specify whether you want to authorise delegating, undelegating or redelegating (i.e. these have to be authorised separately). It also takes an optional `MaxTokens` that keeps track of a limit to the amount of tokens that can be delegated/undelegated/redelegated. If left empty, the amount is unlimited. Additionally, this Msg takes an `AllowList` or a `DenyList`, which allows you to select which validators you allow or deny grantees to stake with. ```protobuf reference https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/staking/v1beta1/authz.proto#L11-L35 @@ -255,11 +255,28 @@ The `grant` command allows a granter to grant an authorization to a grantee. ```bash simd tx authz grant --from [flags] ``` +- The `send` authorization_type refers to the built-in `SendAuthorization` type. The custom flags available are `spend-limit` (required) and `allow-list` (optional) , documented [here](#SendAuthorization) Example: ```bash -simd tx authz grant cosmos1.. send --spend-limit=100stake --from=cosmos1.. + simd tx authz grant cosmos1.. send --spend-limit=100stake --allow-list=cosmos1...,cosmos2... --from=cosmos1.. +``` +- The `generic` authorization_type refers to the built-in `GenericAuthorization` type. The custom flag available is `msg-type` ( required) documented [here](#GenericAuthorization). + +> Note: `msg-type` is any valid Cosmos SDK `Msg` type url. + +Example: +```bash + simd tx authz grant cosmos1.. generic --msg-type=/cosmos.bank.v1beta1.MsgSend --from=cosmos1.. +``` +- The `delegate`,`unbond`,`redelegate` authorization_types refer to the built-in `StakeAuthorization` type. The custom flags available are `spend-limit` (optional), `allowed-validators` (optional) and `deny-validators` (optional) documented [here](#StakeAuthorization). +> Note: `allowed-validators` and `deny-validators` cannot both be empty. `spend-limit` represents the `MaxTokens` + +Example: + +```bash +simd tx authz grant cosmos1.. delegate --spend-limit=100stake --allowed-validators=cosmos...,cosmos... --deny-validators=cosmos... --from=cosmos1.. ``` ##### revoke diff --git a/x/authz/authorization_grant.go b/x/authz/authorization_grant.go index bc331885c930..cb2088316fc0 100644 --- a/x/authz/authorization_grant.go +++ b/x/authz/authorization_grant.go @@ -3,9 +3,10 @@ package authz import ( "time" - errorsmod "cosmossdk.io/errors" proto "github.com/cosmos/gogoproto/proto" + errorsmod "cosmossdk.io/errors" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) diff --git a/x/authz/client/cli/query.go b/x/authz/client/cli/query.go deleted file mode 100644 index 4e244c348aca..000000000000 --- a/x/authz/client/cli/query.go +++ /dev/null @@ -1,194 +0,0 @@ -package cli - -import ( - "fmt" - "strings" - - "cosmossdk.io/core/address" - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/version" - "github.com/cosmos/cosmos-sdk/x/authz" - bank "github.com/cosmos/cosmos-sdk/x/bank/types" -) - -// GetQueryCmd returns the cli query commands for this module -func GetQueryCmd(ac address.Codec) *cobra.Command { - authorizationQueryCmd := &cobra.Command{ - Use: authz.ModuleName, - Short: "Querying commands for the authz module", - Long: "", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - authorizationQueryCmd.AddCommand( - GetCmdQueryGrants(ac), - GetQueryGranterGrants(ac), - GetQueryGranteeGrants(ac), - ) - - return authorizationQueryCmd -} - -// GetCmdQueryGrants implements the query authorization command. -func GetCmdQueryGrants(ac address.Codec) *cobra.Command { - cmd := &cobra.Command{ - Use: "grants [granter-addr] [grantee-addr] [msg-type-url]?", - Args: cobra.RangeArgs(2, 3), - Short: "query grants for a granter-grantee pair and optionally a msg-type-url", - Long: strings.TrimSpace( - fmt.Sprintf(`Query authorization grants for a granter-grantee pair. If msg-type-url -is set, it will select grants only for that msg type. -Examples: -$ %s query %s grants cosmos1skj.. cosmos1skjwj.. -$ %s query %s grants cosmos1skjw.. cosmos1skjwj.. %s -`, - version.AppName, authz.ModuleName, - version.AppName, authz.ModuleName, bank.SendAuthorization{}.MsgTypeURL()), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := authz.NewQueryClient(clientCtx) - - _, err = ac.StringToBytes(args[0]) - if err != nil { - return err - } - _, err = ac.StringToBytes(args[1]) - if err != nil { - return err - } - msgAuthorized := "" - if len(args) >= 3 { - msgAuthorized = args[2] - } - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - res, err := queryClient.Grants( - cmd.Context(), - &authz.QueryGrantsRequest{ - Granter: args[0], - Grantee: args[1], - MsgTypeUrl: msgAuthorized, - Pagination: pageReq, - }, - ) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "grants") - return cmd -} - -// GetQueryGranterGrants returns cmd to query for all grants for a granter. -func GetQueryGranterGrants(ac address.Codec) *cobra.Command { - cmd := &cobra.Command{ - Use: "grants-by-granter [granter-addr]", - Args: cobra.ExactArgs(1), - Short: "query authorization grants granted by granter", - Long: strings.TrimSpace( - fmt.Sprintf(`Query authorization grants granted by granter. -Examples: -$ %s q %s grants-by-granter cosmos1skj.. -`, - version.AppName, authz.ModuleName), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - _, err = ac.StringToBytes(args[0]) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - queryClient := authz.NewQueryClient(clientCtx) - res, err := queryClient.GranterGrants( - cmd.Context(), - &authz.QueryGranterGrantsRequest{ - Granter: args[0], - Pagination: pageReq, - }, - ) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "granter-grants") - return cmd -} - -// GetQueryGranteeGrants returns cmd to query for all grants for a grantee. -func GetQueryGranteeGrants(ac address.Codec) *cobra.Command { - cmd := &cobra.Command{ - Use: "grants-by-grantee [grantee-addr]", - Args: cobra.ExactArgs(1), - Short: "query authorization grants granted to a grantee", - Long: strings.TrimSpace( - fmt.Sprintf(`Query authorization grants granted to a grantee. -Examples: -$ %s q %s grants-by-grantee cosmos1skj.. -`, - version.AppName, authz.ModuleName), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - _, err = ac.StringToBytes(args[0]) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - queryClient := authz.NewQueryClient(clientCtx) - res, err := queryClient.GranteeGrants( - cmd.Context(), - &authz.QueryGranteeGrantsRequest{ - Grantee: args[0], - Pagination: pageReq, - }, - ) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "grantee-grants") - return cmd -} diff --git a/x/authz/client/cli/query_test.go b/x/authz/client/cli/query_test.go deleted file mode 100644 index 8ee965101e68..000000000000 --- a/x/authz/client/cli/query_test.go +++ /dev/null @@ -1,242 +0,0 @@ -package cli_test - -import ( - "fmt" - "time" - - sdkmath "cosmossdk.io/math" - - "github.com/cosmos/cosmos-sdk/client/flags" - addresscodec "github.com/cosmos/cosmos-sdk/codec/address" - "github.com/cosmos/cosmos-sdk/testutil" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/authz" - "github.com/cosmos/cosmos-sdk/x/authz/client/cli" - authzclitestutil "github.com/cosmos/cosmos-sdk/x/authz/client/testutil" -) - -func (s *CLITestSuite) TestQueryAuthorizations() { - val := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) - - grantee := s.grantee[0] - twoHours := time.Now().Add(time.Minute * time.Duration(120)).Unix() - - _, err := authzclitestutil.CreateGrant( - s.clientCtx, - []string{ - grantee.String(), - "send", - fmt.Sprintf("--%s=100stake", cli.FlagSpendLimit), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagFrom, val[0].Address), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%d", cli.FlagExpiration, twoHours), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), - }, - ) - s.Require().NoError(err) - - testCases := []struct { - name string - args []string - expectErr bool - expErrMsg string - }{ - { - "Error: Invalid grantee", - []string{ - val[0].Address.String(), - "invalid grantee", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - "decoding bech32 failed: invalid character in string: ' '", - }, - { - "Error: Invalid granter", - []string{ - "invalid granter", - grantee.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - "decoding bech32 failed: invalid character in string: ' '", - }, - { - "Valid txn (json)", - []string{ - val[0].Address.String(), - grantee.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - ``, - }, - } - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryGrants(addresscodec.NewBech32Codec("cosmos")) - resp, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - s.Require().Contains(string(resp.Bytes()), tc.expErrMsg) - } else { - s.Require().NoError(err) - var grants authz.QueryGrantsResponse - err = s.clientCtx.Codec.UnmarshalJSON(resp.Bytes(), &grants) - s.Require().NoError(err) - } - }) - } -} - -func (s *CLITestSuite) TestQueryAuthorization() { - val := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) - - grantee := s.grantee[0] - twoHours := time.Now().Add(time.Minute * time.Duration(120)).Unix() - - _, err := authzclitestutil.CreateGrant( - s.clientCtx, - []string{ - grantee.String(), - "send", - fmt.Sprintf("--%s=100stake", cli.FlagSpendLimit), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagFrom, val[0].Address), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%d", cli.FlagExpiration, twoHours), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), - }, - ) - s.Require().NoError(err) - - testCases := []struct { - name string - args []string - expectErr bool - }{ - { - "Error: Invalid grantee", - []string{ - val[0].Address.String(), - "invalid grantee", - typeMsgSend, - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - }, - { - "Error: Invalid granter", - []string{ - "invalid granter", - grantee.String(), - typeMsgSend, - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - }, - { - "Valid txn (json)", - []string{ - val[0].Address.String(), - grantee.String(), - typeMsgSend, - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - }, - { - "Valid txn with allowed list (json)", - []string{ - val[0].Address.String(), - s.grantee[3].String(), - typeMsgSend, - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - }, - } - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryGrants(addresscodec.NewBech32Codec("cosmos")) - _, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - } - }) - } -} - -func (s *CLITestSuite) TestQueryGranterGrants() { - val := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) - - grantee := s.grantee[0] - require := s.Require() - - testCases := []struct { - name string - args []string - expectErr bool - expectedErr string - }{ - { - "invalid address", - []string{ - "invalid-address", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - "decoding bech32 failed", - }, - { - "no authorization found", - []string{ - grantee.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - "", - }, - { - "valid case", - []string{ - val[0].Address.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - "", - }, - { - "valid case with pagination", - []string{ - val[0].Address.String(), - "--limit=2", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - "", - }, - } - for _, tc := range testCases { - s.Run(tc.name, func() { - cmd := cli.GetQueryGranterGrants(addresscodec.NewBech32Codec("cosmos")) - out, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, tc.args) - if tc.expectErr { - require.Error(err) - require.Contains(out.String(), tc.expectedErr) - } else { - require.NoError(err) - var grants authz.QueryGranterGrantsResponse - require.NoError(s.clientCtx.Codec.UnmarshalJSON(out.Bytes(), &grants)) - } - }) - } -} diff --git a/x/authz/client/cli/tx.go b/x/authz/client/cli/tx.go index 5f3e5a491aeb..78151eaa3d5c 100644 --- a/x/authz/client/cli/tx.go +++ b/x/authz/client/cli/tx.go @@ -6,9 +6,10 @@ import ( "strings" "time" - "cosmossdk.io/core/address" "github.com/spf13/cobra" + "cosmossdk.io/core/address" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" diff --git a/x/authz/client/cli/tx_test.go b/x/authz/client/cli/tx_test.go index 3124167d28c0..62dd9550689e 100644 --- a/x/authz/client/cli/tx_test.go +++ b/x/authz/client/cli/tx_test.go @@ -11,10 +11,10 @@ import ( "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/suite" + _ "cosmossdk.io/api/cosmos/authz/v1beta1" "cosmossdk.io/core/address" sdkmath "cosmossdk.io/math" - _ "cosmossdk.io/api/cosmos/authz/v1beta1" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" addresscodec "github.com/cosmos/cosmos-sdk/codec/address" @@ -179,7 +179,7 @@ func (s *CLITestSuite) msgSendExec(grantee sdk.AccAddress) { s.clientCtx, val[0].Address, grantee, - sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(200))), + sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(200))), s.ac, fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), @@ -229,6 +229,19 @@ func (s *CLITestSuite) TestCLITxGrantAuthorization() { true, "invalid separator index", }, + { + "Invalid spend limit", + []string{ + grantee.String(), + "send", + fmt.Sprintf("--%s=0stake", cli.FlagSpendLimit), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val[0].Address.String()), + fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), + fmt.Sprintf("--%s=%d", cli.FlagExpiration, twoHours), + }, + true, + "spend-limit should be greater than zero", + }, { "Invalid expiration time", []string{ @@ -306,7 +319,7 @@ func (s *CLITestSuite) TestCLITxGrantAuthorization() { "invalid denom", }, { - "invalid bond denon for tx redelegate authorization", + "invalid bond denom for tx redelegate authorization", []string{ grantee.String(), "redelegate", @@ -337,6 +350,15 @@ func (s *CLITestSuite) TestCLITxGrantAuthorization() { true, "invalid decimal coin expression", }, + { + "invalid authorization type", + []string{ + grantee.String(), + "invalid authz type", + }, + true, + "invalid authorization type", + }, { "Valid tx send authorization", []string{ diff --git a/x/authz/expected_keepers.go b/x/authz/expected_keepers.go index 2db295aa7e52..c59837d2fc56 100644 --- a/x/authz/expected_keepers.go +++ b/x/authz/expected_keepers.go @@ -20,4 +20,5 @@ type AccountKeeper interface { type BankKeeper interface { SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins IsSendEnabledCoins(ctx context.Context, coins ...sdk.Coin) error + BlockedAddr(addr sdk.AccAddress) bool } diff --git a/x/authz/generic_authorization.go b/x/authz/generic_authorization.go index 688211a6928d..a7c790e02bf1 100644 --- a/x/authz/generic_authorization.go +++ b/x/authz/generic_authorization.go @@ -1,7 +1,8 @@ package authz import ( - context "context" + "context" + "errors" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -27,5 +28,8 @@ func (a GenericAuthorization) Accept(ctx context.Context, msg sdk.Msg) (AcceptRe // ValidateBasic implements Authorization.ValidateBasic. func (a GenericAuthorization) ValidateBasic() error { + if a.Msg == "" { + return errors.New("msg type cannot be empty") + } return nil } diff --git a/x/authz/genesis.go b/x/authz/genesis.go index d14bbbb18a8c..169684e0734f 100644 --- a/x/authz/genesis.go +++ b/x/authz/genesis.go @@ -1,6 +1,8 @@ package authz import ( + fmt "fmt" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" ) @@ -13,6 +15,15 @@ func NewGenesisState(entries []GrantAuthorization) *GenesisState { // ValidateGenesis check the given genesis state has no integrity issues func ValidateGenesis(data GenesisState) error { + for i, a := range data.Authorization { + if a.Grantee == "" { + return fmt.Errorf("authorization: %d, missing grantee", i) + } + if a.Granter == "" { + return fmt.Errorf("authorization: %d,missing granter", i) + } + + } return nil } diff --git a/x/authz/keeper/genesis.go b/x/authz/keeper/genesis.go index 91c99ac4ba37..08b84b8ed682 100644 --- a/x/authz/keeper/genesis.go +++ b/x/authz/keeper/genesis.go @@ -5,7 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/authz" ) -// InitGenesis new authz genesis +// InitGenesis initializes new authz genesis func (k Keeper) InitGenesis(ctx sdk.Context, data *authz.GenesisState) { now := ctx.BlockTime() for _, entry := range data.Authorization { diff --git a/x/authz/keeper/genesis_test.go b/x/authz/keeper/genesis_test.go index 729d24e43b7b..94320f0ff654 100644 --- a/x/authz/keeper/genesis_test.go +++ b/x/authz/keeper/genesis_test.go @@ -4,13 +4,13 @@ import ( "testing" "time" - "cosmossdk.io/log" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" + "cosmossdk.io/log" sdkmath "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - "github.com/golang/mock/gomock" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec/address" @@ -83,9 +83,12 @@ func (suite *GenesisTestSuite) TestImportExportGenesis() { // TODO, recheck! // Clear keeper suite.keeper.DeleteGrant(suite.ctx, granteeAddr, granterAddr, grant.MsgTypeURL()) + newGenesis := suite.keeper.ExportGenesis(suite.ctx) + suite.Require().NotEqual(genesis, newGenesis) + suite.Require().Empty(newGenesis) suite.keeper.InitGenesis(suite.ctx, genesis) - newGenesis := suite.keeper.ExportGenesis(suite.ctx) + newGenesis = suite.keeper.ExportGenesis(suite.ctx) suite.Require().Equal(genesis, newGenesis) } diff --git a/x/authz/keeper/grpc_query_test.go b/x/authz/keeper/grpc_query_test.go index 1a26e170c586..00d16f96381a 100644 --- a/x/authz/keeper/grpc_query_test.go +++ b/x/authz/keeper/grpc_query_test.go @@ -57,7 +57,19 @@ func (suite *TestSuite) TestGRPCQueryAuthorization() { func(require *require.Assertions, res *authz.QueryGrantsResponse) {}, }, { - "Success", + "authorization not found", + func(require *require.Assertions) { + req = &authz.QueryGrantsRequest{ + Granter: addrs[1].String(), + Grantee: addrs[0].String(), + MsgTypeUrl: banktypes.SendAuthorization{}.MsgTypeURL(), + } + }, + "authorization not found for /cosmos.bank.v1beta1.MsgSend", + func(require *require.Assertions, res *authz.QueryGrantsResponse) {}, + }, + { + "success", func(require *require.Assertions) { expAuthorization = suite.createSendAuthorization(addrs[0], addrs[1]) req = &authz.QueryGrantsRequest{ @@ -76,6 +88,28 @@ func (suite *TestSuite) TestGRPCQueryAuthorization() { require.Equal(auth.String(), expAuthorization.String()) }, }, + { + "success with allow list", + func(require *require.Assertions) { + expAuthorization = suite.createSendAuthorizationWithAllowList(addrs[0], addrs[1]) + require.Len(expAuthorization.(*banktypes.SendAuthorization).GetAllowList(), 1) + req = &authz.QueryGrantsRequest{ + Granter: addrs[1].String(), + Grantee: addrs[0].String(), + MsgTypeUrl: expAuthorization.MsgTypeURL(), + } + }, + "", + func(require *require.Assertions, res *authz.QueryGrantsResponse) { + var auth authz.Authorization + require.Equal(1, len(res.Grants)) + err := suite.encCfg.InterfaceRegistry.UnpackAny(res.Grants[0].Authorization, &auth) + require.NoError(err) + require.NotNil(auth) + require.Equal(auth.String(), expAuthorization.String()) + require.Equal(auth.(*banktypes.SendAuthorization).GetAllowList(), expAuthorization.(*banktypes.SendAuthorization).GetAllowList()) + }, + }, } for _, tc := range testCases { suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { @@ -93,70 +127,6 @@ func (suite *TestSuite) TestGRPCQueryAuthorization() { } } -func (suite *TestSuite) TestGRPCQueryAuthorizations() { - queryClient, addrs := suite.queryClient, suite.addrs - var ( - req *authz.QueryGrantsRequest - expAuthorization authz.Authorization - ) - testCases := []struct { - msg string - malleate func() - expPass bool - postTest func(res *authz.QueryGrantsResponse) - }{ - { - "fail invalid granter addr", - func() { - req = &authz.QueryGrantsRequest{} - }, - false, - func(res *authz.QueryGrantsResponse) {}, - }, - { - "fail invalid grantee addr", - func() { - req = &authz.QueryGrantsRequest{ - Granter: addrs[0].String(), - } - }, - false, - func(res *authz.QueryGrantsResponse) {}, - }, - { - "Success", - func() { - expAuthorization = suite.createSendAuthorization(addrs[0], addrs[1]) - req = &authz.QueryGrantsRequest{ - Granter: addrs[1].String(), - Grantee: addrs[0].String(), - } - }, - true, - func(res *authz.QueryGrantsResponse) { - var auth authz.Authorization - suite.Require().Equal(1, len(res.Grants)) - err := suite.encCfg.InterfaceRegistry.UnpackAny(res.Grants[0].Authorization, &auth) - suite.Require().NoError(err) - suite.Require().NotNil(auth) - suite.Require().Equal(auth.String(), expAuthorization.String()) - }, - }, - } - for _, testCase := range testCases { - suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { - testCase.malleate() - result, err := queryClient.Grants(gocontext.Background(), req) - if testCase.expPass { - suite.Require().NoError(err) - } else { - suite.Require().Error(err) - } - testCase.postTest(result) - }) - } -} - func (suite *TestSuite) TestGRPCQueryGranterGrants() { require := suite.Require() queryClient, addrs := suite.queryClient, suite.addrs @@ -312,3 +282,12 @@ func (suite *TestSuite) createSendAuthorization(grantee, granter sdk.AccAddress) suite.Require().NoError(err) return authorization } + +func (suite *TestSuite) createSendAuthorizationWithAllowList(grantee, granter sdk.AccAddress) authz.Authorization { + exp := suite.ctx.BlockHeader().Time.Add(time.Hour) + newCoins := sdk.NewCoins(sdk.NewInt64Coin("steak", 100)) + authorization := &banktypes.SendAuthorization{SpendLimit: newCoins, AllowList: []string{suite.addrs[5].String()}} + err := suite.authzKeeper.SaveGrant(suite.ctx, grantee, granter, authorization, &exp) + suite.Require().NoError(err) + return authorization +} diff --git a/x/authz/keeper/keeper.go b/x/authz/keeper/keeper.go index 8c1a11ec4851..974c18000e42 100644 --- a/x/authz/keeper/keeper.go +++ b/x/authz/keeper/keeper.go @@ -7,12 +7,12 @@ import ( "strconv" "time" - "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/gogoproto/proto" corestoretypes "cosmossdk.io/core/store" errorsmod "cosmossdk.io/errors" + "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/baseapp" @@ -34,6 +34,7 @@ type Keeper struct { cdc codec.Codec router baseapp.MessageRouter authKeeper authz.AccountKeeper + bankKeeper authz.BankKeeper } // NewKeeper constructs a message authorization Keeper @@ -46,6 +47,13 @@ func NewKeeper(storeService corestoretypes.KVStoreService, cdc codec.Codec, rout } } +// Super ugly hack to not be breaking in v0.50 and v0.47 +// DO NOT USE. +func (k Keeper) SetBankKeeper(bk authz.BankKeeper) Keeper { + k.bankKeeper = bk + return k +} + // Logger returns a module-specific logger. func (k Keeper) Logger(ctx context.Context) log.Logger { sdkCtx := sdk.UnwrapSDKContext(ctx) @@ -118,7 +126,8 @@ func (k Keeper) DispatchActions(ctx context.Context, grantee sdk.AccAddress, msg grant, found := k.getGrant(ctx, skey) if !found { - return nil, errorsmod.Wrapf(authz.ErrNoAuthorizationFound, "failed to update grant with key %s", string(skey)) + return nil, errorsmod.Wrapf(authz.ErrNoAuthorizationFound, + "failed to get grant with given granter: %s, grantee: %s & msgType: %s ", sdk.AccAddress(granter), grantee, sdk.MsgTypeURL(msg)) } if grant.Expiration != nil && grant.Expiration.Before(now) { @@ -263,9 +272,9 @@ func (k Keeper) GetAuthorizations(ctx context.Context, grantee, granter sdk.AccA iter := storetypes.KVStorePrefixIterator(store, key) defer iter.Close() - var authorization authz.Grant var authorizations []authz.Authorization for ; iter.Valid(); iter.Next() { + var authorization authz.Grant if err := k.cdc.Unmarshal(iter.Value(), &authorization); err != nil { return nil, err } diff --git a/x/authz/keeper/keeper_test.go b/x/authz/keeper/keeper_test.go index 165a47d48825..94f3f50fa3c0 100644 --- a/x/authz/keeper/keeper_test.go +++ b/x/authz/keeper/keeper_test.go @@ -68,14 +68,14 @@ func (s *TestSuite) SetupTest() { // gomock initializations ctrl := gomock.NewController(s.T()) s.accountKeeper = authztestutil.NewMockAccountKeeper(ctrl) - s.accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec("cosmos")).AnyTimes() s.bankKeeper = authztestutil.NewMockBankKeeper(ctrl) banktypes.RegisterInterfaces(s.encCfg.InterfaceRegistry) banktypes.RegisterMsgServer(s.baseApp.MsgServiceRouter(), s.bankKeeper) + s.bankKeeper.EXPECT().BlockedAddr(gomock.Any()).Return(false).AnyTimes() - s.authzKeeper = authzkeeper.NewKeeper(storeService, s.encCfg.Codec, s.baseApp.MsgServiceRouter(), s.accountKeeper) + s.authzKeeper = authzkeeper.NewKeeper(storeService, s.encCfg.Codec, s.baseApp.MsgServiceRouter(), s.accountKeeper).SetBankKeeper(s.bankKeeper) queryHelper := baseapp.NewQueryServerTestHelper(s.ctx, s.encCfg.InterfaceRegistry) authz.RegisterQueryServer(queryHelper, s.authzKeeper) @@ -478,6 +478,27 @@ func (s *TestSuite) TestGetAuthorization() { } } +func (s *TestSuite) TestGetAuthorizations() { + require := s.Require() + addr1 := s.addrs[1] + addr2 := s.addrs[2] + + genAuthMulti := authz.NewGenericAuthorization(sdk.MsgTypeURL(&banktypes.MsgMultiSend{})) + genAuthSend := authz.NewGenericAuthorization(sdk.MsgTypeURL(&banktypes.MsgSend{})) + + start := s.ctx.BlockHeader().Time + expired := start.Add(time.Duration(1) * time.Second) + + s.Require().NoError(s.authzKeeper.SaveGrant(s.ctx, addr1, addr2, genAuthMulti, &expired), "creating multi send grant 1->2") + s.Require().NoError(s.authzKeeper.SaveGrant(s.ctx, addr1, addr2, genAuthSend, &expired), "creating send grant 1->2") + + authzs, err := s.authzKeeper.GetAuthorizations(s.ctx, addr1, addr2) + require.NoError(err) + require.Len(authzs, 2) + require.Equal(sdk.MsgTypeURL(&banktypes.MsgMultiSend{}), authzs[0].MsgTypeURL()) + require.Equal(sdk.MsgTypeURL(&banktypes.MsgSend{}), authzs[1].MsgTypeURL()) +} + func TestTestSuite(t *testing.T) { suite.Run(t, new(TestSuite)) } diff --git a/x/authz/keeper/msg_server.go b/x/authz/keeper/msg_server.go index 8f5b0cb79373..98e24a44f2a2 100644 --- a/x/authz/keeper/msg_server.go +++ b/x/authz/keeper/msg_server.go @@ -6,6 +6,7 @@ import ( "strings" errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/authz" @@ -37,6 +38,10 @@ func (k Keeper) Grant(goCtx context.Context, msg *authz.MsgGrant) (*authz.MsgGra ctx := sdk.UnwrapSDKContext(goCtx) granteeAcc := k.authKeeper.GetAccount(ctx, grantee) if granteeAcc == nil { + if k.bankKeeper.BlockedAddr(grantee) { + return nil, sdkerrors.ErrUnauthorized.Wrapf("%s is not allowed to receive funds", grantee) + } + granteeAcc = k.authKeeper.NewAccountWithAddress(ctx, grantee) k.authKeeper.SetAccount(ctx, granteeAcc) } diff --git a/x/authz/keeper/msg_server_test.go b/x/authz/keeper/msg_server_test.go index 96e65fed4a53..d314c4d2ce08 100644 --- a/x/authz/keeper/msg_server_test.go +++ b/x/authz/keeper/msg_server_test.go @@ -3,6 +3,8 @@ package keeper_test import ( "time" + "github.com/golang/mock/gomock" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec/address" @@ -11,8 +13,6 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/authz" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - - "github.com/golang/mock/gomock" ) func (suite *TestSuite) createAccounts(accs int) []sdk.AccAddress { @@ -331,7 +331,7 @@ func (suite *TestSuite) TestExec() { errMsg: "empty address string is not allowed", }, { - name: "no existing grant", + name: "non existing grant", malleate: func() authz.MsgExec { return authz.NewMsgExec(grantee, []sdk.Msg{msg}) }, diff --git a/x/authz/migrations/v2/keys_test.go b/x/authz/migrations/v2/keys_test.go index 7553b01427b8..73b4873e3595 100644 --- a/x/authz/migrations/v2/keys_test.go +++ b/x/authz/migrations/v2/keys_test.go @@ -3,11 +3,12 @@ package v2 import ( "testing" + "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" bank "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/stretchr/testify/require" ) var ( diff --git a/x/authz/migrations/v2/store_test.go b/x/authz/migrations/v2/store_test.go index 7e05f87b8080..cf71c4519ead 100644 --- a/x/authz/migrations/v2/store_test.go +++ b/x/authz/migrations/v2/store_test.go @@ -4,9 +4,10 @@ import ( "testing" "time" - storetypes "cosmossdk.io/store/types" "github.com/stretchr/testify/require" + storetypes "cosmossdk.io/store/types" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/runtime" diff --git a/x/authz/module/abci_test.go b/x/authz/module/abci_test.go index 2d9b39536ea1..12055e0cfa12 100644 --- a/x/authz/module/abci_test.go +++ b/x/authz/module/abci_test.go @@ -4,12 +4,13 @@ import ( "testing" "time" - "cosmossdk.io/log" - storetypes "cosmossdk.io/store/types" "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/runtime" diff --git a/x/authz/module/autocli.go b/x/authz/module/autocli.go new file mode 100644 index 000000000000..fc551183e475 --- /dev/null +++ b/x/authz/module/autocli.go @@ -0,0 +1,76 @@ +package authz + +import ( + "fmt" + + authzv1beta1 "cosmossdk.io/api/cosmos/authz/v1beta1" + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + + "github.com/cosmos/cosmos-sdk/version" + bank "github.com/cosmos/cosmos-sdk/x/bank/types" +) + +// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: authzv1beta1.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Grants", + Use: "grants [granter-addr] [grantee-addr] ", + Short: "Query grants for a granter-grantee pair and optionally a msg-type-url", + Long: "Query authorization grants for a granter-grantee pair. If msg-type-url is set, it will select grants only for that msg type.", + Example: fmt.Sprintf("%s query authz grants cosmos1skj.. cosmos1skjwj.. %s", version.AppName, bank.SendAuthorization{}.MsgTypeURL()), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "granter"}, + {ProtoField: "grantee"}, + {ProtoField: "msg_type_url", Optional: true}, + }, + }, + { + RpcMethod: "GranterGrants", + Use: "grants-by-granter [granter-addr]", + Short: "Query authorization grants granted by granter", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "granter"}, + }, + }, + { + RpcMethod: "GranteeGrants", + Use: "grants-by-grantee [grantee-addr]", + Short: "Query authorization grants granted to a grantee", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "grantee"}, + }, + }, + }, + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: authzv1beta1.Msg_ServiceDesc.ServiceName, + EnhanceCustomCommand: false, // use custom commands only until v0.51 + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Exec", + Use: "exec [msg-json-file] --from [grantee]", + Short: "Execute tx on behalf of granter account", + Example: fmt.Sprintf("$ %s tx authz exec msg.json --from grantee\n $ %[1]s tx bank send [granter] [recipient] [amount] --generate-only | jq .body.messages > msg.json && %[1]s tx authz exec msg.json --from grantee", version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "msgs", Varargs: true}, + }, + }, + { + RpcMethod: "Revoke", + Use: "revoke [grantee] [msg-type-url] --from [granter]", + Short: `Revoke authorization from a granter to a grantee`, + Example: fmt.Sprintf(`%s tx authz revoke cosmos1skj.. %s --from=cosmos1skj..`, + version.AppName, bank.SendAuthorization{}.MsgTypeURL()), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "grantee"}, + {ProtoField: "msg_type_url"}, + }, + }, + }, + }, + } +} diff --git a/x/authz/module/module.go b/x/authz/module/module.go index bf398012f8f3..3c80d13c1420 100644 --- a/x/authz/module/module.go +++ b/x/authz/module/module.go @@ -5,17 +5,14 @@ import ( "encoding/json" "fmt" - abci "github.com/cometbft/cometbft/abci/types" gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" modulev1 "cosmossdk.io/api/cosmos/authz/module/v1" "cosmossdk.io/core/address" "cosmossdk.io/core/appmodule" - - "cosmossdk.io/depinject" - "cosmossdk.io/core/store" + "cosmossdk.io/depinject" "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/baseapp" @@ -32,8 +29,13 @@ import ( ) var ( - _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModuleBasic = AppModule{} _ module.AppModuleSimulation = AppModule{} + _ module.HasGenesis = AppModule{} + _ module.HasServices = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasBeginBlocker = AppModule{} ) // AppModuleBasic defines the basic application module used by the authz module. @@ -92,11 +94,6 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx sdkclient.Context, mux } } -// GetQueryCmd returns the cli query commands for the authz module -func (ab AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.GetQueryCmd(ab.ac) -} - // GetTxCmd returns the transaction commands for the authz module func (ab AppModuleBasic) GetTxCmd() *cobra.Command { return cli.GetTxCmd(ab.ac) @@ -105,6 +102,7 @@ func (ab AppModuleBasic) GetTxCmd() *cobra.Command { // AppModule implements the sdk.AppModule interface type AppModule struct { AppModuleBasic + keeper keeper.Keeper accountKeeper authz.AccountKeeper bankKeeper authz.BankKeeper @@ -115,36 +113,25 @@ type AppModule struct { func NewAppModule(cdc codec.Codec, keeper keeper.Keeper, ak authz.AccountKeeper, bk authz.BankKeeper, registry cdctypes.InterfaceRegistry) AppModule { return AppModule{ AppModuleBasic: AppModuleBasic{cdc: cdc, ac: ak.AddressCodec()}, - keeper: keeper, + keeper: keeper.SetBankKeeper(bk), // Super ugly hack to not be api breaking in v0.50 and v0.47 accountKeeper: ak, bankKeeper: bk, registry: registry, } } -var ( - _ appmodule.AppModule = AppModule{} - _ appmodule.HasBeginBlocker = AppModule{} -) - // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} // IsAppModule implements the appmodule.AppModule interface. func (am AppModule) IsAppModule() {} -// Name returns the authz module's name. -func (AppModule) Name() string { - return authz.ModuleName -} - // InitGenesis performs genesis initialization for the authz module. It returns // no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) { var genesisState authz.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) am.keeper.InitGenesis(ctx, &genesisState) - return []abci.ValidatorUpdate{} } // ExportGenesis returns the exported genesis state as raw bytes for the authz @@ -191,7 +178,7 @@ type ModuleOutputs struct { func ProvideModule(in ModuleInputs) ModuleOutputs { k := keeper.NewKeeper(in.StoreService, in.Cdc, in.MsgServiceRouter, in.AccountKeeper) m := NewAppModule(in.Cdc, k, in.AccountKeeper, in.BankKeeper, in.Registry) - return ModuleOutputs{AuthzKeeper: k, Module: m} + return ModuleOutputs{AuthzKeeper: k.SetBankKeeper(in.BankKeeper) /* depinject ux improvement */, Module: m} } // ____________________________________________________________________________ diff --git a/x/authz/msgs.go b/x/authz/msgs.go index c0ed9c0eada3..1721c6c5347c 100644 --- a/x/authz/msgs.go +++ b/x/authz/msgs.go @@ -33,12 +33,6 @@ func NewMsgGrant(granter, grantee sdk.AccAddress, a Authorization, expiration *t return m, nil } -// GetSigners implements Msg -func (msg MsgGrant) GetSigners() []sdk.AccAddress { - granter, _ := sdk.AccAddressFromBech32(msg.Granter) - return []sdk.AccAddress{granter} -} - // GetAuthorization returns the cache value from the MsgGrant.Authorization if present. func (msg *MsgGrant) GetAuthorization() (Authorization, error) { return msg.Grant.GetAuthorization() @@ -85,12 +79,6 @@ func NewMsgRevoke(granter, grantee sdk.AccAddress, msgTypeURL string) MsgRevoke } } -// GetSigners implements Msg -func (msg MsgRevoke) GetSigners() []sdk.AccAddress { - granter, _ := sdk.AccAddressFromBech32(msg.Granter) - return []sdk.AccAddress{granter} -} - // NewMsgExec creates a new MsgExecAuthorized func NewMsgExec(grantee sdk.AccAddress, msgs []sdk.Msg) MsgExec { msgsAny := make([]*cdctypes.Any, len(msgs)) @@ -122,9 +110,3 @@ func (msg MsgExec) GetMessages() ([]sdk.Msg, error) { return msgs, nil } - -// GetSigners implements Msg -func (msg MsgExec) GetSigners() []sdk.AccAddress { - grantee, _ := sdk.AccAddressFromBech32(msg.Grantee) - return []sdk.AccAddress{grantee} -} diff --git a/x/authz/msgs_test.go b/x/authz/msgs_test.go index bcd17cf4d86a..ea634fd39526 100644 --- a/x/authz/msgs_test.go +++ b/x/authz/msgs_test.go @@ -7,23 +7,21 @@ import ( "time" "github.com/cosmos/gogoproto/proto" + "github.com/stretchr/testify/require" "google.golang.org/protobuf/types/known/anypb" txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" + sdkmath "cosmossdk.io/math" txsigning "cosmossdk.io/x/tx/signing" "cosmossdk.io/x/tx/signing/aminojson" - "github.com/cosmos/cosmos-sdk/codec" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - - "github.com/stretchr/testify/require" - - sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" "github.com/cosmos/cosmos-sdk/x/authz" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) func TestMsgGrantGetAuthorization(t *testing.T) { @@ -73,7 +71,7 @@ func TestAminoJSON(t *testing.T) { require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("cosmosvaloper1xcy3els9ua75kdm783c3qu0rfa2eples6eavqq") require.NoError(t, err) - stakingAuth, err := stakingtypes.NewStakeAuthorization([]sdk.ValAddress{valAddr}, nil, stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_DELEGATE, &sdk.Coin{Denom: "stake", Amount: sdk.NewInt(1000)}) + stakingAuth, err := stakingtypes.NewStakeAuthorization([]sdk.ValAddress{valAddr}, nil, stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_DELEGATE, &sdk.Coin{Denom: "stake", Amount: sdkmath.NewInt(1000)}) require.NoError(t, err) delegateGrant, err := authz.NewGrant(blockTime, stakingAuth, nil) require.NoError(t, err) @@ -113,7 +111,7 @@ func TestAminoJSON(t *testing.T) { for i, tt := range tests { t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { tx.Msgs = []sdk.Msg{tt.msg} - legacyJSON := string(legacytx.StdSignBytes("foo", 1, 1, 1, legacytx.StdFee{}, []sdk.Msg{tt.msg}, "memo", nil)) + legacyJSON := string(legacytx.StdSignBytes("foo", 1, 1, 1, legacytx.StdFee{}, []sdk.Msg{tt.msg}, "memo")) require.Equal(t, tt.exp, legacyJSON) legacyAny, err := cdctypes.NewAnyWithValue(tt.msg) diff --git a/x/authz/query.pb.go b/x/authz/query.pb.go index c022c6e1893a..09dc195149bf 100644 --- a/x/authz/query.pb.go +++ b/x/authz/query.pb.go @@ -265,7 +265,7 @@ func (m *QueryGranterGrantsResponse) GetPagination() *query.PageResponse { return nil } -// QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. +// QueryGranteeGrantsRequest is the request type for the Query/GranteeGrants RPC method. type QueryGranteeGrantsRequest struct { Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` // pagination defines an pagination for the request. diff --git a/x/authz/simulation/decoder_test.go b/x/authz/simulation/decoder_test.go index 487deae31f18..ffaf441195f1 100644 --- a/x/authz/simulation/decoder_test.go +++ b/x/authz/simulation/decoder_test.go @@ -9,13 +9,12 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/kv" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/authz" "github.com/cosmos/cosmos-sdk/x/authz/keeper" authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module" "github.com/cosmos/cosmos-sdk/x/authz/simulation" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - - moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" ) func TestDecodeStore(t *testing.T) { diff --git a/x/authz/simulation/genesis_test.go b/x/authz/simulation/genesis_test.go index f0dd86fa4dbb..416381c94fb5 100644 --- a/x/authz/simulation/genesis_test.go +++ b/x/authz/simulation/genesis_test.go @@ -8,14 +8,14 @@ import ( "github.com/stretchr/testify/require" sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/types/module" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/authz" authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module" "github.com/cosmos/cosmos-sdk/x/authz/simulation" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - - moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" ) func TestRandomizedGenState(t *testing.T) { diff --git a/x/authz/simulation/operations_test.go b/x/authz/simulation/operations_test.go index e6778c524711..8a6894dc2b07 100644 --- a/x/authz/simulation/operations_test.go +++ b/x/authz/simulation/operations_test.go @@ -5,12 +5,13 @@ import ( "testing" "time" - "cosmossdk.io/depinject" - "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/suite" + "cosmossdk.io/depinject" + "cosmossdk.io/log" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/x/authz/testutil/app_config.go b/x/authz/testutil/app_config.go index fb6924a08d26..f1e61c100bbb 100644 --- a/x/authz/testutil/app_config.go +++ b/x/authz/testutil/app_config.go @@ -2,7 +2,6 @@ package testutil import ( "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/authz/module" // import as blank for app wiring diff --git a/x/authz/testutil/expected_keepers_mocks.go b/x/authz/testutil/expected_keepers_mocks.go index b9e8f521c327..d751684835dd 100644 --- a/x/authz/testutil/expected_keepers_mocks.go +++ b/x/authz/testutil/expected_keepers_mocks.go @@ -113,6 +113,20 @@ func (m *MockBankKeeper) EXPECT() *MockBankKeeperMockRecorder { return m.recorder } +// BlockedAddr mocks base method. +func (m *MockBankKeeper) BlockedAddr(addr types.AccAddress) bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "BlockedAddr", addr) + ret0, _ := ret[0].(bool) + return ret0 +} + +// BlockedAddr indicates an expected call of BlockedAddr. +func (mr *MockBankKeeperMockRecorder) BlockedAddr(addr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockedAddr", reflect.TypeOf((*MockBankKeeper)(nil).BlockedAddr), addr) +} + // IsSendEnabledCoins mocks base method. func (m *MockBankKeeper) IsSendEnabledCoins(ctx context.Context, coins ...types.Coin) error { m.ctrl.T.Helper() diff --git a/x/authz/tx.pb.go b/x/authz/tx.pb.go index 369d9283e46c..efbb15db7cc7 100644 --- a/x/authz/tx.pb.go +++ b/x/authz/tx.pb.go @@ -73,23 +73,22 @@ func (m *MsgGrant) XXX_DiscardUnknown() { var xxx_messageInfo_MsgGrant proto.InternalMessageInfo -// MsgExecResponse defines the Msg/MsgExecResponse response type. -type MsgExecResponse struct { - Results [][]byte `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` +// MsgGrantResponse defines the Msg/MsgGrant response type. +type MsgGrantResponse struct { } -func (m *MsgExecResponse) Reset() { *m = MsgExecResponse{} } -func (m *MsgExecResponse) String() string { return proto.CompactTextString(m) } -func (*MsgExecResponse) ProtoMessage() {} -func (*MsgExecResponse) Descriptor() ([]byte, []int) { +func (m *MsgGrantResponse) Reset() { *m = MsgGrantResponse{} } +func (m *MsgGrantResponse) String() string { return proto.CompactTextString(m) } +func (*MsgGrantResponse) ProtoMessage() {} +func (*MsgGrantResponse) Descriptor() ([]byte, []int) { return fileDescriptor_3ceddab7d8589ad1, []int{1} } -func (m *MsgExecResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgGrantResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgExecResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgGrantResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgExecResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgGrantResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -99,17 +98,17 @@ func (m *MsgExecResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } -func (m *MsgExecResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgExecResponse.Merge(m, src) +func (m *MsgGrantResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGrantResponse.Merge(m, src) } -func (m *MsgExecResponse) XXX_Size() int { +func (m *MsgGrantResponse) XXX_Size() int { return m.Size() } -func (m *MsgExecResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgExecResponse.DiscardUnknown(m) +func (m *MsgGrantResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGrantResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgExecResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgGrantResponse proto.InternalMessageInfo // MsgExec attempts to execute the provided messages using // authorizations granted to the grantee. Each message should have only @@ -155,22 +154,23 @@ func (m *MsgExec) XXX_DiscardUnknown() { var xxx_messageInfo_MsgExec proto.InternalMessageInfo -// MsgGrantResponse defines the Msg/MsgGrant response type. -type MsgGrantResponse struct { +// MsgExecResponse defines the Msg/MsgExecResponse response type. +type MsgExecResponse struct { + Results [][]byte `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` } -func (m *MsgGrantResponse) Reset() { *m = MsgGrantResponse{} } -func (m *MsgGrantResponse) String() string { return proto.CompactTextString(m) } -func (*MsgGrantResponse) ProtoMessage() {} -func (*MsgGrantResponse) Descriptor() ([]byte, []int) { +func (m *MsgExecResponse) Reset() { *m = MsgExecResponse{} } +func (m *MsgExecResponse) String() string { return proto.CompactTextString(m) } +func (*MsgExecResponse) ProtoMessage() {} +func (*MsgExecResponse) Descriptor() ([]byte, []int) { return fileDescriptor_3ceddab7d8589ad1, []int{3} } -func (m *MsgGrantResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgExecResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgGrantResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgExecResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgGrantResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgExecResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -180,17 +180,17 @@ func (m *MsgGrantResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *MsgGrantResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgGrantResponse.Merge(m, src) +func (m *MsgExecResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExecResponse.Merge(m, src) } -func (m *MsgGrantResponse) XXX_Size() int { +func (m *MsgExecResponse) XXX_Size() int { return m.Size() } -func (m *MsgGrantResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgGrantResponse.DiscardUnknown(m) +func (m *MsgExecResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExecResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgGrantResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgExecResponse proto.InternalMessageInfo // MsgRevoke revokes any authorization with the provided sdk.Msg type on the // granter's account with that has been granted to the grantee. @@ -272,9 +272,9 @@ var xxx_messageInfo_MsgRevokeResponse proto.InternalMessageInfo func init() { proto.RegisterType((*MsgGrant)(nil), "cosmos.authz.v1beta1.MsgGrant") - proto.RegisterType((*MsgExecResponse)(nil), "cosmos.authz.v1beta1.MsgExecResponse") - proto.RegisterType((*MsgExec)(nil), "cosmos.authz.v1beta1.MsgExec") proto.RegisterType((*MsgGrantResponse)(nil), "cosmos.authz.v1beta1.MsgGrantResponse") + proto.RegisterType((*MsgExec)(nil), "cosmos.authz.v1beta1.MsgExec") + proto.RegisterType((*MsgExecResponse)(nil), "cosmos.authz.v1beta1.MsgExecResponse") proto.RegisterType((*MsgRevoke)(nil), "cosmos.authz.v1beta1.MsgRevoke") proto.RegisterType((*MsgRevokeResponse)(nil), "cosmos.authz.v1beta1.MsgRevokeResponse") } @@ -283,41 +283,41 @@ func init() { proto.RegisterFile("cosmos/authz/v1beta1/tx.proto", fileDescriptor var fileDescriptor_3ceddab7d8589ad1 = []byte{ // 555 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0x4f, 0x6f, 0x12, 0x4f, - 0x18, 0x66, 0x4a, 0x29, 0x3f, 0xa6, 0x4d, 0x7e, 0x76, 0x4b, 0xe2, 0x76, 0x9b, 0x6e, 0x37, 0x6b, - 0xab, 0x04, 0xc3, 0x4c, 0xc0, 0x1b, 0xf1, 0x52, 0x92, 0xc6, 0x8b, 0xc4, 0x64, 0xd5, 0x8b, 0x17, - 0xb2, 0xc0, 0x38, 0x25, 0x65, 0x77, 0xc8, 0xce, 0x42, 0xc0, 0x93, 0xf1, 0xe8, 0xc9, 0x8f, 0xa1, - 0x37, 0x0e, 0x3d, 0xfa, 0x01, 0x88, 0xa7, 0xc6, 0x83, 0xf1, 0x64, 0x14, 0x0e, 0x7c, 0x0c, 0xcd, - 0xce, 0x1f, 0xa4, 0x86, 0xd6, 0x9e, 0xbc, 0xc0, 0xbc, 0xef, 0xf3, 0xbc, 0xb3, 0xef, 0xf3, 0x3e, - 0x6f, 0x06, 0xee, 0xb7, 0x18, 0x0f, 0x18, 0xc7, 0x7e, 0x3f, 0x3e, 0x7d, 0x85, 0x07, 0xe5, 0x26, - 0x89, 0xfd, 0x32, 0x8e, 0x87, 0xa8, 0x17, 0xb1, 0x98, 0x19, 0x79, 0x09, 0x23, 0x01, 0x23, 0x05, - 0x5b, 0xbb, 0x32, 0xdb, 0x10, 0x1c, 0xac, 0x28, 0x22, 0xb0, 0xf2, 0x94, 0x51, 0x26, 0xf3, 0xc9, - 0x49, 0x65, 0x77, 0x29, 0x63, 0xb4, 0x4b, 0xb0, 0x88, 0x9a, 0xfd, 0x97, 0xd8, 0x0f, 0x47, 0x0a, - 0x72, 0x56, 0x36, 0x20, 0xbf, 0x27, 0x19, 0xb7, 0x15, 0x23, 0xe0, 0x14, 0x0f, 0xca, 0xc9, 0x9f, - 0x02, 0xb6, 0xfd, 0xa0, 0x13, 0x32, 0x2c, 0x7e, 0x65, 0xca, 0xfd, 0x02, 0xe0, 0x7f, 0x75, 0x4e, - 0x1f, 0x45, 0x7e, 0x18, 0x1b, 0x15, 0x98, 0xa5, 0xc9, 0x81, 0x44, 0x26, 0x70, 0x40, 0x21, 0x57, - 0x33, 0x3f, 0x9f, 0x97, 0xb4, 0xa2, 0xe3, 0x76, 0x3b, 0x22, 0x9c, 0x3f, 0x8d, 0xa3, 0x4e, 0x48, - 0x3d, 0x4d, 0xfc, 0x5d, 0x43, 0xcc, 0xb5, 0x9b, 0xd5, 0x10, 0xe3, 0x21, 0xcc, 0x88, 0xa3, 0x99, - 0x76, 0x40, 0x61, 0xb3, 0xb2, 0x87, 0x56, 0x0d, 0x0d, 0x89, 0x9e, 0x6a, 0xb9, 0xc9, 0xb7, 0x83, - 0xd4, 0xfb, 0xf9, 0xb8, 0x08, 0x3c, 0x59, 0x54, 0x3d, 0x7c, 0x33, 0x1f, 0x17, 0xf5, 0xf7, 0xdf, - 0xce, 0xc7, 0xc5, 0x1d, 0x59, 0x5e, 0xe2, 0xed, 0x33, 0xac, 0xb5, 0xb8, 0xf7, 0xe1, 0xff, 0x75, - 0x4e, 0x4f, 0x86, 0xa4, 0xe5, 0x11, 0xde, 0x63, 0x21, 0x27, 0x86, 0x09, 0xb3, 0x11, 0xe1, 0xfd, - 0x6e, 0xcc, 0x4d, 0xe0, 0xa4, 0x0b, 0x5b, 0x9e, 0x0e, 0xdd, 0x0f, 0x00, 0x66, 0x15, 0x7b, 0x59, - 0x10, 0xb8, 0xa9, 0xa0, 0x13, 0xb8, 0x1e, 0x70, 0xca, 0xcd, 0x35, 0x27, 0x5d, 0xd8, 0xac, 0xe4, - 0x91, 0x74, 0x0f, 0x69, 0xf7, 0xd0, 0x71, 0x38, 0xaa, 0xed, 0x7d, 0x3a, 0x2f, 0x29, 0x67, 0x50, - 0xd3, 0xe7, 0x64, 0xa1, 0xb3, 0xce, 0xa9, 0x27, 0xca, 0xab, 0x77, 0x96, 0x94, 0x91, 0x44, 0x99, - 0x71, 0x59, 0x59, 0xd2, 0x9f, 0x6b, 0xc0, 0x5b, 0x5a, 0xa4, 0x56, 0xe6, 0x7e, 0x04, 0x30, 0x97, - 0x5c, 0x43, 0x06, 0xec, 0x8c, 0xfc, 0x33, 0x1b, 0x1d, 0xb8, 0x15, 0x70, 0xda, 0x88, 0x47, 0x3d, - 0xd2, 0xe8, 0x47, 0x5d, 0xe1, 0x66, 0xce, 0x83, 0x01, 0xa7, 0xcf, 0x46, 0x3d, 0xf2, 0x3c, 0xea, - 0x56, 0x8f, 0xfe, 0xb4, 0x2a, 0x7f, 0x59, 0x90, 0x6c, 0xd8, 0xdd, 0x81, 0xdb, 0x8b, 0x40, 0x6b, - 0xaa, 0xfc, 0x04, 0x30, 0x5d, 0xe7, 0xd4, 0x78, 0x02, 0x33, 0x72, 0x3b, 0xed, 0xd5, 0x6b, 0xa2, - 0x87, 0x61, 0xdd, 0xbd, 0x1e, 0x5f, 0xac, 0xc1, 0x63, 0xb8, 0x2e, 0x8c, 0xde, 0xbf, 0x92, 0x9f, - 0xc0, 0xd6, 0xd1, 0xb5, 0xf0, 0xe2, 0x36, 0x0f, 0x6e, 0xa8, 0xb1, 0x1f, 0x5c, 0x59, 0x20, 0x09, - 0xd6, 0xbd, 0xbf, 0x10, 0xf4, 0x9d, 0x56, 0xe6, 0x75, 0xb2, 0xef, 0xb5, 0xda, 0xe4, 0x87, 0x9d, - 0x9a, 0x4c, 0x6d, 0x70, 0x31, 0xb5, 0xc1, 0xf7, 0xa9, 0x0d, 0xde, 0xcd, 0xec, 0xd4, 0xc5, 0xcc, - 0x4e, 0x7d, 0x9d, 0xd9, 0xa9, 0x17, 0x87, 0xb4, 0x13, 0x9f, 0xf6, 0x9b, 0xa8, 0xc5, 0x02, 0xf5, - 0xa2, 0xe0, 0xa5, 0xe1, 0x0e, 0xe5, 0x8b, 0xd0, 0xdc, 0x10, 0x3b, 0xf8, 0xe0, 0x57, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xbb, 0x9d, 0x9d, 0x9e, 0xb7, 0x04, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xbf, 0x6e, 0x13, 0x4f, + 0x10, 0xf6, 0xc6, 0x71, 0xfc, 0xf3, 0x26, 0xd2, 0x8f, 0x5c, 0x2c, 0x71, 0xb9, 0x28, 0x97, 0xd3, + 0x91, 0x80, 0x65, 0xe4, 0x5d, 0xd9, 0x74, 0x16, 0x4d, 0x2c, 0x45, 0x34, 0x58, 0x48, 0x07, 0x34, + 0x34, 0xd6, 0xd9, 0x5e, 0x36, 0x56, 0x7c, 0xb7, 0xd6, 0xed, 0xd9, 0xb2, 0xa9, 0x10, 0x25, 0x15, + 0x8f, 0x01, 0x9d, 0x8b, 0x94, 0x3c, 0x80, 0x45, 0x15, 0x51, 0x20, 0x2a, 0x04, 0x76, 0xe1, 0xc7, + 0x00, 0xdd, 0xfe, 0x31, 0x0e, 0x72, 0x42, 0x2a, 0x9a, 0xbb, 0x99, 0xf9, 0xbe, 0xd9, 0x9d, 0x6f, + 0x66, 0xb4, 0x70, 0xbf, 0xc5, 0x78, 0xc0, 0x38, 0xf6, 0xfb, 0xf1, 0xe9, 0x2b, 0x3c, 0x28, 0x37, + 0x49, 0xec, 0x97, 0x71, 0x3c, 0x44, 0xbd, 0x88, 0xc5, 0xcc, 0xc8, 0x4b, 0x18, 0x09, 0x18, 0x29, + 0xd8, 0xda, 0x95, 0xd1, 0x86, 0xe0, 0x60, 0x45, 0x11, 0x8e, 0x95, 0xa7, 0x8c, 0x32, 0x19, 0x4f, + 0x2c, 0x15, 0xdd, 0xa5, 0x8c, 0xd1, 0x2e, 0xc1, 0xc2, 0x6b, 0xf6, 0x5f, 0x62, 0x3f, 0x1c, 0x29, + 0xc8, 0x59, 0x59, 0x80, 0xbc, 0x4f, 0x32, 0x6e, 0x2b, 0x46, 0xc0, 0x29, 0x1e, 0x94, 0x93, 0x9f, + 0x02, 0xb6, 0xfd, 0xa0, 0x13, 0x32, 0x2c, 0xbe, 0x32, 0xe4, 0x7e, 0x01, 0xf0, 0xbf, 0x3a, 0xa7, + 0x8f, 0x22, 0x3f, 0x8c, 0x8d, 0x0a, 0xcc, 0xd2, 0xc4, 0x20, 0x91, 0x09, 0x1c, 0x50, 0xc8, 0xd5, + 0xcc, 0xcf, 0xe7, 0x25, 0xad, 0xe8, 0xb8, 0xdd, 0x8e, 0x08, 0xe7, 0x4f, 0xe3, 0xa8, 0x13, 0x52, + 0x4f, 0x13, 0x7f, 0xe7, 0x10, 0x73, 0xed, 0x66, 0x39, 0xc4, 0x78, 0x08, 0x33, 0xc2, 0x34, 0xd3, + 0x0e, 0x28, 0x6c, 0x56, 0xf6, 0xd0, 0xaa, 0xa6, 0x21, 0x51, 0x53, 0x2d, 0x37, 0xf9, 0x76, 0x90, + 0x7a, 0x3f, 0x1f, 0x17, 0x81, 0x27, 0x93, 0xaa, 0x87, 0x6f, 0xe6, 0xe3, 0xa2, 0xbe, 0xff, 0xed, + 0x7c, 0x5c, 0xdc, 0x91, 0xe9, 0x25, 0xde, 0x3e, 0xc3, 0x5a, 0x8b, 0x6b, 0xc0, 0x5b, 0xda, 0xf6, + 0x08, 0xef, 0xb1, 0x90, 0x13, 0xf7, 0x03, 0x80, 0xd9, 0x3a, 0xa7, 0x27, 0x43, 0xd2, 0x5a, 0xae, + 0x1b, 0xdc, 0xb4, 0xee, 0x13, 0xb8, 0x1e, 0x70, 0xca, 0xcd, 0x35, 0x27, 0x5d, 0xd8, 0xac, 0xe4, + 0x91, 0x1c, 0x12, 0xd2, 0x43, 0x42, 0xc7, 0xe1, 0xa8, 0xb6, 0xf7, 0xe9, 0xbc, 0xa4, 0x06, 0x80, + 0x9a, 0x3e, 0x27, 0x0b, 0x39, 0x75, 0x4e, 0x3d, 0x91, 0x5e, 0xbd, 0xb3, 0x24, 0x80, 0x24, 0x02, + 0x8c, 0xcb, 0x02, 0x92, 0xfa, 0xdc, 0xfb, 0xf0, 0x7f, 0x65, 0xea, 0xf2, 0x0d, 0x13, 0x66, 0x23, + 0xc2, 0xfb, 0xdd, 0x98, 0x9b, 0xc0, 0x49, 0x17, 0xb6, 0x3c, 0xed, 0xba, 0x1f, 0x01, 0xcc, 0x25, + 0xe7, 0x93, 0x01, 0x3b, 0x23, 0xff, 0x6c, 0x8c, 0x0e, 0xdc, 0x0a, 0x38, 0x6d, 0xc4, 0xa3, 0x1e, + 0x69, 0xf4, 0xa3, 0xae, 0x98, 0x66, 0xce, 0x83, 0x01, 0xa7, 0xcf, 0x46, 0x3d, 0xf2, 0x3c, 0xea, + 0x56, 0x8f, 0xfe, 0x1c, 0x55, 0xfe, 0xb2, 0x52, 0x59, 0xb0, 0xbb, 0x03, 0xb7, 0x17, 0x8e, 0x56, + 0x5b, 0xf9, 0x09, 0x60, 0xba, 0xce, 0xa9, 0xf1, 0x04, 0x66, 0xe4, 0x76, 0xda, 0xab, 0xd7, 0x44, + 0x4f, 0xd9, 0xba, 0x7b, 0x3d, 0xbe, 0x68, 0xe3, 0x63, 0xb8, 0x2e, 0x36, 0x60, 0xff, 0x4a, 0x7e, + 0x02, 0x5b, 0x47, 0xd7, 0xc2, 0x8b, 0xd3, 0x3c, 0xb8, 0xa1, 0xda, 0x7e, 0x70, 0x65, 0x82, 0x24, + 0x58, 0xf7, 0xfe, 0x42, 0xd0, 0x67, 0x5a, 0x99, 0xd7, 0xc9, 0xbe, 0xd7, 0x6a, 0x93, 0x1f, 0x76, + 0x6a, 0x32, 0xb5, 0xc1, 0xc5, 0xd4, 0x06, 0xdf, 0xa7, 0x36, 0x78, 0x37, 0xb3, 0x53, 0x17, 0x33, + 0x3b, 0xf5, 0x75, 0x66, 0xa7, 0x5e, 0x1c, 0xd2, 0x4e, 0x7c, 0xda, 0x6f, 0xa2, 0x16, 0x0b, 0xd4, + 0x8b, 0x82, 0x97, 0x9a, 0x3b, 0x94, 0x2f, 0x42, 0x73, 0x43, 0x2c, 0xe7, 0x83, 0x5f, 0x01, 0x00, + 0x00, 0xff, 0xff, 0x13, 0x38, 0x6d, 0x34, 0xb7, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -537,7 +537,7 @@ func (m *MsgGrant) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgExecResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgGrantResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -547,25 +547,16 @@ func (m *MsgExecResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgExecResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgGrantResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgExecResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgGrantResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Results) > 0 { - for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Results[iNdEx]) - copy(dAtA[i:], m.Results[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.Results[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } return len(dAtA) - i, nil } @@ -613,7 +604,7 @@ func (m *MsgExec) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgGrantResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgExecResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -623,16 +614,25 @@ func (m *MsgGrantResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgGrantResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgExecResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgGrantResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgExecResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if len(m.Results) > 0 { + for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Results[iNdEx]) + copy(dAtA[i:], m.Results[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Results[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } return len(dAtA) - i, nil } @@ -733,18 +733,12 @@ func (m *MsgGrant) Size() (n int) { return n } -func (m *MsgExecResponse) Size() (n int) { +func (m *MsgGrantResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.Results) > 0 { - for _, b := range m.Results { - l = len(b) - n += 1 + l + sovTx(uint64(l)) - } - } return n } @@ -767,12 +761,18 @@ func (m *MsgExec) Size() (n int) { return n } -func (m *MsgGrantResponse) Size() (n int) { +func (m *MsgExecResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l + if len(m.Results) > 0 { + for _, b := range m.Results { + l = len(b) + n += 1 + l + sovTx(uint64(l)) + } + } return n } @@ -959,7 +959,7 @@ func (m *MsgGrant) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgExecResponse) Unmarshal(dAtA []byte) error { +func (m *MsgGrantResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -982,44 +982,12 @@ func (m *MsgExecResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgExecResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgGrantResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgExecResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgGrantResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Results = append(m.Results, make([]byte, postIndex-iNdEx)) - copy(m.Results[len(m.Results)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -1157,7 +1125,7 @@ func (m *MsgExec) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgGrantResponse) Unmarshal(dAtA []byte) error { +func (m *MsgExecResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1180,12 +1148,44 @@ func (m *MsgGrantResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgGrantResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgExecResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgGrantResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgExecResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Results = append(m.Results, make([]byte, postIndex-iNdEx)) + copy(m.Results[len(m.Results)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/bank/README.md b/x/bank/README.md index 340822aa38d6..885a9f1f6f1f 100644 --- a/x/bank/README.md +++ b/x/bank/README.md @@ -236,8 +236,12 @@ accounts. The send keeper does not alter the total supply (mint or burn coins). type SendKeeper interface { ViewKeeper - InputOutputCoins(ctx context.Context, inputs types.Input, outputs []types.Output) error - SendCoins(ctx context.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error + AppendSendRestriction(restriction SendRestrictionFn) + PrependSendRestriction(restriction SendRestrictionFn) + ClearSendRestriction() + + InputOutputCoins(ctx context.Context, input types.Input, outputs []types.Output) error + SendCoins(ctx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) error GetParams(ctx context.Context) types.Params SetParams(ctx context.Context, params types.Params) error @@ -256,6 +260,91 @@ type SendKeeper interface { } ``` +#### Send Restrictions + +The `SendKeeper` applies a `SendRestrictionFn` before each transfer of funds. + +```golang +// A SendRestrictionFn can restrict sends and/or provide a new receiver address. +type SendRestrictionFn func(ctx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) (newToAddr sdk.AccAddress, err error) +``` + +After the `SendKeeper` (or `BaseKeeper`) has been created, send restrictions can be added to it using the `AppendSendRestriction` or `PrependSendRestriction` functions. +Both functions compose the provided restriction with any previously provided restrictions. +`AppendSendRestriction` adds the provided restriction to be run after any previously provided send restrictions. +`PrependSendRestriction` adds the restriction to be run before any previously provided send restrictions. +The composition will short-circuit when an error is encountered. I.e. if the first one returns an error, the second is not run. + +During `SendCoins`, the send restriction is applied after coins are removed from the from address, but before adding them to the to address. +During `InputOutputCoins`, the send restriction is applied after the input coins are removed and once for each output before the funds are added. + +A send restriction function should make use of a custom value in the context to allow bypassing that specific restriction. + +Send Restrictions are not placed on `ModuleToAccount` or `ModuleToModule` transfers. This is done due to modules needing to move funds to user accounts and other module accounts. This is a design decision to allow for more flexibility in the state machine. The state machine should be able to move funds between module accounts and user accounts without restrictions. + +Secondly this limitation would limit the usage of the state machine even for itself. users would not be able to receive rewards, not be able to move funds between module accounts. In the case that a user sends funds from a user account to the community pool and then a governance proposal is used to get those tokens into the users account this would fall under the discretion of the app chain developer to what they would like to do here. We can not make strong assumptions here. +Thirdly, this issue could lead into a chain halt if a token is disabled and the token is moved in the begin/endblock. This is the last reason we see the current change and more damaging then beneficial for users. + +For example, in your module's keeper package, you'd define the send restriction function: + +```golang +var _ banktypes.SendRestrictionFn = Keeper{}.SendRestrictionFn + +func (k Keeper) SendRestrictionFn(ctx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) (sdk.AccAddress, error) { + // Bypass if the context says to. + if mymodule.HasBypass(ctx) { + return toAddr, nil + } + + // Your custom send restriction logic goes here. + return nil, errors.New("not implemented") +} +``` + +The bank keeper should be provided to your keeper's constructor so the send restriction can be added to it: + +```golang +func NewKeeper(cdc codec.BinaryCodec, storeKey storetypes.StoreKey, bankKeeper mymodule.BankKeeper) Keeper { + rv := Keeper{/*...*/} + bankKeeper.AppendSendRestriction(rv.SendRestrictionFn) + return rv +} +``` + +Then, in the `mymodule` package, define the context helpers: + +```golang +const bypassKey = "bypass-mymodule-restriction" + +// WithBypass returns a new context that will cause the mymodule bank send restriction to be skipped. +func WithBypass(ctx context.Context) context.Context { + return sdk.UnwrapSDKContext(ctx).WithValue(bypassKey, true) +} + +// WithoutBypass returns a new context that will cause the mymodule bank send restriction to not be skipped. +func WithoutBypass(ctx context.Context) context.Context { + return sdk.UnwrapSDKContext(ctx).WithValue(bypassKey, false) +} + +// HasBypass checks the context to see if the mymodule bank send restriction should be skipped. +func HasBypass(ctx context.Context) bool { + bypassValue := ctx.Value(bypassKey) + if bypassValue == nil { + return false + } + bypass, isBool := bypassValue.(bool) + return isBool && bypass +} +``` + +Now, anywhere where you want to use `SendCoins` or `InputOutputCoins`, but you don't want your send restriction applied: + +```golang +func (k Keeper) DoThing(ctx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) error { + return k.bankKeeper.SendCoins(mymodule.WithBypass(ctx), fromAddr, toAddr, amt) +} +``` + ### ViewKeeper The view keeper provides read-only access to account balances. The view keeper does not have balance alteration functionality. All balance lookups are `O(1)`. diff --git a/x/bank/app_test.go b/x/bank/app_test.go index 016a7434200d..2099b5981f83 100644 --- a/x/bank/app_test.go +++ b/x/bank/app_test.go @@ -3,14 +3,15 @@ package bank_test import ( "testing" - "cosmossdk.io/depinject" - "cosmossdk.io/log" - sdkmath "cosmossdk.io/math" abci "github.com/cometbft/cometbft/abci/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "cosmossdk.io/depinject" + "cosmossdk.io/log" + sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" @@ -371,13 +372,14 @@ func TestMsgSetSendEnabled(t *testing.T) { ctx := s.App.BaseApp.NewContext(false) require.NoError(t, testutil.FundAccount(ctx, s.BankKeeper, addr1, sdk.NewCoins(sdk.NewInt64Coin("foocoin", 101)))) + require.NoError(t, testutil.FundAccount(ctx, s.BankKeeper, addr1, sdk.NewCoins(sdk.NewInt64Coin("stake", 100000)))) addr1Str := addr1.String() govAddr := s.BankKeeper.GetAuthority() goodGovProp, err := govv1.NewMsgSubmitProposal( []sdk.Msg{ types.NewMsgSetSendEnabled(govAddr, nil, nil), }, - sdk.Coins{{Denom: "foocoin", Amount: sdkmath.NewInt(5)}}, + sdk.Coins{{Denom: "stake", Amount: sdkmath.NewInt(100000)}}, addr1Str, "set default send enabled to true", "Change send enabled", diff --git a/x/bank/autocli.go b/x/bank/autocli.go new file mode 100644 index 000000000000..6c421ab0aa42 --- /dev/null +++ b/x/bank/autocli.go @@ -0,0 +1,118 @@ +package bank + +import ( + "strings" + + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" +) + +// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: bankv1beta1.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Balance", + Use: "balance [address] [denom]", + Short: "Query an account balance by address and denom", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "address"}, {ProtoField: "denom"}}, + }, + { + RpcMethod: "AllBalances", + Use: "balances [address]", + Short: "Query for account balances by address", + Long: "Query the total balance of an account or of a specific denomination.", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "address"}}, + }, + { + RpcMethod: "SpendableBalances", + Use: "spendable-balances [address]", + Short: "Query for account spendable balances by address", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "address"}}, + }, + { + RpcMethod: "SpendableBalanceByDenom", + Use: "spendable-balance [address] [denom]", + Short: "Query the spendable balance of a single denom for a single account.", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "address"}, {ProtoField: "denom"}}, + }, + { + RpcMethod: "TotalSupply", + Use: "total-supply", + Alias: []string{"total"}, + Short: "Query the total supply of coins of the chain", + Long: "Query total supply of coins that are held by accounts in the chain. To query for the total supply of a specific coin denomination use --denom flag.", + }, + { + RpcMethod: "SupplyOf", + Use: "total-supply-of [denom]", + Short: "Query the supply of a single coin denom", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "denom"}}, + }, + { + RpcMethod: "Params", + Use: "params", + Short: "Query the current bank parameters", + }, + { + RpcMethod: "DenomMetadata", + Use: "denom-metadata [denom]", + Short: "Query the client metadata of a given coin denomination", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "denom"}}, + }, + { + RpcMethod: "DenomsMetadata", + Use: "denoms-metadata", + Short: "Query the client metadata for all registered coin denominations", + }, + { + RpcMethod: "DenomOwners", + Use: "denom-owners [denom]", + Short: "Query for all account addresses that own a particular token denomination.", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "denom"}}, + }, + { + RpcMethod: "SendEnabled", + Use: "send-enabled [denom1 ...]", + Short: "Query for send enabled entries", + Long: strings.TrimSpace(`Query for send enabled entries that have been specifically set. + +To look up one or more specific denoms, supply them as arguments to this command. +To look up all denoms, do not provide any arguments.`, + ), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "denoms", Varargs: true}}, + }, + }, + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: bankv1beta1.Msg_ServiceDesc.ServiceName, + EnhanceCustomCommand: false, // use custom commands only until v0.51 + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Send", + Use: "send [from_key_or_address] [to_address] [amount]", + Short: "Send funds from one account to another.", + Long: `Send funds from one account to another. +Note, the '--from' flag is ignored as it is implied from [from_key_or_address]. +When using '--dry-run' a key name cannot be used, only a bech32 address. +Note: multiple coins can be send by space separated.`, + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "from_address"}, {ProtoField: "to_address"}, {ProtoField: "amount", Varargs: true}}, + }, + { + RpcMethod: "UpdateParams", + Skip: true, // skipped because authority gated + }, + { + RpcMethod: "SetSendEnabled", + Skip: true, // skipped because authority gated + }, + { + RpcMethod: "Burn", + Skip: true, // skipped because available from v0.51 + }, + }, + }, + } +} diff --git a/x/bank/client/cli/query.go b/x/bank/client/cli/query.go deleted file mode 100644 index 23facd68ff09..000000000000 --- a/x/bank/client/cli/query.go +++ /dev/null @@ -1,349 +0,0 @@ -package cli - -import ( - "fmt" - "strings" - - "cosmossdk.io/core/address" - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/version" - "github.com/cosmos/cosmos-sdk/x/bank/types" -) - -const ( - FlagDenom = "denom" - FlagResolveDenom = "resolve-denom" -) - -// GetQueryCmd returns the parent command for all x/bank CLi query commands. The -// provided clientCtx should have, at a minimum, a verifier, CometBFT RPC client, -// and marshaler set. -func GetQueryCmd(ac address.Codec) *cobra.Command { - cmd := &cobra.Command{ - Use: types.ModuleName, - Short: "Querying commands for the bank module", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - cmd.AddCommand( - GetBalancesCmd(ac), - GetSpendableBalancesCmd(ac), - GetCmdQueryTotalSupply(), - GetCmdDenomsMetadata(), - GetCmdQuerySendEnabled(), - ) - - return cmd -} - -func GetBalancesCmd(ac address.Codec) *cobra.Command { - cmd := &cobra.Command{ - Use: "balances [address]", - Short: "Query for account balances by address", - Long: strings.TrimSpace( - fmt.Sprintf(`Query the total balance of an account or of a specific denomination. - -Example: - $ %s query %s balances [address] - $ %s query %s balances [address] --denom=[denom] - $ %s query %s balances [address] --resolve-denom -`, - version.AppName, types.ModuleName, version.AppName, types.ModuleName, version.AppName, types.ModuleName, - ), - ), - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - denom, err := cmd.Flags().GetString(FlagDenom) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - addr, err := ac.StringToBytes(args[0]) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - ctx := cmd.Context() - - if denom == "" { - resolveDenom, err := cmd.Flags().GetBool(FlagResolveDenom) - if err != nil { - return err - } - - params := types.NewQueryAllBalancesRequest(addr, pageReq, resolveDenom) - - res, err := queryClient.AllBalances(ctx, params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - } - - params := types.NewQueryBalanceRequest(addr, denom) - - res, err := queryClient.Balance(ctx, params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res.Balance) - }, - } - - cmd.Flags().String(FlagDenom, "", "The specific balance denomination to query for") - cmd.Flags().Bool(FlagResolveDenom, false, "Resolve denom to human-readable denom from metadata") - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "all balances") - - return cmd -} - -func GetSpendableBalancesCmd(ac address.Codec) *cobra.Command { - cmd := &cobra.Command{ - Use: "spendable-balances [address]", - Short: "Query for account spendable balances by address", - Example: fmt.Sprintf("$ %s query %s spendable-balances [address]", version.AppName, types.ModuleName), - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - denom, err := cmd.Flags().GetString(FlagDenom) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - addr, err := ac.StringToBytes(args[0]) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - ctx := cmd.Context() - - if denom == "" { - params := types.NewQuerySpendableBalancesRequest(addr, pageReq) - - res, err := queryClient.SpendableBalances(ctx, params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - } - - params := types.NewQuerySpendableBalanceByDenomRequest(addr, denom) - - res, err := queryClient.SpendableBalanceByDenom(ctx, params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - cmd.Flags().String(FlagDenom, "", "The specific balance denomination to query for") - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "spendable balances") - - return cmd -} - -// GetCmdDenomsMetadata defines the cobra command to query client denomination metadata. -func GetCmdDenomsMetadata() *cobra.Command { - cmd := &cobra.Command{ - Use: "denom-metadata", - Short: "Query the client metadata for coin denominations", - Long: strings.TrimSpace( - fmt.Sprintf(`Query the client metadata for all the registered coin denominations - -Example: - To query for the client metadata of all coin denominations use: - $ %s query %s denom-metadata - -To query for the client metadata of a specific coin denomination use: - $ %s query %s denom-metadata --denom=[denom] -`, - version.AppName, types.ModuleName, version.AppName, types.ModuleName, - ), - ), - RunE: func(cmd *cobra.Command, _ []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - denom, err := cmd.Flags().GetString(FlagDenom) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - if denom == "" { - res, err := queryClient.DenomsMetadata(cmd.Context(), &types.QueryDenomsMetadataRequest{}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - } - - res, err := queryClient.DenomMetadata(cmd.Context(), &types.QueryDenomMetadataRequest{Denom: denom}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - cmd.Flags().String(FlagDenom, "", "The specific denomination to query client metadata for") - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -func GetCmdQueryTotalSupply() *cobra.Command { - cmd := &cobra.Command{ - Use: "total", - Short: "Query the total supply of coins of the chain", - Args: cobra.NoArgs, - Long: strings.TrimSpace( - fmt.Sprintf(`Query total supply of coins that are held by accounts in the chain. - -Example: - $ %s query %s total - -To query for the total supply of a specific coin denomination use: - $ %s query %s total --denom=[denom] -`, - version.AppName, types.ModuleName, version.AppName, types.ModuleName, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - denom, err := cmd.Flags().GetString(FlagDenom) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - ctx := cmd.Context() - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - if denom == "" { - res, err := queryClient.TotalSupply(ctx, &types.QueryTotalSupplyRequest{Pagination: pageReq}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - } - - res, err := queryClient.SupplyOf(ctx, &types.QuerySupplyOfRequest{Denom: denom}) - if err != nil { - return err - } - - return clientCtx.PrintProto(&res.Amount) - }, - } - - cmd.Flags().String(FlagDenom, "", "The specific balance denomination to query for") - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "all supply totals") - - return cmd -} - -func GetCmdQuerySendEnabled() *cobra.Command { - cmd := &cobra.Command{ - Use: "send-enabled [denom1 ...]", - Short: "Query for send enabled entries", - Long: strings.TrimSpace(`Query for send enabled entries that have been specifically set. - -To look up one or more specific denoms, supply them as arguments to this command. -To look up all denoms, do not provide any arguments. -`, - ), - Example: strings.TrimSpace( - fmt.Sprintf(`Getting one specific entry: - $ %[1]s query %[2]s send-enabled foocoin - -Getting two specific entries: - $ %[1]s query %[2]s send-enabled foocoin barcoin - -Getting all entries: - $ %[1]s query %[2]s send-enabled -`, - version.AppName, types.ModuleName, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - reqPag, err := client.ReadPageRequest(client.MustFlagSetWithPageKeyDecoded(cmd.Flags())) - if err != nil { - return err - } - - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - req := &types.QuerySendEnabledRequest{ - Denoms: args, - Pagination: reqPag, - } - - res, err := queryClient.SendEnabled(cmd.Context(), req) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "send enabled entries") - - return cmd -} diff --git a/x/bank/client/cli/query_test.go b/x/bank/client/cli/query_test.go deleted file mode 100644 index 800530b53d18..000000000000 --- a/x/bank/client/cli/query_test.go +++ /dev/null @@ -1,428 +0,0 @@ -package cli_test - -import ( - "context" - "fmt" - "io" - - abci "github.com/cometbft/cometbft/abci/types" - "github.com/cosmos/gogoproto/proto" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/codec/address" - svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" - "github.com/cosmos/cosmos-sdk/testutil" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/bank/client/cli" - "github.com/cosmos/cosmos-sdk/x/bank/types" -) - -func (s *CLITestSuite) TestGetBalancesCmd() { - accounts := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) - cmd := cli.GetBalancesCmd(address.NewBech32Codec("cosmos")) - cmd.SetOutput(io.Discard) - - testCases := []struct { - name string - ctxGen func() client.Context - args []string - expectResult proto.Message - expectErr bool - }{ - { - "valid query", - func() client.Context { - bz, _ := s.encCfg.Codec.Marshal(&types.QueryAllBalancesResponse{}) - c := clitestutil.NewMockCometRPC(abci.ResponseQuery{ - Value: bz, - }) - return s.baseCtx.WithClient(c) - }, - []string{ - accounts[0].Address.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - &types.QueryAllBalancesResponse{}, - false, - }, - { - "valid query with denom", - func() client.Context { - bz, _ := s.encCfg.Codec.Marshal(&types.QueryBalanceResponse{ - Balance: &sdk.Coin{}, - }) - c := clitestutil.NewMockCometRPC(abci.ResponseQuery{ - Value: bz, - }) - return s.baseCtx.WithClient(c) - }, - []string{ - accounts[0].Address.String(), - fmt.Sprintf("--%s=photon", cli.FlagDenom), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - &sdk.Coin{}, - false, - }, - { - "invalid Address", - func() client.Context { - return s.baseCtx - }, - []string{ - "foo", - }, - nil, - true, - }, - { - "invalid denom", - func() client.Context { - c := clitestutil.NewMockCometRPC(abci.ResponseQuery{ - Code: 1, - }) - return s.baseCtx.WithClient(c) - }, - []string{ - accounts[0].Address.String(), - fmt.Sprintf("--%s=foo", cli.FlagDenom), - }, - nil, - true, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - ctx := svrcmd.CreateExecuteContext(context.Background()) - - cmd.SetContext(ctx) - cmd.SetArgs(tc.args) - - s.Require().NoError(client.SetCmdClientContextHandler(tc.ctxGen(), cmd)) - - out, err := clitestutil.ExecTestCLICmd(tc.ctxGen(), cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(s.encCfg.Codec.UnmarshalJSON(out.Bytes(), tc.expectResult)) - s.Require().NoError(err) - } - }) - } -} - -func (s *CLITestSuite) TestGetSpendableBalancesCmd() { - accounts := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) - - cmd := cli.GetSpendableBalancesCmd(address.NewBech32Codec("cosmos")) - cmd.SetOutput(io.Discard) - - testCases := []struct { - name string - ctxGen func() client.Context - args []string - expectResult proto.Message - expectErr bool - }{ - { - "valid query", - func() client.Context { - bz, _ := s.encCfg.Codec.Marshal(&types.QuerySpendableBalancesResponse{}) - c := clitestutil.NewMockCometRPC(abci.ResponseQuery{ - Value: bz, - }) - return s.baseCtx.WithClient(c) - }, - []string{ - accounts[0].Address.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - &types.QuerySpendableBalancesResponse{}, - false, - }, - { - "valid query with denom flag", - func() client.Context { - bz, _ := s.encCfg.Codec.Marshal(&types.QuerySpendableBalanceByDenomRequest{}) - c := clitestutil.NewMockCometRPC(abci.ResponseQuery{ - Value: bz, - }) - return s.baseCtx.WithClient(c) - }, - []string{ - accounts[0].Address.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - fmt.Sprintf("--%s=photon", cli.FlagDenom), - }, - &types.QuerySpendableBalanceByDenomResponse{}, - false, - }, - { - "invalid Address", - func() client.Context { - return s.baseCtx - }, - []string{ - "foo", - }, - nil, - true, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - ctx := svrcmd.CreateExecuteContext(context.Background()) - cmd.SetContext(ctx) - cmd.SetArgs(tc.args) - s.Require().NoError(client.SetCmdClientContextHandler(tc.ctxGen(), cmd)) - - out, err := clitestutil.ExecTestCLICmd(tc.ctxGen(), cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(s.encCfg.Codec.UnmarshalJSON(out.Bytes(), tc.expectResult)) - s.Require().NoError(err) - } - }) - } -} - -func (s *CLITestSuite) TestGetCmdDenomsMetadata() { - cmd := cli.GetCmdDenomsMetadata() - cmd.SetOutput(io.Discard) - - testCases := []struct { - name string - ctxGen func() client.Context - args []string - expectResult proto.Message - expectErr bool - }{ - { - "valid query", - func() client.Context { - bz, _ := s.encCfg.Codec.Marshal(&types.QueryDenomsMetadataResponse{}) - c := clitestutil.NewMockCometRPC(abci.ResponseQuery{ - Value: bz, - }) - return s.baseCtx.WithClient(c) - }, - []string{ - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - &types.QueryDenomsMetadataResponse{}, - false, - }, - { - "valid query with denom", - func() client.Context { - bz, _ := s.encCfg.Codec.Marshal(&types.QueryDenomMetadataResponse{}) - c := clitestutil.NewMockCometRPC(abci.ResponseQuery{ - Value: bz, - }) - return s.baseCtx.WithClient(c) - }, - []string{ - fmt.Sprintf("--%s=photon", cli.FlagDenom), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - &types.QueryDenomMetadataResponse{}, - false, - }, - { - "invalid query with denom", - func() client.Context { - c := clitestutil.NewMockCometRPC(abci.ResponseQuery{ - Code: 1, - }) - return s.baseCtx.WithClient(c) - }, - []string{ - fmt.Sprintf("--%s=foo", cli.FlagDenom), - }, - nil, - true, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - ctx := svrcmd.CreateExecuteContext(context.Background()) - - cmd.SetContext(ctx) - cmd.SetArgs(tc.args) - - s.Require().NoError(client.SetCmdClientContextHandler(tc.ctxGen(), cmd)) - - out, err := clitestutil.ExecTestCLICmd(tc.ctxGen(), cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(s.encCfg.Codec.UnmarshalJSON(out.Bytes(), tc.expectResult)) - s.Require().NoError(err) - } - }) - } -} - -func (s *CLITestSuite) TestGetCmdQueryTotalSupply() { - cmd := cli.GetCmdQueryTotalSupply() - cmd.SetOutput(io.Discard) - - testCases := []struct { - name string - ctxGen func() client.Context - args []string - expectResult proto.Message - expectErr bool - }{ - { - "valid query", - func() client.Context { - bz, _ := s.encCfg.Codec.Marshal(&types.QueryTotalSupplyResponse{}) - c := clitestutil.NewMockCometRPC(abci.ResponseQuery{ - Value: bz, - }) - return s.baseCtx.WithClient(c) - }, - []string{ - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - &types.QueryTotalSupplyResponse{}, - false, - }, - { - "valid query with denom", - func() client.Context { - bz, _ := s.encCfg.Codec.Marshal(&types.QuerySupplyOfResponse{ - Amount: sdk.Coin{}, - }) - c := clitestutil.NewMockCometRPC(abci.ResponseQuery{ - Value: bz, - }) - return s.baseCtx.WithClient(c) - }, - []string{ - fmt.Sprintf("--%s=photon", cli.FlagDenom), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - &sdk.Coin{}, - false, - }, - { - "invalid query with denom", - func() client.Context { - c := clitestutil.NewMockCometRPC(abci.ResponseQuery{ - Code: 1, - }) - return s.baseCtx.WithClient(c) - }, - []string{ - fmt.Sprintf("--%s=foo", cli.FlagDenom), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - nil, - true, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - ctx := svrcmd.CreateExecuteContext(context.Background()) - cmd.SetContext(ctx) - cmd.SetArgs(tc.args) - s.Require().NoError(client.SetCmdClientContextHandler(tc.ctxGen(), cmd)) - - out, err := clitestutil.ExecTestCLICmd(tc.ctxGen(), cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(s.encCfg.Codec.UnmarshalJSON(out.Bytes(), tc.expectResult)) - s.Require().NoError(err) - } - }) - } -} - -func (s *CLITestSuite) TestGetCmdQuerySendEnabled() { - cmd := cli.GetCmdQuerySendEnabled() - cmd.SetOutput(io.Discard) - - testCases := []struct { - name string - ctxGen func() client.Context - args []string - expectResult proto.Message - expectErr bool - }{ - { - "valid query", - func() client.Context { - bz, _ := s.encCfg.Codec.Marshal(&types.QuerySendEnabledResponse{ - SendEnabled: []*types.SendEnabled{}, - }) - c := clitestutil.NewMockCometRPC(abci.ResponseQuery{ - Value: bz, - }) - return s.baseCtx.WithClient(c) - }, - []string{ - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - &types.QuerySendEnabledResponse{}, - false, - }, - { - "valid query with denoms", - func() client.Context { - bz, _ := s.encCfg.Codec.Marshal(&types.QuerySendEnabledResponse{ - SendEnabled: []*types.SendEnabled{}, - }) - c := clitestutil.NewMockCometRPC(abci.ResponseQuery{ - Value: bz, - }) - return s.baseCtx.WithClient(c) - }, - []string{ - "photon", - "stake", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - &types.QuerySendEnabledResponse{}, - false, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - ctx := svrcmd.CreateExecuteContext(context.Background()) - - cmd.SetContext(ctx) - cmd.SetArgs(tc.args) - - s.Require().NoError(client.SetCmdClientContextHandler(tc.ctxGen(), cmd)) - - out, err := clitestutil.ExecTestCLICmd(tc.ctxGen(), cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(s.encCfg.Codec.UnmarshalJSON(out.Bytes(), tc.expectResult)) - s.Require().NoError(err) - } - }) - } -} diff --git a/x/bank/client/cli/suite_test.go b/x/bank/client/cli/suite_test.go deleted file mode 100644 index cf68074bf59f..000000000000 --- a/x/bank/client/cli/suite_test.go +++ /dev/null @@ -1,39 +0,0 @@ -package cli_test - -import ( - "io" - "testing" - - rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" - "github.com/stretchr/testify/suite" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - testutilmod "github.com/cosmos/cosmos-sdk/types/module/testutil" - "github.com/cosmos/cosmos-sdk/x/bank" -) - -type CLITestSuite struct { - suite.Suite - - kr keyring.Keyring - encCfg testutilmod.TestEncodingConfig - baseCtx client.Context -} - -func TestMigrateTestSuite(t *testing.T) { - suite.Run(t, new(CLITestSuite)) -} - -func (s *CLITestSuite) SetupSuite() { - s.encCfg = testutilmod.MakeTestEncodingConfig(bank.AppModuleBasic{}) - s.kr = keyring.NewInMemory(s.encCfg.Codec) - s.baseCtx = client.Context{}. - WithKeyring(s.kr). - WithTxConfig(s.encCfg.TxConfig). - WithCodec(s.encCfg.Codec). - WithClient(clitestutil.MockCometRPC{Client: rpcclientmock.Client{}}). - WithAccountRetriever(client.MockAccountRetriever{}). - WithOutput(io.Discard) -} diff --git a/x/bank/client/cli/tx.go b/x/bank/client/cli/tx.go index 022cbbcf03ea..6b7e40554a06 100644 --- a/x/bank/client/cli/tx.go +++ b/x/bank/client/cli/tx.go @@ -3,14 +3,16 @@ package cli import ( "fmt" + "github.com/spf13/cobra" + "cosmossdk.io/core/address" sdkmath "cosmossdk.io/math" - "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/bank/types" ) @@ -79,15 +81,16 @@ When using '--dry-run' a key name cannot be used, only a bech32 address. // For a better UX this command is limited to send funds from one account to two or more accounts. func NewMultiSendTxCmd(ac address.Codec) *cobra.Command { cmd := &cobra.Command{ - Use: "multi-send [from_key_or_address] [to_address_1, to_address_2, ...] [amount]", + Use: "multi-send [from_key_or_address] [to_address_1 to_address_2 ...] [amount]", Short: "Send funds from one account to two or more accounts.", Long: `Send funds from one account to two or more accounts. By default, sends the [amount] to each address of the list. Using the '--split' flag, the [amount] is split equally between the addresses. -Note, the '--from' flag is ignored as it is implied from [from_key_or_address]. -When using '--dry-run' a key name cannot be used, only a bech32 address. -`, - Args: cobra.MinimumNArgs(4), +Note, the '--from' flag is ignored as it is implied from [from_key_or_address] and +separate addresses with space. +When using '--dry-run' a key name cannot be used, only a bech32 address.`, + Example: fmt.Sprintf("%s tx bank multi-send cosmos1... cosmos1... cosmos1... cosmos1... 10stake", version.AppName), + Args: cobra.MinimumNArgs(4), RunE: func(cmd *cobra.Command, args []string) error { cmd.Flags().Set(flags.FlagFrom, args[0]) clientCtx, err := client.GetClientTxContext(cmd) diff --git a/x/bank/client/cli/tx_test.go b/x/bank/client/cli/tx_test.go index 1391ba835298..a9a5280f0bff 100644 --- a/x/bank/client/cli/tx_test.go +++ b/x/bank/client/cli/tx_test.go @@ -4,19 +4,50 @@ import ( "context" "fmt" "io" + "testing" + + rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" + "github.com/stretchr/testify/suite" sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec/address" + "github.com/cosmos/cosmos-sdk/crypto/keyring" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" "github.com/cosmos/cosmos-sdk/testutil" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" sdk "github.com/cosmos/cosmos-sdk/types" + testutilmod "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/bank" "github.com/cosmos/cosmos-sdk/x/bank/client/cli" ) +type CLITestSuite struct { + suite.Suite + + kr keyring.Keyring + encCfg testutilmod.TestEncodingConfig + baseCtx client.Context +} + +func TestCLITestSuite(t *testing.T) { + suite.Run(t, new(CLITestSuite)) +} + +func (s *CLITestSuite) SetupSuite() { + s.encCfg = testutilmod.MakeTestEncodingConfig(bank.AppModuleBasic{}) + s.kr = keyring.NewInMemory(s.encCfg.Codec) + s.baseCtx = client.Context{}. + WithKeyring(s.kr). + WithTxConfig(s.encCfg.TxConfig). + WithCodec(s.encCfg.Codec). + WithClient(clitestutil.MockCometRPC{Client: rpcclientmock.Client{}}). + WithAccountRetriever(client.MockAccountRetriever{}). + WithOutput(io.Discard) +} + func (s *CLITestSuite) TestSendTxCmd() { accounts := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) cmd := cli.NewSendTxCmd(address.NewBech32Codec("cosmos")) diff --git a/x/bank/exported/exported.go b/x/bank/exported/exported.go index 60e6872e12c5..6ffabfe5831d 100644 --- a/x/bank/exported/exported.go +++ b/x/bank/exported/exported.go @@ -21,5 +21,6 @@ type ( // NOTE: This is used solely for migration of x/params managed parameters. Subspace interface { GetParamSet(ctx sdk.Context, ps ParamSet) + Get(ctx sdk.Context, key []byte, ptr any) } ) diff --git a/x/bank/keeper/collections_test.go b/x/bank/keeper/collections_test.go new file mode 100644 index 000000000000..e1af343cce56 --- /dev/null +++ b/x/bank/keeper/collections_test.go @@ -0,0 +1,85 @@ +package keeper_test + +import ( + "testing" + + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + cmttime "github.com/cometbft/cometbft/types/time" + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" + + "cosmossdk.io/collections" + "cosmossdk.io/log" + "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" + + "github.com/cosmos/cosmos-sdk/codec/address" + "github.com/cosmos/cosmos-sdk/runtime" + "github.com/cosmos/cosmos-sdk/testutil" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "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" +) + +func TestBankStateCompatibility(t *testing.T) { + key := storetypes.NewKVStoreKey(banktypes.StoreKey) + testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) + ctx := testCtx.Ctx.WithBlockHeader(cmtproto.Header{Time: cmttime.Now()}) + encCfg := moduletestutil.MakeTestEncodingConfig() + + storeService := runtime.NewKVStoreService(key) + + // gomock initializations + ctrl := gomock.NewController(t) + authKeeper := banktestutil.NewMockAccountKeeper(ctrl) + authKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec("cosmos")).AnyTimes() + + k := keeper.NewBaseKeeper( + encCfg.Codec, + storeService, + authKeeper, + map[string]bool{accAddrs[4].String(): true}, + authtypes.NewModuleAddress("gov").String(), + log.NewNopLogger(), + ) + + // test we can decode balances without problems + // using the old value format of the denom to address index + bankDenomAddressLegacyIndexValue := []byte{0} // taken from: https://github.com/cosmos/cosmos-sdk/blob/v0.47.3/x/bank/keeper/send.go#L361 + rawKey, err := collections.EncodeKeyWithPrefix( + banktypes.DenomAddressPrefix, + k.Balances.Indexes.Denom.KeyCodec(), + collections.Join("atom", sdk.AccAddress("test")), + ) + require.NoError(t, err) + // we set the index key to the old value. + require.NoError(t, storeService.OpenKVStore(ctx).Set(rawKey, bankDenomAddressLegacyIndexValue)) + + // test walking is ok + err = k.Balances.Indexes.Denom.Walk(ctx, nil, func(indexingKey string, indexedKey sdk.AccAddress) (stop bool, err error) { + require.Equal(t, indexedKey, sdk.AccAddress("test")) + require.Equal(t, indexingKey, "atom") + return true, nil + }) + require.NoError(t, err) + + // test matching is also ok + iter, err := k.Balances.Indexes.Denom.MatchExact(ctx, "atom") + require.NoError(t, err) + defer iter.Close() + pks, err := iter.PrimaryKeys() + require.NoError(t, err) + require.Len(t, pks, 1) + require.Equal(t, pks[0], collections.Join(sdk.AccAddress("test"), "atom")) + + // assert the index value will be updated to the new format + err = k.Balances.Indexes.Denom.Reference(ctx, collections.Join(sdk.AccAddress("test"), "atom"), math.ZeroInt(), nil) + require.NoError(t, err) + + newRawValue, err := storeService.OpenKVStore(ctx).Get(rawKey) + require.NoError(t, err) + require.Equal(t, []byte{}, newRawValue) +} diff --git a/x/bank/keeper/export_test.go b/x/bank/keeper/export_test.go new file mode 100644 index 000000000000..91960e9a8a82 --- /dev/null +++ b/x/bank/keeper/export_test.go @@ -0,0 +1,14 @@ +package keeper + +import "github.com/cosmos/cosmos-sdk/x/bank/types" + +// This file exists in the keeper package to expose some private things +// for the purpose of testing in the keeper_test package. + +func (k BaseSendKeeper) SetSendRestriction(restriction types.SendRestrictionFn) { + k.sendRestriction.fn = restriction +} + +func (k BaseSendKeeper) GetSendRestrictionFn() types.SendRestrictionFn { + return k.sendRestriction.fn +} diff --git a/x/bank/keeper/grpc_query.go b/x/bank/keeper/grpc_query.go index ae2e6782766b..c172fb24e649 100644 --- a/x/bank/keeper/grpc_query.go +++ b/x/bank/keeper/grpc_query.go @@ -3,11 +3,11 @@ package keeper import ( "context" - "cosmossdk.io/collections" - "cosmossdk.io/math" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "cosmossdk.io/collections" + "cosmossdk.io/math" "cosmossdk.io/store/prefix" "github.com/cosmos/cosmos-sdk/runtime" @@ -59,19 +59,20 @@ func (k BaseKeeper) AllBalances(ctx context.Context, req *types.QueryAllBalances } sdkCtx := sdk.UnwrapSDKContext(ctx) - - balances := sdk.NewCoins() - - _, pageRes, err := query.CollectionFilteredPaginate(ctx, k.Balances, req.Pagination, func(key collections.Pair[sdk.AccAddress, string], value math.Int) (include bool, err error) { - denom := key.K2() - if req.ResolveDenom { - if metadata, ok := k.GetDenomMetaData(sdkCtx, denom); ok { - denom = metadata.Display + balances, pageRes, err := query.CollectionPaginate( + ctx, + k.Balances, + req.Pagination, + func(key collections.Pair[sdk.AccAddress, string], value math.Int) (sdk.Coin, error) { + if req.ResolveDenom { + if metadata, ok := k.GetDenomMetaData(sdkCtx, key.K2()); ok { + return sdk.NewCoin(metadata.Display, value), nil + } } - } - balances = append(balances, sdk.NewCoin(denom, value)) - return false, nil // we don't include results because we're appending them here. - }, query.WithCollectionPaginationPairPrefix[sdk.AccAddress, string](addr)) + return sdk.NewCoin(key.K2(), value), nil + }, + query.WithCollectionPaginationPairPrefix[sdk.AccAddress, string](addr), + ) if err != nil { return nil, status.Errorf(codes.InvalidArgument, "paginate: %v", err) } @@ -93,12 +94,10 @@ func (k BaseKeeper) SpendableBalances(ctx context.Context, req *types.QuerySpend sdkCtx := sdk.UnwrapSDKContext(ctx) - balances := sdk.NewCoins() zeroAmt := math.ZeroInt() - _, pageRes, err := query.CollectionFilteredPaginate(ctx, k.Balances, req.Pagination, func(key collections.Pair[sdk.AccAddress, string], _ math.Int) (include bool, err error) { - balances = append(balances, sdk.NewCoin(key.K2(), zeroAmt)) - return false, nil // not including results as they're appended here + balances, pageRes, err := query.CollectionPaginate(ctx, k.Balances, req.Pagination, func(key collections.Pair[sdk.AccAddress, string], _ math.Int) (coin sdk.Coin, err error) { + return sdk.NewCoin(key.K2(), zeroAmt), nil }, query.WithCollectionPaginationPairPrefix[sdk.AccAddress, string](addr)) if err != nil { return nil, status.Errorf(codes.InvalidArgument, "paginate: %v", err) @@ -224,8 +223,24 @@ func (k BaseKeeper) DenomMetadata(c context.Context, req *types.QueryDenomMetada }, nil } +// DenomMetadataByQueryString is identical to DenomMetadata query, but receives request via query string. +func (k BaseKeeper) DenomMetadataByQueryString(c context.Context, req *types.QueryDenomMetadataByQueryStringRequest) (*types.QueryDenomMetadataByQueryStringResponse, error) { + if req == nil { + return nil, status.Errorf(codes.InvalidArgument, "empty request") + } + + res, err := k.DenomMetadata(c, &types.QueryDenomMetadataRequest{ + Denom: req.Denom, + }) + if err != nil { + return nil, err + } + + return &types.QueryDenomMetadataByQueryStringResponse{Metadata: res.Metadata}, nil +} + func (k BaseKeeper) DenomOwners( - goCtx context.Context, + ctx context.Context, req *types.QueryDenomOwnersRequest, ) (*types.QueryDenomOwnersResponse, error) { if req == nil { @@ -236,19 +251,16 @@ func (k BaseKeeper) DenomOwners( return nil, status.Error(codes.InvalidArgument, err.Error()) } - var denomOwners []*types.DenomOwner - - _, pageRes, err := query.CollectionFilteredPaginate(goCtx, k.Balances.Indexes.Denom, req.Pagination, - func(key collections.Pair[string, sdk.AccAddress], value collections.NoValue) (include bool, err error) { - amt, err := k.Balances.Get(goCtx, collections.Join(key.K2(), req.Denom)) + denomOwners, pageRes, err := query.CollectionPaginate( + ctx, + k.Balances.Indexes.Denom, + req.Pagination, + func(key collections.Pair[string, sdk.AccAddress], value collections.NoValue) (*types.DenomOwner, error) { + amt, err := k.Balances.Get(ctx, collections.Join(key.K2(), req.Denom)) if err != nil { - return false, err + return nil, err } - denomOwners = append(denomOwners, &types.DenomOwner{ - Address: key.K2().String(), - Balance: sdk.NewCoin(req.Denom, amt), - }) - return false, nil + return &types.DenomOwner{Address: key.K2().String(), Balance: sdk.NewCoin(req.Denom, amt)}, nil }, query.WithCollectionPaginationPairPrefix[string, sdk.AccAddress](req.Denom), ) @@ -272,18 +284,35 @@ func (k BaseKeeper) SendEnabled(goCtx context.Context, req *types.QuerySendEnabl } } } else { - results, pageResp, err := query.CollectionPaginate[string, bool](ctx, k.BaseViewKeeper.SendEnabled, req.Pagination) + results, pageResp, err := query.CollectionPaginate( + ctx, + k.BaseViewKeeper.SendEnabled, + req.Pagination, func(key string, value bool) (*types.SendEnabled, error) { + return types.NewSendEnabled(key, value), nil + }, + ) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } - for _, r := range results { - resp.SendEnabled = append(resp.SendEnabled, &types.SendEnabled{ - Denom: r.Key, - Enabled: r.Value, - }) - } + resp.SendEnabled = results resp.Pagination = pageResp } return resp, nil } + +// DenomOwnersByQuery is identical to DenomOwner query, but receives denom values via query string. +func (k BaseKeeper) DenomOwnersByQuery(ctx context.Context, req *types.QueryDenomOwnersByQueryRequest) (*types.QueryDenomOwnersByQueryResponse, error) { + if req == nil { + return nil, status.Errorf(codes.InvalidArgument, "empty request") + } + resp, err := k.DenomOwners(ctx, &types.QueryDenomOwnersRequest{ + Denom: req.Denom, + Pagination: req.Pagination, + }) + if err != nil { + return nil, err + } + + return &types.QueryDenomOwnersByQueryResponse{DenomOwners: resp.DenomOwners, Pagination: resp.Pagination}, nil +} diff --git a/x/bank/keeper/grpc_query_test.go b/x/bank/keeper/grpc_query_test.go index 1190ab522d99..b17111db01b0 100644 --- a/x/bank/keeper/grpc_query_test.go +++ b/x/bank/keeper/grpc_query_test.go @@ -19,31 +19,81 @@ func (suite *KeeperTestSuite) TestQueryBalance() { ctx, queryClient := suite.ctx, suite.queryClient _, _, addr := testdata.KeyTestPubAddr() - _, err := queryClient.Balance(gocontext.Background(), &types.QueryBalanceRequest{}) - suite.Require().Error(err) - - _, err = queryClient.Balance(gocontext.Background(), &types.QueryBalanceRequest{Address: addr.String()}) - suite.Require().Error(err) - - req := types.NewQueryBalanceRequest(addr, "0000") - _, err = queryClient.Balance(gocontext.Background(), req) - suite.Require().Error(err) + origCoins := sdk.NewCoins(newBarCoin(30)) + suite.mockFundAccount(addr) + suite.Require().NoError(testutil.FundAccount(ctx, suite.bankKeeper, addr, origCoins)) - req = types.NewQueryBalanceRequest(addr, fooDenom) - res, err := queryClient.Balance(gocontext.Background(), req) - suite.Require().NoError(err) - suite.Require().NotNil(res) - suite.True(res.Balance.IsZero()) + testCases := []struct { + name string + req *types.QueryBalanceRequest + expectErrMsg string + postFn func(res *types.QueryBalanceResponse) + }{ + { + "empty request", + &types.QueryBalanceRequest{}, + "invalid denom", + nil, + }, + { + "invalid denom", + types.NewQueryBalanceRequest(addr, "0000"), + "invalid denom", + nil, + }, + { + "empty address", + types.NewQueryBalanceRequest(sdk.AccAddress{}, barDenom), + "empty address string is not allowed", + nil, + }, + { + "invalid address", + &types.QueryBalanceRequest{Address: "foo", Denom: barDenom}, + "invalid address", + nil, + }, + { + "query missing denom", + &types.QueryBalanceRequest{Address: addr.String()}, + "invalid denom", + nil, + }, + { + "valid query empty result", + types.NewQueryBalanceRequest(addr, fooDenom), + "", + func(res *types.QueryBalanceResponse) { + suite.True(res.Balance.IsZero()) + }, + }, + { + "valid query", + types.NewQueryBalanceRequest(addr, barDenom), + "", + func(res *types.QueryBalanceResponse) { + suite.True(res.Balance.IsEqual(newBarCoin(30))) + }, + }, + } - origCoins := sdk.NewCoins(newFooCoin(50), newBarCoin(30)) + for _, tc := range testCases { + tc := tc - suite.mockFundAccount(addr) - suite.Require().NoError(testutil.FundAccount(ctx, suite.bankKeeper, addr, origCoins)) + suite.Run(tc.name, func() { + res, err := queryClient.Balance(gocontext.Background(), tc.req) + if tc.expectErrMsg == "" { + suite.Require().NoError(err) + suite.Require().NotNil(res) + } else { + suite.Require().ErrorContains(err, tc.expectErrMsg) + } - res, err = queryClient.Balance(gocontext.Background(), req) - suite.Require().NoError(err) - suite.Require().NotNil(res) - suite.True(res.Balance.IsEqual(newFooCoin(50))) + if tc.postFn != nil { + tc.postFn(res) + } + }) + } } func (suite *KeeperTestSuite) TestQueryAllBalances() { @@ -148,12 +198,13 @@ func (suite *KeeperTestSuite) TestSpendableBalances() { barCoins := newBarCoin(30) origCoins := sdk.NewCoins(fooCoins, barCoins) - vacc := vestingtypes.NewContinuousVestingAccount( + vacc, err := vestingtypes.NewContinuousVestingAccount( acc, sdk.NewCoins(fooCoins), ctx.BlockTime().Unix(), ctx.BlockTime().Add(time.Hour).Unix(), ) + suite.Require().NoError(err) suite.mockFundAccount(addr) suite.Require().NoError(testutil.FundAccount(suite.ctx, suite.bankKeeper, addr, origCoins)) @@ -195,12 +246,13 @@ func (suite *KeeperTestSuite) TestSpendableBalanceByDenom() { barCoins := newBarCoin(30) origCoins := sdk.NewCoins(fooCoins, barCoins) - vacc := vestingtypes.NewContinuousVestingAccount( + vacc, err := vestingtypes.NewContinuousVestingAccount( acc, sdk.NewCoins(fooCoins), ctx.BlockTime().Unix(), ctx.BlockTime().Add(time.Hour).Unix(), ) + suite.Require().NoError(err) suite.mockFundAccount(addr) suite.Require().NoError(testutil.FundAccount(suite.ctx, suite.bankKeeper, addr, origCoins)) @@ -229,13 +281,12 @@ func (suite *KeeperTestSuite) TestQueryTotalSupply() { ctx, queryClient := suite.ctx, suite.queryClient res, err := queryClient.TotalSupply(gocontext.Background(), &types.QueryTotalSupplyRequest{}) suite.Require().NoError(err) + suite.Require().NotNil(res) genesisSupply := res.Supply testCoins := sdk.NewCoins(sdk.NewInt64Coin("test", 400000000)) suite.mockMintCoins(mintAcc) - suite. - Require(). - NoError(suite.bankKeeper.MintCoins(ctx, minttypes.ModuleName, testCoins)) + suite.Require().NoError(suite.bankKeeper.MintCoins(ctx, minttypes.ModuleName, testCoins)) res, err = queryClient.TotalSupply(gocontext.Background(), &types.QueryTotalSupplyRequest{}) suite.Require().NoError(err) @@ -254,9 +305,7 @@ func (suite *KeeperTestSuite) TestQueryTotalSupplyOf() { expectedTotalSupply := sdk.NewCoins(test1Supply, test2Supply) suite.mockMintCoins(mintAcc) - suite. - Require(). - NoError(suite.bankKeeper.MintCoins(ctx, minttypes.ModuleName, expectedTotalSupply)) + suite.Require().NoError(suite.bankKeeper.MintCoins(ctx, minttypes.ModuleName, expectedTotalSupply)) _, err := queryClient.SupplyOf(gocontext.Background(), &types.QuerySupplyOfRequest{}) suite.Require().Error(err) @@ -264,8 +313,13 @@ func (suite *KeeperTestSuite) TestQueryTotalSupplyOf() { res, err := queryClient.SupplyOf(gocontext.Background(), &types.QuerySupplyOfRequest{Denom: test1Supply.Denom}) suite.Require().NoError(err) suite.Require().NotNil(res) - suite.Require().Equal(test1Supply, res.Amount) + + // total supply bogus denom + res, err = queryClient.SupplyOf(gocontext.Background(), &types.QuerySupplyOfRequest{Denom: "bogus"}) + suite.Require().NoError(err) + suite.Require().NotNil(res) + suite.Require().Equal(sdk.NewInt64Coin("bogus", 0), res.Amount) } func (suite *KeeperTestSuite) TestQueryParams() { @@ -275,10 +329,10 @@ func (suite *KeeperTestSuite) TestQueryParams() { suite.Require().Equal(suite.bankKeeper.GetParams(suite.ctx), res.GetParams()) } -func (suite *KeeperTestSuite) QueryDenomsMetadataRequest() { +func (suite *KeeperTestSuite) TestQueryDenomsMetadata() { var ( req *types.QueryDenomsMetadataRequest - expMetadata = []types.Metadata{} + expMetadata = []types.Metadata(nil) ) testCases := []struct { @@ -377,7 +431,7 @@ func (suite *KeeperTestSuite) QueryDenomsMetadataRequest() { } } -func (suite *KeeperTestSuite) QueryDenomMetadataRequest() { +func (suite *KeeperTestSuite) TestQueryDenomMetadata() { var ( req *types.QueryDenomMetadataRequest expMetadata = types.Metadata{} @@ -407,7 +461,7 @@ func (suite *KeeperTestSuite) QueryDenomMetadataRequest() { { "success", func() { - expMetadata := types.Metadata{ + expMetadata = types.Metadata{ Description: "The native staking token of the Cosmos Hub.", DenomUnits: []*types.DenomUnit{ { @@ -454,6 +508,83 @@ func (suite *KeeperTestSuite) QueryDenomMetadataRequest() { } } +func (suite *KeeperTestSuite) TestQueryDenomMetadataByQueryStringRequest() { + var ( + req *types.QueryDenomMetadataByQueryStringRequest + expMetadata = types.Metadata{} + ) + + testCases := []struct { + msg string + malleate func() + expPass bool + }{ + { + "empty denom", + func() { + req = &types.QueryDenomMetadataByQueryStringRequest{} + }, + false, + }, + { + "not found denom", + func() { + req = &types.QueryDenomMetadataByQueryStringRequest{ + Denom: "foo", + } + }, + false, + }, + { + "success", + func() { + expMetadata = types.Metadata{ + Description: "The native staking token of the Cosmos Hub.", + DenomUnits: []*types.DenomUnit{ + { + Denom: "uatom", + Exponent: 0, + Aliases: []string{"microatom"}, + }, + { + Denom: "atom", + Exponent: 6, + Aliases: []string{"ATOM"}, + }, + }, + Base: "uatom", + Display: "atom", + } + + suite.bankKeeper.SetDenomMetaData(suite.ctx, expMetadata) + req = &types.QueryDenomMetadataByQueryStringRequest{ + Denom: expMetadata.Base, + } + }, + true, + }, + } + + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + suite.SetupTest() // reset + + tc.malleate() + ctx := suite.ctx + + res, err := suite.queryClient.DenomMetadataByQueryString(ctx, req) + + if tc.expPass { + suite.Require().NoError(err) + suite.Require().NotNil(res) + suite.Require().Equal(expMetadata, res.Metadata) + } else { + suite.Require().Error(err) + } + }) + } +} + func (suite *KeeperTestSuite) TestGRPCDenomOwners() { ctx := suite.ctx @@ -674,3 +805,111 @@ func (suite *KeeperTestSuite) TestQuerySendEnabled() { }) } } + +func (suite *KeeperTestSuite) TestGRPCDenomOwnersByQuery() { + ctx := suite.ctx + + keeper := suite.bankKeeper + + suite.mockMintCoins(mintAcc) + suite.Require().NoError(keeper.MintCoins(ctx, minttypes.ModuleName, initCoins)) + denom := "ibc/123123213123" + newCoins := sdk.NewCoins(sdk.NewCoin(denom, initTokens)) + suite.mockMintCoins(mintAcc) + suite.Require().NoError(keeper.MintCoins(ctx, minttypes.ModuleName, newCoins)) + + for i := 0; i < 10; i++ { + addr := sdk.AccAddress(fmt.Sprintf("account-%d", i)) + + bal := sdk.NewCoins(sdk.NewCoin( + sdk.DefaultBondDenom, + sdk.TokensFromConsensusPower(initialPower/10, sdk.DefaultPowerReduction), + )) + suite.mockSendCoinsFromModuleToAccount(mintAcc, addr) + suite.Require().NoError(keeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, addr, bal)) + } + + testCases := map[string]struct { + req *types.QueryDenomOwnersByQueryRequest + expPass bool + numAddrs int + hasNext bool + total uint64 + }{ + "empty request": { + req: &types.QueryDenomOwnersByQueryRequest{}, + expPass: false, + }, + "invalid denom": { + req: &types.QueryDenomOwnersByQueryRequest{ + Denom: "foo", + }, + expPass: true, + numAddrs: 0, + hasNext: false, + total: 0, + }, + "valid request - page 1": { + req: &types.QueryDenomOwnersByQueryRequest{ + Denom: sdk.DefaultBondDenom, + Pagination: &query.PageRequest{ + Limit: 6, + CountTotal: true, + }, + }, + expPass: true, + numAddrs: 6, + hasNext: true, + total: 10, + }, + "valid request - page 2": { + req: &types.QueryDenomOwnersByQueryRequest{ + Denom: sdk.DefaultBondDenom, + Pagination: &query.PageRequest{ + Offset: 6, + Limit: 10, + CountTotal: true, + }, + }, + expPass: true, + numAddrs: 4, + hasNext: false, + total: 10, + }, + "valid request for query": { + req: &types.QueryDenomOwnersByQueryRequest{ + Denom: denom, + Pagination: &query.PageRequest{ + Limit: 6, + CountTotal: true, + }, + }, + expPass: true, + numAddrs: 1, + hasNext: false, + total: 1, + }, + } + + for name, tc := range testCases { + suite.Run(name, func() { + resp, err := suite.queryClient.DenomOwnersByQuery(gocontext.Background(), tc.req) + if tc.expPass { + suite.NoError(err) + suite.NotNil(resp) + suite.Len(resp.DenomOwners, tc.numAddrs) + suite.Equal(tc.total, resp.Pagination.Total) + + if tc.hasNext { + suite.NotNil(resp.Pagination.NextKey) + } else { + suite.Nil(resp.Pagination.NextKey) + } + } else { + suite.Require().Error(err) + } + }) + } + + suite.Require().True(true) +} diff --git a/x/bank/keeper/invariants.go b/x/bank/keeper/invariants.go index 72240a1ac387..69ee798a1d3a 100644 --- a/x/bank/keeper/invariants.go +++ b/x/bank/keeper/invariants.go @@ -17,6 +17,10 @@ func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper) { // AllInvariants runs all invariants of the X/bank module. func AllInvariants(k Keeper) sdk.Invariant { return func(ctx sdk.Context) (string, bool) { + res, stop := NonnegativeBalanceInvariant(k)(ctx) + if stop { + return res, stop + } return TotalSupply(k)(ctx) } } diff --git a/x/bank/keeper/keeper.go b/x/bank/keeper/keeper.go index 008e08e9a9cc..bfa45d23f64e 100644 --- a/x/bank/keeper/keeper.go +++ b/x/bank/keeper/keeper.go @@ -2,17 +2,13 @@ package keeper import ( "context" - "errors" "fmt" - "cosmossdk.io/collections" - "cosmossdk.io/core/store" + errorsmod "cosmossdk.io/errors" "cosmossdk.io/log" "cosmossdk.io/math" - errorsmod "cosmossdk.io/errors" - "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -27,7 +23,7 @@ var _ Keeper = (*BaseKeeper)(nil) // between accounts. type Keeper interface { SendKeeper - WithMintCoinsRestriction(MintingRestrictionFn) BaseKeeper + WithMintCoinsRestriction(types.MintingRestrictionFn) BaseKeeper InitGenesis(context.Context, *types.GenesisState) ExportGenesis(context.Context) *types.GenesisState @@ -63,22 +59,18 @@ type BaseKeeper struct { ak types.AccountKeeper cdc codec.BinaryCodec storeService store.KVStoreService - mintCoinsRestrictionFn MintingRestrictionFn + mintCoinsRestrictionFn types.MintingRestrictionFn logger log.Logger } -type MintingRestrictionFn func(ctx context.Context, coins sdk.Coins) error - // GetPaginatedTotalSupply queries for the supply, ignoring 0 coins, with a given pagination func (k BaseKeeper) GetPaginatedTotalSupply(ctx context.Context, pagination *query.PageRequest) (sdk.Coins, *query.PageResponse, error) { - results, pageResp, err := query.CollectionPaginate[string, math.Int](ctx, k.Supply, pagination) + coins, pageResp, err := query.CollectionPaginate(ctx, k.Supply, pagination, func(key string, value math.Int) (sdk.Coin, error) { + return sdk.NewCoin(key, value), nil + }) if err != nil { return nil, nil, err } - coins := sdk.NewCoins() - for _, res := range results { - coins = coins.Add(sdk.NewCoin(res.Key, res.Value)) - } return coins, pageResp, nil } @@ -109,7 +101,7 @@ func NewBaseKeeper( ak: ak, cdc: cdc, storeService: storeService, - mintCoinsRestrictionFn: func(ctx context.Context, coins sdk.Coins) error { return nil }, + mintCoinsRestrictionFn: types.NoOpMintingRestrictionFn, logger: logger, } } @@ -119,19 +111,8 @@ func NewBaseKeeper( // Previous restriction functions can be nested as such: // // bankKeeper.WithMintCoinsRestriction(restriction1).WithMintCoinsRestriction(restriction2) -func (k BaseKeeper) WithMintCoinsRestriction(check MintingRestrictionFn) BaseKeeper { - oldRestrictionFn := k.mintCoinsRestrictionFn - k.mintCoinsRestrictionFn = func(ctx context.Context, coins sdk.Coins) error { - err := check(ctx, coins) - if err != nil { - return err - } - err = oldRestrictionFn(ctx, coins) - if err != nil { - return err - } - return nil - } +func (k BaseKeeper) WithMintCoinsRestriction(check types.MintingRestrictionFn) BaseKeeper { + k.mintCoinsRestrictionFn = check.Then(k.mintCoinsRestrictionFn) return k } @@ -262,7 +243,7 @@ func (k BaseKeeper) IterateAllDenomMetaData(ctx context.Context, cb func(types.M err := k.BaseViewKeeper.DenomMetadata.Walk(ctx, nil, func(_ string, metadata types.Metadata) (stop bool, err error) { return cb(metadata), nil }) - if err != nil && !errors.Is(err, collections.ErrInvalidIterator) { + if err != nil { panic(err) } } @@ -483,7 +464,7 @@ func (k BaseViewKeeper) IterateTotalSupply(ctx context.Context, cb func(sdk.Coin err := k.Supply.Walk(ctx, nil, func(s string, m math.Int) (bool, error) { return cb(sdk.NewCoin(s, m)), nil }) - if err != nil && !errors.Is(err, collections.ErrInvalidIterator) { + if err != nil { panic(err) } } diff --git a/x/bank/keeper/keeper_test.go b/x/bank/keeper/keeper_test.go index f28346ea2925..325b471c8e56 100644 --- a/x/bank/keeper/keeper_test.go +++ b/x/bank/keeper/keeper_test.go @@ -4,19 +4,21 @@ import ( "context" "crypto/sha256" "encoding/hex" + "errors" "fmt" "strings" "testing" "time" - "cosmossdk.io/log" - "cosmossdk.io/math" abci "github.com/cometbft/cometbft/abci/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" cmttime "github.com/cometbft/cometbft/types/time" "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/log" + "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/baseapp" @@ -24,6 +26,7 @@ import ( "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/types/query" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -50,7 +53,7 @@ const ( var ( holderAcc = authtypes.NewEmptyModuleAccount(holder) - burnerAcc = authtypes.NewEmptyModuleAccount(authtypes.Burner, authtypes.Burner) + burnerAcc = authtypes.NewEmptyModuleAccount(authtypes.Burner, authtypes.Burner, authtypes.Staking) minterAcc = authtypes.NewEmptyModuleAccount(authtypes.Minter, authtypes.Minter) mintAcc = authtypes.NewEmptyModuleAccount(minttypes.ModuleName, authtypes.Minter) multiPermAcc = authtypes.NewEmptyModuleAccount(multiPerm, authtypes.Burner, authtypes.Minter, authtypes.Staking) @@ -220,6 +223,16 @@ func (suite *KeeperTestSuite) mockSpendableCoins(ctx sdk.Context, acc sdk.Accoun suite.authKeeper.EXPECT().GetAccount(ctx, acc.GetAddress()).Return(acc) } +func (suite *KeeperTestSuite) mockDelegateCoinsFromAccountToModule(acc *authtypes.BaseAccount, moduleAcc *authtypes.ModuleAccount) { + suite.authKeeper.EXPECT().GetModuleAccount(suite.ctx, moduleAcc.Name).Return(moduleAcc) + suite.mockDelegateCoins(suite.ctx, acc, moduleAcc) +} + +func (suite *KeeperTestSuite) mockUndelegateCoinsFromModuleToAccount(moduleAcc *authtypes.ModuleAccount, accAddr *authtypes.BaseAccount) { + suite.authKeeper.EXPECT().GetModuleAccount(suite.ctx, moduleAcc.Name).Return(moduleAcc) + suite.mockUnDelegateCoins(suite.ctx, accAddr, moduleAcc) +} + func (suite *KeeperTestSuite) mockDelegateCoins(ctx context.Context, acc, mAcc sdk.AccountI) { vacc, ok := acc.(banktypes.VestingAccount) if ok { @@ -239,6 +252,64 @@ func (suite *KeeperTestSuite) mockUnDelegateCoins(ctx context.Context, acc, mAcc suite.authKeeper.EXPECT().GetAccount(ctx, mAcc.GetAddress()).Return(mAcc) } +func (suite *KeeperTestSuite) TestAppendSendRestriction() { + var calls []int + testRestriction := func(index int) banktypes.SendRestrictionFn { + return func(_ context.Context, _, _ sdk.AccAddress, _ sdk.Coins) (sdk.AccAddress, error) { + calls = append(calls, index) + return nil, nil + } + } + + bk := suite.bankKeeper + + // Initial append of the test restriction. + bk.SetSendRestriction(nil) + bk.AppendSendRestriction(testRestriction(1)) + _, _ = bk.GetSendRestrictionFn()(suite.ctx, nil, nil, nil) + suite.Require().Equal([]int{1}, calls, "restriction calls after first append") + + // Append the test restriction again. + calls = nil + bk.AppendSendRestriction(testRestriction(2)) + _, _ = bk.GetSendRestrictionFn()(suite.ctx, nil, nil, nil) + suite.Require().Equal([]int{1, 2}, calls, "restriction calls after second append") + + // make sure the original bank keeper has the restrictions too. + calls = nil + _, _ = suite.bankKeeper.GetSendRestrictionFn()(suite.ctx, nil, nil, nil) + suite.Require().Equal([]int{1, 2}, calls, "restriction calls from original bank keeper") +} + +func (suite *KeeperTestSuite) TestPrependSendRestriction() { + var calls []int + testRestriction := func(index int) banktypes.SendRestrictionFn { + return func(_ context.Context, _, _ sdk.AccAddress, _ sdk.Coins) (sdk.AccAddress, error) { + calls = append(calls, index) + return nil, nil + } + } + + bk := suite.bankKeeper + + // Initial append of the test restriction. + bk.SetSendRestriction(nil) + bk.PrependSendRestriction(testRestriction(1)) + _, _ = bk.GetSendRestrictionFn()(suite.ctx, nil, nil, nil) + suite.Require().Equal([]int{1}, calls, "restriction calls after first append") + + // Append the test restriction again. + calls = nil + bk.PrependSendRestriction(testRestriction(2)) + _, _ = bk.GetSendRestrictionFn()(suite.ctx, nil, nil, nil) + suite.Require().Equal([]int{2, 1}, calls, "restriction calls after second append") + + // make sure the original bank keeper has the restrictions too. + calls = nil + _, _ = suite.bankKeeper.GetSendRestrictionFn()(suite.ctx, nil, nil, nil) + suite.Require().Equal([]int{2, 1}, calls, "restriction calls from original bank keeper") +} + func (suite *KeeperTestSuite) TestGetAuthority() { storeService := runtime.NewKVStoreService(storetypes.NewKVStoreKey(banktypes.StoreKey)) NewKeeperWithAuthority := func(authority string) keeper.BaseKeeper { @@ -316,6 +387,67 @@ func (suite *KeeperTestSuite) TestSendCoinsFromModuleToAccount_Blocklist() { )) } +func (suite *KeeperTestSuite) TestSupply_DelegateUndelegateCoins() { + ctx := suite.ctx + require := suite.Require() + authKeeper, keeper := suite.authKeeper, suite.bankKeeper + + // set initial balances + suite.mockMintCoins(mintAcc) + require.NoError(keeper.MintCoins(ctx, minttypes.ModuleName, initCoins)) + + suite.mockSendCoinsFromModuleToAccount(mintAcc, holderAcc.GetAddress()) + require.NoError(keeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, holderAcc.GetAddress(), initCoins)) + + authKeeper.EXPECT().GetModuleAddress("").Return(nil) + require.Panics(func() { + _ = keeper.SendCoinsFromModuleToAccount(ctx, "", holderAcc.GetAddress(), initCoins) //nolint:errcheck // we're testing for a panic, not an error + }) + + authKeeper.EXPECT().GetModuleAddress(burnerAcc.Name).Return(burnerAcc.GetAddress()) + authKeeper.EXPECT().GetModuleAccount(ctx, "").Return(nil) + require.Panics(func() { + _ = keeper.SendCoinsFromModuleToModule(ctx, authtypes.Burner, "", initCoins) //nolint:errcheck // we're testing for a panic, not an error + }) + + authKeeper.EXPECT().GetModuleAddress("").Return(nil) + require.Panics(func() { + _ = keeper.SendCoinsFromModuleToAccount(ctx, "", baseAcc.GetAddress(), initCoins) //nolint:errcheck // we're testing for a panic, not an error + }) + + authKeeper.EXPECT().GetModuleAddress(holderAcc.Name).Return(holderAcc.GetAddress()) + authKeeper.EXPECT().GetAccount(suite.ctx, holderAcc.GetAddress()).Return(holderAcc) + require.Error( + keeper.SendCoinsFromModuleToAccount(ctx, holderAcc.GetName(), baseAcc.GetAddress(), initCoins.Add(initCoins...)), + ) + suite.mockSendCoinsFromModuleToModule(holderAcc, burnerAcc) + require.NoError( + keeper.SendCoinsFromModuleToModule(ctx, holderAcc.GetName(), authtypes.Burner, initCoins), + ) + + require.Equal(sdk.NewCoins(), keeper.GetAllBalances(ctx, holderAcc.GetAddress())) + require.Equal(initCoins, keeper.GetAllBalances(ctx, burnerAcc.GetAddress())) + + suite.mockSendCoinsFromModuleToAccount(burnerAcc, baseAcc.GetAddress()) + require.NoError( + keeper.SendCoinsFromModuleToAccount(ctx, authtypes.Burner, baseAcc.GetAddress(), initCoins), + ) + require.Equal(sdk.NewCoins(), keeper.GetAllBalances(ctx, burnerAcc.GetAddress())) + require.Equal(initCoins, keeper.GetAllBalances(ctx, baseAcc.GetAddress())) + + suite.mockDelegateCoinsFromAccountToModule(baseAcc, burnerAcc) + + sdkCtx := sdk.UnwrapSDKContext(ctx) + require.NoError(keeper.DelegateCoinsFromAccountToModule(sdkCtx, baseAcc.GetAddress(), authtypes.Burner, initCoins)) + require.Equal(sdk.NewCoins(), keeper.GetAllBalances(ctx, baseAcc.GetAddress())) + require.Equal(initCoins, keeper.GetAllBalances(ctx, burnerAcc.GetAddress())) + + suite.mockUndelegateCoinsFromModuleToAccount(burnerAcc, baseAcc) + require.NoError(keeper.UndelegateCoinsFromModuleToAccount(sdkCtx, authtypes.Burner, baseAcc.GetAddress(), initCoins)) + require.Equal(sdk.NewCoins(), keeper.GetAllBalances(ctx, burnerAcc.GetAddress())) + require.Equal(initCoins, keeper.GetAllBalances(ctx, baseAcc.GetAddress())) +} + func (suite *KeeperTestSuite) TestSupply_SendCoins() { ctx := suite.ctx require := suite.Require() @@ -576,6 +708,294 @@ func (suite *KeeperTestSuite) TestInputOutputCoins() { require.Equal(expected, acc3Balances) } +func (suite *KeeperTestSuite) TestInputOutputCoinsWithRestrictions() { + type restrictionArgs struct { + ctx context.Context + fromAddr sdk.AccAddress + toAddr sdk.AccAddress + amt sdk.Coins + } + var actualRestrictionArgs []*restrictionArgs + restrictionError := func(messages ...string) banktypes.SendRestrictionFn { + i := -1 + return func(ctx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) (sdk.AccAddress, error) { + actualRestrictionArgs = append(actualRestrictionArgs, &restrictionArgs{ + ctx: ctx, + fromAddr: fromAddr, + toAddr: toAddr, + amt: amt, + }) + i++ + if i < len(messages) { + if len(messages[i]) > 0 { + return nil, errors.New(messages[i]) + } + } + return toAddr, nil + } + } + restrictionPassthrough := func() banktypes.SendRestrictionFn { + return func(ctx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) (sdk.AccAddress, error) { + actualRestrictionArgs = append(actualRestrictionArgs, &restrictionArgs{ + ctx: ctx, + fromAddr: fromAddr, + toAddr: toAddr, + amt: amt, + }) + return toAddr, nil + } + } + restrictionNewTo := func(newToAddrs ...sdk.AccAddress) banktypes.SendRestrictionFn { + i := -1 + return func(ctx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) (sdk.AccAddress, error) { + actualRestrictionArgs = append(actualRestrictionArgs, &restrictionArgs{ + ctx: ctx, + fromAddr: fromAddr, + toAddr: toAddr, + amt: amt, + }) + i++ + if i < len(newToAddrs) { + if len(newToAddrs[i]) > 0 { + return newToAddrs[i], nil + } + } + return toAddr, nil + } + } + type expBals struct { + from sdk.Coins + to1 sdk.Coins + to2 sdk.Coins + } + + setupCtx := suite.ctx + balances := sdk.NewCoins(newFooCoin(1000), newBarCoin(500)) + fromAddr := accAddrs[0] + fromAcc := authtypes.NewBaseAccountWithAddress(fromAddr) + inputAccs := []sdk.AccountI{fromAcc} + toAddr1 := accAddrs[1] + toAddr2 := accAddrs[2] + + suite.mockFundAccount(accAddrs[0]) + suite.Require().NoError(banktestutil.FundAccount(setupCtx, suite.bankKeeper, accAddrs[0], balances)) + + tests := []struct { + name string + fn banktypes.SendRestrictionFn + inputCoins sdk.Coins + outputs []banktypes.Output + outputAddrs []sdk.AccAddress + expArgs []*restrictionArgs + expErr string + expBals expBals + }{ + { + name: "nil restriction", + fn: nil, + inputCoins: sdk.NewCoins(newFooCoin(5)), + outputs: []banktypes.Output{{Address: toAddr1.String(), Coins: sdk.NewCoins(newFooCoin(5))}}, + outputAddrs: []sdk.AccAddress{toAddr1}, + expBals: expBals{ + from: sdk.NewCoins(newFooCoin(995), newBarCoin(500)), + to1: sdk.NewCoins(newFooCoin(5)), + to2: sdk.Coins{}, + }, + }, + { + name: "passthrough restriction single output", + fn: restrictionPassthrough(), + inputCoins: sdk.NewCoins(newFooCoin(10)), + outputs: []banktypes.Output{{Address: toAddr1.String(), Coins: sdk.NewCoins(newFooCoin(10))}}, + outputAddrs: []sdk.AccAddress{toAddr1}, + expArgs: []*restrictionArgs{ + { + ctx: suite.ctx, + fromAddr: fromAddr, + toAddr: toAddr1, + amt: sdk.NewCoins(newFooCoin(10)), + }, + }, + expBals: expBals{ + from: sdk.NewCoins(newFooCoin(985), newBarCoin(500)), + to1: sdk.NewCoins(newFooCoin(15)), + to2: sdk.Coins{}, + }, + }, + { + name: "new to restriction single output", + fn: restrictionNewTo(toAddr2), + inputCoins: sdk.NewCoins(newFooCoin(26)), + outputs: []banktypes.Output{{Address: toAddr1.String(), Coins: sdk.NewCoins(newFooCoin(26))}}, + outputAddrs: []sdk.AccAddress{toAddr2}, + expArgs: []*restrictionArgs{ + { + ctx: suite.ctx, + fromAddr: fromAddr, + toAddr: toAddr1, + amt: sdk.NewCoins(newFooCoin(26)), + }, + }, + expBals: expBals{ + from: sdk.NewCoins(newFooCoin(959), newBarCoin(500)), + to1: sdk.NewCoins(newFooCoin(15)), + to2: sdk.NewCoins(newFooCoin(26)), + }, + }, + { + name: "error restriction single output", + fn: restrictionError("restriction test error"), + inputCoins: sdk.NewCoins(newBarCoin(88)), + outputs: []banktypes.Output{{Address: toAddr1.String(), Coins: sdk.NewCoins(newBarCoin(88))}}, + outputAddrs: []sdk.AccAddress{}, + expArgs: []*restrictionArgs{ + { + ctx: suite.ctx, + fromAddr: fromAddr, + toAddr: toAddr1, + amt: sdk.NewCoins(newBarCoin(88)), + }, + }, + expErr: "restriction test error", + expBals: expBals{ + from: sdk.NewCoins(newFooCoin(959), newBarCoin(412)), + to1: sdk.NewCoins(newFooCoin(15)), + to2: sdk.NewCoins(newFooCoin(26)), + }, + }, + { + name: "passthrough restriction two outputs", + fn: restrictionPassthrough(), + inputCoins: sdk.NewCoins(newFooCoin(11), newBarCoin(12)), + outputs: []banktypes.Output{ + {Address: toAddr1.String(), Coins: sdk.NewCoins(newFooCoin(11))}, + {Address: toAddr2.String(), Coins: sdk.NewCoins(newBarCoin(12))}, + }, + outputAddrs: []sdk.AccAddress{toAddr1, toAddr2}, + expArgs: []*restrictionArgs{ + { + ctx: suite.ctx, + fromAddr: fromAddr, + toAddr: toAddr1, + amt: sdk.NewCoins(newFooCoin(11)), + }, + { + ctx: suite.ctx, + fromAddr: fromAddr, + toAddr: toAddr2, + amt: sdk.NewCoins(newBarCoin(12)), + }, + }, + expBals: expBals{ + from: sdk.NewCoins(newFooCoin(948), newBarCoin(400)), + to1: sdk.NewCoins(newFooCoin(26)), + to2: sdk.NewCoins(newFooCoin(26), newBarCoin(12)), + }, + }, + { + name: "error restriction two outputs error on second", + fn: restrictionError("", "second restriction error"), + inputCoins: sdk.NewCoins(newFooCoin(44)), + outputs: []banktypes.Output{ + {Address: toAddr1.String(), Coins: sdk.NewCoins(newFooCoin(12))}, + {Address: toAddr2.String(), Coins: sdk.NewCoins(newFooCoin(32))}, + }, + outputAddrs: []sdk.AccAddress{toAddr1}, + expArgs: []*restrictionArgs{ + { + ctx: suite.ctx, + fromAddr: fromAddr, + toAddr: toAddr1, + amt: sdk.NewCoins(newFooCoin(12)), + }, + { + ctx: suite.ctx, + fromAddr: fromAddr, + toAddr: toAddr2, + amt: sdk.NewCoins(newFooCoin(32)), + }, + }, + expErr: "second restriction error", + expBals: expBals{ + from: sdk.NewCoins(newFooCoin(904), newBarCoin(400)), + to1: sdk.NewCoins(newFooCoin(38)), + to2: sdk.NewCoins(newFooCoin(26), newBarCoin(12)), + }, + }, + { + name: "new to restriction two outputs", + fn: restrictionNewTo(toAddr2, toAddr1), + inputCoins: sdk.NewCoins(newBarCoin(35)), + outputs: []banktypes.Output{ + {Address: toAddr1.String(), Coins: sdk.NewCoins(newBarCoin(10))}, + {Address: toAddr2.String(), Coins: sdk.NewCoins(newBarCoin(25))}, + }, + outputAddrs: []sdk.AccAddress{toAddr1, toAddr2}, + expArgs: []*restrictionArgs{ + { + ctx: suite.ctx, + fromAddr: fromAddr, + toAddr: toAddr1, + amt: sdk.NewCoins(newBarCoin(10)), + }, + { + ctx: suite.ctx, + fromAddr: fromAddr, + toAddr: toAddr2, + amt: sdk.NewCoins(newBarCoin(25)), + }, + }, + expBals: expBals{ + from: sdk.NewCoins(newFooCoin(904), newBarCoin(365)), + to1: sdk.NewCoins(newFooCoin(38), newBarCoin(25)), + to2: sdk.NewCoins(newFooCoin(26), newBarCoin(22)), + }, + }, + } + + for _, tc := range tests { + suite.Run(tc.name, func() { + existingSendRestrictionFn := suite.bankKeeper.GetSendRestrictionFn() + defer suite.bankKeeper.SetSendRestriction(existingSendRestrictionFn) + actualRestrictionArgs = nil + suite.bankKeeper.SetSendRestriction(tc.fn) + ctx := suite.ctx + suite.mockInputOutputCoins(inputAccs, tc.outputAddrs) + input := banktypes.Input{ + Address: fromAddr.String(), + Coins: tc.inputCoins, + } + + var err error + testFunc := func() { + err = suite.bankKeeper.InputOutputCoins(ctx, input, tc.outputs) + } + suite.Require().NotPanics(testFunc, "InputOutputCoins") + if len(tc.expErr) > 0 { + suite.Assert().EqualError(err, tc.expErr, "InputOutputCoins error") + } else { + suite.Assert().NoError(err, "InputOutputCoins error") + } + if len(tc.expArgs) > 0 { + for i, expArgs := range tc.expArgs { + suite.Assert().Equal(expArgs.ctx, actualRestrictionArgs[i].ctx, "[%d] ctx provided to restriction", i) + suite.Assert().Equal(expArgs.fromAddr, actualRestrictionArgs[i].fromAddr, "[%d] fromAddr provided to restriction", i) + suite.Assert().Equal(expArgs.toAddr, actualRestrictionArgs[i].toAddr, "[%d] toAddr provided to restriction", i) + suite.Assert().Equal(expArgs.amt.String(), actualRestrictionArgs[i].amt.String(), "[%d] amt provided to restriction", i) + } + } else { + suite.Assert().Nil(actualRestrictionArgs, "args provided to a restriction") + } + fromBal := suite.bankKeeper.GetAllBalances(ctx, fromAddr) + suite.Assert().Equal(tc.expBals.from.String(), fromBal.String(), "fromAddr balance") + to1Bal := suite.bankKeeper.GetAllBalances(ctx, toAddr1) + suite.Assert().Equal(tc.expBals.to1.String(), to1Bal.String(), "toAddr1 balance") + to2Bal := suite.bankKeeper.GetAllBalances(ctx, toAddr2) + suite.Assert().Equal(tc.expBals.to2.String(), to2Bal.String(), "toAddr2 balance") + }) + } +} + func (suite *KeeperTestSuite) TestSendCoins() { ctx := suite.ctx require := suite.Require() @@ -613,6 +1033,184 @@ func (suite *KeeperTestSuite) TestSendCoins() { require.Equal(newBarCoin(25), coins[0], "expected only bar coins in the account balance, got: %v", coins) } +func (suite *KeeperTestSuite) TestSendCoinsWithRestrictions() { + type restrictionArgs struct { + ctx context.Context + fromAddr sdk.AccAddress + toAddr sdk.AccAddress + amt sdk.Coins + } + var actualRestrictionArgs *restrictionArgs + restrictionError := func(message string) banktypes.SendRestrictionFn { + return func(ctx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) (sdk.AccAddress, error) { + actualRestrictionArgs = &restrictionArgs{ + ctx: ctx, + fromAddr: fromAddr, + toAddr: toAddr, + amt: amt, + } + return nil, errors.New(message) + } + } + restrictionPassthrough := func() banktypes.SendRestrictionFn { + return func(ctx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) (sdk.AccAddress, error) { + actualRestrictionArgs = &restrictionArgs{ + ctx: ctx, + fromAddr: fromAddr, + toAddr: toAddr, + amt: amt, + } + return toAddr, nil + } + } + restrictionNewTo := func(newToAddr sdk.AccAddress) banktypes.SendRestrictionFn { + return func(ctx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) (sdk.AccAddress, error) { + actualRestrictionArgs = &restrictionArgs{ + ctx: ctx, + fromAddr: fromAddr, + toAddr: toAddr, + amt: amt, + } + return newToAddr, nil + } + } + type expBals struct { + from sdk.Coins + to1 sdk.Coins + to2 sdk.Coins + } + + setupCtx := suite.ctx + balances := sdk.NewCoins(newFooCoin(1000), newBarCoin(500)) + fromAddr := accAddrs[0] + fromAcc := authtypes.NewBaseAccountWithAddress(fromAddr) + toAddr1 := accAddrs[1] + toAddr2 := accAddrs[2] + + suite.mockFundAccount(accAddrs[0]) + suite.Require().NoError(banktestutil.FundAccount(setupCtx, suite.bankKeeper, accAddrs[0], balances)) + + tests := []struct { + name string + fn banktypes.SendRestrictionFn + toAddr sdk.AccAddress + finalAddr sdk.AccAddress + amt sdk.Coins + expArgs *restrictionArgs + expErr string + expBals expBals + }{ + { + name: "nil restriction", + fn: nil, + toAddr: toAddr1, + finalAddr: toAddr1, + amt: sdk.NewCoins(newFooCoin(5)), + expArgs: nil, + expBals: expBals{ + from: sdk.NewCoins(newFooCoin(995), newBarCoin(500)), + to1: sdk.NewCoins(newFooCoin(5)), + to2: sdk.Coins{}, + }, + }, + { + name: "passthrough restriction", + fn: restrictionPassthrough(), + toAddr: toAddr1, + finalAddr: toAddr1, + amt: sdk.NewCoins(newFooCoin(10)), + expArgs: &restrictionArgs{ + ctx: suite.ctx, + fromAddr: fromAddr, + toAddr: toAddr1, + amt: sdk.NewCoins(newFooCoin(10)), + }, + expBals: expBals{ + from: sdk.NewCoins(newFooCoin(985), newBarCoin(500)), + to1: sdk.NewCoins(newFooCoin(15)), + to2: sdk.Coins{}, + }, + }, + { + name: "new to addr restriction", + fn: restrictionNewTo(toAddr2), + toAddr: toAddr1, + finalAddr: toAddr2, + amt: sdk.NewCoins(newBarCoin(27)), + expArgs: &restrictionArgs{ + ctx: suite.ctx, + fromAddr: fromAddr, + toAddr: toAddr1, + amt: sdk.NewCoins(newBarCoin(27)), + }, + expBals: expBals{ + from: sdk.NewCoins(newFooCoin(985), newBarCoin(473)), + to1: sdk.NewCoins(newFooCoin(15)), + to2: sdk.NewCoins(newBarCoin(27)), + }, + }, + { + name: "restriction returns error", + fn: restrictionError("test restriction error"), + toAddr: toAddr1, + finalAddr: toAddr1, + amt: sdk.NewCoins(newFooCoin(100), newBarCoin(200)), + expArgs: &restrictionArgs{ + ctx: suite.ctx, + fromAddr: fromAddr, + toAddr: toAddr1, + amt: sdk.NewCoins(newFooCoin(100), newBarCoin(200)), + }, + expErr: "test restriction error", + expBals: expBals{ + from: sdk.NewCoins(newFooCoin(885), newBarCoin(273)), + to1: sdk.NewCoins(newFooCoin(15)), + to2: sdk.NewCoins(newBarCoin(27)), + }, + }, + } + + for _, tc := range tests { + suite.Run(tc.name, func() { + existingSendRestrictionFn := suite.bankKeeper.GetSendRestrictionFn() + defer suite.bankKeeper.SetSendRestriction(existingSendRestrictionFn) + actualRestrictionArgs = nil + suite.bankKeeper.SetSendRestriction(tc.fn) + ctx := suite.ctx + if len(tc.expErr) > 0 { + suite.authKeeper.EXPECT().GetAccount(ctx, fromAddr).Return(fromAcc) + } else { + suite.mockSendCoins(ctx, fromAcc, tc.finalAddr) + } + + var err error + testFunc := func() { + err = suite.bankKeeper.SendCoins(ctx, fromAddr, tc.toAddr, tc.amt) + } + suite.Require().NotPanics(testFunc, "SendCoins") + if len(tc.expErr) > 0 { + suite.Assert().EqualError(err, tc.expErr, "SendCoins error") + } else { + suite.Assert().NoError(err, "SendCoins error") + } + if tc.expArgs != nil { + suite.Assert().Equal(tc.expArgs.ctx, actualRestrictionArgs.ctx, "ctx provided to restriction") + suite.Assert().Equal(tc.expArgs.fromAddr, actualRestrictionArgs.fromAddr, "fromAddr provided to restriction") + suite.Assert().Equal(tc.expArgs.toAddr, actualRestrictionArgs.toAddr, "toAddr provided to restriction") + suite.Assert().Equal(tc.expArgs.amt.String(), actualRestrictionArgs.amt.String(), "amt provided to restriction") + } else { + suite.Assert().Nil(actualRestrictionArgs, "args provided to a restriction") + } + fromBal := suite.bankKeeper.GetAllBalances(ctx, fromAddr) + suite.Assert().Equal(tc.expBals.from.String(), fromBal.String(), "fromAddr balance") + to1Bal := suite.bankKeeper.GetAllBalances(ctx, toAddr1) + suite.Assert().Equal(tc.expBals.to1.String(), to1Bal.String(), "toAddr1 balance") + to2Bal := suite.bankKeeper.GetAllBalances(ctx, toAddr2) + suite.Assert().Equal(tc.expBals.to2.String(), to2Bal.String(), "toAddr2 balance") + }) + } +} + func (suite *KeeperTestSuite) TestSendCoins_Invalid_SendLockedCoins() { balances := sdk.NewCoins(newFooCoin(50)) @@ -623,7 +1221,8 @@ func (suite *KeeperTestSuite) TestSendCoins_Invalid_SendLockedCoins() { sendCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 50)) acc0 := authtypes.NewBaseAccountWithAddress(accAddrs[0]) - vacc := vesting.NewContinuousVestingAccount(acc0, origCoins, now.Unix(), endTime.Unix()) + vacc, err := vesting.NewContinuousVestingAccount(acc0, origCoins, now.Unix(), endTime.Unix()) + suite.Require().NoError(err) suite.mockFundAccount(accAddrs[1]) suite.Require().NoError(banktestutil.FundAccount(suite.ctx, suite.bankKeeper, accAddrs[1], balances)) @@ -632,6 +1231,32 @@ func (suite *KeeperTestSuite) TestSendCoins_Invalid_SendLockedCoins() { suite.Require().Error(suite.bankKeeper.SendCoins(suite.ctx, accAddrs[0], accAddrs[1], sendCoins)) } +func (suite *KeeperTestSuite) TestSendCoins_Invalid_NoSpendableCoins() { + coin := sdk.NewInt64Coin("stake", 10) + coins := sdk.NewCoins(coin) + balances := coins + + now := cmttime.Now() + endTime := now.Add(24 * time.Hour) + + origCoins := coins + sendCoins := coins + + acc0 := authtypes.NewBaseAccountWithAddress(accAddrs[0]) + suite.mockFundAccount(accAddrs[0]) + suite.Require().NoError(banktestutil.FundAccount(suite.ctx, suite.bankKeeper, accAddrs[0], balances)) + vacc, err := vesting.NewContinuousVestingAccount(acc0, origCoins, now.Unix(), endTime.Unix()) + suite.Require().NoError(err) + + suite.authKeeper.EXPECT().GetAccount(suite.ctx, accAddrs[0]).Return(vacc) + e := errorsmod.Wrapf( + sdkerrors.ErrInsufficientFunds, + "spendable balance 0stake is smaller than %s", + coin, + ) + suite.Require().EqualError(suite.bankKeeper.SendCoins(suite.ctx, accAddrs[0], accAddrs[1], sendCoins), e.Error()) +} + func (suite *KeeperTestSuite) TestValidateBalance() { ctx := suite.ctx require := suite.Require() @@ -650,7 +1275,8 @@ func (suite *KeeperTestSuite) TestValidateBalance() { require.NoError(suite.bankKeeper.ValidateBalance(ctx, accAddrs[0])) acc1 := authtypes.NewBaseAccountWithAddress(accAddrs[1]) - vacc := vesting.NewContinuousVestingAccount(acc1, balances.Add(balances...), now.Unix(), endTime.Unix()) + vacc, err := vesting.NewContinuousVestingAccount(acc1, balances.Add(balances...), now.Unix(), endTime.Unix()) + suite.Require().NoError(err) suite.mockFundAccount(accAddrs[1]) require.NoError(banktestutil.FundAccount(ctx, suite.bankKeeper, accAddrs[1], balances)) @@ -828,10 +1454,9 @@ func (suite *KeeperTestSuite) TestMsgMultiSendEvents() { event2.Attributes = append( event2.Attributes, abci.EventAttribute{Key: banktypes.AttributeKeyRecipient, Value: accAddrs[2].String()}, + abci.EventAttribute{Key: banktypes.AttributeKeySender, Value: accAddrs[0].String()}, + abci.EventAttribute{Key: sdk.AttributeKeyAmount, Value: newCoins.String()}, ) - event2.Attributes = append( - event2.Attributes, - abci.EventAttribute{Key: sdk.AttributeKeyAmount, Value: newCoins.String()}) event3 := sdk.Event{ Type: banktypes.EventTypeTransfer, Attributes: []abci.EventAttribute{}, @@ -839,9 +1464,7 @@ func (suite *KeeperTestSuite) TestMsgMultiSendEvents() { event3.Attributes = append( event3.Attributes, abci.EventAttribute{Key: banktypes.AttributeKeyRecipient, Value: accAddrs[3].String()}, - ) - event3.Attributes = append( - event3.Attributes, + abci.EventAttribute{Key: banktypes.AttributeKeySender, Value: accAddrs[0].String()}, abci.EventAttribute{Key: sdk.AttributeKeyAmount, Value: newCoins2.String()}, ) // events are shifted due to the funding account events @@ -861,7 +1484,8 @@ func (suite *KeeperTestSuite) TestSpendableCoins() { acc0 := authtypes.NewBaseAccountWithAddress(accAddrs[0]) acc1 := authtypes.NewBaseAccountWithAddress(accAddrs[1]) - vacc := vesting.NewContinuousVestingAccount(acc0, origCoins, ctx.BlockHeader().Time.Unix(), endTime.Unix()) + vacc, err := vesting.NewContinuousVestingAccount(acc0, origCoins, ctx.BlockHeader().Time.Unix(), endTime.Unix()) + suite.Require().NoError(err) suite.mockFundAccount(accAddrs[0]) require.NoError(banktestutil.FundAccount(ctx, suite.bankKeeper, accAddrs[0], origCoins)) @@ -893,7 +1517,8 @@ func (suite *KeeperTestSuite) TestVestingAccountSend() { sendCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 50)) acc0 := authtypes.NewBaseAccountWithAddress(accAddrs[0]) - vacc := vesting.NewContinuousVestingAccount(acc0, origCoins, now.Unix(), endTime.Unix()) + vacc, err := vesting.NewContinuousVestingAccount(acc0, origCoins, now.Unix(), endTime.Unix()) + suite.Require().NoError(err) suite.mockFundAccount(accAddrs[0]) require.NoError(banktestutil.FundAccount(ctx, suite.bankKeeper, accAddrs[0], origCoins)) @@ -926,7 +1551,8 @@ func (suite *KeeperTestSuite) TestPeriodicVestingAccountSend() { } acc0 := authtypes.NewBaseAccountWithAddress(accAddrs[0]) - vacc := vesting.NewPeriodicVestingAccount(acc0, origCoins, ctx.BlockHeader().Time.Unix(), periods) + vacc, err := vesting.NewPeriodicVestingAccount(acc0, origCoins, ctx.BlockHeader().Time.Unix(), periods) + suite.Require().NoError(err) suite.mockFundAccount(accAddrs[0]) require.NoError(banktestutil.FundAccount(ctx, suite.bankKeeper, accAddrs[0], origCoins)) @@ -957,7 +1583,8 @@ func (suite *KeeperTestSuite) TestVestingAccountReceive() { acc0 := authtypes.NewBaseAccountWithAddress(accAddrs[0]) acc1 := authtypes.NewBaseAccountWithAddress(accAddrs[1]) - vacc := vesting.NewContinuousVestingAccount(acc0, origCoins, ctx.BlockHeader().Time.Unix(), endTime.Unix()) + vacc, err := vesting.NewContinuousVestingAccount(acc0, origCoins, ctx.BlockHeader().Time.Unix(), endTime.Unix()) + suite.Require().NoError(err) suite.mockFundAccount(accAddrs[0]) require.NoError(banktestutil.FundAccount(ctx, suite.bankKeeper, accAddrs[0], origCoins)) @@ -994,7 +1621,8 @@ func (suite *KeeperTestSuite) TestPeriodicVestingAccountReceive() { vesting.Period{Length: int64(6 * 60 * 60), Amount: sdk.Coins{sdk.NewInt64Coin("stake", 25)}}, } - vacc := vesting.NewPeriodicVestingAccount(acc0, origCoins, ctx.BlockHeader().Time.Unix(), periods) + vacc, err := vesting.NewPeriodicVestingAccount(acc0, origCoins, ctx.BlockHeader().Time.Unix(), periods) + suite.Require().NoError(err) suite.mockFundAccount(accAddrs[0]) require.NoError(banktestutil.FundAccount(ctx, suite.bankKeeper, accAddrs[0], origCoins)) @@ -1026,7 +1654,8 @@ func (suite *KeeperTestSuite) TestDelegateCoins() { acc0 := authtypes.NewBaseAccountWithAddress(accAddrs[0]) acc1 := authtypes.NewBaseAccountWithAddress(accAddrs[1]) - vacc := vesting.NewContinuousVestingAccount(acc0, origCoins, ctx.BlockHeader().Time.Unix(), endTime.Unix()) + vacc, err := vesting.NewContinuousVestingAccount(acc0, origCoins, ctx.BlockHeader().Time.Unix(), endTime.Unix()) + suite.Require().NoError(err) suite.mockFundAccount(accAddrs[0]) require.NoError(banktestutil.FundAccount(ctx, suite.bankKeeper, accAddrs[0], origCoins)) @@ -1083,7 +1712,8 @@ func (suite *KeeperTestSuite) TestUndelegateCoins() { acc0 := authtypes.NewBaseAccountWithAddress(accAddrs[0]) acc1 := authtypes.NewBaseAccountWithAddress(accAddrs[1]) - vacc := vesting.NewContinuousVestingAccount(acc0, origCoins, ctx.BlockHeader().Time.Unix(), endTime.Unix()) + vacc, err := vesting.NewContinuousVestingAccount(acc0, origCoins, ctx.BlockHeader().Time.Unix(), endTime.Unix()) + suite.Require().NoError(err) suite.mockFundAccount(accAddrs[0]) require.NoError(banktestutil.FundAccount(ctx, suite.bankKeeper, accAddrs[0], origCoins)) @@ -1356,7 +1986,7 @@ func (suite *KeeperTestSuite) TestMintCoinRestrictions() { } for _, test := range tests { - keeper := suite.bankKeeper.WithMintCoinsRestriction(keeper.MintingRestrictionFn(test.restrictionFn)) + keeper := suite.bankKeeper.WithMintCoinsRestriction(banktypes.MintingRestrictionFn(test.restrictionFn)) for _, testCase := range test.testCases { if testCase.expectPass { suite.mockMintCoins(multiPermAcc) @@ -1743,6 +2373,8 @@ func (ms mockSubspace) GetParamSet(ctx sdk.Context, ps exported.ParamSet) { *ps.(*banktypes.Params) = ms.ps } +func (ms mockSubspace) Get(ctx sdk.Context, key []byte, ptr interface{}) {} + func (suite *KeeperTestSuite) TestMigrator_Migrate3to4() { bankKeeper := suite.bankKeeper ctx := sdk.UnwrapSDKContext(suite.ctx) diff --git a/x/bank/keeper/migrations.go b/x/bank/keeper/migrations.go index 4914f9480ce7..c083bfa975dd 100644 --- a/x/bank/keeper/migrations.go +++ b/x/bank/keeper/migrations.go @@ -6,6 +6,7 @@ import ( v2 "github.com/cosmos/cosmos-sdk/x/bank/migrations/v2" v3 "github.com/cosmos/cosmos-sdk/x/bank/migrations/v3" v4 "github.com/cosmos/cosmos-sdk/x/bank/migrations/v4" + "github.com/cosmos/cosmos-sdk/x/bank/types" ) // Migrator is a struct for handling in-place store migrations. @@ -31,5 +32,12 @@ func (m Migrator) Migrate2to3(ctx sdk.Context) error { // Migrate3to4 migrates x/bank storage from version 3 to 4. func (m Migrator) Migrate3to4(ctx sdk.Context) error { + m.MigrateSendEnabledParams(ctx) return v4.MigrateStore(ctx, m.keeper.storeService, m.legacySubspace, m.keeper.cdc) } + +// MigrateSendEnabledParams get params from x/params and update the bank params. +func (m Migrator) MigrateSendEnabledParams(ctx sdk.Context) { + sendEnabled := types.GetSendEnabledParams(ctx, m.legacySubspace) + m.keeper.SetAllSendEnabled(ctx, sendEnabled) +} diff --git a/x/bank/keeper/msg_server.go b/x/bank/keeper/msg_server.go index c6fbedf8369b..781b0796d8b8 100644 --- a/x/bank/keeper/msg_server.go +++ b/x/bank/keeper/msg_server.go @@ -3,7 +3,7 @@ package keeper import ( "context" - "github.com/armon/go-metrics" + "github.com/hashicorp/go-metrics" errorsmod "cosmossdk.io/errors" diff --git a/x/bank/keeper/send.go b/x/bank/keeper/send.go index 5219d2513553..7deedf473e3d 100644 --- a/x/bank/keeper/send.go +++ b/x/bank/keeper/send.go @@ -6,9 +6,9 @@ import ( "cosmossdk.io/collections" "cosmossdk.io/core/store" - "cosmossdk.io/log" - errorsmod "cosmossdk.io/errors" + "cosmossdk.io/log" + "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/telemetry" @@ -22,7 +22,11 @@ import ( type SendKeeper interface { ViewKeeper - InputOutputCoins(ctx context.Context, inputs types.Input, outputs []types.Output) error + AppendSendRestriction(restriction types.SendRestrictionFn) + PrependSendRestriction(restriction types.SendRestrictionFn) + ClearSendRestriction() + + InputOutputCoins(ctx context.Context, input types.Input, outputs []types.Output) error SendCoins(ctx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) error GetParams(ctx context.Context) types.Params @@ -63,6 +67,8 @@ type BaseSendKeeper struct { // the address capable of executing a MsgUpdateParams message. Typically, this // should be the x/gov module account. authority string + + sendRestriction *sendRestriction } func NewBaseSendKeeper( @@ -78,16 +84,32 @@ func NewBaseSendKeeper( } return BaseSendKeeper{ - BaseViewKeeper: NewBaseViewKeeper(cdc, storeService, ak, logger), - cdc: cdc, - ak: ak, - storeService: storeService, - blockedAddrs: blockedAddrs, - authority: authority, - logger: logger, + BaseViewKeeper: NewBaseViewKeeper(cdc, storeService, ak, logger), + cdc: cdc, + ak: ak, + storeService: storeService, + blockedAddrs: blockedAddrs, + authority: authority, + logger: logger, + sendRestriction: newSendRestriction(), } } +// AppendSendRestriction adds the provided SendRestrictionFn to run after previously provided restrictions. +func (k BaseSendKeeper) AppendSendRestriction(restriction types.SendRestrictionFn) { + k.sendRestriction.append(restriction) +} + +// PrependSendRestriction adds the provided SendRestrictionFn to run before previously provided restrictions. +func (k BaseSendKeeper) PrependSendRestriction(restriction types.SendRestrictionFn) { + k.sendRestriction.prepend(restriction) +} + +// ClearSendRestriction removes the send restriction (if there is one). +func (k BaseSendKeeper) ClearSendRestriction() { + k.sendRestriction.clear() +} + // GetAuthority returns the x/bank module's authority. func (k BaseSendKeeper) GetAuthority() string { return k.authority @@ -143,8 +165,14 @@ func (k BaseSendKeeper) InputOutputCoins(ctx context.Context, input types.Input, ), ) + var outAddress sdk.AccAddress for _, out := range outputs { - outAddress, err := k.ak.AddressCodec().StringToBytes(out.Address) + outAddress, err = k.ak.AddressCodec().StringToBytes(out.Address) + if err != nil { + return err + } + + outAddress, err = k.sendRestriction.apply(ctx, inAddress, outAddress, out.Coins) if err != nil { return err } @@ -156,7 +184,8 @@ func (k BaseSendKeeper) InputOutputCoins(ctx context.Context, input types.Input, sdkCtx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeTransfer, - sdk.NewAttribute(types.AttributeKeyRecipient, out.Address), + sdk.NewAttribute(types.AttributeKeyRecipient, outAddress.String()), + sdk.NewAttribute(types.AttributeKeySender, input.Address), sdk.NewAttribute(sdk.AttributeKeyAmount, out.Coins.String()), ), ) @@ -178,7 +207,13 @@ func (k BaseSendKeeper) InputOutputCoins(ctx context.Context, input types.Input, // SendCoins transfers amt coins from a sending account to a receiving account. // An error is returned upon failure. func (k BaseSendKeeper) SendCoins(ctx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) error { - err := k.subUnlockedCoins(ctx, fromAddr, amt) + var err error + err = k.subUnlockedCoins(ctx, fromAddr, amt) + if err != nil { + return err + } + + toAddr, err = k.sendRestriction.apply(ctx, fromAddr, toAddr, amt) if err != nil { return err } @@ -210,7 +245,7 @@ func (k BaseSendKeeper) SendCoins(ctx context.Context, fromAddr, toAddr sdk.AccA ), sdk.NewEvent( sdk.EventTypeMessage, - sdk.NewAttribute(types.AttributeKeySender, fromAddr.String()), + sdk.NewAttribute(types.AttributeKeySender, fromAddrString), ), }) @@ -238,6 +273,9 @@ func (k BaseSendKeeper) subUnlockedCoins(ctx context.Context, addr sdk.AccAddres } if _, hasNeg := spendable.SafeSub(coin); hasNeg { + if len(spendable) == 0 { + spendable = sdk.Coins{sdk.NewCoin(coin.Denom, math.ZeroInt())} + } return errorsmod.Wrapf( sdkerrors.ErrInsufficientFunds, "spendable balance %s is smaller than %s", @@ -379,7 +417,7 @@ func (k BaseSendKeeper) IterateSendEnabledEntries(ctx context.Context, cb func(d err := k.SendEnabled.Walk(ctx, nil, func(key string, value bool) (stop bool, err error) { return cb(key, value), nil }) - if err != nil && !errorsmod.IsOf(err, collections.ErrInvalidIterator) { + if err != nil { panic(err) } } @@ -430,3 +468,41 @@ func (k BaseSendKeeper) getSendEnabledOrDefault(ctx context.Context, denom strin return defaultVal } + +// sendRestriction is a struct that houses a SendRestrictionFn. +// It exists so that the SendRestrictionFn can be updated in the SendKeeper without needing to have a pointer receiver. +type sendRestriction struct { + fn types.SendRestrictionFn +} + +// newSendRestriction creates a new sendRestriction with nil send restriction. +func newSendRestriction() *sendRestriction { + return &sendRestriction{ + fn: nil, + } +} + +// append adds the provided restriction to this, to be run after the existing function. +func (r *sendRestriction) append(restriction types.SendRestrictionFn) { + r.fn = r.fn.Then(restriction) +} + +// prepend adds the provided restriction to this, to be run before the existing function. +func (r *sendRestriction) prepend(restriction types.SendRestrictionFn) { + r.fn = restriction.Then(r.fn) +} + +// clear removes the send restriction (sets it to nil). +func (r *sendRestriction) clear() { + r.fn = nil +} + +var _ types.SendRestrictionFn = (*sendRestriction)(nil).apply + +// apply applies the send restriction if there is one. If not, it's a no-op. +func (r *sendRestriction) apply(ctx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) (sdk.AccAddress, error) { + if r == nil || r.fn == nil { + return toAddr, nil + } + return r.fn(ctx, fromAddr, toAddr, amt) +} diff --git a/x/bank/keeper/view.go b/x/bank/keeper/view.go index 732ac3d17a75..d4e2544bc796 100644 --- a/x/bank/keeper/view.go +++ b/x/bank/keeper/view.go @@ -4,18 +4,13 @@ import ( "context" "fmt" + "cosmossdk.io/collections" "cosmossdk.io/collections/indexes" "cosmossdk.io/core/store" + errorsmod "cosmossdk.io/errors" "cosmossdk.io/log" - - "github.com/cockroachdb/errors" - - "cosmossdk.io/collections" - "cosmossdk.io/math" - errorsmod "cosmossdk.io/errors" - "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -45,7 +40,8 @@ func newBalancesIndexes(sb *collections.SchemaBuilder) BalancesIndexes { return BalancesIndexes{ Denom: indexes.NewReversePair[math.Int]( sb, types.DenomAddressPrefix, "address_by_denom_index", - collections.PairKeyCodec(sdk.AddressKeyAsIndexKey(sdk.AccAddressKey), collections.StringKey), // nolint:staticcheck // Note: refer to the AddressKeyAsIndexKey docs to understand why we do this. + collections.PairKeyCodec(sdk.LengthPrefixedAddressKey(sdk.AccAddressKey), collections.StringKey), // nolint:staticcheck // Note: refer to the LengthPrefixedAddressKey docs to understand why we do this. + indexes.WithReversePairUncheckedValue(), // denom to address indexes were stored as Key: Join(denom, address) Value: []byte{0}, this will migrate the value to []byte{} in a lazy way. ), } } @@ -84,7 +80,7 @@ func NewBaseViewKeeper(cdc codec.BinaryCodec, storeService store.KVStoreService, Supply: collections.NewMap(sb, types.SupplyKey, "supply", collections.StringKey, sdk.IntValue), DenomMetadata: collections.NewMap(sb, types.DenomMetadataPrefix, "denom_metadata", collections.StringKey, codec.CollValue[types.Metadata](cdc)), SendEnabled: collections.NewMap(sb, types.SendEnabledPrefix, "send_enabled", collections.StringKey, codec.BoolValue), // NOTE: we use a bool value which uses protobuf to retain state backwards compat - Balances: collections.NewIndexedMap(sb, types.BalancesPrefix, "balances", collections.PairKeyCodec(sdk.AccAddressKey, collections.StringKey), types.NewBalanceCompatValueCodec(), newBalancesIndexes(sb)), + Balances: collections.NewIndexedMap(sb, types.BalancesPrefix, "balances", collections.PairKeyCodec(sdk.AccAddressKey, collections.StringKey), types.BalanceValueCodec, newBalancesIndexes(sb)), Params: collections.NewItem(sb, types.ParamsKey, "params", codec.CollValue[types.Params](cdc)), } @@ -148,7 +144,7 @@ func (k BaseViewKeeper) GetAccountsBalances(ctx context.Context) []types.Balance func (k BaseViewKeeper) GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin { amt, err := k.Balances.Get(ctx, collections.Join(addr, denom)) if err != nil { - return sdk.NewCoin(denom, sdk.ZeroInt()) + return sdk.NewCoin(denom, math.ZeroInt()) } return sdk.NewCoin(denom, amt) } @@ -160,7 +156,7 @@ func (k BaseViewKeeper) IterateAccountBalances(ctx context.Context, addr sdk.Acc err := k.Balances.Walk(ctx, collections.NewPrefixedPairRange[sdk.AccAddress, string](addr), func(key collections.Pair[sdk.AccAddress, string], value math.Int) (stop bool, err error) { return cb(sdk.NewCoin(key.K2(), value)), nil }) - if err != nil && !errors.Is(err, collections.ErrInvalidIterator) { + if err != nil { panic(err) } } @@ -172,7 +168,7 @@ func (k BaseViewKeeper) IterateAllBalances(ctx context.Context, cb func(sdk.AccA err := k.Balances.Walk(ctx, nil, func(key collections.Pair[sdk.AccAddress, string], value math.Int) (stop bool, err error) { return cb(key.K1(), sdk.NewCoin(key.K2(), value)), nil }) - if err != nil && !errors.Is(err, collections.ErrInvalidIterator) { + if err != nil { panic(err) } } diff --git a/x/bank/migrations/v1/types.go b/x/bank/migrations/v1/types.go index a584be926d3b..851f7e317a95 100644 --- a/x/bank/migrations/v1/types.go +++ b/x/bank/migrations/v1/types.go @@ -1,12 +1,13 @@ package v1 import ( + "github.com/golang/protobuf/proto" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/kv" v1auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v1" "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/golang/protobuf/proto" ) const ( diff --git a/x/bank/migrations/v2/json_test.go b/x/bank/migrations/v2/json_test.go index bdf20dacded0..99984fb9c956 100644 --- a/x/bank/migrations/v2/json_test.go +++ b/x/bank/migrations/v2/json_test.go @@ -4,9 +4,10 @@ import ( "encoding/json" "testing" - sdkmath "cosmossdk.io/math" "github.com/stretchr/testify/require" + sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" diff --git a/x/bank/migrations/v2/store_test.go b/x/bank/migrations/v2/store_test.go index 017f4174f9a5..bb6c11900eb2 100644 --- a/x/bank/migrations/v2/store_test.go +++ b/x/bank/migrations/v2/store_test.go @@ -3,9 +3,9 @@ package v2_test import ( "testing" - "cosmossdk.io/math" "github.com/stretchr/testify/require" + "cosmossdk.io/math" "cosmossdk.io/store/prefix" storetypes "cosmossdk.io/store/types" diff --git a/x/bank/migrations/v3/store_test.go b/x/bank/migrations/v3/store_test.go index 35323cad5f7d..a8184f75b4a3 100644 --- a/x/bank/migrations/v3/store_test.go +++ b/x/bank/migrations/v3/store_test.go @@ -3,9 +3,9 @@ package v3_test import ( "testing" - "cosmossdk.io/math" "github.com/stretchr/testify/require" + "cosmossdk.io/math" "cosmossdk.io/store/prefix" storetypes "cosmossdk.io/store/types" diff --git a/x/bank/migrations/v4/gen_state_test.go b/x/bank/migrations/v4/gen_state_test.go index 324216e260a5..1283e65b7842 100644 --- a/x/bank/migrations/v4/gen_state_test.go +++ b/x/bank/migrations/v4/gen_state_test.go @@ -3,9 +3,10 @@ package v4_test import ( "testing" - sdkmath "cosmossdk.io/math" "github.com/stretchr/testify/assert" + sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" v4 "github.com/cosmos/cosmos-sdk/x/bank/migrations/v4" "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -155,6 +156,6 @@ func TestMigrateGenState(t *testing.T) { }, } _ = v4.MigrateGenState(&origState) - assert.Len(t, origState.Params.SendEnabled, 2) + assert.Len(t, origState.Params.SendEnabled, 2) //nolint:staticcheck // keep for test (linter sometimes fails) }) } diff --git a/x/bank/migrations/v4/store.go b/x/bank/migrations/v4/store.go index f7327daab06e..675ff785a65c 100644 --- a/x/bank/migrations/v4/store.go +++ b/x/bank/migrations/v4/store.go @@ -21,6 +21,9 @@ func MigrateStore(ctx sdk.Context, storeService store.KVStoreService, legacySubs var currParams types.Params legacySubspace.GetParamSet(ctx, &currParams) + // SendEnabled is migrated to the x/bank module store, so delete from the params + currParams = types.NewParams(currParams.DefaultSendEnabled) + if err := currParams.Validate(); err != nil { return err } diff --git a/x/bank/migrations/v4/store_test.go b/x/bank/migrations/v4/store_test.go index 68f7bad4b3dc..6bc199f056c4 100644 --- a/x/bank/migrations/v4/store_test.go +++ b/x/bank/migrations/v4/store_test.go @@ -3,9 +3,10 @@ package v4_test import ( "testing" - storetypes "cosmossdk.io/store/types" "github.com/stretchr/testify/require" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" @@ -28,6 +29,8 @@ func (ms mockSubspace) GetParamSet(ctx sdk.Context, ps exported.ParamSet) { *ps.(*types.Params) = ms.ps } +func (ms mockSubspace) Get(ctx sdk.Context, key []byte, ptr interface{}) {} + func TestMigrate(t *testing.T) { encCfg := moduletestutil.MakeTestEncodingConfig(bank.AppModuleBasic{}) cdc := encCfg.Codec diff --git a/x/bank/module.go b/x/bank/module.go index ca201365d034..abf0e4d9ef94 100644 --- a/x/bank/module.go +++ b/x/bank/module.go @@ -4,23 +4,22 @@ import ( "context" "encoding/json" "fmt" - "time" + "sort" + + gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/spf13/cobra" + "golang.org/x/exp/maps" modulev1 "cosmossdk.io/api/cosmos/bank/module/v1" "cosmossdk.io/core/address" "cosmossdk.io/core/appmodule" + corestore "cosmossdk.io/core/store" "cosmossdk.io/depinject" "cosmossdk.io/log" - abci "github.com/cometbft/cometbft/abci/types" - gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/spf13/cobra" - - corestore "cosmossdk.io/core/store" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -38,9 +37,13 @@ import ( const ConsensusVersion = 4 var ( - _ module.AppModule = AppModule{} - _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModuleBasic = AppModule{} _ module.AppModuleSimulation = AppModule{} + _ module.HasGenesis = AppModule{} + _ module.HasServices = AppModule{} + _ module.HasInvariants = AppModule{} + + _ appmodule.AppModule = AppModule{} ) // AppModuleBasic defines the basic application module used by the bank module. @@ -85,11 +88,6 @@ func (ab AppModuleBasic) GetTxCmd() *cobra.Command { return cli.NewTxCmd(ab.ac) } -// GetQueryCmd returns no root query command for the bank module. -func (ab AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.GetQueryCmd(ab.ac) -} - // RegisterInterfaces registers interfaces and implementations of the bank module. func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { types.RegisterInterfaces(registry) @@ -109,8 +107,6 @@ type AppModule struct { legacySubspace exported.Subspace } -var _ appmodule.AppModule = AppModule{} - // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} @@ -146,9 +142,6 @@ func NewAppModule(cdc codec.Codec, keeper keeper.Keeper, accountKeeper types.Acc } } -// Name returns the bank module's name. -func (AppModule) Name() string { return types.ModuleName } - // RegisterInvariants registers the bank module invariants. func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { keeper.RegisterInvariants(ir, am.keeper) @@ -159,14 +152,11 @@ func (AppModule) QuerierRoute() string { return types.RouterKey } // InitGenesis performs genesis initialization for the bank module. It returns // no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { - start := time.Now() +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) { var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) - telemetry.MeasureSince(start, "InitGenesis", "crisis", "unmarshal") am.keeper.InitGenesis(ctx, &genesisState) - return []abci.ValidatorUpdate{} } // ExportGenesis returns the exported genesis state as raw bytes for the bank @@ -206,8 +196,10 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp // App Wiring Setup func init() { - appmodule.Register(&modulev1.Module{}, + appmodule.Register( + &modulev1.Module{}, appmodule.Provide(ProvideModule), + appmodule.Invoke(InvokeSetSendRestrictions), ) } @@ -266,3 +258,39 @@ func ProvideModule(in ModuleInputs) ModuleOutputs { return ModuleOutputs{BankKeeper: bankKeeper, Module: m} } + +func InvokeSetSendRestrictions( + config *modulev1.Module, + keeper keeper.BaseKeeper, + restrictions map[string]types.SendRestrictionFn, +) error { + if config == nil { + return nil + } + + modules := maps.Keys(restrictions) + order := config.RestrictionsOrder + if len(order) == 0 { + order = modules + sort.Strings(order) + } + + if len(order) != len(modules) { + return fmt.Errorf("len(restrictions order: %v) != len(restriction modules: %v)", order, modules) + } + + if len(modules) == 0 { + return nil + } + + for _, module := range order { + restriction, ok := restrictions[module] + if !ok { + return fmt.Errorf("can't find send restriction for module %s", module) + } + + keeper.AppendSendRestriction(restriction) + } + + return nil +} diff --git a/x/bank/simulation/genesis_test.go b/x/bank/simulation/genesis_test.go index 3de14ad2c82b..de0ad2226d96 100644 --- a/x/bank/simulation/genesis_test.go +++ b/x/bank/simulation/genesis_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/require" sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/bank/simulation/operations.go b/x/bank/simulation/operations.go index 33faddd5e853..76dd67f21350 100644 --- a/x/bank/simulation/operations.go +++ b/x/bank/simulation/operations.go @@ -347,7 +347,11 @@ func sendMsgMultiSend( accountNumbers := make([]uint64, len(msg.Inputs)) sequenceNumbers := make([]uint64, len(msg.Inputs)) for i := 0; i < len(msg.Inputs); i++ { - addr := sdk.MustAccAddressFromBech32(msg.Inputs[i].Address) + addr, err := ak.AddressCodec().StringToBytes(msg.Inputs[i].Address) + if err != nil { + panic(err) + } + acc := ak.GetAccount(ctx, addr) accountNumbers[i] = acc.GetAccountNumber() sequenceNumbers[i] = acc.GetSequence() @@ -356,7 +360,11 @@ func sendMsgMultiSend( fees sdk.Coins err error ) - addr := sdk.MustAccAddressFromBech32(msg.Inputs[0].Address) + + addr, err := ak.AddressCodec().StringToBytes(msg.Inputs[0].Address) + if err != nil { + panic(err) + } // feePayer is the first signer, i.e. first input address feePayer := ak.GetAccount(ctx, addr) spendable := bk.SpendableCoins(ctx, feePayer.GetAddress()) diff --git a/x/bank/simulation/operations_test.go b/x/bank/simulation/operations_test.go index 1697c1017a38..e4f5e03a8a03 100644 --- a/x/bank/simulation/operations_test.go +++ b/x/bank/simulation/operations_test.go @@ -4,12 +4,13 @@ import ( "math/rand" "testing" - "cosmossdk.io/depinject" - "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/suite" + "cosmossdk.io/depinject" + "cosmossdk.io/log" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/runtime" diff --git a/x/bank/types/balance_test.go b/x/bank/types/balance_test.go index 0be898e2b9cf..4f735e59545e 100644 --- a/x/bank/types/balance_test.go +++ b/x/bank/types/balance_test.go @@ -3,9 +3,10 @@ package types_test import ( "testing" - "cosmossdk.io/math" "github.com/stretchr/testify/require" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" sdk "github.com/cosmos/cosmos-sdk/types" bank "github.com/cosmos/cosmos-sdk/x/bank/types" diff --git a/x/bank/types/expected_keepers.go b/x/bank/types/expected_keepers.go index 8e6e32301cd3..ebd5eb9a657e 100644 --- a/x/bank/types/expected_keepers.go +++ b/x/bank/types/expected_keepers.go @@ -4,6 +4,7 @@ import ( context "context" "cosmossdk.io/core/address" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/types" ) diff --git a/x/bank/types/genesis_test.go b/x/bank/types/genesis_test.go index 742691b6c7b0..93805ac84b57 100644 --- a/x/bank/types/genesis_test.go +++ b/x/bank/types/genesis_test.go @@ -3,10 +3,11 @@ package types import ( "testing" - "cosmossdk.io/math" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/bank/types/inputs_outputs.go b/x/bank/types/inputs_outputs.go index cca4c039887b..5d98f72a87de 100644 --- a/x/bank/types/inputs_outputs.go +++ b/x/bank/types/inputs_outputs.go @@ -2,6 +2,7 @@ package types import ( errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) diff --git a/x/bank/types/keys.go b/x/bank/types/keys.go index 33c14f5c3892..b4ea683d4b69 100644 --- a/x/bank/types/keys.go +++ b/x/bank/types/keys.go @@ -4,6 +4,7 @@ import ( "cosmossdk.io/collections" collcodec "cosmossdk.io/collections/codec" "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -33,27 +34,13 @@ var ( ParamsKey = collections.NewPrefix(5) ) -// NewBalanceCompatValueCodec is a codec for encoding Balances in a backwards compatible way -// with respect to the old format. -func NewBalanceCompatValueCodec() collcodec.ValueCodec[math.Int] { - return balanceCompatValueCodec{ - sdk.IntValue, - } -} - -type balanceCompatValueCodec struct { - collcodec.ValueCodec[math.Int] -} - -func (v balanceCompatValueCodec) Decode(b []byte) (math.Int, error) { - i, err := v.ValueCodec.Decode(b) - if err == nil { - return i, nil - } +// BalanceValueCodec is a codec for encoding bank balances in a backwards compatible way. +// Historically, balances were represented as Coin, now they're represented as a simple math.Int +var BalanceValueCodec = collcodec.NewAltValueCodec(sdk.IntValue, func(bytes []byte) (math.Int, error) { c := new(sdk.Coin) - err = c.Unmarshal(b) + err := c.Unmarshal(bytes) if err != nil { return math.Int{}, err } return c.Amount, nil -} +}) diff --git a/x/bank/types/keys_test.go b/x/bank/types/keys_test.go index 31aa8aa13e98..fa2c48669b61 100644 --- a/x/bank/types/keys_test.go +++ b/x/bank/types/keys_test.go @@ -3,23 +3,24 @@ package types import ( "testing" + "github.com/stretchr/testify/require" + "cosmossdk.io/collections/colltest" "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/require" ) func TestBalanceValueCodec(t *testing.T) { - c := NewBalanceCompatValueCodec() t.Run("value codec implementation", func(t *testing.T) { - colltest.TestValueCodec(t, c, math.NewInt(100)) + colltest.TestValueCodec(t, BalanceValueCodec, math.NewInt(100)) }) t.Run("legacy coin", func(t *testing.T) { coin := sdk.NewInt64Coin("coin", 1000) b, err := coin.Marshal() require.NoError(t, err) - amt, err := c.Decode(b) + amt, err := BalanceValueCodec.Decode(b) require.NoError(t, err) require.Equal(t, coin.Amount, amt) }) diff --git a/x/bank/types/msgs.go b/x/bank/types/msgs.go index a020fdd47ec9..05a23c280e2b 100644 --- a/x/bank/types/msgs.go +++ b/x/bank/types/msgs.go @@ -15,35 +15,11 @@ func NewMsgSend(fromAddr, toAddr sdk.AccAddress, amount sdk.Coins) *MsgSend { return &MsgSend{FromAddress: fromAddr.String(), ToAddress: toAddr.String(), Amount: amount} } -// GetSigners Implements Msg. -func (msg MsgSend) GetSigners() []sdk.AccAddress { - fromAddress, _ := sdk.AccAddressFromBech32(msg.FromAddress) - return []sdk.AccAddress{fromAddress} -} - // NewMsgMultiSend - construct arbitrary multi-in, multi-out send msg. func NewMsgMultiSend(in Input, out []Output) *MsgMultiSend { return &MsgMultiSend{Inputs: []Input{in}, Outputs: out} } -// GetSigners Implements Msg. -func (msg MsgMultiSend) GetSigners() []sdk.AccAddress { - // should not happen as ValidateBasic would have failed - if len(msg.Inputs) == 0 { - return nil - } - - addrs, _ := sdk.AccAddressFromBech32(msg.Inputs[0].Address) - return []sdk.AccAddress{addrs} -} - -// GetSigners returns the signer addresses that are expected to sign the result -// of GetSignBytes. -func (msg MsgUpdateParams) GetSigners() []sdk.AccAddress { - authority, _ := sdk.AccAddressFromBech32(msg.Authority) - return []sdk.AccAddress{authority} -} - // NewMsgSetSendEnabled Construct a message to set one or more SendEnabled entries. func NewMsgSetSendEnabled(authority string, sendEnabled []*SendEnabled, useDefaultFor []string) *MsgSetSendEnabled { return &MsgSetSendEnabled{ @@ -52,9 +28,3 @@ func NewMsgSetSendEnabled(authority string, sendEnabled []*SendEnabled, useDefau UseDefaultFor: useDefaultFor, } } - -// GetSigners returns the expected signers for MsgSoftwareUpgrade. -func (msg MsgSetSendEnabled) GetSigners() []sdk.AccAddress { - addr, _ := sdk.AccAddressFromBech32(msg.Authority) - return []sdk.AccAddress{addr} -} diff --git a/x/bank/types/msgs_test.go b/x/bank/types/msgs_test.go index 50c7a7f7aec7..98fc399b67c6 100644 --- a/x/bank/types/msgs_test.go +++ b/x/bank/types/msgs_test.go @@ -9,8 +9,6 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" ) func TestMsgSendGetSignBytes(t *testing.T) { @@ -122,16 +120,6 @@ func TestMsgMultiSendGetSignBytes(t *testing.T) { require.Equal(t, expected, string(res)) } -func TestMsgMultiSendGetSigners(t *testing.T) { - addr := sdk.AccAddress([]byte("input111111111111111")) - input := NewInput(addr, nil) - msg := NewMsgMultiSend(input, nil) - - res := msg.GetSigners() - require.Equal(t, 1, len(res)) - require.True(t, addr.Equals(res[0])) -} - func TestNewMsgSetSendEnabled(t *testing.T) { // Punt. Just setting one to all non-default values and making sure they're as expected. msg := NewMsgSetSendEnabled("milton", []*SendEnabled{{"barrycoin", true}}, []string{"billcoin"}) @@ -145,14 +133,6 @@ func TestNewMsgSetSendEnabled(t *testing.T) { } } -func TestMsgSendGetSigners(t *testing.T) { - from := sdk.AccAddress([]byte("input111111111111111")) - msg := NewMsgSend(from, sdk.AccAddress{}, sdk.NewCoins()) - res := msg.GetSigners() - require.Equal(t, 1, len(res)) - require.True(t, from.Equals(res[0])) -} - func TestMsgSetSendEnabledGetSignBytes(t *testing.T) { msg := NewMsgSetSendEnabled("cartman", []*SendEnabled{{"casafiestacoin", false}, {"kylecoin", true}}, nil) expected := `{"type":"cosmos-sdk/MsgSetSendEnabled","value":{"authority":"cartman","send_enabled":[{"denom":"casafiestacoin"},{"denom":"kylecoin","enabled":true}]}}` @@ -161,11 +141,3 @@ func TestMsgSetSendEnabledGetSignBytes(t *testing.T) { actual := string(actualBz) assert.Equal(t, expected, actual) } - -func TestMsgSetSendEnabledGetSigners(t *testing.T) { - govModuleAddr := authtypes.NewModuleAddress(govtypes.ModuleName) - msg := NewMsgSetSendEnabled(govModuleAddr.String(), nil, nil) - expected := []sdk.AccAddress{govModuleAddr} - actual := msg.GetSigners() - assert.Equal(t, expected, actual) -} diff --git a/x/bank/types/params_legacy.go b/x/bank/types/params_legacy.go index 668358b4df7a..6f6a25a06999 100644 --- a/x/bank/types/params_legacy.go +++ b/x/bank/types/params_legacy.go @@ -1,6 +1,12 @@ package types -import paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" +import ( + fmt "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/bank/exported" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" +) var ( // KeySendEnabled is store's key for SendEnabled Params @@ -18,6 +24,44 @@ func ParamKeyTable() paramtypes.KeyTable { // Deprecated: ParamSetPairs implements params.ParamSet func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { return paramtypes.ParamSetPairs{ + paramtypes.NewParamSetPair(KeySendEnabled, &p.SendEnabled, validateSendEnabledParams), paramtypes.NewParamSetPair(KeyDefaultSendEnabled, &p.DefaultSendEnabled, validateIsBool), } } + +// SendEnabledParams is a collection of parameters indicating if a coin denom is enabled for sending +type SendEnabledParams []*SendEnabled + +// GetSendEnabledParams retrieves the send enabled parameters from the provided context and legacy subspace. +func GetSendEnabledParams(ctx sdk.Context, legacySubspace exported.Subspace) []*SendEnabled { + var sendEnabled []*SendEnabled + legacySubspace.Get(ctx, KeySendEnabled, &sendEnabled) + return sendEnabled +} + +func validateSendEnabledParams(i interface{}) error { + params, ok := i.([]*SendEnabled) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + // ensure each denom is only registered one time. + registered := make(map[string]bool) + for _, p := range params { + if _, exists := registered[p.Denom]; exists { + return fmt.Errorf("duplicate send enabled parameter found: '%s'", p.Denom) + } + if err := validateSendEnabled(*p); err != nil { + return err + } + registered[p.Denom] = true + } + return nil +} + +func validateSendEnabled(i interface{}) error { + param, ok := i.(SendEnabled) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + return sdk.ValidateDenom(param.Denom) +} diff --git a/x/bank/types/query.pb.go b/x/bank/types/query.pb.go index 5c040434c93a..7ad551138110 100644 --- a/x/bank/types/query.pb.go +++ b/x/bank/types/query.pb.go @@ -648,6 +648,7 @@ var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo // QueryParamsResponse defines the response type for querying x/bank parameters. type QueryParamsResponse struct { + // params provides the parameters of the bank module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` } @@ -886,6 +887,104 @@ func (m *QueryDenomMetadataResponse) GetMetadata() Metadata { return Metadata{} } +// QueryDenomMetadataByQueryStringRequest is the request type for the Query/DenomMetadata RPC method. +// Identical with QueryDenomMetadataRequest but receives denom as query string. +type QueryDenomMetadataByQueryStringRequest struct { + // denom is the coin denom to query the metadata for. + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *QueryDenomMetadataByQueryStringRequest) Reset() { + *m = QueryDenomMetadataByQueryStringRequest{} +} +func (m *QueryDenomMetadataByQueryStringRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDenomMetadataByQueryStringRequest) ProtoMessage() {} +func (*QueryDenomMetadataByQueryStringRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9c6fc1939682df13, []int{18} +} +func (m *QueryDenomMetadataByQueryStringRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDenomMetadataByQueryStringRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDenomMetadataByQueryStringRequest.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 *QueryDenomMetadataByQueryStringRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDenomMetadataByQueryStringRequest.Merge(m, src) +} +func (m *QueryDenomMetadataByQueryStringRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDenomMetadataByQueryStringRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDenomMetadataByQueryStringRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDenomMetadataByQueryStringRequest proto.InternalMessageInfo + +func (m *QueryDenomMetadataByQueryStringRequest) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +// QueryDenomMetadataByQueryStringResponse is the response type for the Query/DenomMetadata RPC +// method. Identical with QueryDenomMetadataResponse but receives denom as query string in request. +type QueryDenomMetadataByQueryStringResponse struct { + // metadata describes and provides all the client information for the requested token. + Metadata Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata"` +} + +func (m *QueryDenomMetadataByQueryStringResponse) Reset() { + *m = QueryDenomMetadataByQueryStringResponse{} +} +func (m *QueryDenomMetadataByQueryStringResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDenomMetadataByQueryStringResponse) ProtoMessage() {} +func (*QueryDenomMetadataByQueryStringResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9c6fc1939682df13, []int{19} +} +func (m *QueryDenomMetadataByQueryStringResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDenomMetadataByQueryStringResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDenomMetadataByQueryStringResponse.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 *QueryDenomMetadataByQueryStringResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDenomMetadataByQueryStringResponse.Merge(m, src) +} +func (m *QueryDenomMetadataByQueryStringResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDenomMetadataByQueryStringResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDenomMetadataByQueryStringResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDenomMetadataByQueryStringResponse proto.InternalMessageInfo + +func (m *QueryDenomMetadataByQueryStringResponse) GetMetadata() Metadata { + if m != nil { + return m.Metadata + } + return Metadata{} +} + // QueryDenomOwnersRequest defines the request type for the DenomOwners RPC query, // which queries for a paginated set of all account holders of a particular // denomination. @@ -900,7 +999,7 @@ func (m *QueryDenomOwnersRequest) Reset() { *m = QueryDenomOwnersRequest func (m *QueryDenomOwnersRequest) String() string { return proto.CompactTextString(m) } func (*QueryDenomOwnersRequest) ProtoMessage() {} func (*QueryDenomOwnersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9c6fc1939682df13, []int{18} + return fileDescriptor_9c6fc1939682df13, []int{20} } func (m *QueryDenomOwnersRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -959,7 +1058,7 @@ func (m *DenomOwner) Reset() { *m = DenomOwner{} } func (m *DenomOwner) String() string { return proto.CompactTextString(m) } func (*DenomOwner) ProtoMessage() {} func (*DenomOwner) Descriptor() ([]byte, []int) { - return fileDescriptor_9c6fc1939682df13, []int{19} + return fileDescriptor_9c6fc1939682df13, []int{21} } func (m *DenomOwner) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1015,7 +1114,7 @@ func (m *QueryDenomOwnersResponse) Reset() { *m = QueryDenomOwnersRespon func (m *QueryDenomOwnersResponse) String() string { return proto.CompactTextString(m) } func (*QueryDenomOwnersResponse) ProtoMessage() {} func (*QueryDenomOwnersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9c6fc1939682df13, []int{20} + return fileDescriptor_9c6fc1939682df13, []int{22} } func (m *QueryDenomOwnersResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1058,6 +1157,121 @@ func (m *QueryDenomOwnersResponse) GetPagination() *query.PageResponse { return nil } +// QueryDenomOwnersByQueryRequest defines the request type for the DenomOwnersByQuery RPC query, +// which queries for a paginated set of all account holders of a particular +// denomination. +// +// Since: cosmos-sdk 0.50.3 +type QueryDenomOwnersByQueryRequest struct { + // denom defines the coin denomination to query all account holders for. + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryDenomOwnersByQueryRequest) Reset() { *m = QueryDenomOwnersByQueryRequest{} } +func (m *QueryDenomOwnersByQueryRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDenomOwnersByQueryRequest) ProtoMessage() {} +func (*QueryDenomOwnersByQueryRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9c6fc1939682df13, []int{23} +} +func (m *QueryDenomOwnersByQueryRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDenomOwnersByQueryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDenomOwnersByQueryRequest.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 *QueryDenomOwnersByQueryRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDenomOwnersByQueryRequest.Merge(m, src) +} +func (m *QueryDenomOwnersByQueryRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDenomOwnersByQueryRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDenomOwnersByQueryRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDenomOwnersByQueryRequest proto.InternalMessageInfo + +func (m *QueryDenomOwnersByQueryRequest) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *QueryDenomOwnersByQueryRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryDenomOwnersByQueryResponse defines the RPC response of a DenomOwnersByQuery RPC query. +// +// Since: cosmos-sdk 0.50.3 +type QueryDenomOwnersByQueryResponse struct { + DenomOwners []*DenomOwner `protobuf:"bytes,1,rep,name=denom_owners,json=denomOwners,proto3" json:"denom_owners,omitempty"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryDenomOwnersByQueryResponse) Reset() { *m = QueryDenomOwnersByQueryResponse{} } +func (m *QueryDenomOwnersByQueryResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDenomOwnersByQueryResponse) ProtoMessage() {} +func (*QueryDenomOwnersByQueryResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9c6fc1939682df13, []int{24} +} +func (m *QueryDenomOwnersByQueryResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDenomOwnersByQueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDenomOwnersByQueryResponse.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 *QueryDenomOwnersByQueryResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDenomOwnersByQueryResponse.Merge(m, src) +} +func (m *QueryDenomOwnersByQueryResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDenomOwnersByQueryResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDenomOwnersByQueryResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDenomOwnersByQueryResponse proto.InternalMessageInfo + +func (m *QueryDenomOwnersByQueryResponse) GetDenomOwners() []*DenomOwner { + if m != nil { + return m.DenomOwners + } + return nil +} + +func (m *QueryDenomOwnersByQueryResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + // QuerySendEnabledRequest defines the RPC request for looking up SendEnabled entries. // // Since: cosmos-sdk 0.47 @@ -1073,7 +1287,7 @@ func (m *QuerySendEnabledRequest) Reset() { *m = QuerySendEnabledRequest func (m *QuerySendEnabledRequest) String() string { return proto.CompactTextString(m) } func (*QuerySendEnabledRequest) ProtoMessage() {} func (*QuerySendEnabledRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9c6fc1939682df13, []int{21} + return fileDescriptor_9c6fc1939682df13, []int{25} } func (m *QuerySendEnabledRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1130,7 +1344,7 @@ func (m *QuerySendEnabledResponse) Reset() { *m = QuerySendEnabledRespon func (m *QuerySendEnabledResponse) String() string { return proto.CompactTextString(m) } func (*QuerySendEnabledResponse) ProtoMessage() {} func (*QuerySendEnabledResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9c6fc1939682df13, []int{22} + return fileDescriptor_9c6fc1939682df13, []int{26} } func (m *QuerySendEnabledResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1192,9 +1406,13 @@ func init() { proto.RegisterType((*QueryDenomsMetadataResponse)(nil), "cosmos.bank.v1beta1.QueryDenomsMetadataResponse") proto.RegisterType((*QueryDenomMetadataRequest)(nil), "cosmos.bank.v1beta1.QueryDenomMetadataRequest") proto.RegisterType((*QueryDenomMetadataResponse)(nil), "cosmos.bank.v1beta1.QueryDenomMetadataResponse") + proto.RegisterType((*QueryDenomMetadataByQueryStringRequest)(nil), "cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest") + proto.RegisterType((*QueryDenomMetadataByQueryStringResponse)(nil), "cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse") proto.RegisterType((*QueryDenomOwnersRequest)(nil), "cosmos.bank.v1beta1.QueryDenomOwnersRequest") proto.RegisterType((*DenomOwner)(nil), "cosmos.bank.v1beta1.DenomOwner") proto.RegisterType((*QueryDenomOwnersResponse)(nil), "cosmos.bank.v1beta1.QueryDenomOwnersResponse") + proto.RegisterType((*QueryDenomOwnersByQueryRequest)(nil), "cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest") + proto.RegisterType((*QueryDenomOwnersByQueryResponse)(nil), "cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse") proto.RegisterType((*QuerySendEnabledRequest)(nil), "cosmos.bank.v1beta1.QuerySendEnabledRequest") proto.RegisterType((*QuerySendEnabledResponse)(nil), "cosmos.bank.v1beta1.QuerySendEnabledResponse") } @@ -1202,84 +1420,91 @@ func init() { func init() { proto.RegisterFile("cosmos/bank/v1beta1/query.proto", fileDescriptor_9c6fc1939682df13) } var fileDescriptor_9c6fc1939682df13 = []byte{ - // 1225 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xf6, 0xa4, 0xaa, 0x93, 0x3c, 0xa7, 0x95, 0x3a, 0x0d, 0x34, 0xd9, 0x10, 0x3b, 0x6c, 0xaa, - 0xc6, 0x09, 0xc9, 0x6e, 0xe3, 0x20, 0x44, 0xab, 0x12, 0xa9, 0x4e, 0x49, 0x0f, 0x08, 0xb5, 0x38, - 0xf4, 0x02, 0x07, 0x6b, 0xed, 0x1d, 0x8c, 0x15, 0x7b, 0xd7, 0xf5, 0xac, 0x5b, 0xac, 0x2a, 0x12, - 0x42, 0x42, 0xea, 0x11, 0x89, 0x9e, 0x2a, 0x21, 0x45, 0x48, 0x40, 0x05, 0x12, 0xaa, 0x10, 0x47, - 0x8e, 0x1c, 0x7a, 0xac, 0xe0, 0x00, 0xa7, 0x82, 0x12, 0xa4, 0xf6, 0xcf, 0x40, 0x9e, 0x1f, 0xde, - 0x5d, 0x7b, 0xbc, 0xd9, 0xa4, 0x06, 0x21, 0x2e, 0xad, 0x3d, 0xf3, 0xde, 0xbc, 0xef, 0x7d, 0xef, - 0xcd, 0xbc, 0xcf, 0x81, 0x4c, 0xd9, 0xa5, 0x75, 0x97, 0x9a, 0x25, 0xcb, 0xd9, 0x36, 0x6f, 0xad, - 0x96, 0x88, 0x67, 0xad, 0x9a, 0x37, 0x5b, 0xa4, 0xd9, 0x36, 0x1a, 0x4d, 0xd7, 0x73, 0xf1, 0x69, - 0x6e, 0x60, 0x74, 0x0c, 0x0c, 0x61, 0xa0, 0x2d, 0x75, 0xbd, 0x28, 0xe1, 0xd6, 0x5d, 0xdf, 0x86, - 0x55, 0xa9, 0x3a, 0x96, 0x57, 0x75, 0x1d, 0x7e, 0x80, 0x36, 0x59, 0x71, 0x2b, 0x2e, 0xfb, 0x68, - 0x76, 0x3e, 0x89, 0xd5, 0x97, 0x2a, 0xae, 0x5b, 0xa9, 0x11, 0xd3, 0x6a, 0x54, 0x4d, 0xcb, 0x71, - 0x5c, 0x8f, 0xb9, 0x50, 0xb1, 0x9b, 0x0e, 0x9e, 0x2f, 0x4f, 0x2e, 0xbb, 0x55, 0xa7, 0x6f, 0x3f, - 0x80, 0x9a, 0x21, 0xe4, 0xfb, 0xd3, 0x7c, 0xbf, 0xc8, 0xc3, 0x8a, 0x0c, 0xf8, 0xd6, 0x8c, 0x70, - 0x95, 0xa8, 0x83, 0xc9, 0x6a, 0xa7, 0xac, 0x7a, 0xd5, 0x71, 0x4d, 0xf6, 0x2f, 0x5f, 0xd2, 0xab, - 0x70, 0xfa, 0x9d, 0x8e, 0x45, 0xde, 0xaa, 0x59, 0x4e, 0x99, 0x14, 0xc8, 0xcd, 0x16, 0xa1, 0x1e, - 0xce, 0xc1, 0xa8, 0x65, 0xdb, 0x4d, 0x42, 0xe9, 0x14, 0x9a, 0x43, 0xd9, 0xf1, 0xfc, 0xd4, 0x2f, - 0x3f, 0xae, 0x4c, 0x8a, 0x48, 0x97, 0xf9, 0xce, 0x96, 0xd7, 0xac, 0x3a, 0x95, 0x82, 0x34, 0xc4, - 0x93, 0x70, 0xdc, 0x26, 0x8e, 0x5b, 0x9f, 0x1a, 0xe9, 0x78, 0x14, 0xf8, 0x97, 0x8b, 0x63, 0x77, - 0x77, 0x33, 0x89, 0x67, 0xbb, 0x99, 0x84, 0xfe, 0x16, 0x4c, 0x86, 0x43, 0xd1, 0x86, 0xeb, 0x50, - 0x82, 0xd7, 0x60, 0xb4, 0xc4, 0x97, 0x58, 0xac, 0x54, 0x6e, 0xda, 0xe8, 0x16, 0x85, 0x12, 0x59, - 0x14, 0x63, 0xc3, 0xad, 0x3a, 0x05, 0x69, 0xa9, 0xff, 0x8c, 0xe0, 0x0c, 0x3b, 0xed, 0x72, 0xad, - 0x26, 0x0e, 0xa4, 0xcf, 0x03, 0x7e, 0x13, 0xc0, 0x2f, 0x2d, 0xcb, 0x20, 0x95, 0x3b, 0x17, 0xc2, - 0xc1, 0x89, 0x94, 0x68, 0xae, 0x5b, 0x15, 0x49, 0x56, 0x21, 0xe0, 0x89, 0xe7, 0xe1, 0x44, 0x93, - 0x50, 0xb7, 0x76, 0x8b, 0x14, 0x39, 0x19, 0xc7, 0xe6, 0x50, 0x76, 0xac, 0x30, 0x21, 0x16, 0xaf, - 0xf4, 0x70, 0xb2, 0x87, 0x60, 0xaa, 0x3f, 0x0d, 0x41, 0xcc, 0x0e, 0x8c, 0x89, 0x74, 0x3b, 0x89, - 0x1c, 0x8b, 0x64, 0x26, 0xbf, 0xf9, 0xe8, 0x49, 0x26, 0xf1, 0xed, 0x1f, 0x99, 0x6c, 0xa5, 0xea, - 0x7d, 0xd8, 0x2a, 0x19, 0x65, 0xb7, 0x2e, 0x3a, 0x43, 0xfc, 0xb7, 0x42, 0xed, 0x6d, 0xd3, 0x6b, - 0x37, 0x08, 0x65, 0x0e, 0xf4, 0xfe, 0xd3, 0x87, 0x4b, 0x13, 0x35, 0x52, 0xb1, 0xca, 0xed, 0x62, - 0xa7, 0xf7, 0xe8, 0x83, 0xa7, 0x0f, 0x97, 0x50, 0xa1, 0x1b, 0x12, 0x5f, 0x55, 0x50, 0xb2, 0x70, - 0x20, 0x25, 0x1c, 0x7b, 0x90, 0x13, 0xfd, 0x2b, 0x04, 0xb3, 0x2c, 0xc9, 0xad, 0x06, 0x71, 0x6c, - 0xab, 0x54, 0x23, 0xff, 0xa1, 0x8a, 0x05, 0x8a, 0xf1, 0x0c, 0x41, 0x7a, 0x10, 0xce, 0xff, 0x59, - 0x49, 0xda, 0x30, 0xaf, 0xcc, 0x34, 0xdf, 0x66, 0x1d, 0xfa, 0x4f, 0x3e, 0x03, 0xef, 0xc3, 0xd9, - 0xe8, 0xd0, 0xcf, 0xf3, 0x2c, 0x6c, 0x8b, 0x57, 0xe1, 0x5d, 0xd7, 0xb3, 0x6a, 0x5b, 0xad, 0x46, - 0xa3, 0xd6, 0x96, 0xb9, 0x84, 0xfb, 0x05, 0x0d, 0xa1, 0x5f, 0x9e, 0xc8, 0xcb, 0x1b, 0x8a, 0x26, - 0xe0, 0xb7, 0x21, 0x49, 0xd9, 0xca, 0xbf, 0xd7, 0x27, 0x22, 0xe0, 0xf0, 0xba, 0x64, 0x59, 0xbc, - 0xd8, 0x3c, 0xb5, 0x6b, 0x1f, 0x48, 0x2a, 0xbb, 0x25, 0x46, 0x81, 0x12, 0xeb, 0x37, 0xe0, 0x85, - 0x1e, 0x6b, 0x41, 0xc5, 0x25, 0x48, 0x5a, 0x75, 0xb7, 0xe5, 0x78, 0x07, 0x16, 0x32, 0x3f, 0xde, - 0xa1, 0x42, 0x64, 0xc3, 0x7d, 0xf4, 0x49, 0xc0, 0xec, 0xd8, 0xeb, 0x56, 0xd3, 0xaa, 0xcb, 0x17, - 0x43, 0xbf, 0x21, 0xe6, 0x96, 0x5c, 0x15, 0xa1, 0xd6, 0x21, 0xd9, 0x60, 0x2b, 0x22, 0xd4, 0x8c, - 0xa1, 0x98, 0xef, 0x06, 0x77, 0x0a, 0x05, 0xe3, 0x5e, 0xba, 0x0d, 0x1a, 0x3b, 0x96, 0xb5, 0x22, - 0x7d, 0x9b, 0x78, 0x96, 0x6d, 0x79, 0xd6, 0x90, 0x5b, 0x48, 0xff, 0x1e, 0xc1, 0x8c, 0x32, 0x8c, - 0xc8, 0x62, 0x13, 0xc6, 0xeb, 0x62, 0x4d, 0x3e, 0x33, 0xb3, 0xca, 0x44, 0xa4, 0x67, 0x30, 0x15, - 0xdf, 0x75, 0x78, 0x8d, 0xb0, 0x0a, 0xd3, 0x3e, 0xde, 0x5e, 0x56, 0xd4, 0xdd, 0x50, 0x0a, 0x32, - 0xd9, 0x97, 0xe1, 0x15, 0x18, 0x93, 0x30, 0x05, 0x8f, 0xf1, 0x13, 0xec, 0x7a, 0xea, 0xb7, 0xc5, - 0x6d, 0x67, 0x31, 0xae, 0xdd, 0x76, 0x48, 0x93, 0x46, 0x82, 0x1a, 0xd6, 0xcc, 0xd0, 0x3f, 0x46, - 0x00, 0x7e, 0xd0, 0x23, 0x3d, 0x93, 0xeb, 0xfe, 0xf3, 0x36, 0x72, 0x88, 0x5b, 0xd1, 0x7d, 0xe9, - 0xbe, 0x91, 0x8f, 0x4f, 0x28, 0x79, 0x41, 0x6f, 0x1e, 0x26, 0x58, 0xc2, 0x45, 0x97, 0xad, 0x8b, - 0x1e, 0xca, 0x28, 0x29, 0xf6, 0xfd, 0x0b, 0x29, 0xdb, 0x3f, 0x6b, 0x98, 0xb3, 0x86, 0x57, 0x69, - 0x8b, 0x38, 0xf6, 0x9b, 0x4e, 0xe7, 0xc5, 0xb7, 0x65, 0x95, 0x5e, 0x84, 0x24, 0x0b, 0xc9, 0x11, - 0x8e, 0x17, 0xc4, 0xb7, 0x9e, 0x3a, 0x95, 0x8f, 0x5c, 0xa7, 0x07, 0x92, 0xa4, 0x50, 0x6c, 0x41, - 0xd2, 0x06, 0x4c, 0x50, 0xe2, 0xd8, 0x45, 0xc2, 0xd7, 0x05, 0x49, 0x73, 0x4a, 0x92, 0x82, 0xfe, - 0x29, 0xea, 0x7f, 0xe9, 0x61, 0xa9, 0x7c, 0x64, 0x96, 0x72, 0x3f, 0x9c, 0x84, 0xe3, 0x0c, 0x2a, - 0xfe, 0x02, 0xc1, 0xa8, 0x98, 0x89, 0x38, 0xab, 0x44, 0xa3, 0x50, 0xec, 0xda, 0x62, 0x0c, 0x4b, - 0x1e, 0x56, 0x7f, 0xe3, 0x6e, 0xa7, 0x95, 0x3e, 0xf9, 0xf5, 0xaf, 0xcf, 0x47, 0x72, 0xf8, 0xbc, - 0xa9, 0xfe, 0xb1, 0xc1, 0x15, 0x87, 0x79, 0x47, 0xf4, 0xeb, 0x8e, 0x59, 0x6a, 0x73, 0x45, 0x8b, - 0x77, 0x11, 0xa4, 0x02, 0x72, 0x15, 0x2f, 0x0f, 0x8e, 0xdc, 0x2f, 0xce, 0xb5, 0x95, 0x98, 0xd6, - 0x02, 0xeb, 0xab, 0x3e, 0xd6, 0x45, 0xbc, 0x10, 0x13, 0x2b, 0xfe, 0x09, 0xc1, 0xa9, 0x3e, 0x11, - 0x87, 0x73, 0x83, 0x43, 0x0f, 0x52, 0xa6, 0xda, 0xda, 0xa1, 0x7c, 0x04, 0xe8, 0x75, 0x1f, 0xf4, - 0x1a, 0x5e, 0x55, 0x82, 0xa6, 0xd2, 0xb9, 0xa8, 0x80, 0xff, 0x1b, 0x82, 0x33, 0x03, 0xe4, 0x11, - 0x7e, 0x3d, 0x3e, 0xa0, 0xb0, 0x98, 0xd3, 0x2e, 0x1c, 0xc1, 0x53, 0x24, 0x74, 0xd5, 0x4f, 0xe8, - 0x12, 0xbe, 0x78, 0xe8, 0x84, 0xfc, 0xde, 0xb9, 0x87, 0x20, 0x15, 0x50, 0x4b, 0x51, 0xbd, 0xd3, - 0x2f, 0xe1, 0xa2, 0x7a, 0x47, 0x21, 0xc1, 0xf4, 0xac, 0x8f, 0x7a, 0x16, 0xcf, 0xa8, 0x51, 0x73, - 0x18, 0xf7, 0x10, 0x8c, 0x49, 0xd9, 0x82, 0x23, 0x6e, 0x52, 0x8f, 0x10, 0xd2, 0x96, 0xe2, 0x98, - 0x0a, 0x34, 0xab, 0x3e, 0x9a, 0x73, 0xf8, 0x6c, 0x04, 0x1a, 0x9f, 0xad, 0x4f, 0x11, 0x24, 0xb9, - 0x56, 0xc1, 0x0b, 0x83, 0x23, 0x85, 0x84, 0x91, 0x96, 0x3d, 0xd8, 0x30, 0x3e, 0x3d, 0x5c, 0x15, - 0xe1, 0xef, 0x10, 0x9c, 0x08, 0xcd, 0x71, 0x6c, 0x0c, 0x8e, 0xa2, 0xd2, 0x08, 0x9a, 0x19, 0xdb, - 0x5e, 0x80, 0xbb, 0xe0, 0x83, 0x33, 0xf0, 0xb2, 0x12, 0x1c, 0x9f, 0x15, 0x45, 0xa9, 0x06, 0xcc, - 0x3b, 0x6c, 0x61, 0x07, 0x7f, 0x8d, 0xe0, 0x64, 0x58, 0x58, 0xe1, 0x83, 0xc2, 0xf7, 0x2a, 0x3d, - 0xed, 0x7c, 0x7c, 0x87, 0xf8, 0xe5, 0xed, 0x01, 0x8c, 0xbf, 0x44, 0x90, 0x0a, 0x4c, 0xef, 0xa8, - 0xcb, 0xd0, 0xaf, 0x70, 0xa2, 0x2e, 0x83, 0x42, 0x12, 0xe8, 0xaf, 0xf9, 0xf8, 0x5e, 0xc1, 0x8b, - 0x83, 0xf1, 0x09, 0xc9, 0xd0, 0x65, 0xf3, 0x3e, 0x82, 0x54, 0x60, 0xfa, 0x45, 0x81, 0xec, 0x1f, - 0xf0, 0x51, 0x20, 0x15, 0x23, 0x59, 0x37, 0x7c, 0x90, 0xf3, 0xf8, 0x65, 0xf5, 0x1d, 0x09, 0x8c, - 0xec, 0xfc, 0xc6, 0xa3, 0xbd, 0x34, 0x7a, 0xbc, 0x97, 0x46, 0x7f, 0xee, 0xa5, 0xd1, 0x67, 0xfb, - 0xe9, 0xc4, 0xe3, 0xfd, 0x74, 0xe2, 0xf7, 0xfd, 0x74, 0xe2, 0xbd, 0xc5, 0xc8, 0xdf, 0x52, 0x1f, - 0xf1, 0x33, 0xd9, 0x4f, 0xaa, 0x52, 0x92, 0xfd, 0x25, 0x6c, 0xed, 0xef, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x71, 0x4c, 0x05, 0x91, 0x2c, 0x14, 0x00, 0x00, + // 1336 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x41, 0x6f, 0x1b, 0x45, + 0x14, 0xf6, 0xa4, 0xaa, 0x93, 0x3c, 0xa7, 0x48, 0x99, 0x06, 0x9a, 0x6c, 0x88, 0x1d, 0x36, 0x55, + 0xe2, 0x84, 0x64, 0xb7, 0x71, 0xa2, 0x42, 0x4b, 0x88, 0x14, 0xa7, 0xa4, 0x07, 0x84, 0x5a, 0x1c, + 0x7a, 0x81, 0x83, 0xb5, 0xf6, 0x0e, 0xc6, 0x8a, 0xbd, 0xeb, 0x7a, 0x36, 0x2d, 0xab, 0x2a, 0x08, + 0x21, 0x21, 0xf5, 0x88, 0x44, 0x4f, 0x95, 0x90, 0x22, 0x24, 0xa0, 0x02, 0xa9, 0xea, 0x81, 0x03, + 0x07, 0x8e, 0x1c, 0x2a, 0x4e, 0x15, 0x1c, 0x40, 0x1c, 0x0a, 0x4a, 0x90, 0xda, 0x9f, 0x81, 0x3c, + 0x33, 0xeb, 0xdd, 0xb5, 0xd7, 0xeb, 0x8d, 0x6b, 0xaa, 0xaa, 0x97, 0xc4, 0x9e, 0x79, 0x6f, 0xde, + 0xf7, 0xbe, 0x79, 0xf3, 0xe6, 0x1b, 0x43, 0xaa, 0x68, 0xd2, 0xaa, 0x49, 0xd5, 0x82, 0x66, 0xec, + 0xa8, 0xd7, 0x96, 0x0b, 0xc4, 0xd2, 0x96, 0xd5, 0xab, 0xbb, 0xa4, 0x6e, 0x2b, 0xb5, 0xba, 0x69, + 0x99, 0xf8, 0x24, 0x37, 0x50, 0x1a, 0x06, 0x8a, 0x30, 0x90, 0x16, 0x9a, 0x5e, 0x94, 0x70, 0xeb, + 0xa6, 0x6f, 0x4d, 0x2b, 0x95, 0x0d, 0xcd, 0x2a, 0x9b, 0x06, 0x5f, 0x40, 0x1a, 0x2b, 0x99, 0x25, + 0x93, 0x7d, 0x54, 0x1b, 0x9f, 0xc4, 0xe8, 0xcb, 0x25, 0xd3, 0x2c, 0x55, 0x88, 0xaa, 0xd5, 0xca, + 0xaa, 0x66, 0x18, 0xa6, 0xc5, 0x5c, 0xa8, 0x98, 0x4d, 0x7a, 0xd7, 0x77, 0x56, 0x2e, 0x9a, 0x65, + 0xa3, 0x6d, 0xde, 0x83, 0x9a, 0x21, 0xe4, 0xf3, 0x13, 0x7c, 0x3e, 0xcf, 0xc3, 0x8a, 0x0c, 0xf8, + 0xd4, 0xa4, 0x70, 0x75, 0x50, 0x7b, 0x93, 0x95, 0x46, 0xb5, 0x6a, 0xd9, 0x30, 0x55, 0xf6, 0x97, + 0x0f, 0xc9, 0x65, 0x38, 0xf9, 0x6e, 0xc3, 0x22, 0xab, 0x55, 0x34, 0xa3, 0x48, 0x72, 0xe4, 0xea, + 0x2e, 0xa1, 0x16, 0xce, 0xc0, 0xa0, 0xa6, 0xeb, 0x75, 0x42, 0xe9, 0x38, 0x9a, 0x46, 0xe9, 0xe1, + 0xec, 0xf8, 0x6f, 0x3f, 0x2e, 0x8d, 0x89, 0x48, 0x1b, 0x7c, 0x66, 0xdb, 0xaa, 0x97, 0x8d, 0x52, + 0xce, 0x31, 0xc4, 0x63, 0x70, 0x5c, 0x27, 0x86, 0x59, 0x1d, 0x1f, 0x68, 0x78, 0xe4, 0xf8, 0x97, + 0xf3, 0x43, 0x37, 0xf7, 0x53, 0xb1, 0xc7, 0xfb, 0xa9, 0x98, 0xfc, 0x36, 0x8c, 0xf9, 0x43, 0xd1, + 0x9a, 0x69, 0x50, 0x82, 0x57, 0x60, 0xb0, 0xc0, 0x87, 0x58, 0xac, 0x44, 0x66, 0x42, 0x69, 0x6e, + 0x0a, 0x25, 0xce, 0xa6, 0x28, 0x9b, 0x66, 0xd9, 0xc8, 0x39, 0x96, 0xf2, 0x2f, 0x08, 0x4e, 0xb1, + 0xd5, 0x36, 0x2a, 0x15, 0xb1, 0x20, 0x7d, 0x12, 0xf0, 0x5b, 0x00, 0xee, 0xd6, 0xb2, 0x0c, 0x12, + 0x99, 0x59, 0x1f, 0x0e, 0x4e, 0xa4, 0x83, 0xe6, 0xb2, 0x56, 0x72, 0xc8, 0xca, 0x79, 0x3c, 0xf1, + 0x0c, 0x9c, 0xa8, 0x13, 0x6a, 0x56, 0xae, 0x91, 0x3c, 0x27, 0xe3, 0xd8, 0x34, 0x4a, 0x0f, 0xe5, + 0x46, 0xc4, 0xe0, 0x85, 0x16, 0x4e, 0x0e, 0x10, 0x8c, 0xb7, 0xa7, 0x21, 0x88, 0xd9, 0x83, 0x21, + 0x91, 0x6e, 0x23, 0x91, 0x63, 0xa1, 0xcc, 0x64, 0xb7, 0xee, 0x3f, 0x4c, 0xc5, 0xbe, 0xff, 0x3b, + 0x95, 0x2e, 0x95, 0xad, 0x8f, 0x76, 0x0b, 0x4a, 0xd1, 0xac, 0x8a, 0xca, 0x10, 0xff, 0x96, 0xa8, + 0xbe, 0xa3, 0x5a, 0x76, 0x8d, 0x50, 0xe6, 0x40, 0x6f, 0x3f, 0xba, 0xb7, 0x30, 0x52, 0x21, 0x25, + 0xad, 0x68, 0xe7, 0x1b, 0xb5, 0x47, 0xef, 0x3c, 0xba, 0xb7, 0x80, 0x72, 0xcd, 0x90, 0xf8, 0x62, + 0x00, 0x25, 0x73, 0x5d, 0x29, 0xe1, 0xd8, 0xbd, 0x9c, 0xc8, 0xdf, 0x20, 0x98, 0x62, 0x49, 0x6e, + 0xd7, 0x88, 0xa1, 0x6b, 0x85, 0x0a, 0x79, 0x86, 0x76, 0xcc, 0xb3, 0x19, 0x8f, 0x11, 0x24, 0x3b, + 0xe1, 0x7c, 0xce, 0xb6, 0xc4, 0x86, 0x99, 0xc0, 0x4c, 0xb3, 0x36, 0xab, 0xd0, 0xff, 0xb3, 0x0d, + 0x7c, 0x00, 0xa7, 0xc3, 0x43, 0x3f, 0x49, 0x5b, 0xd8, 0x11, 0x5d, 0xe1, 0x3d, 0xd3, 0xd2, 0x2a, + 0xdb, 0xbb, 0xb5, 0x5a, 0xc5, 0x76, 0x72, 0xf1, 0xd7, 0x0b, 0xea, 0x43, 0xbd, 0x3c, 0x74, 0x0e, + 0xaf, 0x2f, 0x9a, 0x80, 0x6f, 0x43, 0x9c, 0xb2, 0x91, 0xa7, 0x57, 0x27, 0x22, 0x60, 0xff, 0xaa, + 0x64, 0x51, 0x74, 0x6c, 0x9e, 0xda, 0xa5, 0x0f, 0x1d, 0x2a, 0x9b, 0x5b, 0x8c, 0x3c, 0x5b, 0x2c, + 0x5f, 0x81, 0x17, 0x5b, 0xac, 0x05, 0x15, 0x6b, 0x10, 0xd7, 0xaa, 0xe6, 0xae, 0x61, 0x75, 0xdd, + 0xc8, 0xec, 0x70, 0x83, 0x0a, 0x91, 0x0d, 0xf7, 0x91, 0xc7, 0x00, 0xb3, 0x65, 0x2f, 0x6b, 0x75, + 0xad, 0xea, 0x74, 0x0c, 0xf9, 0x8a, 0xb8, 0xb7, 0x9c, 0x51, 0x11, 0x6a, 0x1d, 0xe2, 0x35, 0x36, + 0x22, 0x42, 0x4d, 0x2a, 0x01, 0xf7, 0xbb, 0xc2, 0x9d, 0x7c, 0xc1, 0xb8, 0x97, 0xac, 0x83, 0xc4, + 0x96, 0x65, 0xa5, 0x48, 0xdf, 0x21, 0x96, 0xa6, 0x6b, 0x96, 0xd6, 0xe7, 0x12, 0x92, 0xef, 0x22, + 0x98, 0x0c, 0x0c, 0x23, 0xb2, 0xd8, 0x82, 0xe1, 0xaa, 0x18, 0x73, 0xda, 0xcc, 0x54, 0x60, 0x22, + 0x8e, 0xa7, 0x37, 0x15, 0xd7, 0xb5, 0x7f, 0x85, 0xb0, 0x0c, 0x13, 0x2e, 0xde, 0x56, 0x56, 0x82, + 0xab, 0xa1, 0xe0, 0x65, 0xb2, 0x2d, 0xc3, 0x0b, 0x30, 0xe4, 0xc0, 0x14, 0x3c, 0x46, 0x4f, 0xb0, + 0xe9, 0x29, 0xaf, 0xc3, 0x6c, 0x7b, 0x8c, 0xac, 0xcd, 0xab, 0x90, 0xb7, 0xa5, 0x50, 0x8c, 0x26, + 0xcc, 0x75, 0xf5, 0xef, 0x2b, 0xe0, 0xeb, 0xa2, 0x3d, 0xb1, 0x80, 0x97, 0xae, 0x1b, 0xa4, 0x4e, + 0x43, 0x11, 0xf6, 0xeb, 0x92, 0x93, 0x3f, 0x45, 0x00, 0x6e, 0xd0, 0x9e, 0xfa, 0xfa, 0xba, 0xdb, + 0x8f, 0x07, 0x8e, 0x70, 0x8c, 0x9b, 0xad, 0xf9, 0x3b, 0xa7, 0x5b, 0xfa, 0x92, 0x17, 0xf4, 0x66, + 0x61, 0x84, 0x25, 0x9c, 0x37, 0xd9, 0xb8, 0x28, 0xfa, 0x54, 0x20, 0xc5, 0xae, 0x7f, 0x2e, 0xa1, + 0xbb, 0x6b, 0xf5, 0xaf, 0xda, 0x3f, 0x11, 0x32, 0xc0, 0x03, 0x54, 0x14, 0xc5, 0xd3, 0xd9, 0xac, + 0xbb, 0x08, 0x52, 0x1d, 0x01, 0x3c, 0x8b, 0x84, 0xd9, 0xa2, 0xac, 0xb7, 0x89, 0xa1, 0xbf, 0x65, + 0x34, 0xee, 0x74, 0xdd, 0x61, 0xea, 0x25, 0x88, 0xb3, 0x90, 0x1c, 0xe1, 0x70, 0x4e, 0x7c, 0x6b, + 0xe1, 0xaa, 0xd8, 0x33, 0x57, 0x77, 0x9c, 0xaa, 0xf2, 0xc5, 0x16, 0x24, 0x6d, 0xc2, 0x08, 0x25, + 0x86, 0x9e, 0x27, 0x7c, 0x5c, 0x90, 0x34, 0x1d, 0x48, 0x92, 0xd7, 0x3f, 0x41, 0xdd, 0x2f, 0x2d, + 0x2c, 0x15, 0x7b, 0x66, 0x29, 0xf3, 0xeb, 0x28, 0x1c, 0x67, 0x50, 0xf1, 0x57, 0x08, 0x06, 0x85, + 0xea, 0xc1, 0xe9, 0x40, 0x34, 0x01, 0x6f, 0x32, 0x69, 0x3e, 0x82, 0x25, 0x0f, 0x2b, 0xbf, 0x79, + 0xb3, 0x71, 0xf6, 0x3e, 0xfb, 0xfd, 0xdf, 0x2f, 0x07, 0x32, 0xf8, 0x8c, 0x1a, 0xfc, 0x9c, 0xe4, + 0x9a, 0x52, 0xbd, 0x21, 0x0e, 0xf8, 0x9e, 0x5a, 0xb0, 0xf9, 0x9b, 0x05, 0xef, 0x23, 0x48, 0x78, + 0x1e, 0x24, 0x78, 0xb1, 0x73, 0xe4, 0xf6, 0xe7, 0x97, 0xb4, 0x14, 0xd1, 0x5a, 0x60, 0x5d, 0x75, + 0xb1, 0xce, 0xe3, 0xb9, 0x88, 0x58, 0xf1, 0xcf, 0x08, 0x46, 0xdb, 0x64, 0x3a, 0xce, 0x74, 0x0e, + 0xdd, 0xe9, 0xed, 0x21, 0xad, 0x1c, 0xc9, 0x47, 0x80, 0x5e, 0x77, 0x41, 0xaf, 0xe0, 0xe5, 0x40, + 0xd0, 0xd4, 0x71, 0xce, 0x07, 0xc0, 0xff, 0x03, 0xc1, 0xa9, 0x0e, 0x02, 0x18, 0xbf, 0x1e, 0x1d, + 0x90, 0x5f, 0xae, 0x4b, 0xe7, 0x7a, 0xf0, 0x14, 0x09, 0x5d, 0x74, 0x13, 0x5a, 0xc3, 0xe7, 0x8f, + 0x9c, 0x90, 0x5b, 0x3b, 0xb7, 0x10, 0x24, 0x3c, 0x7a, 0x38, 0xac, 0x76, 0xda, 0x45, 0x7a, 0x58, + 0xed, 0x04, 0x88, 0x6c, 0x39, 0xed, 0xa2, 0x9e, 0xc2, 0x93, 0xc1, 0xa8, 0x39, 0x8c, 0x5b, 0x08, + 0x86, 0x1c, 0x61, 0x8a, 0x43, 0x4e, 0x52, 0x8b, 0xd4, 0x95, 0x16, 0xa2, 0x98, 0x0a, 0x34, 0xcb, + 0x2e, 0x9a, 0x59, 0x7c, 0x3a, 0x04, 0x8d, 0xcb, 0xd6, 0xe7, 0x08, 0xe2, 0x5c, 0x8d, 0xe2, 0xb9, + 0xce, 0x91, 0x7c, 0xd2, 0x57, 0x4a, 0x77, 0x37, 0x8c, 0x4e, 0x0f, 0xd7, 0xbd, 0xf8, 0x07, 0x04, + 0x27, 0x7c, 0x2a, 0x08, 0x2b, 0x9d, 0xa3, 0x04, 0xa9, 0x40, 0x49, 0x8d, 0x6c, 0x2f, 0xc0, 0x9d, + 0x73, 0xc1, 0x29, 0x78, 0x31, 0x10, 0x1c, 0xbf, 0x2b, 0xf2, 0x8e, 0x7c, 0x52, 0x6f, 0xb0, 0x81, + 0x3d, 0xfc, 0x17, 0x02, 0xa9, 0xb3, 0x66, 0xc3, 0x6f, 0x44, 0x84, 0x12, 0xa4, 0x14, 0xa5, 0xb5, + 0xde, 0x9c, 0x45, 0x52, 0x1b, 0x6e, 0x52, 0x67, 0xf1, 0x6a, 0x94, 0xa4, 0xf2, 0x05, 0x3b, 0xcf, + 0x2e, 0x90, 0x3c, 0xe5, 0xe8, 0xbf, 0x45, 0xf0, 0x82, 0xff, 0x5d, 0x80, 0xbb, 0x71, 0xdb, 0xfa, + 0x50, 0x91, 0xce, 0x44, 0x77, 0x88, 0x5e, 0xbb, 0x2d, 0xc0, 0xf1, 0xd7, 0x08, 0x12, 0x1e, 0x85, + 0x12, 0x76, 0xd2, 0xdb, 0xf5, 0x6e, 0xd8, 0x49, 0x0f, 0x10, 0x88, 0xf2, 0x59, 0x17, 0xdf, 0xab, + 0x78, 0xbe, 0x33, 0x3e, 0xa1, 0x87, 0x9a, 0xa5, 0xf2, 0x13, 0x02, 0xdc, 0x2e, 0xa3, 0xf0, 0x4a, + 0xa4, 0xe8, 0x7e, 0xd5, 0x27, 0xad, 0x1e, 0xcd, 0x49, 0x20, 0x7f, 0xcd, 0x45, 0xbe, 0x88, 0x17, + 0xba, 0x22, 0x6f, 0xd6, 0x03, 0xbe, 0x8d, 0x20, 0xe1, 0x51, 0x25, 0x61, 0xfc, 0xb6, 0x0b, 0xaf, + 0x30, 0x7e, 0x03, 0xa4, 0x92, 0xac, 0xb8, 0x28, 0x67, 0xf0, 0x2b, 0xc1, 0xbd, 0xcb, 0x23, 0xa5, + 0xb2, 0x9b, 0xf7, 0x0f, 0x92, 0xe8, 0xc1, 0x41, 0x12, 0xfd, 0x73, 0x90, 0x44, 0x5f, 0x1c, 0x26, + 0x63, 0x0f, 0x0e, 0x93, 0xb1, 0x3f, 0x0f, 0x93, 0xb1, 0xf7, 0xe7, 0x43, 0x7f, 0xc5, 0xf8, 0x98, + 0xaf, 0xc9, 0x7e, 0xcc, 0x28, 0xc4, 0xd9, 0x6f, 0xd0, 0x2b, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, + 0x46, 0x5f, 0xc6, 0x98, 0xa6, 0x17, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1329,8 +1554,10 @@ type QueryClient interface { SupplyOf(ctx context.Context, in *QuerySupplyOfRequest, opts ...grpc.CallOption) (*QuerySupplyOfResponse, error) // Params queries the parameters of x/bank module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // DenomsMetadata queries the client metadata of a given coin denomination. + // DenomMetadata queries the client metadata of a given coin denomination. DenomMetadata(ctx context.Context, in *QueryDenomMetadataRequest, opts ...grpc.CallOption) (*QueryDenomMetadataResponse, error) + // DenomMetadataByQueryString queries the client metadata of a given coin denomination. + DenomMetadataByQueryString(ctx context.Context, in *QueryDenomMetadataByQueryStringRequest, opts ...grpc.CallOption) (*QueryDenomMetadataByQueryStringResponse, error) // DenomsMetadata queries the client metadata for all registered coin // denominations. DenomsMetadata(ctx context.Context, in *QueryDenomsMetadataRequest, opts ...grpc.CallOption) (*QueryDenomsMetadataResponse, error) @@ -1342,6 +1569,11 @@ type QueryClient interface { // // Since: cosmos-sdk 0.46 DenomOwners(ctx context.Context, in *QueryDenomOwnersRequest, opts ...grpc.CallOption) (*QueryDenomOwnersResponse, error) + // DenomOwnersByQuery queries for all account addresses that own a particular token + // denomination. + // + // Since: cosmos-sdk 0.50.3 + DenomOwnersByQuery(ctx context.Context, in *QueryDenomOwnersByQueryRequest, opts ...grpc.CallOption) (*QueryDenomOwnersByQueryResponse, error) // SendEnabled queries for SendEnabled entries. // // This query only returns denominations that have specific SendEnabled settings. @@ -1432,6 +1664,15 @@ func (c *queryClient) DenomMetadata(ctx context.Context, in *QueryDenomMetadataR return out, nil } +func (c *queryClient) DenomMetadataByQueryString(ctx context.Context, in *QueryDenomMetadataByQueryStringRequest, opts ...grpc.CallOption) (*QueryDenomMetadataByQueryStringResponse, error) { + out := new(QueryDenomMetadataByQueryStringResponse) + err := c.cc.Invoke(ctx, "/cosmos.bank.v1beta1.Query/DenomMetadataByQueryString", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) DenomsMetadata(ctx context.Context, in *QueryDenomsMetadataRequest, opts ...grpc.CallOption) (*QueryDenomsMetadataResponse, error) { out := new(QueryDenomsMetadataResponse) err := c.cc.Invoke(ctx, "/cosmos.bank.v1beta1.Query/DenomsMetadata", in, out, opts...) @@ -1450,6 +1691,15 @@ func (c *queryClient) DenomOwners(ctx context.Context, in *QueryDenomOwnersReque return out, nil } +func (c *queryClient) DenomOwnersByQuery(ctx context.Context, in *QueryDenomOwnersByQueryRequest, opts ...grpc.CallOption) (*QueryDenomOwnersByQueryResponse, error) { + out := new(QueryDenomOwnersByQueryResponse) + err := c.cc.Invoke(ctx, "/cosmos.bank.v1beta1.Query/DenomOwnersByQuery", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) SendEnabled(ctx context.Context, in *QuerySendEnabledRequest, opts ...grpc.CallOption) (*QuerySendEnabledResponse, error) { out := new(QuerySendEnabledResponse) err := c.cc.Invoke(ctx, "/cosmos.bank.v1beta1.Query/SendEnabled", in, out, opts...) @@ -1496,8 +1746,10 @@ type QueryServer interface { SupplyOf(context.Context, *QuerySupplyOfRequest) (*QuerySupplyOfResponse, error) // Params queries the parameters of x/bank module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // DenomsMetadata queries the client metadata of a given coin denomination. + // DenomMetadata queries the client metadata of a given coin denomination. DenomMetadata(context.Context, *QueryDenomMetadataRequest) (*QueryDenomMetadataResponse, error) + // DenomMetadataByQueryString queries the client metadata of a given coin denomination. + DenomMetadataByQueryString(context.Context, *QueryDenomMetadataByQueryStringRequest) (*QueryDenomMetadataByQueryStringResponse, error) // DenomsMetadata queries the client metadata for all registered coin // denominations. DenomsMetadata(context.Context, *QueryDenomsMetadataRequest) (*QueryDenomsMetadataResponse, error) @@ -1509,6 +1761,11 @@ type QueryServer interface { // // Since: cosmos-sdk 0.46 DenomOwners(context.Context, *QueryDenomOwnersRequest) (*QueryDenomOwnersResponse, error) + // DenomOwnersByQuery queries for all account addresses that own a particular token + // denomination. + // + // Since: cosmos-sdk 0.50.3 + DenomOwnersByQuery(context.Context, *QueryDenomOwnersByQueryRequest) (*QueryDenomOwnersByQueryResponse, error) // SendEnabled queries for SendEnabled entries. // // This query only returns denominations that have specific SendEnabled settings. @@ -1547,12 +1804,18 @@ func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsReq func (*UnimplementedQueryServer) DenomMetadata(ctx context.Context, req *QueryDenomMetadataRequest) (*QueryDenomMetadataResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DenomMetadata not implemented") } +func (*UnimplementedQueryServer) DenomMetadataByQueryString(ctx context.Context, req *QueryDenomMetadataByQueryStringRequest) (*QueryDenomMetadataByQueryStringResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DenomMetadataByQueryString not implemented") +} func (*UnimplementedQueryServer) DenomsMetadata(ctx context.Context, req *QueryDenomsMetadataRequest) (*QueryDenomsMetadataResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DenomsMetadata not implemented") } func (*UnimplementedQueryServer) DenomOwners(ctx context.Context, req *QueryDenomOwnersRequest) (*QueryDenomOwnersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DenomOwners not implemented") } +func (*UnimplementedQueryServer) DenomOwnersByQuery(ctx context.Context, req *QueryDenomOwnersByQueryRequest) (*QueryDenomOwnersByQueryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DenomOwnersByQuery not implemented") +} func (*UnimplementedQueryServer) SendEnabled(ctx context.Context, req *QuerySendEnabledRequest) (*QuerySendEnabledResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SendEnabled not implemented") } @@ -1705,6 +1968,24 @@ func _Query_DenomMetadata_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Query_DenomMetadataByQueryString_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDenomMetadataByQueryStringRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DenomMetadataByQueryString(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.bank.v1beta1.Query/DenomMetadataByQueryString", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DenomMetadataByQueryString(ctx, req.(*QueryDenomMetadataByQueryStringRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_DenomsMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryDenomsMetadataRequest) if err := dec(in); err != nil { @@ -1741,6 +2022,24 @@ func _Query_DenomOwners_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } +func _Query_DenomOwnersByQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDenomOwnersByQueryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DenomOwnersByQuery(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.bank.v1beta1.Query/DenomOwnersByQuery", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DenomOwnersByQuery(ctx, req.(*QueryDenomOwnersByQueryRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_SendEnabled_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QuerySendEnabledRequest) if err := dec(in); err != nil { @@ -1795,6 +2094,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "DenomMetadata", Handler: _Query_DenomMetadata_Handler, }, + { + MethodName: "DenomMetadataByQueryString", + Handler: _Query_DenomMetadataByQueryString_Handler, + }, { MethodName: "DenomsMetadata", Handler: _Query_DenomsMetadata_Handler, @@ -1803,6 +2106,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "DenomOwners", Handler: _Query_DenomOwners_Handler, }, + { + MethodName: "DenomOwnersByQuery", + Handler: _Query_DenomOwnersByQuery_Handler, + }, { MethodName: "SendEnabled", Handler: _Query_SendEnabled_Handler, @@ -2498,6 +2805,69 @@ func (m *QueryDenomMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } +func (m *QueryDenomMetadataByQueryStringRequest) 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 *QueryDenomMetadataByQueryStringRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDenomMetadataByQueryStringRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryDenomMetadataByQueryStringResponse) 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 *QueryDenomMetadataByQueryStringResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDenomMetadataByQueryStringResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Metadata.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 *QueryDenomOwnersRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2629,7 +2999,7 @@ func (m *QueryDenomOwnersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func (m *QuerySendEnabledRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryDenomOwnersByQueryRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2639,12 +3009,12 @@ func (m *QuerySendEnabledRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QuerySendEnabledRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryDenomOwnersByQueryRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QuerySendEnabledRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryDenomOwnersByQueryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2659,7 +3029,98 @@ func (m *QuerySendEnabledRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x6 + dAtA[i] = 0x12 + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryDenomOwnersByQueryResponse) 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 *QueryDenomOwnersByQueryResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDenomOwnersByQueryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.DenomOwners) > 0 { + for iNdEx := len(m.DenomOwners) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DenomOwners[iNdEx].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 *QuerySendEnabledRequest) 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 *QuerySendEnabledRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySendEnabledRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6 i-- dAtA[i] = 0x9a } @@ -3004,6 +3465,30 @@ func (m *QueryDenomMetadataResponse) Size() (n int) { return n } +func (m *QueryDenomMetadataByQueryStringRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDenomMetadataByQueryStringResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Metadata.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + func (m *QueryDenomOwnersRequest) Size() (n int) { if m == nil { return 0 @@ -3055,6 +3540,42 @@ func (m *QueryDenomOwnersResponse) Size() (n int) { return n } +func (m *QueryDenomOwnersByQueryRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDenomOwnersByQueryResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.DenomOwners) > 0 { + for _, e := range m.DenomOwners { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func (m *QuerySendEnabledRequest) Size() (n int) { if m == nil { return 0 @@ -4870,7 +5391,7 @@ func (m *QueryDenomMetadataResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryDenomOwnersRequest) Unmarshal(dAtA []byte) error { +func (m *QueryDenomMetadataByQueryStringRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4893,10 +5414,10 @@ func (m *QueryDenomOwnersRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryDenomOwnersRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDenomMetadataByQueryStringRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDenomOwnersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDenomMetadataByQueryStringRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4931,9 +5452,59 @@ func (m *QueryDenomOwnersRequest) Unmarshal(dAtA []byte) error { } m.Denom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + 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 *QueryDenomMetadataByQueryStringResponse) 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: QueryDenomMetadataByQueryStringResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDenomMetadataByQueryStringResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4960,10 +5531,7 @@ func (m *QueryDenomOwnersRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4988,7 +5556,7 @@ func (m *QueryDenomOwnersRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *DenomOwner) Unmarshal(dAtA []byte) error { +func (m *QueryDenomOwnersRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5011,15 +5579,15 @@ func (m *DenomOwner) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DenomOwner: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDenomOwnersRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DenomOwner: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDenomOwnersRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5047,11 +5615,11 @@ func (m *DenomOwner) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.Denom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5078,7 +5646,10 @@ func (m *DenomOwner) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5103,7 +5674,7 @@ func (m *DenomOwner) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryDenomOwnersResponse) Unmarshal(dAtA []byte) error { +func (m *DenomOwner) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5126,10 +5697,363 @@ func (m *QueryDenomOwnersResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryDenomOwnersResponse: wiretype end group for non-group") + return fmt.Errorf("proto: DenomOwner: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDenomOwnersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DenomOwner: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", 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.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", 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 err := m.Balance.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 *QueryDenomOwnersResponse) 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: QueryDenomOwnersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDenomOwnersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DenomOwners", 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 + } + m.DenomOwners = append(m.DenomOwners, &DenomOwner{}) + if err := m.DenomOwners[len(m.DenomOwners)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.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 *QueryDenomOwnersByQueryRequest) 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: QueryDenomOwnersByQueryRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDenomOwnersByQueryRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", 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.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.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 *QueryDenomOwnersByQueryResponse) 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: QueryDenomOwnersByQueryResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDenomOwnersByQueryResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/bank/types/query.pb.gw.go b/x/bank/types/query.pb.gw.go index 982f53168300..58bc742a7322 100644 --- a/x/bank/types/query.pb.gw.go +++ b/x/bank/types/query.pb.gw.go @@ -465,6 +465,42 @@ func local_request_Query_DenomMetadata_0(ctx context.Context, marshaler runtime. } +var ( + filter_Query_DenomMetadataByQueryString_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_DenomMetadataByQueryString_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDenomMetadataByQueryStringRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_DenomMetadataByQueryString_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DenomMetadataByQueryString(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_DenomMetadataByQueryString_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDenomMetadataByQueryStringRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_DenomMetadataByQueryString_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.DenomMetadataByQueryString(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_Query_DenomsMetadata_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -573,6 +609,42 @@ func local_request_Query_DenomOwners_0(ctx context.Context, marshaler runtime.Ma } +var ( + filter_Query_DenomOwnersByQuery_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_DenomOwnersByQuery_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDenomOwnersByQueryRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_DenomOwnersByQuery_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DenomOwnersByQuery(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_DenomOwnersByQuery_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDenomOwnersByQueryRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_DenomOwnersByQuery_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.DenomOwnersByQuery(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_Query_SendEnabled_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -799,6 +871,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_DenomMetadataByQueryString_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_DenomMetadataByQueryString_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_DenomMetadataByQueryString_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_DenomsMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -845,6 +940,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_DenomOwnersByQuery_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_DenomOwnersByQuery_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_DenomOwnersByQuery_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_SendEnabled_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1069,6 +1187,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_DenomMetadataByQueryString_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_DenomMetadataByQueryString_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_DenomMetadataByQueryString_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_DenomsMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1109,6 +1247,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_DenomOwnersByQuery_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_DenomOwnersByQuery_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_DenomOwnersByQuery_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_SendEnabled_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1149,10 +1307,14 @@ var ( pattern_Query_DenomMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "bank", "v1beta1", "denoms_metadata", "denom"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_DenomMetadataByQueryString_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "bank", "v1beta1", "denoms_metadata_by_query_string"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_DenomsMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "bank", "v1beta1", "denoms_metadata"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_DenomOwners_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "bank", "v1beta1", "denom_owners", "denom"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_DenomOwnersByQuery_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "bank", "v1beta1", "denom_owners_by_query"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_SendEnabled_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "bank", "v1beta1", "send_enabled"}, "", runtime.AssumeColonVerbOpt(false))) ) @@ -1173,9 +1335,13 @@ var ( forward_Query_DenomMetadata_0 = runtime.ForwardResponseMessage + forward_Query_DenomMetadataByQueryString_0 = runtime.ForwardResponseMessage + forward_Query_DenomsMetadata_0 = runtime.ForwardResponseMessage forward_Query_DenomOwners_0 = runtime.ForwardResponseMessage + forward_Query_DenomOwnersByQuery_0 = runtime.ForwardResponseMessage + forward_Query_SendEnabled_0 = runtime.ForwardResponseMessage ) diff --git a/x/bank/types/restrictions.go b/x/bank/types/restrictions.go new file mode 100644 index 000000000000..2ec4489a0978 --- /dev/null +++ b/x/bank/types/restrictions.go @@ -0,0 +1,102 @@ +package types + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// A MintingRestrictionFn can restrict minting of coins. +type MintingRestrictionFn func(ctx context.Context, coins sdk.Coins) error + +var _ MintingRestrictionFn = NoOpMintingRestrictionFn + +// NoOpMintingRestrictionFn is a no-op MintingRestrictionFn. +func NoOpMintingRestrictionFn(_ context.Context, _ sdk.Coins) error { + return nil +} + +// Then creates a composite restriction that runs this one then the provided second one. +func (r MintingRestrictionFn) Then(second MintingRestrictionFn) MintingRestrictionFn { + return ComposeMintingRestrictions(r, second) +} + +// ComposeMintingRestrictions combines multiple MintingRestrictionFn into one. +// nil entries are ignored. +// If all entries are nil, nil is returned. +// If exactly one entry is not nil, it is returned. +// Otherwise, a new MintingRestrictionFn is returned that runs the non-nil restrictions in the order they are given. +// The composition runs each minting restriction until an error is encountered and returns that error. +func ComposeMintingRestrictions(restrictions ...MintingRestrictionFn) MintingRestrictionFn { + toRun := make([]MintingRestrictionFn, 0, len(restrictions)) + for _, r := range restrictions { + if r != nil { + toRun = append(toRun, r) + } + } + switch len(toRun) { + case 0: + return nil + case 1: + return toRun[0] + } + return func(ctx context.Context, coins sdk.Coins) error { + for _, r := range toRun { + err := r(ctx, coins) + if err != nil { + return err + } + } + return nil + } +} + +// A SendRestrictionFn can restrict sends and/or provide a new receiver address. +type SendRestrictionFn func(ctx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) (newToAddr sdk.AccAddress, err error) + +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (SendRestrictionFn) IsOnePerModuleType() {} + +var _ SendRestrictionFn = NoOpSendRestrictionFn + +// NoOpSendRestrictionFn is a no-op SendRestrictionFn. +func NoOpSendRestrictionFn(_ context.Context, _, toAddr sdk.AccAddress, _ sdk.Coins) (sdk.AccAddress, error) { + return toAddr, nil +} + +// Then creates a composite restriction that runs this one then the provided second one. +func (r SendRestrictionFn) Then(second SendRestrictionFn) SendRestrictionFn { + return ComposeSendRestrictions(r, second) +} + +// ComposeSendRestrictions combines multiple SendRestrictionFn into one. +// nil entries are ignored. +// If all entries are nil, nil is returned. +// If exactly one entry is not nil, it is returned. +// Otherwise, a new SendRestrictionFn is returned that runs the non-nil restrictions in the order they are given. +// The composition runs each send restriction until an error is encountered and returns that error, +// otherwise it returns the toAddr of the last send restriction. +func ComposeSendRestrictions(restrictions ...SendRestrictionFn) SendRestrictionFn { + toRun := make([]SendRestrictionFn, 0, len(restrictions)) + for _, r := range restrictions { + if r != nil { + toRun = append(toRun, r) + } + } + switch len(toRun) { + case 0: + return nil + case 1: + return toRun[0] + } + return func(ctx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) (sdk.AccAddress, error) { + var err error + for _, r := range toRun { + toAddr, err = r(ctx, fromAddr, toAddr, amt) + if err != nil { + return toAddr, err + } + } + return toAddr, err + } +} diff --git a/x/bank/types/restrictions_test.go b/x/bank/types/restrictions_test.go new file mode 100644 index 000000000000..47cb047da9fc --- /dev/null +++ b/x/bank/types/restrictions_test.go @@ -0,0 +1,919 @@ +package types_test + +import ( + "context" + "errors" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/bank/types" +) + +// MintingRestrictionArgs are the args provided to a MintingRestrictionFn function. +type MintingRestrictionArgs struct { + Name string + Coins sdk.Coins +} + +// MintingRestrictionTestHelper is a struct with stuff helpful for testing the MintingRestrictionFn stuff. +type MintingRestrictionTestHelper struct { + Calls []*MintingRestrictionArgs +} + +func NewMintingRestrictionTestHelper() *MintingRestrictionTestHelper { + return &MintingRestrictionTestHelper{Calls: make([]*MintingRestrictionArgs, 0, 2)} +} + +// RecordCall makes note that the provided args were used as a funcion call. +func (s *MintingRestrictionTestHelper) RecordCall(name string, coins sdk.Coins) { + s.Calls = append(s.Calls, s.NewArgs(name, coins)) +} + +// NewCalls is just a shorter way to create a []*MintingRestrictionArgs. +func (s *MintingRestrictionTestHelper) NewCalls(args ...*MintingRestrictionArgs) []*MintingRestrictionArgs { + return args +} + +// NewArgs creates a new MintingRestrictionArgs. +func (s *MintingRestrictionTestHelper) NewArgs(name string, coins sdk.Coins) *MintingRestrictionArgs { + return &MintingRestrictionArgs{ + Name: name, + Coins: coins, + } +} + +// NamedRestriction creates a new MintingRestrictionFn function that records the arguments it's called with and returns nil. +func (s *MintingRestrictionTestHelper) NamedRestriction(name string) types.MintingRestrictionFn { + return func(_ context.Context, coins sdk.Coins) error { + s.RecordCall(name, coins) + return nil + } +} + +// ErrorRestriction creates a new MintingRestrictionFn function that returns an error. +func (s *MintingRestrictionTestHelper) ErrorRestriction(message string) types.MintingRestrictionFn { + return func(_ context.Context, coins sdk.Coins) error { + s.RecordCall(message, coins) + return errors.New(message) + } +} + +// MintingRestrictionTestParams are parameters to test regarding calling a MintingRestrictionFn. +type MintingRestrictionTestParams struct { + // ExpNil is whether to expect the provided MintingRestrictionFn to be nil. + // If it is true, the rest of these test params are ignored. + ExpNil bool + // Coins is the MintingRestrictionFn coins input. + Coins sdk.Coins + // ExpErr is the expected return error string. + ExpErr string + // ExpCalls is the args of all the MintingRestrictionFn calls that end up being made. + ExpCalls []*MintingRestrictionArgs +} + +// TestActual tests the provided MintingRestrictionFn using the provided test parameters. +func (s *MintingRestrictionTestHelper) TestActual(t *testing.T, tp *MintingRestrictionTestParams, actual types.MintingRestrictionFn) { + t.Helper() + if tp.ExpNil { + require.Nil(t, actual, "resulting MintingRestrictionFn") + } else { + require.NotNil(t, actual, "resulting MintingRestrictionFn") + s.Calls = s.Calls[:0] + err := actual(sdk.Context{}, tp.Coins) + if len(tp.ExpErr) != 0 { + assert.EqualError(t, err, tp.ExpErr, "composite MintingRestrictionFn output error") + } else { + assert.NoError(t, err, "composite MintingRestrictionFn output error") + } + assert.Equal(t, tp.ExpCalls, s.Calls, "args given to funcs in composite MintingRestrictionFn") + } +} + +func TestMintingRestriction_Then(t *testing.T) { + coins := sdk.NewCoins(sdk.NewInt64Coin("acoin", 2), sdk.NewInt64Coin("bcoin", 4)) + + h := NewMintingRestrictionTestHelper() + + tests := []struct { + name string + base types.MintingRestrictionFn + second types.MintingRestrictionFn + exp *MintingRestrictionTestParams + }{ + { + name: "nil nil", + base: nil, + second: nil, + exp: &MintingRestrictionTestParams{ + ExpNil: true, + }, + }, + { + name: "nil noop", + base: nil, + second: h.NamedRestriction("noop"), + exp: &MintingRestrictionTestParams{ + Coins: coins, + ExpCalls: h.NewCalls(h.NewArgs("noop", coins)), + }, + }, + { + name: "noop nil", + base: h.NamedRestriction("noop"), + second: nil, + exp: &MintingRestrictionTestParams{ + Coins: coins, + ExpCalls: h.NewCalls(h.NewArgs("noop", coins)), + }, + }, + { + name: "noop noop", + base: h.NamedRestriction("noop1"), + second: h.NamedRestriction("noop2"), + exp: &MintingRestrictionTestParams{ + Coins: coins, + ExpCalls: h.NewCalls(h.NewArgs("noop1", coins), h.NewArgs("noop2", coins)), + }, + }, + { + name: "noop error", + base: h.NamedRestriction("noop"), + second: h.ErrorRestriction("this is a test error"), + exp: &MintingRestrictionTestParams{ + Coins: coins, + ExpErr: "this is a test error", + ExpCalls: h.NewCalls(h.NewArgs("noop", coins), h.NewArgs("this is a test error", coins)), + }, + }, + { + name: "error noop", + base: h.ErrorRestriction("another test error"), + second: h.NamedRestriction("noop"), + exp: &MintingRestrictionTestParams{ + Coins: coins, + ExpErr: "another test error", + ExpCalls: h.NewCalls(h.NewArgs("another test error", coins)), + }, + }, + { + name: "error error", + base: h.ErrorRestriction("first test error"), + second: h.ErrorRestriction("second test error"), + exp: &MintingRestrictionTestParams{ + Coins: coins, + ExpErr: "first test error", + ExpCalls: h.NewCalls(h.NewArgs("first test error", coins)), + }, + }, + { + name: "double chain", + base: types.ComposeMintingRestrictions(h.NamedRestriction("r1"), h.NamedRestriction("r2")), + second: types.ComposeMintingRestrictions(h.NamedRestriction("r3"), h.NamedRestriction("r4")), + exp: &MintingRestrictionTestParams{ + Coins: coins, + ExpCalls: h.NewCalls( + h.NewArgs("r1", coins), + h.NewArgs("r2", coins), + h.NewArgs("r3", coins), + h.NewArgs("r4", coins), + ), + }, + }, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + var actual types.MintingRestrictionFn + testFunc := func() { + actual = tc.base.Then(tc.second) + } + require.NotPanics(t, testFunc, "MintingRestrictionFn.Then") + h.TestActual(t, tc.exp, actual) + }) + } +} + +func TestComposeMintingRestrictions(t *testing.T) { + rz := func(rs ...types.MintingRestrictionFn) []types.MintingRestrictionFn { + return rs + } + coins := sdk.NewCoins(sdk.NewInt64Coin("ccoin", 8), sdk.NewInt64Coin("dcoin", 16)) + + h := NewMintingRestrictionTestHelper() + + tests := []struct { + name string + input []types.MintingRestrictionFn + exp *MintingRestrictionTestParams + }{ + { + name: "nil list", + input: nil, + exp: &MintingRestrictionTestParams{ + ExpNil: true, + }, + }, + { + name: "empty list", + input: rz(), + exp: &MintingRestrictionTestParams{ + ExpNil: true, + }, + }, + { + name: "only nil entry", + input: rz(nil), + exp: &MintingRestrictionTestParams{ + ExpNil: true, + }, + }, + { + name: "five nil entries", + input: rz(nil, nil, nil, nil, nil), + exp: &MintingRestrictionTestParams{ + ExpNil: true, + }, + }, + { + name: "only noop entry", + input: rz(h.NamedRestriction("noop")), + exp: &MintingRestrictionTestParams{ + Coins: coins, + ExpCalls: h.NewCalls(h.NewArgs("noop", coins)), + }, + }, + { + name: "only error entry", + input: rz(h.ErrorRestriction("test error")), + exp: &MintingRestrictionTestParams{ + Coins: coins, + ExpErr: "test error", + ExpCalls: h.NewCalls(h.NewArgs("test error", coins)), + }, + }, + { + name: "noop nil nil", + input: rz(h.NamedRestriction("noop"), nil, nil), + exp: &MintingRestrictionTestParams{ + Coins: coins, + ExpCalls: h.NewCalls(h.NewArgs("noop", coins)), + }, + }, + { + name: "nil noop nil", + input: rz(nil, h.NamedRestriction("noop"), nil), + exp: &MintingRestrictionTestParams{ + Coins: coins, + ExpCalls: h.NewCalls(h.NewArgs("noop", coins)), + }, + }, + { + name: "nil nil noop", + input: rz(nil, nil, h.NamedRestriction("noop")), + exp: &MintingRestrictionTestParams{ + Coins: coins, + ExpCalls: h.NewCalls(h.NewArgs("noop", coins)), + }, + }, + { + name: "noop noop nil", + input: rz(h.NamedRestriction("r1"), h.NamedRestriction("r2"), nil), + exp: &MintingRestrictionTestParams{ + Coins: coins, + ExpCalls: h.NewCalls(h.NewArgs("r1", coins), h.NewArgs("r2", coins)), + }, + }, + { + name: "noop nil noop", + input: rz(h.NamedRestriction("r1"), nil, h.NamedRestriction("r2")), + exp: &MintingRestrictionTestParams{ + Coins: coins, + ExpCalls: h.NewCalls(h.NewArgs("r1", coins), h.NewArgs("r2", coins)), + }, + }, + { + name: "nil noop noop", + input: rz(nil, h.NamedRestriction("r1"), h.NamedRestriction("r2")), + exp: &MintingRestrictionTestParams{ + Coins: coins, + ExpCalls: h.NewCalls(h.NewArgs("r1", coins), h.NewArgs("r2", coins)), + }, + }, + { + name: "noop noop noop", + input: rz(h.NamedRestriction("r1"), h.NamedRestriction("r2"), h.NamedRestriction("r3")), + exp: &MintingRestrictionTestParams{ + Coins: coins, + ExpCalls: h.NewCalls(h.NewArgs("r1", coins), h.NewArgs("r2", coins), h.NewArgs("r3", coins)), + }, + }, + { + name: "err noop noop", + input: rz(h.ErrorRestriction("first error"), h.NamedRestriction("r2"), h.NamedRestriction("r3")), + exp: &MintingRestrictionTestParams{ + Coins: coins, + ExpErr: "first error", + ExpCalls: h.NewCalls(h.NewArgs("first error", coins)), + }, + }, + { + name: "noop err noop", + input: rz(h.NamedRestriction("r1"), h.ErrorRestriction("second error"), h.NamedRestriction("r3")), + exp: &MintingRestrictionTestParams{ + Coins: coins, + ExpErr: "second error", + ExpCalls: h.NewCalls(h.NewArgs("r1", coins), h.NewArgs("second error", coins)), + }, + }, + { + name: "noop noop err", + input: rz(h.NamedRestriction("r1"), h.NamedRestriction("r2"), h.ErrorRestriction("third error")), + exp: &MintingRestrictionTestParams{ + Coins: coins, + ExpErr: "third error", + ExpCalls: h.NewCalls(h.NewArgs("r1", coins), h.NewArgs("r2", coins), h.NewArgs("third error", coins)), + }, + }, + { + name: "noop err err", + input: rz(h.NamedRestriction("r1"), h.ErrorRestriction("second error"), h.ErrorRestriction("third error")), + exp: &MintingRestrictionTestParams{ + Coins: coins, + ExpErr: "second error", + ExpCalls: h.NewCalls(h.NewArgs("r1", coins), h.NewArgs("second error", coins)), + }, + }, + { + name: "big bang", + input: rz( + h.NamedRestriction("r1"), nil, h.NamedRestriction("r2"), nil, + h.NamedRestriction("r3"), h.NamedRestriction("r4"), h.NamedRestriction("r5"), + nil, h.NamedRestriction("r6"), h.NamedRestriction("r7"), nil, + h.NamedRestriction("r8"), nil, nil, h.ErrorRestriction("oops, an error"), + h.NamedRestriction("r9"), nil, h.NamedRestriction("ra"), // Not called. + ), + exp: &MintingRestrictionTestParams{ + Coins: coins, + ExpErr: "oops, an error", + ExpCalls: h.NewCalls( + h.NewArgs("r1", coins), + h.NewArgs("r2", coins), + h.NewArgs("r3", coins), + h.NewArgs("r4", coins), + h.NewArgs("r5", coins), + h.NewArgs("r6", coins), + h.NewArgs("r7", coins), + h.NewArgs("r8", coins), + h.NewArgs("oops, an error", coins), + ), + }, + }, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + var actual types.MintingRestrictionFn + testFunc := func() { + actual = types.ComposeMintingRestrictions(tc.input...) + } + require.NotPanics(t, testFunc, "ComposeMintingRestrictions") + h.TestActual(t, tc.exp, actual) + }) + } +} + +func TestNoOpMintingRestrictionFn(t *testing.T) { + var err error + testFunc := func() { + err = types.NoOpMintingRestrictionFn(sdk.Context{}, sdk.Coins{}) + } + require.NotPanics(t, testFunc, "NoOpMintingRestrictionFn") + assert.NoError(t, err, "NoOpSendRestrictionFn error") +} + +// SendRestrictionArgs are the args provided to a SendRestrictionFn function. +type SendRestrictionArgs struct { + Name string + FromAddr sdk.AccAddress + ToAddr sdk.AccAddress + Coins sdk.Coins +} + +// SendRestrictionTestHelper is a struct with stuff helpful for testing the SendRestrictionFn stuff. +type SendRestrictionTestHelper struct { + Calls []*SendRestrictionArgs +} + +func NewSendRestrictionTestHelper() *SendRestrictionTestHelper { + return &SendRestrictionTestHelper{Calls: make([]*SendRestrictionArgs, 0, 2)} +} + +// RecordCall makes note that the provided args were used as a funcion call. +func (s *SendRestrictionTestHelper) RecordCall(name string, fromAddr, toAddr sdk.AccAddress, coins sdk.Coins) { + s.Calls = append(s.Calls, s.NewArgs(name, fromAddr, toAddr, coins)) +} + +// NewCalls is just a shorter way to create a []*SendRestrictionArgs. +func (s *SendRestrictionTestHelper) NewCalls(args ...*SendRestrictionArgs) []*SendRestrictionArgs { + return args +} + +// NewArgs creates a new SendRestrictionArgs. +func (s *SendRestrictionTestHelper) NewArgs(name string, fromAddr, toAddr sdk.AccAddress, coins sdk.Coins) *SendRestrictionArgs { + return &SendRestrictionArgs{ + Name: name, + FromAddr: fromAddr, + ToAddr: toAddr, + Coins: coins, + } +} + +// NamedRestriction creates a new SendRestrictionFn function that records the arguments it's called with and returns the provided toAddr. +func (s *SendRestrictionTestHelper) NamedRestriction(name string) types.SendRestrictionFn { + return func(_ context.Context, fromAddr, toAddr sdk.AccAddress, coins sdk.Coins) (sdk.AccAddress, error) { + s.RecordCall(name, fromAddr, toAddr, coins) + return toAddr, nil + } +} + +// NewToRestriction creates a new SendRestrictionFn function that returns a different toAddr than provided. +func (s *SendRestrictionTestHelper) NewToRestriction(name string, addr sdk.AccAddress) types.SendRestrictionFn { + return func(_ context.Context, fromAddr, toAddr sdk.AccAddress, coins sdk.Coins) (sdk.AccAddress, error) { + s.RecordCall(name, fromAddr, toAddr, coins) + return addr, nil + } +} + +// ErrorRestriction creates a new SendRestrictionFn function that returns a nil toAddr and an error. +func (s *SendRestrictionTestHelper) ErrorRestriction(message string) types.SendRestrictionFn { + return func(_ context.Context, fromAddr, toAddr sdk.AccAddress, coins sdk.Coins) (sdk.AccAddress, error) { + s.RecordCall(message, fromAddr, toAddr, coins) + return nil, errors.New(message) + } +} + +// SendRestrictionTestParams are parameters to test regarding calling a SendRestrictionFn. +type SendRestrictionTestParams struct { + // ExpNil is whether to expect the provided SendRestrictionFn to be nil. + // If it is true, the rest of these test params are ignored. + ExpNil bool + // FromAddr is the SendRestrictionFn fromAddr input. + FromAddr sdk.AccAddress + // ToAddr is the SendRestrictionFn toAddr input. + ToAddr sdk.AccAddress + // Coins is the SendRestrictionFn coins input. + Coins sdk.Coins + // ExpAddr is the expected return address. + ExpAddr sdk.AccAddress + // ExpErr is the expected return error string. + ExpErr string + // ExpCalls is the args of all the SendRestrictionFn calls that end up being made. + ExpCalls []*SendRestrictionArgs +} + +// TestActual tests the provided SendRestrictionFn using the provided test parameters. +func (s *SendRestrictionTestHelper) TestActual(t *testing.T, tp *SendRestrictionTestParams, actual types.SendRestrictionFn) { + t.Helper() + if tp.ExpNil { + require.Nil(t, actual, "resulting SendRestrictionFn") + } else { + require.NotNil(t, actual, "resulting SendRestrictionFn") + s.Calls = s.Calls[:0] + addr, err := actual(sdk.Context{}, tp.FromAddr, tp.ToAddr, tp.Coins) + if len(tp.ExpErr) != 0 { + assert.EqualError(t, err, tp.ExpErr, "composite SendRestrictionFn output error") + } else { + assert.NoError(t, err, "composite SendRestrictionFn output error") + } + assert.Equal(t, tp.ExpAddr, addr, "composite SendRestrictionFn output address") + assert.Equal(t, tp.ExpCalls, s.Calls, "args given to funcs in composite SendRestrictionFn") + } +} + +func TestSendRestriction_Then(t *testing.T) { + fromAddr := sdk.AccAddress("fromaddr____________") + addr0 := sdk.AccAddress("0addr_______________") + addr1 := sdk.AccAddress("1addr_______________") + addr2 := sdk.AccAddress("2addr_______________") + addr3 := sdk.AccAddress("3addr_______________") + addr4 := sdk.AccAddress("4addr_______________") + coins := sdk.NewCoins(sdk.NewInt64Coin("ecoin", 32), sdk.NewInt64Coin("fcoin", 64)) + + h := NewSendRestrictionTestHelper() + + tests := []struct { + name string + base types.SendRestrictionFn + second types.SendRestrictionFn + exp *SendRestrictionTestParams + }{ + { + name: "nil nil", + base: nil, + second: nil, + exp: &SendRestrictionTestParams{ + ExpNil: true, + }, + }, + { + name: "nil noop", + base: nil, + second: h.NamedRestriction("noop"), + exp: &SendRestrictionTestParams{ + FromAddr: fromAddr, + ToAddr: addr1, + Coins: coins, + ExpAddr: addr1, + ExpCalls: h.NewCalls(h.NewArgs("noop", fromAddr, addr1, coins)), + }, + }, + { + name: "noop nil", + base: h.NamedRestriction("noop"), + second: nil, + exp: &SendRestrictionTestParams{ + FromAddr: fromAddr, + ToAddr: addr1, + Coins: coins, + ExpAddr: addr1, + ExpCalls: h.NewCalls(h.NewArgs("noop", fromAddr, addr1, coins)), + }, + }, + { + name: "noop noop", + base: h.NamedRestriction("noop1"), + second: h.NamedRestriction("noop2"), + exp: &SendRestrictionTestParams{ + FromAddr: fromAddr, + ToAddr: addr1, + Coins: coins, + ExpAddr: addr1, + ExpCalls: h.NewCalls( + h.NewArgs("noop1", fromAddr, addr1, coins), + h.NewArgs("noop2", fromAddr, addr1, coins), + ), + }, + }, + { + name: "setter setter", + base: h.NewToRestriction("r1", addr2), + second: h.NewToRestriction("r2", addr3), + exp: &SendRestrictionTestParams{ + FromAddr: fromAddr, + ToAddr: addr1, + Coins: coins, + ExpAddr: addr3, + ExpCalls: h.NewCalls( + h.NewArgs("r1", fromAddr, addr1, coins), + h.NewArgs("r2", fromAddr, addr2, coins), + ), + }, + }, + { + name: "setter error", + base: h.NewToRestriction("r1", addr2), + second: h.ErrorRestriction("this is a test error"), + exp: &SendRestrictionTestParams{ + FromAddr: fromAddr, + ToAddr: addr1, + Coins: coins, + ExpAddr: nil, + ExpErr: "this is a test error", + ExpCalls: h.NewCalls(h.NewArgs( + "r1", fromAddr, addr1, coins), + h.NewArgs("this is a test error", fromAddr, addr2, coins), + ), + }, + }, + { + name: "error setter", + base: h.ErrorRestriction("another test error"), + second: h.NewToRestriction("r2", addr3), + exp: &SendRestrictionTestParams{ + FromAddr: fromAddr, + ToAddr: addr1, + Coins: coins, + ExpAddr: nil, + ExpErr: "another test error", + ExpCalls: h.NewCalls(h.NewArgs("another test error", fromAddr, addr1, coins)), + }, + }, + { + name: "error error", + base: h.ErrorRestriction("first test error"), + second: h.ErrorRestriction("second test error"), + exp: &SendRestrictionTestParams{ + FromAddr: fromAddr, + ToAddr: addr1, + Coins: coins, + ExpAddr: nil, + ExpErr: "first test error", + ExpCalls: h.NewCalls(h.NewArgs("first test error", fromAddr, addr1, coins)), + }, + }, + { + name: "double chain", + base: types.ComposeSendRestrictions(h.NewToRestriction("r1", addr1), h.NewToRestriction("r2", addr2)), + second: types.ComposeSendRestrictions(h.NewToRestriction("r3", addr3), h.NewToRestriction("r4", addr4)), + exp: &SendRestrictionTestParams{ + FromAddr: fromAddr, + ToAddr: addr0, + Coins: coins, + ExpAddr: addr4, + ExpCalls: h.NewCalls( + h.NewArgs("r1", fromAddr, addr0, coins), + h.NewArgs("r2", fromAddr, addr1, coins), + h.NewArgs("r3", fromAddr, addr2, coins), + h.NewArgs("r4", fromAddr, addr3, coins), + ), + }, + }, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + var actual types.SendRestrictionFn + testFunc := func() { + actual = tc.base.Then(tc.second) + } + require.NotPanics(t, testFunc, "SendRestrictionFn.Then") + h.TestActual(t, tc.exp, actual) + }) + } +} + +func TestComposeSendRestrictions(t *testing.T) { + rz := func(rs ...types.SendRestrictionFn) []types.SendRestrictionFn { + return rs + } + fromAddr := sdk.AccAddress("fromaddr____________") + addr0 := sdk.AccAddress("0addr_______________") + addr1 := sdk.AccAddress("1addr_______________") + addr2 := sdk.AccAddress("2addr_______________") + addr3 := sdk.AccAddress("3addr_______________") + addr4 := sdk.AccAddress("4addr_______________") + coins := sdk.NewCoins(sdk.NewInt64Coin("gcoin", 128), sdk.NewInt64Coin("hcoin", 256)) + + h := NewSendRestrictionTestHelper() + + tests := []struct { + name string + input []types.SendRestrictionFn + exp *SendRestrictionTestParams + }{ + { + name: "nil list", + input: nil, + exp: &SendRestrictionTestParams{ + ExpNil: true, + }, + }, + { + name: "empty list", + input: rz(), + exp: &SendRestrictionTestParams{ + ExpNil: true, + }, + }, + { + name: "only nil entry", + input: rz(nil), + exp: &SendRestrictionTestParams{ + ExpNil: true, + }, + }, + { + name: "five nil entries", + input: rz(nil, nil, nil, nil, nil), + exp: &SendRestrictionTestParams{ + ExpNil: true, + }, + }, + { + name: "only noop entry", + input: rz(h.NamedRestriction("noop")), + exp: &SendRestrictionTestParams{ + FromAddr: fromAddr, + ToAddr: addr0, + Coins: coins, + ExpAddr: addr0, + ExpCalls: h.NewCalls(h.NewArgs("noop", fromAddr, addr0, coins)), + }, + }, + { + name: "only error entry", + input: rz(h.ErrorRestriction("test error")), + exp: &SendRestrictionTestParams{ + FromAddr: fromAddr, + ToAddr: addr0, + Coins: coins, + ExpAddr: nil, + ExpErr: "test error", + ExpCalls: h.NewCalls(h.NewArgs("test error", fromAddr, addr0, coins)), + }, + }, + { + name: "noop nil nil", + input: rz(h.NamedRestriction("noop"), nil, nil), + exp: &SendRestrictionTestParams{ + FromAddr: fromAddr, + ToAddr: addr0, + Coins: coins, + ExpAddr: addr0, + ExpCalls: h.NewCalls(h.NewArgs("noop", fromAddr, addr0, coins)), + }, + }, + { + name: "nil noop nil", + input: rz(nil, h.NamedRestriction("noop"), nil), + exp: &SendRestrictionTestParams{ + FromAddr: fromAddr, + ToAddr: addr1, + Coins: coins, + ExpAddr: addr1, + ExpCalls: h.NewCalls(h.NewArgs("noop", fromAddr, addr1, coins)), + }, + }, + { + name: "nil nil noop", + input: rz(nil, nil, h.NamedRestriction("noop")), + exp: &SendRestrictionTestParams{ + FromAddr: fromAddr, + ToAddr: addr2, + Coins: coins, + ExpAddr: addr2, + ExpCalls: h.NewCalls(h.NewArgs("noop", fromAddr, addr2, coins)), + }, + }, + { + name: "noop noop nil", + input: rz(h.NamedRestriction("r1"), h.NamedRestriction("r2"), nil), + exp: &SendRestrictionTestParams{ + FromAddr: fromAddr, + ToAddr: addr0, + Coins: coins, + ExpAddr: addr0, + ExpCalls: h.NewCalls( + h.NewArgs("r1", fromAddr, addr0, coins), + h.NewArgs("r2", fromAddr, addr0, coins), + ), + }, + }, + { + name: "noop nil noop", + input: rz(h.NamedRestriction("r1"), nil, h.NamedRestriction("r2")), + exp: &SendRestrictionTestParams{ + FromAddr: fromAddr, + ToAddr: addr1, + Coins: coins, + ExpAddr: addr1, + ExpCalls: h.NewCalls( + h.NewArgs("r1", fromAddr, addr1, coins), + h.NewArgs("r2", fromAddr, addr1, coins), + ), + }, + }, + { + name: "nil noop noop", + input: rz(nil, h.NamedRestriction("r1"), h.NamedRestriction("r2")), + exp: &SendRestrictionTestParams{ + FromAddr: fromAddr, + ToAddr: addr2, + Coins: coins, + ExpAddr: addr2, + ExpCalls: h.NewCalls( + h.NewArgs("r1", fromAddr, addr2, coins), + h.NewArgs("r2", fromAddr, addr2, coins), + ), + }, + }, + { + name: "noop noop noop", + input: rz(h.NamedRestriction("r1"), h.NamedRestriction("r2"), h.NamedRestriction("r3")), + exp: &SendRestrictionTestParams{ + FromAddr: fromAddr, + ToAddr: addr3, + Coins: coins, + ExpAddr: addr3, + ExpCalls: h.NewCalls( + h.NewArgs("r1", fromAddr, addr3, coins), + h.NewArgs("r2", fromAddr, addr3, coins), + h.NewArgs("r3", fromAddr, addr3, coins), + ), + }, + }, + { + name: "err noop noop", + input: rz(h.ErrorRestriction("first error"), h.NamedRestriction("r2"), h.NamedRestriction("r3")), + exp: &SendRestrictionTestParams{ + FromAddr: fromAddr, + ToAddr: addr4, + Coins: coins, + ExpAddr: nil, + ExpErr: "first error", + ExpCalls: h.NewCalls(h.NewArgs("first error", fromAddr, addr4, coins)), + }, + }, + { + name: "noop err noop", + input: rz(h.NamedRestriction("r1"), h.ErrorRestriction("second error"), h.NamedRestriction("r3")), + exp: &SendRestrictionTestParams{ + FromAddr: fromAddr, + ToAddr: addr4, + Coins: coins, + ExpAddr: nil, + ExpErr: "second error", + ExpCalls: h.NewCalls( + h.NewArgs("r1", fromAddr, addr4, coins), + h.NewArgs("second error", fromAddr, addr4, coins), + ), + }, + }, + { + name: "noop noop err", + input: rz(h.NamedRestriction("r1"), h.NamedRestriction("r2"), h.ErrorRestriction("third error")), + exp: &SendRestrictionTestParams{ + FromAddr: fromAddr, + ToAddr: addr4, + Coins: coins, + ExpAddr: nil, + ExpErr: "third error", + ExpCalls: h.NewCalls( + h.NewArgs("r1", fromAddr, addr4, coins), + h.NewArgs("r2", fromAddr, addr4, coins), + h.NewArgs("third error", fromAddr, addr4, coins), + ), + }, + }, + { + name: "new-to err err", + input: rz(h.NewToRestriction("r1", addr0), h.ErrorRestriction("second error"), h.ErrorRestriction("third error")), + exp: &SendRestrictionTestParams{ + FromAddr: fromAddr, + ToAddr: addr4, + Coins: coins, + ExpAddr: nil, + ExpErr: "second error", + ExpCalls: h.NewCalls( + h.NewArgs("r1", fromAddr, addr4, coins), + h.NewArgs("second error", fromAddr, addr0, coins), + ), + }, + }, + { + name: "big bang", + input: rz( + h.NamedRestriction("r1"), nil, h.NewToRestriction("r2", addr1), // Called with orig toAddr. + nil, h.NamedRestriction("r3"), h.NewToRestriction("r4", addr2), // Called with addr1 toAddr. + h.NewToRestriction("r5", addr3), // Called with addr2 toAddr. + nil, h.NamedRestriction("r6"), h.NewToRestriction("r7", addr4), // Called with addr3 toAddr. + nil, h.NamedRestriction("r8"), nil, nil, h.ErrorRestriction("oops, an error"), // Called with addr4 toAddr. + h.NewToRestriction("r9", addr0), nil, h.NamedRestriction("ra"), // Not called. + ), + exp: &SendRestrictionTestParams{ + FromAddr: fromAddr, + ToAddr: addr0, + Coins: coins, + ExpAddr: nil, + ExpErr: "oops, an error", + ExpCalls: h.NewCalls( + h.NewArgs("r1", fromAddr, addr0, coins), + h.NewArgs("r2", fromAddr, addr0, coins), + h.NewArgs("r3", fromAddr, addr1, coins), + h.NewArgs("r4", fromAddr, addr1, coins), + h.NewArgs("r5", fromAddr, addr2, coins), + h.NewArgs("r6", fromAddr, addr3, coins), + h.NewArgs("r7", fromAddr, addr3, coins), + h.NewArgs("r8", fromAddr, addr4, coins), + h.NewArgs("oops, an error", fromAddr, addr4, coins), + ), + }, + }, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + var actual types.SendRestrictionFn + testFunc := func() { + actual = types.ComposeSendRestrictions(tc.input...) + } + require.NotPanics(t, testFunc, "ComposeSendRestrictions") + h.TestActual(t, tc.exp, actual) + }) + } +} + +func TestNoOpSendRestrictionFn(t *testing.T) { + expAddr := sdk.AccAddress("__expectedaddr__") + var addr sdk.AccAddress + var err error + testFunc := func() { + addr, err = types.NoOpSendRestrictionFn(sdk.Context{}, sdk.AccAddress("first_addr"), expAddr, sdk.Coins{}) + } + require.NotPanics(t, testFunc, "NoOpSendRestrictionFn") + assert.NoError(t, err, "NoOpSendRestrictionFn error") + assert.Equal(t, expAddr, addr, "NoOpSendRestrictionFn addr") +} diff --git a/x/bank/types/tx.pb.go b/x/bank/types/tx.pb.go index 12b6b196116c..74171878e69b 100644 --- a/x/bank/types/tx.pb.go +++ b/x/bank/types/tx.pb.go @@ -309,6 +309,7 @@ var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo // // Since: cosmos-sdk 0.47 type MsgSetSendEnabled struct { + // authority is the address that controls the module. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // send_enabled is the list of entries to add or update. SendEnabled []*SendEnabled `protobuf:"bytes,2,rep,name=send_enabled,json=sendEnabled,proto3" json:"send_enabled,omitempty"` diff --git a/x/circuit/CHANGELOG.md b/x/circuit/CHANGELOG.md index 63534e456362..f9c54ddab57d 100644 --- a/x/circuit/CHANGELOG.md +++ b/x/circuit/CHANGELOG.md @@ -29,4 +29,13 @@ Ref: https://keepachangelog.com/en/1.0.0/ # Changelog -## [Unreleased] \ No newline at end of file +## [v0.1.1](https://github.com/cosmos/cosmos-sdk/releases/tag/x/circuit/v0.1.1) - 2024-04-22 + +### Improvements + +* (deps) [#19810](https://github.com/cosmos/cosmos-sdk/pull/19810) Upgrade SDK version due to prometheus breaking change. +* (deps) [#19810](https://github.com/cosmos/cosmos-sdk/pull/19810) Bump `cosmossdk.io/store` to v1.1.0. + +## [v0.1.0](https://github.com/cosmos/cosmos-sdk/releases/tag/x/circuit/v0.1.0) - 2023-11-07 + +* Initial release of the standalone NFT module. diff --git a/x/circuit/README.md b/x/circuit/README.md index 348efb2cc46b..f3b753896300 100644 --- a/x/circuit/README.md +++ b/x/circuit/README.md @@ -6,6 +6,25 @@ Circuit Breaker is a module that is meant to avoid a chain needing to halt/shut Circuit Breaker works with the idea that an address or set of addresses have the right to block messages from being executed and/or included in the mempool. Any address with a permission is able to reset the circuit breaker for the message. +The transactions are checked and can be rejected at two points: + +* In `CircuitBreakerDecorator` [ante handler](https://docs.cosmos.network/main/learn/advanced/baseapp#antehandler): + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/x/circuit/v0.1.0/x/circuit/ante/circuit.go#L27-L41 +``` + +* With a [message router check](https://docs.cosmos.network/main/learn/advanced/baseapp#msg-service-router): + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.1/baseapp/msg_service_router.go#L104-L115 +``` + +:::note +The `CircuitBreakerDecorator` works for most use cases, but [does not check the inner messages of a transaction](https://docs.cosmos.network/main/learn/beginner/tx-lifecycle#antehandler). This some transactions (such as `x/authz` transactions or some `x/gov` transactions) may pass the ante handler. **This does not affect the circuit breaker** as the message router check will still fail the transaction. +This tradeoff is to avoid introducing more dependencies in the `x/circuit` module. Chains can re-define the `CircuitBreakerDecorator` to check for inner messages if they wish to do so. +::: + ## State ### Accounts @@ -59,7 +78,7 @@ Authorize, is called by the module authority (default governance module account) ### Trip -Trip, is called by an account to disable message execution for a specific msgURL. +Trip, is called by an authorized account to disable message execution for a specific msgURL. If empty, all the msgs will be disabled. ```protobuf // TripCircuitBreaker pauses processing of Msg's in the state machine. @@ -68,7 +87,7 @@ Trip, is called by an account to disable message execution for a specific msgURL ### Reset -Reset is called to enable execution of a previously disabled message. +Reset is called by an authorized account to enable execution for a specific msgURL of previously disabled message. If empty, all the disabled messages will be enabled. ```protobuf // ResetCircuitBreaker resumes processing of Msg's in the state machine that @@ -118,8 +137,8 @@ The circuit module emits the following events: | Type | Attribute Key | Attribute Value | |---------|---------------|---------------------------| -| string | granter | {granteeAddress} | -| string | grantee | {granterAddress} | +| string | granter | {granterAddress} | +| string | grantee | {granteeAddress} | | string | permission | {granteePermissions} | | message | module | circuit | | message | action | authorize_circuit_breaker | diff --git a/x/circuit/ante/circuit.go b/x/circuit/ante/circuit.go index 80ed8ce5f231..ab1876242b28 100644 --- a/x/circuit/ante/circuit.go +++ b/x/circuit/ante/circuit.go @@ -24,6 +24,10 @@ func NewCircuitBreakerDecorator(ck CircuitBreaker) CircuitBreakerDecorator { } } +// If you copy this as reference and your app has the authz module enabled, you must either: +// - recursively check for nested authz.Exec messages in this function. +// - or error early if a nested authz grant is found. +// The circuit AnteHandler handles this with baseapp's service router: https://github.com/cosmos/cosmos-sdk/issues/18632. func (cbd CircuitBreakerDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { // loop through all the messages and check if the message type is allowed for _, msg := range tx.GetMsgs() { diff --git a/x/circuit/ante/circuit_test.go b/x/circuit/ante/circuit_test.go index 4f4610520c63..54fbbebeb41b 100644 --- a/x/circuit/ante/circuit_test.go +++ b/x/circuit/ante/circuit_test.go @@ -4,23 +4,22 @@ import ( "context" "testing" - storetypes "cosmossdk.io/store/types" - cbtypes "cosmossdk.io/x/circuit/types" abci "github.com/cometbft/cometbft/abci/types" cmproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/stretchr/testify/require" + + storetypes "cosmossdk.io/store/types" + "cosmossdk.io/x/circuit/ante" + cbtypes "cosmossdk.io/x/circuit/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/testutil" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/bank" - - "cosmossdk.io/x/circuit/ante" - "github.com/stretchr/testify/require" - - sdk "github.com/cosmos/cosmos-sdk/types" ) type fixture struct { diff --git a/x/circuit/autocli.go b/x/circuit/autocli.go new file mode 100644 index 000000000000..7e9a45b182e9 --- /dev/null +++ b/x/circuit/autocli.go @@ -0,0 +1,73 @@ +package circuit + +import ( + "fmt" + + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + circuitv1 "cosmossdk.io/api/cosmos/circuit/v1" + + "github.com/cosmos/cosmos-sdk/version" +) + +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: circuitv1.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Account", + Use: "account [address]", + Short: "Query a specific account's permissions", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "address"}}, + }, + { + RpcMethod: "Accounts", + Use: "accounts", + Short: "Query all account permissions", + }, + { + RpcMethod: "DisabledList", + Use: "disabled-list", + Short: "Query a list of all disabled message types", + }, + }, + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: circuitv1.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "AuthorizeCircuitBreaker", + Use: "authorize [grantee] [permissions_json] --from [granter]", + Short: "Authorize an account to trip the circuit breaker.", + Long: `Authorize an account to trip the circuit breaker. +"SOME_MSGS" = 1, +"ALL_MSGS" = 2, +"SUPER_ADMIN" = 3,`, + Example: fmt.Sprintf(`%s circuit authorize [address] '{"level":1,"limit_type_urls":["/cosmos.bank.v1beta1.MsgSend, /cosmos.bank.v1beta1.MsgMultiSend"]}'"`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "grantee"}, + {ProtoField: "permissions"}, // TODO(@julienrbrt) Support flattening msg for setting each field as a positional arg + }, + }, + { + RpcMethod: "TripCircuitBreaker", + Use: "disable [msg_type_urls]", + Short: "Disable a message from being executed", + Example: fmt.Sprintf(`%s circuit disable "/cosmos.bank.v1beta1.MsgSend /cosmos.bank.v1beta1.MsgMultiSend"`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "msg_type_urls", Varargs: true}, + }, + }, + { + RpcMethod: "ResetCircuitBreaker", + Use: "reset [msg_type_urls]", + Short: "Enable a message to be executed", + Example: fmt.Sprintf(`%s circuit reset "/cosmos.bank.v1beta1.MsgSend /cosmos.bank.v1beta1.MsgMultiSend"`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "msg_type_urls", Varargs: true}, + }, + }, + }, + }, + } +} diff --git a/x/circuit/client/cli/query.go b/x/circuit/client/cli/query.go deleted file mode 100644 index 95be5a575c08..000000000000 --- a/x/circuit/client/cli/query.go +++ /dev/null @@ -1,119 +0,0 @@ -package cli - -import ( - "cosmossdk.io/x/circuit/types" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/spf13/cobra" -) - -// GetQueryCmd returns the parent command for all circuit CLI query commands. -func GetQueryCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: types.ModuleName, - Short: "Querying commands for the circuit module", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - cmd.AddCommand( - GetDisabeListCmd(), - GetAccountCmd(), - GetAccountsCmd(), - ) - - return cmd -} - -func GetDisabeListCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "disabled-list", - Short: "Query for all disabled message types", - Args: cobra.ExactArgs(0), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.DisabledList(cmd.Context(), &types.QueryDisabledListRequest{}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -func GetAccountCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "account [address]", - Short: "Query for account permissions", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - addr, err := sdk.AccAddressFromBech32(args[0]) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.Account(cmd.Context(), &types.QueryAccountRequest{Address: addr.String()}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -func GetAccountsCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "accounts", - Short: "Query for all account permissions", - Args: cobra.ExactArgs(0), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.Accounts(cmd.Context(), &types.QueryAccountsRequest{Pagination: pageReq}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/circuit/client/cli/tx.go b/x/circuit/client/cli/tx.go deleted file mode 100644 index e787dfc028ef..000000000000 --- a/x/circuit/client/cli/tx.go +++ /dev/null @@ -1,129 +0,0 @@ -package cli - -import ( - "fmt" - "strings" - - "github.com/cosmos/cosmos-sdk/version" - - "cosmossdk.io/math" - "cosmossdk.io/x/circuit/types" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/spf13/cobra" -) - -// NewTxCmd returns a root CLI command handler for all x/circuit transaction commands. -func NewTxCmd() *cobra.Command { - txCmd := &cobra.Command{ - Use: types.ModuleName, - Short: "Circuit transaction subcommands", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - txCmd.AddCommand( - AuthorizeCircuitBreakerCmd(), - TripCircuitBreakerCmd(), - ) - - return txCmd -} - -// AuthorizeCircuitBreakerCmd returns a CLI command handler for creating a MsgAuthorizeCircuitBreaker transaction. -func AuthorizeCircuitBreakerCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "authorize [grantee] [permission_level] [limit_type_urls] --from [granter]", - Short: "Authorize an account to trip the circuit breaker.", - Long: `Authorize an account to trip the circuit breaker. - "SOME_MSGS" = 1, - "ALL_MSGS" = 2, - "SUPER_ADMIN" = 3,`, - Example: fmt.Sprintf(`%s circuit authorize [address] 0 "cosmos.bank.v1beta1.MsgSend,cosmos.bank.v1beta1.MsgMultiSend"`, version.AppName), - Args: cobra.RangeArgs(3, 4), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - grantee, err := sdk.AccAddressFromBech32(args[0]) - if err != nil { - return err - } - - lvl, err := math.ParseUint(args[1]) - if err != nil { - return err - } - - var typeUrls []string - if len(args) == 4 { - typeUrls = strings.Split(args[2], ",") - } - - permission := types.Permissions{Level: types.Permissions_Level(lvl.Uint64()), LimitTypeUrls: typeUrls} - - msg := types.NewMsgAuthorizeCircuitBreaker(clientCtx.GetFromAddress().String(), grantee.String(), &permission) - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} - -// TripCircuitBreakerCmd returns a CLI command handler for creating a MsgTripCircuitBreaker transaction. -func TripCircuitBreakerCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "disable [type_url]", - Short: "disable a message from being executed", - Example: fmt.Sprintf(`%s circuit disable "cosmos.bank.v1beta1.MsgSend,cosmos.bank.v1beta1.MsgMultiSend"`, version.AppName), - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - msg := types.NewMsgTripCircuitBreaker(clientCtx.GetFromAddress().String(), strings.Split(args[0], ",")) - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} - -// ResetCircuitBreakerCmd returns a CLI command handler for creating a MsgRestCircuitBreaker transaction. -func ResetCircuitBreakerCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "reset [type_url]", - Short: "Enable a message to be executed", - Example: fmt.Sprintf(`%s circuit reset "cosmos.bank.v1beta1.MsgSend,cosmos.bank.v1beta1.MsgMultiSend"`, version.AppName), - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - msgTypeUrls := strings.Split(args[0], ",") - - msg := types.NewMsgResetCircuitBreaker(clientCtx.GetFromAddress().String(), msgTypeUrls) - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/circuit/go.mod b/x/circuit/go.mod index 9e16351437df..9d8516238f40 100644 --- a/x/circuit/go.mod +++ b/x/circuit/go.mod @@ -1,155 +1,157 @@ module cosmossdk.io/x/circuit -go 1.20 +go 1.21 require ( - cosmossdk.io/api v0.4.2 - cosmossdk.io/collections v0.2.0 - cosmossdk.io/core v0.8.0 - cosmossdk.io/depinject v1.0.0-alpha.3 - cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741 - cosmossdk.io/math v1.0.1 - cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c - github.com/cockroachdb/errors v1.9.1 - github.com/cometbft/cometbft v0.38.0-rc1 - github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20230524212735-6cabb6aa5741 - github.com/cosmos/gogoproto v1.4.10 - github.com/golang/protobuf v1.5.3 + cosmossdk.io/api v0.7.5 + cosmossdk.io/collections v0.4.0 + cosmossdk.io/core v0.11.0 + cosmossdk.io/depinject v1.0.0-alpha.4 + cosmossdk.io/errors v1.0.1 + cosmossdk.io/store v1.1.0 + github.com/cockroachdb/errors v1.11.3 + github.com/cometbft/cometbft v0.38.12 + github.com/cosmos/cosmos-sdk v0.50.6 + github.com/cosmos/gogoproto v1.7.0 + github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/spf13/cobra v1.7.0 - github.com/stretchr/testify v1.8.4 - google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a - google.golang.org/grpc v1.55.0 + github.com/stretchr/testify v1.9.0 + google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 + google.golang.org/grpc v1.63.2 ) require ( - cosmossdk.io/log v1.1.0 // indirect - cosmossdk.io/x/tx v0.8.0 // indirect + cosmossdk.io/log v1.4.1 // indirect + cosmossdk.io/math v1.3.0 // indirect + cosmossdk.io/x/tx v0.13.4 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect + github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect - github.com/armon/go-metrics v0.4.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f // indirect - github.com/cockroachdb/redact v1.1.4 // indirect - github.com/cometbft/cometbft-db v0.7.0 // indirect + github.com/cockroachdb/pebble v1.1.1 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/cometbft/cometbft-db v0.11.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-db v1.0.0 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect + github.com/cosmos/cosmos-db v1.0.2 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v1.0.0-beta.2 // indirect - github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.13.0 // indirect + github.com/cosmos/iavl v1.1.2 // indirect + github.com/cosmos/ics23/go v0.11.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/danieljoos/wincred v1.1.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect - github.com/emicklei/dot v1.4.2 // indirect + github.com/dvsekhvalnov/jose2go v1.6.0 // indirect + github.com/emicklei/dot v1.6.1 // indirect github.com/fatih/color v1.15.0 // indirect - github.com/felixge/httpsnoop v1.0.2 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/getsentry/sentry-go v0.21.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.1.0 // indirect + github.com/golang/glog v1.2.0 // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/mux v1.8.0 // indirect - github.com/gorilla/websocket v1.5.0 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-plugin v1.4.10 // indirect - github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect + github.com/hashicorp/go-metrics v0.5.3 // indirect + github.com/hashicorp/go-plugin v1.5.2 // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/huandu/skiplist v1.2.0 // indirect - github.com/iancoleman/strcase v0.2.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.16.5 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect - github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.0 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect - github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 // indirect + github.com/pelletier/go-toml/v2 v2.2.2 // indirect + github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.15.1 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.20.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect - github.com/rs/cors v1.8.3 // indirect - github.com/rs/zerolog v1.29.1 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rs/cors v1.11.1 // indirect + github.com/rs/zerolog v1.33.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/cast v1.5.1 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect + github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.16.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/spf13/viper v1.19.0 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tidwall/btree v1.6.0 // indirect - github.com/zondax/hid v0.9.1 // indirect - github.com/zondax/ledger-go v0.14.1 // indirect - go.etcd.io/bbolt v1.3.6 // indirect - golang.org/x/crypto v0.9.0 // indirect - golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect - google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect - google.golang.org/protobuf v1.30.0 // indirect + github.com/tidwall/btree v1.7.0 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect + go.etcd.io/bbolt v1.3.10 // indirect + go.uber.org/multierr v1.10.0 // indirect + golang.org/x/crypto v0.26.0 // indirect + golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - gotest.tools/v3 v3.4.0 // indirect + gotest.tools/v3 v3.5.1 // indirect nhooyr.io/websocket v1.8.6 // indirect - pgregory.net/rapid v0.6.2 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + pgregory.net/rapid v1.1.0 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) - -replace github.com/cosmos/cosmos-sdk => ../../. diff --git a/x/circuit/go.sum b/x/circuit/go.sum index 67018039c554..8bb436469235 100644 --- a/x/circuit/go.sum +++ b/x/circuit/go.sum @@ -1,58 +1,23 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.4.2 h1:lQBMl4xINnMnBOR/tQLtjlDnR4exr4e6/SfHR8PILE0= -cosmossdk.io/api v0.4.2/go.mod h1:qrVgOp7DIeAXa+Tt5dDjOC47bZCDrwx8ZHxrmy7STNE= -cosmossdk.io/collections v0.2.0 h1:CgMfLtE16+qox3zBYrGh60i4yKV8SeExLnIdOS2sbQs= -cosmossdk.io/collections v0.2.0/go.mod h1:Oc1FK0vlmxJZsgUn9/o3ldE6zNyWKvobVzaLhWknZJE= -cosmossdk.io/core v0.8.0 h1:LcJnu52E1a8f8E317VfQ1xK/RZe+IuhMNQAjnDLh25M= -cosmossdk.io/core v0.8.0/go.mod h1:LF6VLOv2DdCiaHxYVmr0MZcZpaSM9ZgvyrQSYTeg6D0= -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.0.20230524212735-6cabb6aa5741 h1:BCRz06fvddw7cKGiEGDiSox3qMsjQ97f92K+PDZDHdc= -cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741/go.mod h1:TB05o6YXkZkzsc+6bZFAV5kZRBtoCU9tUkbeMIqEg0w= -cosmossdk.io/log v1.1.0 h1:v0ogPHYeTzPcBTcPR1A3j1hkei4pZama8kz8LKlCMv0= -cosmossdk.io/log v1.1.0/go.mod h1:6zjroETlcDs+mm62gd8Ig7mZ+N+fVOZS91V17H+M4N4= -cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c h1:A+FMPW9GtfcPBDQNtFeDFN27h1SAP6OVjnGgPLlYXmI= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c/go.mod h1:RbYGvXCbz8uNBCXrwS9Z8SyydeWi+W5x5MZ33muyzMw= -cosmossdk.io/x/tx v0.8.0 h1:gLiGRL/Fy7fs6dd0IX8jOf0PrVr56/SG6XVMGQjyvJU= -cosmossdk.io/x/tx v0.8.0/go.mod h1:T9uEumGNgKU61gJYRv1t3uzQwLnASpJGmSE229HM3xA= +cosmossdk.io/api v0.7.5 h1:eMPTReoNmGUm8DeiQL9DyM8sYDjEhWzL1+nLbI9DqtQ= +cosmossdk.io/api v0.7.5/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= +cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= +cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= +cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= +cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= +cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= +cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= +cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= +cosmossdk.io/store v1.1.0 h1:LnKwgYMc9BInn9PhpTFEQVbL9UK475G2H911CGGnWHk= +cosmossdk.io/store v1.1.0/go.mod h1:oZfW/4Fc/zYqu3JmQcQdUJ3fqu5vnYTn3LZFFy8P8ng= +cosmossdk.io/x/tx v0.13.4 h1:Eg0PbJgeO0gM8p5wx6xa0fKR7hIV6+8lC56UrsvSo0Y= +cosmossdk.io/x/tx v0.13.4/go.mod h1:BkFqrnGGgW50Y6cwTy+JvgAhiffbGEKW6KF9ufcDpvk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= @@ -60,30 +25,28 @@ github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMb github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= +github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -95,14 +58,11 @@ github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -111,12 +71,16 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.7.0 h1:YjAGVd3XmtK9ktAbX8Zg2g2PwLIMjGREZJHlV4j7NEo= -github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= -github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= -github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= +github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= +github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ= +github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c= +github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= -github.com/bufbuild/protocompile v0.5.1 h1:mixz5lJX4Hiz4FpqFREJHIXLfaLBntfaJv1h+/jS+Qg= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= +github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -127,18 +91,18 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA 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.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= +github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= @@ -146,27 +110,29 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= +github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f h1:qQW3qCVRpjYsV4YNaUOjm6YLeliAD2jpgex9+D9tqU4= -github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f/go.mod h1:TkdVsGYRqtULUppt2RbC+YaKtTHnHoWa2apfFrSKABw= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/redact v1.1.4 h1:Y0XrVI2FAyofNyGveodTN//qdpPtFKcKTeCBsK3AHAQ= -github.com/cockroachdb/redact v1.1.4/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= +github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/cometbft/cometbft v0.38.0-rc1 h1:ph6smlqX82aH+d72KuxDHqu29M7LyusSp/obfGsGX/w= -github.com/cometbft/cometbft v0.38.0-rc1/go.mod h1:5Jz0Z8YsHSf0ZaAqGvi/ifioSdVFPtEGrm8Y9T/993k= -github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= -github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= +github.com/cometbft/cometbft v0.38.12 h1:OWsLZN2KcSSFe8bet9xCn07VwhBnavPea3VyPnNq1bg= +github.com/cometbft/cometbft v0.38.12/go.mod h1:GPHp3/pehPqgX1930HmK1BpBLZPxB75v/dZg8Viwy+o= +github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= +github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/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= @@ -175,41 +141,42 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= -github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= -github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= -github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= +github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= +github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/cosmos-sdk v0.50.6 h1:efR3MsvMHX5sxS3be+hOobGk87IzlZbSpsI2x/Vw3hk= +github.com/cosmos/cosmos-sdk v0.50.6/go.mod h1:lVkRY6cdMJ0fG3gp8y4hFrsKZqF4z7y0M2UXFb9Yt40= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cosmos/iavl v1.0.0-beta.2 h1:XOsIM80Yyml/KifCXEYOy9tWCXwMAbLa91n6pReW07Y= -github.com/cosmos/iavl v1.0.0-beta.2/go.mod h1:EA97dJ07TBktRlG/iGzK6g1eCXNj1q3MGoFYkVzrwHE= -github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= -github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= -github.com/cosmos/ledger-cosmos-go v0.13.0 h1:ex0CvCxToSR7j5WjrghPu2Bu9sSXKikjnVvUryNnx4s= -github.com/cosmos/ledger-cosmos-go v0.13.0/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= +github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= +github.com/cosmos/iavl v1.1.2 h1:zL9FK7C4L/P4IF1Dm5fIwz0WXCnn7Bp1M2FxH0ayM7Y= +github.com/cosmos/iavl v1.1.2/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= +github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= +github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew 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/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= 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= @@ -220,68 +187,57 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUn 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/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= -github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= +github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/emicklei/dot v1.4.2 h1:UbK6gX4yvrpHKlxuUQicwoAis4zl8Dzwit9SnbBAXWw= -github.com/emicklei/dot v1.4.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= +github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -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/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= -github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= 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/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.21.0 h1:c9l5F1nPF30JIppulk4veau90PK6Smu3abgVtVQWon4= -github.com/getsentry/sentry-go v0.21.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -296,14 +252,16 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= 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= @@ -314,11 +272,10 @@ github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6Wezm github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -329,22 +286,12 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV 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/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -352,7 +299,6 @@ github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= 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= @@ -364,13 +310,12 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 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/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -379,41 +324,22 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a 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.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= @@ -424,8 +350,8 @@ github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= @@ -446,10 +372,12 @@ github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVH github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= +github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v1.4.10 h1:xUbmA4jC6Dq163/fWcp8P3JuHilrHHMLNRxzGQJ9hNk= -github.com/hashicorp/go-plugin v1.4.10/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -461,8 +389,10 @@ github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -479,24 +409,17 @@ github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0Jr github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= -github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= @@ -508,83 +431,61 @@ github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= 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.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= -github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= -github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.0 h1:H4L/LhP7GOMf1j17oQAElHgVlbEje2h14A8Tz9cM2BE= -github.com/linxGnu/grocksdb v1.8.0/go.mod h1:09CeBborffXhXdNpEcOeZrLKEnRtrZFEpFdPNI9Zjjg= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= +github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= @@ -606,9 +507,11 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -624,8 +527,8 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA 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/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce h1:/pEpMk55wH0X+E5zedGEMOdLuWmV8P4+4W3+LZaM6kg= -github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= @@ -633,7 +536,6 @@ github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DV 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.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= @@ -645,10 +547,14 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -658,18 +564,19 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 h1:W04oB3d0J01W5jgYRGKsV8LCM6g9EkCvPkZcmFuy0OE= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= @@ -680,9 +587,9 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -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/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -690,102 +597,102 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/prometheus/client_golang v1.20.1 h1:IMJXHOD6eARkQpxo8KkhgEVFlBNm+nkrFUyGlIu7Na8= +github.com/prometheus/client_golang v1.20.1/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= -github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= 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/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= 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.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= 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= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= +github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/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/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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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= @@ -795,65 +702,43 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= -github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= -github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= -github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/bbolt v1.3.10 h1:+BqfJTcCzTItrop8mq/lbzL8wSGtj94UO/3U31shqG0= +go.etcd.io/bbolt v1.3.10/go.mod h1:bK3UQLPJZly7IlNmV7uVHJDxfe5aK9Ll93e/74Y9oEQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -863,6 +748,8 @@ go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= @@ -872,57 +759,33 @@ golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnf 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-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= 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= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 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/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -934,69 +797,37 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/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-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/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-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1008,17 +839,12 @@ golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1027,254 +853,120 @@ golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/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-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-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 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.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -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= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= 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= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 h1:x1vNwUhVOcsYoKyEGCZBH694SBmmBjA2EfauFVEI2+M= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a h1:HiYVD+FGJkTo+9zj1gqz0anapsa1JxjiSrN+BJKyUmE= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 h1:rIo7ocm2roD9DcFIX67Ym8icoGCKSARAiPljFhh5suQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2/go.mod h1:O1cOfN1Cy6QEYr7VxtjOyP5AdAuR0aJ/MYZaaof623Y= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= @@ -1289,24 +981,21 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= @@ -1321,29 +1010,21 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -pgregory.net/rapid v0.6.2 h1:ErW5sL+UKtfBfUTsWHDCoeB+eZKLKMxrSd1VJY6W4bw= -pgregory.net/rapid v0.6.2/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/x/circuit/keeper/genesis.go b/x/circuit/keeper/genesis.go index 50fd6af67c5f..d6747d442908 100644 --- a/x/circuit/keeper/genesis.go +++ b/x/circuit/keeper/genesis.go @@ -3,8 +3,6 @@ package keeper import ( context "context" - "cosmossdk.io/collections" - errorsmod "cosmossdk.io/errors" "cosmossdk.io/x/circuit/types" ) @@ -27,7 +25,7 @@ func (k *Keeper) ExportGenesis(ctx context.Context) (data *types.GenesisState) { }) return false, nil }) - if err != nil && !errorsmod.IsOf(err, collections.ErrInvalidIterator) { + if err != nil { panic(err) } @@ -35,7 +33,7 @@ func (k *Keeper) ExportGenesis(ctx context.Context) (data *types.GenesisState) { disabledMsgs = append(disabledMsgs, msgUrl) return false, nil }) - if err != nil && !errorsmod.IsOf(err, collections.ErrInvalidIterator) { + if err != nil { panic(err) } diff --git a/x/circuit/keeper/genesis_test.go b/x/circuit/keeper/genesis_test.go new file mode 100644 index 000000000000..e85f3f286859 --- /dev/null +++ b/x/circuit/keeper/genesis_test.go @@ -0,0 +1,88 @@ +package keeper_test + +import ( + "context" + "testing" + + "github.com/stretchr/testify/suite" + + storetypes "cosmossdk.io/store/types" + "cosmossdk.io/x/circuit" + "cosmossdk.io/x/circuit/keeper" + "cosmossdk.io/x/circuit/types" + + "github.com/cosmos/cosmos-sdk/codec" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" + "github.com/cosmos/cosmos-sdk/runtime" + "github.com/cosmos/cosmos-sdk/testutil" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" +) + +type GenesisTestSuite struct { + suite.Suite + + ctx context.Context + keeper keeper.Keeper + cdc *codec.ProtoCodec + addrBytes []byte +} + +func TestGenesisTestSuite(t *testing.T) { + suite.Run(t, new(GenesisTestSuite)) +} + +func (s *GenesisTestSuite) SetupTest() { + key := storetypes.NewKVStoreKey(types.StoreKey) + testCtx := testutil.DefaultContextWithDB(s.T(), key, storetypes.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(circuit.AppModuleBasic{}) + + sdkCtx := testCtx.Ctx + s.ctx = sdkCtx + s.cdc = codec.NewProtoCodec(encCfg.InterfaceRegistry) + authority := authtypes.NewModuleAddress("gov") + ac := addresscodec.NewBech32Codec("cosmos") + + bz, err := ac.StringToBytes(authority.String()) + s.Require().NoError(err) + s.addrBytes = bz + + s.keeper = keeper.NewKeeper(s.cdc, runtime.NewKVStoreService(key), authority.String(), ac) +} + +func (s *GenesisTestSuite) TestInitExportGenesis() { + perms := types.Permissions{ + Level: 3, + LimitTypeUrls: []string{"test"}, + } + err := s.keeper.Permissions.Set(s.ctx, s.addrBytes, perms) + s.Require().NoError(err) + + var accounts []*types.GenesisAccountPermissions + genAccsPerms := types.GenesisAccountPermissions{ + Address: sdk.AccAddress(s.addrBytes).String(), + Permissions: &perms, + } + accounts = append(accounts, &genAccsPerms) + + url := "test_url" + + genesisState := &types.GenesisState{ + AccountPermissions: accounts, + DisabledTypeUrls: []string{url}, + } + + s.keeper.InitGenesis(s.ctx, genesisState) + + exported := s.keeper.ExportGenesis(s.ctx) + bz, err := s.cdc.MarshalJSON(exported) + s.Require().NoError(err) + + var exportedGenesisState types.GenesisState + err = s.cdc.UnmarshalJSON(bz, &exportedGenesisState) + s.Require().NoError(err) + + s.Require().Equal(genesisState.AccountPermissions, exportedGenesisState.AccountPermissions) + s.Require().Equal(genesisState.DisabledTypeUrls, exportedGenesisState.DisabledTypeUrls) +} diff --git a/x/circuit/keeper/keeper.go b/x/circuit/keeper/keeper.go index e095a89c8b3f..25513991f8c1 100644 --- a/x/circuit/keeper/keeper.go +++ b/x/circuit/keeper/keeper.go @@ -3,12 +3,12 @@ package keeper import ( context "context" - "github.com/cosmos/cosmos-sdk/codec" - "cosmossdk.io/collections" "cosmossdk.io/core/address" "cosmossdk.io/core/store" "cosmossdk.io/x/circuit/types" + + "github.com/cosmos/cosmos-sdk/codec" ) // Keeper defines the circuit module's keeper. @@ -69,6 +69,7 @@ func (k *Keeper) GetAuthority() []byte { return k.authority } +// IsAllowed returns true when msg URL is not found in the DisableList for given context, else false. func (k *Keeper) IsAllowed(ctx context.Context, msgURL string) (bool, error) { has, err := k.DisableList.Has(ctx, msgURL) return !has, err diff --git a/x/circuit/keeper/msg_server.go b/x/circuit/keeper/msg_server.go index ec5ccf6a8312..0c6bb07cbc40 100644 --- a/x/circuit/keeper/msg_server.go +++ b/x/circuit/keeper/msg_server.go @@ -8,7 +8,6 @@ import ( "cosmossdk.io/collections" errorsmod "cosmossdk.io/errors" - "cosmossdk.io/x/circuit/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -38,6 +37,10 @@ func (srv msgServer) AuthorizeCircuitBreaker(ctx context.Context, msg *types.Msg // Check that the authorizer has the permission level of "super admin" perms, err := srv.Permissions.Get(ctx, address) if err != nil { + if errorsmod.IsOf(err, collections.ErrNotFound) { + return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "only super admins can authorize users") + } + return nil, err } @@ -87,54 +90,37 @@ func (srv msgServer) TripCircuitBreaker(ctx context.Context, msg *types.MsgTripC return nil, err } - switch { - case perms.Level == types.Permissions_LEVEL_SUPER_ADMIN || perms.Level == types.Permissions_LEVEL_ALL_MSGS || bytes.Equal(address, srv.GetAuthority()): - for _, msgTypeURL := range msg.MsgTypeUrls { - // check if the message is in the list of allowed messages - isAllowed, err := srv.IsAllowed(ctx, msgTypeURL) - if err != nil { - return nil, err - } + for _, msgTypeURL := range msg.MsgTypeUrls { + // check if the message is in the list of allowed messages + isAllowed, err := srv.IsAllowed(ctx, msgTypeURL) + if err != nil { + return nil, err + } - if !isAllowed { - return nil, fmt.Errorf("message %s is already disabled", msgTypeURL) - } + if !isAllowed { + return nil, fmt.Errorf("message %s is already disabled", msgTypeURL) + } - if err = srv.DisableList.Set(ctx, msgTypeURL); err != nil { - return nil, err + switch { + case perms.Level == types.Permissions_LEVEL_SUPER_ADMIN || perms.Level == types.Permissions_LEVEL_ALL_MSGS || bytes.Equal(address, srv.GetAuthority()): + // if the sender is a super admin or the module authority, no need to check perms + case perms.Level == types.Permissions_LEVEL_SOME_MSGS: + // if the sender has permission for some messages, check if the sender has permission for this specific message + if !hasPermissionForMsg(perms, msgTypeURL) { + return nil, errorsmod.Wrapf(sdkerrors.ErrUnauthorized, "account does not have permission to trip circuit breaker for message %s", msgTypeURL) } - + default: + return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "account does not have permission to trip circuit breaker") } - case perms.Level == types.Permissions_LEVEL_SOME_MSGS: - for _, msgTypeURL := range msg.MsgTypeUrls { - // check if the message is in the list of allowed messages - isAllowed, err := srv.IsAllowed(ctx, msgTypeURL) - if err != nil { - return nil, err - } - if !isAllowed { - return nil, fmt.Errorf("message %s is already disabled", msgTypeURL) - } - for _, msgurl := range perms.LimitTypeUrls { - if msgTypeURL == msgurl { - if err = srv.DisableList.Set(ctx, msgTypeURL); err != nil { - return nil, err - } - } else { - return nil, errorsmod.Wrapf(sdkerrors.ErrUnauthorized, "account does not have permission to trip circuit breaker for message %s", msgTypeURL) - } - } + if err = srv.DisableList.Set(ctx, msgTypeURL); err != nil { + return nil, err } - default: - return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "account does not have permission to trip circuit breaker") - } - var urls string - if len(msg.GetMsgTypeUrls()) > 1 { - urls = strings.Join(msg.GetMsgTypeUrls(), ",") } + urls := strings.Join(msg.GetMsgTypeUrls(), ",") + sdkCtx := sdk.UnwrapSDKContext(ctx) sdkCtx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( @@ -164,31 +150,36 @@ func (srv msgServer) ResetCircuitBreaker(ctx context.Context, msg *types.MsgRese return nil, err } - if perms.Level == types.Permissions_LEVEL_SUPER_ADMIN || perms.Level == types.Permissions_LEVEL_ALL_MSGS || perms.Level == types.Permissions_LEVEL_SOME_MSGS || bytes.Equal(address, srv.GetAuthority()) { - // add all msg type urls to the disable list - for _, msgTypeURL := range msg.MsgTypeUrls { - isAllowed, err := srv.IsAllowed(ctx, msgTypeURL) - if err != nil { - return nil, err - } + for _, msgTypeURL := range msg.MsgTypeUrls { + // check if the message is in the list of allowed messages + isAllowed, err := srv.IsAllowed(ctx, msgTypeURL) + if err != nil { + return nil, err + } - if isAllowed { - return nil, fmt.Errorf("message %s is not disabled", msgTypeURL) - } + if isAllowed { + return nil, fmt.Errorf("message %s is not disabled", msgTypeURL) + } - if err = srv.DisableList.Remove(ctx, msgTypeURL); err != nil { - return nil, err + switch { + case perms.Level == types.Permissions_LEVEL_SUPER_ADMIN || perms.Level == types.Permissions_LEVEL_ALL_MSGS || bytes.Equal(address, srv.GetAuthority()): + // if the sender is a super admin or the module authority, no need to check perms + case perms.Level == types.Permissions_LEVEL_SOME_MSGS: + // if the sender has permission for some messages, check if the sender has permission for this specific message + if !hasPermissionForMsg(perms, msgTypeURL) { + return nil, errorsmod.Wrapf(sdkerrors.ErrUnauthorized, "account does not have permission to reset circuit breaker for message %s", msgTypeURL) } + default: + return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "account does not have permission to reset circuit breaker") } - } else { - return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "account does not have permission to reset circuit breaker") - } - var urls string - if len(msg.GetMsgTypeUrls()) > 1 { - urls = strings.Join(msg.GetMsgTypeUrls(), ",") + if err = srv.DisableList.Remove(ctx, msgTypeURL); err != nil { + return nil, err + } } + urls := strings.Join(msg.GetMsgTypeUrls(), ",") + sdkCtx := sdk.UnwrapSDKContext(ctx) sdkCtx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( @@ -200,3 +191,13 @@ func (srv msgServer) ResetCircuitBreaker(ctx context.Context, msg *types.MsgRese return &types.MsgResetCircuitBreakerResponse{Success: true}, nil } + +// hasPermissionForMsg returns true if the account can trip or reset the message. +func hasPermissionForMsg(perms types.Permissions, msg string) bool { + for _, msgurl := range perms.LimitTypeUrls { + if msg == msgurl { + return true + } + } + return false +} diff --git a/x/circuit/keeper/msg_server_test.go b/x/circuit/keeper/msg_server_test.go index b5fcfc284553..0e94be0d61e2 100644 --- a/x/circuit/keeper/msg_server_test.go +++ b/x/circuit/keeper/msg_server_test.go @@ -1,17 +1,21 @@ package keeper_test import ( + "context" "testing" + "github.com/stretchr/testify/require" + "cosmossdk.io/collections" "cosmossdk.io/x/circuit/keeper" "cosmossdk.io/x/circuit/types" - "github.com/stretchr/testify/require" + + sdk "github.com/cosmos/cosmos-sdk/types" ) const msgSend = "cosmos.bank.v1beta1.MsgSend" -func Test_AuthorizeCircuitBreaker(t *testing.T) { +func TestAuthorizeCircuitBreaker(t *testing.T) { ft := initFixture(t) srv := keeper.NewMsgServerImpl(ft.keeper) @@ -30,13 +34,23 @@ func Test_AuthorizeCircuitBreaker(t *testing.T) { perms, err := ft.keeper.Permissions.Get(ft.ctx, add1) require.NoError(t, err) - require.Equal(t, adminPerms, perms, "admin perms are not the same") + require.Equal(t, adminPerms, perms, "admin perms are the same") // add a super user allmsgs := types.Permissions{Level: types.Permissions_LEVEL_ALL_MSGS, LimitTypeUrls: []string{""}} msg = &types.MsgAuthorizeCircuitBreaker{Granter: authority, Grantee: addresses[2], Permissions: &allmsgs} _, err = srv.AuthorizeCircuitBreaker(ft.ctx, msg) require.NoError(t, err) + require.Equal( + t, + sdk.NewEvent( + "authorize_circuit_breaker", + sdk.NewAttribute("granter", authority), + sdk.NewAttribute("grantee", addresses[2]), + sdk.NewAttribute("permission", allmsgs.String()), + ), + lastEvent(ft.ctx), + ) add2, err := ft.ac.StringToBytes(addresses[2]) require.NoError(t, err) @@ -44,26 +58,35 @@ func Test_AuthorizeCircuitBreaker(t *testing.T) { perms, err = ft.keeper.Permissions.Get(ft.ctx, add2) require.NoError(t, err) - require.Equal(t, allmsgs, perms, "admin perms are not the same") + require.Equal(t, allmsgs, perms) // unauthorized user who does not have perms trying to authorize superPerms := &types.Permissions{Level: types.Permissions_LEVEL_SUPER_ADMIN, LimitTypeUrls: []string{}} msg = &types.MsgAuthorizeCircuitBreaker{Granter: addresses[3], Grantee: addresses[2], Permissions: superPerms} _, err = srv.AuthorizeCircuitBreaker(ft.ctx, msg) - require.Error(t, err, "user with no permission should fail in authorizing others") + require.Error(t, err, "user with no permission fails in authorizing others") // user with permission level all_msgs tries to grant another user perms somePerms := &types.Permissions{Level: types.Permissions_LEVEL_SOME_MSGS, LimitTypeUrls: []string{}} msg = &types.MsgAuthorizeCircuitBreaker{Granter: addresses[2], Grantee: addresses[3], Permissions: somePerms} _, err = srv.AuthorizeCircuitBreaker(ft.ctx, msg) - require.Error(t, err, "user[2] does not have permission to grant others permission") - - // user successfully grants another user perms to a specific permission + require.Error(t, err, "super user[2] does not have permission to grant others permission") + // admin successfully grants another user perms to a specific permission somemsgs := types.Permissions{Level: types.Permissions_LEVEL_SOME_MSGS, LimitTypeUrls: []string{msgSend}} msg = &types.MsgAuthorizeCircuitBreaker{Granter: authority, Grantee: addresses[3], Permissions: &somemsgs} _, err = srv.AuthorizeCircuitBreaker(ft.ctx, msg) require.NoError(t, err) + require.Equal( + t, + sdk.NewEvent( + "authorize_circuit_breaker", + sdk.NewAttribute("granter", authority), + sdk.NewAttribute("grantee", addresses[3]), + sdk.NewAttribute("permission", somemsgs.String()), + ), + lastEvent(ft.ctx), + ) add3, err := ft.ac.StringToBytes(addresses[3]) require.NoError(t, err) @@ -71,24 +94,24 @@ func Test_AuthorizeCircuitBreaker(t *testing.T) { perms, err = ft.keeper.Permissions.Get(ft.ctx, add3) require.NoError(t, err) - require.Equal(t, somemsgs, perms, "admin perms are not the same") + require.Equal(t, somemsgs, perms) add4, err := ft.ac.StringToBytes(addresses[4]) require.NoError(t, err) perms, err = ft.keeper.Permissions.Get(ft.ctx, add4) - require.ErrorIs(t, err, collections.ErrNotFound, "user should have no perms by default") + require.ErrorIs(t, err, collections.ErrNotFound, "users have no perms by default") - require.Equal(t, types.Permissions{Level: types.Permissions_LEVEL_NONE_UNSPECIFIED, LimitTypeUrls: nil}, perms, "user should have no perms by default") + require.Equal(t, types.Permissions{Level: types.Permissions_LEVEL_NONE_UNSPECIFIED, LimitTypeUrls: nil}, perms, "users have no perms by default") - // admin tries grants another user permission ALL_MSGS with limited urls populated - invalidmsgs := types.Permissions{Level: types.Permissions_LEVEL_SOME_MSGS, LimitTypeUrls: []string{msgSend}} - msg = &types.MsgAuthorizeCircuitBreaker{Granter: authority, Grantee: addresses[4], Permissions: &invalidmsgs} + // admin tries grants another user permission SOME_MSGS with limited urls populated + permis := types.Permissions{Level: types.Permissions_LEVEL_SOME_MSGS, LimitTypeUrls: []string{msgSend}} + msg = &types.MsgAuthorizeCircuitBreaker{Granter: authority, Grantee: addresses[4], Permissions: &permis} _, err = srv.AuthorizeCircuitBreaker(ft.ctx, msg) require.NoError(t, err) } -func Test_TripCircuitBreaker(t *testing.T) { +func TestTripCircuitBreaker(t *testing.T) { ft := initFixture(t) srv := keeper.NewMsgServerImpl(ft.keeper) @@ -101,34 +124,64 @@ func Test_TripCircuitBreaker(t *testing.T) { admintrip := &types.MsgTripCircuitBreaker{Authority: authority, MsgTypeUrls: []string{url}} _, err = srv.TripCircuitBreaker(ft.ctx, admintrip) require.NoError(t, err) + require.Equal( + t, + sdk.NewEvent( + "trip_circuit_breaker", + sdk.NewAttribute("authority", authority), + sdk.NewAttribute("msg_url", url), + ), + lastEvent(ft.ctx), + ) allowed, err := ft.keeper.IsAllowed(ft.ctx, url) require.NoError(t, err) require.False(t, allowed, "circuit breaker should be tripped") + // user with enough permissions tries to trip circuit breaker for two messages + url, url2 := "cosmos.gov.v1beta1.MsgDeposit", "cosmos.gov.v1beta1.MsgVote" + twomsgs := &types.Permissions{Level: types.Permissions_LEVEL_SOME_MSGS, LimitTypeUrls: []string{url, url2}} + msg := &types.MsgAuthorizeCircuitBreaker{Granter: authority, Grantee: addresses[3], Permissions: twomsgs} + _, err = srv.AuthorizeCircuitBreaker(ft.ctx, msg) + require.NoError(t, err) + + // try to trip two messages with enough permissions + twoMsgTrip := &types.MsgTripCircuitBreaker{Authority: addresses[3], MsgTypeUrls: []string{url, url2}} + _, err = srv.TripCircuitBreaker(ft.ctx, twoMsgTrip) + require.NoError(t, err) + // user with all messages trips circuit breaker // add a super user allmsgs := &types.Permissions{Level: types.Permissions_LEVEL_ALL_MSGS, LimitTypeUrls: []string{""}} - msg := &types.MsgAuthorizeCircuitBreaker{Granter: authority, Grantee: addresses[1], Permissions: allmsgs} + msg = &types.MsgAuthorizeCircuitBreaker{Granter: authority, Grantee: addresses[1], Permissions: allmsgs} _, err = srv.AuthorizeCircuitBreaker(ft.ctx, msg) require.NoError(t, err) // try to trip the circuit breaker - url2 := "cosmos.staking.v1beta1.MsgDelegate" + url2 = "cosmos.staking.v1beta1.MsgDelegate" superTrip := &types.MsgTripCircuitBreaker{Authority: addresses[1], MsgTypeUrls: []string{url2}} _, err = srv.TripCircuitBreaker(ft.ctx, superTrip) require.NoError(t, err) + require.Equal( + t, + sdk.NewEvent( + "trip_circuit_breaker", + sdk.NewAttribute("authority", addresses[1]), + sdk.NewAttribute("msg_url", url2), + ), + lastEvent(ft.ctx), + ) allowed, err = ft.keeper.IsAllowed(ft.ctx, url2) require.NoError(t, err) require.False(t, allowed, "circuit breaker should be tripped") - // user with no permission attempts to trips circuit breaker + // user with no permission attempts to trip circuit breaker unknownTrip := &types.MsgTripCircuitBreaker{Authority: addresses[4], MsgTypeUrls: []string{url}} _, err = srv.TripCircuitBreaker(ft.ctx, unknownTrip) require.Error(t, err) - // user has permission to trip circuit breaker for two messages but only has permission for one + // user tries to trip circuit breaker for two messages but only has permission for one url, url2 = "cosmos.staking.v1beta1.MsgCreateValidator", "cosmos.staking.v1beta1.MsgEditValidator" somemsgs := &types.Permissions{Level: types.Permissions_LEVEL_SOME_MSGS, LimitTypeUrls: []string{url}} msg = &types.MsgAuthorizeCircuitBreaker{Granter: authority, Grantee: addresses[2], Permissions: somemsgs} @@ -138,16 +191,16 @@ func Test_TripCircuitBreaker(t *testing.T) { // try to trip two messages but user only has permission for one someTrip := &types.MsgTripCircuitBreaker{Authority: addresses[2], MsgTypeUrls: []string{url, url2}} _, err = srv.TripCircuitBreaker(ft.ctx, someTrip) - require.ErrorContains(t, err, "MsgEditValidator") + require.ErrorContains(t, err, "MsgEditValidator: unauthorized") // user tries to trip an already tripped circuit breaker - alreadyTripped := "cosmos.bank.v1beta1.MsgSend" + alreadyTripped := msgSend twoTrip := &types.MsgTripCircuitBreaker{Authority: addresses[1], MsgTypeUrls: []string{alreadyTripped}} _, err = srv.TripCircuitBreaker(ft.ctx, twoTrip) - require.Error(t, err) + require.ErrorContains(t, err, "already disabled") } -func Test_ResetCircuitBreaker(t *testing.T) { +func TestResetCircuitBreaker(t *testing.T) { ft := initFixture(t) authority, err := ft.ac.BytesToString(ft.mockAddr) require.NoError(t, err) @@ -155,7 +208,7 @@ func Test_ResetCircuitBreaker(t *testing.T) { srv := keeper.NewMsgServerImpl(ft.keeper) // admin resets circuit breaker - url := "cosmos.bank.v1beta1.MsgSend" + url := msgSend // admin trips circuit breaker admintrip := &types.MsgTripCircuitBreaker{Authority: authority, MsgTypeUrls: []string{url}} _, err = srv.TripCircuitBreaker(ft.ctx, admintrip) @@ -168,12 +221,20 @@ func Test_ResetCircuitBreaker(t *testing.T) { adminReset := &types.MsgResetCircuitBreaker{Authority: authority, MsgTypeUrls: []string{url}} _, err = srv.ResetCircuitBreaker(ft.ctx, adminReset) require.NoError(t, err) + require.Equal( + t, + sdk.NewEvent( + "reset_circuit_breaker", + sdk.NewAttribute("authority", authority), + sdk.NewAttribute("msg_url", url), + ), + lastEvent(ft.ctx), + ) allowed, err = ft.keeper.IsAllowed(ft.ctx, url) require.NoError(t, err) require.True(t, allowed, "circuit breaker should be reset") - // user has no permission to reset circuit breaker // admin trips circuit breaker _, err = srv.TripCircuitBreaker(ft.ctx, admintrip) require.NoError(t, err) @@ -182,6 +243,7 @@ func Test_ResetCircuitBreaker(t *testing.T) { require.NoError(t, err) require.False(t, allowed, "circuit breaker should be tripped") + // user has no permission to reset circuit breaker unknownUserReset := &types.MsgResetCircuitBreaker{Authority: addresses[1], MsgTypeUrls: []string{url}} _, err = srv.ResetCircuitBreaker(ft.ctx, unknownUserReset) require.Error(t, err) @@ -206,9 +268,17 @@ func Test_ResetCircuitBreaker(t *testing.T) { allMsgsReset := &types.MsgResetCircuitBreaker{Authority: addresses[1], MsgTypeUrls: []string{url}} _, err = srv.ResetCircuitBreaker(ft.ctx, allMsgsReset) require.NoError(t, err) - - // user tries to reset an message they dont have permission to reset - + require.Equal( + t, + sdk.NewEvent( + "reset_circuit_breaker", + sdk.NewAttribute("authority", addresses[1]), + sdk.NewAttribute("msg_url", url), + ), + lastEvent(ft.ctx), + ) + + // user tries to reset a message they dont have permission to reset url = "cosmos.staking.v1beta1.MsgCreateValidator" // give restricted perms to a user someMsgs := &types.Permissions{Level: types.Permissions_LEVEL_SOME_MSGS, LimitTypeUrls: []string{url2}} @@ -220,13 +290,86 @@ func Test_ResetCircuitBreaker(t *testing.T) { _, err = srv.TripCircuitBreaker(ft.ctx, admintrip) require.NoError(t, err) - // user with all messages resets circuit breaker - someMsgsReset := &types.MsgResetCircuitBreaker{Authority: addresses[2], MsgTypeUrls: []string{url}} + // user with some messages resets circuit breaker + someMsgsReset := &types.MsgResetCircuitBreaker{Authority: addresses[2], MsgTypeUrls: []string{url2}} _, err = srv.ResetCircuitBreaker(ft.ctx, someMsgsReset) require.NoError(t, err) + require.Equal( + t, + sdk.NewEvent( + "reset_circuit_breaker", + sdk.NewAttribute("authority", addresses[2]), + sdk.NewAttribute("msg_url", url2), + ), + lastEvent(ft.ctx), + ) // user tries to reset an already reset circuit breaker - admintrip = &types.MsgTripCircuitBreaker{Authority: addresses[1], MsgTypeUrls: []string{url2}} + someMsgsReset = &types.MsgResetCircuitBreaker{Authority: addresses[1], MsgTypeUrls: []string{url2}} + _, err = srv.ResetCircuitBreaker(ft.ctx, someMsgsReset) + require.Error(t, err) +} + +func lastEvent(ctx context.Context) sdk.Event { + sdkCtx := sdk.UnwrapSDKContext(ctx) + events := sdkCtx.EventManager().Events() + + return events[len(events)-1] +} + +func TestResetCircuitBreakerSomeMsgs(t *testing.T) { + ft := initFixture(t) + authority, err := ft.ac.BytesToString(ft.mockAddr) + require.NoError(t, err) + + srv := keeper.NewMsgServerImpl(ft.keeper) + + // admin resets circuit breaker + url := msgSend + url2 := "the_only_message_acc2_can_trip_and_reset" + + // add acc2 as an authorized account for only url2 + authmsg := &types.MsgAuthorizeCircuitBreaker{ + Granter: authority, + Grantee: addresses[2], + Permissions: &types.Permissions{ + Level: types.Permissions_LEVEL_SOME_MSGS, + LimitTypeUrls: []string{url2}, + }, + } + _, err = srv.AuthorizeCircuitBreaker(ft.ctx, authmsg) + require.NoError(t, err) + + // admin trips circuit breaker + admintrip := &types.MsgTripCircuitBreaker{Authority: authority, MsgTypeUrls: []string{url, url2}} _, err = srv.TripCircuitBreaker(ft.ctx, admintrip) + require.NoError(t, err) + + // sanity check, both messages should be tripped + allowed, err := ft.keeper.IsAllowed(ft.ctx, url) + require.NoError(t, err) + require.False(t, allowed, "circuit breaker should be tripped") + + allowed, err = ft.keeper.IsAllowed(ft.ctx, url2) + require.NoError(t, err) + require.False(t, allowed, "circuit breaker should be tripped") + + // now let's try to reset url using acc2 (should fail) + acc2Reset := &types.MsgResetCircuitBreaker{Authority: addresses[2], MsgTypeUrls: []string{url}} + _, err = srv.ResetCircuitBreaker(ft.ctx, acc2Reset) require.Error(t, err) + + // now let's try to reset url2 using acc2 (should pass) + acc2Reset = &types.MsgResetCircuitBreaker{Authority: addresses[2], MsgTypeUrls: []string{url2}} + _, err = srv.ResetCircuitBreaker(ft.ctx, acc2Reset) + require.NoError(t, err) + + // Only url2 should be reset, url should still be tripped + allowed, err = ft.keeper.IsAllowed(ft.ctx, url) + require.NoError(t, err) + require.False(t, allowed, "circuit breaker should be tripped") + + allowed, err = ft.keeper.IsAllowed(ft.ctx, url2) + require.NoError(t, err) + require.True(t, allowed, "circuit breaker should be reset") } diff --git a/x/circuit/keeper/query.go b/x/circuit/keeper/query.go index 3c889206a561..a8b39e4d4a82 100644 --- a/x/circuit/keeper/query.go +++ b/x/circuit/keeper/query.go @@ -3,11 +3,8 @@ package keeper import ( "context" - "cosmossdk.io/collections" - errorsmod "cosmossdk.io/errors" "cosmossdk.io/x/circuit/types" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" ) @@ -17,22 +14,20 @@ type QueryServer struct { keeper Keeper } -// NewMsgServerImpl returns an implementation of the circuit MsgServer interface +// NewQueryServer returns an implementation of the circuit QueryServer interface // for the provided Keeper. func NewQueryServer(keeper Keeper) types.QueryServer { return &QueryServer{keeper: keeper} } // Account returns account permissions. -func (qs QueryServer) Account(c context.Context, req *types.QueryAccountRequest) (*types.AccountResponse, error) { - sdkCtx := sdk.UnwrapSDKContext(c) - +func (qs QueryServer) Account(ctx context.Context, req *types.QueryAccountRequest) (*types.AccountResponse, error) { add, err := qs.keeper.addressCodec.StringToBytes(req.Address) if err != nil { return nil, err } - perms, err := qs.keeper.Permissions.Get(sdkCtx, add) + perms, err := qs.keeper.Permissions.Get(ctx, add) if err != nil { return nil, err } @@ -42,26 +37,26 @@ func (qs QueryServer) Account(c context.Context, req *types.QueryAccountRequest) // Account returns account permissions. func (qs QueryServer) Accounts(ctx context.Context, req *types.QueryAccountsRequest) (*types.AccountsResponse, error) { - var accounts []*types.GenesisAccountPermissions - results, pageRes, err := query.CollectionPaginate[[]byte, types.Permissions](ctx, qs.keeper.Permissions, req.Pagination) + results, pageRes, err := query.CollectionPaginate( + ctx, + qs.keeper.Permissions, + req.Pagination, + func(key []byte, value types.Permissions) (*types.GenesisAccountPermissions, error) { + addrStr, err := qs.keeper.addressCodec.BytesToString(key) + if err != nil { + return nil, err + } + return &types.GenesisAccountPermissions{ + Address: addrStr, + Permissions: &value, + }, nil + }, + ) if err != nil { return nil, err } - for _, result := range results { - result := result - address, err := qs.keeper.addressCodec.BytesToString(result.Key) - if err != nil { - return nil, err - } - - accounts = append(accounts, &types.GenesisAccountPermissions{ - Address: address, - Permissions: &result.Value, - }) - } - - return &types.AccountsResponse{Accounts: accounts, Pagination: pageRes}, nil + return &types.AccountsResponse{Accounts: results, Pagination: pageRes}, nil } // DisabledList returns a list of disabled message urls @@ -72,7 +67,7 @@ func (qs QueryServer) DisabledList(ctx context.Context, req *types.QueryDisabled msgs = append(msgs, msgUrl) return false, nil }) - if err != nil && !errorsmod.IsOf(err, collections.ErrInvalidIterator) { + if err != nil { return nil, err } diff --git a/x/circuit/keeper/query_test.go b/x/circuit/keeper/query_test.go index c6b22c32fb8d..9fd6845aea58 100644 --- a/x/circuit/keeper/query_test.go +++ b/x/circuit/keeper/query_test.go @@ -3,9 +3,10 @@ package keeper_test import ( "testing" + "github.com/stretchr/testify/require" + "cosmossdk.io/x/circuit/keeper" "cosmossdk.io/x/circuit/types" - "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/types/query" ) @@ -30,6 +31,18 @@ func TestQueryAccount(t *testing.T) { require.Equal(t, res.Permission.LimitTypeUrls, []string{ "test", }) + + // test invalid address + res, err = qs.Account(f.ctx, &types.QueryAccountRequest{Address: "invalid"}) + require.Error(t, err) + require.ErrorContains(t, err, "invalid bech32 string") + require.Nil(t, res) + + // test account not found + res, err = qs.Account(f.ctx, &types.QueryAccountRequest{Address: addresses[1]}) + require.Error(t, err) + require.ErrorContains(t, err, "not found") + require.Nil(t, res) } func TestQueryAccounts(t *testing.T) { @@ -39,19 +52,26 @@ func TestQueryAccounts(t *testing.T) { add, err := f.ac.StringToBytes(addresses[0]) require.NoError(t, err) - err = f.keeper.Permissions.Set(f.ctx, add, f.mockPerms) - require.NoError(t, err) - // create a new query server qs := keeper.NewQueryServer(f.keeper) - // test the Accounts method + // test the Accounts method with no accounts res1, err := qs.Accounts(f.ctx, &types.QueryAccountsRequest{ Pagination: &query.PageRequest{Limit: 10}, }) require.NoError(t, err) + require.Len(t, res1.Accounts, 0) + + err = f.keeper.Permissions.Set(f.ctx, add, f.mockPerms) + require.NoError(t, err) - for _, a := range res1.Accounts { + // test the Accounts method + res2, err := qs.Accounts(f.ctx, &types.QueryAccountsRequest{ + Pagination: &query.PageRequest{Limit: 10}, + }) + require.NoError(t, err) + + for _, a := range res2.Accounts { require.Equal(t, addresses[0], a.Address) require.Equal(t, f.mockPerms, *a.Permissions) } @@ -63,13 +83,18 @@ func TestQueryDisabledList(t *testing.T) { t.Parallel() f := initFixture(t) - require.NoError(t, f.keeper.DisableList.Set(f.ctx, f.mockMsgURL)) - // create a new query server qs := keeper.NewQueryServer(f.keeper) // test the DisabledList method disabledList, err := qs.DisabledList(f.ctx, &types.QueryDisabledListRequest{}) require.NoError(t, err) + require.Len(t, disabledList.DisabledList, 0) + + require.NoError(t, f.keeper.DisableList.Set(f.ctx, f.mockMsgURL)) + + // test the DisabledList method + disabledList, err = qs.DisabledList(f.ctx, &types.QueryDisabledListRequest{}) + require.NoError(t, err) require.Equal(t, []string{f.mockMsgURL}, disabledList.DisabledList) } diff --git a/x/circuit/module.go b/x/circuit/module.go index 4a4f73557be8..33b8b54db3e4 100644 --- a/x/circuit/module.go +++ b/x/circuit/module.go @@ -4,38 +4,36 @@ import ( "context" "encoding/json" "fmt" - "time" + + gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" modulev1 "cosmossdk.io/api/cosmos/circuit/module/v1" "cosmossdk.io/core/address" "cosmossdk.io/core/appmodule" "cosmossdk.io/core/store" "cosmossdk.io/depinject" - "cosmossdk.io/x/circuit/client/cli" - abci "github.com/cometbft/cometbft/abci/types" - gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/spf13/cobra" + "cosmossdk.io/x/circuit/keeper" + "cosmossdk.io/x/circuit/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" - "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - - "cosmossdk.io/x/circuit/keeper" - "cosmossdk.io/x/circuit/types" ) // ConsensusVersion defines the current circuit module consensus version. const ConsensusVersion = 1 var ( - _ module.AppModuleGenesis = AppModule{} - _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModuleBasic = AppModule{} + _ module.HasGenesis = AppModule{} + _ module.HasServices = AppModule{} + + _ appmodule.AppModule = AppModule{} ) // AppModuleBasic defines the basic application module used by the circuit module. @@ -48,7 +46,6 @@ func (AppModuleBasic) Name() string { return types.ModuleName } // RegisterLegacyAminoCodec registers the circuit module's types on the LegacyAmino codec. func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - types.RegisterLegacyAminoCodec(cdc) } // DefaultGenesis returns default genesis state as raw bytes for the circuit @@ -74,16 +71,6 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *g } } -// GetTxCmd returns the root tx command for the circuit module. -func (AppModuleBasic) GetTxCmd() *cobra.Command { - return cli.NewTxCmd() -} - -// GetQueryCmd returns no root query command for the circuit module. -func (AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.GetQueryCmd() -} - // RegisterInterfaces registers interfaces and implementations of the circuit module. func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { types.RegisterInterfaces(registry) @@ -96,8 +83,6 @@ type AppModule struct { keeper keeper.Keeper } -var _ appmodule.AppModule = AppModule{} - // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} @@ -123,14 +108,11 @@ func (AppModule) ConsensusVersion() uint64 { return ConsensusVersion } // InitGenesis performs genesis initialization for the circuit module. It returns // no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { - start := time.Now() +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) { var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) - telemetry.MeasureSince(start, "InitGenesis", "crisis", "unmarshal") am.keeper.InitGenesis(ctx, &genesisState) - return []abci.ValidatorUpdate{} } // ExportGenesis returns the exported genesis state as raw bytes for the circuit diff --git a/x/circuit/types/codec.go b/x/circuit/types/codec.go index ceddf6254300..775eb1aee1c5 100644 --- a/x/circuit/types/codec.go +++ b/x/circuit/types/codec.go @@ -1,21 +1,11 @@ package types import ( - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/codec/legacy" types "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" ) -// RegisterLegacyAminoCodec registers the necessary circuit interfaces and concrete types -// on the provided LegacyAmino codec. These types are used for Amino JSON serialization. -func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - legacy.RegisterAminoMsg(cdc, &MsgAuthorizeCircuitBreaker{}, "cosmos-sdk/MsgAuthorizeCircuitBreaker") - legacy.RegisterAminoMsg(cdc, &MsgResetCircuitBreaker{}, "cosmos-sdk/MsgResetCircuitBreaker") - legacy.RegisterAminoMsg(cdc, &MsgTripCircuitBreaker{}, "cosmos-sdk/MsgTripCircuitBreaker") -} - // RegisterInterfaces registers the interfaces types with the interface registry. func RegisterInterfaces(registry types.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), diff --git a/x/circuit/types/msgs.go b/x/circuit/types/msgs.go deleted file mode 100644 index 216a26514b1c..000000000000 --- a/x/circuit/types/msgs.go +++ /dev/null @@ -1,75 +0,0 @@ -package types - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -var ( - _ sdk.Msg = &MsgAuthorizeCircuitBreaker{} - _ sdk.Msg = &MsgTripCircuitBreaker{} - _ sdk.Msg = &MsgResetCircuitBreaker{} -) - -// NewMsgAuthorizeCircuitBreaker creates a new MsgAuthorizeCircuitBreaker instance. -func NewMsgAuthorizeCircuitBreaker(granter, grantee string, permission *Permissions) *MsgAuthorizeCircuitBreaker { - return &MsgAuthorizeCircuitBreaker{ - Granter: granter, - Grantee: grantee, - Permissions: permission, - } -} - -// Route Implements Msg. -func (m MsgAuthorizeCircuitBreaker) Route() string { return sdk.MsgTypeURL(&m) } - -// Type Implements Msg. -func (m MsgAuthorizeCircuitBreaker) Type() string { return sdk.MsgTypeURL(&m) } - -// GetSigners returns the expected signers for a MsgAuthorizeCircuitBreaker. -func (m MsgAuthorizeCircuitBreaker) GetSigners() []sdk.AccAddress { - granter := sdk.MustAccAddressFromBech32(m.Granter) - - return []sdk.AccAddress{granter} -} - -// NewMsgTripCircuitBreaker creates a new MsgTripCircuitBreaker instance. -func NewMsgTripCircuitBreaker(authority string, urls []string) *MsgTripCircuitBreaker { - return &MsgTripCircuitBreaker{ - Authority: authority, - MsgTypeUrls: urls, - } -} - -// Route Implements Msg. -func (m MsgTripCircuitBreaker) Route() string { return sdk.MsgTypeURL(&m) } - -// Type Implements Msg. -func (m MsgTripCircuitBreaker) Type() string { return sdk.MsgTypeURL(&m) } - -// GetSigners returns the expected signers for a MsgTripCircuitBreaker. -func (m MsgTripCircuitBreaker) GetSigners() []sdk.AccAddress { - granter := sdk.MustAccAddressFromBech32(m.Authority) - - return []sdk.AccAddress{granter} -} - -// NewMsgResetCircuitBreaker creates a new MsgResetCircuitBreaker instance. -func NewMsgResetCircuitBreaker(authority string, urls []string) *MsgResetCircuitBreaker { - return &MsgResetCircuitBreaker{ - Authority: authority, - MsgTypeUrls: urls, - } -} - -// Route Implements Msg. -func (m MsgResetCircuitBreaker) Route() string { return sdk.MsgTypeURL(&m) } - -// Type Implements Msg. -func (m MsgResetCircuitBreaker) Type() string { return sdk.MsgTypeURL(&m) } - -// GetSigners returns the expected signers for a MsgResetCircuitBreaker. -func (m MsgResetCircuitBreaker) GetSigners() []sdk.AccAddress { - granter := sdk.MustAccAddressFromBech32(m.Authority) - - return []sdk.AccAddress{granter} -} diff --git a/x/circuit/types/tx.pb.go b/x/circuit/types/tx.pb.go index dcd824939bb5..df1f62291b2d 100644 --- a/x/circuit/types/tx.pb.go +++ b/x/circuit/types/tx.pb.go @@ -95,7 +95,7 @@ func (m *MsgAuthorizeCircuitBreaker) GetPermissions() *Permissions { return nil } -// MsgAuthorizeCircuitBreaker defines the Msg/AuthorizeCircuitBreaker response type. +// MsgAuthorizeCircuitBreakerResponse defines the Msg/AuthorizeCircuitBreaker response type. type MsgAuthorizeCircuitBreakerResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` } @@ -199,7 +199,7 @@ func (m *MsgTripCircuitBreaker) GetMsgTypeUrls() []string { return nil } -// MsgTripCircuitBreaker defines the Msg/TripCircuitBreaker response type. +// MsgTripCircuitBreakerResponse defines the Msg/TripCircuitBreaker response type. type MsgTripCircuitBreakerResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` } diff --git a/x/consensus/autocli.go b/x/consensus/autocli.go new file mode 100644 index 000000000000..5a2e00900cc4 --- /dev/null +++ b/x/consensus/autocli.go @@ -0,0 +1,36 @@ +package consensus + +import ( + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + consensusv1 "cosmossdk.io/api/cosmos/consensus/v1" + + "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" +) + +// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: consensusv1.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Params", + Use: "params", + Short: "Query the current consensus parameters", + }, + }, + SubCommands: map[string]*autocliv1.ServiceCommandDescriptor{ + "comet": cmtservice.CometBFTAutoCLIDescriptor, + }, + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: consensusv1.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "UpdateParams", + Skip: true, // skipped because authority gated + }, + }, + }, + } +} diff --git a/x/consensus/keeper/keeper.go b/x/consensus/keeper/keeper.go index 6de6457bf28d..b239a9ee5ee7 100644 --- a/x/consensus/keeper/keeper.go +++ b/x/consensus/keeper/keeper.go @@ -3,17 +3,18 @@ package keeper import ( "context" - "cosmossdk.io/collections" - "cosmossdk.io/core/event" - storetypes "cosmossdk.io/core/store" - "cosmossdk.io/errors" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" cmttypes "github.com/cometbft/cometbft/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "cosmossdk.io/collections" + "cosmossdk.io/core/event" + storetypes "cosmossdk.io/core/store" + "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/consensus/exported" "github.com/cosmos/cosmos-sdk/x/consensus/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" @@ -68,12 +69,36 @@ func (k Keeper) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (* return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.GetAuthority(), msg.Authority) } - consensusParams := msg.ToProtoConsensusParams() - if err := cmttypes.ConsensusParamsFromProto(consensusParams).ValidateBasic(); err != nil { + consensusParams, err := msg.ToProtoConsensusParams() + if err != nil { + return nil, err + } + + paramsProto, err := k.ParamsStore.Get(ctx) + if err != nil { + return nil, err + } + + // initialize version params with zero value if not set + if paramsProto.Version == nil { + paramsProto.Version = &cmtproto.VersionParams{} + } + + params := cmttypes.ConsensusParamsFromProto(paramsProto) + + nextParams := params.Update(&consensusParams) + + if err := nextParams.ValidateBasic(); err != nil { + return nil, err + } + + sdkCtx := sdk.UnwrapSDKContext(ctx) + + if err := params.ValidateUpdate(&consensusParams, sdkCtx.BlockHeader().Height); err != nil { return nil, err } - if err := k.ParamsStore.Set(ctx, consensusParams); err != nil { + if err := k.ParamsStore.Set(ctx, nextParams.ToProto()); err != nil { return nil, err } diff --git a/x/consensus/keeper/keeper_test.go b/x/consensus/keeper/keeper_test.go index e1b142d319c3..c349c8dbaffe 100644 --- a/x/consensus/keeper/keeper_test.go +++ b/x/consensus/keeper/keeper_test.go @@ -17,7 +17,6 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" "github.com/cosmos/cosmos-sdk/x/consensus/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" ) type KeeperTestSuite struct { @@ -31,11 +30,12 @@ type KeeperTestSuite struct { func (s *KeeperTestSuite) SetupTest() { key := storetypes.NewKVStoreKey(consensusparamkeeper.StoreKey) testCtx := testutil.DefaultContextWithDB(s.T(), key, storetypes.NewTransientStoreKey("transient_test")) - ctx := testCtx.Ctx.WithBlockHeader(cmtproto.Header{}) + header := cmtproto.Header{Height: 5} + ctx := testCtx.Ctx.WithBlockHeader(header) encCfg := moduletestutil.MakeTestEncodingConfig() storeService := runtime.NewKVStoreService(key) - keeper := consensusparamkeeper.NewKeeper(encCfg.Codec, storeService, authtypes.NewModuleAddress(govtypes.ModuleName).String(), runtime.EventService{}) + keeper := consensusparamkeeper.NewKeeper(encCfg.Codec, storeService, authtypes.NewModuleAddress("gov").String(), runtime.EventService{}) s.ctx = ctx s.consensusParamsKeeper = &keeper @@ -44,6 +44,8 @@ func (s *KeeperTestSuite) SetupTest() { queryHelper := baseapp.NewQueryServerTestHelper(ctx, encCfg.InterfaceRegistry) types.RegisterQueryServer(queryHelper, keeper) s.queryClient = types.NewQueryClient(queryHelper) + err := s.consensusParamsKeeper.ParamsStore.Set(ctx, cmttypes.DefaultConsensusParams().ToProto()) + s.Require().NoError(err) } func TestKeeperTestSuite(t *testing.T) { @@ -51,7 +53,14 @@ func TestKeeperTestSuite(t *testing.T) { } func (s *KeeperTestSuite) TestGRPCQueryConsensusParams() { - defaultConsensusParams := cmttypes.DefaultConsensusParams().ToProto() + // Create ConsensusParams with modified fields + modifiedConsensusParams := cmttypes.DefaultConsensusParams().ToProto() + modifiedConsensusParams.Block.MaxBytes++ + modifiedConsensusParams.Block.MaxGas = 100 + modifiedConsensusParams.Evidence.MaxAgeDuration++ + modifiedConsensusParams.Evidence.MaxAgeNumBlocks++ + modifiedConsensusParams.Evidence.MaxBytes++ + modifiedConsensusParams.Validator.PubKeyTypes = []string{cmttypes.ABCIPubKeyTypeSecp256k1} testCases := []struct { msg string @@ -66,18 +75,51 @@ func (s *KeeperTestSuite) TestGRPCQueryConsensusParams() { func() { input := &types.MsgUpdateParams{ Authority: s.consensusParamsKeeper.GetAuthority(), - Block: defaultConsensusParams.Block, - Validator: defaultConsensusParams.Validator, - Evidence: defaultConsensusParams.Evidence, + Block: modifiedConsensusParams.Block, + Validator: modifiedConsensusParams.Validator, + Evidence: modifiedConsensusParams.Evidence, } - s.consensusParamsKeeper.UpdateParams(s.ctx, input) + _, err := s.consensusParamsKeeper.UpdateParams(s.ctx, input) + s.Require().NoError(err) }, types.QueryParamsResponse{ Params: &cmtproto.ConsensusParams{ - Block: defaultConsensusParams.Block, - Validator: defaultConsensusParams.Validator, - Evidence: defaultConsensusParams.Evidence, - Version: defaultConsensusParams.Version, + Block: modifiedConsensusParams.Block, + Validator: modifiedConsensusParams.Validator, + Evidence: modifiedConsensusParams.Evidence, + Version: modifiedConsensusParams.Version, + Abci: &cmtproto.ABCIParams{ + VoteExtensionsEnableHeight: 0, + }, + }, + }, + true, + }, + { + "success with abci", + types.QueryParamsRequest{}, + func() { + input := &types.MsgUpdateParams{ + Authority: s.consensusParamsKeeper.GetAuthority(), + Block: modifiedConsensusParams.Block, + Validator: modifiedConsensusParams.Validator, + Evidence: modifiedConsensusParams.Evidence, + Abci: &cmtproto.ABCIParams{ + VoteExtensionsEnableHeight: 1234, + }, + } + _, err := s.consensusParamsKeeper.UpdateParams(s.ctx, input) + s.Require().NoError(err) + }, + types.QueryParamsResponse{ + Params: &cmtproto.ConsensusParams{ + Block: modifiedConsensusParams.Block, + Validator: modifiedConsensusParams.Validator, + Evidence: modifiedConsensusParams.Evidence, + Version: modifiedConsensusParams.Version, + Abci: &cmtproto.ABCIParams{ + VoteExtensionsEnableHeight: 1234, + }, }, }, true, @@ -131,7 +173,7 @@ func (s *KeeperTestSuite) TestUpdateParams() { Evidence: defaultConsensusParams.Evidence, }, expErr: true, - expErrMsg: "block.MaxBytes must be greater than 0. Got -10", + expErrMsg: "block.MaxBytes must be -1 or greater than 0. Got -10", }, { name: "invalid authority", @@ -144,6 +186,109 @@ func (s *KeeperTestSuite) TestUpdateParams() { expErr: true, expErrMsg: "invalid authority", }, + { + name: "nil evidence params", + input: &types.MsgUpdateParams{ + Authority: s.consensusParamsKeeper.GetAuthority(), + Block: defaultConsensusParams.Block, + Validator: defaultConsensusParams.Validator, + Evidence: nil, + }, + expErr: true, + expErrMsg: "all parameters must be present", + }, + { + name: "nil block params", + input: &types.MsgUpdateParams{ + Authority: s.consensusParamsKeeper.GetAuthority(), + Block: nil, + Validator: defaultConsensusParams.Validator, + Evidence: defaultConsensusParams.Evidence, + }, + expErr: true, + expErrMsg: "all parameters must be present", + }, + { + name: "nil validator params", + input: &types.MsgUpdateParams{ + Authority: s.consensusParamsKeeper.GetAuthority(), + Block: defaultConsensusParams.Block, + Validator: nil, + Evidence: defaultConsensusParams.Evidence, + }, + expErr: true, + expErrMsg: "all parameters must be present", + }, + { + name: "valid ABCI update", + input: &types.MsgUpdateParams{ + Authority: s.consensusParamsKeeper.GetAuthority(), + Block: defaultConsensusParams.Block, + Validator: defaultConsensusParams.Validator, + Evidence: defaultConsensusParams.Evidence, + Abci: &cmtproto.ABCIParams{ + VoteExtensionsEnableHeight: 1235, + }, + }, + expErr: false, + expErrMsg: "", + }, + { + name: "noop ABCI update", + input: &types.MsgUpdateParams{ + Authority: s.consensusParamsKeeper.GetAuthority(), + Block: defaultConsensusParams.Block, + Validator: defaultConsensusParams.Validator, + Evidence: defaultConsensusParams.Evidence, + Abci: &cmtproto.ABCIParams{ + VoteExtensionsEnableHeight: 1235, + }, + }, + expErr: false, + expErrMsg: "", + }, + { + name: "valid ABCI clear", + input: &types.MsgUpdateParams{ + Authority: s.consensusParamsKeeper.GetAuthority(), + Block: defaultConsensusParams.Block, + Validator: defaultConsensusParams.Validator, + Evidence: defaultConsensusParams.Evidence, + Abci: &cmtproto.ABCIParams{ + VoteExtensionsEnableHeight: 0, + }, + }, + expErr: false, + expErrMsg: "", + }, + { + name: "invalid ABCI update - current height", + input: &types.MsgUpdateParams{ + Authority: s.consensusParamsKeeper.GetAuthority(), + Block: defaultConsensusParams.Block, + Validator: defaultConsensusParams.Validator, + Evidence: defaultConsensusParams.Evidence, + Abci: &cmtproto.ABCIParams{ + VoteExtensionsEnableHeight: 5, + }, + }, + expErr: true, + expErrMsg: "vote extensions cannot be updated to a past or current height", + }, + { + name: "invalid ABCI update - past height", + input: &types.MsgUpdateParams{ + Authority: s.consensusParamsKeeper.GetAuthority(), + Block: defaultConsensusParams.Block, + Validator: defaultConsensusParams.Validator, + Evidence: defaultConsensusParams.Evidence, + Abci: &cmtproto.ABCIParams{ + VoteExtensionsEnableHeight: 4, + }, + }, + expErr: true, + expErrMsg: "vote extensions cannot be updated to a past or current height", + }, } for _, tc := range testCases { @@ -156,6 +301,16 @@ func (s *KeeperTestSuite) TestUpdateParams() { s.Require().Contains(err.Error(), tc.expErrMsg) } else { s.Require().NoError(err) + + res, err := s.consensusParamsKeeper.Params(s.ctx, &types.QueryParamsRequest{}) + s.Require().NoError(err) + + if tc.input.Abci != nil { + s.Require().Equal(tc.input.Abci, res.Params.Abci) + } + s.Require().Equal(tc.input.Block, res.Params.Block) + s.Require().Equal(tc.input.Evidence, res.Params.Evidence) + s.Require().Equal(tc.input.Validator, res.Params.Validator) } }) } diff --git a/x/consensus/module.go b/x/consensus/module.go index 1834077305f9..b4f7ef1eb7db 100644 --- a/x/consensus/module.go +++ b/x/consensus/module.go @@ -2,25 +2,21 @@ package consensus import ( "context" - "encoding/json" - modulev1 "cosmossdk.io/api/cosmos/consensus/module/v1" - "cosmossdk.io/core/appmodule" - "cosmossdk.io/core/event" - "cosmossdk.io/depinject" - abci "github.com/cometbft/cometbft/abci/types" gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/spf13/cobra" "google.golang.org/grpc" + modulev1 "cosmossdk.io/api/cosmos/consensus/module/v1" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/core/event" storetypes "cosmossdk.io/core/store" + "cosmossdk.io/depinject" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/consensus/keeper" @@ -32,35 +28,25 @@ import ( const ConsensusVersion = 1 var ( - _ module.AppModule = AppModule{} - _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModuleBasic = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasServices = AppModule{} ) -// AppModuleBasic defines the basic application module used by the consensus_param module. +// AppModuleBasic defines the basic application module used by the consensus module. type AppModuleBasic struct { cdc codec.Codec } -// Name returns the consensus_param module's name. +// Name returns the consensus module's name. func (AppModuleBasic) Name() string { return types.ModuleName } -// RegisterLegacyAminoCodec registers the consensus_param module's types on the LegacyAmino codec. +// RegisterLegacyAminoCodec registers the consensus module's types on the LegacyAmino codec. func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { types.RegisterLegacyAminoCodec(cdc) } -// DefaultGenesis returns default genesis state as raw bytes for the consensus_param -// module. -func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - // nil is returned since default genesis of consensus params is handled by tendermint - return nil -} - -// ValidateGenesis performs genesis state validation -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error { - return nil -} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *gwruntime.ServeMux) { if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { @@ -68,16 +54,6 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *g } } -// GetTxCmd returns the root tx command -func (AppModuleBasic) GetTxCmd() *cobra.Command { - return nil -} - -// GetQueryCmd returns no root query command -func (AppModuleBasic) GetQueryCmd() *cobra.Command { - return nil -} - // RegisterInterfaces registers interfaces and implementations of the bank module. func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { types.RegisterInterfaces(registry) @@ -90,11 +66,6 @@ type AppModule struct { keeper keeper.Keeper } -var ( - _ appmodule.AppModule = AppModule{} - _ appmodule.HasServices = AppModule{} -) - // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} @@ -116,21 +87,6 @@ func NewAppModule(cdc codec.Codec, keeper keeper.Keeper) AppModule { } } -// Name returns the consensus_param module's name. -func (AppModule) Name() string { return types.ModuleName } - -// InitGenesis is handled by for init genesis of consensus_param -func (am AppModule) InitGenesis(sdk.Context, codec.JSONCodec, json.RawMessage) []abci.ValidatorUpdate { - // nil is returned since initgenesis of consensus params is handled by tendermint - return nil -} - -// ExportGenesis is handled by CometBFT export of genesis -func (am AppModule) ExportGenesis(sdk.Context, codec.JSONCodec) json.RawMessage { - // nil is returned since ExportGenesis of consensus params is handled by CometBFT and baseapp - return nil -} - // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return ConsensusVersion } diff --git a/x/consensus/types/msgs.go b/x/consensus/types/msgs.go index 8b1a8345eef9..b62c0052f7cb 100644 --- a/x/consensus/types/msgs.go +++ b/x/consensus/types/msgs.go @@ -1,6 +1,8 @@ package types import ( + "errors" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" cmttypes "github.com/cometbft/cometbft/types" @@ -9,15 +11,12 @@ import ( var _ sdk.Msg = &MsgUpdateParams{} -// GetSigners returns the signer addresses that are expected to sign the result -// of GetSignBytes. -func (msg MsgUpdateParams) GetSigners() []sdk.AccAddress { - authority, _ := sdk.AccAddressFromBech32(msg.Authority) - return []sdk.AccAddress{authority} -} +func (msg MsgUpdateParams) ToProtoConsensusParams() (cmtproto.ConsensusParams, error) { + if msg.Evidence == nil || msg.Block == nil || msg.Validator == nil { + return cmtproto.ConsensusParams{}, errors.New("all parameters must be present") + } -func (msg MsgUpdateParams) ToProtoConsensusParams() cmtproto.ConsensusParams { - return cmtproto.ConsensusParams{ + cp := cmtproto.ConsensusParams{ Block: &cmtproto.BlockParams{ MaxBytes: msg.Block.MaxBytes, MaxGas: msg.Block.MaxGas, @@ -32,4 +31,12 @@ func (msg MsgUpdateParams) ToProtoConsensusParams() cmtproto.ConsensusParams { }, Version: cmttypes.DefaultConsensusParams().ToProto().Version, // Version is stored in x/upgrade } + + if msg.Abci != nil { + cp.Abci = &cmtproto.ABCIParams{ + VoteExtensionsEnableHeight: msg.Abci.VoteExtensionsEnableHeight, + } + } + + return cp, nil } diff --git a/x/consensus/types/query.pb.go b/x/consensus/types/query.pb.go index b6f6df03ec71..6d237edd87eb 100644 --- a/x/consensus/types/query.pb.go +++ b/x/consensus/types/query.pb.go @@ -155,7 +155,7 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryClient interface { - // Params queries the parameters of x/consensus_param module. + // Params queries the parameters of x/consensus module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) } @@ -178,7 +178,7 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . // QueryServer is the server API for Query service. type QueryServer interface { - // Params queries the parameters of x/consensus_param module. + // Params queries the parameters of x/consensus module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) } diff --git a/x/consensus/types/tx.pb.go b/x/consensus/types/tx.pb.go index 48d8732859e9..a954f8ec0390 100644 --- a/x/consensus/types/tx.pb.go +++ b/x/consensus/types/tx.pb.go @@ -43,6 +43,8 @@ type MsgUpdateParams struct { Block *types.BlockParams `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` Evidence *types.EvidenceParams `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence,omitempty"` Validator *types.ValidatorParams `protobuf:"bytes,4,opt,name=validator,proto3" json:"validator,omitempty"` + // Since: cosmos-sdk 0.50 + Abci *types.ABCIParams `protobuf:"bytes,5,opt,name=abci,proto3" json:"abci,omitempty"` } func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } @@ -106,6 +108,13 @@ func (m *MsgUpdateParams) GetValidator() *types.ValidatorParams { return nil } +func (m *MsgUpdateParams) GetAbci() *types.ABCIParams { + if m != nil { + return m.Abci + } + return nil +} + // MsgUpdateParamsResponse defines the response structure for executing a // MsgUpdateParams message. type MsgUpdateParamsResponse struct { @@ -152,32 +161,34 @@ func init() { func init() { proto.RegisterFile("cosmos/consensus/v1/tx.proto", fileDescriptor_2135c60575ab504d) } var fileDescriptor_2135c60575ab504d = []byte{ - // 399 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x49, 0xce, 0x2f, 0xce, - 0xcd, 0x2f, 0xd6, 0x4f, 0xce, 0xcf, 0x2b, 0x4e, 0xcd, 0x2b, 0x2e, 0x2d, 0xd6, 0x2f, 0x33, 0xd4, - 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x86, 0xc8, 0xea, 0xc1, 0x65, 0xf5, - 0xca, 0x0c, 0xa5, 0x04, 0x13, 0x73, 0x33, 0xf3, 0xf2, 0xf5, 0xc1, 0x24, 0x44, 0x9d, 0x94, 0x24, - 0x44, 0x5d, 0x3c, 0x98, 0xa7, 0x0f, 0xd5, 0x04, 0x91, 0x12, 0x87, 0x5a, 0x90, 0x5b, 0x9c, 0x0e, - 0x32, 0x3a, 0xb7, 0x38, 0x1d, 0x2a, 0x21, 0x5b, 0x92, 0x9a, 0x97, 0x92, 0x5a, 0x94, 0x9b, 0x99, - 0x57, 0xa2, 0x5f, 0x52, 0x59, 0x90, 0x5a, 0xac, 0x5f, 0x90, 0x58, 0x94, 0x98, 0x0b, 0xd5, 0xa7, - 0xb4, 0x83, 0x89, 0x8b, 0xdf, 0xb7, 0x38, 0x3d, 0xb4, 0x20, 0x25, 0xb1, 0x24, 0x35, 0x00, 0x2c, - 0x23, 0x64, 0xc6, 0xc5, 0x99, 0x58, 0x5a, 0x92, 0x91, 0x5f, 0x94, 0x59, 0x52, 0x29, 0xc1, 0xa8, - 0xc0, 0xa8, 0xc1, 0xe9, 0x24, 0x71, 0x69, 0x8b, 0xae, 0x08, 0xd4, 0x42, 0xc7, 0x94, 0x94, 0xa2, - 0xd4, 0xe2, 0xe2, 0xe0, 0x92, 0xa2, 0xcc, 0xbc, 0xf4, 0x20, 0x84, 0x52, 0x21, 0x63, 0x2e, 0xd6, - 0xa4, 0x9c, 0xfc, 0xe4, 0x6c, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x59, 0x3d, 0x84, 0xd5, - 0x7a, 0x60, 0xab, 0xf5, 0x9c, 0x40, 0xd2, 0x10, 0x5b, 0x82, 0x20, 0x6a, 0x85, 0x6c, 0xb8, 0x38, - 0x52, 0xcb, 0x32, 0x53, 0x52, 0xf3, 0x92, 0x53, 0x25, 0x98, 0xc1, 0xfa, 0x14, 0x30, 0xf5, 0xb9, - 0x42, 0x55, 0x40, 0xb5, 0xc2, 0x75, 0x08, 0xd9, 0x73, 0x71, 0x96, 0x25, 0xe6, 0x64, 0xa6, 0x24, - 0x96, 0xe4, 0x17, 0x49, 0xb0, 0x80, 0xb5, 0x2b, 0x62, 0x6a, 0x0f, 0x83, 0x29, 0x81, 0xea, 0x47, - 0xe8, 0xb1, 0xb2, 0x6c, 0x7a, 0xbe, 0x41, 0x0b, 0xe1, 0x87, 0xae, 0xe7, 0x1b, 0xb4, 0xd4, 0x20, - 0xfe, 0xd4, 0x2d, 0x4e, 0xc9, 0xd6, 0xaf, 0x40, 0x8a, 0x31, 0xb4, 0x60, 0x52, 0x92, 0xe4, 0x12, - 0x47, 0x13, 0x0a, 0x4a, 0x2d, 0x2e, 0x00, 0x29, 0x37, 0x2a, 0xe0, 0x62, 0xf6, 0x2d, 0x4e, 0x17, - 0x4a, 0xe2, 0xe2, 0x41, 0x09, 0x58, 0x15, 0x3d, 0x2c, 0x11, 0xad, 0x87, 0x66, 0x88, 0x94, 0x0e, - 0x31, 0xaa, 0x60, 0x56, 0x49, 0xb1, 0x36, 0x3c, 0xdf, 0xa0, 0xc5, 0xe8, 0xe4, 0x71, 0xe2, 0x91, - 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, - 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x7a, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, - 0xc9, 0xf9, 0xb9, 0xfa, 0xf0, 0x54, 0x88, 0xd5, 0x83, 0xe0, 0xc0, 0x4a, 0x62, 0x03, 0x27, 0x0c, - 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x79, 0x2c, 0x44, 0x5c, 0xb3, 0x02, 0x00, 0x00, + // 421 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x4f, 0xcb, 0x12, 0x41, + 0x1c, 0xc7, 0x5d, 0xff, 0x44, 0x4e, 0x41, 0xb4, 0x05, 0xae, 0x8b, 0x2e, 0x26, 0x11, 0x22, 0x39, + 0x93, 0x0a, 0x41, 0x11, 0x84, 0x1b, 0x41, 0x1d, 0x84, 0x30, 0xea, 0xd0, 0x25, 0x66, 0x77, 0x87, + 0x75, 0xd0, 0xdd, 0x59, 0x76, 0xc6, 0x45, 0x6f, 0xd1, 0xb1, 0x53, 0x2f, 0xc5, 0x43, 0x2f, 0xa2, + 0xa3, 0x74, 0xea, 0xf8, 0xa0, 0x07, 0xe1, 0x79, 0x15, 0x0f, 0xce, 0x8e, 0xee, 0xf3, 0xa8, 0x87, + 0xe7, 0x22, 0xb8, 0xdf, 0xcf, 0x67, 0xbe, 0xcc, 0x6f, 0x7e, 0xa0, 0xe6, 0x32, 0x1e, 0x30, 0x8e, + 0x5c, 0x16, 0x72, 0x12, 0xf2, 0x19, 0x47, 0x49, 0x17, 0x89, 0x39, 0x8c, 0x62, 0x26, 0x98, 0xfe, + 0x28, 0x4d, 0xe1, 0x21, 0x85, 0x49, 0xd7, 0x7c, 0x88, 0x03, 0x1a, 0x32, 0x24, 0x7f, 0x53, 0xce, + 0xac, 0xa6, 0xdc, 0x77, 0xf9, 0x0f, 0x29, 0x29, 0x8d, 0x2a, 0xaa, 0x20, 0xe0, 0xfe, 0xee, 0xe8, + 0x80, 0xfb, 0x2a, 0xa8, 0x0b, 0x12, 0x7a, 0x24, 0x0e, 0x68, 0x28, 0x90, 0x58, 0x44, 0x84, 0xa3, + 0x08, 0xc7, 0x38, 0x50, 0x5e, 0xf3, 0x32, 0x0f, 0x1e, 0x0c, 0xb9, 0xff, 0x25, 0xf2, 0xb0, 0x20, + 0x9f, 0x64, 0xa2, 0xbf, 0x04, 0x65, 0x3c, 0x13, 0x63, 0x16, 0x53, 0xb1, 0x30, 0xb4, 0x86, 0xd6, + 0x2a, 0xdb, 0xc6, 0xbf, 0x3f, 0x9d, 0xc7, 0xaa, 0x70, 0xe0, 0x79, 0x31, 0xe1, 0xfc, 0xb3, 0x88, + 0x69, 0xe8, 0x8f, 0x32, 0x54, 0xef, 0x83, 0x92, 0x33, 0x65, 0xee, 0xc4, 0xc8, 0x37, 0xb4, 0xd6, + 0xbd, 0x5e, 0x1d, 0x66, 0xd5, 0x50, 0x56, 0x43, 0x7b, 0x17, 0xa7, 0x2d, 0xa3, 0x94, 0xd5, 0xdf, + 0x80, 0xbb, 0x24, 0xa1, 0x1e, 0x09, 0x5d, 0x62, 0x14, 0xa4, 0xd7, 0x38, 0xf5, 0xde, 0x2b, 0x42, + 0xa9, 0x07, 0x43, 0x7f, 0x0b, 0xca, 0x09, 0x9e, 0x52, 0x0f, 0x0b, 0x16, 0x1b, 0x45, 0xa9, 0x3f, + 0x39, 0xd5, 0xbf, 0xee, 0x11, 0xe5, 0x67, 0x8e, 0xfe, 0x02, 0x14, 0xb1, 0xe3, 0x52, 0xa3, 0x24, + 0xdd, 0xda, 0xa9, 0x3b, 0xb0, 0xdf, 0x7d, 0x54, 0x9a, 0x24, 0x5f, 0xbf, 0xfa, 0xb9, 0x5d, 0xb6, + 0xb3, 0x5b, 0xff, 0xda, 0x2e, 0xdb, 0xcf, 0xd2, 0xc9, 0x74, 0xb8, 0x37, 0x41, 0xf3, 0x6b, 0x6f, + 0x7c, 0x34, 0xd8, 0x66, 0x15, 0x54, 0x8e, 0x3e, 0x8d, 0x08, 0x8f, 0x76, 0x78, 0x2f, 0x02, 0x85, + 0x21, 0xf7, 0x75, 0x07, 0xdc, 0xbf, 0xf1, 0x14, 0x4f, 0xe1, 0x99, 0xd5, 0x80, 0x47, 0x87, 0x98, + 0xcf, 0x6f, 0x43, 0xed, 0xab, 0xcc, 0xd2, 0x8f, 0xed, 0xb2, 0xad, 0xd9, 0x1f, 0xfe, 0xae, 0x2d, + 0x6d, 0xb5, 0xb6, 0xb4, 0x8b, 0xb5, 0xa5, 0xfd, 0xde, 0x58, 0xb9, 0xd5, 0xc6, 0xca, 0xfd, 0xdf, + 0x58, 0xb9, 0x6f, 0xd0, 0xa7, 0x62, 0x3c, 0x73, 0xa0, 0xcb, 0x02, 0x74, 0xd8, 0xdb, 0xb3, 0x17, + 0x94, 0x23, 0x72, 0xee, 0xc8, 0x55, 0xea, 0x5f, 0x05, 0x00, 0x00, 0xff, 0xff, 0xd1, 0x27, 0xbf, + 0x79, 0xe5, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -192,7 +203,7 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgClient interface { - // UpdateParams defines a governance operation for updating the x/consensus_param module parameters. + // UpdateParams defines a governance operation for updating the x/consensus module parameters. // The authority is defined in the keeper. // // Since: cosmos-sdk 0.47 @@ -218,7 +229,7 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts // MsgServer is the server API for Msg service. type MsgServer interface { - // UpdateParams defines a governance operation for updating the x/consensus_param module parameters. + // UpdateParams defines a governance operation for updating the x/consensus module parameters. // The authority is defined in the keeper. // // Since: cosmos-sdk 0.47 @@ -288,6 +299,18 @@ func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Abci != nil { + { + size, err := m.Abci.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } if m.Validator != nil { { size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i]) @@ -390,6 +413,10 @@ func (m *MsgUpdateParams) Size() (n int) { l = m.Validator.Size() n += 1 + l + sovTx(uint64(l)) } + if m.Abci != nil { + l = m.Abci.Size() + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -577,6 +604,42 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Abci", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Abci == nil { + m.Abci = &types.ABCIParams{} + } + if err := m.Abci.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/crisis/abci.go b/x/crisis/abci.go index 8ce275ecd799..2eacc641c4ad 100644 --- a/x/crisis/abci.go +++ b/x/crisis/abci.go @@ -2,7 +2,6 @@ package crisis import ( "context" - "time" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" @@ -12,7 +11,7 @@ import ( // check all registered invariants func EndBlocker(ctx context.Context, k keeper.Keeper) { - defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyEndBlocker) + defer telemetry.ModuleMeasureSince(types.ModuleName, telemetry.Now(), telemetry.MetricKeyEndBlocker) sdkCtx := sdk.UnwrapSDKContext(ctx) if k.InvCheckPeriod() == 0 || sdkCtx.BlockHeight()%int64(k.InvCheckPeriod()) != 0 { diff --git a/x/crisis/autocli.go b/x/crisis/autocli.go new file mode 100644 index 000000000000..92edd95d0cd8 --- /dev/null +++ b/x/crisis/autocli.go @@ -0,0 +1,30 @@ +package crisis + +import ( + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + crisisv1beta1 "cosmossdk.io/api/cosmos/crisis/v1beta1" +) + +// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: crisisv1beta1.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "VerifyInvariant", + Use: "invariant-broken [module-name] [invariant-route] --from mykey", + Short: "Submit proof that an invariant broken", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "invariant_module_name"}, + {ProtoField: "invariant_route"}, + }, + }, + { + RpcMethod: "UpdateParams", + Skip: true, // Skipped because UpdateParams is authority gated + }, + }, + }, + } +} diff --git a/x/crisis/client/cli/tx.go b/x/crisis/client/cli/tx.go deleted file mode 100644 index 50b7e16a34b8..000000000000 --- a/x/crisis/client/cli/tx.go +++ /dev/null @@ -1,60 +0,0 @@ -package cli - -import ( - "errors" - - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/cosmos/cosmos-sdk/x/crisis/types" -) - -// NewTxCmd returns a root CLI command handler for all x/crisis transaction commands. -func NewTxCmd() *cobra.Command { - txCmd := &cobra.Command{ - Use: types.ModuleName, - Short: "Crisis transactions subcommands", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - txCmd.AddCommand(NewMsgVerifyInvariantTxCmd()) - - return txCmd -} - -// NewMsgVerifyInvariantTxCmd returns a CLI command handler for creating a -// MsgVerifyInvariant transaction. -func NewMsgVerifyInvariantTxCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "invariant-broken [module-name] [invariant-route]", - Short: "Submit proof that an invariant broken to halt the chain", - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - moduleName, route := args[0], args[1] - if moduleName == "" { - return errors.New("invalid module name") - } - if route == "" { - return errors.New("invalid invariant route") - } - - senderAddr := clientCtx.GetFromAddress() - - msg := types.NewMsgVerifyInvariant(senderAddr, moduleName, route) - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/crisis/client/cli/tx_test.go b/x/crisis/client/cli/tx_test.go deleted file mode 100644 index d62bc1c977ed..000000000000 --- a/x/crisis/client/cli/tx_test.go +++ /dev/null @@ -1,98 +0,0 @@ -package cli_test - -import ( - "context" - "fmt" - "io" - "testing" - - sdkmath "cosmossdk.io/math" - rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - "github.com/stretchr/testify/require" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" - "github.com/cosmos/cosmos-sdk/testutil" - sdk "github.com/cosmos/cosmos-sdk/types" - testutilmod "github.com/cosmos/cosmos-sdk/types/module/testutil" - "github.com/cosmos/cosmos-sdk/x/crisis" - "github.com/cosmos/cosmos-sdk/x/crisis/client/cli" -) - -func TestNewMsgVerifyInvariantTxCmd(t *testing.T) { - encCfg := testutilmod.MakeTestEncodingConfig(crisis.AppModuleBasic{}) - kr := keyring.NewInMemory(encCfg.Codec) - baseCtx := client.Context{}. - WithKeyring(kr). - WithTxConfig(encCfg.TxConfig). - WithCodec(encCfg.Codec). - WithClient(clitestutil.MockCometRPC{Client: rpcclientmock.Client{}}). - WithAccountRetriever(client.MockAccountRetriever{}). - WithOutput(io.Discard). - WithChainID("test-chain") - - accounts := testutil.CreateKeyringAccounts(t, kr, 1) - testCases := []struct { - name string - args []string - expectErrMsg string - }{ - { - "missing module", - []string{ - "", "total-supply", - fmt.Sprintf("--%s=%s", flags.FlagFrom, accounts[0].Address.String()), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), - }, - "invalid module name", - }, - { - "missing invariant route", - []string{ - "bank", "", - fmt.Sprintf("--%s=%s", flags.FlagFrom, accounts[0].Address.String()), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), - }, - "invalid invariant route", - }, - { - "valid transaction", - []string{ - "bank", "total-supply", - fmt.Sprintf("--%s=%s", flags.FlagFrom, accounts[0].Address.String()), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), - }, - "", - }, - } - - for _, tc := range testCases { - tc := tc - t.Run(tc.name, func(t *testing.T) { - ctx := svrcmd.CreateExecuteContext(context.Background()) - cmd := cli.NewMsgVerifyInvariantTxCmd() - cmd.SetContext(ctx) - cmd.SetArgs(tc.args) - require.NoError(t, client.SetCmdClientContextHandler(baseCtx, cmd)) - - out, err := clitestutil.ExecTestCLICmd(baseCtx, cmd, tc.args) - if tc.expectErrMsg != "" { - require.Error(t, err) - require.Contains(t, out.String(), tc.expectErrMsg) - } else { - require.NoError(t, err) - msg := &sdk.TxResponse{} - require.NoError(t, baseCtx.Codec.UnmarshalJSON(out.Bytes(), msg), out.String()) - } - }) - } -} diff --git a/x/crisis/keeper/keeper.go b/x/crisis/keeper/keeper.go index 6c8e24ae9940..edf66124301b 100644 --- a/x/crisis/keeper/keeper.go +++ b/x/crisis/keeper/keeper.go @@ -7,9 +7,8 @@ import ( "cosmossdk.io/collections" "cosmossdk.io/core/address" - "cosmossdk.io/log" - storetypes "cosmossdk.io/core/store" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/crisis/keeper/msg_server.go b/x/crisis/keeper/msg_server.go index f68c32771b01..789306937375 100644 --- a/x/crisis/keeper/msg_server.go +++ b/x/crisis/keeper/msg_server.go @@ -89,8 +89,7 @@ func (k *Keeper) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) ( return nil, errors.Wrap(sdkerrors.ErrInvalidCoins, "negative constant fee") } - sdkCtx := sdk.UnwrapSDKContext(ctx) - if err := k.ConstantFee.Set(sdkCtx, msg.ConstantFee); err != nil { + if err := k.ConstantFee.Set(ctx, msg.ConstantFee); err != nil { return nil, err } diff --git a/x/crisis/keeper/msg_server_test.go b/x/crisis/keeper/msg_server_test.go index e097939f6c43..a8ef22a202c6 100644 --- a/x/crisis/keeper/msg_server_test.go +++ b/x/crisis/keeper/msg_server_test.go @@ -47,7 +47,7 @@ func (s *KeeperTestSuite) SetupTest() { func (s *KeeperTestSuite) TestMsgVerifyInvariant() { // default params - constantFee := sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(1000)) + constantFee := sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(1000)) err := s.keeper.ConstantFee.Set(s.ctx, constantFee) s.Require().NoError(err) @@ -123,7 +123,7 @@ func (s *KeeperTestSuite) TestMsgVerifyInvariant() { func (s *KeeperTestSuite) TestMsgUpdateParams() { // default params - constantFee := sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(1000)) + constantFee := sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(1000)) testCases := []struct { name string diff --git a/x/crisis/module.go b/x/crisis/module.go index a7e0147a4227..87cad631b45a 100644 --- a/x/crisis/module.go +++ b/x/crisis/module.go @@ -4,9 +4,7 @@ import ( "context" "encoding/json" "fmt" - "time" - abci "github.com/cometbft/cometbft/abci/types" gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cast" "github.com/spf13/cobra" @@ -22,11 +20,9 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/server" servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/crisis/client/cli" "github.com/cosmos/cosmos-sdk/x/crisis/exported" "github.com/cosmos/cosmos-sdk/x/crisis/keeper" "github.com/cosmos/cosmos-sdk/x/crisis/types" @@ -36,7 +32,14 @@ import ( // ConsensusVersion defines the current x/crisis module consensus version. const ConsensusVersion = 2 -var _ module.AppModuleBasic = AppModuleBasic{} +var ( + _ module.AppModuleBasic = AppModule{} + _ module.HasGenesis = AppModule{} + _ module.HasServices = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasEndBlocker = AppModule{} +) // Module init related flags const ( @@ -75,14 +78,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the crisis module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *gwruntime.ServeMux) {} -// GetTxCmd returns the root tx command for the crisis module. -func (b AppModuleBasic) GetTxCmd() *cobra.Command { - return cli.NewTxCmd() -} - -// GetQueryCmd returns no root query command for the crisis module. -func (AppModuleBasic) GetQueryCmd() *cobra.Command { return nil } - // RegisterInterfaces registers interfaces and implementations of the crisis // module. func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { @@ -118,11 +113,6 @@ func NewAppModule(keeper *keeper.Keeper, skipGenesisInvariants bool, ss exported } } -var ( - _ appmodule.AppModule = AppModule{} - _ appmodule.HasEndBlocker = AppModule{} -) - // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} @@ -134,11 +124,6 @@ func AddModuleInitFlags(startCmd *cobra.Command) { startCmd.Flags().Bool(FlagSkipGenesisInvariants, false, "Skip x/crisis invariants check on startup") } -// Name returns the crisis module's name. -func (AppModule) Name() string { - return types.ModuleName -} - // RegisterServices registers module services. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), am.keeper) @@ -151,17 +136,14 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { // InitGenesis performs genesis initialization for the crisis module. It returns // no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { - start := time.Now() +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) { var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) - telemetry.MeasureSince(start, "InitGenesis", "crisis", "unmarshal") am.keeper.InitGenesis(ctx, &genesisState) if !am.skipGenesisInvariants { am.keeper.AssertInvariants(ctx) } - return []abci.ValidatorUpdate{} } // ExportGenesis returns the exported genesis state as raw bytes for the crisis diff --git a/x/crisis/types/msgs.go b/x/crisis/types/msgs.go index 9d2e3c7350ae..b62eaaf023a0 100644 --- a/x/crisis/types/msgs.go +++ b/x/crisis/types/msgs.go @@ -18,20 +18,7 @@ func NewMsgVerifyInvariant(sender sdk.AccAddress, invModeName, invRoute string) } } -// get the bytes for the message signer to sign on -func (msg MsgVerifyInvariant) GetSigners() []sdk.AccAddress { - sender, _ := sdk.AccAddressFromBech32(msg.Sender) - return []sdk.AccAddress{sender} -} - // FullInvariantRoute - get the messages full invariant route func (msg MsgVerifyInvariant) FullInvariantRoute() string { return msg.InvariantModuleName + "/" + msg.InvariantRoute } - -// GetSigners returns the signer addresses that are expected to sign the result -// of GetSignBytes. -func (msg MsgUpdateParams) GetSigners() []sdk.AccAddress { - authority, _ := sdk.AccAddressFromBech32(msg.Authority) - return []sdk.AccAddress{authority} -} diff --git a/x/distribution/README.md b/x/distribution/README.md index bd7153218291..32858fd696db 100644 --- a/x/distribution/README.md +++ b/x/distribution/README.md @@ -352,15 +352,22 @@ The transaction fails if the amount cannot be transferred from the sender to the ```go func (k Keeper) FundCommunityPool(ctx context.Context, amount sdk.Coins, sender sdk.AccAddress) error { - if err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, sender, types.ModuleName, amount); err != nil { - return err - } + if err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, sender, types.ModuleName, amount); err != nil { + return err + } - feePool := k.GetFeePool(ctx) - feePool.CommunityPool = feePool.CommunityPool.Add(sdk.NewDecCoinsFromCoins(amount...)...) - k.SetFeePool(ctx, feePool) + feePool, err := k.FeePool.Get(ctx) + if err != nil { + return err + } + + feePool.CommunityPool = feePool.CommunityPool.Add(sdk.NewDecCoinsFromCoins(amount...)...) + + if err := k.FeePool.Set(ctx, feePool); err != nil { + return err + } - return nil + return nil } ``` diff --git a/x/distribution/abci.go b/x/distribution/abci.go index 415adcc5715c..70fdb7eeb270 100644 --- a/x/distribution/abci.go +++ b/x/distribution/abci.go @@ -1,8 +1,6 @@ package distribution import ( - "time" - "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/distribution/keeper" @@ -12,7 +10,7 @@ import ( // BeginBlocker sets the proposer for determining distribution during endblock // and distribute rewards for the previous block. func BeginBlocker(ctx sdk.Context, k keeper.Keeper) error { - defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) + defer telemetry.ModuleMeasureSince(types.ModuleName, telemetry.Now(), telemetry.MetricKeyBeginBlocker) // determine the total power signing the block var previousTotalPower int64 @@ -23,11 +21,12 @@ func BeginBlocker(ctx sdk.Context, k keeper.Keeper) error { // TODO this is Tendermint-dependent // ref https://github.com/cosmos/cosmos-sdk/issues/3095 if ctx.BlockHeight() > 1 { - k.AllocateTokens(ctx, previousTotalPower, ctx.VoteInfos()) + if err := k.AllocateTokens(ctx, previousTotalPower, ctx.VoteInfos()); err != nil { + return err + } } // record the proposer for when we payout on the next block consAddr := sdk.ConsAddress(ctx.BlockHeader().ProposerAddress) - k.SetPreviousProposerConsAddr(ctx, consAddr) - return nil + return k.SetPreviousProposerConsAddr(ctx, consAddr) } diff --git a/x/distribution/autocli.go b/x/distribution/autocli.go new file mode 100644 index 000000000000..a8c6c4041b0d --- /dev/null +++ b/x/distribution/autocli.go @@ -0,0 +1,149 @@ +package distribution + +import ( + "fmt" + + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + distirbuitonv1beta1 "cosmossdk.io/api/cosmos/distribution/v1beta1" + + "github.com/cosmos/cosmos-sdk/version" +) + +// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: distirbuitonv1beta1.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Params", + Use: "params", + Short: "Query the current distribution parameters.", + }, + { + RpcMethod: "ValidatorDistributionInfo", + Use: "validator-distribution-info [validator]", + Short: "Query validator distribution info", + Example: fmt.Sprintf(`Example: $ %s query distribution validator-distribution-info [validator-address]`, version.AppName), + + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "validator_address"}, + }, + }, + { + RpcMethod: "ValidatorOutstandingRewards", + Use: "validator-outstanding-rewards [validator]", + Short: "Query distribution outstanding (un-withdrawn) rewards for a validator and all their delegations", + Example: fmt.Sprintf(`$ %s query distribution validator-outstanding-rewards [validator-address]`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "validator_address"}, + }, + }, + { + RpcMethod: "ValidatorCommission", + Use: "commission [validator]", + Short: "Query distribution validator commission", + Example: fmt.Sprintf(`$ %s query distribution commission [validator-address]`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "validator_address"}, + }, + }, + { + RpcMethod: "ValidatorSlashes", + Use: "slashes [validator] [start-height] [end-height]", + Short: "Query distribution validator slashes", + Example: fmt.Sprintf(`$ %s query distribution slashes [validator-address] 0 100`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "validator_address"}, + {ProtoField: "starting_height"}, + {ProtoField: "ending_height"}, + }, + }, + { + RpcMethod: "DelegationRewards", + Use: "rewards-by-validator [delegator-addr] [validator-addr]", + Short: "Query all distribution delegator from a particular validator", + Example: fmt.Sprintf("$ %s query distribution rewards [delegator-address] [validator-address]", version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "delegator_address"}, + {ProtoField: "validator_address"}, + }, + }, + { + RpcMethod: "DelegationTotalRewards", + Use: "rewards [delegator-addr]", + Short: "Query all distribution delegator rewards", + Long: "Query all rewards earned by a delegator", + Example: fmt.Sprintf("$ %s query distribution rewards [delegator-address]", version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "delegator_address"}, + }, + }, + { + RpcMethod: "CommunityPool", + Use: "community-pool", + Short: "Query the amount of coins in the community pool", + Example: fmt.Sprintf(`$ %s query distribution community-pool`, version.AppName), + }, + }, + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: distirbuitonv1beta1.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "SetWithdrawAddress", + Use: "set-withdraw-addr [withdraw-addr]", + Short: "Change the default withdraw address for rewards associated with an address", + Example: fmt.Sprintf("%s tx distribution set-withdraw-addr cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p --from mykey", version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "withdraw_address"}, + }, + }, + { + RpcMethod: "WithdrawDelegatorReward", + Use: "withdraw-rewards [validator-addr]", + Short: "Withdraw rewards from a given delegation address", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "validator_address"}, + }, + }, + { + RpcMethod: "WithdrawValidatorCommission", + Use: "withdraw-validator-commission [validator-addr]", + Short: "Withdraw commissions from a validator address (must be a validator operator)", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "validator_address"}, + }, + }, + { + RpcMethod: "DepositValidatorRewardsPool", + Use: "fund-validator-rewards-pool [validator-addr] [amount]", + Short: "Fund the validator rewards pool with the specified amount", + Example: fmt.Sprintf("%s tx distribution fund-validator-rewards-pool cosmosvaloper1x20lytyf6zkcrv5edpkfkn8sz578qg5sqfyqnp 100uatom --from mykey", version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "validator_address"}, + {ProtoField: "amount", Varargs: true}, + }, + }, + { + RpcMethod: "FundCommunityPool", + Use: "fund-community-pool [amount]", + Short: "Funds the community pool with the specified amount", + Example: fmt.Sprintf(`$ %s tx distribution fund-community-pool 100uatom --from mykey`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "amount", Varargs: true}, + }, + }, + { + RpcMethod: "UpdateParams", + Skip: true, // skipped because authority gated + }, + { + RpcMethod: "CommunityPoolSpend", + Skip: true, // skipped because authority gated + }, + }, + EnhanceCustomCommand: false, // use custom commands only until v0.51 + }, + } +} diff --git a/x/distribution/client/cli/query.go b/x/distribution/client/cli/query.go deleted file mode 100644 index 5999fee397cd..000000000000 --- a/x/distribution/client/cli/query.go +++ /dev/null @@ -1,367 +0,0 @@ -package cli - -import ( - "fmt" - "strconv" - "strings" - - "cosmossdk.io/core/address" - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/version" - "github.com/cosmos/cosmos-sdk/x/distribution/types" -) - -// GetQueryCmd returns the cli query commands for this module -func GetQueryCmd(ac address.Codec) *cobra.Command { - distQueryCmd := &cobra.Command{ - Use: types.ModuleName, - Short: "Querying commands for the distribution module", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - distQueryCmd.AddCommand( - GetCmdQueryParams(), - GetCmdQueryValidatorDistributionInfo(), - GetCmdQueryValidatorOutstandingRewards(), - GetCmdQueryValidatorCommission(), - GetCmdQueryValidatorSlashes(), - GetCmdQueryDelegatorRewards(ac), - GetCmdQueryCommunityPool(), - ) - - return distQueryCmd -} - -// GetCmdQueryParams implements the query params command. -func GetCmdQueryParams() *cobra.Command { - cmd := &cobra.Command{ - Use: "params", - Args: cobra.NoArgs, - Short: "Query distribution params", - RunE: func(cmd *cobra.Command, _ []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.Params(cmd.Context(), &types.QueryParamsRequest{}) - if err != nil { - return err - } - - return clientCtx.PrintProto(&res.Params) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - return cmd -} - -// GetCmdQueryValidatorDistributionInfo implements the query validator distribution info command. -func GetCmdQueryValidatorDistributionInfo() *cobra.Command { - bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() - - cmd := &cobra.Command{ - Use: "validator-distribution-info [validator]", - Args: cobra.ExactArgs(1), - Short: "Query validator distribution info", - Long: strings.TrimSpace( - fmt.Sprintf(`Query validator distribution info. -Example: -$ %s query distribution validator-distribution-info %s1lwjmdnks33xwnmfayc64ycprww49n33mtm92ne -`, - version.AppName, bech32PrefixValAddr, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - validatorAddr, err := sdk.ValAddressFromBech32(args[0]) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.ValidatorDistributionInfo(cmd.Context(), &types.QueryValidatorDistributionInfoRequest{ - ValidatorAddress: validatorAddr.String(), - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - return cmd -} - -// GetCmdQueryValidatorOutstandingRewards implements the query validator -// outstanding rewards command. -func GetCmdQueryValidatorOutstandingRewards() *cobra.Command { - bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() - - cmd := &cobra.Command{ - Use: "validator-outstanding-rewards [validator]", - Args: cobra.ExactArgs(1), - Short: "Query distribution outstanding (un-withdrawn) rewards for a validator and all their delegations", - Long: strings.TrimSpace( - fmt.Sprintf(`Query distribution outstanding (un-withdrawn) rewards for a validator and all their delegations. - -Example: -$ %s query distribution validator-outstanding-rewards %s1lwjmdnks33xwnmfayc64ycprww49n33mtm92ne -`, - version.AppName, bech32PrefixValAddr, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - validatorAddr, err := sdk.ValAddressFromBech32(args[0]) - if err != nil { - return err - } - - res, err := queryClient.ValidatorOutstandingRewards( - cmd.Context(), - &types.QueryValidatorOutstandingRewardsRequest{ValidatorAddress: validatorAddr.String()}, - ) - if err != nil { - return err - } - - return clientCtx.PrintProto(&res.Rewards) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - return cmd -} - -// GetCmdQueryValidatorCommission implements the query validator commission command. -func GetCmdQueryValidatorCommission() *cobra.Command { - bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() - - cmd := &cobra.Command{ - Use: "commission [validator]", - Args: cobra.ExactArgs(1), - Short: "Query distribution validator commission", - Long: strings.TrimSpace( - fmt.Sprintf(`Query validator commission rewards from delegators to that validator. - -Example: -$ %s query distribution commission %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj -`, - version.AppName, bech32PrefixValAddr, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - validatorAddr, err := sdk.ValAddressFromBech32(args[0]) - if err != nil { - return err - } - - res, err := queryClient.ValidatorCommission( - cmd.Context(), - &types.QueryValidatorCommissionRequest{ValidatorAddress: validatorAddr.String()}, - ) - if err != nil { - return err - } - - return clientCtx.PrintProto(&res.Commission) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - return cmd -} - -// GetCmdQueryValidatorSlashes implements the query validator slashes command. -func GetCmdQueryValidatorSlashes() *cobra.Command { - bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() - - cmd := &cobra.Command{ - Use: "slashes [validator] [start-height] [end-height]", - Args: cobra.ExactArgs(3), - Short: "Query distribution validator slashes", - Long: strings.TrimSpace( - fmt.Sprintf(`Query all slashes of a validator for a given block range. - -Example: -$ %s query distribution slashes %svaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 0 100 -`, - version.AppName, bech32PrefixValAddr, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - validatorAddr, err := sdk.ValAddressFromBech32(args[0]) - if err != nil { - return err - } - - startHeight, err := strconv.ParseUint(args[1], 10, 64) - if err != nil { - return fmt.Errorf("start-height %s not a valid uint, please input a valid start-height", args[1]) - } - - endHeight, err := strconv.ParseUint(args[2], 10, 64) - if err != nil { - return fmt.Errorf("end-height %s not a valid uint, please input a valid end-height", args[2]) - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - res, err := queryClient.ValidatorSlashes( - cmd.Context(), - &types.QueryValidatorSlashesRequest{ - ValidatorAddress: validatorAddr.String(), - StartingHeight: startHeight, - EndingHeight: endHeight, - Pagination: pageReq, - }, - ) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "validator slashes") - return cmd -} - -// GetCmdQueryDelegatorRewards implements the query delegator rewards command. -func GetCmdQueryDelegatorRewards(ac address.Codec) *cobra.Command { - bech32PrefixAccAddr := sdk.GetConfig().GetBech32AccountAddrPrefix() - bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() - - cmd := &cobra.Command{ - Use: "rewards [delegator-addr] [validator-addr]", - Args: cobra.RangeArgs(1, 2), - Short: "Query all distribution delegator rewards or rewards from a particular validator", - Long: strings.TrimSpace( - fmt.Sprintf(`Query all rewards earned by a delegator, optionally restrict to rewards from a single validator. - -Example: -$ %s query distribution rewards %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p -$ %s query distribution rewards %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj -`, - version.AppName, bech32PrefixAccAddr, version.AppName, bech32PrefixAccAddr, bech32PrefixValAddr, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - _, err = ac.StringToBytes(args[0]) - if err != nil { - return err - } - - // query for rewards from a particular delegation - ctx := cmd.Context() - if len(args) == 2 { - validatorAddr, err := sdk.ValAddressFromBech32(args[1]) - if err != nil { - return err - } - - res, err := queryClient.DelegationRewards( - ctx, - &types.QueryDelegationRewardsRequest{DelegatorAddress: args[0], ValidatorAddress: validatorAddr.String()}, - ) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - } - - res, err := queryClient.DelegationTotalRewards( - ctx, - &types.QueryDelegationTotalRewardsRequest{DelegatorAddress: args[0]}, - ) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - return cmd -} - -// GetCmdQueryCommunityPool returns the command for fetching community pool info. -func GetCmdQueryCommunityPool() *cobra.Command { - cmd := &cobra.Command{ - Use: "community-pool", - Args: cobra.NoArgs, - Short: "Query the amount of coins in the community pool", - Long: strings.TrimSpace( - fmt.Sprintf(`Query all coins in the community pool which is under Governance control. - -Example: -$ %s query distribution community-pool -`, - version.AppName, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.CommunityPool(cmd.Context(), &types.QueryCommunityPoolRequest{}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - return cmd -} diff --git a/x/distribution/client/cli/query_test.go b/x/distribution/client/cli/query_test.go deleted file mode 100644 index 19f62c44bb56..000000000000 --- a/x/distribution/client/cli/query_test.go +++ /dev/null @@ -1,464 +0,0 @@ -package cli_test - -import ( - "fmt" - "io" - "strings" - "testing" - - abci "github.com/cometbft/cometbft/abci/types" - rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" - "github.com/stretchr/testify/suite" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/codec/address" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - "github.com/cosmos/cosmos-sdk/testutil" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - "github.com/cosmos/cosmos-sdk/testutil/network" - sdk "github.com/cosmos/cosmos-sdk/types" - testutilmod "github.com/cosmos/cosmos-sdk/types/module/testutil" - "github.com/cosmos/cosmos-sdk/x/bank" - "github.com/cosmos/cosmos-sdk/x/distribution/client/cli" - distrtestutil "github.com/cosmos/cosmos-sdk/x/distribution/testutil" - "github.com/cosmos/cosmos-sdk/x/gov" - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" -) - -type CLITestSuite struct { - suite.Suite - - kr keyring.Keyring - encCfg testutilmod.TestEncodingConfig - baseCtx client.Context - clientCtx client.Context -} - -func TestCLITestSuite(t *testing.T) { - suite.Run(t, new(CLITestSuite)) -} - -func (s *CLITestSuite) SetupSuite() { - s.encCfg = testutilmod.MakeTestEncodingConfig(gov.AppModuleBasic{}, bank.AppModuleBasic{}) - s.kr = keyring.NewInMemory(s.encCfg.Codec) - s.baseCtx = client.Context{}. - WithKeyring(s.kr). - WithTxConfig(s.encCfg.TxConfig). - WithCodec(s.encCfg.Codec). - WithClient(clitestutil.MockCometRPC{Client: rpcclientmock.Client{}}). - WithAccountRetriever(client.MockAccountRetriever{}). - WithOutput(io.Discard). - WithChainID("test-chain") - - ctxGen := func() client.Context { - bz, _ := s.encCfg.Codec.Marshal(&sdk.TxResponse{}) - c := clitestutil.NewMockCometRPC(abci.ResponseQuery{ - Value: bz, - }) - return s.baseCtx.WithClient(c) - } - s.clientCtx = ctxGen() - - cfg, err := network.DefaultConfigWithAppConfig(distrtestutil.AppConfig) - s.Require().NoError(err) - - genesisState := cfg.GenesisState - var mintData minttypes.GenesisState - s.Require().NoError(cfg.Codec.UnmarshalJSON(genesisState[minttypes.ModuleName], &mintData)) - - inflation := sdk.MustNewDecFromStr("1.0") - mintData.Minter.Inflation = inflation - mintData.Params.InflationMin = inflation - mintData.Params.InflationMax = inflation - - mintDataBz, err := cfg.Codec.MarshalJSON(&mintData) - s.Require().NoError(err) - genesisState[minttypes.ModuleName] = mintDataBz - cfg.GenesisState = genesisState -} - -func (s *CLITestSuite) TestGetCmdQueryParams() { - testCases := []struct { - name string - args []string - expectedOutput string - }{ - { - "json output", - []string{fmt.Sprintf("--%s=json", flags.FlagOutput)}, - `{"community_tax":"0","base_proposer_reward":"0","bonus_proposer_reward":"0","withdraw_addr_enabled":false}`, - }, - { - "text output", - []string{fmt.Sprintf("--%s=text", flags.FlagOutput)}, - `base_proposer_reward: "0" -bonus_proposer_reward: "0" -community_tax: "0" -withdraw_addr_enabled: false`, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryParams() - - out, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, tc.args) - s.Require().NoError(err) - s.Require().Equal(tc.expectedOutput, strings.TrimSpace(out.String())) - }) - } -} - -func (s *CLITestSuite) TestGetCmdQueryValidatorDistributionInfo() { - addr := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) - val := sdk.ValAddress(addr[0].Address.String()) - - testCases := []struct { - name string - args []string - expErr bool - }{ - { - "invalid val address", - []string{"invalid address", fmt.Sprintf("--%s=json", flags.FlagOutput)}, - true, - }, - { - "json output", - []string{val.String(), fmt.Sprintf("--%s=json", flags.FlagOutput)}, - false, - }, - { - "text output", - []string{val.String(), fmt.Sprintf("--%s=text", flags.FlagOutput)}, - false, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryValidatorDistributionInfo() - - _, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, tc.args) - if tc.expErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - } - }) - } -} - -func (s *CLITestSuite) TestGetCmdQueryValidatorOutstandingRewards() { - val := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) - - testCases := []struct { - name string - args []string - expectErr bool - expectedOutput string - }{ - { - "invalid validator address", - []string{ - fmt.Sprintf("--%s=3", flags.FlagHeight), - "foo", - }, - true, - "", - }, - { - "json output", - []string{ - fmt.Sprintf("--%s=3", flags.FlagHeight), - sdk.ValAddress(val[0].Address).String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - `{"rewards":[]}`, - }, - { - "text output", - []string{ - fmt.Sprintf("--%s=text", flags.FlagOutput), - fmt.Sprintf("--%s=3", flags.FlagHeight), - sdk.ValAddress(val[0].Address).String(), - }, - false, - `rewards: []`, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryValidatorOutstandingRewards() - - out, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - s.Require().Equal(tc.expectedOutput, strings.TrimSpace(out.String())) - } - }) - } -} - -func (s *CLITestSuite) TestGetCmdQueryValidatorCommission() { - val := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) - - testCases := []struct { - name string - args []string - expectErr bool - expectedOutput string - }{ - { - "invalid validator address", - []string{ - fmt.Sprintf("--%s=3", flags.FlagHeight), - "foo", - }, - true, - "", - }, - { - "json output", - []string{ - fmt.Sprintf("--%s=3", flags.FlagHeight), - sdk.ValAddress(val[0].Address).String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - `{"commission":[]}`, - }, - { - "text output", - []string{ - fmt.Sprintf("--%s=text", flags.FlagOutput), - fmt.Sprintf("--%s=3", flags.FlagHeight), - sdk.ValAddress(val[0].Address).String(), - }, - false, - `commission: []`, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryValidatorCommission() - - out, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - s.Require().Equal(tc.expectedOutput, strings.TrimSpace(out.String())) - } - }) - } -} - -func (s *CLITestSuite) TestGetCmdQueryValidatorSlashes() { - val := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) - - testCases := []struct { - name string - args []string - expectErr bool - expectedOutput string - }{ - { - "invalid validator address", - []string{ - fmt.Sprintf("--%s=3", flags.FlagHeight), - "foo", "1", "3", - }, - true, - "", - }, - { - "invalid start height", - []string{ - fmt.Sprintf("--%s=3", flags.FlagHeight), - sdk.ValAddress(val[0].Address).String(), "-1", "3", - }, - true, - "", - }, - { - "invalid end height", - []string{ - fmt.Sprintf("--%s=3", flags.FlagHeight), - sdk.ValAddress(val[0].Address).String(), "1", "-3", - }, - true, - "", - }, - { - "json output", - []string{ - fmt.Sprintf("--%s=3", flags.FlagHeight), - sdk.ValAddress(val[0].Address).String(), "1", "3", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - "{\"slashes\":[],\"pagination\":null}", - }, - { - "text output", - []string{ - fmt.Sprintf("--%s=text", flags.FlagOutput), - fmt.Sprintf("--%s=3", flags.FlagHeight), - sdk.ValAddress(val[0].Address).String(), "1", "3", - }, - false, - "pagination: null\nslashes: []", - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryValidatorSlashes() - - out, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - s.Require().Equal(tc.expectedOutput, strings.TrimSpace(out.String())) - } - }) - } -} - -func (s *CLITestSuite) TestGetCmdQueryDelegatorRewards() { - val := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) - addr := val[0].Address - valAddr := sdk.ValAddress(addr) - - testCases := []struct { - name string - args []string - expectErr bool - expectedOutput string - }{ - { - "invalid delegator address", - []string{ - fmt.Sprintf("--%s=5", flags.FlagHeight), - "foo", valAddr.String(), - }, - true, - "", - }, - { - "invalid validator address", - []string{ - fmt.Sprintf("--%s=5", flags.FlagHeight), - addr.String(), "foo", - }, - true, - "", - }, - { - "json output", - []string{ - fmt.Sprintf("--%s=5", flags.FlagHeight), - addr.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - `{"rewards":[],"total":[]}`, - }, - { - "json output (specific validator)", - []string{ - fmt.Sprintf("--%s=5", flags.FlagHeight), - addr.String(), valAddr.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - `{"rewards":[]}`, - }, - { - "text output", - []string{ - fmt.Sprintf("--%s=text", flags.FlagOutput), - fmt.Sprintf("--%s=5", flags.FlagHeight), - addr.String(), - }, - false, - `rewards: [] -total: []`, - }, - { - "text output (specific validator)", - []string{ - fmt.Sprintf("--%s=text", flags.FlagOutput), - fmt.Sprintf("--%s=5", flags.FlagHeight), - addr.String(), valAddr.String(), - }, - false, - `rewards: []`, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryDelegatorRewards(address.NewBech32Codec("cosmos")) - - out, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - s.Require().Equal(tc.expectedOutput, strings.TrimSpace(out.String())) - } - }) - } -} - -func (s *CLITestSuite) TestGetCmdQueryCommunityPool() { - testCases := []struct { - name string - args []string - expectedOutput string - }{ - { - "json output", - []string{fmt.Sprintf("--%s=3", flags.FlagHeight), fmt.Sprintf("--%s=json", flags.FlagOutput)}, - `{"pool":[]}`, - }, - { - "text output", - []string{fmt.Sprintf("--%s=text", flags.FlagOutput), fmt.Sprintf("--%s=3", flags.FlagHeight)}, - `pool: []`, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryCommunityPool() - - out, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, tc.args) - s.Require().NoError(err) - s.Require().Equal(tc.expectedOutput, strings.TrimSpace(out.String())) - }) - } -} diff --git a/x/distribution/client/cli/tx.go b/x/distribution/client/cli/tx.go index 769f9b1ce4ce..577389028856 100644 --- a/x/distribution/client/cli/tx.go +++ b/x/distribution/client/cli/tx.go @@ -4,10 +4,11 @@ import ( "fmt" "strings" - "cosmossdk.io/core/address" "github.com/spf13/cobra" "github.com/spf13/pflag" + "cosmossdk.io/core/address" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" @@ -27,7 +28,7 @@ const ( ) // NewTxCmd returns a root CLI command handler for all x/distribution transaction commands. -func NewTxCmd(ac address.Codec) *cobra.Command { +func NewTxCmd(valAc, ac address.Codec) *cobra.Command { distTxCmd := &cobra.Command{ Use: types.ModuleName, Short: "Distribution transactions subcommands", @@ -37,11 +38,11 @@ func NewTxCmd(ac address.Codec) *cobra.Command { } distTxCmd.AddCommand( - NewWithdrawRewardsCmd(), - NewWithdrawAllRewardsCmd(), + NewWithdrawRewardsCmd(valAc, ac), + NewWithdrawAllRewardsCmd(valAc, ac), NewSetWithdrawAddrCmd(ac), - NewFundCommunityPoolCmd(), - NewDepositValidatorRewardsPoolCmd(), + NewFundCommunityPoolCmd(ac), + NewDepositValidatorRewardsPoolCmd(valAc, ac), ) return distTxCmd @@ -76,7 +77,7 @@ func newSplitAndApply( } // NewWithdrawRewardsCmd returns a CLI command handler for creating a MsgWithdrawDelegatorReward transaction. -func NewWithdrawRewardsCmd() *cobra.Command { +func NewWithdrawRewardsCmd(valCodec, ac address.Codec) *cobra.Command { bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() cmd := &cobra.Command{ @@ -99,16 +100,20 @@ $ %s tx distribution withdraw-rewards %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj if err != nil { return err } - delAddr := clientCtx.GetFromAddress() - valAddr, err := sdk.ValAddressFromBech32(args[0]) + delAddr, err := ac.BytesToString(clientCtx.GetFromAddress()) if err != nil { return err } - msgs := []sdk.Msg{types.NewMsgWithdrawDelegatorReward(delAddr, valAddr)} + _, err = valCodec.StringToBytes(args[0]) + if err != nil { + return err + } + + msgs := []sdk.Msg{types.NewMsgWithdrawDelegatorReward(delAddr, args[0])} if commission, _ := cmd.Flags().GetBool(FlagCommission); commission { - msgs = append(msgs, types.NewMsgWithdrawValidatorCommission(valAddr)) + msgs = append(msgs, types.NewMsgWithdrawValidatorCommission(args[0])) } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msgs...) @@ -122,7 +127,7 @@ $ %s tx distribution withdraw-rewards %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj } // NewWithdrawAllRewardsCmd returns a CLI command handler for creating a MsgWithdrawDelegatorReward transaction. -func NewWithdrawAllRewardsCmd() *cobra.Command { +func NewWithdrawAllRewardsCmd(valCodec, ac address.Codec) *cobra.Command { cmd := &cobra.Command{ Use: "withdraw-all-rewards", Short: "withdraw all delegations rewards for a delegator", @@ -142,7 +147,10 @@ $ %[1]s tx distribution withdraw-all-rewards --from mykey if err != nil { return err } - delAddr := clientCtx.GetFromAddress() + delAddr, err := ac.BytesToString(clientCtx.GetFromAddress()) + if err != nil { + return err + } // The transaction cannot be generated offline since it requires a query // to get all the validators. @@ -151,7 +159,7 @@ $ %[1]s tx distribution withdraw-all-rewards --from mykey } queryClient := types.NewQueryClient(clientCtx) - delValsRes, err := queryClient.DelegatorValidators(cmd.Context(), &types.QueryDelegatorValidatorsRequest{DelegatorAddress: delAddr.String()}) + delValsRes, err := queryClient.DelegatorValidators(cmd.Context(), &types.QueryDelegatorValidatorsRequest{DelegatorAddress: delAddr}) if err != nil { return err } @@ -160,12 +168,12 @@ $ %[1]s tx distribution withdraw-all-rewards --from mykey // build multi-message transaction msgs := make([]sdk.Msg, 0, len(validators)) for _, valAddr := range validators { - val, err := sdk.ValAddressFromBech32(valAddr) + _, err := valCodec.StringToBytes(valAddr) if err != nil { return err } - msg := types.NewMsgWithdrawDelegatorReward(delAddr, val) + msg := types.NewMsgWithdrawDelegatorReward(delAddr, valAddr) msgs = append(msgs, msg) } @@ -221,7 +229,7 @@ $ %s tx distribution set-withdraw-addr %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p } // NewFundCommunityPoolCmd returns a CLI command handler for creating a MsgFundCommunityPool transaction. -func NewFundCommunityPoolCmd() *cobra.Command { +func NewFundCommunityPoolCmd(ac address.Codec) *cobra.Command { cmd := &cobra.Command{ Use: "fund-community-pool [amount]", Args: cobra.ExactArgs(1), @@ -240,7 +248,10 @@ $ %s tx distribution fund-community-pool 100uatom --from mykey if err != nil { return err } - depositorAddr := clientCtx.GetFromAddress() + depositorAddr, err := ac.BytesToString(clientCtx.GetFromAddress()) + if err != nil { + return err + } amount, err := sdk.ParseCoinsNormalized(args[0]) if err != nil { return err @@ -259,7 +270,7 @@ $ %s tx distribution fund-community-pool 100uatom --from mykey // NewDepositValidatorRewardsPoolCmd returns a CLI command handler for creating // a MsgDepositValidatorRewardsPool transaction. -func NewDepositValidatorRewardsPoolCmd() *cobra.Command { +func NewDepositValidatorRewardsPoolCmd(valCodec, ac address.Codec) *cobra.Command { cmd := &cobra.Command{ Use: "fund-validator-rewards-pool [val_addr] [amount]", Args: cobra.ExactArgs(2), @@ -274,9 +285,12 @@ func NewDepositValidatorRewardsPoolCmd() *cobra.Command { return err } - depositorAddr := clientCtx.GetFromAddress() + depositorAddr, err := ac.BytesToString(clientCtx.GetFromAddress()) + if err != nil { + return err + } - valAddr, err := sdk.ValAddressFromBech32(args[0]) + _, err = valCodec.StringToBytes(args[0]) if err != nil { return err } @@ -286,7 +300,7 @@ func NewDepositValidatorRewardsPoolCmd() *cobra.Command { return err } - msg := types.NewMsgDepositValidatorRewardsPool(depositorAddr, valAddr, amount) + msg := types.NewMsgDepositValidatorRewardsPool(depositorAddr, args[0], amount) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } diff --git a/x/distribution/client/cli/tx_test.go b/x/distribution/client/cli/tx_test.go index 3522faa9b43b..94e9d8af6d16 100644 --- a/x/distribution/client/cli/tx_test.go +++ b/x/distribution/client/cli/tx_test.go @@ -3,20 +3,85 @@ package cli_test import ( "context" "fmt" + "io" + "testing" - sdkmath "cosmossdk.io/math" + abci "github.com/cometbft/cometbft/abci/types" + rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" "github.com/cosmos/gogoproto/proto" + "github.com/stretchr/testify/suite" + + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec/address" + "github.com/cosmos/cosmos-sdk/crypto/keyring" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" "github.com/cosmos/cosmos-sdk/testutil" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" + "github.com/cosmos/cosmos-sdk/testutil/network" sdk "github.com/cosmos/cosmos-sdk/types" + testutilmod "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/bank" "github.com/cosmos/cosmos-sdk/x/distribution/client/cli" + distrtestutil "github.com/cosmos/cosmos-sdk/x/distribution/testutil" + "github.com/cosmos/cosmos-sdk/x/gov" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" ) +type CLITestSuite struct { + suite.Suite + + kr keyring.Keyring + encCfg testutilmod.TestEncodingConfig + baseCtx client.Context + clientCtx client.Context +} + +func TestCLITestSuite(t *testing.T) { + suite.Run(t, new(CLITestSuite)) +} + +func (s *CLITestSuite) SetupSuite() { + s.encCfg = testutilmod.MakeTestEncodingConfig(gov.AppModuleBasic{}, bank.AppModuleBasic{}) + s.kr = keyring.NewInMemory(s.encCfg.Codec) + s.baseCtx = client.Context{}. + WithKeyring(s.kr). + WithTxConfig(s.encCfg.TxConfig). + WithCodec(s.encCfg.Codec). + WithClient(clitestutil.MockCometRPC{Client: rpcclientmock.Client{}}). + WithAccountRetriever(client.MockAccountRetriever{}). + WithOutput(io.Discard). + WithChainID("test-chain") + + ctxGen := func() client.Context { + bz, _ := s.encCfg.Codec.Marshal(&sdk.TxResponse{}) + c := clitestutil.NewMockCometRPC(abci.ResponseQuery{ + Value: bz, + }) + return s.baseCtx.WithClient(c) + } + s.clientCtx = ctxGen() + + cfg, err := network.DefaultConfigWithAppConfig(distrtestutil.AppConfig) + s.Require().NoError(err) + + genesisState := cfg.GenesisState + var mintData minttypes.GenesisState + s.Require().NoError(cfg.Codec.UnmarshalJSON(genesisState[minttypes.ModuleName], &mintData)) + + inflation := sdkmath.LegacyMustNewDecFromStr("1.0") + mintData.Minter.Inflation = inflation + mintData.Params.InflationMin = inflation + mintData.Params.InflationMax = inflation + + mintDataBz, err := cfg.Codec.MarshalJSON(&mintData) + s.Require().NoError(err) + genesisState[minttypes.ModuleName] = mintDataBz + cfg.GenesisState = genesisState +} + func (s *CLITestSuite) TestTxWithdrawRewardsCmd() { val := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) @@ -35,7 +100,7 @@ func (s *CLITestSuite) TestTxWithdrawRewardsCmd() { fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), }, - "invalid Bech32 prefix", + "hrp does not match bech32 prefix", }, { "valid transaction", @@ -69,7 +134,7 @@ func (s *CLITestSuite) TestTxWithdrawRewardsCmd() { args := append([]string{tc.valAddr.String()}, tc.args...) ctx := svrcmd.CreateExecuteContext(context.Background()) - cmd := cli.NewWithdrawRewardsCmd() + cmd := cli.NewWithdrawRewardsCmd(address.NewBech32Codec("cosmosvaloper"), address.NewBech32Codec("cosmos")) cmd.SetContext(ctx) cmd.SetArgs(args) s.Require().NoError(client.SetCmdClientContextHandler(s.clientCtx, cmd)) @@ -121,7 +186,7 @@ func (s *CLITestSuite) TestTxWithdrawAllRewardsCmd() { tc := tc s.Run(tc.name, func() { - cmd := cli.NewWithdrawAllRewardsCmd() + cmd := cli.NewWithdrawAllRewardsCmd(address.NewBech32Codec("cosmosvaloper"), address.NewBech32Codec("cosmos")) out, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, tc.args) if tc.expectErrMsg != "" { @@ -223,7 +288,7 @@ func (s *CLITestSuite) TestTxFundCommunityPoolCmd() { tc := tc s.Run(tc.name, func() { - cmd := cli.NewFundCommunityPoolCmd() + cmd := cli.NewFundCommunityPoolCmd(address.NewBech32Codec("cosmos")) out, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, tc.args) if tc.expectErr { diff --git a/x/distribution/client/common/common_test.go b/x/distribution/client/common/common_test.go index ff9bb88d1766..05fa593079e0 100644 --- a/x/distribution/client/common/common_test.go +++ b/x/distribution/client/common/common_test.go @@ -3,11 +3,10 @@ package common import ( "testing" - "github.com/cosmos/cosmos-sdk/codec/legacy" - "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec/legacy" ) func TestQueryDelegationRewardsAddrValidation(t *testing.T) { diff --git a/x/distribution/keeper/allocation.go b/x/distribution/keeper/allocation.go index fce0cfefc24a..83db0ae72e20 100644 --- a/x/distribution/keeper/allocation.go +++ b/x/distribution/keeper/allocation.go @@ -3,9 +3,10 @@ package keeper import ( "context" - "cosmossdk.io/math" abci "github.com/cometbft/cometbft/abci/types" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -17,13 +18,12 @@ func (k Keeper) AllocateTokens(ctx context.Context, totalPreviousPower int64, bo // fetch and clear the collected fees for distribution, since this is // called in BeginBlock, collected fees will be from the previous block // (and distributed to the previous proposer) - sdkCtx := sdk.UnwrapSDKContext(ctx) feeCollector := k.authKeeper.GetModuleAccount(ctx, k.feeCollectorName) - feesCollectedInt := k.bankKeeper.GetAllBalances(sdkCtx, feeCollector.GetAddress()) + feesCollectedInt := k.bankKeeper.GetAllBalances(ctx, feeCollector.GetAddress()) feesCollected := sdk.NewDecCoinsFromCoins(feesCollectedInt...) // transfer collected fees to the distribution module account - err := k.bankKeeper.SendCoinsFromModuleToModule(sdkCtx, k.feeCollectorName, types.ModuleName, feesCollectedInt) + err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, k.feeCollectorName, types.ModuleName, feesCollectedInt) if err != nil { return err } @@ -56,7 +56,10 @@ func (k Keeper) AllocateTokens(ctx context.Context, totalPreviousPower int64, bo // // Ref: https://github.com/cosmos/cosmos-sdk/pull/3099#discussion_r246276376 for _, vote := range bondedVotes { - validator := k.stakingKeeper.ValidatorByConsAddr(sdkCtx, vote.Validator.Address) + validator, err := k.stakingKeeper.ValidatorByConsAddr(ctx, vote.Validator.Address) + if err != nil { + return err + } // TODO: Consider micro-slashing for missing votes. // @@ -64,7 +67,7 @@ func (k Keeper) AllocateTokens(ctx context.Context, totalPreviousPower int64, bo powerFraction := math.LegacyNewDec(vote.Validator.Power).QuoTruncate(math.LegacyNewDec(totalPreviousPower)) reward := feeMultiplier.MulDecTruncate(powerFraction) - err := k.AllocateTokensToValidator(ctx, validator, reward) + err = k.AllocateTokensToValidator(ctx, validator, reward) if err != nil { return err } @@ -84,34 +87,39 @@ func (k Keeper) AllocateTokensToValidator(ctx context.Context, val stakingtypes. commission := tokens.MulDec(val.GetCommission()) shared := tokens.Sub(commission) + valBz, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) + if err != nil { + return err + } + // update current commission sdkCtx := sdk.UnwrapSDKContext(ctx) sdkCtx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeCommission, sdk.NewAttribute(sdk.AttributeKeyAmount, commission.String()), - sdk.NewAttribute(types.AttributeKeyValidator, val.GetOperator().String()), + sdk.NewAttribute(types.AttributeKeyValidator, val.GetOperator()), ), ) - currentCommission, err := k.GetValidatorAccumulatedCommission(ctx, val.GetOperator()) + currentCommission, err := k.GetValidatorAccumulatedCommission(ctx, valBz) if err != nil { return err } currentCommission.Commission = currentCommission.Commission.Add(commission...) - err = k.SetValidatorAccumulatedCommission(ctx, val.GetOperator(), currentCommission) + err = k.SetValidatorAccumulatedCommission(ctx, valBz, currentCommission) if err != nil { return err } // update current rewards - currentRewards, err := k.GetValidatorCurrentRewards(ctx, val.GetOperator()) + currentRewards, err := k.GetValidatorCurrentRewards(ctx, valBz) if err != nil { return err } currentRewards.Rewards = currentRewards.Rewards.Add(shared...) - err = k.SetValidatorCurrentRewards(ctx, val.GetOperator(), currentRewards) + err = k.SetValidatorCurrentRewards(ctx, valBz, currentRewards) if err != nil { return err } @@ -121,15 +129,15 @@ func (k Keeper) AllocateTokensToValidator(ctx context.Context, val stakingtypes. sdk.NewEvent( types.EventTypeRewards, sdk.NewAttribute(sdk.AttributeKeyAmount, tokens.String()), - sdk.NewAttribute(types.AttributeKeyValidator, val.GetOperator().String()), + sdk.NewAttribute(types.AttributeKeyValidator, val.GetOperator()), ), ) - outstanding, err := k.GetValidatorOutstandingRewards(ctx, val.GetOperator()) + outstanding, err := k.GetValidatorOutstandingRewards(ctx, valBz) if err != nil { return err } outstanding.Rewards = outstanding.Rewards.Add(tokens...) - return k.SetValidatorOutstandingRewards(ctx, val.GetOperator(), outstanding) + return k.SetValidatorOutstandingRewards(ctx, valBz, outstanding) } diff --git a/x/distribution/keeper/allocation_test.go b/x/distribution/keeper/allocation_test.go index 5ca02a56eef2..6ed8d07c4a77 100644 --- a/x/distribution/keeper/allocation_test.go +++ b/x/distribution/keeper/allocation_test.go @@ -4,14 +4,15 @@ import ( "testing" "time" - "cosmossdk.io/math" abci "github.com/cometbft/cometbft/abci/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" + "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" @@ -36,7 +37,10 @@ func TestAllocateTokensToValidatorWithCommission(t *testing.T) { stakingKeeper := distrtestutil.NewMockStakingKeeper(ctrl) accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) + valCodec := address.NewBech32Codec("cosmosvaloper") + accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(valCodec).AnyTimes() distrKeeper := keeper.NewKeeper( encCfg.Codec, @@ -52,7 +56,7 @@ func TestAllocateTokensToValidatorWithCommission(t *testing.T) { val, err := distrtestutil.CreateValidator(valConsPk0, math.NewInt(100)) require.NoError(t, err) val.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)) - stakingKeeper.EXPECT().ValidatorByConsAddr(gomock.Any(), sdk.GetConsAddress(valConsPk0)).Return(val).AnyTimes() + stakingKeeper.EXPECT().ValidatorByConsAddr(gomock.Any(), sdk.GetConsAddress(valConsPk0)).Return(val, nil).AnyTimes() // allocate tokens tokens := sdk.DecCoins{ @@ -65,12 +69,15 @@ func TestAllocateTokensToValidatorWithCommission(t *testing.T) { {Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDec(5)}, } - valCommission, err := distrKeeper.GetValidatorAccumulatedCommission(ctx, val.GetOperator()) + valBz, err := valCodec.StringToBytes(val.GetOperator()) + require.NoError(t, err) + + valCommission, err := distrKeeper.GetValidatorAccumulatedCommission(ctx, valBz) require.NoError(t, err) require.Equal(t, expected, valCommission.Commission) // check current rewards - currentRewards, err := distrKeeper.GetValidatorCurrentRewards(ctx, val.GetOperator()) + currentRewards, err := distrKeeper.GetValidatorCurrentRewards(ctx, valBz) require.NoError(t, err) require.Equal(t, expected, currentRewards.Rewards) } @@ -90,6 +97,7 @@ func TestAllocateTokensToManyValidators(t *testing.T) { feeCollectorAcc := authtypes.NewEmptyModuleAccount("fee_collector") accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) accountKeeper.EXPECT().GetModuleAccount(gomock.Any(), "fee_collector").Return(feeCollectorAcc) + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(address.NewBech32Codec("cosmosvaloper")).AnyTimes() distrKeeper := keeper.NewKeeper( encCfg.Codec, @@ -110,14 +118,14 @@ func TestAllocateTokensToManyValidators(t *testing.T) { val0, err := distrtestutil.CreateValidator(valConsPk0, math.NewInt(100)) require.NoError(t, err) val0.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)) - stakingKeeper.EXPECT().ValidatorByConsAddr(gomock.Any(), sdk.GetConsAddress(valConsPk0)).Return(val0).AnyTimes() + stakingKeeper.EXPECT().ValidatorByConsAddr(gomock.Any(), sdk.GetConsAddress(valConsPk0)).Return(val0, nil).AnyTimes() // create second validator with 0% commission valAddr1 := sdk.ValAddress(valConsAddr1) val1, err := distrtestutil.CreateValidator(valConsPk1, math.NewInt(100)) require.NoError(t, err) val1.Commission = stakingtypes.NewCommission(math.LegacyNewDec(0), math.LegacyNewDec(0), math.LegacyNewDec(0)) - stakingKeeper.EXPECT().ValidatorByConsAddr(gomock.Any(), sdk.GetConsAddress(valConsPk1)).Return(val1).AnyTimes() + stakingKeeper.EXPECT().ValidatorByConsAddr(gomock.Any(), sdk.GetConsAddress(valConsPk1)).Return(val1, nil).AnyTimes() abciValA := abci.Validator{ Address: valConsPk0.Address(), @@ -222,6 +230,7 @@ func TestAllocateTokensTruncation(t *testing.T) { feeCollectorAcc := authtypes.NewEmptyModuleAccount("fee_collector") accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) accountKeeper.EXPECT().GetModuleAccount(gomock.Any(), "fee_collector").Return(feeCollectorAcc) + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(address.NewBech32Codec("cosmosvaloper")).AnyTimes() distrKeeper := keeper.NewKeeper( encCfg.Codec, @@ -242,21 +251,21 @@ func TestAllocateTokensTruncation(t *testing.T) { val0, err := distrtestutil.CreateValidator(valConsPk0, math.NewInt(100)) require.NoError(t, err) val0.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(1, 1), math.LegacyNewDecWithPrec(1, 1), math.LegacyNewDec(0)) - stakingKeeper.EXPECT().ValidatorByConsAddr(gomock.Any(), sdk.GetConsAddress(valConsPk0)).Return(val0).AnyTimes() + stakingKeeper.EXPECT().ValidatorByConsAddr(gomock.Any(), sdk.GetConsAddress(valConsPk0)).Return(val0, nil).AnyTimes() // create second validator with 10% commission valAddr1 := sdk.ValAddress(valConsAddr1) val1, err := distrtestutil.CreateValidator(valConsPk1, math.NewInt(100)) require.NoError(t, err) val1.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(1, 1), math.LegacyNewDecWithPrec(1, 1), math.LegacyNewDec(0)) - stakingKeeper.EXPECT().ValidatorByConsAddr(gomock.Any(), sdk.GetConsAddress(valConsPk1)).Return(val1).AnyTimes() + stakingKeeper.EXPECT().ValidatorByConsAddr(gomock.Any(), sdk.GetConsAddress(valConsPk1)).Return(val1, nil).AnyTimes() // create third validator with 10% commission valAddr2 := sdk.ValAddress(valConsAddr2) - val2, err := stakingtypes.NewValidator(sdk.ValAddress(valConsAddr2), valConsPk1, stakingtypes.Description{}) + val2, err := stakingtypes.NewValidator(sdk.ValAddress(valConsAddr2).String(), valConsPk1, stakingtypes.Description{}) require.NoError(t, err) val2.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(1, 1), math.LegacyNewDecWithPrec(1, 1), math.LegacyNewDec(0)) - stakingKeeper.EXPECT().ValidatorByConsAddr(gomock.Any(), sdk.GetConsAddress(valConsPk2)).Return(val2).AnyTimes() + stakingKeeper.EXPECT().ValidatorByConsAddr(gomock.Any(), sdk.GetConsAddress(valConsPk2)).Return(val2, nil).AnyTimes() abciValA := abci.Validator{ Address: valConsPk0.Address(), diff --git a/x/distribution/keeper/delegation.go b/x/distribution/keeper/delegation.go index fdd19fd8ce32..2b0e99d390e5 100644 --- a/x/distribution/keeper/delegation.go +++ b/x/distribution/keeper/delegation.go @@ -21,16 +21,26 @@ func (k Keeper) initializeDelegation(ctx context.Context, val sdk.ValAddress, de previousPeriod := valCurrentRewards.Period - 1 // increment reference count for the period we're going to track - k.incrementReferenceCount(ctx, val, previousPeriod) + err = k.incrementReferenceCount(ctx, val, previousPeriod) + if err != nil { + return err + } - sdkCtx := sdk.UnwrapSDKContext(ctx) - validator := k.stakingKeeper.Validator(sdkCtx, val) - delegation := k.stakingKeeper.Delegation(sdkCtx, del, val) + validator, err := k.stakingKeeper.Validator(ctx, val) + if err != nil { + return err + } + + delegation, err := k.stakingKeeper.Delegation(ctx, del, val) + if err != nil { + return err + } // calculate delegation stake in tokens // we don't store directly, so multiply delegation shares * (tokens per share) // note: necessary to truncate so we don't allow withdrawing more rewards than owed stake := validator.TokensFromSharesTruncated(delegation.GetShares()) + sdkCtx := sdk.UnwrapSDKContext(ctx) return k.SetDelegatorStartingInfo(ctx, val, del, types.NewDelegatorStartingInfo(previousPeriod, stake, uint64(sdkCtx.BlockHeight()))) } @@ -48,13 +58,18 @@ func (k Keeper) calculateDelegationRewardsBetween(ctx context.Context, val staki panic("stake should not be negative") } + valBz, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) + if err != nil { + panic(err) + } + // return staking * (ending - starting) - starting, err := k.GetValidatorHistoricalRewards(ctx, val.GetOperator(), startingPeriod) + starting, err := k.GetValidatorHistoricalRewards(ctx, valBz, startingPeriod) if err != nil { return sdk.DecCoins{}, err } - ending, err := k.GetValidatorHistoricalRewards(ctx, val.GetOperator(), endingPeriod) + ending, err := k.GetValidatorHistoricalRewards(ctx, valBz, endingPeriod) if err != nil { return sdk.DecCoins{}, err } @@ -70,8 +85,19 @@ func (k Keeper) calculateDelegationRewardsBetween(ctx context.Context, val staki // calculate the total rewards accrued by a delegation func (k Keeper) CalculateDelegationRewards(ctx context.Context, val stakingtypes.ValidatorI, del stakingtypes.DelegationI, endingPeriod uint64) (rewards sdk.DecCoins, err error) { + addrCodec := k.authKeeper.AddressCodec() + delAddr, err := addrCodec.StringToBytes(del.GetDelegatorAddr()) + if err != nil { + return sdk.DecCoins{}, err + } + + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(del.GetValidatorAddr()) + if err != nil { + return sdk.DecCoins{}, err + } + // fetch starting info for delegation - startingInfo, err := k.GetDelegatorStartingInfo(ctx, del.GetValidatorAddr(), del.GetDelegatorAddr()) + startingInfo, err := k.GetDelegatorStartingInfo(ctx, sdk.ValAddress(valAddr), sdk.AccAddress(delAddr)) if err != nil { return } @@ -97,7 +123,7 @@ func (k Keeper) CalculateDelegationRewards(ctx context.Context, val stakingtypes // for them for the stake sanity check below. endingHeight := uint64(sdkCtx.BlockHeight()) if endingHeight > startingHeight { - k.IterateValidatorSlashEventsBetween(ctx, del.GetValidatorAddr(), startingHeight, endingHeight, + k.IterateValidatorSlashEventsBetween(ctx, valAddr, startingHeight, endingHeight, func(height uint64, event types.ValidatorSlashEvent) (stop bool) { endingPeriod := event.ValidatorPeriod if endingPeriod > startingPeriod { @@ -166,8 +192,19 @@ func (k Keeper) CalculateDelegationRewards(ctx context.Context, val stakingtypes } func (k Keeper) withdrawDelegationRewards(ctx context.Context, val stakingtypes.ValidatorI, del stakingtypes.DelegationI) (sdk.Coins, error) { + addrCodec := k.authKeeper.AddressCodec() + delAddr, err := addrCodec.StringToBytes(del.GetDelegatorAddr()) + if err != nil { + return nil, err + } + + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(del.GetValidatorAddr()) + if err != nil { + return nil, err + } + // check existence of delegator starting info - hasInfo, err := k.HasDelegatorStartingInfo(ctx, del.GetValidatorAddr(), del.GetDelegatorAddr()) + hasInfo, err := k.HasDelegatorStartingInfo(ctx, sdk.ValAddress(valAddr), sdk.AccAddress(delAddr)) if err != nil { return nil, err } @@ -187,7 +224,7 @@ func (k Keeper) withdrawDelegationRewards(ctx context.Context, val stakingtypes. return nil, err } - outstanding, err := k.GetValidatorOutstandingRewardsCoins(ctx, del.GetValidatorAddr()) + outstanding, err := k.GetValidatorOutstandingRewardsCoins(ctx, sdk.ValAddress(valAddr)) if err != nil { return nil, err } @@ -199,8 +236,8 @@ func (k Keeper) withdrawDelegationRewards(ctx context.Context, val stakingtypes. logger := k.Logger(ctx) logger.Info( "rounding error withdrawing rewards from validator", - "delegator", del.GetDelegatorAddr().String(), - "validator", val.GetOperator().String(), + "delegator", del.GetDelegatorAddr(), + "validator", val.GetOperator(), "got", rewards.String(), "expected", rewardsRaw.String(), ) @@ -211,7 +248,7 @@ func (k Keeper) withdrawDelegationRewards(ctx context.Context, val stakingtypes. // add coins to user account if !finalRewards.IsZero() { - withdrawAddr, err := k.GetDelegatorWithdrawAddr(ctx, del.GetDelegatorAddr()) + withdrawAddr, err := k.GetDelegatorWithdrawAddr(ctx, delAddr) if err != nil { return nil, err } @@ -224,7 +261,7 @@ func (k Keeper) withdrawDelegationRewards(ctx context.Context, val stakingtypes. // update the outstanding rewards and the community pool only if the // transaction was successful - err = k.SetValidatorOutstandingRewards(ctx, del.GetValidatorAddr(), types.ValidatorOutstandingRewards{Rewards: outstanding.Sub(rewards)}) + err = k.SetValidatorOutstandingRewards(ctx, sdk.ValAddress(valAddr), types.ValidatorOutstandingRewards{Rewards: outstanding.Sub(rewards)}) if err != nil { return nil, err } @@ -241,19 +278,19 @@ func (k Keeper) withdrawDelegationRewards(ctx context.Context, val stakingtypes. } // decrement reference count of starting period - startingInfo, err := k.GetDelegatorStartingInfo(ctx, del.GetValidatorAddr(), del.GetDelegatorAddr()) + startingInfo, err := k.GetDelegatorStartingInfo(ctx, sdk.ValAddress(valAddr), sdk.AccAddress(delAddr)) if err != nil { return nil, err } startingPeriod := startingInfo.PreviousPeriod - err = k.decrementReferenceCount(ctx, del.GetValidatorAddr(), startingPeriod) + err = k.decrementReferenceCount(ctx, sdk.ValAddress(valAddr), startingPeriod) if err != nil { return nil, err } // remove delegator starting info - err = k.DeleteDelegatorStartingInfo(ctx, del.GetValidatorAddr(), del.GetDelegatorAddr()) + err = k.DeleteDelegatorStartingInfo(ctx, sdk.ValAddress(valAddr), sdk.AccAddress(delAddr)) if err != nil { return nil, err } @@ -274,8 +311,8 @@ func (k Keeper) withdrawDelegationRewards(ctx context.Context, val stakingtypes. sdk.NewEvent( types.EventTypeWithdrawRewards, sdk.NewAttribute(sdk.AttributeKeyAmount, finalRewards.String()), - sdk.NewAttribute(types.AttributeKeyValidator, val.GetOperator().String()), - sdk.NewAttribute(types.AttributeKeyDelegator, del.GetDelegatorAddr().String()), + sdk.NewAttribute(types.AttributeKeyValidator, val.GetOperator()), + sdk.NewAttribute(types.AttributeKeyDelegator, del.GetDelegatorAddr()), ), ) diff --git a/x/distribution/keeper/delegation_test.go b/x/distribution/keeper/delegation_test.go index e1e1680244ae..4678d539d79a 100644 --- a/x/distribution/keeper/delegation_test.go +++ b/x/distribution/keeper/delegation_test.go @@ -10,6 +10,7 @@ import ( "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" @@ -35,6 +36,8 @@ func TestCalculateRewardsBasic(t *testing.T) { accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(address.NewBech32Codec(sdk.Bech32PrefixValAddr)).AnyTimes() + accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec(sdk.Bech32MainPrefix)).AnyTimes() distrKeeper := keeper.NewKeeper( encCfg.Codec, @@ -58,9 +61,9 @@ func TestCalculateRewardsBasic(t *testing.T) { val.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)) // delegation mock - del := stakingtypes.NewDelegation(addr, valAddr, val.DelegatorShares) - stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val).Times(3) - stakingKeeper.EXPECT().Delegation(gomock.Any(), addr, valAddr).Return(del) + del := stakingtypes.NewDelegation(addr.String(), valAddr.String(), val.DelegatorShares) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(3) + stakingKeeper.EXPECT().Delegation(gomock.Any(), addr, valAddr).Return(del, nil) // run the necessary hooks manually (given that we are not running an actual staking module) err = distrtestutil.CallCreateValidatorHooks(ctx, distrKeeper, addr, valAddr) @@ -118,6 +121,8 @@ func TestCalculateRewardsAfterSlash(t *testing.T) { accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(address.NewBech32Codec(sdk.Bech32PrefixValAddr)).AnyTimes() + accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec(sdk.Bech32MainPrefix)).AnyTimes() distrKeeper := keeper.NewKeeper( encCfg.Codec, @@ -142,11 +147,11 @@ func TestCalculateRewardsAfterSlash(t *testing.T) { require.NoError(t, err) val.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)) - del := stakingtypes.NewDelegation(addr, valAddr, val.DelegatorShares) + del := stakingtypes.NewDelegation(addr.String(), valAddr.String(), val.DelegatorShares) // set mock calls - stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val).Times(4) - stakingKeeper.EXPECT().Delegation(gomock.Any(), addr, valAddr).Return(del) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(4) + stakingKeeper.EXPECT().Delegation(gomock.Any(), addr, valAddr).Return(del, nil) // run the necessary hooks manually (given that we are not running an actual staking module) err = distrtestutil.CallCreateValidatorHooks(ctx, distrKeeper, addr, valAddr) @@ -177,6 +182,7 @@ func TestCalculateRewardsAfterSlash(t *testing.T) { math.LegacyNewDecWithPrec(5, 1), &val, &distrKeeper, + stakingKeeper, ) require.True(t, slashedTokens.IsPositive(), "expected positive slashed tokens, got: %s", slashedTokens) @@ -218,6 +224,8 @@ func TestCalculateRewardsAfterManySlashes(t *testing.T) { accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(address.NewBech32Codec(sdk.Bech32PrefixValAddr)).AnyTimes() + accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec(sdk.Bech32MainPrefix)).AnyTimes() distrKeeper := keeper.NewKeeper( encCfg.Codec, @@ -243,9 +251,9 @@ func TestCalculateRewardsAfterManySlashes(t *testing.T) { val.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)) // delegation mocks - del := stakingtypes.NewDelegation(addr, valAddr, val.DelegatorShares) - stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val).Times(4) - stakingKeeper.EXPECT().Delegation(gomock.Any(), addr, valAddr).Return(del) + del := stakingtypes.NewDelegation(addr.String(), valAddr.String(), val.DelegatorShares) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(4) + stakingKeeper.EXPECT().Delegation(gomock.Any(), addr, valAddr).Return(del, nil) // run the necessary hooks manually (given that we are not running an actual staking module) err = distrtestutil.CallCreateValidatorHooks(ctx, distrKeeper, addr, valAddr) @@ -276,11 +284,12 @@ func TestCalculateRewardsAfterManySlashes(t *testing.T) { math.LegacyNewDecWithPrec(5, 1), &val, &distrKeeper, + stakingKeeper, ) require.True(t, slashedTokens.IsPositive(), "expected positive slashed tokens, got: %s", slashedTokens) // expect a call for the next slash with the updated validator - stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val).Times(1) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(1) // increase block height ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) @@ -299,6 +308,7 @@ func TestCalculateRewardsAfterManySlashes(t *testing.T) { math.LegacyNewDecWithPrec(2, 1), &val, &distrKeeper, + stakingKeeper, ) require.True(t, slashedTokens.IsPositive(), "expected positive slashed tokens, got: %s", slashedTokens) @@ -338,6 +348,8 @@ func TestCalculateRewardsMultiDelegator(t *testing.T) { accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(address.NewBech32Codec(sdk.Bech32PrefixValAddr)).AnyTimes() + accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec(sdk.Bech32MainPrefix)).AnyTimes() distrKeeper := keeper.NewKeeper( encCfg.Codec, @@ -361,11 +373,11 @@ func TestCalculateRewardsMultiDelegator(t *testing.T) { val.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)) - del0 := stakingtypes.NewDelegation(addr0, valAddr, val.DelegatorShares) + del0 := stakingtypes.NewDelegation(addr0.String(), valAddr.String(), val.DelegatorShares) // set mock calls - stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val).Times(4) - stakingKeeper.EXPECT().Delegation(gomock.Any(), addr0, valAddr).Return(del0).Times(1) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(4) + stakingKeeper.EXPECT().Delegation(gomock.Any(), addr0, valAddr).Return(del0, nil).Times(1) // run the necessary hooks manually (given that we are not running an actual staking module) err = distrtestutil.CallCreateValidatorHooks(ctx, distrKeeper, addr0, valAddr) @@ -381,11 +393,11 @@ func TestCalculateRewardsMultiDelegator(t *testing.T) { // second delegation addr1 := sdk.AccAddress(valConsAddr1) - _, del1, err := distrtestutil.Delegate(ctx, distrKeeper, addr1, &val, math.NewInt(100), nil) + _, del1, err := distrtestutil.Delegate(ctx, distrKeeper, addr1, &val, math.NewInt(100), nil, stakingKeeper) require.NoError(t, err) - stakingKeeper.EXPECT().Delegation(gomock.Any(), addr1, valAddr).Return(del1) - stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val).Times(1) + stakingKeeper.EXPECT().Delegation(gomock.Any(), addr1, valAddr).Return(del1, nil) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(1) // call necessary hooks to update a delegation err = distrKeeper.Hooks().AfterDelegationModified(ctx, addr1, valAddr) @@ -433,6 +445,8 @@ func TestWithdrawDelegationRewardsBasic(t *testing.T) { accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(address.NewBech32Codec(sdk.Bech32PrefixValAddr)).AnyTimes() + accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec(sdk.Bech32MainPrefix)).AnyTimes() distrKeeper := keeper.NewKeeper( encCfg.Codec, @@ -457,9 +471,9 @@ func TestWithdrawDelegationRewardsBasic(t *testing.T) { val.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)) // delegation mock - del := stakingtypes.NewDelegation(addr, valAddr, val.DelegatorShares) - stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val).Times(5) - stakingKeeper.EXPECT().Delegation(gomock.Any(), addr, valAddr).Return(del).Times(3) + del := stakingtypes.NewDelegation(addr.String(), valAddr.String(), val.DelegatorShares) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(5) + stakingKeeper.EXPECT().Delegation(gomock.Any(), addr, valAddr).Return(del, nil).Times(3) // run the necessary hooks manually (given that we are not running an actual staking module) err = distrtestutil.CallCreateValidatorHooks(ctx, distrKeeper, addr, valAddr) @@ -506,6 +520,8 @@ func TestCalculateRewardsAfterManySlashesInSameBlock(t *testing.T) { accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(address.NewBech32Codec(sdk.Bech32PrefixValAddr)).AnyTimes() + accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec(sdk.Bech32MainPrefix)).AnyTimes() distrKeeper := keeper.NewKeeper( encCfg.Codec, @@ -530,9 +546,9 @@ func TestCalculateRewardsAfterManySlashesInSameBlock(t *testing.T) { val.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)) // delegation mock - del := stakingtypes.NewDelegation(addr, valAddr, val.DelegatorShares) - stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val).Times(5) - stakingKeeper.EXPECT().Delegation(gomock.Any(), addr, valAddr).Return(del) + del := stakingtypes.NewDelegation(addr.String(), valAddr.String(), val.DelegatorShares) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(5) + stakingKeeper.EXPECT().Delegation(gomock.Any(), addr, valAddr).Return(del, nil) // run the necessary hooks manually (given that we are not running an actual staking module) err = distrtestutil.CallCreateValidatorHooks(ctx, distrKeeper, addr, valAddr) @@ -569,6 +585,7 @@ func TestCalculateRewardsAfterManySlashesInSameBlock(t *testing.T) { math.LegacyNewDecWithPrec(5, 1), &val, &distrKeeper, + stakingKeeper, ) // slash the validator by 50% again @@ -581,6 +598,7 @@ func TestCalculateRewardsAfterManySlashesInSameBlock(t *testing.T) { math.LegacyNewDecWithPrec(5, 1), &val, &distrKeeper, + stakingKeeper, ) // increase block height @@ -618,6 +636,8 @@ func TestCalculateRewardsMultiDelegatorMultiSlash(t *testing.T) { accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(address.NewBech32Codec(sdk.Bech32PrefixValAddr)).AnyTimes() + accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec(sdk.Bech32MainPrefix)).AnyTimes() distrKeeper := keeper.NewKeeper( encCfg.Codec, @@ -643,14 +663,14 @@ func TestCalculateRewardsMultiDelegatorMultiSlash(t *testing.T) { val.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)) // validator and delegation mocks - del := stakingtypes.NewDelegation(addr, valAddr, val.DelegatorShares) - stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val).Times(3) - stakingKeeper.EXPECT().Delegation(gomock.Any(), addr, valAddr).Return(del) + del := stakingtypes.NewDelegation(addr.String(), valAddr.String(), val.DelegatorShares) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(3) + stakingKeeper.EXPECT().Delegation(gomock.Any(), addr, valAddr).Return(del, nil) // run the necessary hooks manually (given that we are not running an actual staking module) err = distrtestutil.CallCreateValidatorHooks(ctx, distrKeeper, addr, valAddr) require.NoError(t, err) - stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val).Times(2) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(2) // next block ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) @@ -670,11 +690,12 @@ func TestCalculateRewardsMultiDelegatorMultiSlash(t *testing.T) { math.LegacyNewDecWithPrec(5, 1), &val, &distrKeeper, + stakingKeeper, ) ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) // update validator mock - stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val).Times(1) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(1) // second delegation _, del2, err := distrtestutil.Delegate( @@ -684,12 +705,13 @@ func TestCalculateRewardsMultiDelegatorMultiSlash(t *testing.T) { &val, sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction), nil, + stakingKeeper, ) require.NoError(t, err) // new delegation mock and update validator mock - stakingKeeper.EXPECT().Delegation(gomock.Any(), sdk.AccAddress(valConsAddr1), valAddr).Return(del2) - stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val).Times(1) + stakingKeeper.EXPECT().Delegation(gomock.Any(), sdk.AccAddress(valConsAddr1), valAddr).Return(del2, nil) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(1) // call necessary hooks to update a delegation err = distrKeeper.Hooks().AfterDelegationModified(ctx, sdk.AccAddress(valConsAddr1), valAddr) @@ -711,6 +733,7 @@ func TestCalculateRewardsMultiDelegatorMultiSlash(t *testing.T) { math.LegacyNewDecWithPrec(5, 1), &val, &distrKeeper, + stakingKeeper, ) ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) @@ -750,6 +773,8 @@ func TestCalculateRewardsMultiDelegatorMultWithdraw(t *testing.T) { accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(address.NewBech32Codec(sdk.Bech32PrefixValAddr)).AnyTimes() + accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec(sdk.Bech32MainPrefix)).AnyTimes() distrKeeper := keeper.NewKeeper( encCfg.Codec, @@ -773,14 +798,14 @@ func TestCalculateRewardsMultiDelegatorMultWithdraw(t *testing.T) { val.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)) // validator and delegation mocks - del := stakingtypes.NewDelegation(addr, valAddr, val.DelegatorShares) - stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val).Times(3) - stakingKeeper.EXPECT().Delegation(gomock.Any(), addr, valAddr).Return(del).Times(5) + del := stakingtypes.NewDelegation(addr.String(), valAddr.String(), val.DelegatorShares) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(3) + stakingKeeper.EXPECT().Delegation(gomock.Any(), addr, valAddr).Return(del, nil).Times(5) // run the necessary hooks manually (given that we are not running an actual staking module) err = distrtestutil.CallCreateValidatorHooks(ctx, distrKeeper, addr, valAddr) require.NoError(t, err) - stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val).Times(2) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(2) // next block ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) @@ -801,12 +826,13 @@ func TestCalculateRewardsMultiDelegatorMultWithdraw(t *testing.T) { &val, math.NewInt(100), nil, + stakingKeeper, ) require.NoError(t, err) // new delegation mock and update validator mock - stakingKeeper.EXPECT().Delegation(gomock.Any(), sdk.AccAddress(valConsAddr1), valAddr).Return(del2).Times(3) - stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val).Times(6) + stakingKeeper.EXPECT().Delegation(gomock.Any(), sdk.AccAddress(valConsAddr1), valAddr).Return(del2, nil).Times(3) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(6) // call necessary hooks to update a delegation err = distrKeeper.Hooks().AfterDelegationModified(ctx, sdk.AccAddress(valConsAddr1), valAddr) @@ -946,6 +972,8 @@ func Test100PercentCommissionReward(t *testing.T) { accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(address.NewBech32Codec(sdk.Bech32PrefixValAddr)).AnyTimes() + accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec(sdk.Bech32MainPrefix)).AnyTimes() distrKeeper := keeper.NewKeeper( encCfg.Codec, @@ -969,14 +997,14 @@ func Test100PercentCommissionReward(t *testing.T) { val.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(10, 1), math.LegacyNewDecWithPrec(10, 1), math.LegacyNewDec(0)) // validator and delegation mocks - del := stakingtypes.NewDelegation(addr, valAddr, val.DelegatorShares) - stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val).Times(3) - stakingKeeper.EXPECT().Delegation(gomock.Any(), addr, valAddr).Return(del).Times(3) + del := stakingtypes.NewDelegation(addr.String(), valAddr.String(), val.DelegatorShares) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(3) + stakingKeeper.EXPECT().Delegation(gomock.Any(), addr, valAddr).Return(del, nil).Times(3) // run the necessary hooks manually (given that we are not running an actual staking module) err = distrtestutil.CallCreateValidatorHooks(ctx, distrKeeper, addr, valAddr) require.NoError(t, err) - stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val).Times(2) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(2) // next block ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) diff --git a/x/distribution/keeper/genesis.go b/x/distribution/keeper/genesis.go index 4ef2cb23fa2a..7d8fa26896b1 100644 --- a/x/distribution/keeper/genesis.go +++ b/x/distribution/keeper/genesis.go @@ -38,16 +38,18 @@ func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState) { var previousProposer sdk.ConsAddress if data.PreviousProposer != "" { var err error - previousProposer, err = sdk.ConsAddressFromBech32(data.PreviousProposer) + previousProposer, err = k.stakingKeeper.ConsensusAddressCodec().StringToBytes(data.PreviousProposer) if err != nil { panic(err) } } - k.SetPreviousProposerConsAddr(ctx, previousProposer) + if err = k.SetPreviousProposerConsAddr(ctx, previousProposer); err != nil { + panic(err) + } for _, rew := range data.OutstandingRewards { - valAddr, err := sdk.ValAddressFromBech32(rew.ValidatorAddress) + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(rew.ValidatorAddress) if err != nil { panic(err) } @@ -58,7 +60,7 @@ func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState) { moduleHoldings = moduleHoldings.Add(rew.OutstandingRewards...) } for _, acc := range data.ValidatorAccumulatedCommissions { - valAddr, err := sdk.ValAddressFromBech32(acc.ValidatorAddress) + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(acc.ValidatorAddress) if err != nil { panic(err) } @@ -68,7 +70,7 @@ func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState) { } } for _, his := range data.ValidatorHistoricalRewards { - valAddr, err := sdk.ValAddressFromBech32(his.ValidatorAddress) + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(his.ValidatorAddress) if err != nil { panic(err) } @@ -78,7 +80,7 @@ func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState) { } } for _, cur := range data.ValidatorCurrentRewards { - valAddr, err := sdk.ValAddressFromBech32(cur.ValidatorAddress) + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(cur.ValidatorAddress) if err != nil { panic(err) } @@ -88,7 +90,7 @@ func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState) { } } for _, del := range data.DelegatorStartingInfos { - valAddr, err := sdk.ValAddressFromBech32(del.ValidatorAddress) + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(del.ValidatorAddress) if err != nil { panic(err) } @@ -103,7 +105,7 @@ func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState) { } } for _, evt := range data.ValidatorSlashEvents { - valAddr, err := sdk.ValAddressFromBech32(evt.ValidatorAddress) + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(evt.ValidatorAddress) if err != nil { panic(err) } diff --git a/x/distribution/keeper/grpc_query.go b/x/distribution/keeper/grpc_query.go index c4f69aded672..b80ca323f8fc 100644 --- a/x/distribution/keeper/grpc_query.go +++ b/x/distribution/keeper/grpc_query.go @@ -27,8 +27,8 @@ func NewQuerier(keeper Keeper) Querier { } // Params queries params of distribution module -func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { - params, err := k.Keeper.Params.Get(c) +func (k Querier) Params(ctx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { + params, err := k.Keeper.Params.Get(ctx) if err != nil { return nil, err } @@ -37,7 +37,7 @@ func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*type } // ValidatorDistributionInfo query validator's commission and self-delegation rewards -func (k Querier) ValidatorDistributionInfo(c context.Context, req *types.QueryValidatorDistributionInfoRequest) (*types.QueryValidatorDistributionInfoResponse, error) { +func (k Querier) ValidatorDistributionInfo(ctx context.Context, req *types.QueryValidatorDistributionInfoRequest) (*types.QueryValidatorDistributionInfoResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } @@ -46,22 +46,28 @@ func (k Querier) ValidatorDistributionInfo(c context.Context, req *types.QueryVa return nil, status.Error(codes.InvalidArgument, "empty validator address") } - ctx := sdk.UnwrapSDKContext(c) - - valAdr, err := sdk.ValAddressFromBech32(req.ValidatorAddress) + valAdr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(req.ValidatorAddress) if err != nil { return nil, err } // self-delegation rewards - val := k.stakingKeeper.Validator(ctx, valAdr) + val, err := k.stakingKeeper.Validator(ctx, valAdr) + if err != nil { + return nil, err + } + if val == nil { return nil, errors.Wrap(types.ErrNoValidatorExists, req.ValidatorAddress) } delAdr := sdk.AccAddress(valAdr) - del := k.stakingKeeper.Delegation(ctx, delAdr, valAdr) + del, err := k.stakingKeeper.Delegation(ctx, delAdr, valAdr) + if err != nil { + return nil, err + } + if del == nil { return nil, types.ErrNoDelegationExists } @@ -90,7 +96,7 @@ func (k Querier) ValidatorDistributionInfo(c context.Context, req *types.QueryVa } // ValidatorOutstandingRewards queries rewards of a validator address -func (k Querier) ValidatorOutstandingRewards(c context.Context, req *types.QueryValidatorOutstandingRewardsRequest) (*types.QueryValidatorOutstandingRewardsResponse, error) { +func (k Querier) ValidatorOutstandingRewards(ctx context.Context, req *types.QueryValidatorOutstandingRewardsRequest) (*types.QueryValidatorOutstandingRewardsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } @@ -99,16 +105,18 @@ func (k Querier) ValidatorOutstandingRewards(c context.Context, req *types.Query return nil, status.Error(codes.InvalidArgument, "empty validator address") } - ctx := sdk.UnwrapSDKContext(c) + valAdr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(req.ValidatorAddress) + if err != nil { + return nil, err + } - valAdr, err := sdk.ValAddressFromBech32(req.ValidatorAddress) + validator, err := k.stakingKeeper.Validator(ctx, valAdr) if err != nil { return nil, err } - validator := k.stakingKeeper.Validator(ctx, valAdr) if validator == nil { - return nil, errors.Wrapf(types.ErrNoValidatorExists, valAdr.String()) + return nil, errors.Wrapf(types.ErrNoValidatorExists, req.ValidatorAddress) } rewards, err := k.GetValidatorOutstandingRewards(ctx, valAdr) @@ -120,7 +128,7 @@ func (k Querier) ValidatorOutstandingRewards(c context.Context, req *types.Query } // ValidatorCommission queries accumulated commission for a validator -func (k Querier) ValidatorCommission(c context.Context, req *types.QueryValidatorCommissionRequest) (*types.QueryValidatorCommissionResponse, error) { +func (k Querier) ValidatorCommission(ctx context.Context, req *types.QueryValidatorCommissionRequest) (*types.QueryValidatorCommissionResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } @@ -129,16 +137,18 @@ func (k Querier) ValidatorCommission(c context.Context, req *types.QueryValidato return nil, status.Error(codes.InvalidArgument, "empty validator address") } - ctx := sdk.UnwrapSDKContext(c) + valAdr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(req.ValidatorAddress) + if err != nil { + return nil, err + } - valAdr, err := sdk.ValAddressFromBech32(req.ValidatorAddress) + validator, err := k.stakingKeeper.Validator(ctx, valAdr) if err != nil { return nil, err } - validator := k.stakingKeeper.Validator(ctx, valAdr) if validator == nil { - return nil, errors.Wrapf(types.ErrNoValidatorExists, valAdr.String()) + return nil, errors.Wrapf(types.ErrNoValidatorExists, req.ValidatorAddress) } commission, err := k.GetValidatorAccumulatedCommission(ctx, valAdr) if err != nil { @@ -149,7 +159,7 @@ func (k Querier) ValidatorCommission(c context.Context, req *types.QueryValidato } // ValidatorSlashes queries slash events of a validator -func (k Querier) ValidatorSlashes(c context.Context, req *types.QueryValidatorSlashesRequest) (*types.QueryValidatorSlashesResponse, error) { +func (k Querier) ValidatorSlashes(ctx context.Context, req *types.QueryValidatorSlashesRequest) (*types.QueryValidatorSlashesResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } @@ -162,12 +172,12 @@ func (k Querier) ValidatorSlashes(c context.Context, req *types.QueryValidatorSl return nil, status.Errorf(codes.InvalidArgument, "starting height greater than ending height (%d > %d)", req.StartingHeight, req.EndingHeight) } - valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddress) + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(req.ValidatorAddress) if err != nil { return nil, status.Errorf(codes.InvalidArgument, "invalid validator address") } - store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(c)) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) slashesStore := prefix.NewStore(store, types.GetValidatorSlashEventPrefix(valAddr)) events, pageRes, err := query.GenericFilteredPaginate(k.cdc, slashesStore, req.Pagination, func(key []byte, result *types.ValidatorSlashEvent) (*types.ValidatorSlashEvent, error) { @@ -192,7 +202,7 @@ func (k Querier) ValidatorSlashes(c context.Context, req *types.QueryValidatorSl } // DelegationRewards the total rewards accrued by a delegation -func (k Querier) DelegationRewards(c context.Context, req *types.QueryDelegationRewardsRequest) (*types.QueryDelegationRewardsResponse, error) { +func (k Querier) DelegationRewards(ctx context.Context, req *types.QueryDelegationRewardsRequest) (*types.QueryDelegationRewardsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } @@ -205,14 +215,16 @@ func (k Querier) DelegationRewards(c context.Context, req *types.QueryDelegation return nil, status.Error(codes.InvalidArgument, "empty validator address") } - ctx := sdk.UnwrapSDKContext(c) + valAdr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(req.ValidatorAddress) + if err != nil { + return nil, err + } - valAdr, err := sdk.ValAddressFromBech32(req.ValidatorAddress) + val, err := k.stakingKeeper.Validator(ctx, valAdr) if err != nil { return nil, err } - val := k.stakingKeeper.Validator(ctx, valAdr) if val == nil { return nil, errors.Wrap(types.ErrNoValidatorExists, req.ValidatorAddress) } @@ -221,7 +233,11 @@ func (k Querier) DelegationRewards(c context.Context, req *types.QueryDelegation if err != nil { return nil, err } - del := k.stakingKeeper.Delegation(ctx, delAdr, valAdr) + del, err := k.stakingKeeper.Delegation(ctx, delAdr, valAdr) + if err != nil { + return nil, err + } + if del == nil { return nil, types.ErrNoDelegationExists } @@ -240,7 +256,7 @@ func (k Querier) DelegationRewards(c context.Context, req *types.QueryDelegation } // DelegationTotalRewards the total rewards accrued by a each validator -func (k Querier) DelegationTotalRewards(c context.Context, req *types.QueryDelegationTotalRewardsRequest) (*types.QueryDelegationTotalRewardsResponse, error) { +func (k Querier) DelegationTotalRewards(ctx context.Context, req *types.QueryDelegationTotalRewardsRequest) (*types.QueryDelegationTotalRewardsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } @@ -249,8 +265,6 @@ func (k Querier) DelegationTotalRewards(c context.Context, req *types.QueryDeleg return nil, status.Error(codes.InvalidArgument, "empty delegator address") } - ctx := sdk.UnwrapSDKContext(c) - total := sdk.DecCoins{} var delRewards []types.DelegationDelegatorReward @@ -259,11 +273,19 @@ func (k Querier) DelegationTotalRewards(c context.Context, req *types.QueryDeleg return nil, err } - k.stakingKeeper.IterateDelegations( + err = k.stakingKeeper.IterateDelegations( ctx, delAdr, func(_ int64, del stakingtypes.DelegationI) (stop bool) { - valAddr := del.GetValidatorAddr() - val := k.stakingKeeper.Validator(ctx, valAddr) + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(del.GetValidatorAddr()) + if err != nil { + panic(err) + } + + val, err := k.stakingKeeper.Validator(ctx, valAddr) + if err != nil { + panic(err) + } + endingPeriod, err := k.IncrementValidatorPeriod(ctx, val) if err != nil { panic(err) @@ -274,17 +296,20 @@ func (k Querier) DelegationTotalRewards(c context.Context, req *types.QueryDeleg panic(err) } - delRewards = append(delRewards, types.NewDelegationDelegatorReward(valAddr, delReward)) + delRewards = append(delRewards, types.NewDelegationDelegatorReward(del.GetValidatorAddr(), delReward)) total = total.Add(delReward...) return false }, ) + if err != nil { + return nil, err + } return &types.QueryDelegationTotalRewardsResponse{Rewards: delRewards, Total: total}, nil } // DelegatorValidators queries the validators list of a delegator -func (k Querier) DelegatorValidators(c context.Context, req *types.QueryDelegatorValidatorsRequest) (*types.QueryDelegatorValidatorsResponse, error) { +func (k Querier) DelegatorValidators(ctx context.Context, req *types.QueryDelegatorValidatorsRequest) (*types.QueryDelegatorValidatorsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } @@ -293,26 +318,29 @@ func (k Querier) DelegatorValidators(c context.Context, req *types.QueryDelegato return nil, status.Error(codes.InvalidArgument, "empty delegator address") } - ctx := sdk.UnwrapSDKContext(c) delAdr, err := k.authKeeper.AddressCodec().StringToBytes(req.DelegatorAddress) if err != nil { return nil, err } var validators []string - k.stakingKeeper.IterateDelegations( + err = k.stakingKeeper.IterateDelegations( ctx, delAdr, func(_ int64, del stakingtypes.DelegationI) (stop bool) { - validators = append(validators, del.GetValidatorAddr().String()) + validators = append(validators, del.GetValidatorAddr()) return false }, ) + if err != nil { + return nil, err + } + return &types.QueryDelegatorValidatorsResponse{Validators: validators}, nil } // DelegatorWithdrawAddress queries Query/delegatorWithdrawAddress -func (k Querier) DelegatorWithdrawAddress(c context.Context, req *types.QueryDelegatorWithdrawAddressRequest) (*types.QueryDelegatorWithdrawAddressResponse, error) { +func (k Querier) DelegatorWithdrawAddress(ctx context.Context, req *types.QueryDelegatorWithdrawAddressRequest) (*types.QueryDelegatorWithdrawAddressResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } @@ -325,7 +353,7 @@ func (k Querier) DelegatorWithdrawAddress(c context.Context, req *types.QueryDel return nil, err } - withdrawAddr, err := k.GetDelegatorWithdrawAddr(c, delAdr) + withdrawAddr, err := k.GetDelegatorWithdrawAddr(ctx, delAdr) if err != nil { return nil, err } @@ -334,8 +362,8 @@ func (k Querier) DelegatorWithdrawAddress(c context.Context, req *types.QueryDel } // CommunityPool queries the community pool coins -func (k Querier) CommunityPool(c context.Context, req *types.QueryCommunityPoolRequest) (*types.QueryCommunityPoolResponse, error) { - pool, err := k.FeePool.Get(c) +func (k Querier) CommunityPool(ctx context.Context, req *types.QueryCommunityPoolRequest) (*types.QueryCommunityPoolResponse, error) { + pool, err := k.FeePool.Get(ctx) if err != nil { return nil, err } diff --git a/x/distribution/keeper/hooks.go b/x/distribution/keeper/hooks.go index 3c7fdd9092a6..006f35ed89a8 100644 --- a/x/distribution/keeper/hooks.go +++ b/x/distribution/keeper/hooks.go @@ -1,6 +1,8 @@ package keeper import ( + "context" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" @@ -21,13 +23,16 @@ func (k Keeper) Hooks() Hooks { } // initialize validator distribution record -func (h Hooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) error { - val := h.k.stakingKeeper.Validator(ctx, valAddr) +func (h Hooks) AfterValidatorCreated(ctx context.Context, valAddr sdk.ValAddress) error { + val, err := h.k.stakingKeeper.Validator(ctx, valAddr) + if err != nil { + return err + } return h.k.initializeValidator(ctx, val) } // AfterValidatorRemoved performs clean up after a validator is removed -func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress) error { +func (h Hooks) AfterValidatorRemoved(ctx context.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress) error { // fetch outstanding outstanding, err := h.k.GetValidatorOutstandingRewardsCoins(ctx, valAddr) if err != nil { @@ -117,16 +122,27 @@ func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, _ sdk.ConsAddress, valAddr } // increment period -func (h Hooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { - val := h.k.stakingKeeper.Validator(ctx, valAddr) - _, err := h.k.IncrementValidatorPeriod(ctx, val) +func (h Hooks) BeforeDelegationCreated(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { + val, err := h.k.stakingKeeper.Validator(ctx, valAddr) + if err != nil { + return err + } + + _, err = h.k.IncrementValidatorPeriod(ctx, val) return err } // withdraw delegation rewards (which also increments period) -func (h Hooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { - val := h.k.stakingKeeper.Validator(ctx, valAddr) - del := h.k.stakingKeeper.Delegation(ctx, delAddr, valAddr) +func (h Hooks) BeforeDelegationSharesModified(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { + val, err := h.k.stakingKeeper.Validator(ctx, valAddr) + if err != nil { + return err + } + + del, err := h.k.stakingKeeper.Delegation(ctx, delAddr, valAddr) + if err != nil { + return err + } if _, err := h.k.withdrawDelegationRewards(ctx, val, del); err != nil { return err @@ -136,32 +152,31 @@ func (h Hooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAd } // create new delegation period record -func (h Hooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { +func (h Hooks) AfterDelegationModified(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { return h.k.initializeDelegation(ctx, valAddr, delAddr) } // record the slash event -func (h Hooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdkmath.LegacyDec) error { - h.k.updateValidatorSlashFraction(ctx, valAddr, fraction) - return nil +func (h Hooks) BeforeValidatorSlashed(ctx context.Context, valAddr sdk.ValAddress, fraction sdkmath.LegacyDec) error { + return h.k.updateValidatorSlashFraction(ctx, valAddr, fraction) } -func (h Hooks) BeforeValidatorModified(_ sdk.Context, _ sdk.ValAddress) error { +func (h Hooks) BeforeValidatorModified(_ context.Context, _ sdk.ValAddress) error { return nil } -func (h Hooks) AfterValidatorBonded(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error { +func (h Hooks) AfterValidatorBonded(_ context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error { return nil } -func (h Hooks) AfterValidatorBeginUnbonding(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error { +func (h Hooks) AfterValidatorBeginUnbonding(_ context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error { return nil } -func (h Hooks) BeforeDelegationRemoved(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error { +func (h Hooks) BeforeDelegationRemoved(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error { return nil } -func (h Hooks) AfterUnbondingInitiated(_ sdk.Context, _ uint64) error { +func (h Hooks) AfterUnbondingInitiated(_ context.Context, _ uint64) error { return nil } diff --git a/x/distribution/keeper/invariants.go b/x/distribution/keeper/invariants.go index 2750f9dd8b34..060dfd575722 100644 --- a/x/distribution/keeper/invariants.go +++ b/x/distribution/keeper/invariants.go @@ -69,27 +69,40 @@ func CanWithdrawInvariant(k Keeper) sdk.Invariant { var remaining sdk.DecCoins - valDelegationAddrs := make(map[string][]sdk.AccAddress) - for _, del := range k.stakingKeeper.GetAllSDKDelegations(ctx) { - valAddr := del.GetValidatorAddr().String() - valDelegationAddrs[valAddr] = append(valDelegationAddrs[valAddr], del.GetDelegatorAddr()) + valDelegationAddrs := make(map[string][][]byte) + allDelegations, err := k.stakingKeeper.GetAllSDKDelegations(ctx) + if err != nil { + panic(err) + } + + for _, del := range allDelegations { + delAddr, err := k.authKeeper.AddressCodec().StringToBytes(del.GetDelegatorAddr()) + if err != nil { + panic(err) + } + valAddr := del.GetValidatorAddr() + valDelegationAddrs[valAddr] = append(valDelegationAddrs[valAddr], delAddr) } // iterate over all validators - k.stakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { - _, _ = k.WithdrawValidatorCommission(ctx, val.GetOperator()) + err = k.stakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + valBz, err1 := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) + if err != nil { + panic(err1) + } + _, _ = k.WithdrawValidatorCommission(ctx, valBz) - delegationAddrs, ok := valDelegationAddrs[val.GetOperator().String()] + delegationAddrs, ok := valDelegationAddrs[val.GetOperator()] if ok { for _, delAddr := range delegationAddrs { - if _, err := k.WithdrawDelegationRewards(ctx, delAddr, val.GetOperator()); err != nil { + if _, err := k.WithdrawDelegationRewards(ctx, delAddr, valBz); err != nil { panic(err) } } } var err error - remaining, err = k.GetValidatorOutstandingRewardsCoins(ctx, val.GetOperator()) + remaining, err = k.GetValidatorOutstandingRewardsCoins(ctx, valBz) if err != nil { panic(err) } @@ -100,6 +113,9 @@ func CanWithdrawInvariant(k Keeper) sdk.Invariant { return false }) + if err != nil { + panic(err) + } broken := len(remaining) > 0 && remaining[0].Amount.IsNegative() return sdk.FormatInvariant(types.ModuleName, "can withdraw", @@ -111,11 +127,19 @@ func CanWithdrawInvariant(k Keeper) sdk.Invariant { func ReferenceCountInvariant(k Keeper) sdk.Invariant { return func(ctx sdk.Context) (string, bool) { valCount := uint64(0) - k.stakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + err := k.stakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { valCount++ return false }) - dels := k.stakingKeeper.GetAllSDKDelegations(ctx) + if err != nil { + panic(err) + } + + dels, err := k.stakingKeeper.GetAllSDKDelegations(ctx) + if err != nil { + panic(err) + } + slashCount := uint64(0) k.IterateValidatorSlashEvents(ctx, func(_ sdk.ValAddress, _ uint64, _ types.ValidatorSlashEvent) (stop bool) { diff --git a/x/distribution/keeper/keeper.go b/x/distribution/keeper/keeper.go index 3f6c2a73d425..7bea2017a1b9 100644 --- a/x/distribution/keeper/keeper.go +++ b/x/distribution/keeper/keeper.go @@ -105,25 +105,32 @@ func (k Keeper) SetWithdrawAddr(ctx context.Context, delegatorAddr, withdrawAddr // withdraw rewards from a delegation func (k Keeper) WithdrawDelegationRewards(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (sdk.Coins, error) { - sdkCtx := sdk.UnwrapSDKContext(ctx) - val := k.stakingKeeper.Validator(sdkCtx, valAddr) + val, err := k.stakingKeeper.Validator(ctx, valAddr) + if err != nil { + return nil, err + } + if val == nil { return nil, types.ErrNoValidatorDistInfo } - del := k.stakingKeeper.Delegation(sdkCtx, delAddr, valAddr) + del, err := k.stakingKeeper.Delegation(ctx, delAddr, valAddr) + if err != nil { + return nil, err + } + if del == nil { return nil, types.ErrEmptyDelegationDistInfo } // withdraw rewards - rewards, err := k.withdrawDelegationRewards(sdkCtx, val, del) + rewards, err := k.withdrawDelegationRewards(ctx, val, del) if err != nil { return nil, err } // reinitialize the delegation - err = k.initializeDelegation(sdkCtx, valAddr, delAddr) + err = k.initializeDelegation(ctx, valAddr, delAddr) if err != nil { return nil, err } diff --git a/x/distribution/keeper/keeper_test.go b/x/distribution/keeper/keeper_test.go index 76cbf3eb2cbb..f43896914bdc 100644 --- a/x/distribution/keeper/keeper_test.go +++ b/x/distribution/keeper/keeper_test.go @@ -4,11 +4,11 @@ import ( "testing" "time" - "cosmossdk.io/math" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" + "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/runtime" diff --git a/x/distribution/keeper/msg_server.go b/x/distribution/keeper/msg_server.go index e2b5e737d1dd..1f4c64e0eb3f 100644 --- a/x/distribution/keeper/msg_server.go +++ b/x/distribution/keeper/msg_server.go @@ -3,8 +3,9 @@ package keeper import ( "context" + "github.com/hashicorp/go-metrics" + "cosmossdk.io/errors" - "github.com/armon/go-metrics" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" @@ -45,7 +46,7 @@ func (k msgServer) SetWithdrawAddress(ctx context.Context, msg *types.MsgSetWith } func (k msgServer) WithdrawDelegatorReward(ctx context.Context, msg *types.MsgWithdrawDelegatorReward) (*types.MsgWithdrawDelegatorRewardResponse, error) { - valAddr, err := sdk.ValAddressFromBech32(msg.ValidatorAddress) + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(msg.ValidatorAddress) if err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid validator address: %s", err) } @@ -76,7 +77,7 @@ func (k msgServer) WithdrawDelegatorReward(ctx context.Context, msg *types.MsgWi } func (k msgServer) WithdrawValidatorCommission(ctx context.Context, msg *types.MsgWithdrawValidatorCommission) (*types.MsgWithdrawValidatorCommissionResponse, error) { - valAddr, err := sdk.ValAddressFromBech32(msg.ValidatorAddress) + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(msg.ValidatorAddress) if err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid validator address: %s", err) } @@ -178,21 +179,26 @@ func (k msgServer) DepositValidatorRewardsPool(ctx context.Context, msg *types.M return nil, err } - valAddr, err := sdk.ValAddressFromBech32(msg.ValidatorAddress) + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(msg.ValidatorAddress) + if err != nil { + return nil, err + } + + validator, err := k.stakingKeeper.Validator(ctx, valAddr) if err != nil { return nil, err } - sdkCtx := sdk.UnwrapSDKContext(ctx) - validator := k.stakingKeeper.Validator(sdkCtx, valAddr) if validator == nil { - return nil, errors.Wrapf(types.ErrNoValidatorExists, valAddr.String()) + return nil, errors.Wrapf(types.ErrNoValidatorExists, msg.ValidatorAddress) } // Allocate tokens from the distribution module to the validator, which are // then distributed to the validator's delegators. reward := sdk.NewDecCoinsFromCoins(msg.Amount...) - k.AllocateTokensToValidator(ctx, validator, reward) + if err = k.AllocateTokensToValidator(ctx, validator, reward); err != nil { + return nil, err + } logger := k.Logger(ctx) logger.Info( diff --git a/x/distribution/keeper/store.go b/x/distribution/keeper/store.go index c5b9132dbaa0..6ba127910018 100644 --- a/x/distribution/keeper/store.go +++ b/x/distribution/keeper/store.go @@ -72,10 +72,10 @@ func (k Keeper) GetPreviousProposerConsAddr(ctx context.Context) (sdk.ConsAddres } // set the proposer public key for this block -func (k Keeper) SetPreviousProposerConsAddr(ctx context.Context, consAddr sdk.ConsAddress) { +func (k Keeper) SetPreviousProposerConsAddr(ctx context.Context, consAddr sdk.ConsAddress) error { store := k.storeService.OpenKVStore(ctx) bz := k.cdc.MustMarshal(&gogotypes.BytesValue{Value: consAddr}) - store.Set(types.ProposerKey, bz) + return store.Set(types.ProposerKey, bz) } // get the starting info associated with a delegator diff --git a/x/distribution/keeper/validator.go b/x/distribution/keeper/validator.go index 7d17cebec0e9..9b830e577852 100644 --- a/x/distribution/keeper/validator.go +++ b/x/distribution/keeper/validator.go @@ -7,40 +7,48 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) // initialize rewards for a new validator func (k Keeper) initializeValidator(ctx context.Context, val stakingtypes.ValidatorI) error { + valBz, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) + if err != nil { + return err + } // set initial historical rewards (period 0) with reference count of 1 - err := k.SetValidatorHistoricalRewards(ctx, val.GetOperator(), 0, types.NewValidatorHistoricalRewards(sdk.DecCoins{}, 1)) + err = k.SetValidatorHistoricalRewards(ctx, valBz, 0, types.NewValidatorHistoricalRewards(sdk.DecCoins{}, 1)) if err != nil { return err } // set current rewards (starting at period 1) - err = k.SetValidatorCurrentRewards(ctx, val.GetOperator(), types.NewValidatorCurrentRewards(sdk.DecCoins{}, 1)) + err = k.SetValidatorCurrentRewards(ctx, valBz, types.NewValidatorCurrentRewards(sdk.DecCoins{}, 1)) if err != nil { return err } // set accumulated commission - err = k.SetValidatorAccumulatedCommission(ctx, val.GetOperator(), types.InitialValidatorAccumulatedCommission()) + err = k.SetValidatorAccumulatedCommission(ctx, valBz, types.InitialValidatorAccumulatedCommission()) if err != nil { return err } // set outstanding rewards - err = k.SetValidatorOutstandingRewards(ctx, val.GetOperator(), types.ValidatorOutstandingRewards{Rewards: sdk.DecCoins{}}) + err = k.SetValidatorOutstandingRewards(ctx, valBz, types.ValidatorOutstandingRewards{Rewards: sdk.DecCoins{}}) return err } // increment validator period, returning the period just ended func (k Keeper) IncrementValidatorPeriod(ctx context.Context, val stakingtypes.ValidatorI) (uint64, error) { + valBz, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) + if err != nil { + return 0, err + } + // fetch current rewards - rewards, err := k.GetValidatorCurrentRewards(ctx, val.GetOperator()) + rewards, err := k.GetValidatorCurrentRewards(ctx, valBz) if err != nil { return 0, err } @@ -56,7 +64,7 @@ func (k Keeper) IncrementValidatorPeriod(ctx context.Context, val stakingtypes.V return 0, err } - outstanding, err := k.GetValidatorOutstandingRewards(ctx, val.GetOperator()) + outstanding, err := k.GetValidatorOutstandingRewards(ctx, valBz) if err != nil { return 0, err } @@ -68,7 +76,7 @@ func (k Keeper) IncrementValidatorPeriod(ctx context.Context, val stakingtypes.V return 0, err } - err = k.SetValidatorOutstandingRewards(ctx, val.GetOperator(), outstanding) + err = k.SetValidatorOutstandingRewards(ctx, valBz, outstanding) if err != nil { return 0, err } @@ -80,7 +88,7 @@ func (k Keeper) IncrementValidatorPeriod(ctx context.Context, val stakingtypes.V } // fetch historical rewards for last period - historical, err := k.GetValidatorHistoricalRewards(ctx, val.GetOperator(), rewards.Period-1) + historical, err := k.GetValidatorHistoricalRewards(ctx, valBz, rewards.Period-1) if err != nil { return 0, err } @@ -88,19 +96,19 @@ func (k Keeper) IncrementValidatorPeriod(ctx context.Context, val stakingtypes.V cumRewardRatio := historical.CumulativeRewardRatio // decrement reference count - err = k.decrementReferenceCount(ctx, val.GetOperator(), rewards.Period-1) + err = k.decrementReferenceCount(ctx, valBz, rewards.Period-1) if err != nil { return 0, err } // set new historical rewards with reference count of 1 - err = k.SetValidatorHistoricalRewards(ctx, val.GetOperator(), rewards.Period, types.NewValidatorHistoricalRewards(cumRewardRatio.Add(current...), 1)) + err = k.SetValidatorHistoricalRewards(ctx, valBz, rewards.Period, types.NewValidatorHistoricalRewards(cumRewardRatio.Add(current...), 1)) if err != nil { return 0, err } // set current rewards, incrementing period by 1 - err = k.SetValidatorCurrentRewards(ctx, val.GetOperator(), types.NewValidatorCurrentRewards(sdk.DecCoins{}, rewards.Period+1)) + err = k.SetValidatorCurrentRewards(ctx, valBz, types.NewValidatorCurrentRewards(sdk.DecCoins{}, rewards.Period+1)) if err != nil { return 0, err } @@ -139,13 +147,16 @@ func (k Keeper) decrementReferenceCount(ctx context.Context, valAddr sdk.ValAddr return k.SetValidatorHistoricalRewards(ctx, valAddr, period, historical) } -func (k Keeper) updateValidatorSlashFraction(ctx context.Context, valAddr sdk.ValAddress, fraction sdk.Dec) error { +func (k Keeper) updateValidatorSlashFraction(ctx context.Context, valAddr sdk.ValAddress, fraction math.LegacyDec) error { if fraction.GT(math.LegacyOneDec()) || fraction.IsNegative() { panic(fmt.Sprintf("fraction must be >=0 and <=1, current fraction: %v", fraction)) } sdkCtx := sdk.UnwrapSDKContext(ctx) - val := k.stakingKeeper.Validator(sdkCtx, valAddr) + val, err := k.stakingKeeper.Validator(ctx, valAddr) + if err != nil { + return err + } // increment current period newPeriod, err := k.IncrementValidatorPeriod(ctx, val) diff --git a/x/distribution/migrations/v3/json.go b/x/distribution/migrations/v3/json.go index b4d07b9965cc..e384b4869307 100644 --- a/x/distribution/migrations/v3/json.go +++ b/x/distribution/migrations/v3/json.go @@ -2,6 +2,7 @@ package v3 import ( sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/x/distribution/types" ) diff --git a/x/distribution/migrations/v3/json_test.go b/x/distribution/migrations/v3/json_test.go index 09fa98d97e3d..8fba6cf9ee6d 100644 --- a/x/distribution/migrations/v3/json_test.go +++ b/x/distribution/migrations/v3/json_test.go @@ -4,9 +4,10 @@ import ( "encoding/json" "testing" - sdkmath "cosmossdk.io/math" "github.com/stretchr/testify/require" + sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/client" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/distribution" diff --git a/x/distribution/migrations/v3/migrate.go b/x/distribution/migrations/v3/migrate.go index 441c9fb590d0..5f59b59566b8 100644 --- a/x/distribution/migrations/v3/migrate.go +++ b/x/distribution/migrations/v3/migrate.go @@ -2,7 +2,6 @@ package v3 import ( "cosmossdk.io/core/store" - sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" diff --git a/x/distribution/module.go b/x/distribution/module.go index 2680181edd75..5e00310abcfd 100644 --- a/x/distribution/module.go +++ b/x/distribution/module.go @@ -5,16 +5,14 @@ import ( "encoding/json" "fmt" - abci "github.com/cometbft/cometbft/abci/types" gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" modulev1 "cosmossdk.io/api/cosmos/distribution/module/v1" "cosmossdk.io/core/address" "cosmossdk.io/core/appmodule" - "cosmossdk.io/depinject" - "cosmossdk.io/core/store" + "cosmossdk.io/depinject" sdkclient "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -36,8 +34,14 @@ import ( const ConsensusVersion = 3 var ( - _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModuleBasic = AppModule{} _ module.AppModuleSimulation = AppModule{} + _ module.HasGenesis = AppModule{} + _ module.HasServices = AppModule{} + _ module.HasInvariants = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasBeginBlocker = AppModule{} ) // AppModuleBasic defines the basic application module used by the distribution module. @@ -63,7 +67,7 @@ func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { } // ValidateGenesis performs genesis state validation for the distribution module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config sdkclient.TxEncodingConfig, bz json.RawMessage) error { +func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ sdkclient.TxEncodingConfig, bz json.RawMessage) error { var data types.GenesisState if err := cdc.UnmarshalJSON(bz, &data); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) @@ -81,12 +85,7 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx sdkclient.Context, mux // GetTxCmd returns the root tx command for the distribution module. func (ab AppModuleBasic) GetTxCmd() *cobra.Command { - return cli.NewTxCmd(ab.ac) -} - -// GetQueryCmd returns the root query command for the distribution module. -func (ab AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.GetQueryCmd(ab.ac) + return cli.NewTxCmd(ab.cdc.InterfaceRegistry().SigningContext().ValidatorAddressCodec(), ab.cdc.InterfaceRegistry().SigningContext().AddressCodec()) } // RegisterInterfaces implements InterfaceModule @@ -122,22 +121,12 @@ func NewAppModule( } } -var ( - _ appmodule.AppModule = AppModule{} - _ appmodule.HasBeginBlocker = AppModule{} -) - // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} // IsAppModule implements the appmodule.AppModule interface. func (am AppModule) IsAppModule() {} -// Name returns the distribution module's name. -func (AppModule) Name() string { - return types.ModuleName -} - // RegisterInvariants registers the distribution module invariants. func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { keeper.RegisterInvariants(ir, am.keeper) @@ -160,11 +149,10 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { // InitGenesis performs genesis initialization for the distribution module. It returns // no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) { var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) am.keeper.InitGenesis(ctx, genesisState) - return []abci.ValidatorUpdate{} } // ExportGenesis returns the exported genesis state as raw bytes for the distribution @@ -191,7 +179,7 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { } // ProposalMsgs returns msgs used for governance proposals for simulations. -func (AppModule) ProposalMsgs(simState module.SimulationState) []simtypes.WeightedProposalMsg { +func (AppModule) ProposalMsgs(_ module.SimulationState) []simtypes.WeightedProposalMsg { return simulation.ProposalMsgs() } diff --git a/x/distribution/simulation/decoder_test.go b/x/distribution/simulation/decoder_test.go index 9d599213a436..773208143f08 100644 --- a/x/distribution/simulation/decoder_test.go +++ b/x/distribution/simulation/decoder_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/kv" diff --git a/x/distribution/simulation/genesis_test.go b/x/distribution/simulation/genesis_test.go index 1531577610ba..62e26f451503 100644 --- a/x/distribution/simulation/genesis_test.go +++ b/x/distribution/simulation/genesis_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/require" sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/types/module" diff --git a/x/distribution/simulation/operations.go b/x/distribution/simulation/operations.go index 8de9fe1ce55e..4fff81489e91 100644 --- a/x/distribution/simulation/operations.go +++ b/x/distribution/simulation/operations.go @@ -1,9 +1,12 @@ package simulation import ( + "errors" "fmt" "math/rand" + "cosmossdk.io/collections" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -124,14 +127,24 @@ func SimulateMsgWithdrawDelegatorReward(txConfig client.TxConfig, ak types.Accou r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { simAccount, _ := simtypes.RandomAcc(r, accs) - delegations := sk.GetAllDelegatorDelegations(ctx, simAccount.Address) + delegations, err := sk.GetAllDelegatorDelegations(ctx, simAccount.Address) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(&types.MsgWithdrawDelegatorReward{}), "error getting delegations"), nil, err + } if len(delegations) == 0 { return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(&types.MsgWithdrawDelegatorReward{}), "number of delegators equal 0"), nil, nil } delegation := delegations[r.Intn(len(delegations))] - validator := sk.Validator(ctx, delegation.GetValidatorAddr()) + delAddr, err := sk.ValidatorAddressCodec().StringToBytes(delegation.GetValidatorAddr()) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(&types.MsgWithdrawDelegatorReward{}), "error converting validator address"), nil, err + } + validator, err := sk.Validator(ctx, delAddr) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(&types.MsgWithdrawDelegatorReward{}), "error getting validator"), nil, err + } if validator == nil { return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(&types.MsgWithdrawDelegatorReward{}), "validator is nil"), nil, fmt.Errorf("validator %s not found", delegation.GetValidatorAddr()) } @@ -139,7 +152,7 @@ func SimulateMsgWithdrawDelegatorReward(txConfig client.TxConfig, ak types.Accou account := ak.GetAccount(ctx, simAccount.Address) spendable := bk.SpendableCoins(ctx, account.GetAddress()) - msg := types.NewMsgWithdrawDelegatorReward(simAccount.Address, validator.GetOperator()) + msg := types.NewMsgWithdrawDelegatorReward(simAccount.Address.String(), validator.GetOperator()) txCtx := simulation.OperationInput{ R: r, @@ -166,13 +179,24 @@ func SimulateMsgWithdrawValidatorCommission(txConfig client.TxConfig, ak types.A ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { msgType := sdk.MsgTypeURL(&types.MsgWithdrawValidatorCommission{}) - validator, ok := testutil.RandSliceElem(r, sk.GetAllValidators(ctx)) + allVals, err := sk.GetAllValidators(ctx) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "error getting all validators"), nil, err + } + + validator, ok := testutil.RandSliceElem(r, allVals) if !ok { return simtypes.NoOpMsg(types.ModuleName, msgType, "random validator is not ok"), nil, nil } - commission, err := k.GetValidatorAccumulatedCommission(ctx, validator.GetOperator()) + valBz, err := sk.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "error converting validator address"), nil, err + } + + commission, err := k.GetValidatorAccumulatedCommission(ctx, valBz) + + if err != nil && !errors.Is(err, collections.ErrNotFound) { return simtypes.NoOpMsg(types.ModuleName, msgType, "error getting validator commission"), nil, err } @@ -180,7 +204,7 @@ func SimulateMsgWithdrawValidatorCommission(txConfig client.TxConfig, ak types.A return simtypes.NoOpMsg(types.ModuleName, msgType, "validator commission is zero"), nil, nil } - simAccount, found := simtypes.FindAccount(accs, sdk.AccAddress(validator.GetOperator())) + simAccount, found := simtypes.FindAccount(accs, sdk.AccAddress(valBz)) if !found { return simtypes.NoOpMsg(types.ModuleName, msgType, "could not find account"), nil, fmt.Errorf("validator %s not found", validator.GetOperator()) } @@ -237,7 +261,7 @@ func SimulateMsgFundCommunityPool(txConfig client.TxConfig, ak types.AccountKeep } } - msg := types.NewMsgFundCommunityPool(fundAmount, funder.Address) + msg := types.NewMsgFundCommunityPool(fundAmount, funder.Address.String()) txCtx := simulation.OperationInput{ R: r, diff --git a/x/distribution/simulation/operations_test.go b/x/distribution/simulation/operations_test.go index 256a633ffb3d..69c5726a0638 100644 --- a/x/distribution/simulation/operations_test.go +++ b/x/distribution/simulation/operations_test.go @@ -4,15 +4,17 @@ import ( "math/rand" "testing" - "cosmossdk.io/depinject" - "cosmossdk.io/log" - "cosmossdk.io/math" abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/suite" + "cosmossdk.io/depinject" + "cosmossdk.io/log" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/runtime" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" @@ -108,16 +110,20 @@ func (suite *SimTestSuite) TestSimulateMsgWithdrawDelegatorReward() { delTokens := sdk.TokensFromConsensusPower(2, sdk.DefaultPowerReduction) validator0, issuedShares := validator0.AddTokensFromDel(delTokens) delegator := accounts[1] - delegation := stakingtypes.NewDelegation(delegator.Address, validator0.GetOperator(), issuedShares) - suite.stakingKeeper.SetDelegation(suite.ctx, delegation) - suite.distrKeeper.SetDelegatorStartingInfo(suite.ctx, validator0.GetOperator(), delegator.Address, types.NewDelegatorStartingInfo(2, math.LegacyOneDec(), 200)) - suite.setupValidatorRewards(validator0.GetOperator()) + delegation := stakingtypes.NewDelegation(delegator.Address.String(), validator0.GetOperator(), issuedShares) + suite.Require().NoError(suite.stakingKeeper.SetDelegation(suite.ctx, delegation)) + valBz, err := address.NewBech32Codec("cosmosvaloper").StringToBytes(validator0.GetOperator()) + suite.Require().NoError(err) + suite.distrKeeper.SetDelegatorStartingInfo(suite.ctx, valBz, delegator.Address, types.NewDelegatorStartingInfo(2, math.LegacyOneDec(), 200)) - suite.app.FinalizeBlock(&abci.RequestFinalizeBlock{ + suite.setupValidatorRewards(valBz) + + _, err = suite.app.FinalizeBlock(&abci.RequestFinalizeBlock{ Height: suite.app.LastBlockHeight() + 1, Hash: suite.app.LastCommitID().Hash, }) + suite.Require().NoError(err) // execute operation op := simulation.SimulateMsgWithdrawDelegatorReward(suite.txConfig, suite.accountKeeper, suite.bankKeeper, suite.distrKeeper, suite.stakingKeeper) @@ -165,18 +171,26 @@ func (suite *SimTestSuite) testSimulateMsgWithdrawValidatorCommission(tokenName sdk.NewDecCoinFromDec(tokenName, math.LegacyNewDec(5).Quo(math.LegacyNewDec(2))), sdk.NewDecCoinFromDec("stake", math.LegacyNewDec(1).Quo(math.LegacyNewDec(1))), ) + valCodec := address.NewBech32Codec("cosmosvaloper") - suite.distrKeeper.SetValidatorOutstandingRewards(suite.ctx, validator0.GetOperator(), types.ValidatorOutstandingRewards{Rewards: valCommission}) - suite.distrKeeper.SetValidatorOutstandingRewards(suite.ctx, suite.genesisVals[0].GetOperator(), types.ValidatorOutstandingRewards{Rewards: valCommission}) + val0, err := valCodec.StringToBytes(validator0.GetOperator()) + suite.Require().NoError(err) + + genVal0, err := valCodec.StringToBytes(suite.genesisVals[0].GetOperator()) + suite.Require().NoError(err) + + suite.distrKeeper.SetValidatorOutstandingRewards(suite.ctx, val0, types.ValidatorOutstandingRewards{Rewards: valCommission}) + suite.distrKeeper.SetValidatorOutstandingRewards(suite.ctx, genVal0, types.ValidatorOutstandingRewards{Rewards: valCommission}) // setup validator accumulated commission - suite.distrKeeper.SetValidatorAccumulatedCommission(suite.ctx, validator0.GetOperator(), types.ValidatorAccumulatedCommission{Commission: valCommission}) - suite.distrKeeper.SetValidatorAccumulatedCommission(suite.ctx, suite.genesisVals[0].GetOperator(), types.ValidatorAccumulatedCommission{Commission: valCommission}) + suite.distrKeeper.SetValidatorAccumulatedCommission(suite.ctx, val0, types.ValidatorAccumulatedCommission{Commission: valCommission}) + suite.distrKeeper.SetValidatorAccumulatedCommission(suite.ctx, genVal0, types.ValidatorAccumulatedCommission{Commission: valCommission}) - suite.app.FinalizeBlock(&abci.RequestFinalizeBlock{ + _, err = suite.app.FinalizeBlock(&abci.RequestFinalizeBlock{ Height: suite.app.LastBlockHeight() + 1, Hash: suite.app.LastCommitID().Hash, }) + suite.Require().NoError(err) // execute operation op := simulation.SimulateMsgWithdrawValidatorCommission(suite.txConfig, suite.accountKeeper, suite.bankKeeper, suite.distrKeeper, suite.stakingKeeper) @@ -262,7 +276,8 @@ func (suite *SimTestSuite) SetupTest() { suite.ctx = suite.app.BaseApp.NewContext(false) - genesisVals := suite.stakingKeeper.GetAllValidators(suite.ctx) + genesisVals, err := suite.stakingKeeper.GetAllValidators(suite.ctx) + suite.Require().NoError(err) suite.Require().Len(genesisVals, 1) suite.genesisVals = genesisVals } @@ -293,7 +308,7 @@ func (suite *SimTestSuite) getTestingValidator(accounts []simtypes.Account, comm account := accounts[n] valPubKey := account.PubKey valAddr := sdk.ValAddress(account.PubKey.Address().Bytes()) - validator, err := stakingtypes.NewValidator(valAddr, valPubKey, stakingtypes. + validator, err := stakingtypes.NewValidator(valAddr.String(), valPubKey, stakingtypes. Description{}) require.NoError(err) validator, err = validator.SetInitialCommission(commission) diff --git a/x/distribution/simulation/proposals_test.go b/x/distribution/simulation/proposals_test.go index 578eb66fd2b4..99d0b9138904 100644 --- a/x/distribution/simulation/proposals_test.go +++ b/x/distribution/simulation/proposals_test.go @@ -4,10 +4,11 @@ import ( "math/rand" "testing" - sdkmath "cosmossdk.io/math" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "gotest.tools/v3/assert" + sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" diff --git a/x/distribution/testutil/app_config.go b/x/distribution/testutil/app_config.go index 8c3e33586570..c824f4dff45c 100644 --- a/x/distribution/testutil/app_config.go +++ b/x/distribution/testutil/app_config.go @@ -2,7 +2,6 @@ package testutil import ( "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/bank" // import as blank for app wiring diff --git a/x/distribution/testutil/expected_keepers_mocks.go b/x/distribution/testutil/expected_keepers_mocks.go index c4d2ab9eea77..c8d22259d623 100644 --- a/x/distribution/testutil/expected_keepers_mocks.go +++ b/x/distribution/testutil/expected_keepers_mocks.go @@ -235,12 +235,27 @@ func (m *MockStakingKeeper) EXPECT() *MockStakingKeeperMockRecorder { return m.recorder } +// ConsensusAddressCodec mocks base method. +func (m *MockStakingKeeper) ConsensusAddressCodec() address.Codec { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ConsensusAddressCodec") + ret0, _ := ret[0].(address.Codec) + return ret0 +} + +// ConsensusAddressCodec indicates an expected call of ConsensusAddressCodec. +func (mr *MockStakingKeeperMockRecorder) ConsensusAddressCodec() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConsensusAddressCodec", reflect.TypeOf((*MockStakingKeeper)(nil).ConsensusAddressCodec)) +} + // Delegation mocks base method. -func (m *MockStakingKeeper) Delegation(arg0 types.Context, arg1 types.AccAddress, arg2 types.ValAddress) types0.DelegationI { +func (m *MockStakingKeeper) Delegation(arg0 context.Context, arg1 types.AccAddress, arg2 types.ValAddress) (types0.DelegationI, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Delegation", arg0, arg1, arg2) ret0, _ := ret[0].(types0.DelegationI) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // Delegation indicates an expected call of Delegation. @@ -250,11 +265,12 @@ func (mr *MockStakingKeeperMockRecorder) Delegation(arg0, arg1, arg2 interface{} } // GetAllDelegatorDelegations mocks base method. -func (m *MockStakingKeeper) GetAllDelegatorDelegations(ctx types.Context, delegator types.AccAddress) []types0.Delegation { +func (m *MockStakingKeeper) GetAllDelegatorDelegations(ctx context.Context, delegator types.AccAddress) ([]types0.Delegation, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetAllDelegatorDelegations", ctx, delegator) ret0, _ := ret[0].([]types0.Delegation) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // GetAllDelegatorDelegations indicates an expected call of GetAllDelegatorDelegations. @@ -264,11 +280,12 @@ func (mr *MockStakingKeeperMockRecorder) GetAllDelegatorDelegations(ctx, delegat } // GetAllSDKDelegations mocks base method. -func (m *MockStakingKeeper) GetAllSDKDelegations(ctx types.Context) []types0.Delegation { +func (m *MockStakingKeeper) GetAllSDKDelegations(ctx context.Context) ([]types0.Delegation, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetAllSDKDelegations", ctx) ret0, _ := ret[0].([]types0.Delegation) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // GetAllSDKDelegations indicates an expected call of GetAllSDKDelegations. @@ -278,11 +295,12 @@ func (mr *MockStakingKeeperMockRecorder) GetAllSDKDelegations(ctx interface{}) * } // GetAllValidators mocks base method. -func (m *MockStakingKeeper) GetAllValidators(ctx types.Context) []types0.Validator { +func (m *MockStakingKeeper) GetAllValidators(ctx context.Context) ([]types0.Validator, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetAllValidators", ctx) ret0, _ := ret[0].([]types0.Validator) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // GetAllValidators indicates an expected call of GetAllValidators. @@ -292,9 +310,11 @@ func (mr *MockStakingKeeperMockRecorder) GetAllValidators(ctx interface{}) *gomo } // IterateDelegations mocks base method. -func (m *MockStakingKeeper) IterateDelegations(ctx types.Context, delegator types.AccAddress, fn func(int64, types0.DelegationI) bool) { +func (m *MockStakingKeeper) IterateDelegations(ctx context.Context, delegator types.AccAddress, fn func(int64, types0.DelegationI) bool) error { m.ctrl.T.Helper() - m.ctrl.Call(m, "IterateDelegations", ctx, delegator, fn) + ret := m.ctrl.Call(m, "IterateDelegations", ctx, delegator, fn) + ret0, _ := ret[0].(error) + return ret0 } // IterateDelegations indicates an expected call of IterateDelegations. @@ -304,9 +324,11 @@ func (mr *MockStakingKeeperMockRecorder) IterateDelegations(ctx, delegator, fn i } // IterateValidators mocks base method. -func (m *MockStakingKeeper) IterateValidators(arg0 types.Context, arg1 func(int64, types0.ValidatorI) bool) { +func (m *MockStakingKeeper) IterateValidators(arg0 context.Context, arg1 func(int64, types0.ValidatorI) bool) error { m.ctrl.T.Helper() - m.ctrl.Call(m, "IterateValidators", arg0, arg1) + ret := m.ctrl.Call(m, "IterateValidators", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 } // IterateValidators indicates an expected call of IterateValidators. @@ -316,11 +338,12 @@ func (mr *MockStakingKeeperMockRecorder) IterateValidators(arg0, arg1 interface{ } // Validator mocks base method. -func (m *MockStakingKeeper) Validator(arg0 types.Context, arg1 types.ValAddress) types0.ValidatorI { +func (m *MockStakingKeeper) Validator(arg0 context.Context, arg1 types.ValAddress) (types0.ValidatorI, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Validator", arg0, arg1) ret0, _ := ret[0].(types0.ValidatorI) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // Validator indicates an expected call of Validator. @@ -329,12 +352,27 @@ func (mr *MockStakingKeeperMockRecorder) Validator(arg0, arg1 interface{}) *gomo return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validator", reflect.TypeOf((*MockStakingKeeper)(nil).Validator), arg0, arg1) } +// ValidatorAddressCodec mocks base method. +func (m *MockStakingKeeper) ValidatorAddressCodec() address.Codec { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ValidatorAddressCodec") + ret0, _ := ret[0].(address.Codec) + return ret0 +} + +// ValidatorAddressCodec indicates an expected call of ValidatorAddressCodec. +func (mr *MockStakingKeeperMockRecorder) ValidatorAddressCodec() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatorAddressCodec", reflect.TypeOf((*MockStakingKeeper)(nil).ValidatorAddressCodec)) +} + // ValidatorByConsAddr mocks base method. -func (m *MockStakingKeeper) ValidatorByConsAddr(arg0 types.Context, arg1 types.ConsAddress) types0.ValidatorI { +func (m *MockStakingKeeper) ValidatorByConsAddr(arg0 context.Context, arg1 types.ConsAddress) (types0.ValidatorI, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ValidatorByConsAddr", arg0, arg1) ret0, _ := ret[0].(types0.ValidatorI) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // ValidatorByConsAddr indicates an expected call of ValidatorByConsAddr. @@ -367,9 +405,11 @@ func (m *MockStakingHooks) EXPECT() *MockStakingHooksMockRecorder { } // AfterDelegationModified mocks base method. -func (m *MockStakingHooks) AfterDelegationModified(ctx types.Context, delAddr types.AccAddress, valAddr types.ValAddress) { +func (m *MockStakingHooks) AfterDelegationModified(ctx context.Context, delAddr types.AccAddress, valAddr types.ValAddress) error { m.ctrl.T.Helper() - m.ctrl.Call(m, "AfterDelegationModified", ctx, delAddr, valAddr) + ret := m.ctrl.Call(m, "AfterDelegationModified", ctx, delAddr, valAddr) + ret0, _ := ret[0].(error) + return ret0 } // AfterDelegationModified indicates an expected call of AfterDelegationModified. @@ -379,9 +419,11 @@ func (mr *MockStakingHooksMockRecorder) AfterDelegationModified(ctx, delAddr, va } // AfterValidatorCreated mocks base method. -func (m *MockStakingHooks) AfterValidatorCreated(ctx types.Context, valAddr types.ValAddress) { +func (m *MockStakingHooks) AfterValidatorCreated(ctx context.Context, valAddr types.ValAddress) error { m.ctrl.T.Helper() - m.ctrl.Call(m, "AfterValidatorCreated", ctx, valAddr) + ret := m.ctrl.Call(m, "AfterValidatorCreated", ctx, valAddr) + ret0, _ := ret[0].(error) + return ret0 } // AfterValidatorCreated indicates an expected call of AfterValidatorCreated. diff --git a/x/distribution/testutil/staking_helper.go b/x/distribution/testutil/staking_helper.go index a568898aabf3..a031774cf652 100644 --- a/x/distribution/testutil/staking_helper.go +++ b/x/distribution/testutil/staking_helper.go @@ -13,7 +13,7 @@ import ( func CreateValidator(pk cryptotypes.PubKey, stake math.Int) (stakingtypes.Validator, error) { valConsAddr := sdk.GetConsAddress(pk) - val, err := stakingtypes.NewValidator(sdk.ValAddress(valConsAddr), pk, stakingtypes.Description{Moniker: "TestValidator"}) + val, err := stakingtypes.NewValidator(sdk.ValAddress(valConsAddr).String(), pk, stakingtypes.Description{Moniker: "TestValidator"}) val.Tokens = stake val.DelegatorShares = math.LegacyNewDecFromInt(val.Tokens) return val, err @@ -49,13 +49,19 @@ func SlashValidator( slashFactor math.LegacyDec, validator *stakingtypes.Validator, distrKeeper *keeper.Keeper, + sk *MockStakingKeeper, ) math.Int { if slashFactor.IsNegative() { panic(fmt.Errorf("attempted to slash with a negative slash factor: %v", slashFactor)) } + valBz, err := sk.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) + if err != nil { + panic(err) + } + // call the before-modification hook - err := distrKeeper.Hooks().BeforeValidatorModified(ctx, validator.GetOperator()) + err = distrKeeper.Hooks().BeforeValidatorModified(ctx, valBz) if err != nil { panic(err) } @@ -83,7 +89,10 @@ func SlashValidator( effectiveFraction = math.LegacyOneDec() } // call the before-slashed hook - distrKeeper.Hooks().BeforeValidatorSlashed(ctx, validator.GetOperator(), effectiveFraction) + err := distrKeeper.Hooks().BeforeValidatorSlashed(ctx, valBz, effectiveFraction) + if err != nil { + panic(err) + } } // Deduct from validator's bonded tokens and update the validator. // Burn the slashed tokens from the pool account and decrease the total supply. @@ -102,16 +111,21 @@ func Delegate( validator *stakingtypes.Validator, amount math.Int, delegation *stakingtypes.Delegation, + sk *MockStakingKeeper, ) ( newShares math.LegacyDec, updatedDel stakingtypes.Delegation, err error, ) { + valBz, err := sk.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) + if err != nil { + return math.LegacyZeroDec(), stakingtypes.Delegation{}, err + } if delegation != nil { - err = distrKeeper.Hooks().BeforeDelegationSharesModified(ctx, delegator, validator.GetOperator()) + err = distrKeeper.Hooks().BeforeDelegationSharesModified(ctx, delegator, valBz) } else { - err = distrKeeper.Hooks().BeforeDelegationCreated(ctx, delegator, validator.GetOperator()) - del := stakingtypes.NewDelegation(delegator, validator.GetOperator(), math.LegacyZeroDec()) + err = distrKeeper.Hooks().BeforeDelegationCreated(ctx, delegator, valBz) + del := stakingtypes.NewDelegation(delegator.String(), validator.GetOperator(), math.LegacyZeroDec()) delegation = &del } diff --git a/x/distribution/types/distribution.pb.go b/x/distribution/types/distribution.pb.go index f2f82a7acf87..bd9f9d1783fd 100644 --- a/x/distribution/types/distribution.pb.go +++ b/x/distribution/types/distribution.pb.go @@ -4,6 +4,7 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" _ "github.com/cosmos/cosmos-proto" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" @@ -29,14 +30,14 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Params defines the set of params for the distribution module. type Params struct { - CommunityTax github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=community_tax,json=communityTax,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"community_tax"` + CommunityTax cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=community_tax,json=communityTax,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"community_tax"` // Deprecated: The base_proposer_reward field is deprecated and is no longer used // in the x/distribution module's reward mechanism. - BaseProposerReward github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=base_proposer_reward,json=baseProposerReward,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"base_proposer_reward"` // Deprecated: Do not use. + BaseProposerReward cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=base_proposer_reward,json=baseProposerReward,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"base_proposer_reward"` // Deprecated: Do not use. // Deprecated: The bonus_proposer_reward field is deprecated and is no longer used // in the x/distribution module's reward mechanism. - BonusProposerReward github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=bonus_proposer_reward,json=bonusProposerReward,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"bonus_proposer_reward"` // Deprecated: Do not use. - WithdrawAddrEnabled bool `protobuf:"varint,4,opt,name=withdraw_addr_enabled,json=withdrawAddrEnabled,proto3" json:"withdraw_addr_enabled,omitempty"` + BonusProposerReward cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=bonus_proposer_reward,json=bonusProposerReward,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"bonus_proposer_reward"` // Deprecated: Do not use. + WithdrawAddrEnabled bool `protobuf:"varint,4,opt,name=withdraw_addr_enabled,json=withdrawAddrEnabled,proto3" json:"withdraw_addr_enabled,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -296,8 +297,8 @@ func (m *ValidatorOutstandingRewards) GetRewards() github_com_cosmos_cosmos_sdk_ // This is needed to calculate appropriate amount of staking tokens // for delegations which are withdrawn after a slash has occurred. type ValidatorSlashEvent struct { - ValidatorPeriod uint64 `protobuf:"varint,1,opt,name=validator_period,json=validatorPeriod,proto3" json:"validator_period,omitempty"` - Fraction github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=fraction,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"fraction"` + ValidatorPeriod uint64 `protobuf:"varint,1,opt,name=validator_period,json=validatorPeriod,proto3" json:"validator_period,omitempty"` + Fraction cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=fraction,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fraction"` } func (m *ValidatorSlashEvent) Reset() { *m = ValidatorSlashEvent{} } @@ -487,9 +488,9 @@ var xxx_messageInfo_CommunityPoolSpendProposal proto.InternalMessageInfo // the delegators within the validator may be left with less than a full token, // thus sdk.Dec is used. type DelegatorStartingInfo struct { - PreviousPeriod uint64 `protobuf:"varint,1,opt,name=previous_period,json=previousPeriod,proto3" json:"previous_period,omitempty"` - Stake github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=stake,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"stake"` - Height uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"creation_height"` + PreviousPeriod uint64 `protobuf:"varint,1,opt,name=previous_period,json=previousPeriod,proto3" json:"previous_period,omitempty"` + Stake cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=stake,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"stake"` + Height uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"creation_height"` } func (m *DelegatorStartingInfo) Reset() { *m = DelegatorStartingInfo{} } @@ -642,70 +643,71 @@ func init() { } var fileDescriptor_cd78a31ea281a992 = []byte{ - // 1006 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xf6, 0x34, 0x89, 0xd3, 0x4c, 0xdb, 0x84, 0x4e, 0x7e, 0xd4, 0x71, 0x8b, 0x1d, 0x56, 0x2a, - 0x84, 0x40, 0x6c, 0x52, 0x2e, 0x28, 0xe2, 0x12, 0xdb, 0xad, 0xe0, 0x42, 0xa3, 0x0d, 0xa2, 0x88, - 0xcb, 0x6a, 0xbc, 0x3b, 0xb1, 0x47, 0xdd, 0x9d, 0x59, 0x66, 0x66, 0x9d, 0xe4, 0xc0, 0x3d, 0x70, - 0x00, 0x6e, 0xa0, 0x9e, 0x2a, 0xb8, 0x54, 0x9c, 0x72, 0xc8, 0x8d, 0x7f, 0xa0, 0xe2, 0x54, 0x15, - 0x09, 0x21, 0x0e, 0x29, 0x24, 0x87, 0x20, 0xfe, 0x0a, 0x34, 0x3b, 0xe3, 0x5d, 0x27, 0x84, 0x52, - 0xa9, 0xb5, 0xb8, 0x24, 0x9e, 0xef, 0xcd, 0xbe, 0xef, 0x7d, 0xef, 0xbd, 0x79, 0x33, 0xb0, 0xe6, - 0x73, 0x19, 0x71, 0x59, 0x0f, 0xa8, 0x54, 0x82, 0xb6, 0x13, 0x45, 0x39, 0xab, 0xf7, 0x56, 0xda, - 0x44, 0xe1, 0x95, 0x13, 0x60, 0x2d, 0x16, 0x5c, 0x71, 0x74, 0xd5, 0xec, 0xaf, 0x9d, 0x30, 0xd9, - 0xfd, 0xe5, 0x99, 0x0e, 0xef, 0xf0, 0x74, 0x5f, 0x5d, 0xff, 0x32, 0x9f, 0x94, 0x2b, 0x96, 0xa2, - 0x8d, 0x25, 0xc9, 0x5c, 0xfb, 0x9c, 0x5a, 0x97, 0xe5, 0x79, 0x63, 0xf7, 0xcc, 0x87, 0xd6, 0xbf, - 0x31, 0x5d, 0xc6, 0x11, 0x65, 0xbc, 0x9e, 0xfe, 0x35, 0x90, 0xf3, 0xe3, 0x08, 0x2c, 0xae, 0x63, - 0x81, 0x23, 0x89, 0x36, 0xe1, 0x25, 0x9f, 0x47, 0x51, 0xc2, 0xa8, 0xda, 0xf1, 0x14, 0xde, 0x2e, - 0x81, 0x05, 0xb0, 0x38, 0xd1, 0x58, 0x7b, 0x78, 0x50, 0x2d, 0xfc, 0x76, 0x50, 0x7d, 0xb5, 0x43, - 0x55, 0x37, 0x69, 0xd7, 0x7c, 0x1e, 0x59, 0xaf, 0xf6, 0xdf, 0xb2, 0x0c, 0xee, 0xd6, 0xd5, 0x4e, - 0x4c, 0x64, 0xad, 0x45, 0xfc, 0xc7, 0xfb, 0xcb, 0xd0, 0x92, 0xb6, 0x88, 0xff, 0xe0, 0x78, 0x6f, - 0x09, 0xb8, 0x17, 0x33, 0xbf, 0x1f, 0xe2, 0x6d, 0x94, 0xc0, 0x19, 0x1d, 0xbb, 0x0e, 0x30, 0xe6, - 0x92, 0x08, 0x4f, 0x90, 0x2d, 0x2c, 0x82, 0xd2, 0xb9, 0x94, 0xae, 0xf9, 0xdc, 0x74, 0x25, 0xe0, - 0x22, 0x4d, 0xb0, 0x6e, 0xfd, 0xbb, 0xa9, 0x7b, 0xb4, 0x05, 0x67, 0xdb, 0x9c, 0x25, 0xf2, 0x1f, - 0xbc, 0x23, 0x2f, 0x8e, 0x77, 0x3a, 0x65, 0x38, 0x45, 0x7c, 0x03, 0xce, 0x6e, 0x51, 0xd5, 0x0d, - 0x04, 0xde, 0xf2, 0x70, 0x10, 0x08, 0x8f, 0x30, 0xdc, 0x0e, 0x49, 0x50, 0x1a, 0x5d, 0x00, 0x8b, - 0xe7, 0xdd, 0xe9, 0xbe, 0x71, 0x2d, 0x08, 0xc4, 0x4d, 0x63, 0x5a, 0xbd, 0xfe, 0xc5, 0xf1, 0xde, - 0xd2, 0xc2, 0x00, 0xf1, 0xf6, 0xc9, 0x96, 0x32, 0x25, 0x73, 0x7e, 0x01, 0xb0, 0xfc, 0x11, 0x0e, - 0x69, 0x80, 0x15, 0x17, 0xef, 0x51, 0xa9, 0xb8, 0xa0, 0x3e, 0x0e, 0x0d, 0xb1, 0x44, 0x5f, 0x02, - 0x78, 0xc5, 0x4f, 0xa2, 0x24, 0xc4, 0x8a, 0xf6, 0x88, 0xd5, 0xeb, 0x09, 0xac, 0x28, 0x2f, 0x81, - 0x85, 0x91, 0xc5, 0x0b, 0x37, 0xae, 0xd9, 0x86, 0xad, 0xe9, 0x84, 0xf5, 0x1b, 0x4f, 0x2b, 0x6a, - 0x72, 0xca, 0x1a, 0xef, 0xe8, 0x9c, 0xfc, 0xf0, 0xa4, 0xfa, 0xc6, 0xb3, 0xe5, 0x44, 0x7f, 0x23, - 0x4d, 0xc5, 0x67, 0x73, 0x5a, 0x13, 0x8c, 0xab, 0x49, 0xd1, 0x6b, 0x70, 0x4a, 0x90, 0x4d, 0x22, - 0x08, 0xf3, 0x89, 0xe7, 0xf3, 0x84, 0xa9, 0xb4, 0xea, 0x97, 0xdc, 0xc9, 0x0c, 0x6e, 0x6a, 0xd4, - 0xf9, 0x1e, 0xc0, 0x2b, 0x99, 0xb0, 0x66, 0x22, 0x04, 0x61, 0xaa, 0xaf, 0x2a, 0x86, 0xe3, 0x46, - 0x89, 0x1c, 0xb2, 0x88, 0x3e, 0x0d, 0x9a, 0x83, 0xc5, 0x98, 0x08, 0xca, 0x4d, 0x8f, 0x8e, 0xba, - 0x76, 0xe5, 0x7c, 0x0b, 0x60, 0x25, 0x8b, 0x72, 0xcd, 0xb7, 0x9a, 0x49, 0xd0, 0xe4, 0x51, 0x44, - 0xa5, 0xa4, 0x9c, 0xa1, 0x1e, 0x84, 0x7e, 0xb6, 0x1a, 0x72, 0xbc, 0x03, 0x4c, 0xce, 0x57, 0x00, - 0x5e, 0xcd, 0x42, 0xbb, 0x9d, 0x28, 0xa9, 0x30, 0x0b, 0x28, 0xeb, 0xfc, 0x6f, 0x49, 0x74, 0xee, - 0x01, 0x38, 0x9d, 0x45, 0xb4, 0x11, 0x62, 0xd9, 0xbd, 0xd9, 0x23, 0x4c, 0xa1, 0xd7, 0xe1, 0x4b, - 0xbd, 0x3e, 0xec, 0xd9, 0x34, 0x83, 0x34, 0xcd, 0x53, 0x19, 0xbe, 0x9e, 0xc2, 0xe8, 0x63, 0x78, - 0x7e, 0x53, 0x60, 0x5f, 0x9f, 0x00, 0x3b, 0x2d, 0xde, 0x7d, 0x9e, 0x53, 0xeb, 0x66, 0xde, 0x9c, - 0xcf, 0x01, 0x9c, 0x39, 0x23, 0x38, 0x89, 0x3e, 0x85, 0x73, 0x79, 0x74, 0x52, 0x1b, 0x3c, 0x92, - 0x5a, 0x6c, 0xda, 0xde, 0xaa, 0x3d, 0x65, 0x82, 0xd7, 0xce, 0x70, 0xd9, 0x98, 0xd0, 0x21, 0x9b, - 0xdc, 0xcc, 0xf4, 0xce, 0xa0, 0x74, 0x76, 0x01, 0x1c, 0xbf, 0x45, 0xc8, 0x3a, 0xe7, 0x21, 0xfa, - 0x0c, 0x4e, 0xe6, 0x33, 0x39, 0xe6, 0x3c, 0x1c, 0x72, 0xb5, 0xf2, 0x1b, 0x40, 0xd3, 0x3b, 0xdf, - 0x9c, 0x83, 0xe5, 0xe6, 0x20, 0xb2, 0x11, 0x13, 0x16, 0x98, 0xf9, 0x86, 0x43, 0x34, 0x03, 0xc7, - 0x14, 0x55, 0x21, 0x31, 0x37, 0x85, 0x6b, 0x16, 0x68, 0x01, 0x5e, 0x08, 0x88, 0xf4, 0x05, 0x8d, - 0xf3, 0x42, 0xb9, 0x83, 0x10, 0xba, 0x06, 0x27, 0x04, 0xf1, 0x69, 0x4c, 0x09, 0x53, 0x66, 0xfc, - 0xba, 0x39, 0x80, 0x76, 0x60, 0x11, 0x47, 0xe9, 0x6c, 0x18, 0x4d, 0xb5, 0xce, 0x9f, 0xa9, 0x35, - 0x15, 0x7a, 0xcb, 0x0a, 0x5d, 0x7c, 0x06, 0xa1, 0xa9, 0xca, 0x7b, 0xc7, 0x7b, 0x4b, 0x17, 0x43, - 0xd2, 0xc1, 0xfe, 0x8e, 0xe7, 0xe7, 0xb2, 0x2d, 0xe1, 0xea, 0xe2, 0xee, 0xfd, 0x6a, 0xe1, 0xcf, - 0xfb, 0xd5, 0xc2, 0x4f, 0xfb, 0xcb, 0x65, 0xcb, 0xda, 0xe1, 0xbd, 0x01, 0x52, 0xa6, 0x74, 0xcc, - 0xc0, 0x79, 0x02, 0xe0, 0x6c, 0x8b, 0x68, 0x4f, 0xba, 0x7a, 0x0a, 0x0b, 0x45, 0x59, 0xe7, 0x7d, - 0xb6, 0x99, 0xce, 0xb8, 0x58, 0x90, 0x1e, 0xe5, 0xfa, 0xaa, 0x19, 0x6c, 0xe7, 0xc9, 0x3e, 0x6c, - 0xbb, 0xf9, 0x0e, 0x1c, 0x93, 0x0a, 0xdf, 0x25, 0xb6, 0x95, 0x5f, 0xc0, 0x3d, 0x6b, 0xfc, 0xa1, - 0x16, 0x2c, 0x76, 0x09, 0xed, 0x74, 0x4d, 0x6e, 0x47, 0x1b, 0x6f, 0xfe, 0x75, 0x50, 0x9d, 0xf2, - 0x05, 0xd1, 0x23, 0x98, 0x79, 0xc6, 0xf4, 0xdd, 0xf1, 0xde, 0xd2, 0x69, 0xcc, 0xe6, 0xc2, 0x2c, - 0x9c, 0x3f, 0x00, 0x9c, 0xb7, 0x0a, 0x29, 0x67, 0x99, 0x56, 0x7b, 0xa9, 0x7d, 0x00, 0x2f, 0xe7, - 0xe7, 0x42, 0xdf, 0x6a, 0x44, 0x4a, 0xfb, 0x60, 0x78, 0xe5, 0xf1, 0xfe, 0xf2, 0xcb, 0x36, 0xb4, - 0x7c, 0x3a, 0x9a, 0x2d, 0x1b, 0x4a, 0xe8, 0x21, 0x94, 0x9f, 0x78, 0x8b, 0x23, 0x06, 0x8b, 0xd9, - 0x33, 0x60, 0x98, 0x0d, 0x6e, 0x59, 0x56, 0x47, 0x75, 0xa5, 0x9d, 0x9f, 0x01, 0xbc, 0xfe, 0xef, - 0xfd, 0x7d, 0x87, 0xaa, 0x6e, 0x8b, 0xc4, 0x5c, 0x52, 0x35, 0xa4, 0x56, 0x9f, 0x1b, 0x68, 0x75, - 0x6d, 0xb2, 0x2b, 0x54, 0x82, 0xe3, 0x81, 0x21, 0x2e, 0x8d, 0xa5, 0x86, 0xfe, 0x72, 0xd5, 0xd9, - 0xfd, 0xcf, 0xee, 0x6c, 0xdc, 0x7e, 0x70, 0x58, 0x01, 0x0f, 0x0f, 0x2b, 0xe0, 0xd1, 0x61, 0x05, - 0xfc, 0x7e, 0x58, 0x01, 0x5f, 0x1f, 0x55, 0x0a, 0x8f, 0x8e, 0x2a, 0x85, 0x5f, 0x8f, 0x2a, 0x85, - 0x4f, 0x56, 0x9e, 0x9a, 0xb3, 0x53, 0xef, 0x8c, 0x34, 0x85, 0xed, 0x62, 0xfa, 0x56, 0x7c, 0xfb, - 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2f, 0xcc, 0x9a, 0x24, 0xde, 0x0a, 0x00, 0x00, + // 1012 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0x41, 0x6f, 0x1b, 0x45, + 0x14, 0xf6, 0x34, 0x89, 0xd3, 0x4c, 0xdb, 0x84, 0x4e, 0x9c, 0xd4, 0x71, 0x8b, 0x6d, 0x56, 0xaa, + 0x30, 0x81, 0xd8, 0xa4, 0x48, 0x08, 0xe5, 0xd6, 0xd8, 0xad, 0x40, 0x2a, 0x34, 0xda, 0x20, 0x90, + 0xe0, 0xb0, 0x1a, 0xef, 0x4e, 0xec, 0x21, 0xbb, 0x33, 0xcb, 0xcc, 0xd8, 0x49, 0x0e, 0xdc, 0x03, + 0x07, 0xe0, 0x06, 0xea, 0xa9, 0x82, 0x4b, 0xc5, 0x29, 0x87, 0xfc, 0x88, 0x8a, 0x53, 0x55, 0x10, + 0x42, 0x1c, 0x02, 0x24, 0x87, 0x20, 0x7e, 0x05, 0x9a, 0x9d, 0xf1, 0xae, 0x13, 0x42, 0x81, 0x22, + 0x8b, 0x4b, 0x94, 0x79, 0x6f, 0xf6, 0x7d, 0xdf, 0xf7, 0xe6, 0x9b, 0x37, 0x86, 0x75, 0x9f, 0xcb, + 0x88, 0xcb, 0x46, 0x40, 0xa5, 0x12, 0xb4, 0xdd, 0x53, 0x94, 0xb3, 0x46, 0x7f, 0xb9, 0x4d, 0x14, + 0x5e, 0x3e, 0x11, 0xac, 0xc7, 0x82, 0x2b, 0x8e, 0xae, 0x9a, 0xfd, 0xf5, 0x13, 0x29, 0xbb, 0xbf, + 0x54, 0xe8, 0xf0, 0x0e, 0x4f, 0xf6, 0x35, 0xf4, 0x7f, 0xe6, 0x93, 0x52, 0xd9, 0x42, 0xb4, 0xb1, + 0x24, 0x69, 0x69, 0x9f, 0x53, 0x5b, 0xb2, 0xb4, 0x60, 0xf2, 0x9e, 0xf9, 0xd0, 0xd6, 0x37, 0xa9, + 0xcb, 0x38, 0xa2, 0x8c, 0x37, 0x92, 0xbf, 0x26, 0xe4, 0xdc, 0x1b, 0x83, 0xf9, 0x35, 0x2c, 0x70, + 0x24, 0xd1, 0xfb, 0xf0, 0x92, 0xcf, 0xa3, 0xa8, 0xc7, 0xa8, 0xda, 0xf1, 0x14, 0xde, 0x2e, 0x82, + 0x2a, 0xa8, 0x4d, 0xad, 0xbe, 0xfa, 0xf0, 0xa0, 0x92, 0xfb, 0xe9, 0xa0, 0x62, 0xa9, 0xca, 0x60, + 0xb3, 0x4e, 0x79, 0x23, 0xc2, 0xaa, 0x5b, 0xbf, 0x43, 0x3a, 0xd8, 0xdf, 0x69, 0x11, 0xff, 0xf1, + 0xfe, 0x12, 0xb4, 0x48, 0x2d, 0xe2, 0x3f, 0x38, 0xde, 0x5b, 0x04, 0xee, 0xc5, 0xb4, 0xd8, 0xdb, + 0x78, 0x1b, 0x7d, 0x00, 0x0b, 0x9a, 0xb0, 0x66, 0x15, 0x73, 0x49, 0x84, 0x27, 0xc8, 0x16, 0x16, + 0x41, 0xf1, 0x5c, 0x82, 0xf1, 0xda, 0xd3, 0x61, 0x14, 0x81, 0x8b, 0x74, 0xd5, 0x35, 0x5b, 0xd4, + 0x4d, 0x6a, 0xa2, 0x10, 0xce, 0xb5, 0x39, 0xeb, 0xc9, 0x3f, 0x81, 0x8d, 0xfd, 0x47, 0xb0, 0xd9, + 0xa4, 0xec, 0x29, 0xb4, 0x1b, 0x70, 0x6e, 0x8b, 0xaa, 0x6e, 0x20, 0xf0, 0x96, 0x87, 0x83, 0x40, + 0x78, 0x84, 0xe1, 0x76, 0x48, 0x82, 0xe2, 0x78, 0x15, 0xd4, 0xce, 0xbb, 0xb3, 0x83, 0xe4, 0xcd, + 0x20, 0x10, 0xb7, 0x4c, 0x6a, 0xe5, 0xfa, 0x27, 0xc7, 0x7b, 0x8b, 0x55, 0x03, 0xb0, 0x24, 0x83, + 0xcd, 0xc6, 0xf6, 0x49, 0xc7, 0x98, 0x13, 0x71, 0x7e, 0x00, 0xb0, 0xf4, 0x0e, 0x0e, 0x69, 0x80, + 0x15, 0x17, 0xaf, 0x53, 0xa9, 0xb8, 0xa0, 0x3e, 0x0e, 0x0d, 0xb0, 0x44, 0x9f, 0x02, 0x78, 0xc5, + 0xef, 0x45, 0xbd, 0x10, 0x2b, 0xda, 0x27, 0x56, 0xa4, 0x27, 0xb0, 0xa2, 0xbc, 0x08, 0xaa, 0x63, + 0xb5, 0x0b, 0x37, 0xae, 0x59, 0x3f, 0xd6, 0x75, 0x97, 0x06, 0xbe, 0xd2, 0x8a, 0x9a, 0x9c, 0x32, + 0xd3, 0x88, 0x6f, 0x7e, 0xae, 0xbc, 0xd8, 0xa1, 0xaa, 0xdb, 0x6b, 0xd7, 0x7d, 0x1e, 0x59, 0xbf, + 0x34, 0x86, 0xa8, 0xa9, 0x9d, 0x98, 0xc8, 0xc1, 0x37, 0xd2, 0x9c, 0xed, 0x5c, 0x06, 0x6b, 0xc8, + 0xb8, 0x1a, 0x14, 0x3d, 0x0f, 0x67, 0x04, 0xd9, 0x20, 0x82, 0x30, 0x9f, 0x78, 0x3e, 0xef, 0x31, + 0x95, 0x9c, 0xef, 0x25, 0x77, 0x3a, 0x0d, 0x37, 0x75, 0xd4, 0xf9, 0x1a, 0xc0, 0x2b, 0xa9, 0xb0, + 0x66, 0x4f, 0x08, 0xc2, 0xd4, 0x40, 0x55, 0x0c, 0x27, 0x8d, 0x12, 0x39, 0x62, 0x11, 0x03, 0x18, + 0x34, 0x0f, 0xf3, 0x31, 0x11, 0x94, 0x1b, 0x37, 0x8e, 0xbb, 0x76, 0xe5, 0x7c, 0x09, 0x60, 0x39, + 0x65, 0x79, 0xd3, 0xb7, 0x9a, 0x49, 0xd0, 0xe4, 0x51, 0x44, 0xa5, 0xa4, 0x9c, 0xa1, 0x3e, 0x84, + 0x7e, 0xba, 0x1a, 0x31, 0xdf, 0x21, 0x24, 0xe7, 0x33, 0x00, 0xaf, 0xa6, 0xd4, 0xee, 0xf6, 0x94, + 0x54, 0x98, 0x05, 0x94, 0x75, 0xfe, 0xb7, 0x26, 0x6a, 0x46, 0xb3, 0x29, 0xa3, 0xf5, 0x10, 0xcb, + 0xee, 0xad, 0x3e, 0x61, 0x0a, 0xbd, 0x00, 0x9f, 0xe9, 0x0f, 0xc2, 0x9e, 0x6d, 0x33, 0x48, 0xda, + 0x3c, 0x93, 0xc6, 0xd7, 0x92, 0x30, 0x7a, 0x13, 0x9e, 0xdf, 0x10, 0xd8, 0xd7, 0x37, 0xc0, 0xce, + 0x85, 0xe5, 0x7f, 0x7d, 0x55, 0xdd, 0xb4, 0x84, 0xf3, 0x31, 0x80, 0x85, 0x33, 0x18, 0x49, 0xf4, + 0x21, 0x9c, 0xcf, 0x28, 0x49, 0x9d, 0xf0, 0x48, 0x92, 0xb1, 0xbd, 0x7a, 0xb9, 0xfe, 0x84, 0xa9, + 0x5c, 0x3f, 0xa3, 0xe4, 0xea, 0x94, 0xe6, 0x69, 0x1a, 0x52, 0xe8, 0x9f, 0x01, 0xe9, 0xec, 0x02, + 0x38, 0x79, 0x9b, 0x90, 0x35, 0xce, 0x43, 0xf4, 0x11, 0x9c, 0xce, 0xe6, 0x6c, 0xcc, 0x79, 0x38, + 0xe2, 0x23, 0xca, 0xa6, 0xba, 0x86, 0x77, 0xbe, 0x38, 0x07, 0x4b, 0xcd, 0xe1, 0xc8, 0x7a, 0x4c, + 0x58, 0x60, 0x86, 0x1a, 0x0e, 0x51, 0x01, 0x4e, 0x28, 0xaa, 0x42, 0x62, 0xa6, 0xbf, 0x6b, 0x16, + 0xa8, 0x0a, 0x2f, 0x04, 0x44, 0xfa, 0x82, 0xc6, 0xd9, 0xe9, 0xb8, 0xc3, 0x21, 0x74, 0x0d, 0x4e, + 0x09, 0xe2, 0xd3, 0x98, 0x12, 0xa6, 0xcc, 0xa0, 0x75, 0xb3, 0x00, 0xda, 0x81, 0x79, 0x1c, 0x25, + 0x03, 0x61, 0x3c, 0xd1, 0xba, 0x70, 0xa6, 0xd6, 0x44, 0xe8, 0x6d, 0x2b, 0xb4, 0xf6, 0x0f, 0x84, + 0x26, 0x2a, 0xef, 0x1d, 0xef, 0x2d, 0x5e, 0x0c, 0x13, 0x3b, 0x78, 0x7e, 0x26, 0xdb, 0x02, 0xae, + 0xd4, 0x76, 0xef, 0x57, 0x72, 0xbf, 0xdd, 0xaf, 0xe4, 0xbe, 0xdd, 0x5f, 0x2a, 0x59, 0xd4, 0x0e, + 0xef, 0x0f, 0x81, 0x32, 0xa5, 0x39, 0x03, 0xe7, 0x7b, 0x00, 0xe7, 0x5a, 0x44, 0x57, 0xd2, 0xa7, + 0xa7, 0xb0, 0x50, 0x94, 0x75, 0xde, 0x60, 0x1b, 0xc9, 0x60, 0x8b, 0x05, 0xe9, 0x53, 0xae, 0x1f, + 0x95, 0x61, 0x0f, 0x4f, 0x0f, 0xc2, 0xd6, 0xc2, 0x77, 0xe0, 0x84, 0x54, 0x78, 0x93, 0x58, 0xff, + 0x3e, 0xed, 0xdb, 0x69, 0x8a, 0xa0, 0x16, 0xcc, 0x77, 0x09, 0xed, 0x74, 0x4d, 0x43, 0xc7, 0x57, + 0x5f, 0xfa, 0xfd, 0xa0, 0x32, 0xe3, 0x0b, 0xa2, 0x87, 0x2d, 0xf3, 0x4c, 0xea, 0xab, 0xe3, 0xbd, + 0xc5, 0xd3, 0x31, 0xdb, 0x00, 0xb3, 0x70, 0x7e, 0x05, 0x70, 0xc1, 0xca, 0xa2, 0x9c, 0xa5, 0x02, + 0xed, 0xf3, 0xf5, 0x16, 0xbc, 0x9c, 0x5d, 0x06, 0xfd, 0x7e, 0x11, 0x29, 0xed, 0xcb, 0xff, 0xdc, + 0xe3, 0xfd, 0xa5, 0x67, 0x2d, 0xb5, 0x6c, 0x0e, 0x9a, 0x2d, 0xeb, 0x4a, 0xe8, 0x71, 0x93, 0xdd, + 0x6d, 0x1b, 0x47, 0x0c, 0xe6, 0xd3, 0xa7, 0x7d, 0x94, 0xae, 0xb6, 0x28, 0x2b, 0xe3, 0xfa, 0x78, + 0x9d, 0xef, 0x00, 0xbc, 0xfe, 0xd7, 0xa6, 0x7e, 0x97, 0xaa, 0x6e, 0x8b, 0xc4, 0x5c, 0x52, 0x35, + 0x22, 0x7f, 0xcf, 0x0f, 0xf9, 0x5b, 0xa7, 0xec, 0x0a, 0x15, 0xe1, 0x64, 0x60, 0x80, 0x8b, 0x13, + 0x49, 0x62, 0xb0, 0x5c, 0x71, 0x76, 0xff, 0xd6, 0x92, 0xab, 0x77, 0x1f, 0x1c, 0x96, 0xc1, 0xc3, + 0xc3, 0x32, 0x78, 0x74, 0x58, 0x06, 0xbf, 0x1c, 0x96, 0xc1, 0xe7, 0x47, 0xe5, 0xdc, 0xa3, 0xa3, + 0x72, 0xee, 0xc7, 0xa3, 0x72, 0xee, 0xbd, 0xe5, 0x27, 0xf6, 0xec, 0xd4, 0x2f, 0x8a, 0xa4, 0x85, + 0xed, 0x7c, 0xf2, 0xa3, 0xef, 0x95, 0x3f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x78, 0xae, 0xbc, 0xbc, + 0xa7, 0x0a, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { diff --git a/x/distribution/types/expected_keepers.go b/x/distribution/types/expected_keepers.go index fde51dc75169..4237bb6691c9 100644 --- a/x/distribution/types/expected_keepers.go +++ b/x/distribution/types/expected_keepers.go @@ -34,27 +34,29 @@ type BankKeeper interface { // StakingKeeper expected staking keeper (noalias) type StakingKeeper interface { + ValidatorAddressCodec() address.Codec + ConsensusAddressCodec() address.Codec // iterate through validators by operator address, execute func for each validator - IterateValidators(sdk.Context, - func(index int64, validator stakingtypes.ValidatorI) (stop bool)) + IterateValidators(context.Context, + func(index int64, validator stakingtypes.ValidatorI) (stop bool)) error - Validator(sdk.Context, sdk.ValAddress) stakingtypes.ValidatorI // get a particular validator by operator address - ValidatorByConsAddr(sdk.Context, sdk.ConsAddress) stakingtypes.ValidatorI // get a particular validator by consensus address + Validator(context.Context, sdk.ValAddress) (stakingtypes.ValidatorI, error) // get a particular validator by operator address + ValidatorByConsAddr(context.Context, sdk.ConsAddress) (stakingtypes.ValidatorI, error) // get a particular validator by consensus address // Delegation allows for getting a particular delegation for a given validator // and delegator outside the scope of the staking module. - Delegation(sdk.Context, sdk.AccAddress, sdk.ValAddress) stakingtypes.DelegationI + Delegation(context.Context, sdk.AccAddress, sdk.ValAddress) (stakingtypes.DelegationI, error) - IterateDelegations(ctx sdk.Context, delegator sdk.AccAddress, - fn func(index int64, delegation stakingtypes.DelegationI) (stop bool)) + IterateDelegations(ctx context.Context, delegator sdk.AccAddress, + fn func(index int64, delegation stakingtypes.DelegationI) (stop bool)) error - GetAllSDKDelegations(ctx sdk.Context) []stakingtypes.Delegation - GetAllValidators(ctx sdk.Context) (validators []stakingtypes.Validator) - GetAllDelegatorDelegations(ctx sdk.Context, delegator sdk.AccAddress) []stakingtypes.Delegation + GetAllSDKDelegations(ctx context.Context) ([]stakingtypes.Delegation, error) + GetAllValidators(ctx context.Context) ([]stakingtypes.Validator, error) + GetAllDelegatorDelegations(ctx context.Context, delegator sdk.AccAddress) ([]stakingtypes.Delegation, error) } // StakingHooks event hooks for staking validator object (noalias) type StakingHooks interface { - AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) // Must be called when a validator is created - AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) + AfterValidatorCreated(ctx context.Context, valAddr sdk.ValAddress) error // Must be called when a validator is created + AfterDelegationModified(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error } diff --git a/x/distribution/types/fee_pool_test.go b/x/distribution/types/fee_pool_test.go index 9c5e1a41d0c2..8d922e6389e7 100644 --- a/x/distribution/types/fee_pool_test.go +++ b/x/distribution/types/fee_pool_test.go @@ -3,9 +3,10 @@ package types_test import ( "testing" - "cosmossdk.io/math" "github.com/stretchr/testify/require" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/distribution/types" ) diff --git a/x/distribution/types/msg.go b/x/distribution/types/msg.go index f8b1f666d5e8..231e86bd34d4 100644 --- a/x/distribution/types/msg.go +++ b/x/distribution/types/msg.go @@ -21,80 +21,34 @@ func NewMsgSetWithdrawAddress(delAddr, withdrawAddr sdk.AccAddress) *MsgSetWithd } } -// Return address that must sign over msg.GetSignBytes() -func (msg MsgSetWithdrawAddress) GetSigners() []sdk.AccAddress { - delegator, _ := sdk.AccAddressFromBech32(msg.DelegatorAddress) - return []sdk.AccAddress{delegator} -} - -func NewMsgWithdrawDelegatorReward(delAddr sdk.AccAddress, valAddr sdk.ValAddress) *MsgWithdrawDelegatorReward { +func NewMsgWithdrawDelegatorReward(delAddr, valAddr string) *MsgWithdrawDelegatorReward { return &MsgWithdrawDelegatorReward{ - DelegatorAddress: delAddr.String(), - ValidatorAddress: valAddr.String(), + DelegatorAddress: delAddr, + ValidatorAddress: valAddr, } } -// Return address that must sign over msg.GetSignBytes() -func (msg MsgWithdrawDelegatorReward) GetSigners() []sdk.AccAddress { - delegator, _ := sdk.AccAddressFromBech32(msg.DelegatorAddress) - return []sdk.AccAddress{delegator} -} - -func NewMsgWithdrawValidatorCommission(valAddr sdk.ValAddress) *MsgWithdrawValidatorCommission { +func NewMsgWithdrawValidatorCommission(valAddr string) *MsgWithdrawValidatorCommission { return &MsgWithdrawValidatorCommission{ - ValidatorAddress: valAddr.String(), + ValidatorAddress: valAddr, } } -// Return address that must sign over msg.GetSignBytes() -func (msg MsgWithdrawValidatorCommission) GetSigners() []sdk.AccAddress { - valAddr, _ := sdk.ValAddressFromBech32(msg.ValidatorAddress) - return []sdk.AccAddress{sdk.AccAddress(valAddr)} -} - // NewMsgFundCommunityPool returns a new MsgFundCommunityPool with a sender and // a funding amount. -func NewMsgFundCommunityPool(amount sdk.Coins, depositor sdk.AccAddress) *MsgFundCommunityPool { +func NewMsgFundCommunityPool(amount sdk.Coins, depositor string) *MsgFundCommunityPool { return &MsgFundCommunityPool{ Amount: amount, - Depositor: depositor.String(), + Depositor: depositor, } } -// GetSigners returns the signer addresses that are expected to sign the result -// of GetSignBytes. -func (msg MsgFundCommunityPool) GetSigners() []sdk.AccAddress { - depositor, _ := sdk.AccAddressFromBech32(msg.Depositor) - return []sdk.AccAddress{depositor} -} - -// GetSigners returns the signer addresses that are expected to sign the result -// of GetSignBytes. -func (msg MsgUpdateParams) GetSigners() []sdk.AccAddress { - authority, _ := sdk.AccAddressFromBech32(msg.Authority) - return []sdk.AccAddress{authority} -} - -// GetSigners returns the signer addresses that are expected to sign the result -// of GetSignBytes, which is the authority. -func (msg MsgCommunityPoolSpend) GetSigners() []sdk.AccAddress { - authority, _ := sdk.AccAddressFromBech32(msg.Authority) - return []sdk.AccAddress{authority} -} - // NewMsgDepositValidatorRewardsPool returns a new MsgDepositValidatorRewardsPool // with a depositor and a funding amount. -func NewMsgDepositValidatorRewardsPool(depositor sdk.AccAddress, valAddr sdk.ValAddress, amount sdk.Coins) *MsgDepositValidatorRewardsPool { +func NewMsgDepositValidatorRewardsPool(depositor, valAddr string, amount sdk.Coins) *MsgDepositValidatorRewardsPool { return &MsgDepositValidatorRewardsPool{ Amount: amount, - Depositor: depositor.String(), - ValidatorAddress: valAddr.String(), + Depositor: depositor, + ValidatorAddress: valAddr, } } - -// GetSigners returns the signer addresses that are expected to sign the result -// of GetSignBytes, which is the depositor. -func (msg MsgDepositValidatorRewardsPool) GetSigners() []sdk.AccAddress { - depositor, _ := sdk.AccAddressFromBech32(msg.Depositor) - return []sdk.AccAddress{depositor} -} diff --git a/x/distribution/types/params.go b/x/distribution/types/params.go index 395be69d7ea8..f7c980284175 100644 --- a/x/distribution/types/params.go +++ b/x/distribution/types/params.go @@ -18,13 +18,7 @@ func DefaultParams() Params { // ValidateBasic performs basic validation on distribution parameters. func (p Params) ValidateBasic() error { - if p.CommunityTax.IsNegative() || p.CommunityTax.GT(math.LegacyOneDec()) { - return fmt.Errorf( - "community tax should be non-negative and less than one: %s", p.CommunityTax, - ) - } - - return nil + return validateCommunityTax(p.CommunityTax) } func validateCommunityTax(i interface{}) error { diff --git a/x/distribution/types/params_internal_test.go b/x/distribution/types/params_internal_test.go index ebc43c37b44f..92cffd78460b 100644 --- a/x/distribution/types/params_internal_test.go +++ b/x/distribution/types/params_internal_test.go @@ -3,8 +3,9 @@ package types import ( "testing" - "cosmossdk.io/math" "github.com/stretchr/testify/require" + + "cosmossdk.io/math" ) func Test_validateAuxFuncs(t *testing.T) { diff --git a/x/distribution/types/params_test.go b/x/distribution/types/params_test.go index c92e904b1842..dfd68a380ed3 100644 --- a/x/distribution/types/params_test.go +++ b/x/distribution/types/params_test.go @@ -3,15 +3,15 @@ package types_test import ( "testing" - sdkmath "cosmossdk.io/math" "github.com/stretchr/testify/require" - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/x/distribution/types" ) func TestParams_ValidateBasic(t *testing.T) { - toDec := sdk.MustNewDecFromStr + toDec := sdkmath.LegacyMustNewDecFromStr type fields struct { CommunityTax sdkmath.LegacyDec @@ -30,6 +30,7 @@ func TestParams_ValidateBasic(t *testing.T) { {"negative bonus proposer reward (must not matter)", fields{toDec("0.1"), toDec("0"), toDec("-0.1"), false}, false}, {"total sum greater than 1 (must not matter)", fields{toDec("0.2"), toDec("0.5"), toDec("0.4"), false}, false}, {"community tax greater than 1", fields{toDec("1.1"), toDec("0"), toDec("0"), false}, true}, + {"community tax nil", fields{sdkmath.LegacyDec{}, toDec("0"), toDec("0"), false}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { diff --git a/x/distribution/types/query.go b/x/distribution/types/query.go index e7efccd1e13d..973b038b7e11 100644 --- a/x/distribution/types/query.go +++ b/x/distribution/types/query.go @@ -32,6 +32,6 @@ func (res QueryDelegatorTotalRewardsResponse) String() string { } // NewDelegationDelegatorReward constructs a DelegationDelegatorReward. -func NewDelegationDelegatorReward(valAddr sdk.ValAddress, reward sdk.DecCoins) DelegationDelegatorReward { - return DelegationDelegatorReward{ValidatorAddress: valAddr.String(), Reward: reward} +func NewDelegationDelegatorReward(valAddr string, reward sdk.DecCoins) DelegationDelegatorReward { + return DelegationDelegatorReward{ValidatorAddress: valAddr, Reward: reward} } diff --git a/x/evidence/CHANGELOG.md b/x/evidence/CHANGELOG.md index 1f1cf2d4f844..ec16f3188f1a 100644 --- a/x/evidence/CHANGELOG.md +++ b/x/evidence/CHANGELOG.md @@ -23,11 +23,18 @@ Ref: https://keepachangelog.com/en/1.0.0/ # Changelog -## [Unreleased] +## [v0.1.1](https://github.com/cosmos/cosmos-sdk/releases/tag/x/evidence/v0.1.1) - 2024-04-22 + +### Improvements + +* (deps) [#19810](https://github.com/cosmos/cosmos-sdk/pull/19810) Upgrade SDK version due to prometheus breaking change. +* (deps) [#19810](https://github.com/cosmos/cosmos-sdk/pull/19810) Bump `cosmossdk.io/store` to v1.1.0. + +## [v0.1.0](https://github.com/cosmos/cosmos-sdk/releases/tag/x/evidence/v0.1.0) - 2023-11-07 ### Features -* (x/evidence) [14724](https://github.com/cosmos/cosmos-sdk/pull/14724) The `x/evidence` module is extracted to have a separate go.mod file which allows it be a standalone module. +* (x/evidence) [14724](https://github.com/cosmos/cosmos-sdk/pull/14724) The `x/evidence` module is extracted to have a separate go.mod file which allows it be a standalone module. * (keeper) [#15420](https://github.com/cosmos/cosmos-sdk/pull/15420) Move `BeginBlocker` to the keeper folder & make HandleEquivocation private ### API Breaking Changes @@ -35,4 +42,8 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#16008](https://github.com/cosmos/cosmos-sdk/pull/16008) NewKeeper now takes in a KVStoreService instead of KVStoreKey, most functions use context.Context instead of sdk.Context and `IterateEvidence` callback function now returns an error to stop interation (`errors.ErrStopIterating`). * (keeper) [#15825](https://github.com/cosmos/cosmos-sdk/pull/15825) Evidence constructor now requires an `address.Codec` (`import "cosmossdk.io/core/address"`) * [#16336](https://github.com/cosmos/cosmos-sdk/pull/16336) Use collections for state management: - * Removed: keeper `SetEvidence`, `GetEvidence`, `IterateEvidences`, `GetAllEvidences`, `MustMarshalEvidence`, `MustUnmarshalEvidence`, `MarshalEvidence`, `UnmarshalEvidence` + * Removed: keeper `SetEvidence`, `GetEvidence`, `IterateEvidences`, `GetAllEvidences`, `MustMarshalEvidence`, `MustUnmarshalEvidence`, `MarshalEvidence`, `UnmarshalEvidence` + +### Client Breaking Changes + +* [#16625](https://github.com/cosmos/cosmos-sdk/pull/16625) The `simd q evidence evidence` command supports only querying an evidence by hash. For querying all evidences, use `simd q evidence list` instead. diff --git a/x/evidence/README.md b/x/evidence/README.md index d676e3c7c257..82cd03bac2ff 100644 --- a/x/evidence/README.md +++ b/x/evidence/README.md @@ -271,7 +271,7 @@ The `evidence` command allows users to list all evidence or evidence by hash. Usage: ```bash -simd query evidence [flags] +simd query evidence evidence [flags] ``` To query evidence by hash @@ -279,7 +279,7 @@ To query evidence by hash Example: ```bash -simd query evidence "DF0C23E8634E480F84B9D5674A7CDC9816466DEC28A3358F73260F68D28D7660" +simd query evidence evidence "DF0C23E8634E480F84B9D5674A7CDC9816466DEC28A3358F73260F68D28D7660" ``` Example Output: @@ -297,7 +297,7 @@ To get all evidence Example: ```bash -simd query evidence +simd query evidence list ``` Example Output: diff --git a/x/evidence/autocli.go b/x/evidence/autocli.go new file mode 100644 index 000000000000..b8e8c51aa342 --- /dev/null +++ b/x/evidence/autocli.go @@ -0,0 +1,34 @@ +package evidence + +import ( + "fmt" + + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + evidencev1beta1 "cosmossdk.io/api/cosmos/evidence/v1beta1" + + "github.com/cosmos/cosmos-sdk/version" +) + +// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: evidencev1beta1.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Evidence", + Use: "evidence [hash]", + Short: "Query for evidence by hash", + Example: fmt.Sprintf("%s query evidence evidence DF0C23E8634E480F84B9D5674A7CDC9816466DEC28A3358F73260F68D28D7660", version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "hash"}}, + }, + { + RpcMethod: "AllEvidence", + Use: "list", + Short: "Query all (paginated) submitted evidence", + Example: fmt.Sprintf("%s query evidence list --page=2 --page-limit=50", version.AppName), + }, + }, + }, + } +} diff --git a/x/evidence/client/cli/query.go b/x/evidence/client/cli/query.go deleted file mode 100644 index 3692ee5acdca..000000000000 --- a/x/evidence/client/cli/query.go +++ /dev/null @@ -1,92 +0,0 @@ -package cli - -import ( - "context" - "fmt" - "strings" - - "cosmossdk.io/x/evidence/types" - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/types/query" - "github.com/cosmos/cosmos-sdk/version" -) - -// GetQueryCmd returns the CLI command with all evidence module query commands -// mounted. -func GetQueryCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: types.ModuleName, - Short: "Query for evidence by hash or for all (paginated) submitted evidence", - Long: strings.TrimSpace( - fmt.Sprintf(`Query for specific submitted evidence by hash or query for all (paginated) evidence: - -Example: -$ %s query %s DF0C23E8634E480F84B9D5674A7CDC9816466DEC28A3358F73260F68D28D7660 -$ %s query %s --page=2 --limit=50 -`, - version.AppName, types.ModuleName, version.AppName, types.ModuleName, - ), - ), - Args: cobra.MaximumNArgs(1), - SuggestionsMinimumDistance: 2, - RunE: QueryEvidenceCmd(), - } - - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "evidence") - - return cmd -} - -// QueryEvidenceCmd returns the command handler for evidence querying. Evidence -// can be queried for by hash or paginated evidence can be returned. -func QueryEvidenceCmd() func(*cobra.Command, []string) error { - return func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - if len(args) > 0 { - return queryEvidence(clientCtx, args[0]) - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - return queryAllEvidence(clientCtx, pageReq) - } -} - -// queryEvidence queries for a single evidence by the given hash. -func queryEvidence(clientCtx client.Context, hash string) error { - queryClient := types.NewQueryClient(clientCtx) - - params := &types.QueryEvidenceRequest{Hash: hash} - res, err := queryClient.Evidence(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res.Evidence) -} - -// queryAllEvidence returns all evidences. -func queryAllEvidence(clientCtx client.Context, pageReq *query.PageRequest) error { - queryClient := types.NewQueryClient(clientCtx) - - params := &types.QueryAllEvidenceRequest{ - Pagination: pageReq, - } - - res, err := queryClient.AllEvidence(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) -} diff --git a/x/evidence/client/cli/query_test.go b/x/evidence/client/cli/query_test.go deleted file mode 100644 index 5567d0427e5b..000000000000 --- a/x/evidence/client/cli/query_test.go +++ /dev/null @@ -1,81 +0,0 @@ -package cli_test - -import ( - "context" - "fmt" - "io" - "strings" - "testing" - - "cosmossdk.io/x/evidence" - "cosmossdk.io/x/evidence/client/cli" - rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" - "github.com/stretchr/testify/require" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - testutilmod "github.com/cosmos/cosmos-sdk/types/module/testutil" -) - -func TestGetQueryCmd(t *testing.T) { - encCfg := testutilmod.MakeTestEncodingConfig(evidence.AppModuleBasic{}) - kr := keyring.NewInMemory(encCfg.Codec) - baseCtx := client.Context{}. - WithKeyring(kr). - WithTxConfig(encCfg.TxConfig). - WithCodec(encCfg.Codec). - WithClient(clitestutil.MockCometRPC{Client: rpcclientmock.Client{}}). - WithAccountRetriever(client.MockAccountRetriever{}). - WithOutput(io.Discard). - WithChainID("test-chain") - - testCases := map[string]struct { - args []string - expectedOutput string - expectErrMsg string - }{ - "invalid args": { - []string{"foo", "bar"}, - "", - "accepts at most 1 arg(s)", - }, - "all evidence (default pagination)": { - []string{}, - "evidence: []\npagination: null", - "", - }, - "all evidence (json output)": { - []string{ - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - `{"evidence":[],"pagination":null}`, - "", - }, - } - - for name, tc := range testCases { - tc := tc - - t.Run(name, func(t *testing.T) { - ctx := svrcmd.CreateExecuteContext(context.Background()) - - cmd := cli.GetQueryCmd() - cmd.SetContext(ctx) - cmd.SetArgs(tc.args) - require.NoError(t, client.SetCmdClientContextHandler(baseCtx, cmd)) - - out, err := clitestutil.ExecTestCLICmd(baseCtx, cmd, tc.args) - if tc.expectErrMsg != "" { - require.Error(t, err) - require.Contains(t, err.Error(), tc.expectErrMsg) - } else { - require.NoError(t, err) - } - - require.Contains(t, strings.TrimSpace(out.String()), tc.expectedOutput) - }) - } -} diff --git a/x/evidence/client/cli/tx.go b/x/evidence/client/cli/tx.go index ac57b71cc675..d7b5b82717be 100644 --- a/x/evidence/client/cli/tx.go +++ b/x/evidence/client/cli/tx.go @@ -1,9 +1,10 @@ package cli import ( - "cosmossdk.io/x/evidence/types" "github.com/spf13/cobra" + "cosmossdk.io/x/evidence/types" + "github.com/cosmos/cosmos-sdk/client" ) diff --git a/x/evidence/genesis.go b/x/evidence/genesis.go index 63ec6f5273fd..1c7569415547 100644 --- a/x/evidence/genesis.go +++ b/x/evidence/genesis.go @@ -1,13 +1,12 @@ package evidence import ( - "errors" "fmt" - "cosmossdk.io/collections" "cosmossdk.io/x/evidence/exported" "cosmossdk.io/x/evidence/keeper" "cosmossdk.io/x/evidence/types" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -45,7 +44,7 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { gs.Evidence = append(gs.Evidence, anyEvi) return false, nil }) - if err != nil && !errors.Is(err, collections.ErrInvalidIterator) { + if err != nil { panic(err) } return gs diff --git a/x/evidence/genesis_test.go b/x/evidence/genesis_test.go index aa1482f94477..600f61cad7d1 100644 --- a/x/evidence/genesis_test.go +++ b/x/evidence/genesis_test.go @@ -5,7 +5,10 @@ import ( "testing" "time" - "cosmossdk.io/collections" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" + "cosmossdk.io/depinject" "cosmossdk.io/log" "cosmossdk.io/x/evidence" @@ -13,9 +16,6 @@ import ( "cosmossdk.io/x/evidence/keeper" "cosmossdk.io/x/evidence/testutil" "cosmossdk.io/x/evidence/types" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" - "github.com/stretchr/testify/require" - "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" @@ -95,7 +95,7 @@ func (suite *GenesisTestSuite) TestInitGenesis() { false, func() { _, err := suite.keeper.Evidences.Iterate(suite.ctx, nil) - suite.Require().ErrorIs(err, collections.ErrInvalidIterator) + suite.Require().NoError(err) }, }, } diff --git a/x/evidence/go.mod b/x/evidence/go.mod index cfd7cc4ed6bb..8971398f6408 100644 --- a/x/evidence/go.mod +++ b/x/evidence/go.mod @@ -1,160 +1,158 @@ module cosmossdk.io/x/evidence -go 1.20 +go 1.21 require ( - cosmossdk.io/api v0.4.2 - cosmossdk.io/collections v0.2.0 - cosmossdk.io/core v0.8.0 - cosmossdk.io/depinject v1.0.0-alpha.3 - cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741 - cosmossdk.io/log v1.1.0 - cosmossdk.io/math v1.0.1 - cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c - github.com/cometbft/cometbft v0.38.0-rc1 - github.com/cosmos/cosmos-proto v1.0.0-beta.3 - github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20230607182757-cfeb10287d61 - github.com/cosmos/gogoproto v1.4.10 + cosmossdk.io/api v0.7.5 + cosmossdk.io/collections v0.4.0 + cosmossdk.io/core v0.11.0 + cosmossdk.io/depinject v1.0.0-alpha.4 + cosmossdk.io/errors v1.0.1 + cosmossdk.io/log v1.4.1 + cosmossdk.io/math v1.3.0 + cosmossdk.io/store v1.1.0 + github.com/cometbft/cometbft v0.38.12 + github.com/cosmos/cosmos-proto v1.0.0-beta.5 + github.com/cosmos/cosmos-sdk v0.50.6 + github.com/cosmos/gogoproto v1.7.0 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/spf13/cobra v1.7.0 - github.com/stretchr/testify v1.8.4 - google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a - google.golang.org/grpc v1.55.0 - google.golang.org/protobuf v1.30.0 + github.com/spf13/cobra v1.8.1 + github.com/stretchr/testify v1.9.0 + google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 + google.golang.org/grpc v1.63.2 + google.golang.org/protobuf v1.34.2 ) require ( - cosmossdk.io/x/tx v0.8.0 // indirect + cosmossdk.io/x/tx v0.13.4 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect + github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect - github.com/armon/go-metrics v0.4.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect - github.com/bits-and-blooms/bitset v1.7.0 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/bits-and-blooms/bitset v1.8.0 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/cockroachdb/errors v1.9.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect + github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f // indirect - github.com/cockroachdb/redact v1.1.4 // indirect - github.com/cometbft/cometbft-db v0.7.0 // indirect + github.com/cockroachdb/pebble v1.1.1 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/cometbft/cometbft-db v0.11.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-db v1.0.0 // indirect + github.com/cosmos/cosmos-db v1.0.2 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v1.0.0-beta.2 // indirect - github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.13.0 // indirect + github.com/cosmos/iavl v1.1.2 // indirect + github.com/cosmos/ics23/go v0.11.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/danieljoos/wincred v1.1.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect - github.com/emicklei/dot v1.4.2 // indirect + github.com/dvsekhvalnov/jose2go v1.6.0 // indirect + github.com/emicklei/dot v1.6.1 // indirect github.com/fatih/color v1.15.0 // indirect - github.com/felixge/httpsnoop v1.0.2 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/getsentry/sentry-go v0.21.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.1.0 // indirect + github.com/golang/glog v1.2.0 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/mux v1.8.0 // indirect - github.com/gorilla/websocket v1.5.0 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-plugin v1.4.10 // indirect - github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect + github.com/hashicorp/go-metrics v0.5.3 // indirect + github.com/hashicorp/go-plugin v1.5.2 // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/huandu/skiplist v1.2.0 // indirect - github.com/iancoleman/strcase v0.2.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.16.5 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect - github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.0 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect - github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 // indirect + github.com/pelletier/go-toml/v2 v2.2.2 // indirect + github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.15.1 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.20.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect - github.com/rs/cors v1.8.3 // indirect - github.com/rs/zerolog v1.29.1 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rs/cors v1.11.1 // indirect + github.com/rs/zerolog v1.33.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/cast v1.5.1 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.16.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/spf13/viper v1.19.0 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tidwall/btree v1.6.0 // indirect - github.com/zondax/hid v0.9.1 // indirect - github.com/zondax/ledger-go v0.14.1 // indirect - go.etcd.io/bbolt v1.3.6 // indirect - golang.org/x/crypto v0.9.0 // indirect - golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect - google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect + github.com/tidwall/btree v1.7.0 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect + go.etcd.io/bbolt v1.3.10 // indirect + go.uber.org/multierr v1.10.0 // indirect + golang.org/x/crypto v0.26.0 // indirect + golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - gotest.tools/v3 v3.4.0 // indirect + gotest.tools/v3 v3.5.1 // indirect nhooyr.io/websocket v1.8.6 // indirect - pgregory.net/rapid v0.6.2 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + pgregory.net/rapid v1.1.0 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) - -// Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities. -// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 -replace github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.0 - -replace github.com/cosmos/cosmos-sdk => ../../ diff --git a/x/evidence/go.sum b/x/evidence/go.sum index 27a9ce7723e9..8bb436469235 100644 --- a/x/evidence/go.sum +++ b/x/evidence/go.sum @@ -1,58 +1,23 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.4.2 h1:lQBMl4xINnMnBOR/tQLtjlDnR4exr4e6/SfHR8PILE0= -cosmossdk.io/api v0.4.2/go.mod h1:qrVgOp7DIeAXa+Tt5dDjOC47bZCDrwx8ZHxrmy7STNE= -cosmossdk.io/collections v0.2.0 h1:CgMfLtE16+qox3zBYrGh60i4yKV8SeExLnIdOS2sbQs= -cosmossdk.io/collections v0.2.0/go.mod h1:Oc1FK0vlmxJZsgUn9/o3ldE6zNyWKvobVzaLhWknZJE= -cosmossdk.io/core v0.8.0 h1:LcJnu52E1a8f8E317VfQ1xK/RZe+IuhMNQAjnDLh25M= -cosmossdk.io/core v0.8.0/go.mod h1:LF6VLOv2DdCiaHxYVmr0MZcZpaSM9ZgvyrQSYTeg6D0= -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.0.20230524212735-6cabb6aa5741 h1:BCRz06fvddw7cKGiEGDiSox3qMsjQ97f92K+PDZDHdc= -cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741/go.mod h1:TB05o6YXkZkzsc+6bZFAV5kZRBtoCU9tUkbeMIqEg0w= -cosmossdk.io/log v1.1.0 h1:v0ogPHYeTzPcBTcPR1A3j1hkei4pZama8kz8LKlCMv0= -cosmossdk.io/log v1.1.0/go.mod h1:6zjroETlcDs+mm62gd8Ig7mZ+N+fVOZS91V17H+M4N4= -cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c h1:A+FMPW9GtfcPBDQNtFeDFN27h1SAP6OVjnGgPLlYXmI= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c/go.mod h1:RbYGvXCbz8uNBCXrwS9Z8SyydeWi+W5x5MZ33muyzMw= -cosmossdk.io/x/tx v0.8.0 h1:gLiGRL/Fy7fs6dd0IX8jOf0PrVr56/SG6XVMGQjyvJU= -cosmossdk.io/x/tx v0.8.0/go.mod h1:T9uEumGNgKU61gJYRv1t3uzQwLnASpJGmSE229HM3xA= +cosmossdk.io/api v0.7.5 h1:eMPTReoNmGUm8DeiQL9DyM8sYDjEhWzL1+nLbI9DqtQ= +cosmossdk.io/api v0.7.5/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= +cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= +cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= +cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= +cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= +cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= +cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= +cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= +cosmossdk.io/store v1.1.0 h1:LnKwgYMc9BInn9PhpTFEQVbL9UK475G2H911CGGnWHk= +cosmossdk.io/store v1.1.0/go.mod h1:oZfW/4Fc/zYqu3JmQcQdUJ3fqu5vnYTn3LZFFy8P8ng= +cosmossdk.io/x/tx v0.13.4 h1:Eg0PbJgeO0gM8p5wx6xa0fKR7hIV6+8lC56UrsvSo0Y= +cosmossdk.io/x/tx v0.13.4/go.mod h1:BkFqrnGGgW50Y6cwTy+JvgAhiffbGEKW6KF9ufcDpvk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= @@ -60,30 +25,28 @@ github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMb github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= +github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -95,14 +58,11 @@ github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -111,16 +71,16 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.7.0 h1:YjAGVd3XmtK9ktAbX8Zg2g2PwLIMjGREZJHlV4j7NEo= -github.com/bits-and-blooms/bitset v1.7.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= -github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= -github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= -github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= +github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= +github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ= +github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c= +github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= -github.com/bufbuild/protocompile v0.5.1 h1:mixz5lJX4Hiz4FpqFREJHIXLfaLBntfaJv1h+/jS+Qg= -github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= -github.com/bytedance/sonic v1.8.0 h1:ea0Xadu+sHlu7x5O3gKhRpQ1IKiMrSiHttPF0ybECuA= -github.com/bytedance/sonic v1.8.0/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= +github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -131,21 +91,18 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA 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.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= +github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= @@ -153,27 +110,29 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= +github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f h1:qQW3qCVRpjYsV4YNaUOjm6YLeliAD2jpgex9+D9tqU4= -github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f/go.mod h1:TkdVsGYRqtULUppt2RbC+YaKtTHnHoWa2apfFrSKABw= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/redact v1.1.4 h1:Y0XrVI2FAyofNyGveodTN//qdpPtFKcKTeCBsK3AHAQ= -github.com/cockroachdb/redact v1.1.4/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= +github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/cometbft/cometbft v0.38.0-rc1 h1:ph6smlqX82aH+d72KuxDHqu29M7LyusSp/obfGsGX/w= -github.com/cometbft/cometbft v0.38.0-rc1/go.mod h1:5Jz0Z8YsHSf0ZaAqGvi/ifioSdVFPtEGrm8Y9T/993k= -github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= -github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= +github.com/cometbft/cometbft v0.38.12 h1:OWsLZN2KcSSFe8bet9xCn07VwhBnavPea3VyPnNq1bg= +github.com/cometbft/cometbft v0.38.12/go.mod h1:GPHp3/pehPqgX1930HmK1BpBLZPxB75v/dZg8Viwy+o= +github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= +github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/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= @@ -182,41 +141,42 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= -github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= -github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= -github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= +github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= +github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/cosmos-sdk v0.50.6 h1:efR3MsvMHX5sxS3be+hOobGk87IzlZbSpsI2x/Vw3hk= +github.com/cosmos/cosmos-sdk v0.50.6/go.mod h1:lVkRY6cdMJ0fG3gp8y4hFrsKZqF4z7y0M2UXFb9Yt40= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cosmos/iavl v1.0.0-beta.2 h1:XOsIM80Yyml/KifCXEYOy9tWCXwMAbLa91n6pReW07Y= -github.com/cosmos/iavl v1.0.0-beta.2/go.mod h1:EA97dJ07TBktRlG/iGzK6g1eCXNj1q3MGoFYkVzrwHE= -github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= -github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= -github.com/cosmos/ledger-cosmos-go v0.13.0 h1:ex0CvCxToSR7j5WjrghPu2Bu9sSXKikjnVvUryNnx4s= -github.com/cosmos/ledger-cosmos-go v0.13.0/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= +github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= +github.com/cosmos/iavl v1.1.2 h1:zL9FK7C4L/P4IF1Dm5fIwz0WXCnn7Bp1M2FxH0ayM7Y= +github.com/cosmos/iavl v1.1.2/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= +github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= +github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew 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/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= 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= @@ -227,66 +187,57 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUn 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/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= -github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= +github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/emicklei/dot v1.4.2 h1:UbK6gX4yvrpHKlxuUQicwoAis4zl8Dzwit9SnbBAXWw= -github.com/emicklei/dot v1.4.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= +github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -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/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= -github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= 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/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.21.0 h1:c9l5F1nPF30JIppulk4veau90PK6Smu3abgVtVQWon4= -github.com/getsentry/sentry-go v0.21.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.9.0 h1:OjyFBKICoexlu99ctXNR2gg+c5pKrKMuyjgARg9qeY8= -github.com/gin-gonic/gin v1.9.0/go.mod h1:W1Me9+hsUSyj3CePGrd1/QrKJMSJ1Tu/0hFEH89961k= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -301,14 +252,16 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= -github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= -github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= -github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= -github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU= -github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= +github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= +github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= 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= @@ -318,13 +271,11 @@ github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/goccy/go-json v0.10.0 h1:mXKd9Qw4NuzShiRlOXKews24ufknHO7gx30lsDyokKA= -github.com/goccy/go-json v0.10.0/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -335,22 +286,12 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV 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/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -358,7 +299,6 @@ github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= 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= @@ -370,13 +310,12 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 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/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -385,41 +324,22 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a 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.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= @@ -430,8 +350,8 @@ github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= @@ -452,10 +372,12 @@ github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVH github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= +github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v1.4.10 h1:xUbmA4jC6Dq163/fWcp8P3JuHilrHHMLNRxzGQJ9hNk= -github.com/hashicorp/go-plugin v1.4.10/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -467,8 +389,10 @@ github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -485,24 +409,17 @@ github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0Jr github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= -github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= @@ -515,87 +432,60 @@ github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= 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.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= -github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid v1.2.1 h1:vJi+O/nMdFt0vqm8NZBI6wzALWdA2X+egi0ogNyrC/w= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= -github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.0 h1:H4L/LhP7GOMf1j17oQAElHgVlbEje2h14A8Tz9cM2BE= -github.com/linxGnu/grocksdb v1.8.0/go.mod h1:09CeBborffXhXdNpEcOeZrLKEnRtrZFEpFdPNI9Zjjg= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= +github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= @@ -618,9 +508,10 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -636,8 +527,8 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA 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/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce h1:/pEpMk55wH0X+E5zedGEMOdLuWmV8P4+4W3+LZaM6kg= -github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= @@ -645,7 +536,6 @@ github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DV 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.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= @@ -657,10 +547,14 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -670,19 +564,19 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 h1:W04oB3d0J01W5jgYRGKsV8LCM6g9EkCvPkZcmFuy0OE= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= @@ -693,9 +587,9 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -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/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -703,103 +597,102 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/prometheus/client_golang v1.20.1 h1:IMJXHOD6eARkQpxo8KkhgEVFlBNm+nkrFUyGlIu7Na8= +github.com/prometheus/client_golang v1.20.1/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= -github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= 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/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= 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.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= 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= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= +github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/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/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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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= @@ -809,69 +702,43 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= -github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= -github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.9 h1:rmenucSohSTiyL09Y+l2OCk+FrMxGMzho2+tjr5ticU= -github.com/ugorji/go/codec v1.2.9/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= -github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= -github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/bbolt v1.3.10 h1:+BqfJTcCzTItrop8mq/lbzL8wSGtj94UO/3U31shqG0= +go.etcd.io/bbolt v1.3.10/go.mod h1:bK3UQLPJZly7IlNmV7uVHJDxfe5aK9Ll93e/74Y9oEQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -881,70 +748,44 @@ go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -golang.org/x/arch v0.0.0-20210923205945-b76863e36670 h1:18EFjUmQOcUvxNYSkA6jO9VAiXCnxFY6NyDX0bHDmkU= -golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= 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= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 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/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -956,73 +797,37 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/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-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/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-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1034,17 +839,12 @@ golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1053,263 +853,120 @@ golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/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-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-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 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.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -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= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= 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= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 h1:x1vNwUhVOcsYoKyEGCZBH694SBmmBjA2EfauFVEI2+M= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a h1:HiYVD+FGJkTo+9zj1gqz0anapsa1JxjiSrN+BJKyUmE= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 h1:rIo7ocm2roD9DcFIX67Ym8icoGCKSARAiPljFhh5suQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2/go.mod h1:O1cOfN1Cy6QEYr7VxtjOyP5AdAuR0aJ/MYZaaof623Y= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= @@ -1324,8 +981,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1337,10 +994,8 @@ gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= @@ -1355,30 +1010,21 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -pgregory.net/rapid v0.6.2 h1:ErW5sL+UKtfBfUTsWHDCoeB+eZKLKMxrSd1VJY6W4bw= -pgregory.net/rapid v0.6.2/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/x/evidence/keeper/abci.go b/x/evidence/keeper/abci.go index 2ed8d447d141..d441ee174dd1 100644 --- a/x/evidence/keeper/abci.go +++ b/x/evidence/keeper/abci.go @@ -3,7 +3,6 @@ package keeper import ( "context" "fmt" - "time" "cosmossdk.io/core/comet" "cosmossdk.io/x/evidence/types" @@ -15,7 +14,7 @@ import ( // BeginBlocker iterates through and handles any newly discovered evidence of // misbehavior submitted by CometBFT. Currently, only equivocation is handled. func (k Keeper) BeginBlocker(ctx context.Context) error { - defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) + defer telemetry.ModuleMeasureSince(types.ModuleName, telemetry.Now(), telemetry.MetricKeyBeginBlocker) bi := k.cometInfo.GetCometBlockInfo(ctx) if bi == nil { @@ -31,7 +30,7 @@ func (k Keeper) BeginBlocker(ctx context.Context) error { // It's still ongoing discussion how should we treat and slash attacks with // premeditation. So for now we agree to treat them in the same way. case comet.LightClientAttack, comet.DuplicateVote: - evidence := types.FromABCIEvidence(evidences.Get(i)) + evidence := types.FromABCIEvidence(evidences.Get(i), k.stakingKeeper.ConsensusAddressCodec()) err := k.handleEquivocationEvidence(ctx, evidence) if err != nil { return err diff --git a/x/evidence/keeper/grpc_query.go b/x/evidence/keeper/grpc_query.go index 728742d4c073..22d2be5c2458 100644 --- a/x/evidence/keeper/grpc_query.go +++ b/x/evidence/keeper/grpc_query.go @@ -5,12 +5,13 @@ import ( "encoding/hex" "fmt" - "cosmossdk.io/x/evidence/exported" - "cosmossdk.io/x/evidence/types" proto "github.com/cosmos/gogoproto/proto" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "cosmossdk.io/x/evidence/exported" + "cosmossdk.io/x/evidence/types" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" @@ -67,18 +68,12 @@ func (k Querier) AllEvidence(ctx context.Context, req *types.QueryAllEvidenceReq return nil, status.Errorf(codes.InvalidArgument, "empty request") } - var evidence []*codectypes.Any - _, pageRes, err := query.CollectionFilteredPaginate(ctx, k.k.Evidences, req.Pagination, func(_ []byte, value exported.Evidence) (include bool, err error) { - evidenceAny, err := codectypes.NewAnyWithValue(value) - if err != nil { - return false, err - } - evidence = append(evidence, evidenceAny) - return false, nil // we don't include results because we're appending them + evidences, pageRes, err := query.CollectionPaginate(ctx, k.k.Evidences, req.Pagination, func(_ []byte, value exported.Evidence) (*codectypes.Any, error) { + return codectypes.NewAnyWithValue(value) }) if err != nil { return nil, err } - return &types.QueryAllEvidenceResponse{Evidence: evidence, Pagination: pageRes}, nil + return &types.QueryAllEvidenceResponse{Evidence: evidences, Pagination: pageRes}, nil } diff --git a/x/evidence/keeper/infraction.go b/x/evidence/keeper/infraction.go index 04f18db3eac7..27858ac514f9 100644 --- a/x/evidence/keeper/infraction.go +++ b/x/evidence/keeper/infraction.go @@ -26,17 +26,20 @@ import ( // in the case of a lunatic attack. func (k Keeper) handleEquivocationEvidence(ctx context.Context, evidence *types.Equivocation) error { sdkCtx := sdk.UnwrapSDKContext(ctx) - logger := k.Logger(sdkCtx) - consAddr := evidence.GetConsensusAddress() + logger := k.Logger(ctx) + consAddr := evidence.GetConsensusAddress(k.stakingKeeper.ConsensusAddressCodec()) - validator := k.stakingKeeper.ValidatorByConsAddr(sdkCtx, consAddr) + validator, err := k.stakingKeeper.ValidatorByConsAddr(ctx, consAddr) + if err != nil { + return err + } if validator == nil || validator.IsUnbonded() { // Defensive: Simulation doesn't take unbonding periods into account, and // CometBFT might break this assumption at some point. return nil } - if !validator.GetOperator().Empty() { + if len(validator.GetOperator()) != 0 { if _, err := k.slashingKeeper.GetPubkey(ctx, consAddr.Bytes()); err != nil { // Ignore evidence that cannot be handled. // diff --git a/x/evidence/keeper/keeper.go b/x/evidence/keeper/keeper.go index ad7f3d70e1b3..399ca5db0d2e 100644 --- a/x/evidence/keeper/keeper.go +++ b/x/evidence/keeper/keeper.go @@ -8,13 +8,13 @@ import ( "cosmossdk.io/collections" "cosmossdk.io/core/address" + "cosmossdk.io/core/comet" "cosmossdk.io/core/store" + "cosmossdk.io/errors" "cosmossdk.io/log" "cosmossdk.io/x/evidence/exported" "cosmossdk.io/x/evidence/types" - "cosmossdk.io/core/comet" - "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/evidence/keeper/keeper_test.go b/x/evidence/keeper/keeper_test.go index e72b311561b2..4b347b547147 100644 --- a/x/evidence/keeper/keeper_test.go +++ b/x/evidence/keeper/keeper_test.go @@ -6,17 +6,17 @@ import ( "fmt" "time" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/suite" + "cosmossdk.io/collections" + storetypes "cosmossdk.io/store/types" "cosmossdk.io/x/evidence" "cosmossdk.io/x/evidence/exported" "cosmossdk.io/x/evidence/keeper" evidencetestutil "cosmossdk.io/x/evidence/testutil" "cosmossdk.io/x/evidence/types" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/suite" - - storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec/address" @@ -35,11 +35,7 @@ var ( newPubKey("0B485CFC0EECC619440448436F8FC9DF40566F2369E72400281454CB552AFB52"), } - valAddresses = []sdk.ValAddress{ - sdk.ValAddress(pubkeys[0].Address()), - sdk.ValAddress(pubkeys[1].Address()), - sdk.ValAddress(pubkeys[2].Address()), - } + valAddress = sdk.ValAddress(pubkeys[0].Address()) ) func newPubKey(pk string) (res cryptotypes.PubKey) { diff --git a/x/evidence/keeper/msg_server.go b/x/evidence/keeper/msg_server.go index 9862bbf6b953..fad39ef33188 100644 --- a/x/evidence/keeper/msg_server.go +++ b/x/evidence/keeper/msg_server.go @@ -4,10 +4,10 @@ import ( "context" "cosmossdk.io/errors" + "cosmossdk.io/x/evidence/types" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - "cosmossdk.io/x/evidence/types" ) type msgServer struct { diff --git a/x/evidence/keeper/msg_server_test.go b/x/evidence/keeper/msg_server_test.go index cebc8c1a3817..f5dd4b6b5fd2 100644 --- a/x/evidence/keeper/msg_server_test.go +++ b/x/evidence/keeper/msg_server_test.go @@ -19,7 +19,7 @@ func (s *KeeperTestSuite) TestSubmitEvidence() { ConsensusAddress: sdk.ConsAddress(pk.PubKey().Address().Bytes()).String(), } - validEvidence, err := types.NewMsgSubmitEvidence(sdk.AccAddress(valAddresses[0]), e) + validEvidence, err := types.NewMsgSubmitEvidence(sdk.AccAddress(valAddress), e) s.Require().NoError(err) e2 := &types.Equivocation{ @@ -29,7 +29,7 @@ func (s *KeeperTestSuite) TestSubmitEvidence() { ConsensusAddress: sdk.ConsAddress(pk.PubKey().Address().Bytes()).String(), } - invalidEvidence, err := types.NewMsgSubmitEvidence(sdk.AccAddress(valAddresses[0]), e2) + invalidEvidence, err := types.NewMsgSubmitEvidence(sdk.AccAddress(valAddress), e2) s.Require().NoError(err) testCases := []struct { @@ -47,7 +47,7 @@ func (s *KeeperTestSuite) TestSubmitEvidence() { { name: "missing evidence", req: &types.MsgSubmitEvidence{ - Submitter: sdk.AccAddress(valAddresses[0]).String(), + Submitter: sdk.AccAddress(valAddress).String(), }, expErr: true, expErrMsg: "missing evidence: invalid evidence", diff --git a/x/evidence/module.go b/x/evidence/module.go index 5dbee9d7c1ec..d9bb011ba57c 100644 --- a/x/evidence/module.go +++ b/x/evidence/module.go @@ -5,7 +5,6 @@ import ( "encoding/json" "fmt" - abci "github.com/cometbft/cometbft/abci/types" gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" "google.golang.org/grpc" @@ -14,9 +13,8 @@ import ( "cosmossdk.io/core/address" "cosmossdk.io/core/appmodule" "cosmossdk.io/core/comet" - "cosmossdk.io/depinject" - store "cosmossdk.io/core/store" + "cosmossdk.io/depinject" eviclient "cosmossdk.io/x/evidence/client" "cosmossdk.io/x/evidence/client/cli" "cosmossdk.io/x/evidence/keeper" @@ -32,8 +30,13 @@ import ( ) var ( - _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModuleBasic = AppModule{} _ module.AppModuleSimulation = AppModule{} + _ module.HasGenesis = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasServices = AppModule{} + _ appmodule.HasBeginBlocker = AppModule{} ) // ---------------------------------------------------------------------------- @@ -95,11 +98,6 @@ func (a AppModuleBasic) GetTxCmd() *cobra.Command { return cli.GetTxCmd(evidenceCLIHandlers) } -// GetQueryCmd returns the evidence module's root query command. -func (AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.GetQueryCmd() -} - // RegisterInterfaces registers the evidence module's interface types func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { types.RegisterInterfaces(registry) @@ -124,23 +122,12 @@ func NewAppModule(keeper keeper.Keeper) AppModule { } } -var ( - _ appmodule.AppModule = AppModule{} - _ appmodule.HasServices = AppModule{} - _ appmodule.HasBeginBlocker = AppModule{} -) - // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} // IsAppModule implements the appmodule.AppModule interface. func (am AppModule) IsAppModule() {} -// Name returns the evidence module's name. -func (am AppModule) Name() string { - return am.AppModuleBasic.Name() -} - // RegisterServices registers module services. func (am AppModule) RegisterServices(registrar grpc.ServiceRegistrar) error { types.RegisterMsgServer(registrar, keeper.NewMsgServerImpl(am.keeper)) @@ -150,7 +137,7 @@ func (am AppModule) RegisterServices(registrar grpc.ServiceRegistrar) error { // InitGenesis performs the evidence module's genesis initialization It returns // no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, bz json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, bz json.RawMessage) { var gs types.GenesisState err := cdc.UnmarshalJSON(bz, &gs) if err != nil { @@ -158,7 +145,6 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, bz json.Ra } InitGenesis(ctx, am.keeper, &gs) - return []abci.ValidatorUpdate{} } // ExportGenesis returns the evidence module's exported genesis state as raw JSON bytes. diff --git a/x/evidence/simulation/genesis_test.go b/x/evidence/simulation/genesis_test.go index 1cee3d3f10c0..5d7851ea002d 100644 --- a/x/evidence/simulation/genesis_test.go +++ b/x/evidence/simulation/genesis_test.go @@ -5,10 +5,11 @@ import ( "math/rand" "testing" - sdkmath "cosmossdk.io/math" + "github.com/stretchr/testify/require" + + "cosmossdk.io/math" "cosmossdk.io/x/evidence/simulation" "cosmossdk.io/x/evidence/types" - "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -31,7 +32,7 @@ func TestRandomizedGenState(t *testing.T) { Rand: r, NumBonded: 3, Accounts: simtypes.RandomAccounts(r, 3), - InitialStake: sdkmath.NewInt(1000), + InitialStake: math.NewInt(1000), GenState: make(map[string]json.RawMessage), } diff --git a/x/evidence/testutil/app_config.go b/x/evidence/testutil/app_config.go index fe091de044f4..30a0645b79f6 100644 --- a/x/evidence/testutil/app_config.go +++ b/x/evidence/testutil/app_config.go @@ -1,9 +1,9 @@ package testutil import ( - "github.com/cosmos/cosmos-sdk/testutil/configurator" + _ "cosmossdk.io/x/evidence" // import as blank for app wiring - _ "cosmossdk.io/x/evidence" // import as blank for app wiring + "github.com/cosmos/cosmos-sdk/testutil/configurator" _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/bank" // import as blank for app wiring diff --git a/x/evidence/testutil/expected_keepers_mocks.go b/x/evidence/testutil/expected_keepers_mocks.go index cbfc0dd44a71..1bb34b5d19e1 100644 --- a/x/evidence/testutil/expected_keepers_mocks.go +++ b/x/evidence/testutil/expected_keepers_mocks.go @@ -9,6 +9,7 @@ import ( reflect "reflect" time "time" + address "cosmossdk.io/core/address" comet "cosmossdk.io/core/comet" math "cosmossdk.io/math" types "github.com/cosmos/cosmos-sdk/crypto/types" @@ -40,12 +41,27 @@ func (m *MockStakingKeeper) EXPECT() *MockStakingKeeperMockRecorder { return m.recorder } +// ConsensusAddressCodec mocks base method. +func (m *MockStakingKeeper) ConsensusAddressCodec() address.Codec { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ConsensusAddressCodec") + ret0, _ := ret[0].(address.Codec) + return ret0 +} + +// ConsensusAddressCodec indicates an expected call of ConsensusAddressCodec. +func (mr *MockStakingKeeperMockRecorder) ConsensusAddressCodec() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConsensusAddressCodec", reflect.TypeOf((*MockStakingKeeper)(nil).ConsensusAddressCodec)) +} + // GetParams mocks base method. -func (m *MockStakingKeeper) GetParams(ctx types0.Context) types1.Params { +func (m *MockStakingKeeper) GetParams(ctx context.Context) (types1.Params, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetParams", ctx) ret0, _ := ret[0].(types1.Params) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // GetParams indicates an expected call of GetParams. @@ -55,11 +71,12 @@ func (mr *MockStakingKeeperMockRecorder) GetParams(ctx interface{}) *gomock.Call } // ValidatorByConsAddr mocks base method. -func (m *MockStakingKeeper) ValidatorByConsAddr(arg0 types0.Context, arg1 types0.ConsAddress) types1.ValidatorI { +func (m *MockStakingKeeper) ValidatorByConsAddr(arg0 context.Context, arg1 types0.ConsAddress) (types1.ValidatorI, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ValidatorByConsAddr", arg0, arg1) ret0, _ := ret[0].(types1.ValidatorI) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // ValidatorByConsAddr indicates an expected call of ValidatorByConsAddr. diff --git a/x/evidence/types/evidence.go b/x/evidence/types/evidence.go index cabdf59b0325..aed09ec30402 100644 --- a/x/evidence/types/evidence.go +++ b/x/evidence/types/evidence.go @@ -4,9 +4,11 @@ import ( "fmt" "time" + "github.com/cometbft/cometbft/crypto/tmhash" + + "cosmossdk.io/core/address" "cosmossdk.io/core/comet" "cosmossdk.io/x/evidence/exported" - "github.com/cometbft/cometbft/crypto/tmhash" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -48,8 +50,8 @@ func (e *Equivocation) ValidateBasic() error { // GetConsensusAddress returns the validator's consensus address at time of the // Equivocation infraction. -func (e Equivocation) GetConsensusAddress() sdk.ConsAddress { - addr, _ := sdk.ConsAddressFromBech32(e.ConsensusAddress) +func (e Equivocation) GetConsensusAddress(consAc address.Codec) sdk.ConsAddress { + addr, _ := consAc.StringToBytes(e.ConsensusAddress) return addr } @@ -74,9 +76,8 @@ func (e Equivocation) GetTotalPower() int64 { return 0 } // FromABCIEvidence converts a CometBFT concrete Evidence type to // SDK Evidence using Equivocation as the concrete type. -func FromABCIEvidence(e comet.Evidence) *Equivocation { - bech32PrefixConsAddr := sdk.GetConfig().GetBech32ConsensusAddrPrefix() - consAddr, err := sdk.Bech32ifyAddressBytes(bech32PrefixConsAddr, e.Validator().Address()) +func FromABCIEvidence(e comet.Evidence, conAc address.Codec) *Equivocation { + consAddr, err := conAc.BytesToString(e.Validator().Address()) if err != nil { panic(err) } diff --git a/x/evidence/types/evidence_test.go b/x/evidence/types/evidence_test.go index 4f13329c914c..86707532686b 100644 --- a/x/evidence/types/evidence_test.go +++ b/x/evidence/types/evidence_test.go @@ -6,10 +6,12 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "cosmossdk.io/core/comet" "cosmossdk.io/x/evidence/types" - "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/codec/address" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -27,7 +29,7 @@ func TestEquivocation_Valid(t *testing.T) { require.Equal(t, e.GetTotalPower(), int64(0)) require.Equal(t, e.GetValidatorPower(), e.Power) require.Equal(t, e.GetTime(), e.Time) - require.Equal(t, e.GetConsensusAddress().String(), e.ConsensusAddress) + require.Equal(t, e.GetConsensusAddress(address.NewBech32Codec("cosmosvalcons")).String(), e.ConsensusAddress) require.Equal(t, e.GetHeight(), e.Height) require.Equal(t, e.Route(), types.RouteEquivocation) require.Equal(t, strings.ToUpper(hex.EncodeToString(e.Hash())), "1E10F9267BEA3A9A4AB5302C2C510CC1AFD7C54E232DA5B2E3360DFAFACF7A76") @@ -37,7 +39,7 @@ func TestEquivocation_Valid(t *testing.T) { require.Equal(t, int64(0), e.GetTotalPower()) require.Equal(t, e.Power, e.GetValidatorPower()) require.Equal(t, e.Time, e.GetTime()) - require.Equal(t, e.ConsensusAddress, e.GetConsensusAddress().String()) + require.Equal(t, e.ConsensusAddress, e.GetConsensusAddress(address.NewBech32Codec("cosmosvalcons")).String()) require.Equal(t, e.Height, e.GetHeight()) require.Equal(t, types.RouteEquivocation, e.Route()) require.Equal(t, "1E10F9267BEA3A9A4AB5302C2C510CC1AFD7C54E232DA5B2E3360DFAFACF7A76", strings.ToUpper(hex.EncodeToString(e.Hash()))) @@ -75,8 +77,8 @@ func TestEvidenceAddressConversion(t *testing.T) { tmEvidence := NewCometMisbehavior(1, 100, time.Now(), comet.DuplicateVote, validator{address: []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, power: 100}) - evidence := types.FromABCIEvidence(tmEvidence) - consAddr := evidence.GetConsensusAddress() + evidence := types.FromABCIEvidence(tmEvidence, address.NewBech32Codec("testcnclcons")) + consAddr := evidence.GetConsensusAddress(address.NewBech32Codec("testcnclcons")) // Check the address is the same after conversion require.Equal(t, tmEvidence.Validator().Address(), consAddr.Bytes()) sdk.GetConfig().SetBech32PrefixForConsensusNode(sdk.Bech32PrefixConsAddr, sdk.Bech32PrefixConsPub) diff --git a/x/evidence/types/expected_keepers.go b/x/evidence/types/expected_keepers.go index cca18222cc9b..04f4e83ab07d 100644 --- a/x/evidence/types/expected_keepers.go +++ b/x/evidence/types/expected_keepers.go @@ -4,8 +4,9 @@ import ( "context" "time" + "cosmossdk.io/core/address" "cosmossdk.io/core/comet" - sdkmath "cosmossdk.io/math" + "cosmossdk.io/math" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -16,8 +17,9 @@ type ( // StakingKeeper defines the staking module interface contract needed by the // evidence module. StakingKeeper interface { - ValidatorByConsAddr(sdk.Context, sdk.ConsAddress) stakingtypes.ValidatorI - GetParams(ctx sdk.Context) (params stakingtypes.Params) + ConsensusAddressCodec() address.Codec + ValidatorByConsAddr(context.Context, sdk.ConsAddress) (stakingtypes.ValidatorI, error) + GetParams(ctx context.Context) (params stakingtypes.Params, err error) } // SlashingKeeper defines the slashing module interface contract needed by the @@ -27,9 +29,9 @@ type ( IsTombstoned(context.Context, sdk.ConsAddress) bool HasValidatorSigningInfo(context.Context, sdk.ConsAddress) bool Tombstone(context.Context, sdk.ConsAddress) error - Slash(context.Context, sdk.ConsAddress, sdkmath.LegacyDec, int64, int64) error - SlashWithInfractionReason(context.Context, sdk.ConsAddress, sdkmath.LegacyDec, int64, int64, stakingtypes.Infraction) error - SlashFractionDoubleSign(context.Context) (sdkmath.LegacyDec, error) + Slash(context.Context, sdk.ConsAddress, math.LegacyDec, int64, int64) error + SlashWithInfractionReason(context.Context, sdk.ConsAddress, math.LegacyDec, int64, int64, stakingtypes.Infraction) error + SlashFractionDoubleSign(context.Context) (math.LegacyDec, error) Jail(context.Context, sdk.ConsAddress) error JailUntil(context.Context, sdk.ConsAddress, time.Time) error } diff --git a/x/evidence/types/genesis.go b/x/evidence/types/genesis.go index ab8e7bbcadb0..873f9a075fba 100644 --- a/x/evidence/types/genesis.go +++ b/x/evidence/types/genesis.go @@ -3,9 +3,10 @@ package types import ( "fmt" - "cosmossdk.io/x/evidence/exported" proto "github.com/cosmos/gogoproto/proto" + "cosmossdk.io/x/evidence/exported" + "github.com/cosmos/cosmos-sdk/codec/types" ) diff --git a/x/evidence/types/genesis_test.go b/x/evidence/types/genesis_test.go index ab6aa0245595..20b5967ac2eb 100644 --- a/x/evidence/types/genesis_test.go +++ b/x/evidence/types/genesis_test.go @@ -5,9 +5,10 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "cosmossdk.io/x/evidence/exported" "cosmossdk.io/x/evidence/types" - "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/x/evidence/types/msgs.go b/x/evidence/types/msgs.go index c78d59c7dd4d..8d65aca64dbc 100644 --- a/x/evidence/types/msgs.go +++ b/x/evidence/types/msgs.go @@ -30,12 +30,6 @@ func NewMsgSubmitEvidence(s sdk.AccAddress, evi exported.Evidence) (*MsgSubmitEv return &MsgSubmitEvidence{Submitter: s.String(), Evidence: any}, nil } -// GetSigners returns the single expected signer for a MsgSubmitEvidence. -func (m MsgSubmitEvidence) GetSigners() []sdk.AccAddress { - submitter, _ := sdk.AccAddressFromBech32(m.Submitter) - return []sdk.AccAddress{submitter} -} - func (m MsgSubmitEvidence) GetEvidence() exported.Evidence { if m.Evidence == nil { return nil diff --git a/x/evidence/types/router_test.go b/x/evidence/types/router_test.go index 202f2dc1513b..2bd49861dbf5 100644 --- a/x/evidence/types/router_test.go +++ b/x/evidence/types/router_test.go @@ -4,9 +4,10 @@ import ( "context" "testing" + "github.com/stretchr/testify/require" + "cosmossdk.io/x/evidence/exported" "cosmossdk.io/x/evidence/types" - "github.com/stretchr/testify/require" ) func testHandler(context.Context, exported.Evidence) error { return nil } diff --git a/x/feegrant/CHANGELOG.md b/x/feegrant/CHANGELOG.md index 9dabfb6fa994..25070c242de3 100644 --- a/x/feegrant/CHANGELOG.md +++ b/x/feegrant/CHANGELOG.md @@ -25,12 +25,26 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +## [v0.1.1](https://github.com/cosmos/cosmos-sdk/releases/tag/x/feegrant/v0.1.1) - 2024-04-22 + +### Improvements + +* (deps) [#19810](https://github.com/cosmos/cosmos-sdk/pull/19810) Upgrade SDK version due to prometheus breaking change. +* (deps) [#19810](https://github.com/cosmos/cosmos-sdk/pull/19810) Bump `cosmossdk.io/store` to v1.1.0. + +### Bug Fixes + +* [#20114](https://github.com/cosmos/cosmos-sdk/pull/20114) Follow up of [GHSA-4j93-fm92-rp4m](https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-4j93-fm92-rp4m) for `k.GrantAllowance`. + +## [v0.1.0](https://github.com/cosmos/cosmos-sdk/releases/tag/x/feegrant/v0.1.0) - 2023-11-07 + ### Features +* [#18047](https://github.com/cosmos/cosmos-sdk/pull/18047) Added a limit of 200 grants pruned per EndBlock and the method PruneAllowances that prunes 75 expired grants on every run. * [#14649](https://github.com/cosmos/cosmos-sdk/pull/14649) The `x/feegrant` module is extracted to have a separate go.mod file which allows it to be a standalone module. ### API Breaking Changes -* [#15606](https://github.com/cosmos/cosmos-sdk/pull/15606) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey` and methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context`. +* [#15606](https://github.com/cosmos/cosmos-sdk/pull/15606) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey` and methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context`. * [#15347](https://github.com/cosmos/cosmos-sdk/pull/15347) Remove global bech32 usage in keeper. * [#15347](https://github.com/cosmos/cosmos-sdk/pull/15347) `ValidateBasic` is treated as a no op now with with acceptance of RFC001 diff --git a/x/feegrant/README.md b/x/feegrant/README.md index 9fcd1e476d6f..07524449a862 100644 --- a/x/feegrant/README.md +++ b/x/feegrant/README.md @@ -206,6 +206,14 @@ The feegrant module emits the following events: | message | granter | {granterAddress} | | message | grantee | {granteeAddress} | +### Prune fee allowances + +| Type | Attribute Key | Attribute Value | +| ------- | ------------- | ---------------- | +| message | action | prune_feegrant | +| message | pruner | {prunerAddress} | + + ## Client ### CLI diff --git a/x/feegrant/basic_fee.go b/x/feegrant/basic_fee.go index e1eb829f5221..e9703c96c14f 100644 --- a/x/feegrant/basic_fee.go +++ b/x/feegrant/basic_fee.go @@ -58,6 +58,7 @@ func (a BasicAllowance) ValidateBasic() error { return nil } +// ExpiresAt returns the expiry time of the BasicAllowance. func (a BasicAllowance) ExpiresAt() (*time.Time, error) { return a.Expiration, nil } diff --git a/x/feegrant/client/cli/query.go b/x/feegrant/client/cli/query.go deleted file mode 100644 index d2808f5f5dff..000000000000 --- a/x/feegrant/client/cli/query.go +++ /dev/null @@ -1,175 +0,0 @@ -package cli - -import ( - "fmt" - "strings" - - "cosmossdk.io/core/address" - "github.com/spf13/cobra" - - "cosmossdk.io/x/feegrant" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/version" -) - -// GetQueryCmd returns the cli query commands for this module -func GetQueryCmd(ac address.Codec) *cobra.Command { - feegrantQueryCmd := &cobra.Command{ - Use: feegrant.ModuleName, - Short: "Querying commands for the feegrant module", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - feegrantQueryCmd.AddCommand( - GetCmdQueryFeeGrant(ac), - GetCmdQueryFeeGrantsByGrantee(ac), - GetCmdQueryFeeGrantsByGranter(ac), - ) - - return feegrantQueryCmd -} - -// GetCmdQueryFeeGrant returns cmd to query for a grant between granter and grantee. -func GetCmdQueryFeeGrant(ac address.Codec) *cobra.Command { - cmd := &cobra.Command{ - Use: "grant [granter] [grantee]", - Args: cobra.ExactArgs(2), - Short: "Query details of a single grant", - Long: strings.TrimSpace( - fmt.Sprintf(`Query details for a grant. -You can find the fee-grant of a granter and grantee. - -Example: -$ %s query feegrant grant [granter] [grantee] -`, version.AppName), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - queryClient := feegrant.NewQueryClient(clientCtx) - - if _, err := ac.StringToBytes(args[0]); err != nil { - return err - } - - if _, err := ac.StringToBytes(args[1]); err != nil { - return err - } - - res, err := queryClient.Allowance( - cmd.Context(), - &feegrant.QueryAllowanceRequest{ - Granter: args[0], - Grantee: args[1], - }, - ) - if err != nil { - return err - } - - return clientCtx.PrintProto(res.Allowance) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdQueryFeeGrantsByGrantee returns cmd to query for all grants for a grantee. -func GetCmdQueryFeeGrantsByGrantee(ac address.Codec) *cobra.Command { - cmd := &cobra.Command{ - Use: "grants-by-grantee [grantee]", - Args: cobra.ExactArgs(1), - Short: "Query all grants of a grantee", - Long: strings.TrimSpace( - fmt.Sprintf(`Queries all the grants for a grantee address. - -Example: -$ %s query feegrant grants-by-grantee [grantee] -`, version.AppName), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - queryClient := feegrant.NewQueryClient(clientCtx) - - _, err := ac.StringToBytes(args[0]) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - res, err := queryClient.Allowances( - cmd.Context(), - &feegrant.QueryAllowancesRequest{ - Grantee: args[0], - Pagination: pageReq, - }, - ) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "grants") - - return cmd -} - -// GetCmdQueryFeeGrantsByGranter returns cmd to query for all grants by a granter. -func GetCmdQueryFeeGrantsByGranter(ac address.Codec) *cobra.Command { - cmd := &cobra.Command{ - Use: "grants-by-granter [granter]", - Args: cobra.ExactArgs(1), - Short: "Query all grants by a granter", - Long: strings.TrimSpace( - fmt.Sprintf(`Queries all the grants issued for a granter address. - -Example: -$ %s query feegrant grants-by-granter [granter] -`, version.AppName), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - queryClient := feegrant.NewQueryClient(clientCtx) - - _, err := ac.StringToBytes(args[0]) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - res, err := queryClient.AllowancesByGranter( - cmd.Context(), - &feegrant.QueryAllowancesByGranterRequest{ - Granter: args[0], - Pagination: pageReq, - }, - ) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "grants") - - return cmd -} diff --git a/x/feegrant/client/cli/query_test.go b/x/feegrant/client/cli/query_test.go deleted file mode 100644 index b066af7309e5..000000000000 --- a/x/feegrant/client/cli/query_test.go +++ /dev/null @@ -1,156 +0,0 @@ -package cli_test - -import ( - "fmt" - - "cosmossdk.io/x/feegrant" - "cosmossdk.io/x/feegrant/client/cli" - "github.com/cosmos/cosmos-sdk/client/flags" - codecaddress "github.com/cosmos/cosmos-sdk/codec/address" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" -) - -func (s *CLITestSuite) TestCmdGetFeeGrant() { - granter := s.addedGranter - grantee := s.addedGrantee - - testCases := []struct { - name string - args []string - expectErrMsg string - expectErr bool - respType *feegrant.QueryAllowanceResponse - resp *feegrant.Grant - }{ - { - "wrong granter", - []string{ - "wrong_granter", - grantee.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - "decoding bech32 failed", - true, nil, nil, - }, - { - "wrong grantee", - []string{ - granter.String(), - "wrong_grantee", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - "decoding bech32 failed", - true, nil, nil, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryFeeGrant(codecaddress.NewBech32Codec("cosmos")) - out, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, tc.args) - - if tc.expectErr { - s.Require().Error(err) - s.Require().Contains(err.Error(), tc.expectErrMsg) - } else { - s.Require().NoError(err) - s.Require().NoError(s.clientCtx.Codec.UnmarshalJSON(out.Bytes(), tc.respType), out.String()) - } - }) - } -} - -func (s *CLITestSuite) TestCmdGetFeeGrantsByGrantee() { - grantee := s.addedGrantee - clientCtx := s.clientCtx - - testCases := []struct { - name string - args []string - expectErr bool - resp *feegrant.QueryAllowancesResponse - expectLength int - }{ - { - "wrong grantee", - []string{ - "wrong_grantee", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, nil, 0, - }, - { - "valid req", - []string{ - grantee.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, &feegrant.QueryAllowancesResponse{}, 1, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryFeeGrantsByGrantee(codecaddress.NewBech32Codec("cosmos")) - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), tc.resp), out.String()) - } - }) - } -} - -func (s *CLITestSuite) TestCmdGetFeeGrantsByGranter() { - granter := s.addedGranter - clientCtx := s.clientCtx - - testCases := []struct { - name string - args []string - expectErr bool - resp *feegrant.QueryAllowancesByGranterResponse - expectLength int - }{ - { - "wrong grantee", - []string{ - "wrong_grantee", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, nil, 0, - }, - { - "valid req", - []string{ - granter.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, &feegrant.QueryAllowancesByGranterResponse{}, 1, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryFeeGrantsByGranter(codecaddress.NewBech32Codec("cosmos")) - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), tc.resp), out.String()) - } - }) - } -} diff --git a/x/feegrant/client/cli/tx.go b/x/feegrant/client/cli/tx.go index 635249da0e18..9ff9ed96b1bc 100644 --- a/x/feegrant/client/cli/tx.go +++ b/x/feegrant/client/cli/tx.go @@ -8,13 +8,13 @@ import ( "github.com/spf13/cobra" "cosmossdk.io/core/address" + "cosmossdk.io/x/feegrant" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" - - "cosmossdk.io/x/feegrant" ) // flag for feegrant module @@ -26,11 +26,11 @@ const ( FlagAllowedMsgs = "allowed-messages" ) -// GetTxCmd returns the transaction commands for this module +// GetTxCmd returns the transaction commands for feegrant module func GetTxCmd(ac address.Codec) *cobra.Command { feegrantTxCmd := &cobra.Command{ Use: feegrant.ModuleName, - Short: "Feegrant transactions subcommands", + Short: "Feegrant transactions sub-commands", Long: "Grant and revoke fee allowance for a grantee by a granter", DisableFlagParsing: true, SuggestionsMinimumDistance: 2, @@ -39,20 +39,21 @@ func GetTxCmd(ac address.Codec) *cobra.Command { feegrantTxCmd.AddCommand( NewCmdFeeGrant(ac), - NewCmdRevokeFeegrant(ac), ) return feegrantTxCmd } -// NewCmdFeeGrant returns a CLI command handler for creating a MsgGrantAllowance transaction. +// NewCmdFeeGrant returns a CLI command handler to create a MsgGrantAllowance transaction. +// This command is more powerful than AutoCLI generated command as it allows a better input validation. func NewCmdFeeGrant(ac address.Codec) *cobra.Command { cmd := &cobra.Command{ - Use: "grant [granter_key_or_address] [grantee]", - Short: "Grant Fee allowance to an address", + Use: "grant [granter_key_or_address] [grantee]", + Aliases: []string{"grant-allowance"}, + Short: "Grant Fee allowance to an address", Long: strings.TrimSpace( fmt.Sprintf( - `Grant authorization to pay fees from your address. Note, the'--from' flag is + `Grant authorization to pay fees from your address. Note, the '--from' flag is ignored as it is implied from [granter]. Examples: @@ -65,7 +66,10 @@ Examples: ), Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { - cmd.Flags().Set(flags.FlagFrom, args[0]) + if err := cmd.Flags().Set(flags.FlagFrom, args[0]); err != nil { + return err + } + clientCtx, err := client.GetClientTxContext(cmd) if err != nil { return err @@ -82,7 +86,8 @@ Examples: return err } - // if `FlagSpendLimit` isn't set, limit will be nil + // if `FlagSpendLimit` isn't set, limit will be nil. + // Hence, there won't be any spendlimit for the grantee. limit, err := sdk.ParseCoinsNormalized(sl) if err != nil { return err @@ -119,7 +124,8 @@ Examples: return err } - // Check any of period or periodLimit flags set, If set consider it as periodic fee allowance. + // check any of period or periodLimit flags are set, + // if set consider it as periodic fee allowance. if periodClock > 0 || periodLimitVal != "" { periodLimit, err := sdk.ParseCoinsNormalized(periodLimitVal) if err != nil { @@ -181,42 +187,6 @@ Examples: return cmd } -// NewCmdRevokeFeegrant returns a CLI command handler for creating a MsgRevokeAllowance transaction. -func NewCmdRevokeFeegrant(ac address.Codec) *cobra.Command { - cmd := &cobra.Command{ - Use: "revoke [granter] [grantee]", - Short: "revoke fee-grant", - Long: strings.TrimSpace( - fmt.Sprintf(`revoke fee grant from a granter to a grantee. Note, the'--from' flag is - ignored as it is implied from [granter]. - -Example: - $ %s tx %s revoke cosmos1skj.. cosmos1skj.. - `, version.AppName, feegrant.ModuleName), - ), - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) error { - cmd.Flags().Set(flags.FlagFrom, args[0]) - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - grantee, err := ac.StringToBytes(args[1]) - if err != nil { - return err - } - - msg := feegrant.NewMsgRevokeAllowance(clientCtx.GetFromAddress(), grantee) - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - return cmd -} - func getPeriodReset(duration int64) time.Time { return time.Now().Add(getPeriod(duration)) } diff --git a/x/feegrant/client/cli/tx_test.go b/x/feegrant/client/cli/tx_test.go index 85ba10ad8e84..dc9b8d2abfb9 100644 --- a/x/feegrant/client/cli/tx_test.go +++ b/x/feegrant/client/cli/tx_test.go @@ -7,7 +7,6 @@ import ( "testing" "time" - sdkmath "cosmossdk.io/math" abci "github.com/cometbft/cometbft/abci/types" rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" "github.com/cosmos/gogoproto/proto" @@ -15,6 +14,7 @@ import ( _ "cosmossdk.io/api/cosmos/feegrant/v1beta1" _ "cosmossdk.io/api/cosmos/gov/v1beta1" + sdkmath "cosmossdk.io/math" "cosmossdk.io/x/feegrant" "cosmossdk.io/x/feegrant/client/cli" "cosmossdk.io/x/feegrant/module" @@ -428,99 +428,6 @@ func (s *CLITestSuite) TestNewCmdFeeGrant() { } } -func (s *CLITestSuite) TestNewCmdRevokeFeegrant() { - granter := s.addedGranter - grantee := s.addedGrantee - clientCtx := s.clientCtx - - commonFlags := []string{ - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), - } - - addressCodec := codecaddress.NewBech32Codec("cosmos") - // Create new fee grant specifically to test amino. - encodedGrantee := "cosmos16ydaqh0fcnh4qt7a3jme4mmztm2qel5axcpw00" - aminoGrantee, err := addressCodec.StringToBytes(encodedGrantee) - s.Require().NoError(err) - s.createGrant(granter, sdk.AccAddress(aminoGrantee)) - - testCases := []struct { - name string - args []string - expectErr bool - expectedCode uint32 - respType proto.Message - }{ - { - "invalid granter", - append( - []string{ - "wrong_granter", - grantee.String(), - fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), - }, - commonFlags..., - ), - true, 0, nil, - }, - { - "invalid grantee", - append( - []string{ - granter.String(), - "wrong_grantee", - fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), - }, - commonFlags..., - ), - true, 0, nil, - }, - { - "Valid revoke", - append( - []string{ - granter.String(), - grantee.String(), - fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), - }, - commonFlags..., - ), - false, 0, &sdk.TxResponse{}, - }, - { - "Valid revoke with amino", - append( - []string{ - granter.String(), - encodedGrantee, - fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), - fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), - }, - commonFlags..., - ), - false, 0, &sdk.TxResponse{}, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.NewCmdRevokeFeegrant(codecaddress.NewBech32Codec("cosmos")) - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), tc.respType), out.String()) - } - }) - } -} - func (s *CLITestSuite) TestTxWithFeeGrant() { clientCtx := s.clientCtx granter := s.addedGranter diff --git a/x/feegrant/events.go b/x/feegrant/events.go index d5f047612370..70cb6990f0cd 100644 --- a/x/feegrant/events.go +++ b/x/feegrant/events.go @@ -6,7 +6,9 @@ const ( EventTypeRevokeFeeGrant = "revoke_feegrant" EventTypeSetFeeGrant = "set_feegrant" EventTypeUpdateFeeGrant = "update_feegrant" + EventTypePruneFeeGrant = "prune_feegrant" AttributeKeyGranter = "granter" AttributeKeyGrantee = "grantee" + AttributeKeyPruner = "pruner" ) diff --git a/x/feegrant/expected_keepers.go b/x/feegrant/expected_keepers.go index ce6a2d0a5698..e09da85fc080 100644 --- a/x/feegrant/expected_keepers.go +++ b/x/feegrant/expected_keepers.go @@ -24,4 +24,5 @@ type AccountKeeper interface { type BankKeeper interface { SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error + BlockedAddr(addr sdk.AccAddress) bool } diff --git a/x/feegrant/fees.go b/x/feegrant/fees.go index b6191204d5dd..fcaa8fdf9fcc 100644 --- a/x/feegrant/fees.go +++ b/x/feegrant/fees.go @@ -8,7 +8,7 @@ import ( ) // FeeAllowance implementations are tied to a given fee delegator and delegatee, -// and are used to enforce fee grant limits. +// and are used to enforce feegrant limits. type FeeAllowanceI interface { // Accept can use fee payment requested as well as timestamp of the current block // to determine whether or not to process this. This is checked in diff --git a/x/feegrant/filtered_fee.go b/x/feegrant/filtered_fee.go index 4af34e95eea2..c6ed2fed40b4 100644 --- a/x/feegrant/filtered_fee.go +++ b/x/feegrant/filtered_fee.go @@ -4,9 +4,10 @@ import ( "context" "time" - errorsmod "cosmossdk.io/errors" "github.com/cosmos/gogoproto/proto" + errorsmod "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -127,6 +128,7 @@ func (a *AllowedMsgAllowance) ValidateBasic() error { return allowance.ValidateBasic() } +// ExpiresAt returns the expiry time of the AllowedMsgAllowance. func (a *AllowedMsgAllowance) ExpiresAt() (*time.Time, error) { allowance, err := a.GetAllowance() if err != nil { diff --git a/x/feegrant/go.mod b/x/feegrant/go.mod index 21bcaa0a34a9..ee231211138f 100644 --- a/x/feegrant/go.mod +++ b/x/feegrant/go.mod @@ -1,157 +1,159 @@ module cosmossdk.io/x/feegrant -go 1.20 +go 1.21 require ( - cosmossdk.io/api v0.4.2 - cosmossdk.io/core v0.8.0 - cosmossdk.io/depinject v1.0.0-alpha.3 - cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741 - cosmossdk.io/log v1.1.0 - cosmossdk.io/math v1.0.1 - cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c - github.com/cometbft/cometbft v0.38.0-rc1 - github.com/cosmos/cosmos-proto v1.0.0-beta.3 - github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20230607182757-cfeb10287d61 - github.com/cosmos/gogoproto v1.4.10 + cosmossdk.io/api v0.7.5 + cosmossdk.io/core v0.11.0 + cosmossdk.io/depinject v1.0.0-alpha.4 + cosmossdk.io/errors v1.0.1 + cosmossdk.io/log v1.4.1 + cosmossdk.io/math v1.3.0 + cosmossdk.io/store v1.1.0 + github.com/cometbft/cometbft v0.38.12 + github.com/cosmos/cosmos-proto v1.0.0-beta.5 + github.com/cosmos/cosmos-sdk v0.50.6 + github.com/cosmos/gogoproto v1.7.0 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/spf13/cobra v1.7.0 - github.com/stretchr/testify v1.8.4 - google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a - google.golang.org/grpc v1.55.0 - google.golang.org/protobuf v1.30.0 - gotest.tools/v3 v3.4.0 + github.com/spf13/cobra v1.8.1 + github.com/stretchr/testify v1.9.0 + google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 + google.golang.org/grpc v1.63.2 + google.golang.org/protobuf v1.34.2 + gotest.tools/v3 v3.5.1 ) require ( - cosmossdk.io/collections v0.2.0 // indirect - cosmossdk.io/x/tx v0.8.0 // indirect + cosmossdk.io/collections v0.4.0 // indirect + cosmossdk.io/x/tx v0.13.4 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect + github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect - github.com/armon/go-metrics v0.4.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect - github.com/cockroachdb/errors v1.9.1 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect + github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f // indirect - github.com/cockroachdb/redact v1.1.4 // indirect - github.com/cometbft/cometbft-db v0.7.0 // indirect + github.com/cockroachdb/pebble v1.1.1 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/cometbft/cometbft-db v0.11.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-db v1.0.0 // indirect + github.com/cosmos/cosmos-db v1.0.2 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v1.0.0-beta.2 // indirect - github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.13.0 // indirect + github.com/cosmos/iavl v1.1.2 // indirect + github.com/cosmos/ics23/go v0.11.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/danieljoos/wincred v1.1.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect - github.com/emicklei/dot v1.4.2 // indirect + github.com/dvsekhvalnov/jose2go v1.6.0 // indirect + github.com/emicklei/dot v1.6.1 // indirect github.com/fatih/color v1.15.0 // indirect - github.com/felixge/httpsnoop v1.0.2 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/getsentry/sentry-go v0.21.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.1.0 // indirect + github.com/golang/glog v1.2.0 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/mux v1.8.0 // indirect - github.com/gorilla/websocket v1.5.0 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-plugin v1.4.10 // indirect - github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect + github.com/hashicorp/go-metrics v0.5.3 // indirect + github.com/hashicorp/go-plugin v1.5.2 // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/huandu/skiplist v1.2.0 // indirect - github.com/iancoleman/strcase v0.2.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.16.5 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect - github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.0 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect - github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 // indirect + github.com/pelletier/go-toml/v2 v2.2.2 // indirect + github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.15.1 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.20.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect - github.com/rs/cors v1.8.3 // indirect - github.com/rs/zerolog v1.29.1 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rs/cors v1.11.1 // indirect + github.com/rs/zerolog v1.33.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/cast v1.5.1 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.16.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/spf13/viper v1.19.0 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tidwall/btree v1.6.0 // indirect - github.com/zondax/hid v0.9.1 // indirect - github.com/zondax/ledger-go v0.14.1 // indirect - go.etcd.io/bbolt v1.3.6 // indirect - golang.org/x/crypto v0.9.0 // indirect - golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect - google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect + github.com/tidwall/btree v1.7.0 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect + go.etcd.io/bbolt v1.3.10 // indirect + go.uber.org/multierr v1.10.0 // indirect + golang.org/x/crypto v0.26.0 // indirect + golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.6 // indirect - pgregory.net/rapid v0.6.2 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + pgregory.net/rapid v1.1.0 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) - -replace github.com/cosmos/cosmos-sdk => ../../ diff --git a/x/feegrant/go.sum b/x/feegrant/go.sum index eaeb270e5952..26b78bda6df7 100644 --- a/x/feegrant/go.sum +++ b/x/feegrant/go.sum @@ -1,58 +1,23 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.4.2 h1:lQBMl4xINnMnBOR/tQLtjlDnR4exr4e6/SfHR8PILE0= -cosmossdk.io/api v0.4.2/go.mod h1:qrVgOp7DIeAXa+Tt5dDjOC47bZCDrwx8ZHxrmy7STNE= -cosmossdk.io/collections v0.2.0 h1:CgMfLtE16+qox3zBYrGh60i4yKV8SeExLnIdOS2sbQs= -cosmossdk.io/collections v0.2.0/go.mod h1:Oc1FK0vlmxJZsgUn9/o3ldE6zNyWKvobVzaLhWknZJE= -cosmossdk.io/core v0.8.0 h1:LcJnu52E1a8f8E317VfQ1xK/RZe+IuhMNQAjnDLh25M= -cosmossdk.io/core v0.8.0/go.mod h1:LF6VLOv2DdCiaHxYVmr0MZcZpaSM9ZgvyrQSYTeg6D0= -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.0.20230524212735-6cabb6aa5741 h1:BCRz06fvddw7cKGiEGDiSox3qMsjQ97f92K+PDZDHdc= -cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741/go.mod h1:TB05o6YXkZkzsc+6bZFAV5kZRBtoCU9tUkbeMIqEg0w= -cosmossdk.io/log v1.1.0 h1:v0ogPHYeTzPcBTcPR1A3j1hkei4pZama8kz8LKlCMv0= -cosmossdk.io/log v1.1.0/go.mod h1:6zjroETlcDs+mm62gd8Ig7mZ+N+fVOZS91V17H+M4N4= -cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c h1:A+FMPW9GtfcPBDQNtFeDFN27h1SAP6OVjnGgPLlYXmI= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c/go.mod h1:RbYGvXCbz8uNBCXrwS9Z8SyydeWi+W5x5MZ33muyzMw= -cosmossdk.io/x/tx v0.8.0 h1:gLiGRL/Fy7fs6dd0IX8jOf0PrVr56/SG6XVMGQjyvJU= -cosmossdk.io/x/tx v0.8.0/go.mod h1:T9uEumGNgKU61gJYRv1t3uzQwLnASpJGmSE229HM3xA= +cosmossdk.io/api v0.7.5 h1:eMPTReoNmGUm8DeiQL9DyM8sYDjEhWzL1+nLbI9DqtQ= +cosmossdk.io/api v0.7.5/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= +cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= +cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= +cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= +cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= +cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= +cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= +cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= +cosmossdk.io/store v1.1.0 h1:LnKwgYMc9BInn9PhpTFEQVbL9UK475G2H911CGGnWHk= +cosmossdk.io/store v1.1.0/go.mod h1:oZfW/4Fc/zYqu3JmQcQdUJ3fqu5vnYTn3LZFFy8P8ng= +cosmossdk.io/x/tx v0.13.4 h1:Eg0PbJgeO0gM8p5wx6xa0fKR7hIV6+8lC56UrsvSo0Y= +cosmossdk.io/x/tx v0.13.4/go.mod h1:BkFqrnGGgW50Y6cwTy+JvgAhiffbGEKW6KF9ufcDpvk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= @@ -60,30 +25,28 @@ github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMb github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= +github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -95,14 +58,11 @@ github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -111,12 +71,16 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.7.0 h1:YjAGVd3XmtK9ktAbX8Zg2g2PwLIMjGREZJHlV4j7NEo= -github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= -github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= -github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= +github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= +github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ= +github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c= +github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= -github.com/bufbuild/protocompile v0.5.1 h1:mixz5lJX4Hiz4FpqFREJHIXLfaLBntfaJv1h+/jS+Qg= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= +github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -127,8 +91,8 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA 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.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= @@ -143,7 +107,6 @@ github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= @@ -151,27 +114,29 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= +github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f h1:qQW3qCVRpjYsV4YNaUOjm6YLeliAD2jpgex9+D9tqU4= -github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f/go.mod h1:TkdVsGYRqtULUppt2RbC+YaKtTHnHoWa2apfFrSKABw= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/redact v1.1.4 h1:Y0XrVI2FAyofNyGveodTN//qdpPtFKcKTeCBsK3AHAQ= -github.com/cockroachdb/redact v1.1.4/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= +github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/cometbft/cometbft v0.38.0-rc1 h1:ph6smlqX82aH+d72KuxDHqu29M7LyusSp/obfGsGX/w= -github.com/cometbft/cometbft v0.38.0-rc1/go.mod h1:5Jz0Z8YsHSf0ZaAqGvi/ifioSdVFPtEGrm8Y9T/993k= -github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= -github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= +github.com/cometbft/cometbft v0.38.12 h1:OWsLZN2KcSSFe8bet9xCn07VwhBnavPea3VyPnNq1bg= +github.com/cometbft/cometbft v0.38.12/go.mod h1:GPHp3/pehPqgX1930HmK1BpBLZPxB75v/dZg8Viwy+o= +github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= +github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/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= @@ -180,41 +145,42 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= -github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= -github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= -github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= +github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= +github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/cosmos-sdk v0.50.6 h1:efR3MsvMHX5sxS3be+hOobGk87IzlZbSpsI2x/Vw3hk= +github.com/cosmos/cosmos-sdk v0.50.6/go.mod h1:lVkRY6cdMJ0fG3gp8y4hFrsKZqF4z7y0M2UXFb9Yt40= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cosmos/iavl v1.0.0-beta.2 h1:XOsIM80Yyml/KifCXEYOy9tWCXwMAbLa91n6pReW07Y= -github.com/cosmos/iavl v1.0.0-beta.2/go.mod h1:EA97dJ07TBktRlG/iGzK6g1eCXNj1q3MGoFYkVzrwHE= -github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= -github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= -github.com/cosmos/ledger-cosmos-go v0.13.0 h1:ex0CvCxToSR7j5WjrghPu2Bu9sSXKikjnVvUryNnx4s= -github.com/cosmos/ledger-cosmos-go v0.13.0/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= +github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= +github.com/cosmos/iavl v1.1.2 h1:zL9FK7C4L/P4IF1Dm5fIwz0WXCnn7Bp1M2FxH0ayM7Y= +github.com/cosmos/iavl v1.1.2/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= +github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= +github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew 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/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= 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= @@ -225,68 +191,57 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUn 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/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= -github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= +github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/emicklei/dot v1.4.2 h1:UbK6gX4yvrpHKlxuUQicwoAis4zl8Dzwit9SnbBAXWw= -github.com/emicklei/dot v1.4.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= +github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -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/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= -github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= 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/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.21.0 h1:c9l5F1nPF30JIppulk4veau90PK6Smu3abgVtVQWon4= -github.com/getsentry/sentry-go v0.21.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -301,14 +256,16 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= 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= @@ -319,11 +276,10 @@ github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6Wezm github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -334,22 +290,12 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV 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/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -357,7 +303,6 @@ github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= 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= @@ -369,13 +314,12 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 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/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -384,41 +328,22 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a 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.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= @@ -429,8 +354,8 @@ github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= @@ -451,10 +376,12 @@ github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVH github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= +github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v1.4.10 h1:xUbmA4jC6Dq163/fWcp8P3JuHilrHHMLNRxzGQJ9hNk= -github.com/hashicorp/go-plugin v1.4.10/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -466,8 +393,10 @@ github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -484,24 +413,17 @@ github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0Jr github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= -github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= @@ -513,53 +435,40 @@ github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= 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.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= -github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= -github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.0 h1:H4L/LhP7GOMf1j17oQAElHgVlbEje2h14A8Tz9cM2BE= -github.com/linxGnu/grocksdb v1.8.0/go.mod h1:09CeBborffXhXdNpEcOeZrLKEnRtrZFEpFdPNI9Zjjg= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= @@ -567,30 +476,20 @@ github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3v github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= @@ -612,9 +511,11 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -630,8 +531,8 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA 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/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce h1:/pEpMk55wH0X+E5zedGEMOdLuWmV8P4+4W3+LZaM6kg= -github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= @@ -639,7 +540,6 @@ github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DV 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.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= @@ -651,10 +551,14 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -664,18 +568,19 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 h1:W04oB3d0J01W5jgYRGKsV8LCM6g9EkCvPkZcmFuy0OE= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= @@ -686,9 +591,9 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -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/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -696,102 +601,102 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/prometheus/client_golang v1.20.1 h1:IMJXHOD6eARkQpxo8KkhgEVFlBNm+nkrFUyGlIu7Na8= +github.com/prometheus/client_golang v1.20.1/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= -github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= 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/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= 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.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= 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= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= +github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/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/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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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= @@ -801,65 +706,43 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= -github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= -github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= -github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/bbolt v1.3.10 h1:+BqfJTcCzTItrop8mq/lbzL8wSGtj94UO/3U31shqG0= +go.etcd.io/bbolt v1.3.10/go.mod h1:bK3UQLPJZly7IlNmV7uVHJDxfe5aK9Ll93e/74Y9oEQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -869,6 +752,8 @@ go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= @@ -878,57 +763,33 @@ golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnf 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-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= 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= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 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/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -940,69 +801,37 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/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-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/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-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1014,17 +843,12 @@ golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1033,255 +857,121 @@ golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/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-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-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 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.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -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= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= 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= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 h1:x1vNwUhVOcsYoKyEGCZBH694SBmmBjA2EfauFVEI2+M= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a h1:HiYVD+FGJkTo+9zj1gqz0anapsa1JxjiSrN+BJKyUmE= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 h1:rIo7ocm2roD9DcFIX67Ym8icoGCKSARAiPljFhh5suQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2/go.mod h1:O1cOfN1Cy6QEYr7VxtjOyP5AdAuR0aJ/MYZaaof623Y= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= @@ -1296,24 +986,21 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= @@ -1328,29 +1015,21 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -pgregory.net/rapid v0.6.2 h1:ErW5sL+UKtfBfUTsWHDCoeB+eZKLKMxrSd1VJY6W4bw= -pgregory.net/rapid v0.6.2/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/x/feegrant/grant_test.go b/x/feegrant/grant_test.go index 83da814c9196..31b9fb62542f 100644 --- a/x/feegrant/grant_test.go +++ b/x/feegrant/grant_test.go @@ -10,6 +10,7 @@ import ( storetypes "cosmossdk.io/store/types" "cosmossdk.io/x/feegrant" "cosmossdk.io/x/feegrant/module" + codecaddress "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/feegrant/keeper/genesis_test.go b/x/feegrant/keeper/genesis_test.go index f3303d454f1d..776a51e2872b 100644 --- a/x/feegrant/keeper/genesis_test.go +++ b/x/feegrant/keeper/genesis_test.go @@ -7,6 +7,7 @@ import ( "github.com/golang/mock/gomock" "gotest.tools/v3/assert" + "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" "cosmossdk.io/x/feegrant" "cosmossdk.io/x/feegrant/keeper" @@ -59,7 +60,7 @@ func TestImportExportGenesis(t *testing.T) { f.accountKeeper.EXPECT().GetAccount(gomock.Any(), granteeAddr).Return(authtypes.NewBaseAccountWithAddress(granteeAddr)).AnyTimes() f.accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec("cosmos")).AnyTimes() - coins := sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(1_000))) + coins := sdk.NewCoins(sdk.NewCoin("foo", math.NewInt(1_000))) now := f.ctx.BlockHeader().Time oneYear := now.AddDate(1, 0, 0) msgSrvr := keeper.NewMsgServerImpl(f.feegrantKeeper) diff --git a/x/feegrant/keeper/grpc_query.go b/x/feegrant/keeper/grpc_query.go index 9b97a17887c5..7dde41517154 100644 --- a/x/feegrant/keeper/grpc_query.go +++ b/x/feegrant/keeper/grpc_query.go @@ -19,7 +19,7 @@ import ( var _ feegrant.QueryServer = Keeper{} -// Allowance returns fee granted to the grantee by the granter. +// Allowance returns granted allowance to the grantee by the granter. func (q Keeper) Allowance(c context.Context, req *feegrant.QueryAllowanceRequest) (*feegrant.QueryAllowanceResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") diff --git a/x/feegrant/keeper/keeper.go b/x/feegrant/keeper/keeper.go index 250a9e87a4c8..02ec88b69723 100644 --- a/x/feegrant/keeper/keeper.go +++ b/x/feegrant/keeper/keeper.go @@ -9,7 +9,6 @@ import ( errorsmod "cosmossdk.io/errors" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" - "cosmossdk.io/x/feegrant" "github.com/cosmos/cosmos-sdk/codec" @@ -25,11 +24,12 @@ type Keeper struct { cdc codec.BinaryCodec storeService store.KVStoreService authKeeper feegrant.AccountKeeper + bankKeeper feegrant.BankKeeper } var _ ante.FeegrantKeeper = &Keeper{} -// NewKeeper creates a fee grant Keeper +// NewKeeper creates a feegrant Keeper func NewKeeper(cdc codec.BinaryCodec, storeService store.KVStoreService, ak feegrant.AccountKeeper) Keeper { return Keeper{ cdc: cdc, @@ -38,6 +38,13 @@ func NewKeeper(cdc codec.BinaryCodec, storeService store.KVStoreService, ak feeg } } +// Super ugly hack to not be breaking in v0.50 and v0.47 +// DO NOT USE. +func (k Keeper) SetBankKeeper(bk feegrant.BankKeeper) Keeper { + k.bankKeeper = bk + return k +} + // Logger returns a module-specific logger. func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", fmt.Sprintf("x/%s", feegrant.ModuleName)) @@ -53,6 +60,10 @@ func (k Keeper) GrantAllowance(ctx context.Context, granter, grantee sdk.AccAddr // create the account if it is not in account state granteeAcc := k.authKeeper.GetAccount(ctx, grantee) if granteeAcc == nil { + if k.bankKeeper.BlockedAddr(grantee) { + return errorsmod.Wrapf(sdkerrors.ErrUnauthorized, "%s is not allowed to receive funds", grantee) + } + granteeAcc = k.authKeeper.NewAccountWithAddress(ctx, grantee) k.authKeeper.SetAccount(ctx, granteeAcc) } @@ -145,7 +156,7 @@ func (k Keeper) UpdateAllowance(ctx context.Context, granter, grantee sdk.AccAdd // revokeAllowance removes an existing grant func (k Keeper) revokeAllowance(ctx context.Context, granter, grantee sdk.AccAddress) error { - _, err := k.getGrant(ctx, granter, grantee) + grant, err := k.GetAllowance(ctx, granter, grantee) if err != nil { return err } @@ -157,6 +168,17 @@ func (k Keeper) revokeAllowance(ctx context.Context, granter, grantee sdk.AccAdd return err } + exp, err := grant.ExpiresAt() + if err != nil { + return err + } + + if exp != nil { + if err := store.Delete(feegrant.FeeAllowancePrefixQueue(exp, feegrant.FeeAllowanceKey(grantee, granter)[1:])); err != nil { + return err + } + } + sdk.UnwrapSDKContext(ctx).EventManager().EmitEvent( sdk.NewEvent( feegrant.EventTypeRevokeFeeGrant, @@ -223,12 +245,7 @@ func (k Keeper) IterateAllFeeAllowances(ctx context.Context, cb func(grant feegr // UseGrantedFees will try to pay the given fee from the granter's account as requested by the grantee func (k Keeper) UseGrantedFees(ctx context.Context, granter, grantee sdk.AccAddress, fee sdk.Coins, msgs []sdk.Msg) error { - f, err := k.getGrant(ctx, granter, grantee) - if err != nil { - return err - } - - grant, err := f.GetGrant() + grant, err := k.GetAllowance(ctx, granter, grantee) if err != nil { return err } @@ -312,10 +329,11 @@ func (k Keeper) addToFeeAllowanceQueue(ctx context.Context, grantKey []byte, exp } // RemoveExpiredAllowances iterates grantsByExpiryQueue and deletes the expired grants. -func (k Keeper) RemoveExpiredAllowances(ctx context.Context) error { +func (k Keeper) RemoveExpiredAllowances(ctx context.Context, limit int32) error { exp := sdk.UnwrapSDKContext(ctx).BlockTime() store := k.storeService.OpenKVStore(ctx) iterator, err := store.Iterator(feegrant.FeeAllowanceQueueKeyPrefix, storetypes.InclusiveEndBytes(feegrant.AllowanceByExpTimeKey(&exp))) + var count int32 if err != nil { return err } @@ -332,6 +350,12 @@ func (k Keeper) RemoveExpiredAllowances(ctx context.Context) error { if err != nil { return err } + + // limit the amount of iterations to avoid taking too much time + count++ + if count == limit { + return nil + } } return nil } diff --git a/x/feegrant/keeper/keeper_test.go b/x/feegrant/keeper/keeper_test.go index de527485fefd..fb7f661b217a 100644 --- a/x/feegrant/keeper/keeper_test.go +++ b/x/feegrant/keeper/keeper_test.go @@ -31,6 +31,7 @@ type KeeperTestSuite struct { atom sdk.Coins feegrantKeeper keeper.Keeper accountKeeper *feegranttestutil.MockAccountKeeper + bankKeeper *feegranttestutil.MockBankKeeper } func TestKeeperTestSuite(t *testing.T) { @@ -38,7 +39,7 @@ func TestKeeperTestSuite(t *testing.T) { } func (suite *KeeperTestSuite) SetupTest() { - suite.addrs = simtestutil.CreateIncrementalAccounts(4) + suite.addrs = simtestutil.CreateIncrementalAccounts(20) key := storetypes.NewKVStoreKey(feegrant.StoreKey) testCtx := testutil.DefaultContextWithDB(suite.T(), key, storetypes.NewTransientStoreKey("transient_test")) encCfg := moduletestutil.MakeTestEncodingConfig(module.AppModuleBasic{}) @@ -46,14 +47,14 @@ func (suite *KeeperTestSuite) SetupTest() { // setup gomock and initialize some globally expected executions ctrl := gomock.NewController(suite.T()) suite.accountKeeper = feegranttestutil.NewMockAccountKeeper(ctrl) - suite.accountKeeper.EXPECT().GetAccount(gomock.Any(), suite.addrs[0]).Return(authtypes.NewBaseAccountWithAddress(suite.addrs[0])).AnyTimes() - suite.accountKeeper.EXPECT().GetAccount(gomock.Any(), suite.addrs[1]).Return(authtypes.NewBaseAccountWithAddress(suite.addrs[1])).AnyTimes() - suite.accountKeeper.EXPECT().GetAccount(gomock.Any(), suite.addrs[2]).Return(authtypes.NewBaseAccountWithAddress(suite.addrs[2])).AnyTimes() - suite.accountKeeper.EXPECT().GetAccount(gomock.Any(), suite.addrs[3]).Return(authtypes.NewBaseAccountWithAddress(suite.addrs[3])).AnyTimes() - + for i := 0; i < len(suite.addrs); i++ { + suite.accountKeeper.EXPECT().GetAccount(gomock.Any(), suite.addrs[i]).Return(authtypes.NewBaseAccountWithAddress(suite.addrs[i])).AnyTimes() + } suite.accountKeeper.EXPECT().AddressCodec().Return(codecaddress.NewBech32Codec("cosmos")).AnyTimes() + suite.bankKeeper = feegranttestutil.NewMockBankKeeper(ctrl) + suite.bankKeeper.EXPECT().BlockedAddr(gomock.Any()).Return(false).AnyTimes() - suite.feegrantKeeper = keeper.NewKeeper(encCfg.Codec, runtime.NewKVStoreService(key), suite.accountKeeper) + suite.feegrantKeeper = keeper.NewKeeper(encCfg.Codec, runtime.NewKVStoreService(key), suite.accountKeeper).SetBankKeeper(suite.bankKeeper) suite.ctx = testCtx.Ctx suite.msgSrvr = keeper.NewMsgServerImpl(suite.feegrantKeeper) suite.atom = sdk.NewCoins(sdk.NewCoin("atom", sdkmath.NewInt(555))) @@ -395,7 +396,9 @@ func (suite *KeeperTestSuite) TestPruneGrants() { } err := suite.feegrantKeeper.GrantAllowance(suite.ctx, tc.granter, tc.grantee, tc.allowance) suite.NoError(err) - suite.feegrantKeeper.RemoveExpiredAllowances(tc.ctx) + err = suite.feegrantKeeper.RemoveExpiredAllowances(tc.ctx, 5) + suite.NoError(err) + grant, err := suite.feegrantKeeper.GetAllowance(tc.ctx, tc.granter, tc.grantee) if tc.expErrMsg != "" { suite.Error(err) diff --git a/x/feegrant/keeper/msg_server.go b/x/feegrant/keeper/msg_server.go index fbbb70205caa..966f25054562 100644 --- a/x/feegrant/keeper/msg_server.go +++ b/x/feegrant/keeper/msg_server.go @@ -5,10 +5,10 @@ import ( "strings" errorsmod "cosmossdk.io/errors" + "cosmossdk.io/x/feegrant" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - "cosmossdk.io/x/feegrant" ) type msgServer struct { @@ -89,3 +89,22 @@ func (k msgServer) RevokeAllowance(goCtx context.Context, msg *feegrant.MsgRevok return &feegrant.MsgRevokeAllowanceResponse{}, nil } + +// PruneAllowances removes expired allowances from the store. +func (k msgServer) PruneAllowances(ctx context.Context, req *feegrant.MsgPruneAllowances) (*feegrant.MsgPruneAllowancesResponse, error) { + // 75 is an arbitrary value, we can change it later if needed + err := k.RemoveExpiredAllowances(ctx, 75) + if err != nil { + return nil, err + } + + sdkCtx := sdk.UnwrapSDKContext(ctx) + sdkCtx.EventManager().EmitEvent( + sdk.NewEvent( + feegrant.EventTypePruneFeeGrant, + sdk.NewAttribute(feegrant.AttributeKeyPruner, req.Pruner), + ), + ) + + return &feegrant.MsgPruneAllowancesResponse{}, nil +} diff --git a/x/feegrant/keeper/msg_server_test.go b/x/feegrant/keeper/msg_server_test.go index 8e20961f5fca..b3abaaedfd26 100644 --- a/x/feegrant/keeper/msg_server_test.go +++ b/x/feegrant/keeper/msg_server_test.go @@ -3,12 +3,13 @@ package keeper_test import ( "time" + "github.com/golang/mock/gomock" + "cosmossdk.io/x/feegrant" codecaddress "github.com/cosmos/cosmos-sdk/codec/address" codectypes "github.com/cosmos/cosmos-sdk/codec/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/golang/mock/gomock" ) func (suite *KeeperTestSuite) TestGrantAllowance() { @@ -283,3 +284,66 @@ func (suite *KeeperTestSuite) TestRevokeAllowance() { }) } } + +func (suite *KeeperTestSuite) TestPruneAllowances() { + ctx := suite.ctx.WithBlockTime(time.Now()) + oneYear := ctx.BlockTime().AddDate(1, 0, 0) + + // We create 76 allowances, all expiring in one year + count := 0 + for i := 0; i < len(suite.addrs); i++ { + for j := 0; j < len(suite.addrs); j++ { + if count == 76 { + break + } + if suite.addrs[i].String() == suite.addrs[j].String() { + continue + } + + any, err := codectypes.NewAnyWithValue(&feegrant.BasicAllowance{ + SpendLimit: suite.atom, + Expiration: &oneYear, + }) + suite.Require().NoError(err) + req := &feegrant.MsgGrantAllowance{ + Granter: suite.addrs[i].String(), + Grantee: suite.addrs[j].String(), + Allowance: any, + } + + _, err = suite.msgSrvr.GrantAllowance(ctx, req) + if err != nil { + // do not fail, just try with another pair + continue + } + + count++ + } + } + + // we have 76 allowances + count = 0 + err := suite.feegrantKeeper.IterateAllFeeAllowances(ctx, func(grant feegrant.Grant) bool { + count++ + return false + }) + suite.Require().NoError(err) + suite.Require().Equal(76, count) + + // after a year and one day passes, they are all expired + oneYearAndADay := ctx.BlockTime().AddDate(1, 0, 1) + ctx = suite.ctx.WithBlockTime(oneYearAndADay) + + // we prune them, but currently only 75 will be pruned + _, err = suite.msgSrvr.PruneAllowances(ctx, &feegrant.MsgPruneAllowances{}) + suite.Require().NoError(err) + + // we have 1 allowance left + count = 0 + err = suite.feegrantKeeper.IterateAllFeeAllowances(ctx, func(grant feegrant.Grant) bool { + count++ + return false + }) + suite.Require().NoError(err) + suite.Require().Equal(1, count) +} diff --git a/x/feegrant/key_test.go b/x/feegrant/key_test.go index 67b382d87817..45eae077d781 100644 --- a/x/feegrant/key_test.go +++ b/x/feegrant/key_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" "cosmossdk.io/x/feegrant" + codecaddress "github.com/cosmos/cosmos-sdk/codec/address" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/feegrant/migrations/v2/store_test.go b/x/feegrant/migrations/v2/store_test.go index 26173dea4f10..7b2ad1517160 100644 --- a/x/feegrant/migrations/v2/store_test.go +++ b/x/feegrant/migrations/v2/store_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - sdkmath "cosmossdk.io/math" "github.com/stretchr/testify/require" + sdkmath "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" "cosmossdk.io/x/feegrant" v2 "cosmossdk.io/x/feegrant/migrations/v2" diff --git a/x/feegrant/module/abci.go b/x/feegrant/module/abci.go index 4dbab056a9a3..6f14eee3137c 100644 --- a/x/feegrant/module/abci.go +++ b/x/feegrant/module/abci.go @@ -1,14 +1,12 @@ package module import ( - "cosmossdk.io/x/feegrant/keeper" + "context" - sdk "github.com/cosmos/cosmos-sdk/types" + "cosmossdk.io/x/feegrant/keeper" ) -func EndBlocker(ctx sdk.Context, k keeper.Keeper) { - err := k.RemoveExpiredAllowances(ctx) - if err != nil { - panic(err) - } +func EndBlocker(ctx context.Context, k keeper.Keeper) error { + // 200 is an arbitrary value, we can change it later if needed + return k.RemoveExpiredAllowances(ctx, 200) } diff --git a/x/feegrant/module/abci_test.go b/x/feegrant/module/abci_test.go index 328cfb3afe83..5c91de02fb7a 100644 --- a/x/feegrant/module/abci_test.go +++ b/x/feegrant/module/abci_test.go @@ -3,14 +3,15 @@ package module_test import ( "testing" + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" + sdkmath "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" "cosmossdk.io/x/feegrant" "cosmossdk.io/x/feegrant/keeper" "cosmossdk.io/x/feegrant/module" feegranttestutil "cosmossdk.io/x/feegrant/testutil" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec/address" @@ -76,7 +77,7 @@ func TestFeegrantPruning(t *testing.T) { feegrant.RegisterQueryServer(queryHelper, feegrantKeeper) queryClient := feegrant.NewQueryClient(queryHelper) - module.EndBlocker(testCtx.Ctx, feegrantKeeper) + require.NoError(t, module.EndBlocker(testCtx.Ctx, feegrantKeeper)) res, err := queryClient.Allowances(testCtx.Ctx.Context(), &feegrant.QueryAllowancesRequest{ Grantee: grantee.String(), diff --git a/x/feegrant/module/autocli.go b/x/feegrant/module/autocli.go new file mode 100644 index 000000000000..f3bbd0597728 --- /dev/null +++ b/x/feegrant/module/autocli.go @@ -0,0 +1,74 @@ +package module + +import ( + "fmt" + + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + feegrantv1beta1 "cosmossdk.io/api/cosmos/feegrant/v1beta1" + + "github.com/cosmos/cosmos-sdk/version" +) + +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: feegrantv1beta1.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Allowance", + Use: "grant [granter] [grantee]", + Short: "Query details of a single grant", + Long: "Query details for a grant. You can find the fee-grant of a granter and grantee.", + Example: fmt.Sprintf(`$ %s query feegrant grant [granter] [grantee]`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "granter"}, + {ProtoField: "grantee"}, + }, + }, + { + RpcMethod: "Allowances", + Use: "grants-by-grantee [grantee]", + Short: "Query all grants of a grantee", + Long: "Queries all the grants for a grantee address.", + Example: fmt.Sprintf(`$ %s query feegrant grants-by-grantee [grantee]`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "grantee"}, + }, + }, + { + RpcMethod: "AllowancesByGranter", + Use: "grants-by-granter [granter]", + Short: "Query all grants by a granter", + Example: fmt.Sprintf(`$ %s query feegrant grants-by-granter [granter]`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "granter"}, + }, + }, + }, + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: feegrantv1beta1.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "RevokeAllowance", + Use: "revoke [granter] [grantee]", + Short: "Revoke a fee grant", + Long: "Revoke fee grant from a granter to a grantee. Note, the '--from' flag is ignored as it is implied from [granter]", + Example: fmt.Sprintf(`$ %s tx feegrant revoke [granter] [grantee]`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "granter"}, + {ProtoField: "grantee"}, + }, + }, + { + RpcMethod: "PruneAllowances", + Use: "prune", + Short: "Prune expired allowances", + Long: "Prune up to 75 expired allowances in order to reduce the size of the store when the number of expired allowances is large.", + Example: fmt.Sprintf(`$ %s tx feegrant prune --from [mykey]`, version.AppName), + }, + }, + EnhanceCustomCommand: true, + }, + } +} diff --git a/x/feegrant/module/module.go b/x/feegrant/module/module.go index 50a14d2f7692..5baebe39021a 100644 --- a/x/feegrant/module/module.go +++ b/x/feegrant/module/module.go @@ -5,19 +5,15 @@ import ( "encoding/json" "fmt" - abci "github.com/cometbft/cometbft/abci/types" gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" + modulev1 "cosmossdk.io/api/cosmos/feegrant/module/v1" "cosmossdk.io/core/address" "cosmossdk.io/core/appmodule" - "cosmossdk.io/errors" - - modulev1 "cosmossdk.io/api/cosmos/feegrant/module/v1" - - "cosmossdk.io/depinject" - "cosmossdk.io/core/store" + "cosmossdk.io/depinject" + "cosmossdk.io/errors" "cosmossdk.io/x/feegrant" "cosmossdk.io/x/feegrant/client/cli" "cosmossdk.io/x/feegrant/keeper" @@ -32,8 +28,13 @@ import ( ) var ( - _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModuleBasic = AppModule{} _ module.AppModuleSimulation = AppModule{} + _ module.HasServices = AppModule{} + _ module.HasGenesis = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasEndBlocker = AppModule{} ) // ---------------------------------------------------------------------------- @@ -101,11 +102,6 @@ func (ab AppModuleBasic) GetTxCmd() *cobra.Command { return cli.GetTxCmd(ab.ac) } -// GetQueryCmd returns no root query command for the feegrant module. -func (ab AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.GetQueryCmd(ab.ac) -} - // ---------------------------------------------------------------------------- // AppModule // ---------------------------------------------------------------------------- @@ -113,6 +109,7 @@ func (ab AppModuleBasic) GetQueryCmd() *cobra.Command { // AppModule implements an application module for the feegrant module. type AppModule struct { AppModuleBasic + keeper keeper.Keeper accountKeeper feegrant.AccountKeeper bankKeeper feegrant.BankKeeper @@ -123,32 +120,22 @@ type AppModule struct { func NewAppModule(cdc codec.Codec, ak feegrant.AccountKeeper, bk feegrant.BankKeeper, keeper keeper.Keeper, registry cdctypes.InterfaceRegistry) AppModule { return AppModule{ AppModuleBasic: AppModuleBasic{cdc: cdc, ac: ak.AddressCodec()}, - keeper: keeper, + keeper: keeper.SetBankKeeper(bk), // Super ugly hack to not be api breaking in v0.50 and v0.47 accountKeeper: ak, bankKeeper: bk, registry: registry, } } -var ( - _ appmodule.AppModule = AppModule{} - _ appmodule.HasEndBlocker = AppModule{} -) - // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} // IsAppModule implements the appmodule.AppModule interface. func (am AppModule) IsAppModule() {} -// Name returns the feegrant module's name. -func (AppModule) Name() string { - return feegrant.ModuleName -} - // InitGenesis performs genesis initialization for the feegrant module. It returns // no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, bz json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, bz json.RawMessage) { var gs feegrant.GenesisState cdc.MustUnmarshalJSON(bz, &gs) @@ -156,7 +143,6 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, bz json.Ra if err != nil { panic(err) } - return []abci.ValidatorUpdate{} } // ExportGenesis returns the exported genesis state as raw bytes for the feegrant @@ -176,9 +162,7 @@ func (AppModule) ConsensusVersion() uint64 { return 2 } // EndBlock returns the end blocker for the feegrant module. It returns no validator // updates. func (am AppModule) EndBlock(ctx context.Context) error { - c := sdk.UnwrapSDKContext(ctx) - EndBlocker(c, am.keeper) - return nil + return EndBlocker(ctx, am.keeper) } func init() { @@ -200,7 +184,7 @@ type FeegrantInputs struct { func ProvideModule(in FeegrantInputs) (keeper.Keeper, appmodule.AppModule) { k := keeper.NewKeeper(in.Cdc, in.StoreService, in.AccountKeeper) m := NewAppModule(in.Cdc, in.AccountKeeper, in.BankKeeper, k, in.Registry) - return k, m + return k.SetBankKeeper(in.BankKeeper) /* depinject ux improvement */, m } // AppModuleSimulation functions diff --git a/x/feegrant/msgs.go b/x/feegrant/msgs.go index 655c7bcb902c..b0c4fcf09d47 100644 --- a/x/feegrant/msgs.go +++ b/x/feegrant/msgs.go @@ -33,12 +33,6 @@ func NewMsgGrantAllowance(feeAllowance FeeAllowanceI, granter, grantee sdk.AccAd }, nil } -// GetSigners gets the granter account associated with an allowance -func (msg MsgGrantAllowance) GetSigners() []sdk.AccAddress { - granter, _ := sdk.AccAddressFromBech32(msg.Granter) - return []sdk.AccAddress{granter} -} - // GetFeeAllowanceI returns unpacked FeeAllowance func (msg MsgGrantAllowance) GetFeeAllowanceI() (FeeAllowanceI, error) { allowance, ok := msg.Allowance.GetCachedValue().(FeeAllowanceI) @@ -57,15 +51,6 @@ func (msg MsgGrantAllowance) UnpackInterfaces(unpacker types.AnyUnpacker) error // NewMsgRevokeAllowance returns a message to revoke a fee allowance for a given // granter and grantee -// - func NewMsgRevokeAllowance(granter, grantee sdk.AccAddress) MsgRevokeAllowance { return MsgRevokeAllowance{Granter: granter.String(), Grantee: grantee.String()} } - -// GetSigners gets the granter address associated with an Allowance -// to revoke. -func (msg MsgRevokeAllowance) GetSigners() []sdk.AccAddress { - granter, _ := sdk.AccAddressFromBech32(msg.Granter) - return []sdk.AccAddress{granter} -} diff --git a/x/feegrant/msgs_test.go b/x/feegrant/msgs_test.go index 337bbe952e4a..a0c19d0ff1c3 100644 --- a/x/feegrant/msgs_test.go +++ b/x/feegrant/msgs_test.go @@ -5,6 +5,7 @@ import ( "github.com/stretchr/testify/require" + "cosmossdk.io/math" "cosmossdk.io/x/feegrant" "github.com/cosmos/cosmos-sdk/codec" @@ -19,7 +20,7 @@ func TestAminoJSON(t *testing.T) { legacytx.RegressionTestingAminoCodec = legacyAmino tx := legacytx.StdTx{} var msg sdk.Msg - allowanceAny, err := codectypes.NewAnyWithValue(&feegrant.BasicAllowance{SpendLimit: sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(100)))}) + allowanceAny, err := codectypes.NewAnyWithValue(&feegrant.BasicAllowance{SpendLimit: sdk.NewCoins(sdk.NewCoin("foo", math.NewInt(100)))}) require.NoError(t, err) // Amino JSON encoding has changed in feegrant since v0.46. @@ -33,13 +34,13 @@ func TestAminoJSON(t *testing.T) { tx.Msgs = []sdk.Msg{msg} require.Equal(t, `{"account_number":"1","chain_id":"foo","fee":{"amount":[],"gas":"0"},"memo":"memo","msgs":[{"type":"cosmos-sdk/MsgGrantAllowance","value":{"allowance":{"type":"cosmos-sdk/BasicAllowance","value":{"spend_limit":[{"amount":"100","denom":"foo"}]}},"grantee":"cosmos1def","granter":"cosmos1abc"}}],"sequence":"1","timeout_height":"1"}`, - string(legacytx.StdSignBytes("foo", 1, 1, 1, legacytx.StdFee{}, []sdk.Msg{msg}, "memo", nil)), + string(legacytx.StdSignBytes("foo", 1, 1, 1, legacytx.StdFee{}, []sdk.Msg{msg}, "memo")), ) msg = &feegrant.MsgRevokeAllowance{Granter: "cosmos1abc", Grantee: "cosmos1def"} tx.Msgs = []sdk.Msg{msg} require.Equal(t, `{"account_number":"1","chain_id":"foo","fee":{"amount":[],"gas":"0"},"memo":"memo","msgs":[{"type":"cosmos-sdk/MsgRevokeAllowance","value":{"grantee":"cosmos1def","granter":"cosmos1abc"}}],"sequence":"1","timeout_height":"1"}`, - string(legacytx.StdSignBytes("foo", 1, 1, 1, legacytx.StdFee{}, []sdk.Msg{msg}, "memo", nil)), + string(legacytx.StdSignBytes("foo", 1, 1, 1, legacytx.StdFee{}, []sdk.Msg{msg}, "memo")), ) } diff --git a/x/feegrant/periodic_fee.go b/x/feegrant/periodic_fee.go index 5439d66fb17a..d5906c955a67 100644 --- a/x/feegrant/periodic_fee.go +++ b/x/feegrant/periodic_fee.go @@ -91,7 +91,7 @@ func (a PeriodicAllowance) ValidateBasic() error { if !a.PeriodCanSpend.IsValid() { return errorsmod.Wrapf(sdkerrors.ErrInvalidCoins, "can spend amount is invalid: %s", a.PeriodCanSpend) } - // We allow 0 for CanSpend + // We allow 0 for `PeriodCanSpend` if a.PeriodCanSpend.IsAnyNegative() { return errorsmod.Wrap(sdkerrors.ErrInvalidCoins, "can spend must not be negative") } @@ -109,6 +109,7 @@ func (a PeriodicAllowance) ValidateBasic() error { return nil } +// ExpiresAt returns the expiry time of the PeriodicAllowance. func (a PeriodicAllowance) ExpiresAt() (*time.Time, error) { return a.Basic.ExpiresAt() } diff --git a/x/feegrant/periodic_fee_test.go b/x/feegrant/periodic_fee_test.go index a5f0cb6e8f85..911973c60486 100644 --- a/x/feegrant/periodic_fee_test.go +++ b/x/feegrant/periodic_fee_test.go @@ -10,6 +10,7 @@ import ( storetypes "cosmossdk.io/store/types" "cosmossdk.io/x/feegrant" + "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/feegrant/query.pb.go b/x/feegrant/query.pb.go index e87add15e5a1..a4673fc23302 100644 --- a/x/feegrant/query.pb.go +++ b/x/feegrant/query.pb.go @@ -415,9 +415,9 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryClient interface { - // Allowance returns fee granted to the grantee by the granter. + // Allowance returns granted allwance to the grantee by the granter. Allowance(ctx context.Context, in *QueryAllowanceRequest, opts ...grpc.CallOption) (*QueryAllowanceResponse, error) - // Allowances returns all the grants for address. + // Allowances returns all the grants for the given grantee address. Allowances(ctx context.Context, in *QueryAllowancesRequest, opts ...grpc.CallOption) (*QueryAllowancesResponse, error) // AllowancesByGranter returns all the grants given by an address // @@ -462,9 +462,9 @@ func (c *queryClient) AllowancesByGranter(ctx context.Context, in *QueryAllowanc // QueryServer is the server API for Query service. type QueryServer interface { - // Allowance returns fee granted to the grantee by the granter. + // Allowance returns granted allwance to the grantee by the granter. Allowance(context.Context, *QueryAllowanceRequest) (*QueryAllowanceResponse, error) - // Allowances returns all the grants for address. + // Allowances returns all the grants for the given grantee address. Allowances(context.Context, *QueryAllowancesRequest) (*QueryAllowancesResponse, error) // AllowancesByGranter returns all the grants given by an address // diff --git a/x/feegrant/simulation/decoder.go b/x/feegrant/simulation/decoder.go index 3a8263709dba..c1b4eedeb478 100644 --- a/x/feegrant/simulation/decoder.go +++ b/x/feegrant/simulation/decoder.go @@ -5,6 +5,7 @@ import ( "fmt" "cosmossdk.io/x/feegrant" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/types/kv" ) diff --git a/x/feegrant/simulation/genesis.go b/x/feegrant/simulation/genesis.go index 95b2212fed59..607111bc975c 100644 --- a/x/feegrant/simulation/genesis.go +++ b/x/feegrant/simulation/genesis.go @@ -4,7 +4,7 @@ import ( "math/rand" "time" - sdkmath "cosmossdk.io/math" + "cosmossdk.io/math" "cosmossdk.io/x/feegrant" sdk "github.com/cosmos/cosmos-sdk/types" @@ -25,8 +25,8 @@ func genFeeGrants(r *rand.Rand, accounts []simtypes.Account) []feegrant.Grant { func generateRandomAllowances(granter, grantee sdk.AccAddress, r *rand.Rand) feegrant.Grant { allowances := make([]feegrant.Grant, 3) - spendLimit := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100))) - periodSpendLimit := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))) + spendLimit := sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(100))) + periodSpendLimit := sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(10))) basic := feegrant.BasicAllowance{ SpendLimit: spendLimit, diff --git a/x/feegrant/simulation/genesis_test.go b/x/feegrant/simulation/genesis_test.go index 38e213b2fe4b..af9ffd667e7e 100644 --- a/x/feegrant/simulation/genesis_test.go +++ b/x/feegrant/simulation/genesis_test.go @@ -7,10 +7,11 @@ import ( "github.com/stretchr/testify/require" - sdkmath "cosmossdk.io/math" + "cosmossdk.io/math" "cosmossdk.io/x/feegrant" "cosmossdk.io/x/feegrant/module" "cosmossdk.io/x/feegrant/simulation" + moduletypes "github.com/cosmos/cosmos-sdk/types/module" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -29,7 +30,7 @@ func TestRandomizedGenState(t *testing.T) { Rand: r, NumBonded: 3, Accounts: accounts, - InitialStake: sdkmath.NewInt(1000), + InitialStake: math.NewInt(1000), GenState: make(map[string]json.RawMessage), } diff --git a/x/feegrant/simulation/operations_test.go b/x/feegrant/simulation/operations_test.go index d39fa708005f..4198d39d55f0 100644 --- a/x/feegrant/simulation/operations_test.go +++ b/x/feegrant/simulation/operations_test.go @@ -5,29 +5,19 @@ import ( "testing" "time" - "cosmossdk.io/depinject" - "cosmossdk.io/log" - _ "cosmossdk.io/x/feegrant/module" - + abci "github.com/cometbft/cometbft/abci/types" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/gogoproto/proto" + "github.com/stretchr/testify/suite" - "github.com/cosmos/cosmos-sdk/client" - _ "github.com/cosmos/cosmos-sdk/x/auth" - _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" - _ "github.com/cosmos/cosmos-sdk/x/bank" - _ "github.com/cosmos/cosmos-sdk/x/consensus" - _ "github.com/cosmos/cosmos-sdk/x/genutil" - _ "github.com/cosmos/cosmos-sdk/x/mint" - _ "github.com/cosmos/cosmos-sdk/x/params" - _ "github.com/cosmos/cosmos-sdk/x/staking" - + "cosmossdk.io/depinject" + "cosmossdk.io/log" "cosmossdk.io/x/feegrant" "cosmossdk.io/x/feegrant/keeper" + _ "cosmossdk.io/x/feegrant/module" "cosmossdk.io/x/feegrant/simulation" - abci "github.com/cometbft/cometbft/abci/types" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" - "github.com/stretchr/testify/suite" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codecaddress "github.com/cosmos/cosmos-sdk/codec/address" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -36,9 +26,17 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + _ "github.com/cosmos/cosmos-sdk/x/auth" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" + _ "github.com/cosmos/cosmos-sdk/x/bank" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktestutil "github.com/cosmos/cosmos-sdk/x/bank/testutil" + _ "github.com/cosmos/cosmos-sdk/x/consensus" + _ "github.com/cosmos/cosmos-sdk/x/genutil" + _ "github.com/cosmos/cosmos-sdk/x/mint" + _ "github.com/cosmos/cosmos-sdk/x/params" + _ "github.com/cosmos/cosmos-sdk/x/staking" ) type SimTestSuite struct { diff --git a/x/feegrant/testutil/expected_keepers_mocks.go b/x/feegrant/testutil/expected_keepers_mocks.go index d7567b8266d3..319a4d2a265a 100644 --- a/x/feegrant/testutil/expected_keepers_mocks.go +++ b/x/feegrant/testutil/expected_keepers_mocks.go @@ -141,6 +141,20 @@ func (m *MockBankKeeper) EXPECT() *MockBankKeeperMockRecorder { return m.recorder } +// BlockedAddr mocks base method. +func (m *MockBankKeeper) BlockedAddr(addr types.AccAddress) bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "BlockedAddr", addr) + ret0, _ := ret[0].(bool) + return ret0 +} + +// BlockedAddr indicates an expected call of BlockedAddr. +func (mr *MockBankKeeperMockRecorder) BlockedAddr(addr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockedAddr", reflect.TypeOf((*MockBankKeeper)(nil).BlockedAddr), addr) +} + // SendCoinsFromAccountToModule mocks base method. func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx context.Context, senderAddr types.AccAddress, recipientModule string, amt types.Coins) error { m.ctrl.T.Helper() diff --git a/x/feegrant/tx.pb.go b/x/feegrant/tx.pb.go index f0dcf66635f2..7646b28741a1 100644 --- a/x/feegrant/tx.pb.go +++ b/x/feegrant/tx.pb.go @@ -225,17 +225,106 @@ func (m *MsgRevokeAllowanceResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRevokeAllowanceResponse proto.InternalMessageInfo +// MsgPruneAllowances prunes expired fee allowances. +// +// Since cosmos-sdk 0.50 +type MsgPruneAllowances struct { + // pruner is the address of the user pruning expired allowances. + Pruner string `protobuf:"bytes,1,opt,name=pruner,proto3" json:"pruner,omitempty"` +} + +func (m *MsgPruneAllowances) Reset() { *m = MsgPruneAllowances{} } +func (m *MsgPruneAllowances) String() string { return proto.CompactTextString(m) } +func (*MsgPruneAllowances) ProtoMessage() {} +func (*MsgPruneAllowances) Descriptor() ([]byte, []int) { + return fileDescriptor_dd44ad7946dad783, []int{4} +} +func (m *MsgPruneAllowances) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgPruneAllowances) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgPruneAllowances.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 *MsgPruneAllowances) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgPruneAllowances.Merge(m, src) +} +func (m *MsgPruneAllowances) XXX_Size() int { + return m.Size() +} +func (m *MsgPruneAllowances) XXX_DiscardUnknown() { + xxx_messageInfo_MsgPruneAllowances.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgPruneAllowances proto.InternalMessageInfo + +func (m *MsgPruneAllowances) GetPruner() string { + if m != nil { + return m.Pruner + } + return "" +} + +// MsgPruneAllowancesResponse defines the Msg/PruneAllowancesResponse response type. +// +// Since cosmos-sdk 0.50 +type MsgPruneAllowancesResponse struct { +} + +func (m *MsgPruneAllowancesResponse) Reset() { *m = MsgPruneAllowancesResponse{} } +func (m *MsgPruneAllowancesResponse) String() string { return proto.CompactTextString(m) } +func (*MsgPruneAllowancesResponse) ProtoMessage() {} +func (*MsgPruneAllowancesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_dd44ad7946dad783, []int{5} +} +func (m *MsgPruneAllowancesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgPruneAllowancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgPruneAllowancesResponse.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 *MsgPruneAllowancesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgPruneAllowancesResponse.Merge(m, src) +} +func (m *MsgPruneAllowancesResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgPruneAllowancesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgPruneAllowancesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgPruneAllowancesResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgGrantAllowance)(nil), "cosmos.feegrant.v1beta1.MsgGrantAllowance") proto.RegisterType((*MsgGrantAllowanceResponse)(nil), "cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse") proto.RegisterType((*MsgRevokeAllowance)(nil), "cosmos.feegrant.v1beta1.MsgRevokeAllowance") proto.RegisterType((*MsgRevokeAllowanceResponse)(nil), "cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse") + proto.RegisterType((*MsgPruneAllowances)(nil), "cosmos.feegrant.v1beta1.MsgPruneAllowances") + proto.RegisterType((*MsgPruneAllowancesResponse)(nil), "cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse") } func init() { proto.RegisterFile("cosmos/feegrant/v1beta1/tx.proto", fileDescriptor_dd44ad7946dad783) } var fileDescriptor_dd44ad7946dad783 = []byte{ - // 409 bytes of a gzipped FileDescriptorProto + // 455 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x4f, 0x4b, 0x4d, 0x4d, 0x2f, 0x4a, 0xcc, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x87, 0xa8, @@ -254,14 +343,17 @@ var fileDescriptor_dd44ad7946dad783 = []byte{ 0xb2, 0xf5, 0x31, 0x7c, 0xad, 0x24, 0xcd, 0x25, 0x89, 0x21, 0x18, 0x94, 0x5a, 0x5c, 0x90, 0x9f, 0x57, 0x9c, 0xaa, 0xb4, 0x86, 0x91, 0x4b, 0xc8, 0xb7, 0x38, 0x3d, 0x28, 0xb5, 0x2c, 0x3f, 0x3b, 0x95, 0xee, 0x21, 0x65, 0xa5, 0x87, 0xee, 0x15, 0x59, 0x54, 0xaf, 0xa0, 0xb9, 0x4b, 0x49, 0x86, - 0x4b, 0x0a, 0x53, 0x14, 0xe6, 0x19, 0xa3, 0xcf, 0x8c, 0x5c, 0xcc, 0xbe, 0xc5, 0xe9, 0x42, 0x05, - 0x5c, 0x7c, 0x68, 0x31, 0xaf, 0xa5, 0x87, 0x2b, 0x94, 0x31, 0x82, 0x46, 0xca, 0x88, 0x78, 0xb5, - 0x30, 0x9b, 0x85, 0x8a, 0xb9, 0xf8, 0xd1, 0x83, 0x50, 0x1b, 0x9f, 0x31, 0x68, 0x8a, 0xa5, 0x8c, - 0x49, 0x50, 0x0c, 0xb3, 0x54, 0x8a, 0xb5, 0xe1, 0xf9, 0x06, 0x2d, 0x46, 0x27, 0xc3, 0x13, 0x8f, - 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, - 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x82, 0xe6, 0x98, 0xe2, 0x94, 0x6c, 0xbd, 0xcc, - 0x7c, 0xfd, 0x0a, 0x78, 0x56, 0x4d, 0x62, 0x03, 0xa7, 0x42, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x3f, 0x13, 0x6c, 0x2e, 0xc4, 0x03, 0x00, 0x00, + 0x4b, 0x0a, 0x53, 0x14, 0xee, 0x99, 0x60, 0xb0, 0x5f, 0x02, 0x8a, 0x4a, 0xf3, 0x10, 0x92, 0xc5, + 0x42, 0x06, 0x5c, 0x6c, 0x05, 0x20, 0x21, 0xc2, 0x5e, 0x81, 0xaa, 0xb3, 0xe2, 0x06, 0xb9, 0x0a, + 0xca, 0x81, 0x5a, 0x89, 0x66, 0x28, 0xcc, 0x4a, 0xa3, 0x17, 0x4c, 0x5c, 0xcc, 0xbe, 0xc5, 0xe9, + 0x42, 0x05, 0x5c, 0x7c, 0x68, 0x89, 0x4d, 0x4b, 0x0f, 0x57, 0xc4, 0x62, 0xc4, 0x86, 0x94, 0x11, + 0xf1, 0x6a, 0x61, 0x36, 0x0b, 0x15, 0x73, 0xf1, 0xa3, 0xc7, 0x9a, 0x36, 0x3e, 0x63, 0xd0, 0x14, + 0x4b, 0x19, 0x93, 0xa0, 0x18, 0xd9, 0x52, 0xf4, 0xe0, 0xc5, 0x6b, 0x29, 0x9a, 0x62, 0xfc, 0x96, + 0xe2, 0x08, 0x63, 0x29, 0xd6, 0x86, 0xe7, 0x1b, 0xb4, 0x18, 0x9d, 0x0c, 0x4f, 0x3c, 0x92, 0x63, + 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, + 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x0a, 0x5a, 0x32, 0x14, 0xa7, 0x64, 0xeb, 0x65, 0xe6, 0xeb, + 0x57, 0xc0, 0x8b, 0xa4, 0x24, 0x36, 0x70, 0x6e, 0x33, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x8d, + 0x04, 0xdd, 0xf4, 0xac, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -282,6 +374,10 @@ type MsgClient interface { // RevokeAllowance revokes any fee allowance of granter's account that // has been granted to the grantee. RevokeAllowance(ctx context.Context, in *MsgRevokeAllowance, opts ...grpc.CallOption) (*MsgRevokeAllowanceResponse, error) + // PruneAllowances prunes expired fee allowances, currently up to 75 at a time. + // + // Since cosmos-sdk 0.50 + PruneAllowances(ctx context.Context, in *MsgPruneAllowances, opts ...grpc.CallOption) (*MsgPruneAllowancesResponse, error) } type msgClient struct { @@ -310,6 +406,15 @@ func (c *msgClient) RevokeAllowance(ctx context.Context, in *MsgRevokeAllowance, return out, nil } +func (c *msgClient) PruneAllowances(ctx context.Context, in *MsgPruneAllowances, opts ...grpc.CallOption) (*MsgPruneAllowancesResponse, error) { + out := new(MsgPruneAllowancesResponse) + err := c.cc.Invoke(ctx, "/cosmos.feegrant.v1beta1.Msg/PruneAllowances", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // GrantAllowance grants fee allowance to the grantee on the granter's @@ -318,6 +423,10 @@ type MsgServer interface { // RevokeAllowance revokes any fee allowance of granter's account that // has been granted to the grantee. RevokeAllowance(context.Context, *MsgRevokeAllowance) (*MsgRevokeAllowanceResponse, error) + // PruneAllowances prunes expired fee allowances, currently up to 75 at a time. + // + // Since cosmos-sdk 0.50 + PruneAllowances(context.Context, *MsgPruneAllowances) (*MsgPruneAllowancesResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -330,6 +439,9 @@ func (*UnimplementedMsgServer) GrantAllowance(ctx context.Context, req *MsgGrant func (*UnimplementedMsgServer) RevokeAllowance(ctx context.Context, req *MsgRevokeAllowance) (*MsgRevokeAllowanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RevokeAllowance not implemented") } +func (*UnimplementedMsgServer) PruneAllowances(ctx context.Context, req *MsgPruneAllowances) (*MsgPruneAllowancesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PruneAllowances not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -371,6 +483,24 @@ func _Msg_RevokeAllowance_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Msg_PruneAllowances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgPruneAllowances) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).PruneAllowances(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.feegrant.v1beta1.Msg/PruneAllowances", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).PruneAllowances(ctx, req.(*MsgPruneAllowances)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.feegrant.v1beta1.Msg", HandlerType: (*MsgServer)(nil), @@ -383,6 +513,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "RevokeAllowance", Handler: _Msg_RevokeAllowance_Handler, }, + { + MethodName: "PruneAllowances", + Handler: _Msg_PruneAllowances_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/feegrant/v1beta1/tx.proto", @@ -520,6 +654,59 @@ func (m *MsgRevokeAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } +func (m *MsgPruneAllowances) 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 *MsgPruneAllowances) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgPruneAllowances) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Pruner) > 0 { + i -= len(m.Pruner) + copy(dAtA[i:], m.Pruner) + i = encodeVarintTx(dAtA, i, uint64(len(m.Pruner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgPruneAllowancesResponse) 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 *MsgPruneAllowancesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgPruneAllowancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -587,6 +774,28 @@ func (m *MsgRevokeAllowanceResponse) Size() (n int) { return n } +func (m *MsgPruneAllowances) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Pruner) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgPruneAllowancesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -957,6 +1166,138 @@ func (m *MsgRevokeAllowanceResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgPruneAllowances) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgPruneAllowances: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgPruneAllowances: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pruner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pruner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgPruneAllowancesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgPruneAllowancesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgPruneAllowancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/genutil/README.md b/x/genutil/README.md index c534b8b0d7ac..45cb45355b86 100644 --- a/x/genutil/README.md +++ b/x/genutil/README.md @@ -2,16 +2,36 @@ ## Concepts -The `genutil` package contains a variaety of genesis utility functionalities for usage within a blockchain application. Namely: +The `genutil` package contains a variety of genesis utility functionalities for usage within a blockchain application. Namely: * Genesis transactions related (gentx) * Commands for collection and creation of gentxs * `InitChain` processing of gentxs +* Genesis file creation * Genesis file validation * Genesis file migration * CometBFT related initialization * Translation of an app genesis to a CometBFT genesis +## Genesis + +Genutil contains the data structure that defines an application genesis. +An application genesis consist of a consensus genesis (g.e. CometBFT genesis) and application related genesis data. + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-rc.0/x/genutil/types/genesis.go#L24-L34 +``` + +The application genesis can then be translated to the consensus engine to the right format: + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-rc.0/x/genutil/types/genesis.go#L126-L136 +``` + +```go reference +https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-rc.0/server/start.go#L397-L407 +``` + ## Client ### CLI diff --git a/x/genutil/client/cli/collect.go b/x/genutil/client/cli/collect.go index fc001d391fdd..5502445960d7 100644 --- a/x/genutil/client/cli/collect.go +++ b/x/genutil/client/cli/collect.go @@ -4,11 +4,13 @@ import ( "encoding/json" "path/filepath" - "cosmossdk.io/errors" "github.com/spf13/cobra" + "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/x/genutil" "github.com/cosmos/cosmos-sdk/x/genutil/types" @@ -17,7 +19,7 @@ import ( const flagGenTxDir = "gentx-dir" // CollectGenTxsCmd - return the cobra command to collect genesis transactions -func CollectGenTxsCmd(genBalIterator types.GenesisBalancesIterator, defaultNodeHome string, validator types.MessageValidator) *cobra.Command { +func CollectGenTxsCmd(genBalIterator types.GenesisBalancesIterator, defaultNodeHome string, validator types.MessageValidator, valAddrCodec runtime.ValidatorAddressCodec) *cobra.Command { cmd := &cobra.Command{ Use: "collect-gentxs", Short: "Collect genesis txs and output a genesis.json file", @@ -49,7 +51,7 @@ func CollectGenTxsCmd(genBalIterator types.GenesisBalancesIterator, defaultNodeH toPrint := newPrintInfo(config.Moniker, appGenesis.ChainID, nodeID, genTxsDir, json.RawMessage("")) initCfg := types.NewInitConfig(appGenesis.ChainID, genTxsDir, nodeID, valPubKey) - appMessage, err := genutil.GenAppStateFromConfig(cdc, clientCtx.TxConfig, config, initCfg, appGenesis, genBalIterator, validator) + appMessage, err := genutil.GenAppStateFromConfig(cdc, clientCtx.TxConfig, config, initCfg, appGenesis, genBalIterator, validator, valAddrCodec) if err != nil { return errors.Wrap(err, "failed to get genesis app state from config") } diff --git a/x/genutil/client/cli/commands.go b/x/genutil/client/cli/commands.go index 22d69dc6d17b..bd2a5f0503dd 100644 --- a/x/genutil/client/cli/commands.go +++ b/x/genutil/client/cli/commands.go @@ -1,13 +1,13 @@ package cli import ( + "github.com/spf13/cobra" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/types/module" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - - "github.com/spf13/cobra" ) // GenesisCoreCommand adds core sdk's sub-commands into genesis command. @@ -34,11 +34,12 @@ func CommandsWithCustomMigrationMap(txConfig client.TxConfig, moduleBasics modul gentxModule := moduleBasics[genutiltypes.ModuleName].(genutil.AppModuleBasic) cmd.AddCommand( - GenTxCmd(moduleBasics, txConfig, banktypes.GenesisBalancesIterator{}, defaultNodeHome), + GenTxCmd(moduleBasics, txConfig, banktypes.GenesisBalancesIterator{}, defaultNodeHome, txConfig.SigningContext().ValidatorAddressCodec()), MigrateGenesisCmd(migrationMap), - CollectGenTxsCmd(banktypes.GenesisBalancesIterator{}, defaultNodeHome, gentxModule.GenTxValidator), + CollectGenTxsCmd(banktypes.GenesisBalancesIterator{}, defaultNodeHome, gentxModule.GenTxValidator, txConfig.SigningContext().ValidatorAddressCodec()), ValidateGenesisCmd(moduleBasics), - AddGenesisAccountCmd(defaultNodeHome), + AddGenesisAccountCmd(defaultNodeHome, txConfig.SigningContext().AddressCodec()), + AddBulkGenesisAccountCmd(defaultNodeHome, txConfig.SigningContext().AddressCodec()), ) return cmd diff --git a/x/genutil/client/cli/genaccount.go b/x/genutil/client/cli/genaccount.go index 0bedc26a1ba6..ec0025f51493 100644 --- a/x/genutil/client/cli/genaccount.go +++ b/x/genutil/client/cli/genaccount.go @@ -2,10 +2,14 @@ package cli import ( "bufio" + "encoding/json" "fmt" + "os" "github.com/spf13/cobra" + address "cosmossdk.io/core/address" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/crypto/keyring" @@ -24,7 +28,7 @@ const ( // AddGenesisAccountCmd returns add-genesis-account cobra Command. // This command is provided as a default, applications are expected to provide their own command if custom genesis accounts are needed. -func AddGenesisAccountCmd(defaultNodeHome string) *cobra.Command { +func AddGenesisAccountCmd(defaultNodeHome string, addressCodec address.Codec) *cobra.Command { cmd := &cobra.Command{ Use: "add-genesis-account [address_or_key_name] [coin][,[coin]]", Short: "Add a genesis account to genesis.json", @@ -42,7 +46,7 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa config.SetRoot(clientCtx.HomeDir) var kr keyring.Keyring - addr, err := sdk.AccAddressFromBech32(args[0]) + addr, err := addressCodec.StringToBytes(args[0]) if err != nil { inBuf := bufio.NewReader(cmd.InOrStdin()) keyringBackend, _ := cmd.Flags().GetString(flags.FlagKeyringBackend) @@ -89,3 +93,68 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa return cmd } + +// AddBulkGenesisAccountCmd returns bulk-add-genesis-account cobra Command. +// This command is provided as a default, applications are expected to provide their own command if custom genesis accounts are needed. +func AddBulkGenesisAccountCmd(defaultNodeHome string, addressCodec address.Codec) *cobra.Command { + cmd := &cobra.Command{ + Use: "bulk-add-genesis-account [/file/path.json]", + Short: "Bulk add genesis accounts to genesis.json", + Example: `bulk-add-genesis-account accounts.json +where accounts.json is: +[ + { + "address": "cosmos139f7kncmglres2nf3h4hc4tade85ekfr8sulz5", + "coins": [ + { "denom": "umuon", "amount": "100000000" }, + { "denom": "stake", "amount": "200000000" } + ] + }, + { + "address": "cosmos1e0jnq2sun3dzjh8p2xq95kk0expwmd7shwjpfg", + "coins": [ + { "denom": "umuon", "amount": "500000000" } + ], + "vesting_amt": [ + { "denom": "umuon", "amount": "400000000" } + ], + "vesting_start": 1724711478, + "vesting_end": 1914013878 + } +] +`, + Long: `Add genesis accounts in bulk to genesis.json. The provided account must specify +the account address and a list of initial coins. The list of initial tokens must +contain valid denominations. Accounts may optionally be supplied with vesting parameters. +`, + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + serverCtx := server.GetServerContextFromCmd(cmd) + config := serverCtx.Config + + config.SetRoot(clientCtx.HomeDir) + + f, err := os.Open(args[0]) + if err != nil { + return fmt.Errorf("failed to open file: %w", err) + } + defer f.Close() + + var accounts []genutil.GenesisAccount + if err := json.NewDecoder(f).Decode(&accounts); err != nil { + return fmt.Errorf("failed to decode JSON: %w", err) + } + + appendflag, _ := cmd.Flags().GetBool(flagAppendMode) + + return genutil.AddGenesisAccounts(clientCtx.Codec, addressCodec, accounts, appendflag, config.GenesisFile()) + }, + } + + cmd.Flags().Bool(flagAppendMode, false, "append the coins to an account already in the genesis.json file") + cmd.Flags().String(flags.FlagHome, defaultNodeHome, "The application home directory") + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/genutil/client/cli/genaccount_test.go b/x/genutil/client/cli/genaccount_test.go index 3de35946d7e6..c3a99bd9731d 100644 --- a/x/genutil/client/cli/genaccount_test.go +++ b/x/genutil/client/cli/genaccount_test.go @@ -2,15 +2,20 @@ package cli_test import ( "context" + "encoding/json" "fmt" + "os" + "path" "testing" "github.com/spf13/viper" "github.com/stretchr/testify/require" "cosmossdk.io/log" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/server" @@ -18,8 +23,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/auth" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + "github.com/cosmos/cosmos-sdk/x/genutil" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" genutiltest "github.com/cosmos/cosmos-sdk/x/genutil/client/testutil" + genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" ) func TestAddGenesisAccountCmd(t *testing.T) { @@ -89,7 +97,7 @@ func TestAddGenesisAccountCmd(t *testing.T) { ctx = context.WithValue(ctx, client.ClientContextKey, &clientCtx) ctx = context.WithValue(ctx, server.ServerContextKey, serverCtx) - cmd := genutilcli.AddGenesisAccountCmd(home) + cmd := genutilcli.AddGenesisAccountCmd(home, addresscodec.NewBech32Codec("cosmos")) cmd.SetArgs([]string{ tc.addr, tc.denom, @@ -104,3 +112,158 @@ func TestAddGenesisAccountCmd(t *testing.T) { }) } } + +func TestBulkAddGenesisAccountCmd(t *testing.T) { + _, _, addr1 := testdata.KeyTestPubAddr() + _, _, addr2 := testdata.KeyTestPubAddr() + _, _, addr3 := testdata.KeyTestPubAddr() + addr1Str := addr1.String() + addr2Str := addr2.String() + addr3Str := addr3.String() + + tests := []struct { + name string + state [][]genutil.GenesisAccount + expected map[string]sdk.Coins + appendFlag bool + expectErr bool + }{ + { + name: "invalid address", + state: [][]genutil.GenesisAccount{ + { + { + Address: "invalid", + Coins: sdk.NewCoins(sdk.NewInt64Coin("test", 1)), + }, + }, + }, + expectErr: true, + }, + { + name: "no append flag for multiple account adds", + state: [][]genutil.GenesisAccount{ + { + { + Address: addr1Str, + Coins: sdk.NewCoins(sdk.NewInt64Coin("test", 1)), + }, + }, + { + { + Address: addr1Str, + Coins: sdk.NewCoins(sdk.NewInt64Coin("test", 2)), + }, + }, + }, + appendFlag: false, + expectErr: true, + }, + + { + name: "multiple additions with append", + state: [][]genutil.GenesisAccount{ + { + { + Address: addr1Str, + Coins: sdk.NewCoins(sdk.NewInt64Coin("test", 1)), + }, + { + Address: addr2Str, + Coins: sdk.NewCoins(sdk.NewInt64Coin("test", 1)), + }, + }, + { + { + Address: addr1Str, + Coins: sdk.NewCoins(sdk.NewInt64Coin("test", 2)), + }, + { + Address: addr2Str, + Coins: sdk.NewCoins(sdk.NewInt64Coin("stake", 1)), + }, + { + Address: addr3Str, + Coins: sdk.NewCoins(sdk.NewInt64Coin("test", 1)), + }, + }, + }, + expected: map[string]sdk.Coins{ + addr1Str: sdk.NewCoins(sdk.NewInt64Coin("test", 3)), + addr2Str: sdk.NewCoins(sdk.NewInt64Coin("test", 1), sdk.NewInt64Coin("stake", 1)), + addr3Str: sdk.NewCoins(sdk.NewInt64Coin("test", 1)), + }, + appendFlag: true, + expectErr: false, + }, + } + + for _, tc := range tests { + tc := tc + t.Run(tc.name, func(t *testing.T) { + home := t.TempDir() + logger := log.NewNopLogger() + cfg, err := genutiltest.CreateDefaultCometConfig(home) + require.NoError(t, err) + + appCodec := moduletestutil.MakeTestEncodingConfig(auth.AppModuleBasic{}).Codec + err = genutiltest.ExecInitCmd(testMbm, home, appCodec) + require.NoError(t, err) + + serverCtx := server.NewContext(viper.New(), cfg, logger) + clientCtx := client.Context{}.WithCodec(appCodec).WithHomeDir(home) + + ctx := context.Background() + ctx = context.WithValue(ctx, client.ClientContextKey, &clientCtx) + ctx = context.WithValue(ctx, server.ServerContextKey, serverCtx) + + // The first iteration (pre-append) may not error. + // Check if any errors after all state transitions to genesis. + doesErr := false + + // apply multiple state iterations if applicable (e.g. --append) + for _, state := range tc.state { + bz, err := json.Marshal(state) + require.NoError(t, err) + + filePath := path.Join(home, "accounts.json") + err = os.WriteFile(filePath, bz, 0o600) + require.NoError(t, err) + + cmd := genutilcli.AddBulkGenesisAccountCmd(home, addresscodec.NewBech32Codec("cosmos")) + args := []string{filePath} + if tc.appendFlag { + args = append(args, "--append") + } + cmd.SetArgs(args) + + err = cmd.ExecuteContext(ctx) + if err != nil { + doesErr = true + } + } + require.Equal(t, tc.expectErr, doesErr) + + // an error already occurred, no need to check the state + if doesErr { + return + } + + appState, _, err := genutiltypes.GenesisStateFromGenFile(path.Join(home, "config", "genesis.json")) + require.NoError(t, err) + + bankState := banktypes.GetGenesisStateFromAppState(appCodec, appState) + + require.EqualValues(t, len(tc.expected), len(bankState.Balances)) + for _, acc := range bankState.Balances { + require.True(t, tc.expected[acc.Address].Equal(acc.Coins), "expected: %v, got: %v", tc.expected[acc.Address], acc.Coins) + } + + expectedSupply := sdk.NewCoins() + for _, coins := range tc.expected { + expectedSupply = expectedSupply.Add(coins...) + } + require.Equal(t, expectedSupply, bankState.Supply) + }) + } +} diff --git a/x/genutil/client/cli/gentx.go b/x/genutil/client/cli/gentx.go index ed7c659ad1c4..7c5ee6f7f9a7 100644 --- a/x/genutil/client/cli/gentx.go +++ b/x/genutil/client/cli/gentx.go @@ -9,9 +9,11 @@ import ( "os" "path/filepath" - "cosmossdk.io/errors" "github.com/spf13/cobra" + address "cosmossdk.io/core/address" + "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" @@ -27,7 +29,7 @@ import ( ) // GenTxCmd builds the application's gentx command. -func GenTxCmd(mbm module.BasicManager, txEncCfg client.TxEncodingConfig, genBalIterator types.GenesisBalancesIterator, defaultNodeHome string) *cobra.Command { +func GenTxCmd(mbm module.BasicManager, txEncCfg client.TxEncodingConfig, genBalIterator types.GenesisBalancesIterator, defaultNodeHome string, valAdddressCodec address.Codec) *cobra.Command { ipDefault, _ := server.ExternalIP() fsCreateValidator, defaultsDesc := cli.CreateValidatorMsgFlagSet(ipDefault) @@ -36,7 +38,7 @@ func GenTxCmd(mbm module.BasicManager, txEncCfg client.TxEncodingConfig, genBalI Short: "Generate a genesis tx carrying a self delegation", Args: cobra.ExactArgs(2), Long: fmt.Sprintf(`Generate a genesis transaction that creates a validator with a self-delegation, -that is signed by the key in the Keyring referenced by a given name. A node ID and Bech32 consensus +that is signed by the key in the Keyring referenced by a given name. A node ID and consensus pubkey may optionally be provided. If they are omitted, they will be retrieved from the priv_validator.json file. The following default parameters are included: %s @@ -152,7 +154,7 @@ $ %s gentx my-key-name 1000000stake --home=/path/to/home/dir --keyring-backend=o createValCfg.Amount = amount // create a 'create-validator' message - txBldr, msg, err := cli.BuildCreateValidatorMsg(clientCtx, createValCfg, txFactory, true) + txBldr, msg, err := cli.BuildCreateValidatorMsg(clientCtx, createValCfg, txFactory, true, valAdddressCodec) if err != nil { return errors.Wrap(err, "failed to build create-validator message") } @@ -214,6 +216,7 @@ $ %s gentx my-key-name 1000000stake --home=/path/to/home/dir --keyring-backend=o cmd.Flags().String(flags.FlagOutputDocument, "", "Write the genesis transaction JSON document to the given file instead of the default location") cmd.Flags().AddFlagSet(fsCreateValidator) flags.AddTxFlagsToCmd(cmd) + _ = cmd.Flags().MarkHidden(flags.FlagOutput) // signing makes sense to output only json return cmd } diff --git a/x/genutil/client/cli/gentx_test.go b/x/genutil/client/cli/gentx_test.go index c3fa2e63d68f..1f7ffeabce5a 100644 --- a/x/genutil/client/cli/gentx_test.go +++ b/x/genutil/client/cli/gentx_test.go @@ -7,13 +7,15 @@ import ( "path/filepath" "testing" - sdkmath "cosmossdk.io/math" abci "github.com/cometbft/cometbft/abci/types" rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" "github.com/stretchr/testify/suite" + sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/crypto/keyring" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" @@ -126,6 +128,7 @@ func (s *CLITestSuite) TestGenTxCmd() { clientCtx.TxConfig, banktypes.GenesisBalancesIterator{}, clientCtx.HomeDir, + address.NewBech32Codec("cosmosvaloper"), ) cmd.SetContext(ctx) cmd.SetArgs(tc.args) diff --git a/x/genutil/client/cli/init.go b/x/genutil/client/cli/init.go index 37eda3cc719d..0461713a0e16 100644 --- a/x/genutil/client/cli/init.go +++ b/x/genutil/client/cli/init.go @@ -8,12 +8,13 @@ import ( "os" "path/filepath" - errorsmod "cosmossdk.io/errors" - "cosmossdk.io/math/unsafe" cfg "github.com/cometbft/cometbft/config" "github.com/cosmos/go-bip39" "github.com/spf13/cobra" + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/math/unsafe" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/input" @@ -60,7 +61,7 @@ func displayInfo(info printInfo) error { return err } - _, err = fmt.Fprintf(os.Stderr, "%s\n", sdk.MustSortJSON(out)) + _, err = fmt.Fprintf(os.Stderr, "%s\n", out) return err } diff --git a/x/genutil/client/cli/init_test.go b/x/genutil/client/cli/init_test.go index d325a7c72eef..7ce1d29a4323 100644 --- a/x/genutil/client/cli/init_test.go +++ b/x/genutil/client/cli/init_test.go @@ -14,6 +14,7 @@ import ( "github.com/stretchr/testify/require" "cosmossdk.io/log" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec" diff --git a/x/genutil/client/cli/migrate.go b/x/genutil/client/cli/migrate.go index 56c8d3638335..869995efc8c7 100644 --- a/x/genutil/client/cli/migrate.go +++ b/x/genutil/client/cli/migrate.go @@ -36,85 +36,10 @@ func MigrateGenesisCmd(migrations types.MigrationMap) *cobra.Command { Use: "migrate [target-version] [genesis-file]", Short: "Migrate genesis to a specified target version", Long: "Migrate the source genesis into the target version and print to STDOUT", - Example: fmt.Sprintf("%s migrate v0.47 /path/to/genesis.json --chain-id=cosmoshub-3 --genesis-time=2019-04-22T17:00:00Z", version.AppName), + Example: fmt.Sprintf("%s genesis migrate v0.47 /path/to/genesis.json --chain-id=cosmoshub-3 --genesis-time=2019-04-22T17:00:00Z", version.AppName), Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - - target := args[0] - migrationFunc, ok := migrations[target] - if !ok || migrationFunc == nil { - versions := maps.Keys(migrations) - sort.Strings(versions) - return fmt.Errorf("unknown migration function for version: %s (supported versions %s)", target, strings.Join(versions, ", ")) - } - - importGenesis := args[1] - appGenesis, err := types.AppGenesisFromFile(importGenesis) - if err != nil { - return err - } - - if err := appGenesis.ValidateAndComplete(); err != nil { - return fmt.Errorf("make sure that you have correctly migrated all CometBFT consensus params. Refer the UPGRADING.md (%s): %w", chainUpgradeGuide, err) - } - - // Since some default values are valid values, we just print to - // make sure the user didn't forget to update these values. - if appGenesis.Consensus.Params.Evidence.MaxBytes == 0 { - fmt.Printf("Warning: consensus.params.evidence.max_bytes is set to 0. If this is"+ - " deliberate, feel free to ignore this warning. If not, please have a look at the chain"+ - " upgrade guide at %s.\n", chainUpgradeGuide) - } - - var initialState types.AppMap - if err := json.Unmarshal(appGenesis.AppState, &initialState); err != nil { - return fmt.Errorf("failed to JSON unmarshal initial genesis state: %w", err) - } - - newGenState, err := migrationFunc(initialState, clientCtx) - if err != nil { - return fmt.Errorf("failed to migrate genesis state: %w", err) - } - - appGenesis.AppState, err = json.Marshal(newGenState) - if err != nil { - return fmt.Errorf("failed to JSON marshal migrated genesis state: %w", err) - } - - genesisTime, _ := cmd.Flags().GetString(flagGenesisTime) - if genesisTime != "" { - var t time.Time - - err := t.UnmarshalText([]byte(genesisTime)) - if err != nil { - return fmt.Errorf("failed to unmarshal genesis time: %w", err) - } - - appGenesis.GenesisTime = t - } - - chainID, _ := cmd.Flags().GetString(flags.FlagChainID) - if chainID != "" { - appGenesis.ChainID = chainID - } - - bz, err := json.Marshal(appGenesis) - if err != nil { - return fmt.Errorf("failed to marshal app genesis: %w", err) - } - - outputDocument, _ := cmd.Flags().GetString(flags.FlagOutputDocument) - if outputDocument == "" { - cmd.Println(string(bz)) - return nil - } - - if err = appGenesis.SaveAs(outputDocument); err != nil { - return err - } - - return nil + return MigrateHandler(cmd, args, migrations) }, } @@ -124,3 +49,84 @@ func MigrateGenesisCmd(migrations types.MigrationMap) *cobra.Command { return cmd } + +// MigrateHandler handles the migration command with a migration map as input, +// returning an error upon failure. +func MigrateHandler(cmd *cobra.Command, args []string, migrations types.MigrationMap) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + target := args[0] + migrationFunc, ok := migrations[target] + if !ok || migrationFunc == nil { + versions := maps.Keys(migrations) + sort.Strings(versions) + return fmt.Errorf("unknown migration function for version: %s (supported versions %s)", target, strings.Join(versions, ", ")) + } + + importGenesis := args[1] + appGenesis, err := types.AppGenesisFromFile(importGenesis) + if err != nil { + return err + } + + if err := appGenesis.ValidateAndComplete(); err != nil { + return fmt.Errorf("make sure that you have correctly migrated all CometBFT consensus params. Refer the UPGRADING.md (%s): %w", chainUpgradeGuide, err) + } + + // Since some default values are valid values, we just print to + // make sure the user didn't forget to update these values. + if appGenesis.Consensus.Params.Evidence.MaxBytes == 0 { + fmt.Printf("Warning: consensus.params.evidence.max_bytes is set to 0. If this is"+ + " deliberate, feel free to ignore this warning. If not, please have a look at the chain"+ + " upgrade guide at %s.\n", chainUpgradeGuide) + } + + var initialState types.AppMap + if err := json.Unmarshal(appGenesis.AppState, &initialState); err != nil { + return fmt.Errorf("failed to JSON unmarshal initial genesis state: %w", err) + } + + newGenState, err := migrationFunc(initialState, clientCtx) + if err != nil { + return fmt.Errorf("failed to migrate genesis state: %w", err) + } + + appGenesis.AppState, err = json.Marshal(newGenState) + if err != nil { + return fmt.Errorf("failed to JSON marshal migrated genesis state: %w", err) + } + + genesisTime, _ := cmd.Flags().GetString(flagGenesisTime) + if genesisTime != "" { + var t time.Time + + err := t.UnmarshalText([]byte(genesisTime)) + if err != nil { + return fmt.Errorf("failed to unmarshal genesis time: %w", err) + } + + appGenesis.GenesisTime = t + } + + chainID, _ := cmd.Flags().GetString(flags.FlagChainID) + if chainID != "" { + appGenesis.ChainID = chainID + } + + bz, err := json.Marshal(appGenesis) + if err != nil { + return fmt.Errorf("failed to marshal app genesis: %w", err) + } + + outputDocument, _ := cmd.Flags().GetString(flags.FlagOutputDocument) + if outputDocument == "" { + cmd.Println(string(bz)) + return nil + } + + if err = appGenesis.SaveAs(outputDocument); err != nil { + return err + } + + return nil +} diff --git a/x/genutil/client/cli/validate_genesis.go b/x/genutil/client/cli/validate_genesis.go index f3a57320ac16..94e9a3a04c31 100644 --- a/x/genutil/client/cli/validate_genesis.go +++ b/x/genutil/client/cli/validate_genesis.go @@ -2,7 +2,10 @@ package cli import ( "encoding/json" + "errors" "fmt" + "io" + "strings" "github.com/spf13/cobra" @@ -37,7 +40,7 @@ func ValidateGenesisCmd(mbm module.BasicManager) *cobra.Command { appGenesis, err := types.AppGenesisFromFile(genesis) if err != nil { - return err + return enrichUnmarshalError(err) } if err := appGenesis.ValidateAndComplete(); err != nil { @@ -45,12 +48,19 @@ func ValidateGenesisCmd(mbm module.BasicManager) *cobra.Command { } var genState map[string]json.RawMessage - if err = json.Unmarshal(appGenesis.AppState, &genState); err != nil { - return fmt.Errorf("error unmarshalling genesis doc %s: %s", genesis, err.Error()) + if err := json.Unmarshal(appGenesis.AppState, &genState); err != nil { + if strings.Contains(err.Error(), "unexpected end of JSON input") { + return fmt.Errorf("app_state is missing in the genesis file: %s", err.Error()) + } + return fmt.Errorf("error unmarshalling genesis doc %s: %w", genesis, err) } if err = mbm.ValidateGenesis(cdc, clientCtx.TxConfig, genState); err != nil { - return fmt.Errorf("error validating genesis file %s: %s", genesis, err.Error()) + errStr := fmt.Sprintf("error validating genesis file %s: %s", genesis, err.Error()) + if errors.Is(err, io.EOF) { + errStr = fmt.Sprintf("%s: section is missing in the app_state", errStr) + } + return fmt.Errorf("%s", errStr) } fmt.Fprintf(cmd.OutOrStdout(), "File at %s is a valid genesis file\n", genesis) @@ -58,3 +68,11 @@ func ValidateGenesisCmd(mbm module.BasicManager) *cobra.Command { }, } } + +func enrichUnmarshalError(err error) error { + var syntaxErr *json.SyntaxError + if errors.As(err, &syntaxErr) { + return fmt.Errorf("error at offset %d: %s", syntaxErr.Offset, syntaxErr.Error()) + } + return err +} diff --git a/x/genutil/client/cli/validate_genesis_test.go b/x/genutil/client/cli/validate_genesis_test.go index 140f72def21d..fba0338660cc 100644 --- a/x/genutil/client/cli/validate_genesis_test.go +++ b/x/genutil/client/cli/validate_genesis_test.go @@ -1,14 +1,20 @@ package cli_test import ( + "encoding/json" + "fmt" + "io" "os" "testing" + "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/testutil" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" + "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" - "github.com/stretchr/testify/require" ) // An example exported genesis file from a 0.37 chain. Note that evidence @@ -32,14 +38,33 @@ var v037Exported = `{ func TestValidateGenesis(t *testing.T) { testCases := []struct { - name string - genesis string - expErr bool + name string + genesis string + expErrStr string + basicManager module.BasicManager }{ + { + "invalid json", + `{"app_state": {x,}}`, + "error at offset 16: invalid character", + module.NewBasicManager(), + }, + { + "invalid: missing module config in app_state", + func() string { + bz, err := os.ReadFile("../../types/testdata/app_genesis.json") + require.NoError(t, err) + + return string(bz) + }(), + "section is missing in the app_state", + module.NewBasicManager(mockModule{}), + }, { "exported 0.37 genesis file", v037Exported, - true, + "make sure that you have correctly migrated all CometBFT consensus params", + module.NewBasicManager(), }, { "valid 0.50 genesis file", @@ -49,7 +74,8 @@ func TestValidateGenesis(t *testing.T) { return string(bz) }(), - false, + "", + module.NewBasicManager(), }, } @@ -58,12 +84,30 @@ func TestValidateGenesis(t *testing.T) { t.Run(tc.name, func(t *testing.T) { genesisFile := testutil.WriteToNewTempFile(t, tc.genesis) - _, err := clitestutil.ExecTestCLICmd(client.Context{}, cli.ValidateGenesisCmd(nil), []string{genesisFile.Name()}) - if tc.expErr { - require.Contains(t, err.Error(), "make sure that you have correctly migrated all CometBFT consensus params") + _, err := clitestutil.ExecTestCLICmd(client.Context{}, cli.ValidateGenesisCmd(tc.basicManager), []string{genesisFile.Name()}) + if tc.expErrStr != "" { + require.Contains(t, err.Error(), tc.expErrStr) } else { require.NoError(t, err) } }) } } + +var _ module.HasGenesisBasics = mockModule{} + +type mockModule struct { + module.AppModuleBasic +} + +func (m mockModule) Name() string { + return "mock" +} + +func (m mockModule) DefaultGenesis(codec.JSONCodec) json.RawMessage { + return json.RawMessage(`{"foo": "bar"}`) +} + +func (m mockModule) ValidateGenesis(codec.JSONCodec, client.TxEncodingConfig, json.RawMessage) error { + return fmt.Errorf("mock section is missing: %w", io.EOF) +} diff --git a/x/genutil/collect.go b/x/genutil/collect.go index d7fbf38dcdbb..422a278b5af3 100644 --- a/x/genutil/collect.go +++ b/x/genutil/collect.go @@ -14,6 +14,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" + sdkruntime "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" bankexported "github.com/cosmos/cosmos-sdk/x/bank/exported" "github.com/cosmos/cosmos-sdk/x/genutil/types" @@ -23,11 +24,11 @@ import ( // GenAppStateFromConfig gets the genesis app state from the config func GenAppStateFromConfig(cdc codec.JSONCodec, txEncodingConfig client.TxEncodingConfig, config *cfg.Config, initCfg types.InitConfig, genesis *types.AppGenesis, genBalIterator types.GenesisBalancesIterator, - validator types.MessageValidator, + validator types.MessageValidator, valAddrCodec sdkruntime.ValidatorAddressCodec, ) (appState json.RawMessage, err error) { // process genesis transactions, else create default genesis.json appGenTxs, persistentPeers, err := CollectTxs( - cdc, txEncodingConfig.TxJSONDecoder(), config.Moniker, initCfg.GenTxsDir, genesis, genBalIterator, validator) + cdc, txEncodingConfig.TxJSONDecoder(), config.Moniker, initCfg.GenTxsDir, genesis, genBalIterator, validator, valAddrCodec) if err != nil { return appState, err } @@ -66,7 +67,7 @@ func GenAppStateFromConfig(cdc codec.JSONCodec, txEncodingConfig client.TxEncodi // the list of appGenTxs, and persistent peers required to generate genesis.json. func CollectTxs(cdc codec.JSONCodec, txJSONDecoder sdk.TxDecoder, moniker, genTxsDir string, genesis *types.AppGenesis, genBalIterator types.GenesisBalancesIterator, - validator types.MessageValidator, + validator types.MessageValidator, valAddrCodec sdkruntime.ValidatorAddressCodec, ) (appGenTxs []sdk.Tx, persistentPeers string, err error) { // prepare a map of all balances in genesis state to then validate // against the validators addresses @@ -133,7 +134,7 @@ func CollectTxs(cdc codec.JSONCodec, txJSONDecoder sdk.TxDecoder, moniker, genTx msg := msgs[0].(*stakingtypes.MsgCreateValidator) // validate validator addresses and funds against the accounts in the state - valAddr, err := sdk.ValAddressFromBech32(msg.ValidatorAddress) + valAddr, err := valAddrCodec.StringToBytes(msg.ValidatorAddress) if err != nil { return appGenTxs, persistentPeers, err } diff --git a/x/genutil/collect_test.go b/x/genutil/collect_test.go index 3f0a32a07915..fa18cd6f5882 100644 --- a/x/genutil/collect_test.go +++ b/x/genutil/collect_test.go @@ -9,6 +9,7 @@ import ( "github.com/cosmos/gogoproto/proto" "github.com/cosmos/cosmos-sdk/codec" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/server" sdk "github.com/cosmos/cosmos-sdk/types" @@ -59,7 +60,8 @@ func TestCollectTxsHandlesDirectories(t *testing.T) { balItr := new(doNothingIterator) dnc := &doNothingUnmarshalJSON{cdc} - if _, _, err := genutil.CollectTxs(dnc, txDecoder, "foo", testDir, genesis, balItr, types.DefaultMessageValidator); err != nil { + if _, _, err := genutil.CollectTxs(dnc, txDecoder, "foo", testDir, genesis, balItr, types.DefaultMessageValidator, + addresscodec.NewBech32Codec("cosmosvaloper")); err != nil { t.Fatal(err) } } diff --git a/x/genutil/genaccounts.go b/x/genutil/genaccounts.go index 8e92ab61e9a9..e1b6075bc657 100644 --- a/x/genutil/genaccounts.go +++ b/x/genutil/genaccounts.go @@ -5,6 +5,8 @@ import ( "errors" "fmt" + "cosmossdk.io/core/address" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -45,7 +47,10 @@ func AddGenesisAccount( baseAccount := authtypes.NewBaseAccount(accAddr, nil, 0, 0) if !vestingAmt.IsZero() { - baseVestingAccount := authvesting.NewBaseVestingAccount(baseAccount, vestingAmt.Sort(), vestingEnd) + baseVestingAccount, err := authvesting.NewBaseVestingAccount(baseAccount, vestingAmt.Sort(), vestingEnd) + if err != nil { + return fmt.Errorf("failed to create base vesting account: %w", err) + } if (balances.Coins.IsZero() && !baseVestingAccount.OriginalVesting.IsZero()) || baseVestingAccount.OriginalVesting.IsAnyGT(balances.Coins) { @@ -138,3 +143,151 @@ func AddGenesisAccount( appGenesis.AppState = appStateJSON return ExportGenesisFile(appGenesis, genesisFileURL) } + +type GenesisAccount struct { + // Base + Address string `json:"address"` + Coins sdk.Coins `json:"coins"` + + // Vesting + VestingAmt sdk.Coins `json:"vesting_amt,omitempty"` + VestingStart int64 `json:"vesting_start,omitempty"` + VestingEnd int64 `json:"vesting_end,omitempty"` + + // Module + ModuleName string `json:"module_name,omitempty"` +} + +// AddGenesisAccounts adds genesis accounts to the genesis state. +// Where `cdc` is the client codec, `accounts` are the genesis accounts to add, +// `appendAcct` updates the account if already exists, and `genesisFileURL` is the path/url of the current genesis file. +func AddGenesisAccounts( + cdc codec.Codec, + ac address.Codec, + accounts []GenesisAccount, + appendAcct bool, + genesisFileURL string, +) error { + appState, appGenesis, err := genutiltypes.GenesisStateFromGenFile(genesisFileURL) + if err != nil { + return fmt.Errorf("failed to unmarshal genesis state: %w", err) + } + + authGenState := authtypes.GetGenesisStateFromAppState(cdc, appState) + bankGenState := banktypes.GetGenesisStateFromAppState(cdc, appState) + + accs, err := authtypes.UnpackAccounts(authGenState.Accounts) + if err != nil { + return fmt.Errorf("failed to get accounts from any: %w", err) + } + + newSupplyCoinsCache := sdk.NewCoins() + balanceCache := make(map[string]banktypes.Balance) + for _, acc := range accs { + for _, balance := range bankGenState.GetBalances() { + if balance.Address == acc.GetAddress().String() { + balanceCache[acc.GetAddress().String()] = balance + } + } + } + + for _, acc := range accounts { + addr := acc.Address + coins := acc.Coins + + accAddr, err := ac.StringToBytes(addr) + if err != nil { + return fmt.Errorf("failed to parse account address %s: %w", addr, err) + } + + // create concrete account type based on input parameters + var genAccount authtypes.GenesisAccount + + balances := banktypes.Balance{Address: addr, Coins: coins.Sort()} + baseAccount := authtypes.NewBaseAccount(accAddr, nil, 0, 0) + + vestingAmt := acc.VestingAmt + if !vestingAmt.IsZero() { + vestingStart := acc.VestingStart + vestingEnd := acc.VestingEnd + + baseVestingAccount, err := authvesting.NewBaseVestingAccount(baseAccount, vestingAmt.Sort(), vestingEnd) + if err != nil { + return fmt.Errorf("failed to create base vesting account: %w", err) + } + + if (balances.Coins.IsZero() && !baseVestingAccount.OriginalVesting.IsZero()) || + baseVestingAccount.OriginalVesting.IsAnyGT(balances.Coins) { + return errors.New("vesting amount cannot be greater than total amount") + } + + switch { + case vestingStart != 0 && vestingEnd != 0: + genAccount = authvesting.NewContinuousVestingAccountRaw(baseVestingAccount, vestingStart) + + case vestingEnd != 0: + genAccount = authvesting.NewDelayedVestingAccountRaw(baseVestingAccount) + + default: + return errors.New("invalid vesting parameters; must supply start and end time or end time") + } + } else if acc.ModuleName != "" { + genAccount = authtypes.NewEmptyModuleAccount(acc.ModuleName, authtypes.Burner, authtypes.Minter) + } else { + genAccount = baseAccount + } + + if err := genAccount.Validate(); err != nil { + return fmt.Errorf("failed to validate new genesis account: %w", err) + } + + if _, ok := balanceCache[addr]; ok { + if !appendAcct { + return fmt.Errorf(" Account %s already exists\nUse `append` flag to append account at existing address", accAddr) + } + + for idx, acc := range bankGenState.Balances { + if acc.Address != addr { + continue + } + + updatedCoins := acc.Coins.Add(coins...) + bankGenState.Balances[idx] = banktypes.Balance{Address: addr, Coins: updatedCoins.Sort()} + break + } + } else { + accs = append(accs, genAccount) + bankGenState.Balances = append(bankGenState.Balances, balances) + } + + newSupplyCoinsCache = newSupplyCoinsCache.Add(coins...) + } + + accs = authtypes.SanitizeGenesisAccounts(accs) + + authGenState.Accounts, err = authtypes.PackAccounts(accs) + if err != nil { + return fmt.Errorf("failed to convert accounts into any's: %w", err) + } + + appState[authtypes.ModuleName], err = cdc.MarshalJSON(&authGenState) + if err != nil { + return fmt.Errorf("failed to marshal auth genesis state: %w", err) + } + + bankGenState.Balances = banktypes.SanitizeGenesisBalances(bankGenState.Balances) + bankGenState.Supply = bankGenState.Supply.Add(newSupplyCoinsCache...) + + appState[banktypes.ModuleName], err = cdc.MarshalJSON(bankGenState) + if err != nil { + return fmt.Errorf("failed to marshal bank genesis state: %w", err) + } + + appStateJSON, err := json.Marshal(appState) + if err != nil { + return fmt.Errorf("failed to marshal application genesis state: %w", err) + } + + appGenesis.AppState = appStateJSON + return ExportGenesisFile(appGenesis, genesisFileURL) +} diff --git a/x/genutil/genesis.go b/x/genutil/genesis.go index 97f71bd36ac9..0f8f7d4867f2 100644 --- a/x/genutil/genesis.go +++ b/x/genutil/genesis.go @@ -1,9 +1,10 @@ package genutil import ( - "cosmossdk.io/core/genesis" abci "github.com/cometbft/cometbft/abci/types" + "cosmossdk.io/core/genesis" + "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/genutil/types" diff --git a/x/genutil/gentx.go b/x/genutil/gentx.go index c5021e0b709c..e861ecac3512 100644 --- a/x/genutil/gentx.go +++ b/x/genutil/gentx.go @@ -5,9 +5,10 @@ import ( "fmt" "strings" - "cosmossdk.io/core/genesis" abci "github.com/cometbft/cometbft/abci/types" + "cosmossdk.io/core/genesis" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/genutil/gentx_test.go b/x/genutil/gentx_test.go index c01e8e74fae6..e391e6b8973c 100644 --- a/x/genutil/gentx_test.go +++ b/x/genutil/gentx_test.go @@ -8,12 +8,12 @@ import ( "testing" "time" + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/suite" + "cosmossdk.io/core/genesis" "cosmossdk.io/math" - storetypes "cosmossdk.io/store/types" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/testutil" @@ -65,10 +65,10 @@ func (suite *GenTxTestSuite) SetupTest() { amount := sdk.NewInt64Coin(sdk.DefaultBondDenom, 50) one := math.OneInt() suite.msg1, err = stakingtypes.NewMsgCreateValidator( - sdk.ValAddress(pk1.Address()), pk1, amount, desc, comm, one) + sdk.ValAddress(pk1.Address()).String(), pk1, amount, desc, comm, one) suite.NoError(err) suite.msg2, err = stakingtypes.NewMsgCreateValidator( - sdk.ValAddress(pk2.Address()), pk1, amount, desc, comm, one) + sdk.ValAddress(pk2.Address()).String(), pk1, amount, desc, comm, one) suite.NoError(err) } diff --git a/x/genutil/module.go b/x/genutil/module.go index 71cc30369bed..5d3337ba24ab 100644 --- a/x/genutil/module.go +++ b/x/genutil/module.go @@ -6,12 +6,10 @@ import ( abci "github.com/cometbft/cometbft/abci/types" gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/spf13/cobra" modulev1 "cosmossdk.io/api/cosmos/genutil/module/v1" "cosmossdk.io/core/appmodule" "cosmossdk.io/core/genesis" - "cosmossdk.io/depinject" "github.com/cosmos/cosmos-sdk/client" @@ -23,8 +21,10 @@ import ( ) var ( - _ module.AppModuleGenesis = AppModule{} - _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModuleBasic = AppModule{} + _ module.HasABCIGenesis = AppModule{} + + _ appmodule.AppModule = AppModule{} ) // AppModuleBasic defines the basic application module used by the genutil module. @@ -47,7 +47,7 @@ func (AppModuleBasic) Name() string { func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {} // RegisterInterfaces registers the module's interface types -func (b AppModuleBasic) RegisterInterfaces(_ cdctypes.InterfaceRegistry) {} +func (b AppModuleBasic) RegisterInterfaces(cdctypes.InterfaceRegistry) {} // DefaultGenesis returns default genesis state as raw bytes for the genutil // module. @@ -69,12 +69,6 @@ func (b AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, txEncodingConfig cl func (AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *gwruntime.ServeMux) { } -// GetTxCmd returns no root tx command for the genutil module. -func (AppModuleBasic) GetTxCmd() *cobra.Command { return nil } - -// GetQueryCmd returns no root query command for the genutil module. -func (AppModuleBasic) GetQueryCmd() *cobra.Command { return nil } - // AppModule implements an application module for the genutil module. type AppModule struct { AppModuleBasic @@ -99,8 +93,6 @@ func NewAppModule(accountKeeper types.AccountKeeper, }) } -var _ appmodule.AppModule = AppModule{} - // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (AppModule) IsOnePerModuleType() {} diff --git a/x/genutil/testutil/expected_keepers_mocks.go b/x/genutil/testutil/expected_keepers_mocks.go index 1b33fb0d3092..434c83bacaaa 100644 --- a/x/genutil/testutil/expected_keepers_mocks.go +++ b/x/genutil/testutil/expected_keepers_mocks.go @@ -40,7 +40,7 @@ func (m *MockStakingKeeper) EXPECT() *MockStakingKeeperMockRecorder { } // ApplyAndReturnValidatorSetUpdates mocks base method. -func (m *MockStakingKeeper) ApplyAndReturnValidatorSetUpdates(arg0 types0.Context) ([]types.ValidatorUpdate, error) { +func (m *MockStakingKeeper) ApplyAndReturnValidatorSetUpdates(arg0 context.Context) ([]types.ValidatorUpdate, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ApplyAndReturnValidatorSetUpdates", arg0) ret0, _ := ret[0].([]types.ValidatorUpdate) diff --git a/x/genutil/types/chain_id.go b/x/genutil/types/chain_id.go new file mode 100644 index 000000000000..1d991a9f1416 --- /dev/null +++ b/x/genutil/types/chain_id.go @@ -0,0 +1,69 @@ +package types + +import ( + "encoding/json" + "errors" + "fmt" + "io" + "strings" + + "github.com/cometbft/cometbft/types" +) + +const ChainIDFieldName = "chain_id" + +// ParseChainIDFromGenesis parses the `chain_id` from a genesis JSON file, aborting early after finding the `chain_id`. +// For efficiency, it's recommended to place the `chain_id` field before any large entries in the JSON file. +// Returns an error if the `chain_id` field is not found. +func ParseChainIDFromGenesis(r io.Reader) (string, error) { + dec := json.NewDecoder(r) + + t, err := dec.Token() + if err != nil { + return "", err + } + if t != json.Delim('{') { + return "", fmt.Errorf("expected {, got %s", t) + } + + for dec.More() { + t, err = dec.Token() + if err != nil { + return "", err + } + key, ok := t.(string) + if !ok { + return "", fmt.Errorf("expected string for the key type, got %s", t) + } + + if key == ChainIDFieldName { + var chainID string + if err := dec.Decode(&chainID); err != nil { + return "", err + } + if err := validateChainID(chainID); err != nil { + return "", err + } + return chainID, nil + } + + // skip the value + var value json.RawMessage + if err := dec.Decode(&value); err != nil { + return "", err + } + } + + return "", errors.New("missing chain-id in genesis file") +} + +func validateChainID(chainID string) error { + if strings.TrimSpace(chainID) == "" { + return errors.New("genesis doc must include non-empty chain_id") + } + if len(chainID) > types.MaxChainIDLen { + return fmt.Errorf("chain_id in genesis doc is too long (max: %d)", types.MaxChainIDLen) + } + + return nil +} diff --git a/x/genutil/types/chain_id_test.go b/x/genutil/types/chain_id_test.go new file mode 100644 index 000000000000..46441e820a9e --- /dev/null +++ b/x/genutil/types/chain_id_test.go @@ -0,0 +1,130 @@ +package types_test + +import ( + _ "embed" + "strings" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/x/genutil/types" +) + +//go:embed testdata/parse_chain_id.json +var BenchmarkGenesis string + +func TestParseChainIDFromGenesis(t *testing.T) { + testCases := []struct { + name string + json string + expChainID string + expError string + }{ + { + "success", + `{ + "state": { + "accounts": { + "a": {} + } + }, + "chain_id": "test-chain-id" + }`, + "test-chain-id", + "", + }, + { + "nested", + `{ + "state": { + "accounts": { + "a": {} + }, + "chain_id": "test-chain-id" + } + }`, + "", + "missing chain-id in genesis file", + }, + { + "not exist", + `{ + "state": { + "accounts": { + "a": {} + } + }, + "chain-id": "test-chain-id" + }`, + "", + "missing chain-id in genesis file", + }, + { + "invalid type", + `{ + "chain-id": 1, + }`, + "", + "invalid character '}' looking for beginning of object key string", + }, + { + "invalid json", + `[ " ': }`, + "", + "expected {, got [", + }, + { + "empty chain_id", + `{"chain_id": ""}`, + "", + "genesis doc must include non-empty chain_id", + }, + { + "whitespace chain_id", + `{"chain_id": " "}`, + "", + "genesis doc must include non-empty chain_id", + }, + { + "chain_id too long", + `{"chain_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}`, + "", + "chain_id in genesis doc is too long", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + chainID, err := types.ParseChainIDFromGenesis(strings.NewReader(tc.json)) + if tc.expChainID == "" { + require.Error(t, err) + require.Contains(t, err.Error(), tc.expError) + } else { + require.NoError(t, err) + require.Equal(t, tc.expChainID, chainID) + } + }) + } +} + +func BenchmarkParseChainID(b *testing.B) { + expChainID := "cronosmainnet_25-1" + b.ReportAllocs() + b.Run("new", func(b *testing.B) { + b.ResetTimer() + for i := 0; i < b.N; i++ { + chainID, err := types.ParseChainIDFromGenesis(strings.NewReader(BenchmarkGenesis)) + require.NoError(b, err) + require.Equal(b, expChainID, chainID) + } + }) + + b.Run("old", func(b *testing.B) { + b.ResetTimer() + for i := 0; i < b.N; i++ { + doc, err := types.AppGenesisFromReader(strings.NewReader(BenchmarkGenesis)) + require.NoError(b, err) + require.Equal(b, expChainID, doc.ChainID) + } + }) +} diff --git a/x/genutil/types/expected_keepers.go b/x/genutil/types/expected_keepers.go index 634109a7e1e5..3cffa44409ba 100644 --- a/x/genutil/types/expected_keepers.go +++ b/x/genutil/types/expected_keepers.go @@ -13,7 +13,7 @@ import ( // StakingKeeper defines the expected staking keeper (noalias) type StakingKeeper interface { - ApplyAndReturnValidatorSetUpdates(sdk.Context) (updates []abci.ValidatorUpdate, err error) + ApplyAndReturnValidatorSetUpdates(context.Context) (updates []abci.ValidatorUpdate, err error) } // AccountKeeper defines the expected account keeper (noalias) diff --git a/x/genutil/types/genesis.go b/x/genutil/types/genesis.go index 8b9d55a72b2f..3c322fa086fd 100644 --- a/x/genutil/types/genesis.go +++ b/x/genutil/types/genesis.go @@ -1,11 +1,14 @@ package types import ( + "bufio" "bytes" "encoding/json" "errors" "fmt" + "io" "os" + "path/filepath" "time" cmtjson "github.com/cometbft/cometbft/libs/json" @@ -85,11 +88,11 @@ func (ag *AppGenesis) SaveAs(file string) error { return os.WriteFile(file, appGenesisBytes, 0o600) } -// AppGenesisFromFile reads the AppGenesis from the provided file. -func AppGenesisFromFile(genFile string) (*AppGenesis, error) { - jsonBlob, err := os.ReadFile(genFile) +// AppGenesisFromReader reads the AppGenesis from the reader. +func AppGenesisFromReader(reader io.Reader) (*AppGenesis, error) { + jsonBlob, err := io.ReadAll(reader) if err != nil { - return nil, fmt.Errorf("couldn't read AppGenesis file (%s): %w", genFile, err) + return nil, err } var appGenesis AppGenesis @@ -97,10 +100,12 @@ func AppGenesisFromFile(genFile string) (*AppGenesis, error) { // fallback to CometBFT genesis var ctmGenesis cmttypes.GenesisDoc if err2 := cmtjson.Unmarshal(jsonBlob, &ctmGenesis); err2 != nil { - return nil, fmt.Errorf("error unmarshalling AppGenesis at %s: %w\n failed fallback to CometBFT GenDoc: %w", genFile, err, err2) + return nil, fmt.Errorf("error unmarshalling AppGenesis: %w\n failed fallback to CometBFT GenDoc: %w", err, err2) } appGenesis = AppGenesis{ + AppName: version.AppName, + // AppVersion is not filled as we do not know it from a CometBFT genesis GenesisTime: ctmGenesis.GenesisTime, ChainID: ctmGenesis.ChainID, InitialHeight: ctmGenesis.InitialHeight, @@ -116,6 +121,25 @@ func AppGenesisFromFile(genFile string) (*AppGenesis, error) { return &appGenesis, nil } +// AppGenesisFromFile reads the AppGenesis from the provided file. +func AppGenesisFromFile(genFile string) (*AppGenesis, error) { + file, err := os.Open(filepath.Clean(genFile)) + if err != nil { + return nil, err + } + + appGenesis, err := AppGenesisFromReader(bufio.NewReader(file)) + if err != nil { + return nil, fmt.Errorf("failed to read genesis from file %s: %w", genFile, err) + } + + if err := file.Close(); err != nil { + return nil, err + } + + return appGenesis, nil +} + // -------------------------- // CometBFT Genesis Handling // -------------------------- diff --git a/x/genutil/types/genesis_state.go b/x/genutil/types/genesis_state.go index 7e09237becc1..e9a6e6424d46 100644 --- a/x/genutil/types/genesis_state.go +++ b/x/genutil/types/genesis_state.go @@ -64,8 +64,8 @@ func SetGenesisStateInAppState( // for the application. // // NOTE: The pubkey input is this machines pubkey. -func GenesisStateFromAppGenesis(gesnsis *AppGenesis) (genesisState map[string]json.RawMessage, err error) { - if err = json.Unmarshal(gesnsis.AppState, &genesisState); err != nil { +func GenesisStateFromAppGenesis(genesis *AppGenesis) (genesisState map[string]json.RawMessage, err error) { + if err = json.Unmarshal(genesis.AppState, &genesisState); err != nil { return genesisState, err } return genesisState, nil diff --git a/x/genutil/types/genesis_state_test.go b/x/genutil/types/genesis_state_test.go index dc8b469732df..90660a44105e 100644 --- a/x/genutil/types/genesis_state_test.go +++ b/x/genutil/types/genesis_state_test.go @@ -4,10 +4,11 @@ import ( "encoding/json" "testing" - "cosmossdk.io/math" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" sdk "github.com/cosmos/cosmos-sdk/types" @@ -40,10 +41,10 @@ func TestValidateGenesisMultipleMessages(t *testing.T) { desc := stakingtypes.NewDescription("testname", "", "", "", "") comm := stakingtypes.CommissionRates{} - msg1, err := stakingtypes.NewMsgCreateValidator(sdk.ValAddress(pk1.Address()), pk1, sdk.NewInt64Coin(sdk.DefaultBondDenom, 50), desc, comm, math.OneInt()) + msg1, err := stakingtypes.NewMsgCreateValidator(sdk.ValAddress(pk1.Address()).String(), pk1, sdk.NewInt64Coin(sdk.DefaultBondDenom, 50), desc, comm, math.OneInt()) require.NoError(t, err) - msg2, err := stakingtypes.NewMsgCreateValidator(sdk.ValAddress(pk2.Address()), pk2, + msg2, err := stakingtypes.NewMsgCreateValidator(sdk.ValAddress(pk2.Address()).String(), pk2, sdk.NewInt64Coin(sdk.DefaultBondDenom, 50), desc, comm, math.OneInt()) require.NoError(t, err) @@ -61,7 +62,7 @@ func TestValidateGenesisMultipleMessages(t *testing.T) { func TestValidateGenesisBadMessage(t *testing.T) { desc := stakingtypes.NewDescription("testname", "", "", "", "") - msg1 := stakingtypes.NewMsgEditValidator(sdk.ValAddress(pk1.Address()), desc, nil, nil) + msg1 := stakingtypes.NewMsgEditValidator(sdk.ValAddress(pk1.Address()).String(), desc, nil, nil) txConfig := moduletestutil.MakeTestEncodingConfig(staking.AppModuleBasic{}, genutil.AppModuleBasic{}).TxConfig txBuilder := txConfig.NewTxBuilder() diff --git a/x/genutil/types/genesis_test.go b/x/genutil/types/genesis_test.go index 245568855717..c5c729380f3c 100644 --- a/x/genutil/types/genesis_test.go +++ b/x/genutil/types/genesis_test.go @@ -5,10 +5,10 @@ import ( "os" "testing" + cmttypes "github.com/cometbft/cometbft/types" "gotest.tools/v3/assert" "gotest.tools/v3/golden" - cmttypes "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/x/genutil/types" ) diff --git a/x/genutil/types/testdata/app_genesis.json b/x/genutil/types/testdata/app_genesis.json index 9a686dbe4120..4aaf311a2c30 100644 --- a/x/genutil/types/testdata/app_genesis.json +++ b/x/genutil/types/testdata/app_genesis.json @@ -1 +1 @@ -{"app_name":"","app_version":"","genesis_time":"2023-02-20T11:08:30.588307671Z","chain_id":"demo","initial_height":48,"app_hash":"","app_state":{"auth":{"accounts":[{"@type":"/cosmos.auth.v1beta1.BaseAccount","account_number":"1","address":"cosmos1qmkksxlxqdslq6kkca25m4jn344nx29lytq8f9","pub_key":null,"sequence":"0"},{"@type":"/cosmos.auth.v1beta1.BaseAccount","account_number":"8","address":"cosmos1pnt5523etwtzv6mj7haryfw6w8h5tkcuhd99m8","pub_key":null,"sequence":"0"},{"@type":"/cosmos.auth.v1beta1.ModuleAccount","base_account":{"account_number":"4","address":"cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh","pub_key":null,"sequence":"0"},"name":"bonded_tokens_pool","permissions":["burner","staking"]},{"@type":"/cosmos.auth.v1beta1.ModuleAccount","base_account":{"account_number":"5","address":"cosmos1tygms3xhhs3yv487phx3dw4a95jn7t7lpm470r","pub_key":null,"sequence":"0"},"name":"not_bonded_tokens_pool","permissions":["burner","staking"]},{"@type":"/cosmos.auth.v1beta1.ModuleAccount","base_account":{"account_number":"6","address":"cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn","pub_key":null,"sequence":"0"},"name":"gov","permissions":["burner"]},{"@type":"/cosmos.auth.v1beta1.ModuleAccount","base_account":{"account_number":"3","address":"cosmos1jv65s3grqf6v6jl3dp4t6c9t9rk99cd88lyufl","pub_key":null,"sequence":"0"},"name":"distribution","permissions":[]},{"@type":"/cosmos.auth.v1beta1.BaseAccount","account_number":"0","address":"cosmos15jenkldw6348lpgdev3vjzw90zzknxa9a3vg0j","pub_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A3uyZdXedyvYx9VCL6xRjkxtcFpgxjhXFIz9b2mWz+aV"},"sequence":"4"},{"@type":"/cosmos.auth.v1beta1.ModuleAccount","base_account":{"account_number":"7","address":"cosmos1m3h30wlvsf8llruxtpukdvsy0km2kum8g38c8q","pub_key":null,"sequence":"0"},"name":"mint","permissions":["minter"]},{"@type":"/cosmos.auth.v1beta1.ModuleAccount","base_account":{"account_number":"2","address":"cosmos17xpfvakm2amg962yls6f84z3kell8c5lserqta","pub_key":null,"sequence":"0"},"name":"fee_collector","permissions":[]}],"params":{"max_memo_characters":"256","sig_verify_cost_ed25519":"590","sig_verify_cost_secp256k1":"1000","tx_sig_limit":"7","tx_size_cost_per_byte":"10"}},"authz":{"authorization":[]},"bank":{"balances":[{"address":"cosmos1qmkksxlxqdslq6kkca25m4jn344nx29lytq8f9","coins":[{"amount":"5000000000","denom":"stake"}]},{"address":"cosmos1pnt5523etwtzv6mj7haryfw6w8h5tkcuhd99m8","coins":[{"amount":"1000","denom":"stake"}]},{"address":"cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh","coins":[{"amount":"1000000","denom":"stake"}]},{"address":"cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn","coins":[{"amount":"10010000","denom":"stake"}]},{"address":"cosmos1jv65s3grqf6v6jl3dp4t6c9t9rk99cd88lyufl","coins":[{"amount":"9635","denom":"stake"}]},{"address":"cosmos15jenkldw6348lpgdev3vjzw90zzknxa9a3vg0j","coins":[{"amount":"4988989000","denom":"stake"}]}],"denom_metadata":[],"params":{"default_send_enabled":true,"send_enabled":[]},"send_enabled":[],"supply":[{"amount":"10000009635","denom":"stake"}]},"consensus":null,"crisis":{"constant_fee":{"amount":"1000","denom":"stake"}},"distribution":{"delegator_starting_infos":[{"delegator_address":"cosmos15jenkldw6348lpgdev3vjzw90zzknxa9a3vg0j","starting_info":{"height":"0","previous_period":"1","stake":"1000000.000000000000000000"},"validator_address":"cosmosvaloper15jenkldw6348lpgdev3vjzw90zzknxa9c9carp"}],"delegator_withdraw_infos":[],"fee_pool":{"community_pool":[{"amount":"192.700000000000000000","denom":"stake"}]},"outstanding_rewards":[{"outstanding_rewards":[{"amount":"9442.300000000000000000","denom":"stake"}],"validator_address":"cosmosvaloper15jenkldw6348lpgdev3vjzw90zzknxa9c9carp"}],"params":{"base_proposer_reward":"0.000000000000000000","bonus_proposer_reward":"0.000000000000000000","community_tax":"0.020000000000000000","withdraw_addr_enabled":true},"previous_proposer":"cosmosvalcons16vm0nx49eam4q0xasdnwdzsdl6ymgyjt757sgr","validator_accumulated_commissions":[{"accumulated":{"commission":[{"amount":"944.230000000000000000","denom":"stake"}]},"validator_address":"cosmosvaloper15jenkldw6348lpgdev3vjzw90zzknxa9c9carp"}],"validator_current_rewards":[{"rewards":{"period":"2","rewards":[{"amount":"8498.070000000000000000","denom":"stake"}]},"validator_address":"cosmosvaloper15jenkldw6348lpgdev3vjzw90zzknxa9c9carp"}],"validator_historical_rewards":[{"period":"1","rewards":{"cumulative_reward_ratio":[],"reference_count":2},"validator_address":"cosmosvaloper15jenkldw6348lpgdev3vjzw90zzknxa9c9carp"}],"validator_slash_events":[]},"evidence":{"evidence":[]},"feegrant":{"allowances":[]},"genutil":{"gen_txs":[]},"gov":{"deposit_params":null,"deposits":[{"amount":[{"amount":"10010000","denom":"stake"}],"depositor":"cosmos15jenkldw6348lpgdev3vjzw90zzknxa9a3vg0j","proposal_id":"1"}],"params":{"expedited_min_deposit":[{"amount":"50000000","denom":"stake"}],"expedited_threshold":"0.667000000000000000","expedited_voting_period":"86400s","max_deposit_period":"172800s","min_deposit":[{"amount":"10000000","denom":"stake"}],"min_initial_deposit_ratio":"0.000000000000000000","proposal_cancel_dest":"","proposal_cancel_ratio":"0.500000000000000000","quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000","voting_period":"172800s"},"proposals":[{"deposit_end_time":"2023-02-22T11:11:52.776167376Z","expedited":false,"final_tally_result":{"abstain_count":"0","no_count":"0","no_with_veto_count":"0","yes_count":"0"},"id":"1","messages":[{"@type":"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend","amount":[],"authority":"cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn","recipient":"cosmos1pnt5523etwtzv6mj7haryfw6w8h5tkcuhd99m8"}],"metadata":"ipfs://CID","proposer":"cosmos15jenkldw6348lpgdev3vjzw90zzknxa9a3vg0j","status":"PROPOSAL_STATUS_VOTING_PERIOD","submit_time":"2023-02-20T11:11:52.776167376Z","summary":"test proposal","title":"test proposal","total_deposit":[{"amount":"10010000","denom":"stake"}],"voting_end_time":"2023-02-22T11:12:07.801161984Z","voting_start_time":"2023-02-20T11:12:07.801161984Z"}],"starting_proposal_id":"2","tally_params":null,"votes":[],"voting_params":null},"group":{"group_members":[],"group_policies":[],"group_policy_seq":"0","group_seq":"0","groups":[],"proposal_seq":"0","proposals":[],"votes":[]},"mint":{"minter":{"annual_provisions":"1300010905.175073197786747950","inflation":"0.130000967926594565"},"params":{"blocks_per_year":"6311520","goal_bonded":"0.670000000000000000","inflation_max":"0.200000000000000000","inflation_min":"0.070000000000000000","inflation_rate_change":"0.130000000000000000","mint_denom":"stake"}},"nft":{"classes":[],"entries":[]},"params":null,"slashing":{"missed_blocks":[{"address":"cosmosvalcons16vm0nx49eam4q0xasdnwdzsdl6ymgyjt757sgr","missed_blocks":[]}],"params":{"downtime_jail_duration":"600s","min_signed_per_window":"0.500000000000000000","signed_blocks_window":"100","slash_fraction_double_sign":"0.050000000000000000","slash_fraction_downtime":"0.010000000000000000"},"signing_infos":[{"address":"cosmosvalcons16vm0nx49eam4q0xasdnwdzsdl6ymgyjt757sgr","validator_signing_info":{"address":"cosmosvalcons16vm0nx49eam4q0xasdnwdzsdl6ymgyjt757sgr","index_offset":"46","jailed_until":"1970-01-01T00:00:00Z","missed_blocks_counter":"0","start_height":"0","tombstoned":false}}]},"staking":{"delegations":[{"delegator_address":"cosmos15jenkldw6348lpgdev3vjzw90zzknxa9a3vg0j","shares":"1000000.000000000000000000","validator_address":"cosmosvaloper15jenkldw6348lpgdev3vjzw90zzknxa9c9carp"}],"exported":true,"last_total_power":"1","last_validator_powers":[{"address":"cosmosvaloper15jenkldw6348lpgdev3vjzw90zzknxa9c9carp","power":"1"}],"params":{"bond_denom":"stake","historical_entries":10000,"max_entries":7,"max_validators":100,"min_commission_rate":"0.000000000000000000","unbonding_time":"1814400s"},"redelegations":[],"unbonding_delegations":[],"validators":[{"commission":{"commission_rates":{"max_change_rate":"0.010000000000000000","max_rate":"0.200000000000000000","rate":"0.100000000000000000"},"update_time":"2023-02-20T11:08:30.588307671Z"},"consensus_pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"tMZonPQYoooG/xbFVhHg95pTLxx7aO43/qgHFxDagWM="},"delegator_shares":"1000000.000000000000000000","description":{"details":"","identity":"","moniker":"test","security_contact":"","website":""},"jailed":false,"min_self_delegation":"1","operator_address":"cosmosvaloper15jenkldw6348lpgdev3vjzw90zzknxa9c9carp","status":"BOND_STATUS_BONDED","tokens":"1000000","unbonding_height":"0","unbonding_ids":[],"unbonding_on_hold_ref_count":"0","unbonding_time":"1970-01-01T00:00:00Z"}]},"upgrade":{},"vesting":{}},"consensus":{"validators":[{"address":"D336F99AA5CF77503CDD8366E68A0DFE89B4124B","pub_key":{"type":"tendermint/PubKeyEd25519","value":"tMZonPQYoooG/xbFVhHg95pTLxx7aO43/qgHFxDagWM="},"power":"1","name":"test"}],"params":{"block":{"max_bytes":"22020096","max_gas":"-1"},"evidence":{"max_age_num_blocks":"100000","max_age_duration":"172800000000000","max_bytes":"1048576"},"validator":{"pub_key_types":["ed25519"]},"version":{"app":"0"},"abci":{"vote_extensions_enable_height":"0"}}}} \ No newline at end of file +{"app_name":"\u003cappd\u003e","app_version":"","genesis_time":"2023-02-20T11:08:30.588307671Z","chain_id":"demo","initial_height":48,"app_hash":"","app_state":{"auth":{"accounts":[{"@type":"/cosmos.auth.v1beta1.BaseAccount","account_number":"1","address":"cosmos1qmkksxlxqdslq6kkca25m4jn344nx29lytq8f9","pub_key":null,"sequence":"0"},{"@type":"/cosmos.auth.v1beta1.BaseAccount","account_number":"8","address":"cosmos1pnt5523etwtzv6mj7haryfw6w8h5tkcuhd99m8","pub_key":null,"sequence":"0"},{"@type":"/cosmos.auth.v1beta1.ModuleAccount","base_account":{"account_number":"4","address":"cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh","pub_key":null,"sequence":"0"},"name":"bonded_tokens_pool","permissions":["burner","staking"]},{"@type":"/cosmos.auth.v1beta1.ModuleAccount","base_account":{"account_number":"5","address":"cosmos1tygms3xhhs3yv487phx3dw4a95jn7t7lpm470r","pub_key":null,"sequence":"0"},"name":"not_bonded_tokens_pool","permissions":["burner","staking"]},{"@type":"/cosmos.auth.v1beta1.ModuleAccount","base_account":{"account_number":"6","address":"cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn","pub_key":null,"sequence":"0"},"name":"gov","permissions":["burner"]},{"@type":"/cosmos.auth.v1beta1.ModuleAccount","base_account":{"account_number":"3","address":"cosmos1jv65s3grqf6v6jl3dp4t6c9t9rk99cd88lyufl","pub_key":null,"sequence":"0"},"name":"distribution","permissions":[]},{"@type":"/cosmos.auth.v1beta1.BaseAccount","account_number":"0","address":"cosmos15jenkldw6348lpgdev3vjzw90zzknxa9a3vg0j","pub_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A3uyZdXedyvYx9VCL6xRjkxtcFpgxjhXFIz9b2mWz+aV"},"sequence":"4"},{"@type":"/cosmos.auth.v1beta1.ModuleAccount","base_account":{"account_number":"7","address":"cosmos1m3h30wlvsf8llruxtpukdvsy0km2kum8g38c8q","pub_key":null,"sequence":"0"},"name":"mint","permissions":["minter"]},{"@type":"/cosmos.auth.v1beta1.ModuleAccount","base_account":{"account_number":"2","address":"cosmos17xpfvakm2amg962yls6f84z3kell8c5lserqta","pub_key":null,"sequence":"0"},"name":"fee_collector","permissions":[]}],"params":{"max_memo_characters":"256","sig_verify_cost_ed25519":"590","sig_verify_cost_secp256k1":"1000","tx_sig_limit":"7","tx_size_cost_per_byte":"10"}},"authz":{"authorization":[]},"bank":{"balances":[{"address":"cosmos1qmkksxlxqdslq6kkca25m4jn344nx29lytq8f9","coins":[{"amount":"5000000000","denom":"stake"}]},{"address":"cosmos1pnt5523etwtzv6mj7haryfw6w8h5tkcuhd99m8","coins":[{"amount":"1000","denom":"stake"}]},{"address":"cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh","coins":[{"amount":"1000000","denom":"stake"}]},{"address":"cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn","coins":[{"amount":"10010000","denom":"stake"}]},{"address":"cosmos1jv65s3grqf6v6jl3dp4t6c9t9rk99cd88lyufl","coins":[{"amount":"9635","denom":"stake"}]},{"address":"cosmos15jenkldw6348lpgdev3vjzw90zzknxa9a3vg0j","coins":[{"amount":"4988989000","denom":"stake"}]}],"denom_metadata":[],"params":{"default_send_enabled":true,"send_enabled":[]},"send_enabled":[],"supply":[{"amount":"10000009635","denom":"stake"}]},"consensus":null,"crisis":{"constant_fee":{"amount":"1000","denom":"stake"}},"distribution":{"delegator_starting_infos":[{"delegator_address":"cosmos15jenkldw6348lpgdev3vjzw90zzknxa9a3vg0j","starting_info":{"height":"0","previous_period":"1","stake":"1000000.000000000000000000"},"validator_address":"cosmosvaloper15jenkldw6348lpgdev3vjzw90zzknxa9c9carp"}],"delegator_withdraw_infos":[],"fee_pool":{"community_pool":[{"amount":"192.700000000000000000","denom":"stake"}]},"outstanding_rewards":[{"outstanding_rewards":[{"amount":"9442.300000000000000000","denom":"stake"}],"validator_address":"cosmosvaloper15jenkldw6348lpgdev3vjzw90zzknxa9c9carp"}],"params":{"base_proposer_reward":"0.000000000000000000","bonus_proposer_reward":"0.000000000000000000","community_tax":"0.020000000000000000","withdraw_addr_enabled":true},"previous_proposer":"cosmosvalcons16vm0nx49eam4q0xasdnwdzsdl6ymgyjt757sgr","validator_accumulated_commissions":[{"accumulated":{"commission":[{"amount":"944.230000000000000000","denom":"stake"}]},"validator_address":"cosmosvaloper15jenkldw6348lpgdev3vjzw90zzknxa9c9carp"}],"validator_current_rewards":[{"rewards":{"period":"2","rewards":[{"amount":"8498.070000000000000000","denom":"stake"}]},"validator_address":"cosmosvaloper15jenkldw6348lpgdev3vjzw90zzknxa9c9carp"}],"validator_historical_rewards":[{"period":"1","rewards":{"cumulative_reward_ratio":[],"reference_count":2},"validator_address":"cosmosvaloper15jenkldw6348lpgdev3vjzw90zzknxa9c9carp"}],"validator_slash_events":[]},"evidence":{"evidence":[]},"feegrant":{"allowances":[]},"genutil":{"gen_txs":[]},"gov":{"deposit_params":null,"deposits":[{"amount":[{"amount":"10010000","denom":"stake"}],"depositor":"cosmos15jenkldw6348lpgdev3vjzw90zzknxa9a3vg0j","proposal_id":"1"}],"params":{"expedited_min_deposit":[{"amount":"50000000","denom":"stake"}],"expedited_threshold":"0.667000000000000000","expedited_voting_period":"86400s","max_deposit_period":"172800s","min_deposit":[{"amount":"10000000","denom":"stake"}],"min_initial_deposit_ratio":"0.000000000000000000","proposal_cancel_dest":"","proposal_cancel_ratio":"0.500000000000000000","quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000","voting_period":"172800s"},"proposals":[{"deposit_end_time":"2023-02-22T11:11:52.776167376Z","expedited":false,"final_tally_result":{"abstain_count":"0","no_count":"0","no_with_veto_count":"0","yes_count":"0"},"id":"1","messages":[{"@type":"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend","amount":[],"authority":"cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn","recipient":"cosmos1pnt5523etwtzv6mj7haryfw6w8h5tkcuhd99m8"}],"metadata":"ipfs://CID","proposer":"cosmos15jenkldw6348lpgdev3vjzw90zzknxa9a3vg0j","status":"PROPOSAL_STATUS_VOTING_PERIOD","submit_time":"2023-02-20T11:11:52.776167376Z","summary":"test proposal","title":"test proposal","total_deposit":[{"amount":"10010000","denom":"stake"}],"voting_end_time":"2023-02-22T11:12:07.801161984Z","voting_start_time":"2023-02-20T11:12:07.801161984Z"}],"starting_proposal_id":"2","tally_params":null,"votes":[],"voting_params":null},"group":{"group_members":[],"group_policies":[],"group_policy_seq":"0","group_seq":"0","groups":[],"proposal_seq":"0","proposals":[],"votes":[]},"mint":{"minter":{"annual_provisions":"1300010905.175073197786747950","inflation":"0.130000967926594565"},"params":{"blocks_per_year":"6311520","goal_bonded":"0.670000000000000000","inflation_max":"0.200000000000000000","inflation_min":"0.070000000000000000","inflation_rate_change":"0.130000000000000000","mint_denom":"stake"}},"nft":{"classes":[],"entries":[]},"params":null,"slashing":{"missed_blocks":[{"address":"cosmosvalcons16vm0nx49eam4q0xasdnwdzsdl6ymgyjt757sgr","missed_blocks":[]}],"params":{"downtime_jail_duration":"600s","min_signed_per_window":"0.500000000000000000","signed_blocks_window":"100","slash_fraction_double_sign":"0.050000000000000000","slash_fraction_downtime":"0.010000000000000000"},"signing_infos":[{"address":"cosmosvalcons16vm0nx49eam4q0xasdnwdzsdl6ymgyjt757sgr","validator_signing_info":{"address":"cosmosvalcons16vm0nx49eam4q0xasdnwdzsdl6ymgyjt757sgr","index_offset":"46","jailed_until":"1970-01-01T00:00:00Z","missed_blocks_counter":"0","start_height":"0","tombstoned":false}}]},"staking":{"delegations":[{"delegator_address":"cosmos15jenkldw6348lpgdev3vjzw90zzknxa9a3vg0j","shares":"1000000.000000000000000000","validator_address":"cosmosvaloper15jenkldw6348lpgdev3vjzw90zzknxa9c9carp"}],"exported":true,"last_total_power":"1","last_validator_powers":[{"address":"cosmosvaloper15jenkldw6348lpgdev3vjzw90zzknxa9c9carp","power":"1"}],"params":{"bond_denom":"stake","historical_entries":10000,"max_entries":7,"max_validators":100,"min_commission_rate":"0.000000000000000000","unbonding_time":"1814400s"},"redelegations":[],"unbonding_delegations":[],"validators":[{"commission":{"commission_rates":{"max_change_rate":"0.010000000000000000","max_rate":"0.200000000000000000","rate":"0.100000000000000000"},"update_time":"2023-02-20T11:08:30.588307671Z"},"consensus_pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"tMZonPQYoooG/xbFVhHg95pTLxx7aO43/qgHFxDagWM="},"delegator_shares":"1000000.000000000000000000","description":{"details":"","identity":"","moniker":"test","security_contact":"","website":""},"jailed":false,"min_self_delegation":"1","operator_address":"cosmosvaloper15jenkldw6348lpgdev3vjzw90zzknxa9c9carp","status":"BOND_STATUS_BONDED","tokens":"1000000","unbonding_height":"0","unbonding_ids":[],"unbonding_on_hold_ref_count":"0","unbonding_time":"1970-01-01T00:00:00Z"}]},"upgrade":{},"vesting":{}},"consensus":{"validators":[{"address":"D336F99AA5CF77503CDD8366E68A0DFE89B4124B","pub_key":{"type":"tendermint/PubKeyEd25519","value":"tMZonPQYoooG/xbFVhHg95pTLxx7aO43/qgHFxDagWM="},"power":"1","name":"test"}],"params":{"block":{"max_bytes":"22020096","max_gas":"-1"},"evidence":{"max_age_num_blocks":"100000","max_age_duration":"172800000000000","max_bytes":"1048576"},"validator":{"pub_key_types":["ed25519"]},"version":{"app":"0"},"abci":{"vote_extensions_enable_height":"0"}}}} \ No newline at end of file diff --git a/x/genutil/types/testdata/parse_chain_id.json b/x/genutil/types/testdata/parse_chain_id.json new file mode 100644 index 000000000000..be2588d2ae79 --- /dev/null +++ b/x/genutil/types/testdata/parse_chain_id.json @@ -0,0 +1 @@ +{"genesis_time":"2021-11-08T01:00:00Z","chain_id":"cronosmainnet_25-1","initial_height":"1","consensus_params":{"block":{"max_bytes":"1048576","max_gas":"10000000","time_iota_ms":"1000"},"evidence":{"max_age_num_blocks":"403200","max_age_duration":"2419200000000000","max_bytes":"150000"},"validator":{"pub_key_types":["ed25519"]},"version":{}},"app_hash":"","app_state":{"auth":{"params":{"max_memo_characters":"256","tx_sig_limit":"7","tx_size_cost_per_byte":"10","sig_verify_cost_ed25519":"590","sig_verify_cost_secp256k1":"1000"},"accounts":[{"@type":"/ethermint.types.v1.EthAccount","base_account":{"address":"crc1q7q2mmmcx2nlw6ptw4a9a3danlnu8z6tq32gv9","pub_key":null,"account_number":"0","sequence":"0"},"code_hash":"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"},{"@type":"/ethermint.types.v1.EthAccount","base_account":{"address":"crc1s8372smy0erx5k4usf84s39tpgy3kmrvjwdejw","pub_key":null,"account_number":"0","sequence":"0"},"code_hash":"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"},{"@type":"/ethermint.types.v1.EthAccount","base_account":{"address":"crc1efw0q0ggzxtmuf80wpcgr77h70c3avpdp9nq5k","pub_key":null,"account_number":"0","sequence":"0"},"code_hash":"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"},{"@type":"/ethermint.types.v1.EthAccount","base_account":{"address":"crc1f7r687vm68jc6qw7rsut07puh9n7s9kzdj0zph","pub_key":null,"account_number":"0","sequence":"0"},"code_hash":"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"},{"@type":"/ethermint.types.v1.EthAccount","base_account":{"address":"crc1aaxs058pksrq8cx3k0nrxv60p2a9c7nq527949","pub_key":null,"account_number":"0","sequence":"0"},"code_hash":"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"},{"@type":"/ethermint.types.v1.EthAccount","base_account":{"address":"crc17s50usvlr5934tr2fxsesr89k4twtm25vjl6zs","pub_key":null,"account_number":"0","sequence":"0"},"code_hash":"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"},{"@type":"/ethermint.types.v1.EthAccount","base_account":{"address":"crc1tasmcx3rqpglmsafdt7vylnsdkc3yjlzfv3u63","pub_key":null,"account_number":"0","sequence":"0"},"code_hash":"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"},{"@type":"/ethermint.types.v1.EthAccount","base_account":{"address":"crc17m20ajc6d7mu9j34q956q5x5sw7c0wyrem3s7n","pub_key":null,"account_number":"0","sequence":"0"},"code_hash":"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"}]},"authz":{"authorization":[]},"bank":{"params":{"send_enabled":[{"denom":"stake","enabled":true},{"denom":"basecro","enabled":false}],"default_send_enabled":true},"balances":[{"address":"crc1q7q2mmmcx2nlw6ptw4a9a3danlnu8z6tq32gv9","coins":[{"denom":"stake","amount":"10000000000"}]},{"address":"crc1f7r687vm68jc6qw7rsut07puh9n7s9kzdj0zph","coins":[{"denom":"stake","amount":"10000000000"}]},{"address":"crc1tasmcx3rqpglmsafdt7vylnsdkc3yjlzfv3u63","coins":[{"denom":"stake","amount":"600000000000"}]},{"address":"crc1s8372smy0erx5k4usf84s39tpgy3kmrvjwdejw","coins":[{"denom":"stake","amount":"10000000000"}]},{"address":"crc1efw0q0ggzxtmuf80wpcgr77h70c3avpdp9nq5k","coins":[{"denom":"stake","amount":"10000000000"}]},{"address":"crc1aaxs058pksrq8cx3k0nrxv60p2a9c7nq527949","coins":[{"denom":"stake","amount":"10000"}]},{"address":"crc17s50usvlr5934tr2fxsesr89k4twtm25vjl6zs","coins":[{"denom":"stake","amount":"1000000000000000"}]},{"address":"crc17m20ajc6d7mu9j34q956q5x5sw7c0wyrem3s7n","coins":[{"denom":"stake","amount":"50000000"}]}],"supply":[{"denom":"stake","amount":"1000640050010000"}],"denom_metadata":[]},"capability":{"index":"1","owners":[]},"crisis":{"constant_fee":{"denom":"stake","amount":"1000"}},"cronos":{"params":{"ibc_cro_denom":"ibc/6411AE2ADA1E73DB59DB151A8988F9B7D5E7E233D8414DB6817F8F1A01611F86","ibc_timeout":"86400000000000","cronos_admin":"crc1tasmcx3rqpglmsafdt7vylnsdkc3yjlzfv3u63","enable_auto_deployment":false},"external_contracts":[],"auto_contracts":[]},"distribution":{"params":{"community_tax":"0","base_proposer_reward":"0","bonus_proposer_reward":"0","withdraw_addr_enabled":true},"fee_pool":{"community_pool":[]},"delegator_withdraw_infos":[],"previous_proposer":"","outstanding_rewards":[],"validator_accumulated_commissions":[],"validator_historical_rewards":[],"validator_current_rewards":[],"delegator_starting_infos":[],"validator_slash_events":[]},"evidence":{"evidence":[]},"evm":{"accounts":[],"params":{"evm_denom":"basecro","enable_create":true,"enable_call":true,"extra_eips":["2929","2200","1884","1344"],"chain_config":{"homestead_block":"0","dao_fork_block":"0","dao_fork_support":true,"eip150_block":"0","eip150_hash":"0x0000000000000000000000000000000000000000000000000000000000000000","eip155_block":"0","eip158_block":"0","byzantium_block":"0","constantinople_block":"0","petersburg_block":"0","istanbul_block":"0","muir_glacier_block":"0","berlin_block":"0","catalyst_block":null,"london_block":"9223372036854775808"}}},"feegrant":{"allowances":[]},"genutil":{"gen_txs":[{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"Pioneer 11","identity":"BB602FB166F21C6E","website":"https://cronos.crypto.org","security_contact":"chain-security@crypto.org","details":""},"commission":{"rate":"1.000000000000000000","max_rate":"1.000000000000000000","max_change_rate":"1.000000000000000000"},"min_self_delegation":"1","delegator_address":"crc1q7q2mmmcx2nlw6ptw4a9a3danlnu8z6tq32gv9","validator_address":"crcvaloper1q7q2mmmcx2nlw6ptw4a9a3danlnu8z6t2wmyjv","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"H8pPcYZvZYd/cI2pKuwcmyst7ZTWm5+QkXXuCoGg1P0="},"value":{"denom":"stake","amount":"10000000000"}}],"memo":"","timeout_height":0,"extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/ethermint.crypto.v1.ethsecp256k1.PubKey","key":"A/S9y8Yhb2FVVInVKmdPOtgIiKUlm7CE8ixT14GmNYm1"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":0}],"fee":{"amount":[],"gas_limit":200000,"payer":"","granter":""}},"signatures":["35KHI9qc+w+2cOKwlmgXzx1QaPfsK9lxs1Z7INaiNHgHXqRHBUTgl8eKzIHTCnFJU89gpLPEqjUsLDasiHavggA="]},{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"Voyager 1","identity":"BB602FB166F21C6E","website":"https://cronos.crypto.org","security_contact":"chain-security@crypto.org","details":""},"commission":{"rate":"1.000000000000000000","max_rate":"1.000000000000000000","max_change_rate":"1.000000000000000000"},"min_self_delegation":"1","delegator_address":"crc1s8372smy0erx5k4usf84s39tpgy3kmrvjwdejw","validator_address":"crcvaloper1s8372smy0erx5k4usf84s39tpgy3kmrvc3u4v8","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"7WE80ID9TzUjIb5Lu9A+ncidsND5+sJAUL6l/NNn4KE="},"value":{"denom":"stake","amount":"10000000000"}}],"memo":"","timeout_height":0,"extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/ethermint.crypto.v1.ethsecp256k1.PubKey","key":"AxI/HqRT4KKIQhonXtJBe9H/wRq4BkvAZO+4TxSQSjZt"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":0}],"fee":{"amount":[],"gas_limit":200000,"payer":"","granter":""}},"signatures":["TlS6sZBiFNI64lr13x+sr3rrwV+U7icm/V9ksIMEtlhSZlXNJhS+2hQywyGutb6JhA+Ov+Wjln4puHm/MSA3iAE="]},{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"Voyager 2","identity":"BB602FB166F21C6E","website":"https://cronos.crypto.org","security_contact":"chain-security@crypto.org","details":""},"commission":{"rate":"1.000000000000000000","max_rate":"1.000000000000000000","max_change_rate":"1.000000000000000000"},"min_self_delegation":"1","delegator_address":"crc1efw0q0ggzxtmuf80wpcgr77h70c3avpdp9nq5k","validator_address":"crcvaloper1efw0q0ggzxtmuf80wpcgr77h70c3avpdt6zv2l","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"TXH4O/GhYibZffcBo5UAERwi9T4VgPAiVCDyl4rdFDE="},"value":{"denom":"stake","amount":"10000000000"}}],"memo":"","timeout_height":0,"extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/ethermint.crypto.v1.ethsecp256k1.PubKey","key":"AzR06WzkRRXNNE+A4VFG18w170ZicRa/mVsLvBGlBAxz"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":0}],"fee":{"amount":[],"gas_limit":200000,"payer":"","granter":""}},"signatures":["mx//YsSSwUP4G020FLRS0532nP2AylVPqRUXb9EdauM4OWdXF0+Ftx8jbcFinzBw8PHGof3XHcg2yw2P2qNBMAE="]},{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"Huygens","identity":"BB602FB166F21C6E","website":"https://cronos.crypto.org","security_contact":"chain-security@crypto.org","details":""},"commission":{"rate":"1.000000000000000000","max_rate":"1.000000000000000000","max_change_rate":"1.000000000000000000"},"min_self_delegation":"1","delegator_address":"crc1f7r687vm68jc6qw7rsut07puh9n7s9kzdj0zph","validator_address":"crcvaloper1f7r687vm68jc6qw7rsut07puh9n7s9kz8d7wl7","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"f826QMXnfR9pEAJDEQR4t228BwQVJ7xe2EwGZN8doQY="},"value":{"denom":"stake","amount":"10000000000"}}],"memo":"","timeout_height":0,"extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/ethermint.crypto.v1.ethsecp256k1.PubKey","key":"AkDcLOeNUKVUS52hUPx+cSo+ohG6vW3P2RYkbW6dwdMG"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":0}],"fee":{"amount":[],"gas_limit":200000,"payer":"","granter":""}},"signatures":["Rz89OXlfJQgasEeKxsywF/XyiYg7Xdgg/qgwtJcOMuIgJ3hfsE0KrreXlfHOGPIe9nVduffC9W3gKvw2sHe9ugE="]}]},"gov":{"starting_proposal_id":"1","deposits":[],"votes":[],"proposals":[],"deposit_params":{"min_deposit":[{"denom":"basecro","amount":"20000000000000000000000"}],"max_deposit_period":"21600000000000ns"},"voting_params":{"voting_period":"259200000000000ns"},"tally_params":{"quorum":"0.334","threshold":"0.5","veto_threshold":"0.334"}},"ibc":{"client_genesis":{"clients":[],"clients_consensus":[],"clients_metadata":[],"params":{"allowed_clients":["06-solomachine","07-tendermint"]},"create_localhost":false,"next_client_sequence":"0"},"connection_genesis":{"connections":[],"client_connection_paths":[],"next_connection_sequence":"0","params":{"max_expected_time_per_block":"30000000000"}},"channel_genesis":{"channels":[],"acknowledgements":[],"commitments":[],"receipts":[],"send_sequences":[],"recv_sequences":[],"ack_sequences":[],"next_channel_sequence":"0"}},"mint":{"minter":{"inflation":"0.000000000000000000","annual_provisions":"0.000000000000000000"},"params":{"mint_denom":"stake","inflation_rate_change":"0","inflation_max":"0","inflation_min":"0","goal_bonded":"1","blocks_per_year":"6311520"}},"params":null,"slashing":{"params":{"signed_blocks_window":"10000","min_signed_per_window":"0.5","downtime_jail_duration":"28800s","slash_fraction_double_sign":"0","slash_fraction_downtime":"0"},"signing_infos":[],"missed_blocks":[]},"staking":{"params":{"unbonding_time":"2419200000000000ns","max_validators":"50","max_entries":"7","historical_entries":"10000","bond_denom":"stake"},"last_total_power":"0","last_validator_powers":[],"validators":[],"delegations":[],"unbonding_delegations":[],"redelegations":[],"exported":false},"transfer":{"port_id":"transfer","denom_traces":[],"params":{"send_enabled":true,"receive_enabled":true}},"upgrade":{},"vesting":{}}} diff --git a/x/genutil/utils_test.go b/x/genutil/utils_test.go index 13367dcd5b35..7e0dd4b17d4a 100644 --- a/x/genutil/utils_test.go +++ b/x/genutil/utils_test.go @@ -7,10 +7,9 @@ import ( "testing" "time" + "github.com/cometbft/cometbft/config" tmed25519 "github.com/cometbft/cometbft/crypto/ed25519" "github.com/cometbft/cometbft/privval" - - "github.com/cometbft/cometbft/config" "github.com/stretchr/testify/require" ) diff --git a/x/gov/README.md b/x/gov/README.md index 245d29053f77..87b2fc5fad6c 100644 --- a/x/gov/README.md +++ b/x/gov/README.md @@ -16,14 +16,14 @@ on proposals on a 1 token 1 vote basis. Next is a list of features the module currently supports: * **Proposal submission:** Users can submit proposals with a deposit. Once the -minimum deposit is reached, the proposal enters voting period. -* **Vote:** Participants can vote on proposals that reached MinDeposit +minimum deposit is reached, the proposal enters voting period. The minimum deposit can be reached by collecting deposits from different users (including proposer) within deposit period. +* **Vote:** Participants can vote on proposals that reached MinDeposit and entered voting period. * **Inheritance and penalties:** Delegators inherit their validator's vote if they don't vote themselves. * **Claiming deposit:** Users that deposited on proposals can recover their -deposits if the proposal was accepted or rejected. If the proposal was vetoed, or never entered voting period, the deposit is burned. +deposits if the proposal was accepted or rejected. If the proposal was vetoed, or never entered voting period (minimum deposit not reached within deposit period), the deposit is burned. -This module will be used in the Cosmos Hub, the first Hub in the Cosmos network. +This module is in use on the Cosmos Hub (a.k.a [gaia](https://github.com/cosmos/gaia)). Features that may be added in the future are described in [Future Improvements](#future-improvements). ## Contents @@ -494,11 +494,13 @@ And the pseudocode for the `ProposalProcessingQueue`: ### Legacy Proposal +:::warning +Legacy proposals are deprecated. Use the new proposal flow by granting the governance module the right to execute the message. +::: + A legacy proposal is the old implementation of governance proposal. Contrary to proposal that can contain any messages, a legacy proposal allows to submit a set of pre-defined proposals. -These proposal are defined by their types. - -While proposals should use the new implementation of the governance proposal, we need still to use legacy proposal in order to submit a `software-upgrade` and a `cancel-software-upgrade` proposal. +These proposals are defined by their types and handled by handlers that are registered in the gov v1beta1 router. More information on how to submit proposals in the [client section](#client). @@ -516,6 +518,7 @@ All `sdk.Msgs` passed into the `messages` field of a `MsgSubmitProposal` message must be registered in the app's `MsgServiceRouter`. Each of these messages must have one signer, namely the gov module account. And finally, the metadata length must not be larger than the `maxMetadataLen` config passed into the gov keeper. +The `initialDeposit` must be strictly positive and conform to the accepted denom of the `MinDeposit` param. **State modifications:** @@ -527,58 +530,17 @@ must not be larger than the `maxMetadataLen` config passed into the gov keeper. * Push `proposalID` in `ProposalProcessingQueue` * Transfer `InitialDeposit` from the `Proposer` to the governance `ModuleAccount` -A `MsgSubmitProposal` transaction can be handled according to the following -pseudocode. - -```go -// PSEUDOCODE // -// Check if MsgSubmitProposal is valid. If it is, create proposal // - -upon receiving txGovSubmitProposal from sender do - - if !correctlyFormatted(txGovSubmitProposal) - // check if proposal is correctly formatted and the messages have routes to other modules. Includes fee payment. - // check if all messages' unique Signer is the gov acct. - // check if the metadata is not too long. - throw - - initialDeposit = txGovSubmitProposal.InitialDeposit - if (initialDeposit.Atoms <= 0) OR (sender.AtomBalance < initialDeposit.Atoms) - // InitialDeposit is negative or null OR sender has insufficient funds - throw - - if (txGovSubmitProposal.Type != ProposalTypePlainText) OR (txGovSubmitProposal.Type != ProposalTypeSoftwareUpgrade) - - sender.AtomBalance -= initialDeposit.Atoms - - depositParam = load(GlobalParams, 'DepositParam') - - proposalID = generate new proposalID - proposal = NewProposal() - - proposal.Messages = txGovSubmitProposal.Messages - proposal.Metadata = txGovSubmitProposal.Metadata - proposal.TotalDeposit = initialDeposit - proposal.SubmitTime = - proposal.DepositEndTime = .Add(depositParam.MaxDepositPeriod) - proposal.Deposits.append({initialDeposit, sender}) - proposal.Submitter = sender - proposal.YesVotes = 0 - proposal.NoVotes = 0 - proposal.NoWithVetoVotes = 0 - proposal.AbstainVotes = 0 - proposal.CurrentStatus = ProposalStatusOpen - - store(Proposals, , proposal) // Store proposal in Proposals mapping - return proposalID -``` - ### Deposit -Once a proposal is submitted, if -`Proposal.TotalDeposit < ActiveParam.MinDeposit`, Atom holders can send +Once a proposal is submitted, if `Proposal.TotalDeposit < ActiveParam.MinDeposit`, Atom holders can send `MsgDeposit` transactions to increase the proposal's deposit. +A deposit is accepted iff: + +* The proposal exists +* The proposal is not in the voting period +* The deposited coins are conform to the accepted denom from the `MinDeposit` param + ```protobuf reference https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/gov/v1/tx.proto#L134-L147 ``` @@ -592,55 +554,6 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/gov/v1/tx.pro * Push `proposalID` in `ProposalProcessingQueueEnd` * Transfer `Deposit` from the `proposer` to the governance `ModuleAccount` -A `MsgDeposit` transaction has to go through a number of checks to be valid. -These checks are outlined in the following pseudocode. - -```go -// PSEUDOCODE // -// Check if MsgDeposit is valid. If it is, increase deposit and check if MinDeposit is reached - -upon receiving txGovDeposit from sender do - // check if proposal is correctly formatted. Includes fee payment. - - if !correctlyFormatted(txGovDeposit) - throw - - proposal = load(Proposals, ) // proposal is a const key, proposalID is variable - - if (proposal == nil) - // There is no proposal for this proposalID - throw - - if (txGovDeposit.Deposit.Atoms <= 0) OR (sender.AtomBalance < txGovDeposit.Deposit.Atoms) OR (proposal.CurrentStatus != ProposalStatusOpen) - - // deposit is negative or null - // OR sender has insufficient funds - // OR proposal is not open for deposit anymore - - throw - - depositParam = load(GlobalParams, 'DepositParam') - - if (CurrentBlock >= proposal.SubmitBlock + depositParam.MaxDepositPeriod) - proposal.CurrentStatus = ProposalStatusClosed - - else - // sender can deposit - sender.AtomBalance -= txGovDeposit.Deposit.Atoms - - proposal.Deposits.append({txGovVote.Deposit, sender}) - proposal.TotalDeposit.Plus(txGovDeposit.Deposit) - - if (proposal.TotalDeposit >= depositParam.MinDeposit) - // MinDeposit is reached, vote opens - - proposal.VotingStartBlock = CurrentBlock - proposal.CurrentStatus = ProposalStatusActive - ProposalProcessingQueue.push(txGovDeposit.ProposalID) - - store(Proposals, , proposal) -``` - ### Vote Once `ActiveParam.MinDeposit` is reached, voting period starts. From there, @@ -659,35 +572,6 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/gov/v1/tx.pro Gas cost for this message has to take into account the future tallying of the vote in EndBlocker. ::: -Next is a pseudocode outline of the way `MsgVote` transactions are handled: - -```go - // PSEUDOCODE // - // Check if MsgVote is valid. If it is, count vote// - - upon receiving txGovVote from sender do - // check if proposal is correctly formatted. Includes fee payment. - - if !correctlyFormatted(txGovDeposit) - throw - - proposal = load(Proposals, ) - - if (proposal == nil) - // There is no proposal for this proposalID - throw - - - if (proposal.CurrentStatus == ProposalStatusActive) - - - // Sender can vote if - // Proposal is active - // Sender has some bonds - - store(Governance, , txGovVote.Vote) // Voters can vote multiple times. Re-voting overrides previous vote. This is ok because tallying is done once at the end. -``` - ## Events The governance module emits the following events: @@ -768,6 +652,8 @@ The governance module contains the following parameters: | burn_proposal_deposit_prevote | bool | false | | burn_vote_quorum | bool | false | | burn_vote_veto | bool | true | +| min_initial_deposit_ratio | string | "0.1" | + **NOTE**: The governance module contains parameters that are objects unlike other modules. If only a subset of parameters are desired to be changed, only they need @@ -1181,6 +1067,10 @@ where `proposal.json` contains: By default the metadata, summary and title are both limited by 255 characters, this can be overridden by the application developer. ::: +:::tip +When metadata is not specified, the title is limited to 255 characters and the summary 40x the title length. +::: + ##### submit-legacy-proposal The `submit-legacy-proposal` command allows users to submit a governance legacy proposal along with an initial deposit. diff --git a/x/gov/abci.go b/x/gov/abci.go index 48c83d1da6ec..56ab8641bd10 100644 --- a/x/gov/abci.go +++ b/x/gov/abci.go @@ -6,6 +6,9 @@ import ( "time" "cosmossdk.io/collections" + "cosmossdk.io/log" + + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/gov/keeper" @@ -15,7 +18,7 @@ import ( // EndBlocker called every block, process inflation, update validator set. func EndBlocker(ctx sdk.Context, keeper *keeper.Keeper) error { - defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyEndBlocker) + defer telemetry.ModuleMeasureSince(types.ModuleName, telemetry.Now(), telemetry.MetricKeyEndBlocker) logger := ctx.Logger().With("module", "x/"+types.ModuleName) // delete dead proposals from store and returns theirs deposits. @@ -24,10 +27,26 @@ func EndBlocker(ctx sdk.Context, keeper *keeper.Keeper) error { err := keeper.InactiveProposalsQueue.Walk(ctx, rng, func(key collections.Pair[time.Time, uint64], _ uint64) (bool, error) { proposal, err := keeper.Proposals.Get(ctx, key.K2()) if err != nil { + // if the proposal has an encoding error, this means it cannot be processed by x/gov + // this could be due to some types missing their registration + // instead of returning an error (i.e, halting the chain), we fail the proposal + if errors.Is(err, collections.ErrEncoding) { + proposal.Id = key.K2() + if err := failUnsupportedProposal(logger, ctx, keeper, proposal, err.Error(), false); err != nil { + return false, err + } + + if err = keeper.DeleteProposal(ctx, proposal.Id); err != nil { + return false, err + } + + return false, nil + } + return false, err } - err = keeper.DeleteProposal(ctx, proposal.Id) - if err != nil { + + if err = keeper.DeleteProposal(ctx, proposal.Id); err != nil { return false, err } @@ -46,7 +65,13 @@ func EndBlocker(ctx sdk.Context, keeper *keeper.Keeper) error { } // called when proposal become inactive - keeper.Hooks().AfterProposalFailedMinDeposit(ctx, proposal.Id) + cacheCtx, writeCache := ctx.CacheContext() + err = keeper.Hooks().AfterProposalFailedMinDeposit(cacheCtx, proposal.Id) + if err == nil { // purposely ignoring the error here not to halt the chain if the hook fails + writeCache() + } else { + keeper.Logger(ctx).Error("failed to execute AfterProposalFailedMinDeposit hook", "error", err) + } ctx.EventManager().EmitEvent( sdk.NewEvent( @@ -67,7 +92,7 @@ func EndBlocker(ctx sdk.Context, keeper *keeper.Keeper) error { return false, nil }) - if err != nil && !errors.Is(err, collections.ErrInvalidIterator) { + if err != nil { return err } @@ -76,6 +101,22 @@ func EndBlocker(ctx sdk.Context, keeper *keeper.Keeper) error { err = keeper.ActiveProposalsQueue.Walk(ctx, rng, func(key collections.Pair[time.Time, uint64], _ uint64) (bool, error) { proposal, err := keeper.Proposals.Get(ctx, key.K2()) if err != nil { + // if the proposal has an encoding error, this means it cannot be processed by x/gov + // this could be due to some types missing their registration + // instead of returning an error (i.e, halting the chain), we fail the proposal + if errors.Is(err, collections.ErrEncoding) { + proposal.Id = key.K2() + if err := failUnsupportedProposal(logger, ctx, keeper, proposal, err.Error(), true); err != nil { + return false, err + } + + if err = keeper.ActiveProposalsQueue.Remove(ctx, collections.Join(*proposal.VotingEndTime, proposal.Id)); err != nil { + return false, err + } + + return false, nil + } + return false, err } @@ -96,14 +137,12 @@ func EndBlocker(ctx sdk.Context, keeper *keeper.Keeper) error { } else { err = keeper.RefundAndDeleteDeposits(ctx, proposal.Id) } - if err != nil { return false, err } } - err = keeper.ActiveProposalsQueue.Remove(ctx, collections.Join(*proposal.VotingEndTime, proposal.Id)) - if err != nil { + if err = keeper.ActiveProposalsQueue.Remove(ctx, collections.Join(*proposal.VotingEndTime, proposal.Id)); err != nil { return false, err } @@ -123,6 +162,7 @@ func EndBlocker(ctx sdk.Context, keeper *keeper.Keeper) error { messages, err := proposal.GetMsgs() if err != nil { proposal.Status = v1.StatusFailed + proposal.FailedReason = err.Error() tagValue = types.AttributeValueProposalFailed logMsg = fmt.Sprintf("passed proposal (%v) failed to execute; msgs: %s", proposal, err) @@ -132,9 +172,8 @@ func EndBlocker(ctx sdk.Context, keeper *keeper.Keeper) error { // execute all messages for idx, msg = range messages { handler := keeper.Router().Handler(msg) - var res *sdk.Result - res, err = handler(cacheCtx, msg) + res, err = safeExecuteHandler(cacheCtx, msg, handler) if err != nil { break } @@ -156,6 +195,7 @@ func EndBlocker(ctx sdk.Context, keeper *keeper.Keeper) error { ctx.EventManager().EmitEvents(events) } else { proposal.Status = v1.StatusFailed + proposal.FailedReason = err.Error() tagValue = types.AttributeValueProposalFailed logMsg = fmt.Sprintf("passed, but msg %d (%s) failed on execution: %s", idx, sdk.MsgTypeURL(msg), err) } @@ -181,6 +221,7 @@ func EndBlocker(ctx sdk.Context, keeper *keeper.Keeper) error { logMsg = "expedited proposal converted to regular" default: proposal.Status = v1.StatusRejected + proposal.FailedReason = "proposal did not get enough votes to pass" tagValue = types.AttributeValueProposalRejected logMsg = "rejected" } @@ -193,7 +234,13 @@ func EndBlocker(ctx sdk.Context, keeper *keeper.Keeper) error { } // when proposal become active - keeper.Hooks().AfterProposalVotingPeriodEnded(ctx, proposal.Id) + cacheCtx, writeCache := ctx.CacheContext() + err = keeper.Hooks().AfterProposalVotingPeriodEnded(cacheCtx, proposal.Id) + if err == nil { // purposely ignoring the error here not to halt the chain if the hook fails + writeCache() + } else { + keeper.Logger(ctx).Error("failed to execute AfterProposalVotingPeriodEnded hook", "error", err) + } logger.Info( "proposal tallied", @@ -215,8 +262,65 @@ func EndBlocker(ctx sdk.Context, keeper *keeper.Keeper) error { return false, nil }) - if err != nil && !errors.Is(err, collections.ErrInvalidIterator) { + if err != nil { + return err + } + return nil +} + +// executes handle(msg) and recovers from panic. +func safeExecuteHandler(ctx sdk.Context, msg sdk.Msg, handler baseapp.MsgServiceHandler, +) (res *sdk.Result, err error) { + defer func() { + if r := recover(); r != nil { + err = fmt.Errorf("handling x/gov proposal msg [%s] PANICKED: %v", msg, r) + } + }() + res, err = handler(ctx, msg) + return +} + +// failUnsupportedProposal fails a proposal that cannot be processed by gov +func failUnsupportedProposal( + logger log.Logger, + ctx sdk.Context, + keeper *keeper.Keeper, + proposal v1.Proposal, + errMsg string, + active bool, +) error { + proposal.Status = v1.StatusFailed + proposal.FailedReason = fmt.Sprintf("proposal failed because it cannot be processed by gov: %s", errMsg) + proposal.Messages = nil // clear out the messages + + if err := keeper.SetProposal(ctx, proposal); err != nil { + return err + } + + if err := keeper.RefundAndDeleteDeposits(ctx, proposal.Id); err != nil { return err } + + eventType := types.EventTypeInactiveProposal + if active { + eventType = types.EventTypeActiveProposal + } + + ctx.EventManager().EmitEvent( + sdk.NewEvent( + eventType, + sdk.NewAttribute(types.AttributeKeyProposalID, fmt.Sprintf("%d", proposal.Id)), + sdk.NewAttribute(types.AttributeKeyProposalResult, types.AttributeValueProposalFailed), + ), + ) + + logger.Info( + "proposal failed to decode; deleted", + "proposal", proposal.Id, + "expedited", proposal.Expedited, + "title", proposal.Title, + "results", errMsg, + ) + return nil } diff --git a/x/gov/abci_internal_test.go b/x/gov/abci_internal_test.go new file mode 100644 index 000000000000..1421a81b5cb6 --- /dev/null +++ b/x/gov/abci_internal_test.go @@ -0,0 +1,32 @@ +package gov + +import ( + "testing" + + "github.com/stretchr/testify/require" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func failingHandler(_ sdk.Context, _ sdk.Msg) (*sdk.Result, error) { + panic("test-fail") +} + +func okHandler(_ sdk.Context, _ sdk.Msg) (*sdk.Result, error) { + return new(sdk.Result), nil +} + +func TestSafeExecuteHandler(t *testing.T) { + t.Parallel() + + require := require.New(t) + var ctx sdk.Context + + r, err := safeExecuteHandler(ctx, nil, failingHandler) + require.ErrorContains(err, "test-fail") + require.Nil(r) + + r, err = safeExecuteHandler(ctx, nil, okHandler) + require.Nil(err) + require.NotNil(r) +} diff --git a/x/gov/abci_test.go b/x/gov/abci_test.go index bd3f916c197b..6c8a009fa205 100644 --- a/x/gov/abci_test.go +++ b/x/gov/abci_test.go @@ -4,11 +4,12 @@ import ( "testing" "time" - "cosmossdk.io/collections" - "cosmossdk.io/math" abci "github.com/cometbft/cometbft/abci/types" "github.com/stretchr/testify/require" + "cosmossdk.io/collections" + "cosmossdk.io/math" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -21,6 +22,65 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) +func TestUnregisteredProposal_InactiveProposalFails(t *testing.T) { + suite := createTestSuite(t) + ctx := suite.App.BaseApp.NewContext(false) + addrs := simtestutil.AddTestAddrs(suite.BankKeeper, suite.StakingKeeper, ctx, 10, valTokens) + + // manually set proposal in store + startTime, endTime := time.Now().Add(-4*time.Hour), ctx.BlockHeader().Time + proposal, err := v1.NewProposal([]sdk.Msg{ + &v1.Proposal{}, // invalid proposal message + }, 1, startTime, startTime, "", "Unsupported proposal", "Unsupported proposal", addrs[0], false) + require.NoError(t, err) + + err = suite.GovKeeper.SetProposal(ctx, proposal) + require.NoError(t, err) + + // manually set proposal in inactive proposal queue + err = suite.GovKeeper.InactiveProposalsQueue.Set(ctx, collections.Join(endTime, proposal.Id), proposal.Id) + require.NoError(t, err) + + checkInactiveProposalsQueue(t, ctx, suite.GovKeeper) + + err = gov.EndBlocker(ctx, suite.GovKeeper) + require.NoError(t, err) + + _, err = suite.GovKeeper.Proposals.Get(ctx, proposal.Id) + require.Error(t, err, collections.ErrNotFound) +} + +func TestUnregisteredProposal_ActiveProposalFails(t *testing.T) { + suite := createTestSuite(t) + ctx := suite.App.BaseApp.NewContext(false) + addrs := simtestutil.AddTestAddrs(suite.BankKeeper, suite.StakingKeeper, ctx, 10, valTokens) + + // manually set proposal in store + startTime, endTime := time.Now().Add(-4*time.Hour), ctx.BlockHeader().Time + proposal, err := v1.NewProposal([]sdk.Msg{ + &v1.Proposal{}, // invalid proposal message + }, 1, startTime, startTime, "", "Unsupported proposal", "Unsupported proposal", addrs[0], false) + require.NoError(t, err) + proposal.Status = v1.StatusVotingPeriod + proposal.VotingEndTime = &endTime + + err = suite.GovKeeper.SetProposal(ctx, proposal) + require.NoError(t, err) + + // manually set proposal in active proposal queue + err = suite.GovKeeper.ActiveProposalsQueue.Set(ctx, collections.Join(endTime, proposal.Id), proposal.Id) + require.NoError(t, err) + + checkActiveProposalsQueue(t, ctx, suite.GovKeeper) + + err = gov.EndBlocker(ctx, suite.GovKeeper) + require.NoError(t, err) + + p, err := suite.GovKeeper.Proposals.Get(ctx, proposal.Id) + require.NoError(t, err) + require.Equal(t, v1.StatusFailed, p.Status) +} + func TestTickExpiredDepositPeriod(t *testing.T) { suite := createTestSuite(t) app := suite.App @@ -34,11 +94,11 @@ func TestTickExpiredDepositPeriod(t *testing.T) { govMsgSvr := keeper.NewMsgServerImpl(suite.GovKeeper) - checkInactiveProposalsQueue(t, ctx, suite.GovKeeper, true) + checkInactiveProposalsQueue(t, ctx, suite.GovKeeper) newProposalMsg, err := v1.NewMsgSubmitProposal( []sdk.Msg{mkTestLegacyContent(t)}, - sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 5)}, + sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 100000)}, addrs[0].String(), "", "Proposal", @@ -51,25 +111,25 @@ func TestTickExpiredDepositPeriod(t *testing.T) { require.NoError(t, err) require.NotNil(t, res) - checkInactiveProposalsQueue(t, ctx, suite.GovKeeper, true) + checkInactiveProposalsQueue(t, ctx, suite.GovKeeper) newHeader := ctx.BlockHeader() newHeader.Time = ctx.BlockHeader().Time.Add(time.Duration(1) * time.Second) ctx = ctx.WithBlockHeader(newHeader) - checkInactiveProposalsQueue(t, ctx, suite.GovKeeper, true) + checkInactiveProposalsQueue(t, ctx, suite.GovKeeper) params, _ := suite.GovKeeper.Params.Get(ctx) newHeader = ctx.BlockHeader() newHeader.Time = ctx.BlockHeader().Time.Add(*params.MaxDepositPeriod) ctx = ctx.WithBlockHeader(newHeader) - checkInactiveProposalsQueue(t, ctx, suite.GovKeeper, false) + checkInactiveProposalsQueue(t, ctx, suite.GovKeeper) err = gov.EndBlocker(ctx, suite.GovKeeper) require.NoError(t, err) - checkInactiveProposalsQueue(t, ctx, suite.GovKeeper, true) + checkInactiveProposalsQueue(t, ctx, suite.GovKeeper) } func TestTickMultipleExpiredDepositPeriod(t *testing.T) { @@ -85,11 +145,11 @@ func TestTickMultipleExpiredDepositPeriod(t *testing.T) { govMsgSvr := keeper.NewMsgServerImpl(suite.GovKeeper) - checkInactiveProposalsQueue(t, ctx, suite.GovKeeper, true) + checkInactiveProposalsQueue(t, ctx, suite.GovKeeper) newProposalMsg, err := v1.NewMsgSubmitProposal( []sdk.Msg{mkTestLegacyContent(t)}, - sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 5)}, + sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 100000)}, addrs[0].String(), "", "Proposal", @@ -102,17 +162,17 @@ func TestTickMultipleExpiredDepositPeriod(t *testing.T) { require.NoError(t, err) require.NotNil(t, res) - checkInactiveProposalsQueue(t, ctx, suite.GovKeeper, true) + checkInactiveProposalsQueue(t, ctx, suite.GovKeeper) newHeader := ctx.BlockHeader() newHeader.Time = ctx.BlockHeader().Time.Add(time.Duration(2) * time.Second) ctx = ctx.WithBlockHeader(newHeader) - checkInactiveProposalsQueue(t, ctx, suite.GovKeeper, true) + checkInactiveProposalsQueue(t, ctx, suite.GovKeeper) newProposalMsg2, err := v1.NewMsgSubmitProposal( []sdk.Msg{mkTestLegacyContent(t)}, - sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 5)}, + sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 100000)}, addrs[0].String(), "", "Proposal", @@ -130,17 +190,17 @@ func TestTickMultipleExpiredDepositPeriod(t *testing.T) { newHeader.Time = ctx.BlockHeader().Time.Add(*params.MaxDepositPeriod).Add(time.Duration(-1) * time.Second) ctx = ctx.WithBlockHeader(newHeader) - checkInactiveProposalsQueue(t, ctx, suite.GovKeeper, false) + checkInactiveProposalsQueue(t, ctx, suite.GovKeeper) require.NoError(t, gov.EndBlocker(ctx, suite.GovKeeper)) - checkInactiveProposalsQueue(t, ctx, suite.GovKeeper, true) + checkInactiveProposalsQueue(t, ctx, suite.GovKeeper) newHeader = ctx.BlockHeader() newHeader.Time = ctx.BlockHeader().Time.Add(time.Duration(5) * time.Second) ctx = ctx.WithBlockHeader(newHeader) - checkInactiveProposalsQueue(t, ctx, suite.GovKeeper, false) + checkInactiveProposalsQueue(t, ctx, suite.GovKeeper) require.NoError(t, gov.EndBlocker(ctx, suite.GovKeeper)) - checkInactiveProposalsQueue(t, ctx, suite.GovKeeper, true) + checkInactiveProposalsQueue(t, ctx, suite.GovKeeper) } func TestTickPassedDepositPeriod(t *testing.T) { @@ -158,7 +218,7 @@ func TestTickPassedDepositPeriod(t *testing.T) { newProposalMsg, err := v1.NewMsgSubmitProposal( []sdk.Msg{mkTestLegacyContent(t)}, - sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 5)}, + sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 100000)}, addrs[0].String(), "", "Proposal", @@ -173,21 +233,21 @@ func TestTickPassedDepositPeriod(t *testing.T) { proposalID := res.ProposalId - checkInactiveProposalsQueue(t, ctx, suite.GovKeeper, true) + checkInactiveProposalsQueue(t, ctx, suite.GovKeeper) newHeader := ctx.BlockHeader() newHeader.Time = ctx.BlockHeader().Time.Add(time.Duration(1) * time.Second) ctx = ctx.WithBlockHeader(newHeader) - checkInactiveProposalsQueue(t, ctx, suite.GovKeeper, true) + checkInactiveProposalsQueue(t, ctx, suite.GovKeeper) - newDepositMsg := v1.NewMsgDeposit(addrs[1], proposalID, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 5)}) + newDepositMsg := v1.NewMsgDeposit(addrs[1], proposalID, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 100000)}) res1, err := govMsgSvr.Deposit(ctx, newDepositMsg) require.NoError(t, err) require.NotNil(t, res1) - checkActiveProposalsQueue(t, ctx, suite.GovKeeper, true) + checkActiveProposalsQueue(t, ctx, suite.GovKeeper) } func TestTickPassedVotingPeriod(t *testing.T) { @@ -221,8 +281,8 @@ func TestTickPassedVotingPeriod(t *testing.T) { govMsgSvr := keeper.NewMsgServerImpl(suite.GovKeeper) - checkInactiveProposalsQueue(t, ctx, suite.GovKeeper, true) - checkActiveProposalsQueue(t, ctx, suite.GovKeeper, true) + checkInactiveProposalsQueue(t, ctx, suite.GovKeeper) + checkActiveProposalsQueue(t, ctx, suite.GovKeeper) proposalCoins := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, suite.StakingKeeper.TokensFromConsensusPower(ctx, 5*depositMultiplier))} newProposalMsg, err := v1.NewMsgSubmitProposal([]sdk.Msg{mkTestLegacyContent(t)}, proposalCoins, addrs[0].String(), "", "Proposal", "description of proposal", tc.expedited) @@ -254,8 +314,8 @@ func TestTickPassedVotingPeriod(t *testing.T) { newHeader.Time = ctx.BlockHeader().Time.Add(*params.MaxDepositPeriod).Add(*votingPeriod) ctx = ctx.WithBlockHeader(newHeader) - checkInactiveProposalsQueue(t, ctx, suite.GovKeeper, true) - checkActiveProposalsQueue(t, ctx, suite.GovKeeper, false) + checkInactiveProposalsQueue(t, ctx, suite.GovKeeper) + checkActiveProposalsQueue(t, ctx, suite.GovKeeper) proposal, err := suite.GovKeeper.Proposals.Get(ctx, res.ProposalId) require.NoError(t, err) @@ -265,12 +325,12 @@ func TestTickPassedVotingPeriod(t *testing.T) { require.NoError(t, err) if !tc.expedited { - checkActiveProposalsQueue(t, ctx, suite.GovKeeper, true) + checkActiveProposalsQueue(t, ctx, suite.GovKeeper) return } // If expedited, it should be converted to a regular proposal instead. - checkActiveProposalsQueue(t, ctx, suite.GovKeeper, false) + checkActiveProposalsQueue(t, ctx, suite.GovKeeper) proposal, err = suite.GovKeeper.Proposals.Get(ctx, res.ProposalId) require.Nil(t, err) @@ -378,7 +438,7 @@ func TestEndBlockerProposalHandlerFailed(t *testing.T) { createValidators(t, stakingMsgSvr, ctx, []sdk.ValAddress{valAddr}, []int64{10}) suite.StakingKeeper.EndBlocker(ctx) - msg := banktypes.NewMsgSend(authtypes.NewModuleAddress(types.ModuleName), addrs[0], sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000)))) + msg := banktypes.NewMsgSend(authtypes.NewModuleAddress(types.ModuleName), addrs[0], sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(100000)))) proposal, err := suite.GovKeeper.SubmitProposal(ctx, []sdk.Msg{msg}, "", "title", "summary", proposer, false) require.NoError(t, err) @@ -463,8 +523,8 @@ func TestExpeditedProposal_PassAndConversionToRegular(t *testing.T) { createValidators(t, stakingMsgSvr, ctx, []sdk.ValAddress{valAddr}, []int64{10}) suite.StakingKeeper.EndBlocker(ctx) - checkInactiveProposalsQueue(t, ctx, suite.GovKeeper, true) - checkActiveProposalsQueue(t, ctx, suite.GovKeeper, true) + checkInactiveProposalsQueue(t, ctx, suite.GovKeeper) + checkActiveProposalsQueue(t, ctx, suite.GovKeeper) macc := suite.GovKeeper.GetGovernanceAccount(ctx) require.NotNil(t, macc) @@ -497,8 +557,8 @@ func TestExpeditedProposal_PassAndConversionToRegular(t *testing.T) { newHeader.Time = ctx.BlockHeader().Time.Add(*params.MaxDepositPeriod).Add(*params.ExpeditedVotingPeriod) ctx = ctx.WithBlockHeader(newHeader) - checkInactiveProposalsQueue(t, ctx, suite.GovKeeper, true) - checkActiveProposalsQueue(t, ctx, suite.GovKeeper, false) + checkInactiveProposalsQueue(t, ctx, suite.GovKeeper) + checkActiveProposalsQueue(t, ctx, suite.GovKeeper) proposal, err := suite.GovKeeper.Proposals.Get(ctx, res.ProposalId) require.Nil(t, err) @@ -514,7 +574,7 @@ func TestExpeditedProposal_PassAndConversionToRegular(t *testing.T) { gov.EndBlocker(ctx, suite.GovKeeper) if tc.expeditedPasses { - checkActiveProposalsQueue(t, ctx, suite.GovKeeper, true) + checkActiveProposalsQueue(t, ctx, suite.GovKeeper) proposal, err = suite.GovKeeper.Proposals.Get(ctx, res.ProposalId) require.Nil(t, err) @@ -535,7 +595,7 @@ func TestExpeditedProposal_PassAndConversionToRegular(t *testing.T) { } // Expedited proposal should be converted to a regular proposal instead. - checkActiveProposalsQueue(t, ctx, suite.GovKeeper, false) + checkActiveProposalsQueue(t, ctx, suite.GovKeeper) proposal, err = suite.GovKeeper.Proposals.Get(ctx, res.ProposalId) require.Nil(t, err) require.Equal(t, v1.StatusVotingPeriod, proposal.Status) @@ -556,8 +616,8 @@ func TestExpeditedProposal_PassAndConversionToRegular(t *testing.T) { newHeader.Time = ctx.BlockHeader().Time.Add(*params.MaxDepositPeriod).Add(*params.VotingPeriod) ctx = ctx.WithBlockHeader(newHeader) - checkInactiveProposalsQueue(t, ctx, suite.GovKeeper, true) - checkActiveProposalsQueue(t, ctx, suite.GovKeeper, false) + checkInactiveProposalsQueue(t, ctx, suite.GovKeeper) + checkActiveProposalsQueue(t, ctx, suite.GovKeeper) if tc.regularEventuallyPassing { // Validator votes YES, letting the converted regular proposal pass. @@ -575,7 +635,7 @@ func TestExpeditedProposal_PassAndConversionToRegular(t *testing.T) { submitterEventualBalance := suite.BankKeeper.GetAllBalances(ctx, addrs[0]) depositorEventualBalance := suite.BankKeeper.GetAllBalances(ctx, addrs[1]) - checkActiveProposalsQueue(t, ctx, suite.GovKeeper, true) + checkActiveProposalsQueue(t, ctx, suite.GovKeeper) proposal, err = suite.GovKeeper.Proposals.Get(ctx, res.ProposalId) require.Nil(t, err) @@ -606,7 +666,7 @@ func createValidators(t *testing.T, stakingMsgSvr stakingtypes.MsgServer, ctx sd for i := 0; i < len(addrs); i++ { valTokens := sdk.TokensFromConsensusPower(powerAmt[i], sdk.DefaultPowerReduction) valCreateMsg, err := stakingtypes.NewMsgCreateValidator( - addrs[i], pubkeys[i], sdk.NewCoin(sdk.DefaultBondDenom, valTokens), + addrs[i].String(), pubkeys[i], sdk.NewCoin(sdk.DefaultBondDenom, valTokens), TestDescription, TestCommissionRates, math.OneInt(), ) require.NoError(t, err) @@ -627,24 +687,18 @@ func getDepositMultiplier(expedited bool) int64 { return 1 } -func checkActiveProposalsQueue(t *testing.T, ctx sdk.Context, k *keeper.Keeper, invalid bool) { +func checkActiveProposalsQueue(t *testing.T, ctx sdk.Context, k *keeper.Keeper) { err := k.ActiveProposalsQueue.Walk(ctx, collections.NewPrefixUntilPairRange[time.Time, uint64](ctx.BlockTime()), func(key collections.Pair[time.Time, uint64], value uint64) (stop bool, err error) { return false, err }) - if invalid { - require.ErrorIs(t, err, collections.ErrInvalidIterator) - } else { - require.NoError(t, err) - } + + require.NoError(t, err) } -func checkInactiveProposalsQueue(t *testing.T, ctx sdk.Context, k *keeper.Keeper, invalid bool) { +func checkInactiveProposalsQueue(t *testing.T, ctx sdk.Context, k *keeper.Keeper) { err := k.InactiveProposalsQueue.Walk(ctx, collections.NewPrefixUntilPairRange[time.Time, uint64](ctx.BlockTime()), func(key collections.Pair[time.Time, uint64], value uint64) (stop bool, err error) { return false, err }) - if invalid { - require.ErrorIs(t, err, collections.ErrInvalidIterator) - } else { - require.NoError(t, err) - } + + require.NoError(t, err) } diff --git a/x/gov/autocli.go b/x/gov/autocli.go index 3b53657f79e7..8512a2878c38 100644 --- a/x/gov/autocli.go +++ b/x/gov/autocli.go @@ -1,27 +1,141 @@ package gov import ( + "fmt" + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" govv1 "cosmossdk.io/api/cosmos/gov/v1" - govv1beta1 "cosmossdk.io/api/cosmos/gov/v1beta1" + + "github.com/cosmos/cosmos-sdk/version" ) // AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { return &autocliv1.ModuleOptions{ - Tx: &autocliv1.ServiceCommandDescriptor{ - Service: govv1.Msg_ServiceDesc.ServiceName, - // map v1beta1 as a sub-command - SubCommands: map[string]*autocliv1.ServiceCommandDescriptor{ - "v1beta1": {Service: govv1beta1.Msg_ServiceDesc.ServiceName}, - }, - }, Query: &autocliv1.ServiceCommandDescriptor{ Service: govv1.Query_ServiceDesc.ServiceName, - // map v1beta1 as a sub-command - SubCommands: map[string]*autocliv1.ServiceCommandDescriptor{ - "v1beta1": {Service: govv1beta1.Query_ServiceDesc.ServiceName}, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Params", + Use: "params", + Short: "Query the parameters of the governance process", + Long: "Query the parameters of the governance process. Specify specific param types (voting|tallying|deposit) to filter results.", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "params_type", Optional: true}, + }, + }, + { + RpcMethod: "Proposals", + Use: "proposals", + Short: "Query proposals with optional filters", + Example: fmt.Sprintf("%[1]s query gov proposals --depositor cosmos1...\n%[1]s query gov proposals --voter cosmos1...\n%[1]s query gov proposals --proposal-status (unspecified | deposit-period | voting-period | passed | rejected | failed)", version.AppName), + }, + { + RpcMethod: "Proposal", + Use: "proposal [proposal-id]", + Alias: []string{"proposer"}, + Short: "Query details of a single proposal", + Example: fmt.Sprintf("%s query gov proposal 1", version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "proposal_id"}, + }, + }, + { + RpcMethod: "Vote", + Use: "vote [proposal-id] [voter-addr]", + Short: "Query details of a single vote", + Example: fmt.Sprintf("%s query gov vote 1 cosmos1...", version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "proposal_id"}, + {ProtoField: "voter"}, + }, + }, + { + RpcMethod: "Votes", + Use: "votes [proposal-id]", + Short: "Query votes of a single proposal", + Example: fmt.Sprintf("%s query gov votes 1", version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "proposal_id"}, + }, + }, + { + RpcMethod: "Deposit", + Use: "deposit [proposal-id] [depositer-addr]", + Short: "Query details of a deposit", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "proposal_id"}, + {ProtoField: "depositor"}, + }, + }, + { + RpcMethod: "Deposits", + Use: "deposits [proposal-id]", + Short: "Query deposits on a proposal", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "proposal_id"}, + }, + }, + { + RpcMethod: "TallyResult", + Use: "tally [proposal-id]", + Short: "Query the tally of a proposal vote", + Example: fmt.Sprintf("%s query gov tally 1", version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "proposal_id"}, + }, + }, + { + RpcMethod: "Constitution", + Use: "constitution", + Short: "Query the current chain constitution", + }, + }, + EnhanceCustomCommand: true, // We still have manual commands in gov that we want to keep + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: govv1.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Deposit", + Use: "deposit [proposal-id] [deposit]", + Short: "Deposit tokens for an active proposal", + Long: fmt.Sprintf(`Submit a deposit for an active proposal. You can find the proposal-id by running "%s query gov proposals"`, version.AppName), + Example: fmt.Sprintf(`$ %s tx gov deposit 1 10stake --from mykey`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "proposal_id"}, + {ProtoField: "amount", Varargs: true}, + }, + }, + { + RpcMethod: "CancelProposal", + Use: "cancel-proposal [proposal-id]", + Short: "Cancel governance proposal before the voting period ends. Must be signed by the proposal creator.", + Example: fmt.Sprintf(`$ %s tx gov cancel-proposal 1 --from mykey`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "proposal_id"}, + }, + }, + { + RpcMethod: "Vote", + Use: "vote [proposal-id] [option]", + Short: "Vote for an active proposal, options: yes/no/no-with-veto/abstain", + Long: fmt.Sprintf(`Submit a vote for an active proposal. Use the --metadata to optionally give a reason. You can find the proposal-id by running "%s query gov proposals"`, version.AppName), + Example: fmt.Sprintf("$ %s tx gov vote 1 yes --from mykey", version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "proposal_id"}, + {ProtoField: "option"}, + }, + FlagOptions: map[string]*autocliv1.FlagOptions{ + "metadata": {Name: "metadata", Usage: "Add a description to the vote"}, + }, + }, + { + RpcMethod: "UpdateParams", + Skip: true, // skipped because authority gated + }, }, + EnhanceCustomCommand: false, // use custom commands only until v0.51 }, } } diff --git a/x/gov/client/cli/prompt.go b/x/gov/client/cli/prompt.go index a75d7c9eda87..1722c53e2eab 100644 --- a/x/gov/client/cli/prompt.go +++ b/x/gov/client/cli/prompt.go @@ -76,15 +76,11 @@ func Prompt[T any](data T, namePrefix string) (T, error) { // create prompts prompt := promptui.Prompt{ - Label: fmt.Sprintf("Enter %s's %s", namePrefix, strings.ToLower(client.CamelCaseToString(v.Type().Field(i).Name))), + Label: fmt.Sprintf("Enter %s %s", namePrefix, strings.ToLower(client.CamelCaseToString(v.Type().Field(i).Name))), Validate: client.ValidatePromptNotEmpty, } fieldName := strings.ToLower(v.Type().Field(i).Name) - // validation per field name - if strings.Contains(fieldName, "url") { - prompt.Validate = client.ValidatePromptURL - } if strings.EqualFold(fieldName, "authority") { // pre-fill with gov address @@ -92,6 +88,7 @@ func Prompt[T any](data T, namePrefix string) (T, error) { prompt.Validate = client.ValidatePromptAddress } + // TODO(@julienrbrt) use scalar annotation instead of dumb string name matching if strings.Contains(fieldName, "addr") || strings.Contains(fieldName, "sender") || strings.Contains(fieldName, "voter") || @@ -150,9 +147,8 @@ type proposalType struct { } // Prompt the proposal type values and return the proposal and its metadata -func (p *proposalType) Prompt(cdc codec.Codec) (*proposal, types.ProposalMetadata, error) { - // set metadata - metadata, err := Prompt(types.ProposalMetadata{}, "proposal") +func (p *proposalType) Prompt(cdc codec.Codec, skipMetadata bool) (*proposal, types.ProposalMetadata, error) { + metadata, err := PromptMetadata(skipMetadata) if err != nil { return nil, metadata, fmt.Errorf("failed to set proposal metadata: %w", err) } @@ -201,8 +197,45 @@ func getProposalSuggestions() []string { return types } +// PromptMetadata prompts for proposal metadata or only title and summary if skip is true +func PromptMetadata(skip bool) (types.ProposalMetadata, error) { + if !skip { + metadata, err := Prompt(types.ProposalMetadata{}, "proposal") + if err != nil { + return metadata, fmt.Errorf("failed to set proposal metadata: %w", err) + } + + return metadata, nil + } + + // prompt for title and summary + titlePrompt := promptui.Prompt{ + Label: "Enter proposal title", + Validate: client.ValidatePromptNotEmpty, + } + + title, err := titlePrompt.Run() + if err != nil { + return types.ProposalMetadata{}, fmt.Errorf("failed to set proposal title: %w", err) + } + + summaryPrompt := promptui.Prompt{ + Label: "Enter proposal summary", + Validate: client.ValidatePromptNotEmpty, + } + + summary, err := summaryPrompt.Run() + if err != nil { + return types.ProposalMetadata{}, fmt.Errorf("failed to set proposal summary: %w", err) + } + + return types.ProposalMetadata{Title: title, Summary: summary}, nil +} + // NewCmdDraftProposal let a user generate a draft proposal. func NewCmdDraftProposal() *cobra.Command { + flagSkipMetadata := "skip-metadata" + cmd := &cobra.Command{ Use: "draft-proposal", Short: "Generate a draft proposal json file. The generated proposal json contains only one message (skeleton).", @@ -260,7 +293,9 @@ func NewCmdDraftProposal() *cobra.Command { } } - result, metadata, err := proposal.Prompt(clientCtx.Codec) + skipMetadataPrompt, _ := cmd.Flags().GetBool(flagSkipMetadata) + + result, metadata, err := proposal.Prompt(clientCtx.Codec, skipMetadataPrompt) if err != nil { return err } @@ -269,17 +304,20 @@ func NewCmdDraftProposal() *cobra.Command { return err } - if err := writeFile(draftMetadataFileName, metadata); err != nil { - return err + if !skipMetadataPrompt { + if err := writeFile(draftMetadataFileName, metadata); err != nil { + return err + } } - fmt.Printf("The draft proposal has successfully been generated.\nProposals should contain off-chain metadata, please upload the metadata JSON to IPFS.\nThen, replace the generated metadata field with the IPFS CID.\n") + cmd.Println("The draft proposal has successfully been generated.\nProposals should contain off-chain metadata, please upload the metadata JSON to IPFS.\nThen, replace the generated metadata field with the IPFS CID.") return nil }, } flags.AddTxFlagsToCmd(cmd) + cmd.Flags().Bool(flagSkipMetadata, false, "skip metadata prompt") return cmd } diff --git a/x/gov/client/cli/query.go b/x/gov/client/cli/query.go deleted file mode 100644 index 9907f05d89de..000000000000 --- a/x/gov/client/cli/query.go +++ /dev/null @@ -1,677 +0,0 @@ -package cli - -import ( - "fmt" - "strconv" - "strings" - - "cosmossdk.io/core/address" - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/version" - gcutils "github.com/cosmos/cosmos-sdk/x/gov/client/utils" - "github.com/cosmos/cosmos-sdk/x/gov/types" - v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" -) - -// GetQueryCmd returns the cli query commands for this module -func GetQueryCmd(ac address.Codec) *cobra.Command { - // Group gov queries under a subcommand - govQueryCmd := &cobra.Command{ - Use: types.ModuleName, - Short: "Querying commands for the governance module", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - govQueryCmd.AddCommand( - GetCmdQueryProposal(), - GetCmdQueryProposals(ac), - GetCmdQueryVote(ac), - GetCmdQueryVotes(), - GetCmdQueryParams(), - GetCmdQueryParam(), - GetCmdQueryProposer(), - GetCmdQueryDeposit(), - GetCmdQueryDeposits(), - GetCmdQueryTally(), - GetCmdConstitution(), - ) - - return govQueryCmd -} - -// GetCmdQueryProposal implements the query proposal command. -func GetCmdQueryProposal() *cobra.Command { - cmd := &cobra.Command{ - Use: "proposal [proposal-id]", - Args: cobra.ExactArgs(1), - Short: "Query details of a single proposal", - Long: strings.TrimSpace( - fmt.Sprintf(`Query details for a proposal. You can find the -proposal-id by running "%s query gov proposals". - -Example: -$ %s query gov proposal 1 -`, - version.AppName, version.AppName, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := v1.NewQueryClient(clientCtx) - - // validate that the proposal id is a uint - proposalID, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return fmt.Errorf("proposal-id %s not a valid uint, please input a valid proposal-id", args[0]) - } - - // Query the proposal - res, err := queryClient.Proposal( - cmd.Context(), - &v1.QueryProposalRequest{ProposalId: proposalID}, - ) - if err != nil { - return err - } - - return clientCtx.PrintProto(res.Proposal) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdQueryProposals implements a query proposals command. Command to Get -// Proposals Information. -func GetCmdQueryProposals(ac address.Codec) *cobra.Command { - cmd := &cobra.Command{ - Use: "proposals", - Short: "Query proposals with optional filters", - Long: strings.TrimSpace( - fmt.Sprintf(`Query for a all paginated proposals that match optional filters: - -Example: -$ %s query gov proposals --depositor cosmos1skjwj5whet0lpe65qaq4rpq03hjxlwd9nf39lk -$ %s query gov proposals --voter cosmos1skjwj5whet0lpe65qaq4rpq03hjxlwd9nf39lk -$ %s query gov proposals --status (DepositPeriod|VotingPeriod|Passed|Rejected) -$ %s query gov proposals --page=2 --limit=100 -`, - version.AppName, version.AppName, version.AppName, version.AppName, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - bechDepositorAddr, _ := cmd.Flags().GetString(flagDepositor) - bechVoterAddr, _ := cmd.Flags().GetString(flagVoter) - strProposalStatus, _ := cmd.Flags().GetString(flagStatus) - - var proposalStatus v1.ProposalStatus - - if len(bechDepositorAddr) != 0 { - _, err := ac.StringToBytes(bechDepositorAddr) - if err != nil { - return err - } - } - - if len(bechVoterAddr) != 0 { - _, err := ac.StringToBytes(bechVoterAddr) - if err != nil { - return err - } - } - - if len(strProposalStatus) != 0 { - proposalStatus1, err := v1.ProposalStatusFromString(gcutils.NormalizeProposalStatus(strProposalStatus)) - proposalStatus = proposalStatus1 - if err != nil { - return err - } - } - - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := v1.NewQueryClient(clientCtx) - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - res, err := queryClient.Proposals( - cmd.Context(), - &v1.QueryProposalsRequest{ - ProposalStatus: proposalStatus, - Voter: bechVoterAddr, - Depositor: bechDepositorAddr, - Pagination: pageReq, - }, - ) - if err != nil { - return err - } - - if len(res.GetProposals()) == 0 { - return fmt.Errorf("no proposals found") - } - - return clientCtx.PrintProto(res) - }, - } - - cmd.Flags().String(flagDepositor, "", "(optional) filter by proposals deposited on by depositor") - cmd.Flags().String(flagVoter, "", "(optional) filter by proposals voted on by voted") - cmd.Flags().String(flagStatus, "", "(optional) filter proposals by proposal status, status: deposit_period/voting_period/passed/rejected") - flags.AddPaginationFlagsToCmd(cmd, "proposals") - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdQueryVote implements the query proposal vote command. Command to Get a -// Vote Information. -func GetCmdQueryVote(ac address.Codec) *cobra.Command { - cmd := &cobra.Command{ - Use: "vote [proposal-id] [voter-addr]", - Args: cobra.ExactArgs(2), - Short: "Query details of a single vote", - Long: strings.TrimSpace( - fmt.Sprintf(`Query details for a single vote on a proposal given its identifier. - -Example: -$ %s query gov vote 1 cosmos1skjwj5whet0lpe65qaq4rpq03hjxlwd9nf39lk -`, - version.AppName, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := v1.NewQueryClient(clientCtx) - - // validate that the proposal id is a uint - proposalID, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return fmt.Errorf("proposal-id %s not a valid int, please input a valid proposal-id", args[0]) - } - - // check to see if the proposal is in the store - ctx := cmd.Context() - _, err = queryClient.Proposal( - ctx, - &v1.QueryProposalRequest{ProposalId: proposalID}, - ) - if err != nil { - return fmt.Errorf("failed to fetch proposal-id %d: %s", proposalID, err) - } - - voterAddr, err := ac.StringToBytes(args[1]) - if err != nil { - return err - } - - res, err := queryClient.Vote( - ctx, - &v1.QueryVoteRequest{ProposalId: proposalID, Voter: args[1]}, - ) - if err != nil { - return err - } - - vote := res.GetVote() - if vote.Empty() { - params := v1.NewQueryVoteParams(proposalID, voterAddr) - resByTxQuery, err := gcutils.QueryVoteByTxQuery(clientCtx, params) - if err != nil { - return err - } - - if err := clientCtx.Codec.UnmarshalJSON(resByTxQuery, vote); err != nil { - return err - } - } - - return clientCtx.PrintProto(res.Vote) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdQueryVotes implements the command to query for proposal votes. -func GetCmdQueryVotes() *cobra.Command { - cmd := &cobra.Command{ - Use: "votes [proposal-id]", - Args: cobra.ExactArgs(1), - Short: "Query votes on a proposal", - Long: strings.TrimSpace( - fmt.Sprintf(`Query vote details for a single proposal by its identifier. - -Example: -$ %[1]s query gov votes 1 -$ %[1]s query gov votes 1 --page=2 --limit=100 -`, - version.AppName, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := v1.NewQueryClient(clientCtx) - - // validate that the proposal id is a uint - proposalID, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return fmt.Errorf("proposal-id %s not a valid int, please input a valid proposal-id", args[0]) - } - - // check to see if the proposal is in the store - ctx := cmd.Context() - proposalRes, err := queryClient.Proposal( - ctx, - &v1.QueryProposalRequest{ProposalId: proposalID}, - ) - if err != nil { - return fmt.Errorf("failed to fetch proposal-id %d: %s", proposalID, err) - } - - propStatus := proposalRes.GetProposal().Status - if !(propStatus == v1.StatusVotingPeriod || propStatus == v1.StatusDepositPeriod) { - page, _ := cmd.Flags().GetInt(flags.FlagPage) - limit, _ := cmd.Flags().GetInt(flags.FlagLimit) - - params := v1.NewQueryProposalVotesParams(proposalID, page, limit) - resByTxQuery, err := gcutils.QueryVotesByTxQuery(clientCtx, params) - if err != nil { - return err - } - - var votes v1.Votes - // TODO migrate to use JSONCodec (implement MarshalJSONArray - // or wrap lists of proto.Message in some other message) - clientCtx.LegacyAmino.MustUnmarshalJSON(resByTxQuery, &votes) - return clientCtx.PrintObjectLegacy(votes) - - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - res, err := queryClient.Votes( - ctx, - &v1.QueryVotesRequest{ProposalId: proposalID, Pagination: pageReq}, - ) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddPaginationFlagsToCmd(cmd, "votes") - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdQueryDeposit implements the query proposal deposit command. Command to -// get a specific Deposit Information. -func GetCmdQueryDeposit() *cobra.Command { - cmd := &cobra.Command{ - Use: "deposit [proposal-id] [depositer-addr]", - Args: cobra.ExactArgs(2), - Short: "Query details of a deposit", - Long: strings.TrimSpace( - fmt.Sprintf(`Query details for a single proposal deposit on a proposal by its identifier. - -Example: -$ %s query gov deposit 1 cosmos1skjwj5whet0lpe65qaq4rpq03hjxlwd9nf39lk -`, - version.AppName, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := v1.NewQueryClient(clientCtx) - - // validate that the proposal id is a uint - proposalID, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return fmt.Errorf("proposal-id %s not a valid uint, please input a valid proposal-id", args[0]) - } - - // check to see if the proposal is in the store - ctx := cmd.Context() - _, err = queryClient.Proposal( - ctx, - &v1.QueryProposalRequest{ProposalId: proposalID}, - ) - if err != nil { - return fmt.Errorf("failed to fetch proposal-id %d: %s", proposalID, err) - } - - res, err := queryClient.Deposit( - ctx, - &v1.QueryDepositRequest{ProposalId: proposalID, Depositor: args[1]}, - ) - if err != nil { - return err - } - - return clientCtx.PrintProto(res.Deposit) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdQueryDeposits implements the command to query for proposal deposits. -func GetCmdQueryDeposits() *cobra.Command { - cmd := &cobra.Command{ - Use: "deposits [proposal-id]", - Args: cobra.ExactArgs(1), - Short: "Query deposits on a proposal", - Long: strings.TrimSpace( - fmt.Sprintf(`Query details for all deposits on a proposal. -You can find the proposal-id by running "%s query gov proposals". - -Example: -$ %s query gov deposits 1 -`, - version.AppName, version.AppName, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := v1.NewQueryClient(clientCtx) - - // validate that the proposal id is a uint - proposalID, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return fmt.Errorf("proposal-id %s not a valid uint, please input a valid proposal-id", args[0]) - } - - // check to see if the proposal is in the store - ctx := cmd.Context() - _, err = queryClient.Proposal( - ctx, - &v1.QueryProposalRequest{ProposalId: proposalID}, - ) - if err != nil { - return fmt.Errorf("failed to fetch proposal-id %d: %s", proposalID, err) - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - res, err := queryClient.Deposits( - ctx, - &v1.QueryDepositsRequest{ProposalId: proposalID, Pagination: pageReq}, - ) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddPaginationFlagsToCmd(cmd, "deposits") - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdQueryTally implements the command to query for proposal tally result. -func GetCmdQueryTally() *cobra.Command { - cmd := &cobra.Command{ - Use: "tally [proposal-id]", - Args: cobra.ExactArgs(1), - Short: "Get the tally of a proposal vote", - Long: strings.TrimSpace( - fmt.Sprintf(`Query tally of votes on a proposal. You can find -the proposal-id by running "%s query gov proposals". - -Example: -$ %s query gov tally 1 -`, - version.AppName, version.AppName, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := v1.NewQueryClient(clientCtx) - - // validate that the proposal id is a uint - proposalID, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return fmt.Errorf("proposal-id %s not a valid int, please input a valid proposal-id", args[0]) - } - - // check to see if the proposal is in the store - ctx := cmd.Context() - _, err = queryClient.Proposal( - ctx, - &v1.QueryProposalRequest{ProposalId: proposalID}, - ) - if err != nil { - return fmt.Errorf("failed to fetch proposal-id %d: %s", proposalID, err) - } - - // Query store - res, err := queryClient.TallyResult( - ctx, - &v1.QueryTallyResultRequest{ProposalId: proposalID}, - ) - if err != nil { - return err - } - - return clientCtx.PrintProto(res.Tally) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdQueryParams implements the query params command. -// -//nolint:staticcheck // this function contains deprecated commands that we need. -func GetCmdQueryParams() *cobra.Command { - cmd := &cobra.Command{ - Use: "params", - Short: "Query the parameters of the governance process", - Long: strings.TrimSpace( - fmt.Sprintf(`Query the all the parameters for the governance process. - -Example: -$ %s query gov params -`, - version.AppName, - ), - ), - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := v1.NewQueryClient(clientCtx) - - // Query store for all 3 params - ctx := cmd.Context() - - res, err := queryClient.Params( - ctx, - &v1.QueryParamsRequest{ParamsType: "deposit"}, - ) - if err != nil { - return err - } - - vp := v1.NewVotingParams(res.Params.VotingPeriod) - res.VotingParams = &vp - - tp := v1.NewTallyParams(res.Params.Quorum, res.Params.Threshold, res.Params.VetoThreshold) - res.TallyParams = &tp - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdQueryParam implements the query param command. -func GetCmdQueryParam() *cobra.Command { - cmd := &cobra.Command{ - Use: "param [param-type]", - Args: cobra.ExactArgs(1), - Short: "Query the parameters (voting|tallying|deposit) of the governance process", - Long: strings.TrimSpace( - fmt.Sprintf(`Query the all the parameters for the governance process. -Example: -$ %s query gov param voting -$ %s query gov param tallying -$ %s query gov param deposit -`, - version.AppName, version.AppName, version.AppName, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := v1.NewQueryClient(clientCtx) - - // Query store - res, err := queryClient.Params( - cmd.Context(), - &v1.QueryParamsRequest{ParamsType: args[0]}, - ) - if err != nil { - return err - } - - var out fmt.Stringer - //nolint:staticcheck // this switch statement contains deprecated commands that we need. - switch args[0] { - case "voting": - out = res.GetVotingParams() - case "tallying": - out = res.GetTallyParams() - case "deposit": - out = res.GetDepositParams() - default: - return fmt.Errorf("argument must be one of (voting|tallying|deposit), was %s", args[0]) - } - - return clientCtx.PrintObjectLegacy(out) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdQueryProposer implements the query proposer command. -func GetCmdQueryProposer() *cobra.Command { - cmd := &cobra.Command{ - Use: "proposer [proposal-id]", - Args: cobra.ExactArgs(1), - Short: "Query the proposer of a governance proposal", - Long: strings.TrimSpace( - fmt.Sprintf(`Query which address proposed a proposal with a given ID. - -Example: -$ %s query gov proposer 1 -`, - version.AppName, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - // validate that the proposalID is a uint - proposalID, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return fmt.Errorf("proposal-id %s is not a valid uint", args[0]) - } - - prop, err := gcutils.QueryProposerByTxQuery(clientCtx, proposalID) - if err != nil { - return err - } - - return clientCtx.PrintObjectLegacy(prop) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -func GetCmdConstitution() *cobra.Command { - return &cobra.Command{ - Use: "constitution", - Short: "Get the constitution", - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - queryClient := v1.NewQueryClient(clientCtx) - - resp, err := queryClient.Constitution(cmd.Context(), &v1.QueryConstitutionRequest{}) - if err != nil { - return err - } - - return clientCtx.PrintProto(resp) - }, - } -} diff --git a/x/gov/client/cli/query_test.go b/x/gov/client/cli/query_test.go deleted file mode 100644 index baa74d6d2de3..000000000000 --- a/x/gov/client/cli/query_test.go +++ /dev/null @@ -1,409 +0,0 @@ -package cli_test - -import ( - "fmt" - "strings" - - "github.com/cosmos/cosmos-sdk/codec/address" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/testutil" - "github.com/cosmos/cosmos-sdk/x/gov/client/cli" -) - -func (s *CLITestSuite) TestCmdParams() { - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - "json output", - []string{fmt.Sprintf("--%s=json", flags.FlagOutput)}, - "--output=json", - }, - { - "text output", - []string{fmt.Sprintf("--%s=text", flags.FlagOutput)}, - "--output=text", - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryParams() - cmd.SetArgs(tc.args) - - s.Require().Contains(fmt.Sprint(cmd), strings.TrimSpace(tc.expCmdOutput)) - }) - } -} - -func (s *CLITestSuite) TestCmdParam() { - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - "voting params", - []string{ - "voting", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - `voting --output=json`, - }, - { - "tally params", - []string{ - "tallying", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - `tallying --output=json`, - }, - { - "deposit params", - []string{ - "deposit", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - `deposit --output=json`, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryParam() - cmd.SetArgs(tc.args) - s.Require().Contains(fmt.Sprint(cmd), strings.TrimSpace(tc.expCmdOutput)) - }) - } -} - -func (s *CLITestSuite) TestCmdProposer() { - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - "without proposal id", - []string{ - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - "--output=json", - }, - { - "with proposal id", - []string{ - "1", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - "1 --output=json", - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryProposer() - cmd.SetArgs(tc.args) - s.Require().Contains(fmt.Sprint(cmd), strings.TrimSpace(tc.expCmdOutput)) - }) - } -} - -func (s *CLITestSuite) TestCmdTally() { - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - "without proposal id", - []string{ - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - "--output=json", - }, - { - "with proposal id (json output)", - []string{ - "2", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - "2 --output=json", - }, - { - "with proposal id (text output)", - []string{ - "1", - fmt.Sprintf("--%s=text", flags.FlagOutput), - }, - "1 --output=text", - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryTally() - cmd.SetArgs(tc.args) - s.Require().Contains(fmt.Sprint(cmd), strings.TrimSpace(tc.expCmdOutput)) - }) - } -} - -func (s *CLITestSuite) TestCmdGetProposal() { - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - "get proposal with json response", - []string{ - "1", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - "1 --output=json", - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryProposal() - cmd.SetArgs(tc.args) - s.Require().Contains(fmt.Sprint(cmd), strings.TrimSpace(tc.expCmdOutput)) - }) - } -} - -func (s *CLITestSuite) TestCmdGetProposals() { - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - "get proposals as json response", - []string{ - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - "--output=json", - }, - { - "get proposals with invalid status", - []string{ - "--status=unknown", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - "--status=unknown --output=json", - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryProposals(address.NewBech32Codec("cosmos")) - cmd.SetArgs(tc.args) - s.Require().Contains(fmt.Sprint(cmd), strings.TrimSpace(tc.expCmdOutput)) - }) - } -} - -func (s *CLITestSuite) TestCmdQueryDeposits() { - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - "get deposits", - []string{ - "10", - }, - "10", - }, - { - "get deposits(json output)", - []string{ - "1", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - "1 --output=json", - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryDeposits() - cmd.SetArgs(tc.args) - s.Require().Contains(fmt.Sprint(cmd), strings.TrimSpace(tc.expCmdOutput)) - }) - } -} - -func (s *CLITestSuite) TestCmdQueryDeposit() { - val := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) - - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - "get deposit with no depositer", - []string{ - "1", - }, - "1", - }, - { - "get deposit with wrong deposit address", - []string{ - "1", - "wrong address", - }, - "1 wrong address", - }, - { - "get deposit (valid req)", - []string{ - "1", - val[0].Address.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - fmt.Sprintf("1 %s --output=json", val[0].Address.String()), - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryDeposit() - cmd.SetArgs(tc.args) - s.Require().Contains(fmt.Sprint(cmd), strings.TrimSpace(tc.expCmdOutput)) - }) - } -} - -func (s *CLITestSuite) TestCmdQueryVotes() { - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - "get votes with no proposal id", - []string{}, - "", - }, - { - "get votes of a proposal", - []string{ - "10", - }, - "10", - }, - { - "get votes of a proposal (json output)", - []string{ - "1", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - "1 --output=json", - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryVotes() - cmd.SetArgs(tc.args) - s.Require().Contains(fmt.Sprint(cmd), strings.TrimSpace(tc.expCmdOutput)) - }) - } -} - -func (s *CLITestSuite) TestCmdQueryVote() { - val := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) - - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - "get vote of a proposal", - []string{ - "10", - val[0].Address.String(), - }, - fmt.Sprintf("10 %s", val[0].Address.String()), - }, - { - "get vote by wrong voter", - []string{ - "1", - "wrong address", - }, - "1 wrong address", - }, - { - "get vote of a proposal (json output)", - []string{ - "1", - val[0].Address.String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - fmt.Sprintf("1 %s --output=json", val[0].Address.String()), - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryVote(address.NewBech32Codec("cosmos")) - cmd.SetArgs(tc.args) - - if len(tc.args) != 0 { - s.Require().Contains(fmt.Sprint(cmd), strings.TrimSpace(tc.expCmdOutput)) - } - }) - } -} - -func (s *CLITestSuite) TestCmdGetConstitution() { - testCases := []struct { - name string - expOutput string - }{ - { - name: "get constitution", - expOutput: "constitution", - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdConstitution() - out, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, []string{}) - s.Require().NoError(err) - s.Require().Contains(out.String(), tc.expOutput) - }) - } -} diff --git a/x/gov/client/cli/tx.go b/x/gov/client/cli/tx.go index ea7f3e6a265d..5fe705dba535 100644 --- a/x/gov/client/cli/tx.go +++ b/x/gov/client/cli/tx.go @@ -107,9 +107,9 @@ Where proposal.json contains: ], // metadata can be any of base64 encoded, raw text, stringified json, IPFS link to json // see below for example metadata - "metadata: "4pIMOgIGx1vZGU=", - "deposit": "10stake" - "title: "My proposal" + "metadata": "4pIMOgIGx1vZGU=", + "deposit": "10stake", + "title": "My proposal", "summary": "A short summary of my proposal", "expedited": false } diff --git a/x/gov/client/cli/tx_test.go b/x/gov/client/cli/tx_test.go index 3ae1b515c4a8..e7bfda1f9e63 100644 --- a/x/gov/client/cli/tx_test.go +++ b/x/gov/client/cli/tx_test.go @@ -6,11 +6,12 @@ import ( "io" "testing" - sdkmath "cosmossdk.io/math" abci "github.com/cometbft/cometbft/abci/types" rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" "github.com/stretchr/testify/suite" + sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/crypto/keyring" diff --git a/x/gov/client/cli/util_test.go b/x/gov/client/cli/util_test.go index 06aa1e5f4fac..956ea66960ba 100644 --- a/x/gov/client/cli/util_test.go +++ b/x/gov/client/cli/util_test.go @@ -9,11 +9,12 @@ import ( "strings" "testing" - sdkmath "cosmossdk.io/math" "github.com/spf13/cobra" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/x/gov/client/utils/query.go b/x/gov/client/utils/query.go index 6ee7ca4a6541..a567f3b03aac 100644 --- a/x/gov/client/utils/query.go +++ b/x/gov/client/utils/query.go @@ -161,6 +161,7 @@ func QueryVoteByTxQuery(clientCtx client.Context, params v1.QueryVoteParams) ([] } // QueryProposerByTxQuery will query for a proposer of a governance proposal by ID. +// Deprecated: Should not be used, as not always accurate. It will be removed in v0.51. func QueryProposerByTxQuery(clientCtx client.Context, proposalID uint64) (Proposer, error) { q := fmt.Sprintf("%s.%s='%d'", types.EventTypeSubmitProposal, types.AttributeKeyProposalID, proposalID) searchResult, err := authtx.QueryTxsByEvents(clientCtx, defaultPage, defaultLimit, q, "") diff --git a/x/gov/client/utils/query_test.go b/x/gov/client/utils/query_test.go index 3210396c9d3a..cfbd8695685c 100644 --- a/x/gov/client/utils/query_test.go +++ b/x/gov/client/utils/query_test.go @@ -4,12 +4,13 @@ import ( "context" "testing" - sdkmath "cosmossdk.io/math" "github.com/cometbft/cometbft/rpc/client/mock" coretypes "github.com/cometbft/cometbft/rpc/core/types" cmttypes "github.com/cometbft/cometbft/types" "github.com/stretchr/testify/require" + sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" diff --git a/x/gov/common_test.go b/x/gov/common_test.go index 0837c14cca8d..3edd473d9207 100644 --- a/x/gov/common_test.go +++ b/x/gov/common_test.go @@ -6,10 +6,11 @@ import ( "sort" "testing" + "github.com/stretchr/testify/require" + "cosmossdk.io/depinject" sdklog "cosmossdk.io/log" "cosmossdk.io/math" - "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" diff --git a/x/gov/genesis.go b/x/gov/genesis.go index 8877324d654f..0eeebcd72e21 100644 --- a/x/gov/genesis.go +++ b/x/gov/genesis.go @@ -1,7 +1,6 @@ package gov import ( - "errors" "fmt" "cosmossdk.io/collections" @@ -98,7 +97,7 @@ func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) (*v1.GenesisState, error) proposals = append(proposals, &value) return false, nil }) - if err != nil && !errors.Is(err, collections.ErrInvalidIterator) { + if err != nil { return nil, err } @@ -117,7 +116,7 @@ func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) (*v1.GenesisState, error) proposalsDeposits = append(proposalsDeposits, &value) return false, nil }) - if err != nil && !errors.Is(err, collections.ErrInvalidIterator) { + if err != nil { panic(err) } @@ -127,7 +126,7 @@ func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) (*v1.GenesisState, error) proposalsVotes = append(proposalsVotes, &value) return false, nil }) - if err != nil && !errors.Is(err, collections.ErrInvalidIterator) { + if err != nil { panic(err) } diff --git a/x/gov/genesis_test.go b/x/gov/genesis_test.go index 2f94bf360908..f65bcce30587 100644 --- a/x/gov/genesis_test.go +++ b/x/gov/genesis_test.go @@ -3,9 +3,10 @@ package gov_test import ( "testing" - sdkmath "cosmossdk.io/math" "github.com/stretchr/testify/require" + sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/gov" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" diff --git a/x/gov/keeper/common_test.go b/x/gov/keeper/common_test.go index 4181d886afb6..ae1311fcee02 100644 --- a/x/gov/keeper/common_test.go +++ b/x/gov/keeper/common_test.go @@ -4,13 +4,12 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/require" - - "cosmossdk.io/math" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" cmttime "github.com/cometbft/cometbft/types/time" "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" + "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/baseapp" @@ -91,10 +90,10 @@ func setupGovKeeper(t *testing.T) ( return sdk.TokensFromConsensusPower(power, math.NewIntFromUint64(1000000)) }).AnyTimes() - stakingKeeper.EXPECT().BondDenom(ctx).Return("stake").AnyTimes() + stakingKeeper.EXPECT().BondDenom(ctx).Return("stake", nil).AnyTimes() stakingKeeper.EXPECT().IterateBondedValidatorsByPower(gomock.Any(), gomock.Any()).AnyTimes() stakingKeeper.EXPECT().IterateDelegations(gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes() - stakingKeeper.EXPECT().TotalBondedTokens(gomock.Any()).Return(math.NewInt(10000000)).AnyTimes() + stakingKeeper.EXPECT().TotalBondedTokens(gomock.Any()).Return(math.NewInt(10000000), nil).AnyTimes() distributionKeeper.EXPECT().FundCommunityPool(gomock.Any(), gomock.Any(), gomock.Any()).Return(nil).AnyTimes() // Gov keeper initializations @@ -106,6 +105,8 @@ func setupGovKeeper(t *testing.T) ( govKeeper.SetLegacyRouter(govRouter) err := govKeeper.Params.Set(ctx, v1.DefaultParams()) require.NoError(t, err) + err = govKeeper.Constitution.Set(ctx, "constitution") + require.NoError(t, err) // Register all handlers for the MegServiceRouter. msr.SetInterfaceRegistry(encCfg.InterfaceRegistry) diff --git a/x/gov/keeper/deposit.go b/x/gov/keeper/deposit.go index 6acee3f9d31a..9229c30432f8 100644 --- a/x/gov/keeper/deposit.go +++ b/x/gov/keeper/deposit.go @@ -3,12 +3,14 @@ package keeper import ( "context" "fmt" + "strings" "cosmossdk.io/collections" - "cosmossdk.io/errors" sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" disttypes "github.com/cosmos/cosmos-sdk/x/distribution/types" "github.com/cosmos/cosmos-sdk/x/gov/types" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" @@ -50,7 +52,7 @@ func (keeper Keeper) DeleteAndBurnDeposits(ctx context.Context, proposalID uint6 func (keeper Keeper) IterateDeposits(ctx context.Context, proposalID uint64, cb func(key collections.Pair[uint64, sdk.AccAddress], value v1.Deposit) (bool, error)) error { rng := collections.NewPrefixedPairRange[uint64, sdk.AccAddress](proposalID) err := keeper.Deposits.Walk(ctx, rng, cb) - if err != nil && !errors.IsOf(err, collections.ErrInvalidIterator) { + if err != nil { return err } return nil @@ -70,6 +72,54 @@ func (keeper Keeper) AddDeposit(ctx context.Context, proposalID uint64, deposito return false, errors.Wrapf(types.ErrInactiveProposal, "%d", proposalID) } + // Check coins to be deposited match the proposal's deposit params + params, err := keeper.Params.Get(ctx) + if err != nil { + return false, err + } + + minDepositAmount := proposal.GetMinDepositFromParams(params) + minDepositRatio, err := sdkmath.LegacyNewDecFromStr(params.GetMinDepositRatio()) + if err != nil { + return false, err + } + + // the deposit must only contain valid denoms (listed in the min deposit param) + if err := keeper.validateDepositDenom(ctx, params, depositAmount); err != nil { + return false, err + } + + // If minDepositRatio is set, the deposit must be equal or greater than minDepositAmount*minDepositRatio + // for at least one denom. If minDepositRatio is zero we skip this check. + if !minDepositRatio.IsZero() { + var ( + depositThresholdMet bool + thresholds []string + ) + for _, minDep := range minDepositAmount { + // calculate the threshold for this denom, and hold a list to later return a useful error message + threshold := sdk.NewCoin(minDep.GetDenom(), minDep.Amount.ToLegacyDec().Mul(minDepositRatio).TruncateInt()) + thresholds = append(thresholds, threshold.String()) + + found, deposit := depositAmount.Find(minDep.Denom) + if !found { // if not found, continue, as we know the deposit contains at least 1 valid denom + continue + } + + // Once we know at least one threshold has been met, we can break. The deposit + // might contain other denoms but we don't care. + if deposit.IsGTE(threshold) { + depositThresholdMet = true + break + } + } + + // the threshold must be met with at least one denom, if not, return the list of minimum deposits + if !depositThresholdMet { + return false, errors.Wrapf(types.ErrMinDepositTooSmall, "received %s but need at least one of the following: %s", depositAmount, strings.Join(thresholds, ",")) + } + } + // update the governance module's account coins pool err = keeper.bankKeeper.SendCoinsFromAccountToModule(ctx, depositorAddr, types.ModuleName, depositAmount) if err != nil { @@ -85,12 +135,6 @@ func (keeper Keeper) AddDeposit(ctx context.Context, proposalID uint64, deposito // Check if deposit has provided sufficient total funds to transition the proposal into the voting period activatedVotingPeriod := false - params, err := keeper.Params.Get(ctx) - if err != nil { - return false, err - } - minDepositAmount := proposal.GetMinDepositFromParams(params) - if proposal.Status == v1.StatusDepositPeriod && sdk.NewCoins(proposal.TotalDeposit...).IsAllGTE(minDepositAmount) { err = keeper.ActivateVotingPeriod(ctx, proposal) if err != nil { @@ -115,12 +159,16 @@ func (keeper Keeper) AddDeposit(ctx context.Context, proposalID uint64, deposito } // called when deposit has been added to a proposal, however the proposal may not be active - keeper.Hooks().AfterProposalDeposit(ctx, proposalID, depositorAddr) + err = keeper.Hooks().AfterProposalDeposit(ctx, proposalID, depositorAddr) + if err != nil { + return false, err + } sdkCtx := sdk.UnwrapSDKContext(ctx) sdkCtx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeProposalDeposit, + sdk.NewAttribute(types.AttributeKeyDepositor, depositorAddr.String()), sdk.NewAttribute(sdk.AttributeKeyAmount, depositAmount.String()), sdk.NewAttribute(types.AttributeKeyProposalID, fmt.Sprintf("%d", proposalID)), ), @@ -154,18 +202,18 @@ func (keeper Keeper) ChargeDeposit(ctx context.Context, proposalID uint64, destA var remainingAmount sdk.Coins - for _, coins := range deposit.Amount { - burnAmount := sdk.NewDecFromInt(coins.Amount).Mul(rate).TruncateInt() + for _, coin := range deposit.Amount { + burnAmount := sdkmath.LegacyNewDecFromInt(coin.Amount).Mul(rate).TruncateInt() // remaining amount = deposits amount - burn amount remainingAmount = remainingAmount.Add( sdk.NewCoin( - coins.Denom, - coins.Amount.Sub(burnAmount), + coin.Denom, + coin.Amount.Sub(burnAmount), ), ) cancellationCharges = cancellationCharges.Add( sdk.NewCoin( - coins.Denom, + coin.Denom, burnAmount, ), ) @@ -190,7 +238,7 @@ func (keeper Keeper) ChargeDeposit(ctx context.Context, proposalID uint64, destA // get the distribution module account address distributionAddress := keeper.authKeeper.GetModuleAddress(disttypes.ModuleName) switch { - case len(destAddress) == 0: + case destAddress == "": // burn the cancellation charges from deposits err := keeper.bankKeeper.BurnCoins(ctx, types.ModuleName, cancellationCharges) if err != nil { @@ -234,13 +282,12 @@ func (keeper Keeper) RefundAndDeleteDeposits(ctx context.Context, proposalID uin // validateInitialDeposit validates if initial deposit is greater than or equal to the minimum // required at the time of proposal submission. This threshold amount is determined by // the deposit parameters. Returns nil on success, error otherwise. -func (keeper Keeper) validateInitialDeposit(ctx context.Context, initialDeposit sdk.Coins, expedited bool) error { - params, err := keeper.Params.Get(ctx) - if err != nil { - return err +func (keeper Keeper) validateInitialDeposit(ctx context.Context, params v1.Params, initialDeposit sdk.Coins, expedited bool) error { + if !initialDeposit.IsValid() || initialDeposit.IsAnyNegative() { + return errors.Wrap(sdkerrors.ErrInvalidCoins, initialDeposit.String()) } - minInitialDepositRatio, err := sdk.NewDecFromStr(params.MinInitialDepositRatio) + minInitialDepositRatio, err := sdkmath.LegacyNewDecFromStr(params.MinInitialDepositRatio) if err != nil { return err } @@ -256,10 +303,28 @@ func (keeper Keeper) validateInitialDeposit(ctx context.Context, initialDeposit } for i := range minDepositCoins { - minDepositCoins[i].Amount = sdk.NewDecFromInt(minDepositCoins[i].Amount).Mul(minInitialDepositRatio).RoundInt() + minDepositCoins[i].Amount = sdkmath.LegacyNewDecFromInt(minDepositCoins[i].Amount).Mul(minInitialDepositRatio).RoundInt() } if !initialDeposit.IsAllGTE(minDepositCoins) { return errors.Wrapf(types.ErrMinDepositTooSmall, "was (%s), need (%s)", initialDeposit, minDepositCoins) } return nil } + +// validateDepositDenom validates if the deposit denom is accepted by the governance module. +func (keeper Keeper) validateDepositDenom(ctx context.Context, params v1.Params, depositAmount sdk.Coins) error { + denoms := []string{} + acceptedDenoms := make(map[string]bool, len(params.MinDeposit)) + for _, coin := range params.MinDeposit { + acceptedDenoms[coin.Denom] = true + denoms = append(denoms, coin.Denom) + } + + for _, coin := range depositAmount { + if _, ok := acceptedDenoms[coin.Denom]; !ok { + return errors.Wrapf(types.ErrInvalidDepositDenom, "deposited %s, but gov accepts only the following denom(s): %v", depositAmount, denoms) + } + } + + return nil +} diff --git a/x/gov/keeper/deposit_test.go b/x/gov/keeper/deposit_test.go index ed481338e9d2..4438bc494d1d 100644 --- a/x/gov/keeper/deposit_test.go +++ b/x/gov/keeper/deposit_test.go @@ -4,10 +4,10 @@ import ( "fmt" "testing" - "cosmossdk.io/collections" + "github.com/stretchr/testify/require" + "cosmossdk.io/collections" sdkmath "cosmossdk.io/math" - "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/codec/address" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" @@ -156,6 +156,85 @@ func TestDeposits(t *testing.T) { } } +func TestDepositAmount(t *testing.T) { + testcases := []struct { + name string + deposit sdk.Coins + minDepositRatio string + err string + }{ + { + name: "good amount and denoms", + deposit: sdk.NewCoins(sdk.NewInt64Coin("stake", 10000)), + minDepositRatio: "0.001", + }, + { + name: "good amount and denoms but not enough balance for zcoin", + deposit: sdk.NewCoins(sdk.NewInt64Coin("stake", 10000), sdk.NewInt64Coin("zcoin", 1)), + minDepositRatio: "0.001", + err: "not enough balance", + }, + { + name: "too small amount", + deposit: sdk.NewCoins(sdk.NewInt64Coin("stake", 10)), + minDepositRatio: "0.001", + err: "received 10stake but need at least one of the following: 10000stake,10zcoin: minimum deposit is too small", + }, + { + name: "too small amount with another coin", + deposit: sdk.NewCoins(sdk.NewInt64Coin("zcoin", 1)), + minDepositRatio: "0.001", + err: "received 1zcoin but need at least one of the following: 10000stake,10zcoin: minimum deposit is too small", + }, + { + name: "bad denom", + deposit: sdk.NewCoins(sdk.NewInt64Coin("euro", 10000)), + minDepositRatio: "0.001", + err: "deposited 10000euro, but gov accepts only the following denom(s): [stake zcoin]: invalid deposit denom", + }, + { + name: "mix containing bad and good denom", + deposit: sdk.NewCoins(sdk.NewInt64Coin("stake", 10000), sdk.NewInt64Coin("euro", 10000)), + minDepositRatio: "0.001", + err: "deposited 10000euro,10000stake, but gov accepts only the following denom(s): [stake zcoin]: invalid deposit denom", + }, + { + name: "minDepositRatio is zero", + deposit: sdk.NewCoins(sdk.NewInt64Coin("stake", 10)), + minDepositRatio: "0.0", + }, + } + + for _, tc := range testcases { + t.Run(tc.name, func(t *testing.T) { + govKeeper, authKeeper, bankKeeper, stakingKeeper, distrKeeper, _, ctx := setupGovKeeper(t) + trackMockBalances(bankKeeper, distrKeeper) + + testAddrs := simtestutil.AddTestAddrsIncremental(bankKeeper, stakingKeeper, ctx, 2, sdkmath.NewInt(1000000000000000)) + authKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec("cosmos")).AnyTimes() + + params, _ := govKeeper.Params.Get(ctx) + params.MinDepositRatio = tc.minDepositRatio + params.MinDeposit = sdk.NewCoins(params.MinDeposit...).Add(sdk.NewCoin("zcoin", sdkmath.NewInt(10000))) // coins must be sorted by denom + err := govKeeper.Params.Set(ctx, params) + require.NoError(t, err) + + tp := TestProposal + proposal, err := govKeeper.SubmitProposal(ctx, tp, "", "title", "summary", testAddrs[0], false) + require.NoError(t, err) + proposalID := proposal.Id + + _, err = govKeeper.AddDeposit(ctx, proposalID, testAddrs[0], tc.deposit) + if tc.err != "" { + require.Error(t, err) + require.Equal(t, tc.err, err.Error()) + } else { + require.NoError(t, err) + } + }) + } +} + func TestValidateInitialDeposit(t *testing.T) { testcases := map[string]struct { minDeposit sdk.Coins diff --git a/x/gov/keeper/export_test.go b/x/gov/keeper/export_test.go index f56e25c34c0e..f9db25240adb 100644 --- a/x/gov/keeper/export_test.go +++ b/x/gov/keeper/export_test.go @@ -5,5 +5,10 @@ import sdk "github.com/cosmos/cosmos-sdk/types" // ValidateInitialDeposit is a helper function used only in deposit tests which returns the same // functionality of validateInitialDeposit private function. func (k Keeper) ValidateInitialDeposit(ctx sdk.Context, initialDeposit sdk.Coins, expedited bool) error { - return k.validateInitialDeposit(ctx, initialDeposit, expedited) + params, err := k.Params.Get(ctx) + if err != nil { + return err + } + + return k.validateInitialDeposit(ctx, params, initialDeposit, expedited) } diff --git a/x/gov/keeper/grpc_query.go b/x/gov/keeper/grpc_query.go index 510e975b4377..b42a114cfb14 100644 --- a/x/gov/keeper/grpc_query.go +++ b/x/gov/keeper/grpc_query.go @@ -3,11 +3,10 @@ package keeper import ( "context" - "cosmossdk.io/collections" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "cosmossdk.io/collections" "cosmossdk.io/errors" sdkmath "cosmossdk.io/math" @@ -57,8 +56,7 @@ func (q queryServer) Proposal(ctx context.Context, req *v1.QueryProposalRequest) // Proposals implements the Query/Proposals gRPC method func (q queryServer) Proposals(ctx context.Context, req *v1.QueryProposalsRequest) (*v1.QueryProposalsResponse, error) { - var filteredProposals []*v1.Proposal - _, pageRes, err := query.CollectionFilteredPaginate(ctx, q.k.Proposals, req.Pagination, func(key uint64, p v1.Proposal) (bool, error) { + filteredProposals, pageRes, err := query.CollectionFilteredPaginate(ctx, q.k.Proposals, req.Pagination, func(key uint64, p v1.Proposal) (include bool, err error) { matchVoter, matchDepositor, matchStatus := true, true, true // match status (if supplied/valid) @@ -91,11 +89,14 @@ func (q queryServer) Proposals(ctx context.Context, req *v1.QueryProposalsReques // if all match, append to results if matchVoter && matchDepositor && matchStatus { - filteredProposals = append(filteredProposals, &p) + return true, nil } // continue to next item, do not include because we're appending results above. return false, nil + }, func(_ uint64, value v1.Proposal) (*v1.Proposal, error) { + return &value, nil }) + if err != nil && !errors.IsOf(err, collections.ErrInvalidIterator) { return nil, status.Error(codes.Internal, err.Error()) } @@ -143,10 +144,8 @@ func (q queryServer) Votes(ctx context.Context, req *v1.QueryVotesRequest) (*v1. return nil, status.Error(codes.InvalidArgument, "proposal id can not be 0") } - var votes v1.Votes - _, pageRes, err := query.CollectionFilteredPaginate(ctx, q.k.Votes, req.Pagination, func(_ collections.Pair[uint64, sdk.AccAddress], value v1.Vote) (include bool, err error) { - votes = append(votes, &value) - return false, nil // not including results because they're being appended. + votes, pageRes, err := query.CollectionPaginate(ctx, q.k.Votes, req.Pagination, func(_ collections.Pair[uint64, sdk.AccAddress], value v1.Vote) (vote *v1.Vote, err error) { + return &value, nil }, query.WithCollectionPaginationPairPrefix[uint64, sdk.AccAddress](req.ProposalId)) if err != nil { return nil, status.Error(codes.Internal, err.Error()) @@ -180,11 +179,10 @@ func (q queryServer) Params(ctx context.Context, req *v1.QueryParamsRequest) (*v case v1.ParamTallying: tallyParams := v1.NewTallyParams(params.Quorum, params.Threshold, params.VetoThreshold) response.TallyParams = &tallyParams - default: - return nil, status.Errorf(codes.InvalidArgument, - "%s is not a valid parameter type", req.ParamsType) - + if len(req.ParamsType) > 0 { + return nil, status.Errorf(codes.InvalidArgument, "unknown params type: %s", req.ParamsType) + } } response.Params = ¶ms @@ -228,9 +226,8 @@ func (q queryServer) Deposits(ctx context.Context, req *v1.QueryDepositsRequest) } var deposits []*v1.Deposit - _, pageRes, err := query.CollectionFilteredPaginate(ctx, q.k.Deposits, req.Pagination, func(_ collections.Pair[uint64, sdk.AccAddress], deposit v1.Deposit) (bool, error) { - deposits = append(deposits, &deposit) - return false, nil // we don't include results as they're being appended to the slice above. + deposits, pageRes, err := query.CollectionPaginate(ctx, q.k.Deposits, req.Pagination, func(_ collections.Pair[uint64, sdk.AccAddress], deposit v1.Deposit) (*v1.Deposit, error) { + return &deposit, nil }, query.WithCollectionPaginationPairPrefix[uint64, sdk.AccAddress](req.ProposalId)) if err != nil { return nil, status.Error(codes.Internal, err.Error()) @@ -263,7 +260,7 @@ func (q queryServer) TallyResult(ctx context.Context, req *v1.QueryTallyResultRe case proposal.Status == v1.StatusDepositPeriod: tallyResult = v1.EmptyTallyResult() - case proposal.Status == v1.StatusPassed || proposal.Status == v1.StatusRejected: + case proposal.Status == v1.StatusPassed || proposal.Status == v1.StatusRejected || proposal.Status == v1.StatusFailed: tallyResult = *proposal.FinalTallyResult default: @@ -379,6 +376,10 @@ func (q legacyQueryServer) Params(ctx context.Context, req *v1beta1.QueryParamsR response := &v1beta1.QueryParamsResponse{} + if resp.DepositParams == nil && resp.VotingParams == nil && resp.TallyParams == nil { + return nil, status.Errorf(codes.InvalidArgument, "%s is not a valid parameter type", req.ParamsType) + } + if resp.DepositParams != nil { minDeposit := sdk.NewCoins(resp.DepositParams.MinDeposit...) response.DepositParams = v1beta1.NewDepositParams(minDeposit, *resp.DepositParams.MaxDepositPeriod) diff --git a/x/gov/keeper/grpc_query_test.go b/x/gov/keeper/grpc_query_test.go index 7c63d36417fc..bba32ad3d43a 100644 --- a/x/gov/keeper/grpc_query_test.go +++ b/x/gov/keeper/grpc_query_test.go @@ -7,10 +7,9 @@ import ( "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/codec/address" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/types/query" v3 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v3" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" @@ -87,6 +86,17 @@ func (suite *KeeperTestSuite) TestGRPCQueryProposal() { } } +func (suite *KeeperTestSuite) TestGRPCQueryConstitution() { + suite.reset() + queryClient := suite.queryClient + + expRes := &v1.QueryConstitutionResponse{Constitution: "constitution"} + + constitution, err := queryClient.Constitution(gocontext.Background(), &v1.QueryConstitutionRequest{}) + suite.Require().NoError(err) + suite.Require().Equal(expRes, constitution) +} + func (suite *KeeperTestSuite) TestLegacyGRPCQueryProposal() { suite.reset() ctx, queryClient, addrs := suite.ctx, suite.legacyQueryClient, suite.addrs @@ -223,7 +233,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryProposals() { true, }, { - "request 2nd page with limit 4", + "request 2nd page with limit 3", func() { req = &v1.QueryProposalsRequest{ Pagination: &query.PageRequest{Offset: 3, Limit: 3}, @@ -295,6 +305,70 @@ func (suite *KeeperTestSuite) TestGRPCQueryProposals() { }, true, }, + { + "request with filter of status voting period", + func() { + req = &v1.QueryProposalsRequest{ + ProposalStatus: v1.StatusVotingPeriod, + } + + var proposals []*v1.Proposal + for i := 0; i < len(testProposals); i++ { + if testProposals[i].GetStatus() == v1.StatusVotingPeriod { + proposals = append(proposals, testProposals[i]) + } + } + + expRes = &v1.QueryProposalsResponse{ + Proposals: proposals, + } + }, + true, + }, + { + "request with filter of status deposit period", + func() { + req = &v1.QueryProposalsRequest{ + ProposalStatus: v1.StatusDepositPeriod, + } + + var proposals []*v1.Proposal + for i := 0; i < len(testProposals); i++ { + if testProposals[i].GetStatus() == v1.StatusDepositPeriod { + proposals = append(proposals, testProposals[i]) + } + } + + expRes = &v1.QueryProposalsResponse{ + Proposals: proposals, + } + }, + true, + }, + { + "request with filter of status deposit period with limit 2", + func() { + req = &v1.QueryProposalsRequest{ + ProposalStatus: v1.StatusDepositPeriod, + Pagination: &query.PageRequest{ + Limit: 2, + CountTotal: true, + }, + } + + var proposals []*v1.Proposal + for i := 0; i < len(testProposals) && len(proposals) < 2; i++ { + if testProposals[i].GetStatus() == v1.StatusDepositPeriod { + proposals = append(proposals, testProposals[i]) + } + } + + expRes = &v1.QueryProposalsResponse{ + Proposals: proposals, + } + }, + true, + }, } for _, testCase := range testCases { @@ -444,7 +518,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryVote() { Voter: addrs[0].String(), } - expRes = &v1.QueryVoteResponse{Vote: &v1.Vote{ProposalId: proposal.Id, Voter: addrs[0].String(), Options: []*v1.WeightedVoteOption{{Option: v1.OptionAbstain, Weight: sdk.MustNewDecFromStr("1.0").String()}}}} + expRes = &v1.QueryVoteResponse{Vote: &v1.Vote{ProposalId: proposal.Id, Voter: addrs[0].String(), Options: []*v1.WeightedVoteOption{{Option: v1.OptionAbstain, Weight: math.LegacyMustNewDecFromStr("1.0").String()}}}} }, true, }, @@ -817,11 +891,11 @@ func (suite *KeeperTestSuite) TestGRPCQueryParams() { expPass bool }{ { - "empty request", + "empty request (valid and returns all params)", func() { req = &v1.QueryParamsRequest{} }, - false, + true, }, { "deposit params request", @@ -1486,6 +1560,38 @@ func (suite *KeeperTestSuite) TestGRPCQueryTallyResult() { }, true, }, + { + "proposal status failed", + func() { + propTime := time.Now() + proposal := v1.Proposal{ + Id: 1, + Status: v1.StatusFailed, + FinalTallyResult: &v1.TallyResult{ + YesCount: "4", + AbstainCount: "1", + NoCount: "0", + NoWithVetoCount: "0", + }, + SubmitTime: &propTime, + VotingStartTime: &propTime, + VotingEndTime: &propTime, + Metadata: "proposal metadata", + } + err := suite.govKeeper.Proposals.Set(suite.ctx, proposal.Id, proposal) + suite.Require().NoError(err) + + req = &v1.QueryTallyResultRequest{ProposalId: proposal.Id} + + expTally = &v1.TallyResult{ + YesCount: "4", + AbstainCount: "1", + NoCount: "0", + NoWithVetoCount: "0", + } + }, + true, + }, } for _, testCase := range testCases { @@ -1622,6 +1728,38 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryTallyResult() { }, true, }, + { + "proposal status failed", + func() { + propTime := time.Now() + proposal := v1.Proposal{ + Id: 1, + Status: v1.StatusFailed, + FinalTallyResult: &v1.TallyResult{ + YesCount: "4", + AbstainCount: "1", + NoCount: "0", + NoWithVetoCount: "0", + }, + SubmitTime: &propTime, + VotingStartTime: &propTime, + VotingEndTime: &propTime, + Metadata: "proposal metadata", + } + err := suite.govKeeper.Proposals.Set(suite.ctx, proposal.Id, proposal) + suite.Require().NoError(err) + + req = &v1beta1.QueryTallyResultRequest{ProposalId: proposal.Id} + + expTally = &v1beta1.TallyResult{ + Yes: math.NewInt(4), + Abstain: math.NewInt(1), + No: math.NewInt(0), + NoWithVeto: math.NewInt(0), + } + }, + true, + }, } for _, testCase := range testCases { diff --git a/x/gov/keeper/hooks_test.go b/x/gov/keeper/hooks_test.go index 2a8473e56ce6..f859f923a841 100644 --- a/x/gov/keeper/hooks_test.go +++ b/x/gov/keeper/hooks_test.go @@ -27,24 +27,29 @@ type MockGovHooksReceiver struct { AfterProposalVotingPeriodEndedValid bool } -func (h *MockGovHooksReceiver) AfterProposalSubmission(ctx context.Context, proposalID uint64) { +func (h *MockGovHooksReceiver) AfterProposalSubmission(ctx context.Context, proposalID uint64) error { h.AfterProposalSubmissionValid = true + return nil } -func (h *MockGovHooksReceiver) AfterProposalDeposit(ctx context.Context, proposalID uint64, depositorAddr sdk.AccAddress) { +func (h *MockGovHooksReceiver) AfterProposalDeposit(ctx context.Context, proposalID uint64, depositorAddr sdk.AccAddress) error { h.AfterProposalDepositValid = true + return nil } -func (h *MockGovHooksReceiver) AfterProposalVote(ctx context.Context, proposalID uint64, voterAddr sdk.AccAddress) { +func (h *MockGovHooksReceiver) AfterProposalVote(ctx context.Context, proposalID uint64, voterAddr sdk.AccAddress) error { h.AfterProposalVoteValid = true + return nil } -func (h *MockGovHooksReceiver) AfterProposalFailedMinDeposit(ctx context.Context, proposalID uint64) { +func (h *MockGovHooksReceiver) AfterProposalFailedMinDeposit(ctx context.Context, proposalID uint64) error { h.AfterProposalFailedMinDepositValid = true + return nil } -func (h *MockGovHooksReceiver) AfterProposalVotingPeriodEnded(ctx context.Context, proposalID uint64) { +func (h *MockGovHooksReceiver) AfterProposalVotingPeriodEnded(ctx context.Context, proposalID uint64) error { h.AfterProposalVotingPeriodEndedValid = true + return nil } func TestHooks(t *testing.T) { @@ -53,6 +58,7 @@ func TestHooks(t *testing.T) { addrs := simtestutil.AddTestAddrs(bankKeeper, stakingKeeper, ctx, 1, minDeposit[0].Amount) authKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec("cosmos")).AnyTimes() + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(address.NewBech32Codec("cosmosvaloper")).AnyTimes() govHooksReceiver := MockGovHooksReceiver{} diff --git a/x/gov/keeper/invariants.go b/x/gov/keeper/invariants.go index e8cd15d5737f..f5374c28dfd6 100644 --- a/x/gov/keeper/invariants.go +++ b/x/gov/keeper/invariants.go @@ -1,7 +1,6 @@ package keeper import ( - "errors" "fmt" "cosmossdk.io/collections" @@ -26,7 +25,7 @@ func ModuleAccountInvariant(keeper *Keeper, bk types.BankKeeper) sdk.Invariant { expectedDeposits = expectedDeposits.Add(value.Amount...) return false, nil }) - if err != nil && !errors.Is(err, collections.ErrInvalidIterator) { + if err != nil { panic(err) } diff --git a/x/gov/keeper/keeper.go b/x/gov/keeper/keeper.go index 6fdeb324fa68..63ff7c252783 100644 --- a/x/gov/keeper/keeper.go +++ b/x/gov/keeper/keeper.go @@ -6,9 +6,9 @@ import ( "time" "cosmossdk.io/collections" - corestoretypes "cosmossdk.io/core/store" "cosmossdk.io/log" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" @@ -103,8 +103,8 @@ func NewKeeper( authority: authority, Constitution: collections.NewItem(sb, types.ConstitutionKey, "constitution", collections.StringValue), Params: collections.NewItem(sb, types.ParamsKey, "params", codec.CollValue[v1.Params](cdc)), - Deposits: collections.NewMap(sb, types.DepositsKeyPrefix, "deposits", collections.PairKeyCodec(collections.Uint64Key, sdk.AddressKeyAsIndexKey(sdk.AccAddressKey)), codec.CollValue[v1.Deposit](cdc)), // nolint: staticcheck // sdk.AddressKeyAsIndexKey is needed to retain state compatibility - Votes: collections.NewMap(sb, types.VotesKeyPrefix, "votes", collections.PairKeyCodec(collections.Uint64Key, sdk.AddressKeyAsIndexKey(sdk.AccAddressKey)), codec.CollValue[v1.Vote](cdc)), // nolint: staticcheck // sdk.AddressKeyAsIndexKey is needed to retain state compatibility + Deposits: collections.NewMap(sb, types.DepositsKeyPrefix, "deposits", collections.PairKeyCodec(collections.Uint64Key, sdk.LengthPrefixedAddressKey(sdk.AccAddressKey)), codec.CollValue[v1.Deposit](cdc)), // nolint: staticcheck // sdk.LengthPrefixedAddressKey is needed to retain state compatibility + Votes: collections.NewMap(sb, types.VotesKeyPrefix, "votes", collections.PairKeyCodec(collections.Uint64Key, sdk.LengthPrefixedAddressKey(sdk.AccAddressKey)), codec.CollValue[v1.Vote](cdc)), // nolint: staticcheck // sdk.LengthPrefixedAddressKey is needed to retain state compatibility ProposalID: collections.NewSequence(sb, types.ProposalIDKey, "proposal_id"), Proposals: collections.NewMap(sb, types.ProposalsKeyPrefix, "proposals", collections.Uint64Key, codec.CollValue[v1.Proposal](cdc)), ActiveProposalsQueue: collections.NewMap(sb, types.ActiveProposalQueuePrefix, "active_proposals_queue", collections.PairKeyCodec(sdk.TimeKey, collections.Uint64Key), collections.Uint64Value), // sdk.TimeKey is needed to retain state compatibility @@ -183,3 +183,12 @@ func (k Keeper) assertMetadataLength(metadata string) error { } return nil } + +// assertSummaryLength returns an error if given summary length +// is greater than a pre-defined 40*MaxMetadataLen. +func (k Keeper) assertSummaryLength(summary string) error { + if summary != "" && uint64(len(summary)) > 40*k.config.MaxMetadataLen { + return types.ErrSummaryTooLong.Wrapf("got summary with length %d", len(summary)) + } + return nil +} diff --git a/x/gov/keeper/keeper_test.go b/x/gov/keeper/keeper_test.go index 6c309be4828d..748ad89de796 100644 --- a/x/gov/keeper/keeper_test.go +++ b/x/gov/keeper/keeper_test.go @@ -3,10 +3,10 @@ package keeper_test import ( "testing" - "cosmossdk.io/collections" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" + "cosmossdk.io/collections" sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/baseapp" @@ -133,6 +133,26 @@ func TestProposalQueues(t *testing.T) { require.True(t, has) } +func TestSetHooks(t *testing.T) { + govKeeper, _, _, _, _, _, _ := setupGovKeeper(t) + require.Empty(t, govKeeper.Hooks()) + + govHooksReceiver := MockGovHooksReceiver{} + govKeeper.SetHooks(types.NewMultiGovHooks(&govHooksReceiver)) + require.NotNil(t, govKeeper.Hooks()) + require.Panics(t, func() { + govKeeper.SetHooks(&govHooksReceiver) + }) +} + +func TestGetGovGovernanceAndModuleAccountAddress(t *testing.T) { + govKeeper, authKeeper, _, _, _, _, ctx := setupGovKeeper(t) + mAcc := authKeeper.GetModuleAccount(ctx, "gov") + require.Equal(t, mAcc, govKeeper.GetGovernanceAccount(ctx)) + mAddr := authKeeper.GetModuleAddress("gov") + require.Equal(t, mAddr, govKeeper.ModuleAccountAddress()) +} + func TestKeeperTestSuite(t *testing.T) { suite.Run(t, new(KeeperTestSuite)) } diff --git a/x/gov/keeper/migrations.go b/x/gov/keeper/migrations.go index af12c2e5a8a8..508d8292b96a 100644 --- a/x/gov/keeper/migrations.go +++ b/x/gov/keeper/migrations.go @@ -40,5 +40,5 @@ func (m Migrator) Migrate3to4(ctx sdk.Context) error { // Migrate4to5 migrates from version 4 to 5. func (m Migrator) Migrate4to5(ctx sdk.Context) error { - return v5.MigrateStore(ctx, m.keeper.storeService, m.keeper.cdc) + return v5.MigrateStore(ctx, m.keeper.storeService, m.keeper.cdc, m.keeper.Constitution) } diff --git a/x/gov/keeper/msg_server.go b/x/gov/keeper/msg_server.go index 5ebee5b0e762..875b49136954 100644 --- a/x/gov/keeper/msg_server.go +++ b/x/gov/keeper/msg_server.go @@ -4,13 +4,10 @@ import ( "context" "encoding/json" "fmt" - "strconv" "cosmossdk.io/errors" "cosmossdk.io/math" - "github.com/armon/go-metrics" - "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" @@ -44,10 +41,6 @@ func (k msgServer) SubmitProposal(goCtx context.Context, msg *v1.MsgSubmitPropos return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid proposer address: %s", err) } - if err := validateDeposit(sdk.NewCoins(msg.InitialDeposit...)); err != nil { - return nil, err - } - // check that either metadata or Msgs length is non nil. if len(msg.Messages) == 0 && len(msg.Metadata) == 0 { return nil, errors.Wrap(govtypes.ErrNoProposalMsgs, "either metadata or Msgs length must be non-nil") @@ -78,7 +71,16 @@ func (k msgServer) SubmitProposal(goCtx context.Context, msg *v1.MsgSubmitPropos ctx := sdk.UnwrapSDKContext(goCtx) initialDeposit := msg.GetInitialDeposit() - if err := k.validateInitialDeposit(ctx, initialDeposit, msg.Expedited); err != nil { + params, err := k.Params.Get(ctx) + if err != nil { + return nil, fmt.Errorf("failed to get governance parameters: %w", err) + } + + if err := k.validateInitialDeposit(ctx, params, initialDeposit, msg.Expedited); err != nil { + return nil, err + } + + if err := k.validateDepositDenom(ctx, params, initialDeposit); err != nil { return nil, err } @@ -98,8 +100,6 @@ func (k msgServer) SubmitProposal(goCtx context.Context, msg *v1.MsgSubmitPropos "submit proposal", ) - defer telemetry.IncrCounter(1, govtypes.ModuleName, "proposal") - votingStarted, err := k.Keeper.AddDeposit(ctx, proposal.Id, proposer, msg.GetInitialDeposit()) if err != nil { return nil, err @@ -118,7 +118,7 @@ func (k msgServer) SubmitProposal(goCtx context.Context, msg *v1.MsgSubmitPropos }, nil } -// CancelProposals implements the MsgServer.CancelProposal method. +// CancelProposal implements the MsgServer.CancelProposal method. func (k msgServer) CancelProposal(goCtx context.Context, msg *v1.MsgCancelProposal) (*v1.MsgCancelProposalResponse, error) { _, err := k.authKeeper.AddressCodec().StringToBytes(msg.Proposer) if err != nil { @@ -189,14 +189,6 @@ func (k msgServer) Vote(goCtx context.Context, msg *v1.MsgVote) (*v1.MsgVoteResp return nil, err } - defer telemetry.IncrCounterWithLabels( - []string{govtypes.ModuleName, "vote"}, - 1, - []metrics.Label{ - telemetry.NewLabel("proposal_id", strconv.FormatUint(msg.ProposalId, 10)), - }, - ) - return &v1.MsgVoteResponse{}, nil } @@ -217,7 +209,7 @@ func (k msgServer) VoteWeighted(goCtx context.Context, msg *v1.MsgVoteWeighted) if !option.IsValid() { return nil, errors.Wrap(govtypes.ErrInvalidVote, option.String()) } - weight, err := sdk.NewDecFromStr(option.Weight) + weight, err := math.LegacyNewDecFromStr(option.Weight) if err != nil { return nil, errors.Wrapf(govtypes.ErrInvalidVote, "invalid weight: %s", err) } @@ -242,14 +234,6 @@ func (k msgServer) VoteWeighted(goCtx context.Context, msg *v1.MsgVoteWeighted) return nil, err } - defer telemetry.IncrCounterWithLabels( - []string{govtypes.ModuleName, "vote"}, - 1, - []metrics.Label{ - telemetry.NewLabel("proposal_id", strconv.FormatUint(msg.ProposalId, 10)), - }, - ) - return &v1.MsgVoteWeightedResponse{}, nil } @@ -260,7 +244,7 @@ func (k msgServer) Deposit(goCtx context.Context, msg *v1.MsgDeposit) (*v1.MsgDe return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid depositor address: %s", err) } - if err := validateAmount(sdk.NewCoins(msg.Amount...)); err != nil { + if err := validateDeposit(msg.Amount); err != nil { return nil, err } @@ -270,14 +254,6 @@ func (k msgServer) Deposit(goCtx context.Context, msg *v1.MsgDeposit) (*v1.MsgDe return nil, err } - defer telemetry.IncrCounterWithLabels( - []string{govtypes.ModuleName, "deposit"}, - 1, - []metrics.Label{ - telemetry.NewLabel("proposal_id", strconv.FormatUint(msg.ProposalId, 10)), - }, - ) - if votingStarted { ctx.EventManager().EmitEvent( sdk.NewEvent( @@ -403,26 +379,11 @@ func (k legacyMsgServer) Deposit(goCtx context.Context, msg *v1beta1.MsgDeposit) return &v1beta1.MsgDepositResponse{}, nil } -func validateAmount(amount sdk.Coins) error { - if !amount.IsValid() { +// validateDeposit validates the deposit amount, do not use for initial deposit. +func validateDeposit(amount sdk.Coins) error { + if !amount.IsValid() || !amount.IsAllPositive() { return sdkerrors.ErrInvalidCoins.Wrap(amount.String()) } - if !amount.IsAllPositive() { - return sdkerrors.ErrInvalidCoins.Wrap(amount.String()) - } - - return nil -} - -func validateDeposit(deposit sdk.Coins) error { - if !deposit.IsValid() { - return errors.Wrap(sdkerrors.ErrInvalidCoins, deposit.String()) - } - - if deposit.IsAnyNegative() { - return errors.Wrap(sdkerrors.ErrInvalidCoins, deposit.String()) - } - return nil } diff --git a/x/gov/keeper/msg_server_test.go b/x/gov/keeper/msg_server_test.go index cb4181c8237d..7274ba89cd69 100644 --- a/x/gov/keeper/msg_server_test.go +++ b/x/gov/keeper/msg_server_test.go @@ -27,7 +27,7 @@ func (suite *KeeperTestSuite) TestSubmitProposalReq() { addrs := suite.addrs proposer := addrs[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100000))) initialDeposit := coins params, _ := suite.govKeeper.Params.Get(suite.ctx) minDeposit := params.MinDeposit @@ -147,6 +147,21 @@ func (suite *KeeperTestSuite) TestSubmitProposalReq() { expErr: true, expErrMsg: "metadata too long", }, + "summary too long": { + preRun: func() (*v1.MsgSubmitProposal, error) { + return v1.NewMsgSubmitProposal( + []sdk.Msg{bankMsg}, + initialDeposit, + proposer.String(), + "", + "Proposal", + strings.Repeat("1", 300*40), + false, + ) + }, + expErr: true, + expErrMsg: "summary too long", + }, "many signers": { preRun: func() (*v1.MsgSubmitProposal, error) { return v1.NewMsgSubmitProposal( @@ -192,6 +207,36 @@ func (suite *KeeperTestSuite) TestSubmitProposalReq() { expErr: true, expErrMsg: "proposal message not recognized by router", }, + "invalid deposited coin": { + preRun: func() (*v1.MsgSubmitProposal, error) { + return v1.NewMsgSubmitProposal( + []sdk.Msg{bankMsg}, + []sdk.Coin{sdk.NewCoin("invalid", sdkmath.NewInt(100))}, + proposer.String(), + "", + "Proposal", + "description of proposal", + false, + ) + }, + expErr: true, + expErrMsg: "deposited 100invalid, but gov accepts only the following denom(s): [stake]: invalid deposit denom", + }, + "invalid deposited coin (multiple)": { + preRun: func() (*v1.MsgSubmitProposal, error) { + return v1.NewMsgSubmitProposal( + []sdk.Msg{bankMsg}, + initialDeposit.Add(sdk.NewCoin("invalid", sdkmath.NewInt(100))), + proposer.String(), + "", + "Proposal", + "description of proposal", + false, + ) + }, + expErr: true, + expErrMsg: "deposited 100invalid,100000stake, but gov accepts only the following denom(s): [stake]: invalid deposit denom", + }, "all good": { preRun: func() (*v1.MsgSubmitProposal, error) { return v1.NewMsgSubmitProposal( @@ -243,7 +288,7 @@ func (suite *KeeperTestSuite) TestCancelProposalReq() { addrs := suite.addrs proposer := addrs[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100000))) bankMsg := &banktypes.MsgSend{ FromAddress: govAcct.String(), ToAddress: proposer.String(), @@ -339,7 +384,7 @@ func (suite *KeeperTestSuite) TestVoteReq() { addrs := suite.addrs proposer := addrs[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100000))) params, _ := suite.govKeeper.Params.Get(suite.ctx) minDeposit := params.MinDeposit bankMsg := &banktypes.MsgSend{ @@ -482,7 +527,7 @@ func (suite *KeeperTestSuite) TestVoteWeightedReq() { proposer := simtestutil.AddTestAddrsIncremental(suite.bankKeeper, suite.stakingKeeper, suite.ctx, 1, sdkmath.NewInt(50000000))[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100000))) params, _ := suite.govKeeper.Params.Get(suite.ctx) minDeposit := params.MinDeposit bankMsg := &banktypes.MsgSend{ @@ -546,8 +591,8 @@ func (suite *KeeperTestSuite) TestVoteWeightedReq() { return proposalID }, option: v1.WeightedVoteOptions{ - v1.NewWeightedVoteOption(v1.OptionYes, sdk.NewDecWithPrec(5, 1)), - v1.NewWeightedVoteOption(v1.OptionYes, sdk.NewDecWithPrec(5, 1)), + v1.NewWeightedVoteOption(v1.OptionYes, sdkmath.LegacyNewDecWithPrec(5, 1)), + v1.NewWeightedVoteOption(v1.OptionYes, sdkmath.LegacyNewDecWithPrec(5, 1)), }, voter: proposer, metadata: "", @@ -603,7 +648,7 @@ func (suite *KeeperTestSuite) TestVoteWeightedReq() { return proposalID }, option: v1.WeightedVoteOptions{ // weight sum <1 - v1.NewWeightedVoteOption(v1.OptionYes, sdk.NewDecWithPrec(5, 1)), + v1.NewWeightedVoteOption(v1.OptionYes, sdkmath.LegacyNewDecWithPrec(5, 1)), }, voter: proposer, metadata: "", @@ -696,8 +741,8 @@ func (suite *KeeperTestSuite) TestVoteWeightedReq() { return res.ProposalId }, option: v1.WeightedVoteOptions{ - v1.NewWeightedVoteOption(v1.OptionYes, sdk.NewDecWithPrec(5, 1)), - v1.NewWeightedVoteOption(v1.OptionAbstain, sdk.NewDecWithPrec(5, 1)), + v1.NewWeightedVoteOption(v1.OptionYes, sdkmath.LegacyNewDecWithPrec(5, 1)), + v1.NewWeightedVoteOption(v1.OptionAbstain, sdkmath.LegacyNewDecWithPrec(5, 1)), }, voter: proposer, metadata: "", @@ -725,9 +770,9 @@ func (suite *KeeperTestSuite) TestDepositReq() { addrs := suite.addrs proposer := addrs[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100000))) params, _ := suite.govKeeper.Params.Get(suite.ctx) - minDeposit := params.MinDeposit + minDeposit := sdk.Coins(params.MinDeposit) bankMsg := &banktypes.MsgSend{ FromAddress: govAcct.String(), ToAddress: proposer.String(), @@ -776,6 +821,24 @@ func (suite *KeeperTestSuite) TestDepositReq() { expErr: true, expErrMsg: "invalid depositor address", }, + "invalid deposited coin ": { + preRun: func() uint64 { + return pID + }, + depositor: proposer, + deposit: []sdk.Coin{sdk.NewCoin("ibc/badcoin", sdkmath.NewInt(1000))}, + expErr: true, + expErrMsg: "deposited 1000ibc/badcoin, but gov accepts only the following denom(s): [stake]", + }, + "invalid deposited coin (multiple)": { + preRun: func() uint64 { + return pID + }, + depositor: proposer, + deposit: minDeposit.Add(sdk.NewCoin("ibc/badcoin", sdkmath.NewInt(1000))), + expErr: true, + expErrMsg: "deposited 1000ibc/badcoin,10000000stake, but gov accepts only the following denom(s): [stake]: invalid deposit denom", + }, "all good": { preRun: func() uint64 { return pID @@ -804,7 +867,7 @@ func (suite *KeeperTestSuite) TestDepositReq() { // legacy msg server tests func (suite *KeeperTestSuite) TestLegacyMsgSubmitProposal() { proposer := simtestutil.AddTestAddrsIncremental(suite.bankKeeper, suite.stakingKeeper, suite.ctx, 1, sdkmath.NewInt(50000000))[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100000))) initialDeposit := coins params, _ := suite.govKeeper.Params.Get(suite.ctx) minDeposit := params.MinDeposit @@ -917,7 +980,7 @@ func (suite *KeeperTestSuite) TestLegacyMsgVote() { addrs := suite.addrs proposer := addrs[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100000))) params, _ := suite.govKeeper.Params.Get(suite.ctx) minDeposit := params.MinDeposit bankMsg := &banktypes.MsgSend{ @@ -1050,7 +1113,7 @@ func (suite *KeeperTestSuite) TestLegacyVoteWeighted() { addrs := suite.addrs proposer := addrs[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100000))) params, _ := suite.govKeeper.Params.Get(suite.ctx) minDeposit := params.MinDeposit bankMsg := &banktypes.MsgSend{ @@ -1125,11 +1188,11 @@ func (suite *KeeperTestSuite) TestLegacyVoteWeighted() { option: v1beta1.WeightedVoteOptions{ v1beta1.WeightedVoteOption{ Option: v1beta1.OptionYes, - Weight: sdk.NewDecWithPrec(5, 1), + Weight: sdkmath.LegacyNewDecWithPrec(5, 1), }, v1beta1.WeightedVoteOption{ Option: v1beta1.OptionYes, - Weight: sdk.NewDecWithPrec(5, 1), + Weight: sdkmath.LegacyNewDecWithPrec(5, 1), }, }, voter: proposer, @@ -1184,7 +1247,7 @@ func (suite *KeeperTestSuite) TestLegacyVoteWeighted() { option: v1beta1.WeightedVoteOptions{ v1beta1.WeightedVoteOption{ Option: v1beta1.VoteOption(0x13), - Weight: sdk.NewDecWithPrec(5, 1), + Weight: sdkmath.LegacyNewDecWithPrec(5, 1), }, }, voter: proposer, @@ -1199,7 +1262,7 @@ func (suite *KeeperTestSuite) TestLegacyVoteWeighted() { option: v1beta1.WeightedVoteOptions{ v1beta1.WeightedVoteOption{ Option: v1beta1.OptionYes, - Weight: sdk.NewDecWithPrec(5, 1), + Weight: sdkmath.LegacyNewDecWithPrec(5, 1), }, }, voter: proposer, @@ -1301,7 +1364,7 @@ func (suite *KeeperTestSuite) TestLegacyMsgDeposit() { addrs := suite.addrs proposer := addrs[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100000))) params, _ := suite.govKeeper.Params.Get(suite.ctx) minDeposit := params.MinDeposit bankMsg := &banktypes.MsgSend{ @@ -1652,7 +1715,7 @@ func (suite *KeeperTestSuite) TestSubmitProposal_InitialDeposit() { testcases := map[string]struct { minDeposit sdk.Coins - minInitialDepositRatio sdk.Dec + minInitialDepositRatio sdkmath.LegacyDec initialDeposit sdk.Coins accountBalance sdk.Coins diff --git a/x/gov/keeper/proposal.go b/x/gov/keeper/proposal.go index d48f60c4a13d..a461c369ea05 100644 --- a/x/gov/keeper/proposal.go +++ b/x/gov/keeper/proposal.go @@ -9,6 +9,7 @@ import ( "cosmossdk.io/collections" errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/gov/types" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" @@ -23,7 +24,7 @@ func (keeper Keeper) SubmitProposal(ctx context.Context, messages []sdk.Msg, met } // assert summary is no longer than predefined max length of metadata - err = keeper.assertMetadataLength(summary) + err = keeper.assertSummaryLength(summary) if err != nil { return v1.Proposal{}, err } @@ -113,12 +114,16 @@ func (keeper Keeper) SubmitProposal(ctx context.Context, messages []sdk.Msg, met } // called right after a proposal is submitted - keeper.Hooks().AfterProposalSubmission(ctx, proposalID) + err = keeper.Hooks().AfterProposalSubmission(ctx, proposalID) + if err != nil { + return v1.Proposal{}, err + } sdkCtx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeSubmitProposal, sdk.NewAttribute(types.AttributeKeyProposalID, fmt.Sprintf("%d", proposalID)), + sdk.NewAttribute(types.AttributeKeyProposalProposer, proposer.String()), sdk.NewAttribute(types.AttributeKeyProposalMessages, msgsStr), ), ) diff --git a/x/gov/keeper/proposal_test.go b/x/gov/keeper/proposal_test.go index 67bb836876a4..76152a923dd4 100644 --- a/x/gov/keeper/proposal_test.go +++ b/x/gov/keeper/proposal_test.go @@ -5,10 +5,10 @@ import ( "strings" "testing" - "cosmossdk.io/collections" - "github.com/stretchr/testify/require" + "cosmossdk.io/collections" + "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/gov/types" @@ -178,65 +178,106 @@ func (suite *KeeperTestSuite) TestCancelProposal() { tp := v1beta1.TextProposal{Title: "title", Description: "description"} prop, err := v1.NewLegacyContent(&tp, govAcct) suite.Require().NoError(err) - proposalResp, err := suite.govKeeper.SubmitProposal(suite.ctx, []sdk.Msg{prop}, "", "title", "summary", suite.addrs[0], false) + proposal, err := suite.govKeeper.SubmitProposal(suite.ctx, []sdk.Msg{prop}, "", "title", "summary", suite.addrs[0], false) suite.Require().NoError(err) - proposalID := proposalResp.Id + proposalID := proposal.Id - proposal2Resp, err := suite.govKeeper.SubmitProposal(suite.ctx, []sdk.Msg{prop}, "", "title", "summary", suite.addrs[1], true) - proposal2ID := proposal2Resp.Id - makeProposalPass := func() { - proposal2, err := suite.govKeeper.Proposals.Get(suite.ctx, proposal2ID) - suite.Require().Nil(err) + proposal2, err := suite.govKeeper.SubmitProposal(suite.ctx, []sdk.Msg{prop}, "", "title", "summary", suite.addrs[1], true) + suite.Require().NoError(err) + proposal2ID := proposal2.Id - proposal2.Status = v1.ProposalStatus_PROPOSAL_STATUS_PASSED - suite.govKeeper.SetProposal(suite.ctx, proposal2) - } + // proposal3 is only used to check the votes for proposals which doesn't go through `CancelProposal` are still present in state + proposal3, err := suite.govKeeper.SubmitProposal(suite.ctx, []sdk.Msg{prop}, "", "title", "summary", suite.addrs[2], false) + suite.Require().NoError(err) + proposal3ID := proposal3.Id + + // add votes for proposal 3 + suite.Require().NoError(suite.govKeeper.ActivateVotingPeriod(suite.ctx, proposal3)) + + proposal3, err = suite.govKeeper.Proposals.Get(suite.ctx, proposal3ID) + suite.Require().Nil(err) + suite.Require().True(proposal3.VotingStartTime.Equal(suite.ctx.BlockHeader().Time)) + // add vote + voteOptions := []*v1.WeightedVoteOption{{Option: v1.OptionYes, Weight: "1.0"}} + err = suite.govKeeper.AddVote(suite.ctx, proposal3ID, suite.addrs[0], voteOptions, "") + suite.Require().NoError(err) testCases := []struct { name string + malleate func() (proposalID uint64, proposer string) proposalID uint64 proposer string expectedErr bool }{ { - name: "without proposer", - proposalID: 1, - proposer: "", + name: "without proposer", + malleate: func() (uint64, string) { + return 1, "" + }, expectedErr: true, }, { - name: "invalid proposal id", - proposalID: 1, - proposer: string(suite.addrs[0]), + name: "invalid proposal id", + malleate: func() (uint64, string) { + return 1, suite.addrs[1].String() + }, expectedErr: true, }, { - name: "valid proposalID but invalid proposer", - proposalID: proposalID, - proposer: suite.addrs[1].String(), + name: "valid proposalID but invalid proposer", + malleate: func() (uint64, string) { + return proposalID, suite.addrs[1].String() + }, expectedErr: true, }, { - name: "valid proposalID but invalid proposal which has already passed", - proposalID: proposal2ID, - proposer: suite.addrs[1].String(), + name: "valid proposalID but invalid proposal which has already passed", + malleate: func() (uint64, string) { + // making proposal status pass + proposal2, err := suite.govKeeper.Proposals.Get(suite.ctx, proposal2ID) + suite.Require().Nil(err) + + proposal2.Status = v1.ProposalStatus_PROPOSAL_STATUS_PASSED + suite.govKeeper.SetProposal(suite.ctx, proposal2) + + return proposal2ID, suite.addrs[1].String() + }, expectedErr: true, }, { - name: "valid proposer and proposal id", - proposalID: proposalID, - proposer: suite.addrs[0].String(), + name: "valid proposer and proposal id", + malleate: func() (uint64, string) { + return proposalID, suite.addrs[0].String() + }, + expectedErr: false, + }, + { + name: "valid case with deletion of votes", + malleate: func() (uint64, string) { + suite.Require().NoError(suite.govKeeper.ActivateVotingPeriod(suite.ctx, proposal)) + + proposal, err = suite.govKeeper.Proposals.Get(suite.ctx, proposal.Id) + suite.Require().Nil(err) + suite.Require().True(proposal.VotingStartTime.Equal(suite.ctx.BlockHeader().Time)) + + // add vote + voteOptions := []*v1.WeightedVoteOption{{Option: v1.OptionYes, Weight: "1.0"}} + err = suite.govKeeper.AddVote(suite.ctx, proposalID, suite.addrs[0], voteOptions, "") + suite.Require().NoError(err) + vote, err := suite.govKeeper.Votes.Get(suite.ctx, collections.Join(proposalID, suite.addrs[0])) + suite.Require().NoError(err) + suite.Require().NotNil(vote) + + return proposalID, suite.addrs[0].String() + }, expectedErr: false, }, } for _, tc := range testCases { suite.Run(tc.name, func() { - if tc.proposalID == proposal2ID { - // making proposal status pass - makeProposalPass() - } - err = suite.govKeeper.CancelProposal(suite.ctx, tc.proposalID, tc.proposer) + pID, proposer := tc.malleate() + err = suite.govKeeper.CancelProposal(suite.ctx, pID, proposer) if tc.expectedErr { suite.Require().Error(err) } else { @@ -244,6 +285,13 @@ func (suite *KeeperTestSuite) TestCancelProposal() { } }) } + _, err = suite.govKeeper.Votes.Get(suite.ctx, collections.Join(proposalID, suite.addrs[0])) + suite.Require().ErrorContains(err, collections.ErrNotFound.Error()) + + // check that proposal 3 votes are still present in the state + votes, err := suite.govKeeper.Votes.Get(suite.ctx, collections.Join(proposal3ID, suite.addrs[0])) + suite.Require().NoError(err) + suite.Require().NotNil(votes) } func TestMigrateProposalMessages(t *testing.T) { diff --git a/x/gov/keeper/tally.go b/x/gov/keeper/tally.go index acd79d7abb64..fa69ca381f91 100644 --- a/x/gov/keeper/tally.go +++ b/x/gov/keeper/tally.go @@ -2,10 +2,8 @@ package keeper import ( "context" - "errors" "cosmossdk.io/collections" - "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" @@ -28,10 +26,13 @@ func (keeper Keeper) Tally(ctx context.Context, proposal v1.Proposal) (passes, b currValidators := make(map[string]v1.ValidatorGovInfo) // fetch all the bonded validators, insert them into currValidators - sdkCtx := sdk.UnwrapSDKContext(ctx) - keeper.sk.IterateBondedValidatorsByPower(sdkCtx, func(index int64, validator stakingtypes.ValidatorI) (stop bool) { - currValidators[validator.GetOperator().String()] = v1.NewValidatorGovInfo( - validator.GetOperator(), + err = keeper.sk.IterateBondedValidatorsByPower(ctx, func(index int64, validator stakingtypes.ValidatorI) (stop bool) { + valBz, err := keeper.sk.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) + if err != nil { + return false + } + currValidators[validator.GetOperator()] = v1.NewValidatorGovInfo( + valBz, validator.GetBondedTokens(), validator.GetDelegatorShares(), math.LegacyZeroDec(), @@ -40,6 +41,10 @@ func (keeper Keeper) Tally(ctx context.Context, proposal v1.Proposal) (passes, b return false }) + if err != nil { + return false, false, tallyResults, err + } + rng := collections.NewPrefixedPairRange[uint64, sdk.AccAddress](proposal.Id) err = keeper.Votes.Walk(ctx, rng, func(key collections.Pair[uint64, sdk.AccAddress], vote v1.Vote) (bool, error) { // if validator, just record it in the map @@ -48,15 +53,18 @@ func (keeper Keeper) Tally(ctx context.Context, proposal v1.Proposal) (passes, b return false, err } - valAddrStr := sdk.ValAddress(voter).String() + valAddrStr, err := keeper.sk.ValidatorAddressCodec().BytesToString(voter) + if err != nil { + return false, err + } if val, ok := currValidators[valAddrStr]; ok { val.Vote = vote.Options currValidators[valAddrStr] = val } // iterate over all delegations from voter, deduct from any delegated-to validators - keeper.sk.IterateDelegations(sdkCtx, voter, func(index int64, delegation stakingtypes.DelegationI) (stop bool) { - valAddrStr := delegation.GetValidatorAddr().String() + err = keeper.sk.IterateDelegations(ctx, voter, func(index int64, delegation stakingtypes.DelegationI) (stop bool) { + valAddrStr := delegation.GetValidatorAddr() if val, ok := currValidators[valAddrStr]; ok { // There is no need to handle the special case that validator address equal to voter address. @@ -77,11 +85,14 @@ func (keeper Keeper) Tally(ctx context.Context, proposal v1.Proposal) (passes, b return false }) + if err != nil { + return false, err + } return false, keeper.Votes.Remove(ctx, collections.Join(vote.ProposalId, sdk.AccAddress(voter))) }) - if err != nil && !errors.Is(err, collections.ErrInvalidIterator) { + if err != nil { return false, false, tallyResults, err } @@ -110,12 +121,17 @@ func (keeper Keeper) Tally(ctx context.Context, proposal v1.Proposal) (passes, b // TODO: Upgrade the spec to cover all of these cases & remove pseudocode. // If there is no staked coins, the proposal fails - if keeper.sk.TotalBondedTokens(sdkCtx).IsZero() { + totalBonded, err := keeper.sk.TotalBondedTokens(ctx) + if err != nil { + return false, false, tallyResults, err + } + + if totalBonded.IsZero() { return false, false, tallyResults, nil } // If there is not enough quorum of votes, the proposal fails - percentVoting := totalVotingPower.Quo(math.LegacyNewDecFromInt(keeper.sk.TotalBondedTokens(sdkCtx))) + percentVoting := totalVotingPower.Quo(math.LegacyNewDecFromInt(totalBonded)) quorum, _ := math.LegacyNewDecFromStr(params.Quorum) if percentVoting.LT(quorum) { return false, params.BurnVoteQuorum, tallyResults, nil diff --git a/x/gov/keeper/vote.go b/x/gov/keeper/vote.go index 84ae0f5ebca1..466fe4c2a27a 100644 --- a/x/gov/keeper/vote.go +++ b/x/gov/keeper/vote.go @@ -5,8 +5,8 @@ import ( "fmt" "cosmossdk.io/collections" - "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/gov/types" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" @@ -42,12 +42,16 @@ func (keeper Keeper) AddVote(ctx context.Context, proposalID uint64, voterAddr s } // called after a vote on a proposal is cast - keeper.Hooks().AfterProposalVote(ctx, proposalID, voterAddr) + err = keeper.Hooks().AfterProposalVote(ctx, proposalID, voterAddr) + if err != nil { + return err + } sdkCtx := sdk.UnwrapSDKContext(ctx) sdkCtx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeProposalVote, + sdk.NewAttribute(types.AttributeKeyVoter, voterAddr.String()), sdk.NewAttribute(types.AttributeKeyOption, options.String()), sdk.NewAttribute(types.AttributeKeyProposalID, fmt.Sprintf("%d", proposalID)), ), @@ -56,8 +60,13 @@ func (keeper Keeper) AddVote(ctx context.Context, proposalID uint64, voterAddr s return nil } -// deleteVotes deletes the all votes from a given proposalID. +// deleteVotes deletes all the votes from a given proposalID. func (keeper Keeper) deleteVotes(ctx context.Context, proposalID uint64) error { - // TODO(tip): fix https://github.com/cosmos/cosmos-sdk/issues/16162 + rng := collections.NewPrefixedPairRange[uint64, sdk.AccAddress](proposalID) + err := keeper.Votes.Clear(ctx, rng) + if err != nil { + return err + } + return nil } diff --git a/x/gov/keeper/vote_test.go b/x/gov/keeper/vote_test.go index b7b05066b49f..aa93118ad4ac 100644 --- a/x/gov/keeper/vote_test.go +++ b/x/gov/keeper/vote_test.go @@ -3,10 +3,10 @@ package keeper_test import ( "testing" - "cosmossdk.io/collections" + "github.com/stretchr/testify/require" + "cosmossdk.io/collections" sdkmath "cosmossdk.io/math" - "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/codec/address" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" diff --git a/x/gov/migrations/v2/store_test.go b/x/gov/migrations/v2/store_test.go index 8a4ec143d4e8..a5c8cf9dc095 100644 --- a/x/gov/migrations/v2/store_test.go +++ b/x/gov/migrations/v2/store_test.go @@ -5,17 +5,16 @@ import ( "testing" "time" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/address" - - "cosmossdk.io/math" "github.com/stretchr/testify/require" + "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" v1 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v1" v2 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v2" diff --git a/x/gov/migrations/v3/convert.go b/x/gov/migrations/v3/convert.go index e0214c21bbf8..d584ac5eced5 100644 --- a/x/gov/migrations/v3/convert.go +++ b/x/gov/migrations/v3/convert.go @@ -3,7 +3,8 @@ package v3 import ( "fmt" - sdkmath "cosmossdk.io/math" + "cosmossdk.io/math" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -71,19 +72,19 @@ func ConvertToLegacyProposal(proposal v1.Proposal) (v1beta1.Proposal, error) { } func ConvertToLegacyTallyResult(tally *v1.TallyResult) (v1beta1.TallyResult, error) { - yes, ok := sdkmath.NewIntFromString(tally.YesCount) + yes, ok := math.NewIntFromString(tally.YesCount) if !ok { return v1beta1.TallyResult{}, fmt.Errorf("unable to convert yes tally string (%s) to int", tally.YesCount) } - no, ok := sdkmath.NewIntFromString(tally.NoCount) + no, ok := math.NewIntFromString(tally.NoCount) if !ok { return v1beta1.TallyResult{}, fmt.Errorf("unable to convert no tally string (%s) to int", tally.NoCount) } - veto, ok := sdkmath.NewIntFromString(tally.NoWithVetoCount) + veto, ok := math.NewIntFromString(tally.NoWithVetoCount) if !ok { return v1beta1.TallyResult{}, fmt.Errorf("unable to convert no with veto tally string (%s) to int", tally.NoWithVetoCount) } - abstain, ok := sdkmath.NewIntFromString(tally.AbstainCount) + abstain, ok := math.NewIntFromString(tally.AbstainCount) if !ok { return v1beta1.TallyResult{}, fmt.Errorf("unable to convert abstain tally string (%s) to int", tally.AbstainCount) } @@ -111,7 +112,7 @@ func ConvertToLegacyVote(vote v1.Vote) (v1beta1.Vote, error) { func ConvertToLegacyVoteOptions(voteOptions []*v1.WeightedVoteOption) ([]v1beta1.WeightedVoteOption, error) { options := make([]v1beta1.WeightedVoteOption, len(voteOptions)) for i, option := range voteOptions { - weight, err := types.NewDecFromStr(option.Weight) + weight, err := math.LegacyNewDecFromStr(option.Weight) if err != nil { return options, err } diff --git a/x/gov/migrations/v3/convert_test.go b/x/gov/migrations/v3/convert_test.go index 719d1040fe86..0a1f8f31fab5 100644 --- a/x/gov/migrations/v3/convert_test.go +++ b/x/gov/migrations/v3/convert_test.go @@ -4,9 +4,10 @@ import ( "testing" "time" - "cosmossdk.io/math" "github.com/stretchr/testify/require" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/tx" diff --git a/x/gov/migrations/v3/json_test.go b/x/gov/migrations/v3/json_test.go index 17a36689d387..a9089cf68626 100644 --- a/x/gov/migrations/v3/json_test.go +++ b/x/gov/migrations/v3/json_test.go @@ -5,10 +5,11 @@ import ( "testing" "time" - sdkmath "cosmossdk.io/math" "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/require" + sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/client" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -90,6 +91,7 @@ func TestMigrateJSON(t *testing.T) { { "deposit_end_time": "2001-09-09T01:46:40Z", "expedited": false, + "failed_reason": "", "final_tally_result": { "abstain_count": "0", "no_count": "0", diff --git a/x/gov/migrations/v3/store_test.go b/x/gov/migrations/v3/store_test.go index d7f25d361e67..0808246127d6 100644 --- a/x/gov/migrations/v3/store_test.go +++ b/x/gov/migrations/v3/store_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/require" + "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/runtime" @@ -43,8 +44,8 @@ func TestMigrateStore(t *testing.T) { // Vote on prop 1 options := []v1beta1.WeightedVoteOption{ - {Option: v1beta1.OptionNo, Weight: sdk.MustNewDecFromStr("0.3")}, - {Option: v1beta1.OptionYes, Weight: sdk.MustNewDecFromStr("0.7")}, + {Option: v1beta1.OptionNo, Weight: math.LegacyMustNewDecFromStr("0.3")}, + {Option: v1beta1.OptionYes, Weight: math.LegacyMustNewDecFromStr("0.7")}, } vote1 := v1beta1.NewVote(1, voter, options) vote1Bz := cdc.MustMarshal(&vote1) diff --git a/x/gov/migrations/v4/json.go b/x/gov/migrations/v4/json.go index 62d7ee9bd918..bed36ff14412 100644 --- a/x/gov/migrations/v4/json.go +++ b/x/gov/migrations/v4/json.go @@ -29,6 +29,7 @@ func MigrateJSON(oldState *v1.GenesisState) (*v1.GenesisState, error) { defaultParams.BurnProposalDepositPrevote, defaultParams.BurnVoteQuorum, defaultParams.BurnVoteVeto, + defaultParams.MinDepositRatio, ) return &v1.GenesisState{ diff --git a/x/gov/migrations/v4/json_test.go b/x/gov/migrations/v4/json_test.go index 1da44080bcaf..18ef6dba37a8 100644 --- a/x/gov/migrations/v4/json_test.go +++ b/x/gov/migrations/v4/json_test.go @@ -4,12 +4,13 @@ import ( "encoding/json" "testing" + "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/client" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/gov" v4 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v4" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - "github.com/stretchr/testify/require" ) func TestMigrateJSON(t *testing.T) { @@ -78,6 +79,7 @@ func TestMigrateJSON(t *testing.T) { "denom": "stake" } ], + "min_deposit_ratio": "0.010000000000000000", "min_initial_deposit_ratio": "0.000000000000000000", "proposal_cancel_dest": "", "proposal_cancel_ratio": "0.500000000000000000", diff --git a/x/gov/migrations/v4/store.go b/x/gov/migrations/v4/store.go index cb41e5122231..7a5857dd2aa6 100644 --- a/x/gov/migrations/v4/store.go +++ b/x/gov/migrations/v4/store.go @@ -42,6 +42,7 @@ func migrateParams(ctx sdk.Context, store storetypes.KVStore, legacySubspace exp defaultParams.BurnProposalDepositPrevote, defaultParams.BurnVoteQuorum, defaultParams.BurnVoteVeto, + defaultParams.MinDepositRatio, ) bz, err := cdc.Marshal(¶ms) diff --git a/x/gov/migrations/v5/store.go b/x/gov/migrations/v5/store.go index ddfa20f52924..22e336a418c3 100644 --- a/x/gov/migrations/v5/store.go +++ b/x/gov/migrations/v5/store.go @@ -1,6 +1,7 @@ package v5 import ( + "cosmossdk.io/collections" corestoretypes "cosmossdk.io/core/store" "github.com/cosmos/cosmos-sdk/codec" @@ -9,11 +10,19 @@ import ( govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" ) +var ( + // ParamsKey is the key of x/gov params + ParamsKey = []byte{0x30} + // ConstitutionKey is the key of x/gov constitution + ConstitutionKey = collections.NewPrefix(49) +) + // MigrateStore performs in-place store migrations from v4 (v0.47) to v5 (v0.50). The // migration includes: // // Addition of the new proposal expedited parameters that are set to 0 by default. -func MigrateStore(ctx sdk.Context, storeService corestoretypes.KVStoreService, cdc codec.BinaryCodec) error { +// Set of default chain constitution. +func MigrateStore(ctx sdk.Context, storeService corestoretypes.KVStoreService, cdc codec.BinaryCodec, constitutionCollection collections.Item[string]) error { store := storeService.OpenKVStore(ctx) paramsBz, err := store.Get(v4.ParamsKey) if err != nil { @@ -32,13 +41,23 @@ func MigrateStore(ctx sdk.Context, storeService corestoretypes.KVStoreService, c params.ExpeditedThreshold = defaultParams.ExpeditedThreshold params.ProposalCancelRatio = defaultParams.ProposalCancelRatio params.ProposalCancelDest = defaultParams.ProposalCancelDest + params.MinDepositRatio = defaultParams.MinDepositRatio bz, err := cdc.Marshal(¶ms) if err != nil { return err } - store.Set(v4.ParamsKey, bz) + if err := store.Set(ParamsKey, bz); err != nil { + return err + } + + // Set the default consisitution if it is not set + if ok, err := constitutionCollection.Has(ctx); !ok || err != nil { + if err := constitutionCollection.Set(ctx, "This chain has no constitution."); err != nil { + return err + } + } return nil } diff --git a/x/gov/migrations/v5/store_test.go b/x/gov/migrations/v5/store_test.go index e4e4ba683266..550b77d0658a 100644 --- a/x/gov/migrations/v5/store_test.go +++ b/x/gov/migrations/v5/store_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/require" + "cosmossdk.io/collections" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/runtime" @@ -23,6 +24,9 @@ func TestMigrateStore(t *testing.T) { govKey := storetypes.NewKVStoreKey("gov") ctx := testutil.DefaultContext(govKey, storetypes.NewTransientStoreKey("transient_test")) store := ctx.KVStore(govKey) + storeService := runtime.NewKVStoreService(govKey) + sb := collections.NewSchemaBuilder(storeService) + constitutionCollection := collections.NewItem(sb, v5.ConstitutionKey, "constitution", collections.StringValue) var params v1.Params bz := store.Get(v4.ParamsKey) @@ -32,8 +36,7 @@ func TestMigrateStore(t *testing.T) { require.Equal(t, (*time.Duration)(nil), params.ExpeditedVotingPeriod) // Run migrations. - storeService := runtime.NewKVStoreService(govKey) - err := v5.MigrateStore(ctx, storeService, cdc) + err := v5.MigrateStore(ctx, storeService, cdc, constitutionCollection) require.NoError(t, err) // Check params @@ -43,4 +46,10 @@ func TestMigrateStore(t *testing.T) { require.Equal(t, v1.DefaultParams().ExpeditedMinDeposit, params.ExpeditedMinDeposit) require.Equal(t, v1.DefaultParams().ExpeditedThreshold, params.ExpeditedThreshold) require.Equal(t, v1.DefaultParams().ExpeditedVotingPeriod, params.ExpeditedVotingPeriod) + require.Equal(t, v1.DefaultParams().MinDepositRatio, params.MinDepositRatio) + + // Check constitution + result, err := constitutionCollection.Get(ctx) + require.NoError(t, err) + require.Equal(t, "This chain has no constitution.", result) } diff --git a/x/gov/module.go b/x/gov/module.go index 042cb1b6fde6..dc84dd9bcad1 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -5,8 +5,8 @@ import ( "encoding/json" "fmt" "sort" + "strings" - abci "github.com/cometbft/cometbft/abci/types" gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" "golang.org/x/exp/maps" @@ -15,9 +15,8 @@ import ( modulev1 "cosmossdk.io/api/cosmos/gov/module/v1" "cosmossdk.io/core/address" "cosmossdk.io/core/appmodule" - "cosmossdk.io/depinject" - store "cosmossdk.io/core/store" + "cosmossdk.io/depinject" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" @@ -42,6 +41,12 @@ const ConsensusVersion = 5 var ( _ module.AppModuleBasic = AppModuleBasic{} _ module.AppModuleSimulation = AppModule{} + _ module.HasGenesis = AppModule{} + _ module.HasServices = AppModule{} + _ module.HasInvariants = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasEndBlocker = AppModule{} ) // AppModuleBasic defines the basic application module used by the gov module. @@ -110,11 +115,6 @@ func getProposalCLIHandlers(handlers []govclient.ProposalHandler) []*cobra.Comma return proposalCLIHandlers } -// GetQueryCmd returns the root query command for the gov module. -func (ab AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.GetQueryCmd(ab.ac) -} - // RegisterInterfaces implements InterfaceModule.RegisterInterfaces func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { v1.RegisterInterfaces(registry) @@ -147,11 +147,6 @@ func NewAppModule( } } -var ( - _ appmodule.AppModule = AppModule{} - _ appmodule.HasEndBlocker = AppModule{} -) - // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} @@ -231,8 +226,8 @@ func InvokeAddRoutes(keeper *keeper.Keeper, routes []v1beta1.HandlerRoute) { // Default route order is a lexical sort by RouteKey. // Explicit ordering can be added to the module config if required. - slices.SortFunc(routes, func(x, y v1beta1.HandlerRoute) bool { - return x.RouteKey < y.RouteKey + slices.SortFunc(routes, func(x, y v1beta1.HandlerRoute) int { + return strings.Compare(x.RouteKey, y.RouteKey) }) router := v1beta1.NewRouter() @@ -266,11 +261,6 @@ func InvokeSetHooks(keeper *keeper.Keeper, govHooks map[string]govtypes.GovHooks return nil } -// Name returns the gov module's name. -func (AppModule) Name() string { - return govtypes.ModuleName -} - // RegisterInvariants registers module invariants func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { keeper.RegisterInvariants(ir, am.keeper, am.bankKeeper) @@ -306,11 +296,10 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { // InitGenesis performs genesis initialization for the gov module. It returns // no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) { var genesisState v1.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) InitGenesis(ctx, am.accountKeeper, am.bankKeeper, am.keeper, &genesisState) - return []abci.ValidatorUpdate{} } // ExportGenesis returns the exported genesis state as raw bytes for the gov diff --git a/x/gov/simulation/genesis.go b/x/gov/simulation/genesis.go index 16c58a914cee..160668848462 100644 --- a/x/gov/simulation/genesis.go +++ b/x/gov/simulation/genesis.go @@ -28,6 +28,7 @@ const ( ExpeditedThreshold = "expedited_threshold" Veto = "veto" ProposalCancelRate = "proposal_cancel_rate" + MinDepositRatio = "min_deposit_ratio" // ExpeditedThreshold must be at least as large as the regular Threshold // Therefore, we use this break out point in randomization. @@ -94,6 +95,11 @@ func GenVeto(r *rand.Rand) sdkmath.LegacyDec { return sdkmath.LegacyNewDecWithPrec(int64(simulation.RandIntBetween(r, 250, 334)), 3) } +// GenMinDepositRatio returns randomized DepositMinRatio +func GenMinDepositRatio(r *rand.Rand) sdkmath.LegacyDec { + return sdkmath.LegacyMustNewDecFromStr("0.01") +} + // RandomizedGenState generates a random GenesisState for gov func RandomizedGenState(simState *module.SimulationState) { startingProposalID := uint64(simState.Rand.Intn(100)) @@ -131,9 +137,12 @@ func RandomizedGenState(simState *module.SimulationState) { var veto sdkmath.LegacyDec simState.AppParams.GetOrGenerate(Veto, &veto, simState.Rand, func(r *rand.Rand) { veto = GenVeto(r) }) + var minDepositRatio sdkmath.LegacyDec + simState.AppParams.GetOrGenerate(MinDepositRatio, &minDepositRatio, simState.Rand, func(r *rand.Rand) { minDepositRatio = GenMinDepositRatio(r) }) + govGenesis := v1.NewGenesisState( startingProposalID, - v1.NewParams(minDeposit, expeditedMinDeposit, depositPeriod, votingPeriod, expeditedVotingPeriod, quorum.String(), threshold.String(), expitedVotingThreshold.String(), veto.String(), minInitialDepositRatio.String(), proposalCancelRate.String(), "", simState.Rand.Intn(2) == 0, simState.Rand.Intn(2) == 0, simState.Rand.Intn(2) == 0), + v1.NewParams(minDeposit, expeditedMinDeposit, depositPeriod, votingPeriod, expeditedVotingPeriod, quorum.String(), threshold.String(), expitedVotingThreshold.String(), veto.String(), minInitialDepositRatio.String(), proposalCancelRate.String(), "", simState.Rand.Intn(2) == 0, simState.Rand.Intn(2) == 0, simState.Rand.Intn(2) == 0, minDepositRatio.String()), ) bz, err := json.MarshalIndent(&govGenesis, "", " ") diff --git a/x/gov/simulation/genesis_test.go b/x/gov/simulation/genesis_test.go index 29b70cc4629e..573d10c56e23 100644 --- a/x/gov/simulation/genesis_test.go +++ b/x/gov/simulation/genesis_test.go @@ -9,6 +9,7 @@ import ( "gotest.tools/v3/assert" sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/gov/simulation/operations.go b/x/gov/simulation/operations.go index dbf48baae1c9..013e89fd5262 100644 --- a/x/gov/simulation/operations.go +++ b/x/gov/simulation/operations.go @@ -1,13 +1,10 @@ package simulation import ( - "errors" "math" "math/rand" "time" - "cosmossdk.io/collections" - sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/baseapp" @@ -325,7 +322,12 @@ func SimulateMsgDeposit( return simtypes.NoOpMsg(types.ModuleName, TypeMsgDeposit, "unable to generate proposalID"), nil, nil } - deposit, skip, err := randomDeposit(r, ctx, ak, bk, k, simAccount.Address, false, false) + p, err := k.Proposals.Get(ctx, proposalID) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, TypeMsgDeposit, "unable to get proposal"), nil, err + } + + deposit, skip, err := randomDeposit(r, ctx, ak, bk, k, simAccount.Address, false, p.Expedited) switch { case skip: return simtypes.NoOpMsg(types.ModuleName, TypeMsgDeposit, "skip deposit"), nil, nil @@ -573,6 +575,13 @@ func randomDeposit( minDepositAmount := minDeposit[denomIndex].Amount + minDepositRatio, err := sdkmath.LegacyNewDecFromStr(params.GetMinDepositRatio()) + if err != nil { + return nil, false, err + } + + threshold := minDepositAmount.ToLegacyDec().Mul(minDepositRatio).TruncateInt() + minAmount := sdkmath.ZeroInt() if useMinAmount { minDepositPercent, err := sdkmath.LegacyNewDecFromStr(params.MinInitialDepositRatio) @@ -589,7 +598,7 @@ func randomDeposit( } amount = amount.Add(minAmount) - if amount.GT(spendableBalance) { + if amount.GT(spendableBalance) || amount.LT(threshold) { return nil, true, nil } @@ -603,7 +612,7 @@ func randomProposal(r *rand.Rand, k *keeper.Keeper, ctx sdk.Context) *v1.Proposa proposals = append(proposals, &value) return false, nil }) - if err != nil && !errors.Is(err, collections.ErrInvalidIterator) { + if err != nil { panic(err) } if len(proposals) == 0 { @@ -665,7 +674,7 @@ func randomWeightedVotingOptions(r *rand.Rand) v1.WeightedVoteOptions { if w1 > 0 { weightedVoteOptions = append(weightedVoteOptions, &v1.WeightedVoteOption{ Option: v1.OptionYes, - Weight: sdk.NewDecWithPrec(int64(w1), 2).String(), + Weight: sdkmath.LegacyNewDecWithPrec(int64(w1), 2).String(), }) } if w2 > 0 { diff --git a/x/gov/simulation/operations_test.go b/x/gov/simulation/operations_test.go index b0e6fd189557..ea88bca877a2 100644 --- a/x/gov/simulation/operations_test.go +++ b/x/gov/simulation/operations_test.go @@ -6,12 +6,13 @@ import ( "testing" "time" - "cosmossdk.io/depinject" - "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/require" + "cosmossdk.io/depinject" + "cosmossdk.io/log" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil/configurator" diff --git a/x/gov/testutil/expected_keepers.go b/x/gov/testutil/expected_keepers.go index 0ac7521a2d2d..ed6994662bca 100644 --- a/x/gov/testutil/expected_keepers.go +++ b/x/gov/testutil/expected_keepers.go @@ -31,8 +31,8 @@ type BankKeeper interface { type StakingKeeper interface { types.StakingKeeper - BondDenom(ctx sdk.Context) string - TokensFromConsensusPower(ctx sdk.Context, power int64) math.Int + BondDenom(ctx context.Context) (string, error) + TokensFromConsensusPower(ctx context.Context, power int64) math.Int } // DistributionKeeper defines the expected distribution keeper diff --git a/x/gov/testutil/expected_keepers_mocks.go b/x/gov/testutil/expected_keepers_mocks.go index 92c8a5574130..5970d3822f6a 100644 --- a/x/gov/testutil/expected_keepers_mocks.go +++ b/x/gov/testutil/expected_keepers_mocks.go @@ -159,6 +159,18 @@ func (mr *MockBankKeeperMockRecorder) AllBalances(arg0, arg1 interface{}) *gomoc return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllBalances", reflect.TypeOf((*MockBankKeeper)(nil).AllBalances), arg0, arg1) } +// AppendSendRestriction mocks base method. +func (m *MockBankKeeper) AppendSendRestriction(restriction types0.SendRestrictionFn) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "AppendSendRestriction", restriction) +} + +// AppendSendRestriction indicates an expected call of AppendSendRestriction. +func (mr *MockBankKeeperMockRecorder) AppendSendRestriction(restriction interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppendSendRestriction", reflect.TypeOf((*MockBankKeeper)(nil).AppendSendRestriction), restriction) +} + // Balance mocks base method. func (m *MockBankKeeper) Balance(arg0 context.Context, arg1 *types0.QueryBalanceRequest) (*types0.QueryBalanceResponse, error) { m.ctrl.T.Helper() @@ -202,6 +214,18 @@ func (mr *MockBankKeeperMockRecorder) BurnCoins(ctx, moduleName, amt interface{} return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BurnCoins", reflect.TypeOf((*MockBankKeeper)(nil).BurnCoins), ctx, moduleName, amt) } +// ClearSendRestriction mocks base method. +func (m *MockBankKeeper) ClearSendRestriction() { + m.ctrl.T.Helper() + m.ctrl.Call(m, "ClearSendRestriction") +} + +// ClearSendRestriction indicates an expected call of ClearSendRestriction. +func (mr *MockBankKeeperMockRecorder) ClearSendRestriction() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearSendRestriction", reflect.TypeOf((*MockBankKeeper)(nil).ClearSendRestriction)) +} + // DelegateCoins mocks base method. func (m *MockBankKeeper) DelegateCoins(ctx context.Context, delegatorAddr, moduleAccAddr types.AccAddress, amt types.Coins) error { m.ctrl.T.Helper() @@ -262,6 +286,21 @@ func (mr *MockBankKeeperMockRecorder) DenomMetadata(arg0, arg1 interface{}) *gom return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DenomMetadata", reflect.TypeOf((*MockBankKeeper)(nil).DenomMetadata), arg0, arg1) } +// DenomMetadataByQueryString mocks base method. +func (m *MockBankKeeper) DenomMetadataByQueryString(arg0 context.Context, arg1 *types0.QueryDenomMetadataByQueryStringRequest) (*types0.QueryDenomMetadataByQueryStringResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DenomMetadataByQueryString", arg0, arg1) + ret0, _ := ret[0].(*types0.QueryDenomMetadataByQueryStringResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DenomMetadataByQueryString indicates an expected call of DenomMetadataByQueryString. +func (mr *MockBankKeeperMockRecorder) DenomMetadataByQueryString(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DenomMetadataByQueryString", reflect.TypeOf((*MockBankKeeper)(nil).DenomMetadataByQueryString), arg0, arg1) +} + // DenomOwners mocks base method. func (m *MockBankKeeper) DenomOwners(arg0 context.Context, arg1 *types0.QueryDenomOwnersRequest) (*types0.QueryDenomOwnersResponse, error) { m.ctrl.T.Helper() @@ -277,6 +316,21 @@ func (mr *MockBankKeeperMockRecorder) DenomOwners(arg0, arg1 interface{}) *gomoc return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DenomOwners", reflect.TypeOf((*MockBankKeeper)(nil).DenomOwners), arg0, arg1) } +// DenomOwnersByQuery mocks base method. +func (m *MockBankKeeper) DenomOwnersByQuery(arg0 context.Context, arg1 *types0.QueryDenomOwnersByQueryRequest) (*types0.QueryDenomOwnersByQueryResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DenomOwnersByQuery", arg0, arg1) + ret0, _ := ret[0].(*types0.QueryDenomOwnersByQueryResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DenomOwnersByQuery indicates an expected call of DenomOwnersByQuery. +func (mr *MockBankKeeperMockRecorder) DenomOwnersByQuery(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DenomOwnersByQuery", reflect.TypeOf((*MockBankKeeper)(nil).DenomOwnersByQuery), arg0, arg1) +} + // DenomsMetadata mocks base method. func (m *MockBankKeeper) DenomsMetadata(arg0 context.Context, arg1 *types0.QueryDenomsMetadataRequest) (*types0.QueryDenomsMetadataResponse, error) { m.ctrl.T.Helper() @@ -533,17 +587,17 @@ func (mr *MockBankKeeperMockRecorder) InitGenesis(arg0, arg1 interface{}) *gomoc } // InputOutputCoins mocks base method. -func (m *MockBankKeeper) InputOutputCoins(ctx context.Context, inputs types0.Input, outputs []types0.Output) error { +func (m *MockBankKeeper) InputOutputCoins(ctx context.Context, input types0.Input, outputs []types0.Output) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "InputOutputCoins", ctx, inputs, outputs) + ret := m.ctrl.Call(m, "InputOutputCoins", ctx, input, outputs) ret0, _ := ret[0].(error) return ret0 } // InputOutputCoins indicates an expected call of InputOutputCoins. -func (mr *MockBankKeeperMockRecorder) InputOutputCoins(ctx, inputs, outputs interface{}) *gomock.Call { +func (mr *MockBankKeeperMockRecorder) InputOutputCoins(ctx, input, outputs interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InputOutputCoins", reflect.TypeOf((*MockBankKeeper)(nil).InputOutputCoins), ctx, inputs, outputs) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InputOutputCoins", reflect.TypeOf((*MockBankKeeper)(nil).InputOutputCoins), ctx, input, outputs) } // IsSendEnabledCoin mocks base method. @@ -696,6 +750,18 @@ func (mr *MockBankKeeperMockRecorder) Params(arg0, arg1 interface{}) *gomock.Cal return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Params", reflect.TypeOf((*MockBankKeeper)(nil).Params), arg0, arg1) } +// PrependSendRestriction mocks base method. +func (m *MockBankKeeper) PrependSendRestriction(restriction types0.SendRestrictionFn) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "PrependSendRestriction", restriction) +} + +// PrependSendRestriction indicates an expected call of PrependSendRestriction. +func (mr *MockBankKeeperMockRecorder) PrependSendRestriction(restriction interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrependSendRestriction", reflect.TypeOf((*MockBankKeeper)(nil).PrependSendRestriction), restriction) +} + // SendCoins mocks base method. func (m *MockBankKeeper) SendCoins(ctx context.Context, fromAddr, toAddr types.AccAddress, amt types.Coins) error { m.ctrl.T.Helper() @@ -948,7 +1014,7 @@ func (mr *MockBankKeeperMockRecorder) ValidateBalance(ctx, addr interface{}) *go } // WithMintCoinsRestriction mocks base method. -func (m *MockBankKeeper) WithMintCoinsRestriction(arg0 keeper.MintingRestrictionFn) keeper.BaseKeeper { +func (m *MockBankKeeper) WithMintCoinsRestriction(arg0 types0.MintingRestrictionFn) keeper.BaseKeeper { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "WithMintCoinsRestriction", arg0) ret0, _ := ret[0].(keeper.BaseKeeper) @@ -985,11 +1051,12 @@ func (m *MockStakingKeeper) EXPECT() *MockStakingKeeperMockRecorder { } // BondDenom mocks base method. -func (m *MockStakingKeeper) BondDenom(ctx types.Context) string { +func (m *MockStakingKeeper) BondDenom(ctx context.Context) (string, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "BondDenom", ctx) ret0, _ := ret[0].(string) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // BondDenom indicates an expected call of BondDenom. @@ -999,9 +1066,11 @@ func (mr *MockStakingKeeperMockRecorder) BondDenom(ctx interface{}) *gomock.Call } // IterateBondedValidatorsByPower mocks base method. -func (m *MockStakingKeeper) IterateBondedValidatorsByPower(arg0 types.Context, arg1 func(int64, types1.ValidatorI) bool) { +func (m *MockStakingKeeper) IterateBondedValidatorsByPower(arg0 context.Context, arg1 func(int64, types1.ValidatorI) bool) error { m.ctrl.T.Helper() - m.ctrl.Call(m, "IterateBondedValidatorsByPower", arg0, arg1) + ret := m.ctrl.Call(m, "IterateBondedValidatorsByPower", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 } // IterateBondedValidatorsByPower indicates an expected call of IterateBondedValidatorsByPower. @@ -1011,9 +1080,11 @@ func (mr *MockStakingKeeperMockRecorder) IterateBondedValidatorsByPower(arg0, ar } // IterateDelegations mocks base method. -func (m *MockStakingKeeper) IterateDelegations(ctx types.Context, delegator types.AccAddress, fn func(int64, types1.DelegationI) bool) { +func (m *MockStakingKeeper) IterateDelegations(ctx context.Context, delegator types.AccAddress, fn func(int64, types1.DelegationI) bool) error { m.ctrl.T.Helper() - m.ctrl.Call(m, "IterateDelegations", ctx, delegator, fn) + ret := m.ctrl.Call(m, "IterateDelegations", ctx, delegator, fn) + ret0, _ := ret[0].(error) + return ret0 } // IterateDelegations indicates an expected call of IterateDelegations. @@ -1023,7 +1094,7 @@ func (mr *MockStakingKeeperMockRecorder) IterateDelegations(ctx, delegator, fn i } // TokensFromConsensusPower mocks base method. -func (m *MockStakingKeeper) TokensFromConsensusPower(ctx types.Context, power int64) math.Int { +func (m *MockStakingKeeper) TokensFromConsensusPower(ctx context.Context, power int64) math.Int { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TokensFromConsensusPower", ctx, power) ret0, _ := ret[0].(math.Int) @@ -1037,11 +1108,12 @@ func (mr *MockStakingKeeperMockRecorder) TokensFromConsensusPower(ctx, power int } // TotalBondedTokens mocks base method. -func (m *MockStakingKeeper) TotalBondedTokens(arg0 types.Context) math.Int { +func (m *MockStakingKeeper) TotalBondedTokens(arg0 context.Context) (math.Int, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TotalBondedTokens", arg0) ret0, _ := ret[0].(math.Int) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // TotalBondedTokens indicates an expected call of TotalBondedTokens. @@ -1050,6 +1122,20 @@ func (mr *MockStakingKeeperMockRecorder) TotalBondedTokens(arg0 interface{}) *go return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TotalBondedTokens", reflect.TypeOf((*MockStakingKeeper)(nil).TotalBondedTokens), arg0) } +// ValidatorAddressCodec mocks base method. +func (m *MockStakingKeeper) ValidatorAddressCodec() address.Codec { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ValidatorAddressCodec") + ret0, _ := ret[0].(address.Codec) + return ret0 +} + +// ValidatorAddressCodec indicates an expected call of ValidatorAddressCodec. +func (mr *MockStakingKeeperMockRecorder) ValidatorAddressCodec() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatorAddressCodec", reflect.TypeOf((*MockStakingKeeper)(nil).ValidatorAddressCodec)) +} + // MockDistributionKeeper is a mock of DistributionKeeper interface. type MockDistributionKeeper struct { ctrl *gomock.Controller diff --git a/x/gov/types/errors.go b/x/gov/types/errors.go index fa584da93433..e89723bbb813 100644 --- a/x/gov/types/errors.go +++ b/x/gov/types/errors.go @@ -23,4 +23,6 @@ var ( ErrInvalidProposer = errors.Register(ModuleName, 18, "invalid proposer") ErrVotingPeriodEnded = errors.Register(ModuleName, 20, "voting period already ended") ErrInvalidProposal = errors.Register(ModuleName, 21, "invalid proposal") + ErrSummaryTooLong = errors.Register(ModuleName, 22, "summary too long") + ErrInvalidDepositDenom = errors.Register(ModuleName, 23, "invalid deposit denom") ) diff --git a/x/gov/types/events.go b/x/gov/types/events.go index c7f895234f0b..8f04e47cca17 100644 --- a/x/gov/types/events.go +++ b/x/gov/types/events.go @@ -10,8 +10,10 @@ const ( EventTypeCancelProposal = "cancel_proposal" AttributeKeyProposalResult = "proposal_result" + AttributeKeyVoter = "voter" AttributeKeyOption = "option" AttributeKeyProposalID = "proposal_id" + AttributeKeyDepositor = "depositor" AttributeKeyProposalMessages = "proposal_messages" // Msg type_urls in the proposal AttributeKeyVotingPeriodStart = "voting_period_start" AttributeKeyProposalLog = "proposal_log" // log of proposal execution @@ -21,6 +23,7 @@ const ( AttributeValueExpeditedProposalRejected = "expedited_proposal_rejected" // didn't meet expedited vote quorum AttributeValueProposalFailed = "proposal_failed" // error on proposal handler AttributeValueProposalCanceled = "proposal_canceled" // error on proposal handler + AttributeKeyProposalProposer = "proposal_proposer" // account address of the proposer AttributeKeyProposalType = "proposal_type" AttributeSignalTitle = "signal_title" diff --git a/x/gov/types/expected_keepers.go b/x/gov/types/expected_keepers.go index 859b3a87c299..e27e9b57aa28 100644 --- a/x/gov/types/expected_keepers.go +++ b/x/gov/types/expected_keepers.go @@ -18,16 +18,17 @@ type ParamSubspace interface { // StakingKeeper expected staking keeper (Validator and Delegator sets) (noalias) type StakingKeeper interface { + ValidatorAddressCodec() addresscodec.Codec // iterate through bonded validators by operator address, execute func for each validator IterateBondedValidatorsByPower( - sdk.Context, func(index int64, validator stakingtypes.ValidatorI) (stop bool), - ) + context.Context, func(index int64, validator stakingtypes.ValidatorI) (stop bool), + ) error - TotalBondedTokens(sdk.Context) math.Int // total bonded tokens within the validator set + TotalBondedTokens(context.Context) (math.Int, error) // total bonded tokens within the validator set IterateDelegations( - ctx sdk.Context, delegator sdk.AccAddress, + ctx context.Context, delegator sdk.AccAddress, fn func(index int64, delegation stakingtypes.DelegationI) (stop bool), - ) + ) error } // DistributionKeeper defines the expected distribution keeper (noalias) @@ -66,11 +67,11 @@ type BankKeeper interface { // GovHooks event hooks for governance proposal object (noalias) type GovHooks interface { - AfterProposalSubmission(ctx context.Context, proposalID uint64) // Must be called after proposal is submitted - AfterProposalDeposit(ctx context.Context, proposalID uint64, depositorAddr sdk.AccAddress) // Must be called after a deposit is made - AfterProposalVote(ctx context.Context, proposalID uint64, voterAddr sdk.AccAddress) // Must be called after a vote on a proposal is cast - AfterProposalFailedMinDeposit(ctx context.Context, proposalID uint64) // Must be called when proposal fails to reach min deposit - AfterProposalVotingPeriodEnded(ctx context.Context, proposalID uint64) // Must be called when proposal's finishes it's voting period + AfterProposalSubmission(ctx context.Context, proposalID uint64) error // Must be called after proposal is submitted + AfterProposalDeposit(ctx context.Context, proposalID uint64, depositorAddr sdk.AccAddress) error // Must be called after a deposit is made + AfterProposalVote(ctx context.Context, proposalID uint64, voterAddr sdk.AccAddress) error // Must be called after a vote on a proposal is cast + AfterProposalFailedMinDeposit(ctx context.Context, proposalID uint64) error // Must be called when proposal fails to reach min deposit + AfterProposalVotingPeriodEnded(ctx context.Context, proposalID uint64) error // Must be called when proposal's finishes it's voting period } type GovHooksWrapper struct{ GovHooks } diff --git a/x/gov/types/hooks.go b/x/gov/types/hooks.go index 099e7d0da1db..7749e83b4cce 100644 --- a/x/gov/types/hooks.go +++ b/x/gov/types/hooks.go @@ -2,6 +2,7 @@ package types import ( "context" + "errors" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -15,32 +16,43 @@ func NewMultiGovHooks(hooks ...GovHooks) MultiGovHooks { return hooks } -func (h MultiGovHooks) AfterProposalSubmission(ctx context.Context, proposalID uint64) { +func (h MultiGovHooks) AfterProposalSubmission(ctx context.Context, proposalID uint64) error { + var errs error for i := range h { - h[i].AfterProposalSubmission(ctx, proposalID) + errs = errors.Join(errs, h[i].AfterProposalSubmission(ctx, proposalID)) } + + return errs } -func (h MultiGovHooks) AfterProposalDeposit(ctx context.Context, proposalID uint64, depositorAddr sdk.AccAddress) { +func (h MultiGovHooks) AfterProposalDeposit(ctx context.Context, proposalID uint64, depositorAddr sdk.AccAddress) error { + var errs error for i := range h { - h[i].AfterProposalDeposit(ctx, proposalID, depositorAddr) + errs = errors.Join(errs, h[i].AfterProposalDeposit(ctx, proposalID, depositorAddr)) } + return errs } -func (h MultiGovHooks) AfterProposalVote(ctx context.Context, proposalID uint64, voterAddr sdk.AccAddress) { +func (h MultiGovHooks) AfterProposalVote(ctx context.Context, proposalID uint64, voterAddr sdk.AccAddress) error { + var errs error for i := range h { - h[i].AfterProposalVote(ctx, proposalID, voterAddr) + errs = errors.Join(errs, h[i].AfterProposalVote(ctx, proposalID, voterAddr)) } + return errs } -func (h MultiGovHooks) AfterProposalFailedMinDeposit(ctx context.Context, proposalID uint64) { +func (h MultiGovHooks) AfterProposalFailedMinDeposit(ctx context.Context, proposalID uint64) error { + var errs error for i := range h { - h[i].AfterProposalFailedMinDeposit(ctx, proposalID) + errs = errors.Join(errs, h[i].AfterProposalFailedMinDeposit(ctx, proposalID)) } + return errs } -func (h MultiGovHooks) AfterProposalVotingPeriodEnded(ctx context.Context, proposalID uint64) { +func (h MultiGovHooks) AfterProposalVotingPeriodEnded(ctx context.Context, proposalID uint64) error { + var errs error for i := range h { - h[i].AfterProposalVotingPeriodEnded(ctx, proposalID) + errs = errors.Join(errs, h[i].AfterProposalVotingPeriodEnded(ctx, proposalID)) } + return errs } diff --git a/x/gov/types/v1/genesis.go b/x/gov/types/v1/genesis.go index ef44bd481627..71352bb77839 100644 --- a/x/gov/types/v1/genesis.go +++ b/x/gov/types/v1/genesis.go @@ -2,6 +2,9 @@ package v1 import ( "errors" + "fmt" + + "golang.org/x/sync/errgroup" "github.com/cosmos/cosmos-sdk/codec/types" ) @@ -27,13 +30,79 @@ func (data GenesisState) Empty() bool { return data.StartingProposalId == 0 || data.Params == nil } -// ValidateGenesis checks if parameters are within valid ranges +// ValidateGenesis checks if gov genesis state is valid ranges +// It checks if params are in valid ranges +// It also makes sure that the provided proposal IDs are unique and +// that there are no duplicate deposit or vote records and no vote or deposits for non-existent proposals func ValidateGenesis(data *GenesisState) error { if data.StartingProposalId == 0 { return errors.New("starting proposal id must be greater than 0") } - return data.Params.ValidateBasic() + var errGroup errgroup.Group + + // weed out duplicate proposals + proposalIds := make(map[uint64]struct{}) + for _, p := range data.Proposals { + if _, ok := proposalIds[p.Id]; ok { + return fmt.Errorf("duplicate proposal id: %d", p.Id) + } + + proposalIds[p.Id] = struct{}{} + } + + // weed out duplicate deposits + errGroup.Go(func() error { + type depositKey struct { + ProposalId uint64 //nolint:revive // staying consistent with main and v0.47 + Depositor string + } + depositIds := make(map[depositKey]struct{}) + for _, d := range data.Deposits { + if _, ok := proposalIds[d.ProposalId]; !ok { + return fmt.Errorf("deposit %v has non-existent proposal id: %d", d, d.ProposalId) + } + + dk := depositKey{d.ProposalId, d.Depositor} + if _, ok := depositIds[dk]; ok { + return fmt.Errorf("duplicate deposit: %v", d) + } + + depositIds[dk] = struct{}{} + } + + return nil + }) + + // weed out duplicate votes + errGroup.Go(func() error { + type voteKey struct { + ProposalId uint64 //nolint:revive // staying consistent with main and v0.47 + Voter string + } + voteIds := make(map[voteKey]struct{}) + for _, v := range data.Votes { + if _, ok := proposalIds[v.ProposalId]; !ok { + return fmt.Errorf("vote %v has non-existent proposal id: %d", v, v.ProposalId) + } + + vk := voteKey{v.ProposalId, v.Voter} + if _, ok := voteIds[vk]; ok { + return fmt.Errorf("duplicate vote: %v", v) + } + + voteIds[vk] = struct{}{} + } + + return nil + }) + + // verify params + errGroup.Go(func() error { + return data.Params.ValidateBasic() + }) + + return errGroup.Wait() } var _ types.UnpackInterfacesMessage = GenesisState{} diff --git a/x/gov/types/v1/genesis_test.go b/x/gov/types/v1/genesis_test.go index 682131769a58..691dca03e6e5 100644 --- a/x/gov/types/v1/genesis_test.go +++ b/x/gov/types/v1/genesis_test.go @@ -3,11 +3,12 @@ package v1_test import ( "testing" + "github.com/stretchr/testify/require" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - "github.com/stretchr/testify/require" ) func TestEmptyGenesis(t *testing.T) { @@ -24,7 +25,7 @@ func TestValidateGenesis(t *testing.T) { testCases := []struct { name string genesisState func() *v1.GenesisState - expErr bool + expErrMsg string }{ { name: "valid", @@ -37,7 +38,7 @@ func TestValidateGenesis(t *testing.T) { genesisState: func() *v1.GenesisState { return v1.NewGenesisState(0, params) }, - expErr: true, + expErrMsg: "starting proposal id must be greater than 0", }, { name: "invalid min deposit", @@ -48,9 +49,9 @@ func TestValidateGenesis(t *testing.T) { Amount: sdkmath.NewInt(-100), }} - return v1.NewGenesisState(0, params1) + return v1.NewGenesisState(v1.DefaultStartingProposalID, params1) }, - expErr: true, + expErrMsg: "invalid minimum deposit", }, { name: "invalid max deposit period", @@ -58,9 +59,9 @@ func TestValidateGenesis(t *testing.T) { params1 := params params1.MaxDepositPeriod = nil - return v1.NewGenesisState(0, params1) + return v1.NewGenesisState(v1.DefaultStartingProposalID, params1) }, - expErr: true, + expErrMsg: "maximum deposit period must not be nil", }, { name: "invalid quorum", @@ -68,9 +69,9 @@ func TestValidateGenesis(t *testing.T) { params1 := params params1.Quorum = "2" - return v1.NewGenesisState(0, params1) + return v1.NewGenesisState(v1.DefaultStartingProposalID, params1) }, - expErr: true, + expErrMsg: "quorom too large", }, { name: "invalid threshold", @@ -78,9 +79,9 @@ func TestValidateGenesis(t *testing.T) { params1 := params params1.Threshold = "2" - return v1.NewGenesisState(0, params1) + return v1.NewGenesisState(v1.DefaultStartingProposalID, params1) }, - expErr: true, + expErrMsg: "vote threshold too large", }, { name: "invalid veto threshold", @@ -88,9 +89,86 @@ func TestValidateGenesis(t *testing.T) { params1 := params params1.VetoThreshold = "2" - return v1.NewGenesisState(0, params1) + return v1.NewGenesisState(v1.DefaultStartingProposalID, params1) + }, + expErrMsg: "veto threshold too large", + }, + { + name: "duplicate proposals", + genesisState: func() *v1.GenesisState { + state := v1.NewGenesisState(v1.DefaultStartingProposalID, params) + state.Proposals = append(state.Proposals, &v1.Proposal{Id: 1}) + state.Proposals = append(state.Proposals, &v1.Proposal{Id: 1}) + + return state + }, + expErrMsg: "duplicate proposal id: 1", + }, + { + name: "duplicate votes", + genesisState: func() *v1.GenesisState { + state := v1.NewGenesisState(v1.DefaultStartingProposalID, params) + state.Proposals = append(state.Proposals, &v1.Proposal{Id: 1}) + state.Votes = append(state.Votes, + &v1.Vote{ + ProposalId: 1, + Voter: "voter", + }, + &v1.Vote{ + ProposalId: 1, + Voter: "voter", + }) + + return state + }, + expErrMsg: "duplicate vote", + }, + { + name: "duplicate deposits", + genesisState: func() *v1.GenesisState { + state := v1.NewGenesisState(v1.DefaultStartingProposalID, params) + state.Proposals = append(state.Proposals, &v1.Proposal{Id: 1}) + state.Deposits = append(state.Deposits, + &v1.Deposit{ + ProposalId: 1, + Depositor: "depositor", + }, + &v1.Deposit{ + ProposalId: 1, + Depositor: "depositor", + }) + + return state + }, + expErrMsg: "duplicate deposit: proposal_id:1 depositor:\"depositor\"", + }, + { + name: "non-existent proposal id in votes", + genesisState: func() *v1.GenesisState { + state := v1.NewGenesisState(v1.DefaultStartingProposalID, params) + state.Votes = append(state.Votes, + &v1.Vote{ + ProposalId: 1, + Voter: "voter", + }) + + return state + }, + expErrMsg: "vote proposal_id:1 voter:\"voter\" has non-existent proposal id: 1", + }, + { + name: "non-existent proposal id in deposits", + genesisState: func() *v1.GenesisState { + state := v1.NewGenesisState(v1.DefaultStartingProposalID, params) + state.Deposits = append(state.Deposits, + &v1.Deposit{ + ProposalId: 1, + Depositor: "depositor", + }) + + return state }, - expErr: true, + expErrMsg: "deposit proposal_id:1 depositor:\"depositor\"", }, } @@ -98,8 +176,9 @@ func TestValidateGenesis(t *testing.T) { tc := tc t.Run(tc.name, func(t *testing.T) { err := v1.ValidateGenesis(tc.genesisState()) - if tc.expErr { + if tc.expErrMsg != "" { require.Error(t, err) + require.ErrorContains(t, err, tc.expErrMsg) } else { require.NoError(t, err) } diff --git a/x/gov/types/v1/gov.pb.go b/x/gov/types/v1/gov.pb.go index 198b81c37567..06eb08581f26 100644 --- a/x/gov/types/v1/gov.pb.go +++ b/x/gov/types/v1/gov.pb.go @@ -264,7 +264,8 @@ type Proposal struct { // voting_end_time is the end time of voting on a proposal. VotingEndTime *time.Time `protobuf:"bytes,9,opt,name=voting_end_time,json=votingEndTime,proto3,stdtime" json:"voting_end_time,omitempty"` // metadata is any arbitrary metadata attached to the proposal. - // the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#proposal-3 + // the recommended format of the metadata is to be found here: + // https://docs.cosmos.network/v0.47/modules/gov#proposal-3 Metadata string `protobuf:"bytes,10,opt,name=metadata,proto3" json:"metadata,omitempty"` // title is the title of the proposal // @@ -282,6 +283,10 @@ type Proposal struct { // // Since: cosmos-sdk 0.50 Expedited bool `protobuf:"varint,14,opt,name=expedited,proto3" json:"expedited,omitempty"` + // failed_reason defines the reason why the proposal failed + // + // Since: cosmos-sdk 0.50 + FailedReason string `protobuf:"bytes,15,opt,name=failed_reason,json=failedReason,proto3" json:"failed_reason,omitempty"` } func (m *Proposal) Reset() { *m = Proposal{} } @@ -415,6 +420,13 @@ func (m *Proposal) GetExpedited() bool { return false } +func (m *Proposal) GetFailedReason() string { + if m != nil { + return m.FailedReason + } + return "" +} + // TallyResult defines a standard tally for a governance proposal. type TallyResult struct { // yes_count is the number of yes votes on a proposal. @@ -497,7 +509,7 @@ type Vote struct { Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` // options is the weighted vote options. Options []*WeightedVoteOption `protobuf:"bytes,4,rep,name=options,proto3" json:"options,omitempty"` - // metadata is any arbitrary metadata to attached to the vote. + // metadata is any arbitrary metadata attached to the vote. // the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#vote-5 Metadata string `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"` } @@ -783,6 +795,12 @@ type Params struct { BurnProposalDepositPrevote bool `protobuf:"varint,14,opt,name=burn_proposal_deposit_prevote,json=burnProposalDepositPrevote,proto3" json:"burn_proposal_deposit_prevote,omitempty"` // burn deposits if quorum with vote type no_veto is met BurnVoteVeto bool `protobuf:"varint,15,opt,name=burn_vote_veto,json=burnVoteVeto,proto3" json:"burn_vote_veto,omitempty"` + // The ratio representing the proportion of the deposit value minimum that must be met when making a deposit. + // Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be + // required. + // + // Since: cosmos-sdk 0.50 + MinDepositRatio string `protobuf:"bytes,16,opt,name=min_deposit_ratio,json=minDepositRatio,proto3" json:"min_deposit_ratio,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -923,6 +941,13 @@ func (m *Params) GetBurnVoteVeto() bool { return false } +func (m *Params) GetMinDepositRatio() string { + if m != nil { + return m.MinDepositRatio + } + return "" +} + func init() { proto.RegisterEnum("cosmos.gov.v1.VoteOption", VoteOption_name, VoteOption_value) proto.RegisterEnum("cosmos.gov.v1.ProposalStatus", ProposalStatus_name, ProposalStatus_value) @@ -940,94 +965,97 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1/gov.proto", fileDescriptor_e05cb1c0d030febb) } var fileDescriptor_e05cb1c0d030febb = []byte{ - // 1389 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xcb, 0x6e, 0xdb, 0x46, - 0x17, 0x36, 0x75, 0xd7, 0xd1, 0xc5, 0xca, 0xd8, 0x89, 0x69, 0x27, 0x96, 0x1c, 0x21, 0x08, 0xfc, - 0xe7, 0x22, 0xfd, 0x4e, 0x9a, 0x2e, 0x9a, 0x02, 0x85, 0x64, 0x31, 0x0d, 0x8d, 0xc4, 0x52, 0x29, - 0x45, 0x4e, 0xba, 0x21, 0x28, 0x71, 0x22, 0x13, 0x15, 0x39, 0x2a, 0x39, 0x52, 0xac, 0x47, 0xe8, - 0x2e, 0xcb, 0xae, 0x8a, 0x2e, 0xbb, 0xec, 0x22, 0xe8, 0x33, 0x64, 0x55, 0x04, 0xe9, 0xa2, 0xdd, - 0x34, 0x29, 0x92, 0x45, 0x81, 0x3c, 0x45, 0xc1, 0xe1, 0x50, 0x94, 0x64, 0xb5, 0xb6, 0xb3, 0xb1, - 0xc5, 0x73, 0xbe, 0xef, 0x9b, 0x33, 0xe7, 0x32, 0x43, 0xc2, 0x5a, 0x97, 0x38, 0x26, 0x71, 0xca, - 0x3d, 0x32, 0x2a, 0x8f, 0x76, 0xdc, 0x7f, 0xa5, 0x81, 0x4d, 0x28, 0x41, 0x19, 0xcf, 0x51, 0x72, - 0x2d, 0xa3, 0x9d, 0x8d, 0x3c, 0xc7, 0x75, 0x34, 0x07, 0x97, 0x47, 0x3b, 0x1d, 0x4c, 0xb5, 0x9d, - 0x72, 0x97, 0x18, 0x96, 0x07, 0xdf, 0x58, 0xed, 0x91, 0x1e, 0x61, 0x3f, 0xcb, 0xee, 0x2f, 0x6e, - 0x2d, 0xf4, 0x08, 0xe9, 0xf5, 0x71, 0x99, 0x3d, 0x75, 0x86, 0x4f, 0xcb, 0xd4, 0x30, 0xb1, 0x43, - 0x35, 0x73, 0xc0, 0x01, 0xeb, 0xf3, 0x00, 0xcd, 0x1a, 0x73, 0x57, 0x7e, 0xde, 0xa5, 0x0f, 0x6d, - 0x8d, 0x1a, 0xc4, 0x5f, 0x71, 0xdd, 0x8b, 0x48, 0xf5, 0x16, 0xe5, 0xd1, 0x7a, 0xae, 0x73, 0x9a, - 0x69, 0x58, 0xa4, 0xcc, 0xfe, 0x7a, 0xa6, 0x22, 0x01, 0x74, 0x80, 0x8d, 0xde, 0x21, 0xc5, 0x7a, - 0x9b, 0x50, 0x5c, 0x1f, 0xb8, 0x4a, 0x68, 0x07, 0x62, 0x84, 0xfd, 0x12, 0x85, 0x2d, 0x61, 0x3b, - 0x7b, 0x6b, 0xbd, 0x34, 0xb3, 0xeb, 0x52, 0x00, 0x55, 0x38, 0x10, 0x5d, 0x85, 0xd8, 0x33, 0x26, - 0x24, 0x86, 0xb6, 0x84, 0xed, 0x64, 0x35, 0xfb, 0xfa, 0xc5, 0x4d, 0xe0, 0xac, 0x1a, 0xee, 0x2a, - 0xdc, 0x5b, 0xfc, 0x51, 0x80, 0x78, 0x0d, 0x0f, 0x88, 0x63, 0x50, 0x54, 0x80, 0xd4, 0xc0, 0x26, - 0x03, 0xe2, 0x68, 0x7d, 0xd5, 0xd0, 0xd9, 0x5a, 0x11, 0x05, 0x7c, 0x93, 0xac, 0xa3, 0x4f, 0x21, - 0xa9, 0x7b, 0x58, 0x62, 0x73, 0x5d, 0xf1, 0xf5, 0x8b, 0x9b, 0xab, 0x5c, 0xb7, 0xa2, 0xeb, 0x36, - 0x76, 0x9c, 0x26, 0xb5, 0x0d, 0xab, 0xa7, 0x04, 0x50, 0xf4, 0x39, 0xc4, 0x34, 0x93, 0x0c, 0x2d, - 0x2a, 0x86, 0xb7, 0xc2, 0xdb, 0xa9, 0x20, 0x7e, 0xb7, 0x4c, 0x25, 0x5e, 0xa6, 0xd2, 0x2e, 0x31, - 0xac, 0x6a, 0xf2, 0xe5, 0x9b, 0xc2, 0xd2, 0x4f, 0x7f, 0xff, 0x7c, 0x4d, 0x50, 0x38, 0xa7, 0xf8, - 0x36, 0x0a, 0x89, 0x06, 0x0f, 0x02, 0x65, 0x21, 0x34, 0x09, 0x2d, 0x64, 0xe8, 0xe8, 0xff, 0x90, - 0x30, 0xb1, 0xe3, 0x68, 0x3d, 0xec, 0x88, 0x21, 0x26, 0xbe, 0x5a, 0xf2, 0x2a, 0x52, 0xf2, 0x2b, - 0x52, 0xaa, 0x58, 0x63, 0x65, 0x82, 0x42, 0x77, 0x20, 0xe6, 0x50, 0x8d, 0x0e, 0x1d, 0x31, 0xcc, - 0x92, 0xb9, 0x39, 0x97, 0x4c, 0x7f, 0xa9, 0x26, 0x03, 0x29, 0x1c, 0x8c, 0xee, 0x03, 0x7a, 0x6a, - 0x58, 0x5a, 0x5f, 0xa5, 0x5a, 0xbf, 0x3f, 0x56, 0x6d, 0xec, 0x0c, 0xfb, 0x54, 0x8c, 0x6c, 0x09, - 0xdb, 0xa9, 0x5b, 0x1b, 0x73, 0x12, 0x2d, 0x17, 0xa2, 0x30, 0x84, 0x92, 0x63, 0xac, 0x29, 0x0b, - 0xaa, 0x40, 0xca, 0x19, 0x76, 0x4c, 0x83, 0xaa, 0x6e, 0x9b, 0x89, 0x51, 0x2e, 0x31, 0x1f, 0x75, - 0xcb, 0xef, 0xc1, 0x6a, 0xe4, 0xf9, 0xdb, 0x82, 0xa0, 0x80, 0x47, 0x72, 0xcd, 0x68, 0x0f, 0x72, - 0x3c, 0xbb, 0x2a, 0xb6, 0x74, 0x4f, 0x27, 0x76, 0x4a, 0x9d, 0x2c, 0x67, 0x4a, 0x96, 0xce, 0xb4, - 0x64, 0xc8, 0x50, 0x42, 0xb5, 0xbe, 0xca, 0xed, 0x62, 0xfc, 0x0c, 0x35, 0x4a, 0x33, 0xaa, 0xdf, - 0x40, 0x0f, 0xe0, 0xdc, 0x88, 0x50, 0xc3, 0xea, 0xa9, 0x0e, 0xd5, 0x6c, 0xbe, 0xbf, 0xc4, 0x29, - 0xe3, 0x5a, 0xf6, 0xa8, 0x4d, 0x97, 0xc9, 0x02, 0xbb, 0x0f, 0xdc, 0x14, 0xec, 0x31, 0x79, 0x4a, - 0xad, 0x8c, 0x47, 0xf4, 0xb7, 0xb8, 0xe1, 0x36, 0x09, 0xd5, 0x74, 0x8d, 0x6a, 0x22, 0xb8, 0x6d, - 0xab, 0x4c, 0x9e, 0xd1, 0x2a, 0x44, 0xa9, 0x41, 0xfb, 0x58, 0x4c, 0x31, 0x87, 0xf7, 0x80, 0x44, - 0x88, 0x3b, 0x43, 0xd3, 0xd4, 0xec, 0xb1, 0x98, 0x66, 0x76, 0xff, 0x11, 0x7d, 0x02, 0x09, 0x6f, - 0x22, 0xb0, 0x2d, 0x66, 0x4e, 0x18, 0x81, 0x09, 0x12, 0x5d, 0x82, 0x24, 0x3e, 0x1a, 0x60, 0xdd, - 0xa0, 0x58, 0x17, 0xb3, 0x5b, 0xc2, 0x76, 0x42, 0x09, 0x0c, 0xc5, 0xdf, 0x05, 0x48, 0x4d, 0x77, - 0xc8, 0x75, 0x48, 0x8e, 0xb1, 0xa3, 0x76, 0xd9, 0xc8, 0x08, 0xc7, 0xe6, 0x57, 0xb6, 0xa8, 0x92, - 0x18, 0x63, 0x67, 0xd7, 0xf5, 0xa3, 0xdb, 0x90, 0xd1, 0x3a, 0x0e, 0xd5, 0x0c, 0x8b, 0x13, 0x42, - 0x0b, 0x09, 0x69, 0x0e, 0xf2, 0x48, 0xff, 0x83, 0x84, 0x45, 0x38, 0x3e, 0xbc, 0x10, 0x1f, 0xb7, - 0x88, 0x07, 0xbd, 0x0b, 0xc8, 0x22, 0xea, 0x33, 0x83, 0x1e, 0xaa, 0x23, 0x4c, 0x7d, 0x52, 0x64, - 0x21, 0x69, 0xd9, 0x22, 0x07, 0x06, 0x3d, 0x6c, 0x63, 0xea, 0x91, 0x8b, 0xbf, 0x08, 0x10, 0x71, - 0x4f, 0xa7, 0x93, 0xcf, 0x96, 0x12, 0x44, 0x47, 0x84, 0xe2, 0x93, 0xcf, 0x15, 0x0f, 0x86, 0xee, - 0x42, 0xdc, 0x3b, 0xea, 0x1c, 0x31, 0xc2, 0x1a, 0xf6, 0xf2, 0xdc, 0x10, 0x1e, 0x3f, 0x47, 0x15, - 0x9f, 0x31, 0xd3, 0x10, 0xd1, 0xd9, 0x86, 0xd8, 0x8b, 0x24, 0xc2, 0xb9, 0x48, 0xf1, 0x4f, 0x01, - 0x32, 0xbc, 0xad, 0x1b, 0x9a, 0xad, 0x99, 0x0e, 0x7a, 0x02, 0x29, 0xd3, 0xb0, 0x26, 0x53, 0x22, - 0x9c, 0x34, 0x25, 0x9b, 0xee, 0x94, 0x7c, 0x78, 0x53, 0x38, 0x3f, 0xc5, 0xba, 0x41, 0x4c, 0x83, - 0x62, 0x73, 0x40, 0xc7, 0x0a, 0x98, 0x86, 0xe5, 0xcf, 0x8d, 0x09, 0xc8, 0xd4, 0x8e, 0x7c, 0x90, - 0x3a, 0xc0, 0xb6, 0x41, 0x74, 0x96, 0x08, 0x77, 0x85, 0xf9, 0x66, 0xaf, 0xf1, 0x0b, 0xa6, 0x7a, - 0xe5, 0xc3, 0x9b, 0xc2, 0xa5, 0xe3, 0xc4, 0x60, 0x91, 0xef, 0xdd, 0x59, 0xc8, 0x99, 0xda, 0x91, - 0xbf, 0x13, 0xe6, 0xff, 0x2c, 0x24, 0x0a, 0xc5, 0xc7, 0x90, 0x6e, 0xb3, 0x19, 0xe1, 0xbb, 0xab, - 0x01, 0x9f, 0x19, 0x7f, 0x75, 0xe1, 0xa4, 0xd5, 0x23, 0x4c, 0x3d, 0xed, 0xb1, 0xa6, 0x94, 0x7f, - 0xf0, 0x9b, 0x99, 0x2b, 0x5f, 0x85, 0xd8, 0xb7, 0x43, 0x62, 0x0f, 0xcd, 0x05, 0x9d, 0xcc, 0x6e, - 0x22, 0xcf, 0x8b, 0x6e, 0x40, 0x92, 0x1e, 0xda, 0xd8, 0x39, 0x24, 0x7d, 0xfd, 0x5f, 0x2e, 0xad, - 0x00, 0x80, 0xee, 0x40, 0x96, 0x75, 0x63, 0x40, 0x09, 0x2f, 0xa4, 0x64, 0x5c, 0x54, 0xcb, 0x07, - 0xb1, 0x00, 0x7f, 0x8b, 0x43, 0x8c, 0xc7, 0x26, 0x9d, 0xb1, 0xa6, 0x53, 0x27, 0xdf, 0x74, 0xfd, - 0x1e, 0x7e, 0x5c, 0xfd, 0x22, 0x8b, 0xeb, 0x73, 0xbc, 0x16, 0xe1, 0x8f, 0xa8, 0xc5, 0x54, 0xde, - 0x23, 0xa7, 0xcf, 0x7b, 0xf4, 0xec, 0x79, 0x8f, 0x9d, 0x22, 0xef, 0x48, 0x86, 0x75, 0x37, 0xd1, - 0x86, 0x65, 0x50, 0x23, 0xb8, 0x6a, 0x54, 0x16, 0xbe, 0x18, 0x5f, 0xa8, 0x70, 0xc1, 0x34, 0x2c, - 0xd9, 0xc3, 0xf3, 0xf4, 0x28, 0x2e, 0x1a, 0x55, 0xe1, 0xfc, 0xe4, 0x24, 0xe9, 0x6a, 0x56, 0x17, - 0xf7, 0xb9, 0x4c, 0x62, 0xa1, 0xcc, 0x8a, 0x0f, 0xde, 0x65, 0x58, 0x4f, 0x63, 0x0f, 0x56, 0xe7, - 0x35, 0x74, 0xec, 0x50, 0x76, 0xbf, 0xfc, 0xd7, 0xd9, 0x83, 0x66, 0xc5, 0x6a, 0xd8, 0xa1, 0xe8, - 0x00, 0xd6, 0x26, 0x27, 0xb9, 0x3a, 0x5b, 0x37, 0x38, 0x5d, 0xdd, 0xce, 0x4f, 0xf8, 0xed, 0xe9, - 0x02, 0x7e, 0x01, 0x2b, 0x81, 0x70, 0x90, 0xef, 0xd4, 0xc2, 0x6d, 0xa2, 0x09, 0x34, 0x48, 0xfa, - 0x63, 0x08, 0x94, 0xd5, 0xe9, 0x3e, 0x4f, 0x9f, 0xa1, 0xcf, 0x83, 0x18, 0x1e, 0x06, 0x0d, 0xbf, - 0x0d, 0xb9, 0xce, 0xd0, 0xb6, 0xdc, 0xed, 0x62, 0x95, 0x77, 0x59, 0x86, 0xdd, 0x6a, 0x59, 0xd7, - 0xee, 0x1e, 0xb9, 0x5f, 0x79, 0xdd, 0x55, 0x81, 0x4d, 0x86, 0x9c, 0xa4, 0x7b, 0x32, 0x24, 0x36, - 0x76, 0xd9, 0xfc, 0x32, 0xdc, 0x70, 0x41, 0xfe, 0x9b, 0x97, 0x3f, 0x0d, 0x1e, 0x02, 0x5d, 0x81, - 0x6c, 0xb0, 0x98, 0xdb, 0x56, 0xe2, 0x32, 0xe3, 0xa4, 0xfd, 0xa5, 0xdc, 0xeb, 0xe6, 0xda, 0x77, - 0x02, 0xc0, 0xd4, 0x2b, 0xf3, 0x45, 0x58, 0x6b, 0xd7, 0x5b, 0x92, 0x5a, 0x6f, 0xb4, 0xe4, 0xfa, - 0xbe, 0xfa, 0x68, 0xbf, 0xd9, 0x90, 0x76, 0xe5, 0x7b, 0xb2, 0x54, 0xcb, 0x2d, 0xa1, 0x15, 0x58, - 0x9e, 0x76, 0x3e, 0x91, 0x9a, 0x39, 0x01, 0xad, 0xc1, 0xca, 0xb4, 0xb1, 0x52, 0x6d, 0xb6, 0x2a, - 0xf2, 0x7e, 0x2e, 0x84, 0x10, 0x64, 0xa7, 0x1d, 0xfb, 0xf5, 0x5c, 0x18, 0x5d, 0x02, 0x71, 0xd6, - 0xa6, 0x1e, 0xc8, 0xad, 0xfb, 0x6a, 0x5b, 0x6a, 0xd5, 0x73, 0x91, 0x6b, 0xbf, 0x0a, 0x90, 0x9d, - 0x7d, 0x8d, 0x44, 0x05, 0xb8, 0xd8, 0x50, 0xea, 0x8d, 0x7a, 0xb3, 0xf2, 0x40, 0x6d, 0xb6, 0x2a, - 0xad, 0x47, 0xcd, 0xb9, 0x98, 0x8a, 0x90, 0x9f, 0x07, 0xd4, 0xa4, 0x46, 0xbd, 0x29, 0xb7, 0xd4, - 0x86, 0xa4, 0xc8, 0xf5, 0x5a, 0x4e, 0x40, 0x97, 0x61, 0x73, 0x1e, 0xd3, 0xae, 0xb7, 0xe4, 0xfd, - 0x2f, 0x7d, 0x48, 0x08, 0x6d, 0xc0, 0x85, 0x79, 0x48, 0xa3, 0xd2, 0x6c, 0x4a, 0x35, 0x2f, 0xe8, - 0x79, 0x9f, 0x22, 0xed, 0x49, 0xbb, 0x2d, 0xa9, 0x96, 0x8b, 0x2c, 0x62, 0xde, 0xab, 0xc8, 0x0f, - 0xa4, 0x5a, 0x2e, 0x5a, 0x95, 0x5e, 0xbe, 0xcb, 0x0b, 0xaf, 0xde, 0xe5, 0x85, 0xbf, 0xde, 0xe5, - 0x85, 0xe7, 0xef, 0xf3, 0x4b, 0xaf, 0xde, 0xe7, 0x97, 0xfe, 0x78, 0x9f, 0x5f, 0xfa, 0xfa, 0x7a, - 0xcf, 0xa0, 0x87, 0xc3, 0x4e, 0xa9, 0x4b, 0x4c, 0xfe, 0x71, 0xc3, 0xff, 0xdd, 0x74, 0xf4, 0x6f, - 0xca, 0x47, 0xec, 0x83, 0x8d, 0x8e, 0x07, 0xd8, 0x71, 0xbf, 0xc6, 0x62, 0x6c, 0x02, 0x6e, 0xff, - 0x13, 0x00, 0x00, 0xff, 0xff, 0xba, 0xe0, 0x97, 0xe3, 0xce, 0x0d, 0x00, 0x00, + // 1432 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x4b, 0x6f, 0xdb, 0xc6, + 0x16, 0x36, 0x25, 0x59, 0x96, 0x8f, 0x1e, 0x56, 0xc6, 0x4e, 0x4c, 0x3b, 0xb1, 0xec, 0xe8, 0x06, + 0x81, 0x6f, 0x1e, 0xd2, 0x75, 0x72, 0x73, 0x17, 0xc9, 0x05, 0x0a, 0xd9, 0x62, 0x1a, 0x1a, 0x89, + 0xa5, 0x52, 0x8a, 0x9d, 0x74, 0x43, 0xd0, 0xe6, 0x44, 0x1e, 0x54, 0xe4, 0xa8, 0x9c, 0x91, 0x63, + 0xed, 0xbb, 0xe9, 0xaa, 0x59, 0x76, 0x55, 0x74, 0xd9, 0x65, 0x17, 0x41, 0x7f, 0x43, 0x56, 0x45, + 0x90, 0x4d, 0xbb, 0x69, 0x5a, 0x24, 0x8b, 0x02, 0xf9, 0x15, 0x05, 0x87, 0x43, 0x91, 0x96, 0xd5, + 0xda, 0xce, 0xc6, 0x16, 0xcf, 0xf9, 0xbe, 0x6f, 0xce, 0x9c, 0xc7, 0x0c, 0x09, 0xf3, 0x7b, 0x94, + 0x39, 0x94, 0x55, 0x3b, 0xf4, 0xa0, 0x7a, 0xb0, 0xe6, 0xff, 0xab, 0xf4, 0x3c, 0xca, 0x29, 0xca, + 0x07, 0x8e, 0x8a, 0x6f, 0x39, 0x58, 0x5b, 0x2c, 0x49, 0xdc, 0xae, 0xc5, 0x70, 0xf5, 0x60, 0x6d, + 0x17, 0x73, 0x6b, 0xad, 0xba, 0x47, 0x89, 0x1b, 0xc0, 0x17, 0xe7, 0x3a, 0xb4, 0x43, 0xc5, 0xcf, + 0xaa, 0xff, 0x4b, 0x5a, 0x97, 0x3b, 0x94, 0x76, 0xba, 0xb8, 0x2a, 0x9e, 0x76, 0xfb, 0xcf, 0xaa, + 0x9c, 0x38, 0x98, 0x71, 0xcb, 0xe9, 0x49, 0xc0, 0xc2, 0x28, 0xc0, 0x72, 0x07, 0xd2, 0x55, 0x1a, + 0x75, 0xd9, 0x7d, 0xcf, 0xe2, 0x84, 0x86, 0x2b, 0x2e, 0x04, 0x11, 0x99, 0xc1, 0xa2, 0x32, 0xda, + 0xc0, 0x75, 0xce, 0x72, 0x88, 0x4b, 0xab, 0xe2, 0x6f, 0x60, 0x2a, 0x53, 0x40, 0x3b, 0x98, 0x74, + 0xf6, 0x39, 0xb6, 0xb7, 0x29, 0xc7, 0x8d, 0x9e, 0xaf, 0x84, 0xd6, 0x20, 0x4d, 0xc5, 0x2f, 0x55, + 0x59, 0x51, 0x56, 0x0b, 0xb7, 0x16, 0x2a, 0x47, 0x76, 0x5d, 0x89, 0xa0, 0x86, 0x04, 0xa2, 0xab, + 0x90, 0x7e, 0x2e, 0x84, 0xd4, 0xc4, 0x8a, 0xb2, 0x3a, 0xbd, 0x5e, 0x78, 0xf3, 0xf2, 0x26, 0x48, + 0x56, 0x1d, 0xef, 0x19, 0xd2, 0x5b, 0xfe, 0x5e, 0x81, 0xa9, 0x3a, 0xee, 0x51, 0x46, 0x38, 0x5a, + 0x86, 0x6c, 0xcf, 0xa3, 0x3d, 0xca, 0xac, 0xae, 0x49, 0x6c, 0xb1, 0x56, 0xca, 0x80, 0xd0, 0xa4, + 0xdb, 0xe8, 0x7f, 0x30, 0x6d, 0x07, 0x58, 0xea, 0x49, 0x5d, 0xf5, 0xcd, 0xcb, 0x9b, 0x73, 0x52, + 0xb7, 0x66, 0xdb, 0x1e, 0x66, 0xac, 0xc5, 0x3d, 0xe2, 0x76, 0x8c, 0x08, 0x8a, 0xfe, 0x0f, 0x69, + 0xcb, 0xa1, 0x7d, 0x97, 0xab, 0xc9, 0x95, 0xe4, 0x6a, 0x36, 0x8a, 0xdf, 0x2f, 0x53, 0x45, 0x96, + 0xa9, 0xb2, 0x41, 0x89, 0xbb, 0x3e, 0xfd, 0xea, 0xed, 0xf2, 0xc4, 0x0f, 0x7f, 0xfe, 0x78, 0x4d, + 0x31, 0x24, 0xa7, 0xfc, 0x55, 0x1a, 0x32, 0x4d, 0x19, 0x04, 0x2a, 0x40, 0x62, 0x18, 0x5a, 0x82, + 0xd8, 0xe8, 0x3f, 0x90, 0x71, 0x30, 0x63, 0x56, 0x07, 0x33, 0x35, 0x21, 0xc4, 0xe7, 0x2a, 0x41, + 0x45, 0x2a, 0x61, 0x45, 0x2a, 0x35, 0x77, 0x60, 0x0c, 0x51, 0xe8, 0x0e, 0xa4, 0x19, 0xb7, 0x78, + 0x9f, 0xa9, 0x49, 0x91, 0xcc, 0xa5, 0x91, 0x64, 0x86, 0x4b, 0xb5, 0x04, 0xc8, 0x90, 0x60, 0xf4, + 0x00, 0xd0, 0x33, 0xe2, 0x5a, 0x5d, 0x93, 0x5b, 0xdd, 0xee, 0xc0, 0xf4, 0x30, 0xeb, 0x77, 0xb9, + 0x9a, 0x5a, 0x51, 0x56, 0xb3, 0xb7, 0x16, 0x47, 0x24, 0xda, 0x3e, 0xc4, 0x10, 0x08, 0xa3, 0x28, + 0x58, 0x31, 0x0b, 0xaa, 0x41, 0x96, 0xf5, 0x77, 0x1d, 0xc2, 0x4d, 0xbf, 0xcd, 0xd4, 0x49, 0x29, + 0x31, 0x1a, 0x75, 0x3b, 0xec, 0xc1, 0xf5, 0xd4, 0x8b, 0xdf, 0x97, 0x15, 0x03, 0x02, 0x92, 0x6f, + 0x46, 0x9b, 0x50, 0x94, 0xd9, 0x35, 0xb1, 0x6b, 0x07, 0x3a, 0xe9, 0x53, 0xea, 0x14, 0x24, 0x53, + 0x73, 0x6d, 0xa1, 0xa5, 0x43, 0x9e, 0x53, 0x6e, 0x75, 0x4d, 0x69, 0x57, 0xa7, 0xce, 0x50, 0xa3, + 0x9c, 0xa0, 0x86, 0x0d, 0xf4, 0x10, 0xce, 0x1d, 0x50, 0x4e, 0xdc, 0x8e, 0xc9, 0xb8, 0xe5, 0xc9, + 0xfd, 0x65, 0x4e, 0x19, 0xd7, 0x4c, 0x40, 0x6d, 0xf9, 0x4c, 0x11, 0xd8, 0x03, 0x90, 0xa6, 0x68, + 0x8f, 0xd3, 0xa7, 0xd4, 0xca, 0x07, 0xc4, 0x70, 0x8b, 0x8b, 0x7e, 0x93, 0x70, 0xcb, 0xb6, 0xb8, + 0xa5, 0x82, 0xdf, 0xb6, 0xc6, 0xf0, 0x19, 0xcd, 0xc1, 0x24, 0x27, 0xbc, 0x8b, 0xd5, 0xac, 0x70, + 0x04, 0x0f, 0x48, 0x85, 0x29, 0xd6, 0x77, 0x1c, 0xcb, 0x1b, 0xa8, 0x39, 0x61, 0x0f, 0x1f, 0xd1, + 0x7f, 0x21, 0x13, 0x4c, 0x04, 0xf6, 0xd4, 0xfc, 0x09, 0x23, 0x30, 0x44, 0xa2, 0x4b, 0x30, 0x8d, + 0x0f, 0x7b, 0xd8, 0x26, 0x1c, 0xdb, 0x6a, 0x61, 0x45, 0x59, 0xcd, 0x18, 0x91, 0x01, 0xfd, 0x0b, + 0xf2, 0xcf, 0x2c, 0xd2, 0xc5, 0xb6, 0xe9, 0x61, 0x8b, 0x51, 0x57, 0x9d, 0x11, 0x6b, 0xe6, 0x02, + 0xa3, 0x21, 0x6c, 0xe5, 0x5f, 0x14, 0xc8, 0xc6, 0xdb, 0xe8, 0x3a, 0x4c, 0x0f, 0x30, 0x33, 0xf7, + 0xc4, 0x5c, 0x29, 0xc7, 0x86, 0x5c, 0x77, 0xb9, 0x91, 0x19, 0x60, 0xb6, 0xe1, 0xfb, 0xd1, 0x6d, + 0xc8, 0x5b, 0xbb, 0x8c, 0x5b, 0xc4, 0x95, 0x84, 0xc4, 0x58, 0x42, 0x4e, 0x82, 0x02, 0xd2, 0xbf, + 0x21, 0xe3, 0x52, 0x89, 0x4f, 0x8e, 0xc5, 0x4f, 0xb9, 0x34, 0x80, 0xde, 0x03, 0xe4, 0x52, 0xf3, + 0x39, 0xe1, 0xfb, 0xe6, 0x01, 0xe6, 0x21, 0x29, 0x35, 0x96, 0x34, 0xe3, 0xd2, 0x1d, 0xc2, 0xf7, + 0xb7, 0x31, 0x0f, 0xc8, 0xe5, 0x9f, 0x14, 0x48, 0xf9, 0x47, 0xd8, 0xc9, 0x07, 0x50, 0x05, 0x26, + 0x0f, 0x28, 0xc7, 0x27, 0x1f, 0x3e, 0x01, 0x0c, 0xdd, 0x83, 0xa9, 0xe0, 0x3c, 0x64, 0x6a, 0x4a, + 0x74, 0xf5, 0xe5, 0x91, 0x49, 0x3d, 0x7e, 0xd8, 0x1a, 0x21, 0xe3, 0x48, 0xd7, 0x4c, 0x1e, 0xed, + 0x9a, 0xcd, 0x54, 0x26, 0x59, 0x4c, 0x95, 0x7f, 0x53, 0x20, 0x2f, 0x7b, 0xbf, 0x69, 0x79, 0x96, + 0xc3, 0xd0, 0x53, 0xc8, 0x3a, 0xc4, 0x1d, 0x8e, 0x92, 0x72, 0xd2, 0x28, 0x2d, 0xf9, 0xa3, 0xf4, + 0xe1, 0xed, 0xf2, 0xf9, 0x18, 0xeb, 0x06, 0x75, 0x08, 0xc7, 0x4e, 0x8f, 0x0f, 0x0c, 0x70, 0x88, + 0x1b, 0x0e, 0x97, 0x03, 0xc8, 0xb1, 0x0e, 0x43, 0x90, 0xd9, 0xc3, 0x1e, 0xa1, 0xb6, 0x48, 0x84, + 0xbf, 0xc2, 0xe8, 0x44, 0xd4, 0xe5, 0x2d, 0xb4, 0x7e, 0xe5, 0xc3, 0xdb, 0xe5, 0x4b, 0xc7, 0x89, + 0xd1, 0x22, 0xdf, 0xfa, 0x03, 0x53, 0x74, 0xac, 0xc3, 0x70, 0x27, 0xc2, 0x7f, 0x37, 0xa1, 0x2a, + 0xe5, 0x27, 0x90, 0xdb, 0x16, 0x83, 0x24, 0x77, 0x57, 0x07, 0x39, 0x58, 0xe1, 0xea, 0xca, 0x49, + 0xab, 0xa7, 0x84, 0x7a, 0x2e, 0x60, 0xc5, 0x94, 0xbf, 0x0b, 0x9b, 0x59, 0x2a, 0x5f, 0x85, 0xf4, + 0x97, 0x7d, 0xea, 0xf5, 0x9d, 0x31, 0x9d, 0x2c, 0xae, 0xab, 0xc0, 0x8b, 0x6e, 0xc0, 0x34, 0xdf, + 0xf7, 0x30, 0xdb, 0xa7, 0x5d, 0xfb, 0x6f, 0x6e, 0xb6, 0x08, 0x80, 0xee, 0x40, 0x41, 0x74, 0x63, + 0x44, 0x49, 0x8e, 0xa5, 0xe4, 0x7d, 0x54, 0x3b, 0x04, 0x89, 0x00, 0xbf, 0xc9, 0x40, 0x5a, 0xc6, + 0xa6, 0x9d, 0xb1, 0xa6, 0xb1, 0xe3, 0x31, 0x5e, 0xbf, 0x47, 0x1f, 0x57, 0xbf, 0xd4, 0xf8, 0xfa, + 0x1c, 0xaf, 0x45, 0xf2, 0x23, 0x6a, 0x11, 0xcb, 0x7b, 0xea, 0xf4, 0x79, 0x9f, 0x3c, 0x7b, 0xde, + 0xd3, 0xa7, 0xc8, 0x3b, 0xd2, 0x61, 0xc1, 0x4f, 0x34, 0x71, 0x09, 0x27, 0xd1, 0x7d, 0x64, 0x8a, + 0xf0, 0xd5, 0xa9, 0xb1, 0x0a, 0x17, 0x1c, 0xe2, 0xea, 0x01, 0x5e, 0xa6, 0xc7, 0xf0, 0xd1, 0x68, + 0x1d, 0xce, 0x0f, 0x4f, 0x92, 0x3d, 0xcb, 0xdd, 0xc3, 0x5d, 0x29, 0x93, 0x19, 0x2b, 0x33, 0x1b, + 0x82, 0x37, 0x04, 0x36, 0xd0, 0xd8, 0x84, 0xb9, 0x51, 0x0d, 0x1b, 0x33, 0x2e, 0x2e, 0xa1, 0x7f, + 0x3a, 0x7b, 0xd0, 0x51, 0xb1, 0x3a, 0x66, 0x1c, 0xed, 0xc0, 0xfc, 0xf0, 0xb8, 0x37, 0x8f, 0xd6, + 0x0d, 0x4e, 0x57, 0xb7, 0xf3, 0x43, 0xfe, 0x76, 0xbc, 0x80, 0x9f, 0xc0, 0x6c, 0x24, 0x1c, 0xe5, + 0x3b, 0x3b, 0x76, 0x9b, 0x68, 0x08, 0x8d, 0x92, 0xfe, 0x04, 0x22, 0x65, 0x33, 0xde, 0xe7, 0xb9, + 0x33, 0xf4, 0x79, 0x14, 0xc3, 0xa3, 0xa8, 0xe1, 0x57, 0xa1, 0xb8, 0xdb, 0xf7, 0x5c, 0x7f, 0xbb, + 0xd8, 0x94, 0x5d, 0x96, 0x17, 0x57, 0x5f, 0xc1, 0xb7, 0xfb, 0x47, 0xee, 0x67, 0x41, 0x77, 0xd5, + 0x60, 0x49, 0x20, 0x87, 0xe9, 0x1e, 0x0e, 0x89, 0x87, 0x7d, 0xb6, 0xbc, 0x31, 0x17, 0x7d, 0x50, + 0xf8, 0x7a, 0x16, 0x4e, 0x43, 0x80, 0x40, 0x57, 0xa0, 0x10, 0x2d, 0xe6, 0xb7, 0x95, 0xb8, 0x43, + 0x33, 0x46, 0x2e, 0x5c, 0xca, 0xbf, 0x6e, 0xd0, 0x5d, 0x38, 0x17, 0xdb, 0xa2, 0x6c, 0x89, 0xe2, + 0xd8, 0x5c, 0xcd, 0x44, 0xa3, 0x2b, 0xda, 0xe1, 0xda, 0xd7, 0x0a, 0x40, 0xec, 0x9d, 0xfc, 0x22, + 0xcc, 0x6f, 0x37, 0xda, 0x9a, 0xd9, 0x68, 0xb6, 0xf5, 0xc6, 0x96, 0xf9, 0x78, 0xab, 0xd5, 0xd4, + 0x36, 0xf4, 0xfb, 0xba, 0x56, 0x2f, 0x4e, 0xa0, 0x59, 0x98, 0x89, 0x3b, 0x9f, 0x6a, 0xad, 0xa2, + 0x82, 0xe6, 0x61, 0x36, 0x6e, 0xac, 0xad, 0xb7, 0xda, 0x35, 0x7d, 0xab, 0x98, 0x40, 0x08, 0x0a, + 0x71, 0xc7, 0x56, 0xa3, 0x98, 0x44, 0x97, 0x40, 0x3d, 0x6a, 0x33, 0x77, 0xf4, 0xf6, 0x03, 0x73, + 0x5b, 0x6b, 0x37, 0x8a, 0xa9, 0x6b, 0x3f, 0x2b, 0x50, 0x38, 0xfa, 0x9e, 0x8a, 0x96, 0xe1, 0x62, + 0xd3, 0x68, 0x34, 0x1b, 0xad, 0xda, 0x43, 0xb3, 0xd5, 0xae, 0xb5, 0x1f, 0xb7, 0x46, 0x62, 0x2a, + 0x43, 0x69, 0x14, 0x50, 0xd7, 0x9a, 0x8d, 0x96, 0xde, 0x36, 0x9b, 0x9a, 0xa1, 0x37, 0xea, 0x45, + 0x05, 0x5d, 0x86, 0xa5, 0x51, 0xcc, 0x76, 0xa3, 0xad, 0x6f, 0x7d, 0x1a, 0x42, 0x12, 0x68, 0x11, + 0x2e, 0x8c, 0x42, 0x9a, 0xb5, 0x56, 0x4b, 0xab, 0x07, 0x41, 0x8f, 0xfa, 0x0c, 0x6d, 0x53, 0xdb, + 0x68, 0x6b, 0xf5, 0x62, 0x6a, 0x1c, 0xf3, 0x7e, 0x4d, 0x7f, 0xa8, 0xd5, 0x8b, 0x93, 0xeb, 0xda, + 0xab, 0x77, 0x25, 0xe5, 0xf5, 0xbb, 0x92, 0xf2, 0xc7, 0xbb, 0x92, 0xf2, 0xe2, 0x7d, 0x69, 0xe2, + 0xf5, 0xfb, 0xd2, 0xc4, 0xaf, 0xef, 0x4b, 0x13, 0x9f, 0x5f, 0xef, 0x10, 0xbe, 0xdf, 0xdf, 0xad, + 0xec, 0x51, 0x47, 0x7e, 0x3d, 0xc9, 0x7f, 0x37, 0x99, 0xfd, 0x45, 0xf5, 0x50, 0x7c, 0x11, 0xf2, + 0x41, 0x0f, 0x33, 0xff, 0x73, 0x2f, 0x2d, 0xa6, 0xe7, 0xf6, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x08, 0xe1, 0xbb, 0x1f, 0x2f, 0x0e, 0x00, 0x00, } func (m *WeightedVoteOption) Marshal() (dAtA []byte, err error) { @@ -1134,6 +1162,13 @@ func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.FailedReason) > 0 { + i -= len(m.FailedReason) + copy(dAtA[i:], m.FailedReason) + i = encodeVarintGov(dAtA, i, uint64(len(m.FailedReason))) + i-- + dAtA[i] = 0x7a + } if m.Expedited { i-- if m.Expedited { @@ -1516,6 +1551,15 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.MinDepositRatio) > 0 { + i -= len(m.MinDepositRatio) + copy(dAtA[i:], m.MinDepositRatio) + i = encodeVarintGov(dAtA, i, uint64(len(m.MinDepositRatio))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } if m.BurnVoteVeto { i-- if m.BurnVoteVeto { @@ -1768,6 +1812,10 @@ func (m *Proposal) Size() (n int) { if m.Expedited { n += 2 } + l = len(m.FailedReason) + if l > 0 { + n += 1 + l + sovGov(uint64(l)) + } return n } @@ -1942,6 +1990,10 @@ func (m *Params) Size() (n int) { if m.BurnVoteVeto { n += 2 } + l = len(m.MinDepositRatio) + if l > 0 { + n += 2 + l + sovGov(uint64(l)) + } return n } @@ -2650,6 +2702,38 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { } } m.Expedited = bool(v != 0) + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FailedReason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGov + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGov + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FailedReason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGov(dAtA[iNdEx:]) @@ -3857,6 +3941,38 @@ func (m *Params) Unmarshal(dAtA []byte) error { } } m.BurnVoteVeto = bool(v != 0) + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinDepositRatio", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGov + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGov + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MinDepositRatio = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGov(dAtA[iNdEx:]) diff --git a/x/gov/types/v1/msgs.go b/x/gov/types/v1/msgs.go index 552fe559f560..facfbfa9c2a2 100644 --- a/x/gov/types/v1/msgs.go +++ b/x/gov/types/v1/msgs.go @@ -55,12 +55,6 @@ func (m *MsgSubmitProposal) SetMsgs(msgs []sdk.Msg) error { return nil } -// GetSigners returns the expected signers for a MsgSubmitProposal. -func (m MsgSubmitProposal) GetSigners() []sdk.AccAddress { - proposer, _ := sdk.AccAddressFromBech32(m.Proposer) - return []sdk.AccAddress{proposer} -} - // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (m MsgSubmitProposal) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { return sdktx.UnpackInterfaces(unpacker, m.Messages) @@ -71,34 +65,16 @@ func NewMsgDeposit(depositor sdk.AccAddress, proposalID uint64, amount sdk.Coins return &MsgDeposit{proposalID, depositor.String(), amount} } -// GetSigners returns the expected signers for a MsgDeposit. -func (msg MsgDeposit) GetSigners() []sdk.AccAddress { - depositor, _ := sdk.AccAddressFromBech32(msg.Depositor) - return []sdk.AccAddress{depositor} -} - // NewMsgVote creates a message to cast a vote on an active proposal func NewMsgVote(voter sdk.AccAddress, proposalID uint64, option VoteOption, metadata string) *MsgVote { return &MsgVote{proposalID, voter.String(), option, metadata} } -// GetSigners returns the expected signers for a MsgVote. -func (msg MsgVote) GetSigners() []sdk.AccAddress { - voter, _ := sdk.AccAddressFromBech32(msg.Voter) - return []sdk.AccAddress{voter} -} - // NewMsgVoteWeighted creates a message to cast a vote on an active proposal func NewMsgVoteWeighted(voter sdk.AccAddress, proposalID uint64, options WeightedVoteOptions, metadata string) *MsgVoteWeighted { return &MsgVoteWeighted{proposalID, voter.String(), options, metadata} } -// GetSigners returns the expected signers for a MsgVoteWeighted. -func (msg MsgVoteWeighted) GetSigners() []sdk.AccAddress { - voter, _ := sdk.AccAddressFromBech32(msg.Voter) - return []sdk.AccAddress{voter} -} - // NewMsgExecLegacyContent creates a new MsgExecLegacyContent instance. func NewMsgExecLegacyContent(content *codectypes.Any, authority string) *MsgExecLegacyContent { return &MsgExecLegacyContent{ @@ -107,12 +83,6 @@ func NewMsgExecLegacyContent(content *codectypes.Any, authority string) *MsgExec } } -// GetSigners returns the expected signers for a MsgExecLegacyContent. -func (c MsgExecLegacyContent) GetSigners() []sdk.AccAddress { - authority, _ := sdk.AccAddressFromBech32(c.Authority) - return []sdk.AccAddress{authority} -} - // ValidateBasic implements the sdk.Msg interface. func (c MsgExecLegacyContent) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(c.Authority) @@ -129,12 +99,6 @@ func (c MsgExecLegacyContent) UnpackInterfaces(unpacker codectypes.AnyUnpacker) return unpacker.UnpackAny(c.Content, &content) } -// GetSigners returns the expected signers for a MsgUpdateParams. -func (msg MsgUpdateParams) GetSigners() []sdk.AccAddress { - authority, _ := sdk.AccAddressFromBech32(msg.Authority) - return []sdk.AccAddress{authority} -} - // NewMsgCancelProposal creates a new MsgCancelProposal instance. func NewMsgCancelProposal(proposalID uint64, proposer string) *MsgCancelProposal { return &MsgCancelProposal{ @@ -142,9 +106,3 @@ func NewMsgCancelProposal(proposalID uint64, proposer string) *MsgCancelProposal Proposer: proposer, } } - -// GetSigners implements Msg -func (msg MsgCancelProposal) GetSigners() []sdk.AccAddress { - proposer, _ := sdk.AccAddressFromBech32(msg.Proposer) - return []sdk.AccAddress{proposer} -} diff --git a/x/gov/types/v1/params.go b/x/gov/types/v1/params.go index 5633ebb4c59c..cf31daccef6a 100644 --- a/x/gov/types/v1/params.go +++ b/x/gov/types/v1/params.go @@ -30,6 +30,7 @@ var ( DefaultBurnProposalPrevote = false // set to false to replicate behavior of when this change was made (0.47) DefaultBurnVoteQuorom = false // set to false to replicate behavior of when this change was made (0.47) DefaultBurnVoteVeto = true // set to true to replicate behavior of when this change was made (0.47) + DefaultMinDepositRatio = sdkmath.LegacyMustNewDecFromStr("0.01") ) // Deprecated: NewDepositParams creates a new DepositParams object @@ -59,7 +60,8 @@ func NewVotingParams(votingPeriod *time.Duration) VotingParams { // NewParams creates a new Params instance with given values. func NewParams( minDeposit, expeditedminDeposit sdk.Coins, maxDepositPeriod, votingPeriod, expeditedVotingPeriod time.Duration, - quorum, threshold, expeditedThreshold, vetoThreshold, minInitialDepositRatio, proposalCancelRatio, proposalCancelDest string, burnProposalDeposit, burnVoteQuorum, burnVoteVeto bool, + quorum, threshold, expeditedThreshold, vetoThreshold, minInitialDepositRatio, proposalCancelRatio, proposalCancelDest string, + burnProposalDeposit, burnVoteQuorum, burnVoteVeto bool, minDepositRatio string, ) Params { return Params{ MinDeposit: minDeposit, @@ -77,6 +79,7 @@ func NewParams( BurnProposalDepositPrevote: burnProposalDeposit, BurnVoteQuorum: burnVoteQuorum, BurnVoteVeto: burnVoteVeto, + MinDepositRatio: minDepositRatio, } } @@ -98,6 +101,7 @@ func DefaultParams() Params { DefaultBurnProposalPrevote, DefaultBurnVoteQuorom, DefaultBurnVoteVeto, + DefaultMinDepositRatio.String(), ) } @@ -148,11 +152,11 @@ func (p Params) ValidateBasic() error { if err != nil { return fmt.Errorf("invalid expedited threshold string: %w", err) } - if !threshold.IsPositive() { - return fmt.Errorf("expedited vote threshold must be positive: %s", threshold) + if !expeditedThreshold.IsPositive() { + return fmt.Errorf("expedited vote threshold must be positive: %s", expeditedThreshold) } - if threshold.GT(sdkmath.LegacyOneDec()) { - return fmt.Errorf("expedited vote threshold too large: %s", threshold) + if expeditedThreshold.GT(sdkmath.LegacyOneDec()) { + return fmt.Errorf("expedited vote threshold too large: %s", expeditedThreshold) } if expeditedThreshold.LTE(threshold) { return fmt.Errorf("expedited vote threshold %s, must be greater than the regular threshold %s", expeditedThreshold, threshold) diff --git a/x/gov/types/v1/params_legacy.go b/x/gov/types/v1/params_legacy.go index 7fbea6917a1e..ceee66b23529 100644 --- a/x/gov/types/v1/params_legacy.go +++ b/x/gov/types/v1/params_legacy.go @@ -5,6 +5,7 @@ import ( "fmt" "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) diff --git a/x/gov/types/v1/proposals_test.go b/x/gov/types/v1/proposals_test.go index 3336415d7403..87545e1d0461 100644 --- a/x/gov/types/v1/proposals_test.go +++ b/x/gov/types/v1/proposals_test.go @@ -5,9 +5,10 @@ import ( "testing" "time" - "cosmossdk.io/math" "github.com/stretchr/testify/require" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" diff --git a/x/gov/types/v1/query.pb.go b/x/gov/types/v1/query.pb.go index 099611e21d89..7233129c6a83 100644 --- a/x/gov/types/v1/query.pb.go +++ b/x/gov/types/v1/query.pb.go @@ -1090,7 +1090,7 @@ type QueryClient interface { Votes(ctx context.Context, in *QueryVotesRequest, opts ...grpc.CallOption) (*QueryVotesResponse, error) // Params queries all parameters of the gov module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // Deposit queries single deposit information based proposalID, depositAddr. + // Deposit queries single deposit information based on proposalID, depositAddr. Deposit(ctx context.Context, in *QueryDepositRequest, opts ...grpc.CallOption) (*QueryDepositResponse, error) // Deposits queries all deposits of a single proposal. Deposits(ctx context.Context, in *QueryDepositsRequest, opts ...grpc.CallOption) (*QueryDepositsResponse, error) @@ -1201,7 +1201,7 @@ type QueryServer interface { Votes(context.Context, *QueryVotesRequest) (*QueryVotesResponse, error) // Params queries all parameters of the gov module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // Deposit queries single deposit information based proposalID, depositAddr. + // Deposit queries single deposit information based on proposalID, depositAddr. Deposit(context.Context, *QueryDepositRequest) (*QueryDepositResponse, error) // Deposits queries all deposits of a single proposal. Deposits(context.Context, *QueryDepositsRequest) (*QueryDepositsResponse, error) diff --git a/x/gov/types/v1/tally.go b/x/gov/types/v1/tally.go index e82000cf51a4..08c1fa283f3e 100644 --- a/x/gov/types/v1/tally.go +++ b/x/gov/types/v1/tally.go @@ -2,6 +2,7 @@ package v1 import ( "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -16,7 +17,7 @@ type ValidatorGovInfo struct { // NewValidatorGovInfo creates a ValidatorGovInfo instance func NewValidatorGovInfo(address sdk.ValAddress, bondedTokens math.Int, delegatorShares, - delegatorDeductions sdk.Dec, options WeightedVoteOptions, + delegatorDeductions math.LegacyDec, options WeightedVoteOptions, ) ValidatorGovInfo { return ValidatorGovInfo{ Address: address, @@ -38,7 +39,7 @@ func NewTallyResult(yes, abstain, no, noWithVeto math.Int) TallyResult { } // NewTallyResultFromMap creates a new TallyResult instance from a Option -> Dec map -func NewTallyResultFromMap(results map[VoteOption]sdk.Dec) TallyResult { +func NewTallyResultFromMap(results map[VoteOption]math.LegacyDec) TallyResult { return NewTallyResult( results[OptionYes].TruncateInt(), results[OptionAbstain].TruncateInt(), diff --git a/x/gov/types/v1/tx.pb.go b/x/gov/types/v1/tx.pb.go index 5a57a0f2af4a..6a37c7c0316e 100644 --- a/x/gov/types/v1/tx.pb.go +++ b/x/gov/types/v1/tx.pb.go @@ -57,7 +57,7 @@ type MsgSubmitProposal struct { // // Since: cosmos-sdk 0.47 Summary string `protobuf:"bytes,6,opt,name=summary,proto3" json:"summary,omitempty"` - // expedided defines if the proposal is expedited or not + // expedited defines if the proposal is expedited or not // // Since: cosmos-sdk 0.50 Expedited bool `protobuf:"varint,7,opt,name=expedited,proto3" json:"expedited,omitempty"` @@ -708,8 +708,10 @@ var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo // // Since: cosmos-sdk 0.50 type MsgCancelProposal struct { + // proposal_id defines the unique id of the proposal. ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id"` - Proposer string `protobuf:"bytes,2,opt,name=proposer,proto3" json:"proposer,omitempty"` + // proposer is the account address of the proposer. + Proposer string `protobuf:"bytes,2,opt,name=proposer,proto3" json:"proposer,omitempty"` } func (m *MsgCancelProposal) Reset() { *m = MsgCancelProposal{} } @@ -764,6 +766,7 @@ func (m *MsgCancelProposal) GetProposer() string { // // Since: cosmos-sdk 0.50 type MsgCancelProposalResponse struct { + // proposal_id defines the unique id of the proposal. ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id"` // canceled_time is the time when proposal is canceled. CanceledTime time.Time `protobuf:"bytes,2,opt,name=canceled_time,json=canceledTime,proto3,stdtime" json:"canceled_time"` diff --git a/x/gov/types/v1/vote.go b/x/gov/types/v1/vote.go index 60a6b2756cc9..edadc770756b 100644 --- a/x/gov/types/v1/vote.go +++ b/x/gov/types/v1/vote.go @@ -58,7 +58,7 @@ func (v Votes) String() string { return out } -func NewWeightedVoteOption(option VoteOption, weight sdk.Dec) *WeightedVoteOption { +func NewWeightedVoteOption(option VoteOption, weight math.LegacyDec) *WeightedVoteOption { return &WeightedVoteOption{Option: option, Weight: weight.String()} } @@ -83,7 +83,7 @@ func NewNonSplitVoteOption(option VoteOption) WeightedVoteOptions { // ValidWeightedVoteOption returns true if the sub vote is valid and false otherwise. func ValidWeightedVoteOption(option WeightedVoteOption) bool { - weight, err := sdk.NewDecFromStr(option.Weight) + weight, err := math.LegacyNewDecFromStr(option.Weight) if err != nil || !weight.IsPositive() || weight.GT(math.LegacyNewDec(1)) { return false } diff --git a/x/gov/types/v1beta1/genesis.pb.go b/x/gov/types/v1beta1/genesis.pb.go index d40095e9828a..2e765d2fb3cf 100644 --- a/x/gov/types/v1beta1/genesis.pb.go +++ b/x/gov/types/v1beta1/genesis.pb.go @@ -34,11 +34,11 @@ type GenesisState struct { Votes Votes `protobuf:"bytes,3,rep,name=votes,proto3,castrepeated=Votes" json:"votes"` // proposals defines all the proposals present at genesis. Proposals Proposals `protobuf:"bytes,4,rep,name=proposals,proto3,castrepeated=Proposals" json:"proposals"` - // params defines all the parameters of related to deposit. + // deposit_params defines all the parameters related to deposit. DepositParams DepositParams `protobuf:"bytes,5,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params"` - // params defines all the parameters of related to voting. + // voting_params defines all the parameters related to voting. VotingParams VotingParams `protobuf:"bytes,6,opt,name=voting_params,json=votingParams,proto3" json:"voting_params"` - // params defines all the parameters of related to tally. + // tally_params defines all the parameters related to tally. TallyParams TallyParams `protobuf:"bytes,7,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params"` } diff --git a/x/gov/types/v1beta1/gov.pb.go b/x/gov/types/v1beta1/gov.pb.go index 1acd514b717a..53ac20a6c1f4 100644 --- a/x/gov/types/v1beta1/gov.pb.go +++ b/x/gov/types/v1beta1/gov.pb.go @@ -4,6 +4,7 @@ package v1beta1 import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" _ "github.com/cosmos/cosmos-proto" types1 "github.com/cosmos/cosmos-sdk/codec/types" @@ -129,7 +130,7 @@ type WeightedVoteOption struct { // option defines the valid vote options, it must not contain duplicate vote options. Option VoteOption `protobuf:"varint,1,opt,name=option,proto3,enum=cosmos.gov.v1beta1.VoteOption" json:"option,omitempty"` // weight is the vote weight associated with the vote option. - Weight github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=weight,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"weight"` + Weight cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=weight,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"weight"` } func (m *WeightedVoteOption) Reset() { *m = WeightedVoteOption{} } @@ -311,13 +312,13 @@ var xxx_messageInfo_Proposal proto.InternalMessageInfo // TallyResult defines a standard tally for a governance proposal. type TallyResult struct { // yes is the number of yes votes on a proposal. - Yes github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=yes,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"yes"` + Yes cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=yes,proto3,customtype=cosmossdk.io/math.Int" json:"yes"` // abstain is the number of abstain votes on a proposal. - Abstain github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=abstain,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"abstain"` + Abstain cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=abstain,proto3,customtype=cosmossdk.io/math.Int" json:"abstain"` // no is the number of no votes on a proposal. - No github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=no,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"no"` + No cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=no,proto3,customtype=cosmossdk.io/math.Int" json:"no"` // no_with_veto is the number of no with veto votes on a proposal. - NoWithVeto github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=no_with_veto,json=noWithVeto,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"no_with_veto"` + NoWithVeto cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=no_with_veto,json=noWithVeto,proto3,customtype=cosmossdk.io/math.Int" json:"no_with_veto"` } func (m *TallyResult) Reset() { *m = TallyResult{} } @@ -488,12 +489,12 @@ var xxx_messageInfo_VotingParams proto.InternalMessageInfo type TallyParams struct { // Minimum percentage of total stake needed to vote for a result to be // considered valid. - Quorum github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=quorum,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"quorum,omitempty"` + Quorum cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=quorum,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quorum,omitempty"` // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. - Threshold github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=threshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"threshold,omitempty"` + Threshold cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=threshold,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"threshold,omitempty"` // Minimum value of Veto votes to Total votes ratio for proposal to be // vetoed. Default value: 1/3. - VetoThreshold github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=veto_threshold,json=vetoThreshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"veto_threshold,omitempty"` + VetoThreshold cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=veto_threshold,json=vetoThreshold,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"veto_threshold,omitempty"` } func (m *TallyParams) Reset() { *m = TallyParams{} } @@ -546,95 +547,96 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1beta1/gov.proto", fileDescriptor_6e82113c1a9a4b7c) } var fileDescriptor_6e82113c1a9a4b7c = []byte{ - // 1396 bytes of a gzipped FileDescriptorProto + // 1413 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcf, 0x6f, 0x13, 0xc7, - 0x17, 0xf7, 0xda, 0xce, 0xaf, 0xb1, 0x13, 0x96, 0x21, 0x5f, 0xe2, 0xec, 0x97, 0x7a, 0x57, 0xae, - 0x84, 0xa2, 0x88, 0x38, 0x10, 0x54, 0xa4, 0xa6, 0x55, 0x25, 0x2f, 0x5e, 0x5a, 0x53, 0x64, 0xbb, - 0xeb, 0xc5, 0x14, 0x0e, 0x5d, 0xad, 0xbd, 0x83, 0xbd, 0xad, 0x77, 0xc7, 0x78, 0xc7, 0x21, 0xf9, - 0x03, 0x5a, 0x21, 0x9f, 0x38, 0xf6, 0x62, 0x09, 0xb5, 0x87, 0x56, 0x3d, 0x71, 0xe0, 0x1f, 0xe8, - 0x0d, 0x55, 0x3d, 0x20, 0x0e, 0x55, 0xdb, 0x43, 0x68, 0x41, 0x2a, 0x94, 0x3f, 0xa1, 0xa7, 0x6a, - 0x67, 0x66, 0xe3, 0x8d, 0x13, 0x11, 0x2c, 0xd4, 0x4b, 0xb2, 0x9e, 0xf7, 0x79, 0x9f, 0xcf, 0x7b, - 0xcf, 0xef, 0xbd, 0x1d, 0x83, 0x53, 0x4d, 0xec, 0xbb, 0xd8, 0x5f, 0x6f, 0xe1, 0xad, 0xf5, 0xad, - 0x73, 0x0d, 0x44, 0xac, 0x73, 0xc1, 0x73, 0xbe, 0xdb, 0xc3, 0x04, 0x43, 0xc8, 0xac, 0xf9, 0xe0, - 0x84, 0x5b, 0xa5, 0x2c, 0xf7, 0x68, 0x58, 0x3e, 0xda, 0x73, 0x69, 0x62, 0xc7, 0x63, 0x3e, 0xd2, - 0x62, 0x0b, 0xb7, 0x30, 0x7d, 0x5c, 0x0f, 0x9e, 0xf8, 0xa9, 0xdc, 0xc2, 0xb8, 0xd5, 0x41, 0xeb, - 0xf4, 0x53, 0xa3, 0x7f, 0x73, 0x9d, 0x38, 0x2e, 0xf2, 0x89, 0xe5, 0x76, 0x39, 0x60, 0x79, 0x1c, - 0x60, 0x79, 0x3b, 0xdc, 0x94, 0x1d, 0x37, 0xd9, 0xfd, 0x9e, 0x45, 0x1c, 0x1c, 0x2a, 0x2e, 0xb3, - 0x88, 0x4c, 0x26, 0xca, 0x43, 0x66, 0xa6, 0xe3, 0x96, 0xeb, 0x78, 0x78, 0x9d, 0xfe, 0x65, 0x47, - 0xb9, 0xef, 0x04, 0x00, 0xaf, 0x21, 0xa7, 0xd5, 0x26, 0xc8, 0xae, 0x63, 0x82, 0x2a, 0xdd, 0x80, - 0x0a, 0x5e, 0x00, 0xd3, 0x98, 0x3e, 0x65, 0x04, 0x45, 0x58, 0x59, 0xd8, 0xc8, 0xe6, 0x0f, 0xe6, - 0x9e, 0x1f, 0xe1, 0x75, 0x8e, 0x86, 0xd7, 0xc1, 0xf4, 0x6d, 0xca, 0x96, 0x89, 0x2b, 0xc2, 0xca, - 0x9c, 0x5a, 0x78, 0xb8, 0x2b, 0xc7, 0x7e, 0xdf, 0x95, 0x4f, 0xb7, 0x1c, 0xd2, 0xee, 0x37, 0xf2, - 0x4d, 0xec, 0xf2, 0x90, 0xf8, 0xbf, 0x35, 0xdf, 0xfe, 0x62, 0x9d, 0xec, 0x74, 0x91, 0x9f, 0x2f, - 0xa2, 0xe6, 0xe3, 0x07, 0x6b, 0x80, 0x0b, 0x15, 0x51, 0xf3, 0xfb, 0xe7, 0xf7, 0x57, 0x05, 0x9d, - 0x13, 0xe6, 0xbe, 0x12, 0x40, 0xda, 0x40, 0xdb, 0xa4, 0xda, 0xc3, 0x5d, 0xec, 0x5b, 0x1d, 0xb8, - 0x08, 0xa6, 0x88, 0x43, 0x3a, 0x88, 0x86, 0x38, 0xa7, 0xb3, 0x0f, 0x50, 0x01, 0x29, 0x1b, 0xf9, - 0xcd, 0x9e, 0xc3, 0xc2, 0xa7, 0x61, 0xe8, 0xd1, 0xa3, 0xcd, 0x0f, 0x5e, 0xdc, 0x93, 0x85, 0x9f, - 0x1e, 0xac, 0x49, 0x87, 0xa4, 0x74, 0x11, 0x7b, 0x04, 0x79, 0x64, 0xf0, 0xfc, 0xfe, 0xea, 0x52, - 0x24, 0xc0, 0xa8, 0x6e, 0xee, 0x17, 0x01, 0xcc, 0x14, 0x51, 0x17, 0xfb, 0x0e, 0x81, 0x32, 0x48, - 0x75, 0xf9, 0xb9, 0xe9, 0xd8, 0x34, 0x92, 0xa4, 0x0e, 0xc2, 0xa3, 0x92, 0x0d, 0x2f, 0x80, 0x39, - 0x9b, 0x61, 0x71, 0x8f, 0xd7, 0x24, 0xf3, 0xf8, 0xc1, 0xda, 0x22, 0xd7, 0x2e, 0xd8, 0x76, 0x0f, - 0xf9, 0x7e, 0x8d, 0xf4, 0x1c, 0xaf, 0xa5, 0x8f, 0xa0, 0xb0, 0x0d, 0xa6, 0x2d, 0x17, 0xf7, 0x3d, - 0x92, 0x49, 0x28, 0x89, 0x95, 0xd4, 0xc6, 0x72, 0xf8, 0x05, 0x04, 0x8d, 0x16, 0x09, 0xd7, 0xf1, - 0xd4, 0x77, 0x82, 0x1a, 0xff, 0xf0, 0x44, 0x5e, 0x79, 0x8d, 0x1a, 0x07, 0x0e, 0x3e, 0xaf, 0x2b, - 0xe3, 0xdf, 0x9c, 0xbd, 0x73, 0x4f, 0x8e, 0xbd, 0xb8, 0x27, 0xc7, 0x72, 0xbf, 0x4d, 0x81, 0xd9, - 0xbd, 0xea, 0x1e, 0x99, 0x59, 0x19, 0xcc, 0x34, 0x59, 0xb5, 0x68, 0x5e, 0xa9, 0x8d, 0xc5, 0x3c, - 0xeb, 0xcc, 0x7c, 0xd8, 0x99, 0xf9, 0x82, 0xb7, 0xa3, 0x66, 0x5f, 0x5d, 0x69, 0x3d, 0x24, 0x81, - 0x9b, 0x60, 0xda, 0x27, 0x16, 0xe9, 0xfb, 0x99, 0x04, 0x6d, 0xb9, 0xdc, 0x61, 0x2d, 0x17, 0x86, - 0x57, 0xa3, 0x48, 0x9d, 0x7b, 0xc0, 0x4f, 0x01, 0xbc, 0xe9, 0x78, 0x56, 0xc7, 0x24, 0x56, 0xa7, - 0xb3, 0x63, 0xf6, 0x90, 0xdf, 0xef, 0x90, 0x4c, 0x92, 0x86, 0x25, 0x1f, 0xc6, 0x63, 0x04, 0x38, - 0x9d, 0xc2, 0xd4, 0xb9, 0xa0, 0x7e, 0xac, 0x26, 0x22, 0x65, 0x89, 0x18, 0xe1, 0x65, 0x90, 0xf2, - 0xfb, 0x0d, 0xd7, 0x21, 0x66, 0x30, 0xa2, 0x99, 0x29, 0x4a, 0x29, 0x1d, 0xc8, 0xd4, 0x08, 0xe7, - 0x57, 0x9d, 0x0f, 0xd8, 0xee, 0x3e, 0x91, 0x05, 0xc6, 0x08, 0x98, 0x77, 0x60, 0x87, 0x35, 0x20, - 0xf2, 0x2f, 0xd8, 0x44, 0x9e, 0xcd, 0x08, 0xa7, 0x27, 0x25, 0x5c, 0xe0, 0x14, 0x9a, 0x67, 0x53, - 0xd2, 0x3e, 0x98, 0x27, 0x98, 0x58, 0x1d, 0x93, 0x9f, 0x67, 0x66, 0xfe, 0xa3, 0x7e, 0x49, 0x53, - 0x99, 0xb0, 0xf1, 0xaf, 0x82, 0xe3, 0x5b, 0x98, 0x38, 0x5e, 0xcb, 0xf4, 0x89, 0xd5, 0xe3, 0xd5, - 0x99, 0x9d, 0x34, 0x99, 0x63, 0x8c, 0xa3, 0x16, 0x50, 0xd0, 0x6c, 0x3e, 0x01, 0xfc, 0x68, 0x54, - 0xa1, 0xb9, 0x49, 0x49, 0xe7, 0x19, 0x03, 0x2f, 0xd0, 0x66, 0x32, 0x18, 0xf7, 0xdc, 0xdf, 0x71, - 0x90, 0x8a, 0x7e, 0xaf, 0x65, 0x90, 0xd8, 0x41, 0x3e, 0x5b, 0x1d, 0xea, 0xfb, 0x13, 0x6c, 0xa9, - 0x92, 0x47, 0x22, 0x5b, 0xaa, 0xe4, 0x11, 0x3d, 0x20, 0x82, 0x75, 0x30, 0x63, 0x35, 0x7c, 0x62, - 0x39, 0x7c, 0xe5, 0xbc, 0x21, 0x67, 0x48, 0x06, 0xaf, 0x80, 0xb8, 0x87, 0xe9, 0x44, 0xbc, 0x29, - 0x65, 0xdc, 0xc3, 0xf0, 0x33, 0x90, 0xf6, 0xb0, 0x79, 0xdb, 0x21, 0x6d, 0x73, 0x0b, 0x11, 0x4c, - 0x27, 0xe4, 0x4d, 0x79, 0x81, 0x87, 0xaf, 0x39, 0xa4, 0x5d, 0x47, 0x04, 0xf3, 0x5a, 0xff, 0x23, - 0x80, 0x64, 0xf0, 0x6e, 0x80, 0xe7, 0x0f, 0xd9, 0x21, 0x2a, 0x7c, 0xb9, 0x2b, 0xc7, 0x1d, 0xfb, - 0x9b, 0xe7, 0xf7, 0x57, 0xe3, 0x8e, 0xcd, 0xa7, 0x24, 0xb2, 0x57, 0xf2, 0x60, 0x6a, 0x0b, 0x13, - 0x74, 0xf4, 0xb6, 0x64, 0xb0, 0x60, 0x6f, 0xf0, 0x57, 0x55, 0xe2, 0x75, 0x5e, 0x55, 0x6a, 0x3c, - 0x23, 0xec, 0xbd, 0xae, 0x3e, 0x06, 0x33, 0xec, 0xc9, 0xcf, 0x24, 0xe9, 0xd8, 0x9c, 0x3e, 0xcc, - 0xf9, 0xe0, 0xfb, 0x31, 0xba, 0x33, 0x42, 0x06, 0x9a, 0x7c, 0x2c, 0x37, 0x88, 0x83, 0x79, 0x3e, - 0x24, 0x55, 0xab, 0x67, 0xb9, 0x3e, 0xfc, 0x52, 0x00, 0x29, 0xd7, 0xf1, 0xf6, 0x06, 0x54, 0x38, - 0x6a, 0x40, 0x4b, 0x01, 0xf9, 0xcb, 0x5d, 0xf9, 0x7f, 0x11, 0xaf, 0x33, 0xd8, 0x75, 0x08, 0x72, - 0xbb, 0x64, 0x67, 0x92, 0xc9, 0xd5, 0x81, 0xeb, 0x78, 0xe1, 0xc8, 0xde, 0x02, 0xd0, 0xb5, 0xb6, - 0x43, 0x42, 0xb3, 0x8b, 0x7a, 0x0e, 0xb6, 0xf9, 0xee, 0x5e, 0x3e, 0x30, 0x5e, 0x45, 0x7e, 0xab, - 0x50, 0x57, 0x78, 0x34, 0xa7, 0x0e, 0x3a, 0x8f, 0x82, 0xfa, 0xfa, 0x89, 0x2c, 0xe8, 0xa2, 0x6b, - 0x6d, 0x87, 0xa9, 0x53, 0x7b, 0xce, 0x07, 0xe9, 0x3a, 0x1d, 0x46, 0x5e, 0x8a, 0x26, 0xe0, 0xc3, - 0x19, 0xaa, 0x0b, 0x47, 0xa9, 0xbf, 0xcd, 0xd5, 0x97, 0xf6, 0xf9, 0x8d, 0x09, 0xa7, 0x99, 0x91, - 0x8b, 0xfe, 0x18, 0x8e, 0x3a, 0x17, 0xbd, 0x01, 0xa6, 0x6f, 0xf5, 0x71, 0xaf, 0xef, 0x52, 0xb5, - 0xb4, 0xaa, 0x4e, 0x76, 0x27, 0x79, 0xb9, 0x2b, 0x8b, 0xcc, 0x7f, 0xa4, 0xaa, 0x73, 0x46, 0xd8, - 0x04, 0x73, 0xa4, 0xdd, 0x43, 0x7e, 0x1b, 0x77, 0x58, 0x29, 0xd3, 0xaa, 0x36, 0x31, 0xfd, 0x89, - 0x3d, 0x8a, 0x88, 0xc2, 0x88, 0x17, 0xde, 0x02, 0x0b, 0xc1, 0xb4, 0x9a, 0x23, 0xa5, 0x04, 0x55, - 0xba, 0x3c, 0xb1, 0x52, 0x66, 0x3f, 0x4f, 0x44, 0x6e, 0x3e, 0xb0, 0x18, 0xa1, 0x61, 0xf5, 0x2f, - 0x01, 0x80, 0xc8, 0x75, 0xf0, 0x0c, 0x58, 0xaa, 0x57, 0x0c, 0xcd, 0xac, 0x54, 0x8d, 0x52, 0xa5, - 0x6c, 0x5e, 0x2d, 0xd7, 0xaa, 0xda, 0xc5, 0xd2, 0xa5, 0x92, 0x56, 0x14, 0x63, 0xd2, 0xb1, 0xc1, - 0x50, 0x49, 0x31, 0xa0, 0x16, 0x70, 0xc1, 0x1c, 0x38, 0x16, 0x45, 0x5f, 0xd7, 0x6a, 0xa2, 0x20, - 0xcd, 0x0f, 0x86, 0xca, 0x1c, 0x43, 0x5d, 0x47, 0x3e, 0x5c, 0x05, 0x27, 0xa2, 0x98, 0x82, 0x5a, - 0x33, 0x0a, 0xa5, 0xb2, 0x18, 0x97, 0x8e, 0x0f, 0x86, 0xca, 0x3c, 0xc3, 0x15, 0xf8, 0x0e, 0x54, - 0xc0, 0x42, 0x14, 0x5b, 0xae, 0x88, 0x09, 0x29, 0x3d, 0x18, 0x2a, 0xb3, 0x0c, 0x56, 0xc6, 0x70, - 0x03, 0x64, 0xf6, 0x23, 0xcc, 0x6b, 0x25, 0xe3, 0x23, 0xb3, 0xae, 0x19, 0x15, 0x31, 0x29, 0x2d, - 0x0e, 0x86, 0x8a, 0x18, 0x62, 0xc3, 0x5d, 0x25, 0x25, 0xef, 0x7c, 0x9b, 0x8d, 0xad, 0xfe, 0x1c, - 0x07, 0x0b, 0xfb, 0x2f, 0x15, 0x30, 0x0f, 0xfe, 0x5f, 0xd5, 0x2b, 0xd5, 0x4a, 0xad, 0x70, 0xc5, - 0xac, 0x19, 0x05, 0xe3, 0x6a, 0x6d, 0x2c, 0x61, 0x9a, 0x0a, 0x03, 0x97, 0x9d, 0x0e, 0x7c, 0x0f, - 0x64, 0xc7, 0xf1, 0x45, 0xad, 0x5a, 0xa9, 0x95, 0x0c, 0xb3, 0xaa, 0xe9, 0xa5, 0x4a, 0x51, 0x14, - 0xa4, 0xa5, 0xc1, 0x50, 0x39, 0xc1, 0x5c, 0xf6, 0x4d, 0x08, 0x7c, 0x17, 0xbc, 0x35, 0xee, 0x5c, - 0xaf, 0x18, 0xa5, 0xf2, 0x87, 0xa1, 0x6f, 0x5c, 0x3a, 0x39, 0x18, 0x2a, 0x90, 0xf9, 0xd6, 0x23, - 0x7d, 0x0e, 0xcf, 0x80, 0x93, 0xe3, 0xae, 0xd5, 0x42, 0xad, 0xa6, 0x15, 0xc5, 0x84, 0x24, 0x0e, - 0x86, 0x4a, 0x9a, 0xf9, 0x54, 0x2d, 0xdf, 0x47, 0x36, 0x3c, 0x0b, 0x32, 0xe3, 0x68, 0x5d, 0xbb, - 0xac, 0x5d, 0x34, 0xb4, 0xa2, 0x98, 0x94, 0xe0, 0x60, 0xa8, 0x2c, 0xf0, 0x4b, 0x15, 0xfa, 0x1c, - 0x35, 0x09, 0x3a, 0x94, 0xff, 0x52, 0xa1, 0x74, 0x45, 0x2b, 0x8a, 0x53, 0x51, 0xfe, 0x4b, 0x96, - 0xd3, 0x41, 0x36, 0x2b, 0xa7, 0x5a, 0x7e, 0xf8, 0x67, 0x36, 0xf6, 0xf0, 0x69, 0x56, 0x78, 0xf4, - 0x34, 0x2b, 0xfc, 0xf1, 0x34, 0x2b, 0xdc, 0x7d, 0x96, 0x8d, 0x3d, 0x7a, 0x96, 0x8d, 0xfd, 0xfa, - 0x2c, 0x1b, 0xbb, 0x71, 0xf6, 0x95, 0x8d, 0xba, 0x4d, 0x7f, 0x76, 0xd1, 0x76, 0x0d, 0x7f, 0x49, - 0x35, 0xa6, 0xe9, 0x46, 0x38, 0xff, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0xb6, 0x8e, 0xf7, - 0x99, 0x0d, 0x00, 0x00, + 0x17, 0xf7, 0xda, 0xce, 0xaf, 0xb1, 0x13, 0x96, 0x21, 0x10, 0x67, 0xe1, 0xeb, 0x5d, 0xf9, 0x2b, + 0x55, 0x51, 0x4a, 0x6c, 0x08, 0x2a, 0x52, 0x83, 0x5a, 0xc9, 0xc6, 0x4b, 0x31, 0x05, 0xdb, 0x5d, + 0x2f, 0xa1, 0x54, 0xaa, 0x56, 0x1b, 0xef, 0x60, 0x6f, 0xf1, 0xee, 0x18, 0xef, 0x38, 0xc4, 0x7f, + 0x40, 0x2b, 0xe4, 0x13, 0xc7, 0x1e, 0x6a, 0x09, 0xb5, 0xaa, 0x54, 0xf5, 0xc4, 0x81, 0x3f, 0x02, + 0xa1, 0x1e, 0x10, 0x87, 0xaa, 0xed, 0x21, 0xb4, 0x20, 0x15, 0xc4, 0x9f, 0xd0, 0x53, 0xb5, 0x33, + 0xb3, 0xf1, 0xc6, 0x09, 0x24, 0x3e, 0xf4, 0x12, 0x6d, 0x66, 0x3e, 0x3f, 0xe6, 0xbd, 0x7d, 0xef, + 0xed, 0x18, 0x9c, 0xaa, 0x63, 0xcf, 0xc1, 0x5e, 0xae, 0x81, 0x37, 0x73, 0x9b, 0x67, 0x37, 0x10, + 0x31, 0xcf, 0xfa, 0xcf, 0xd9, 0x76, 0x07, 0x13, 0x0c, 0x21, 0xdb, 0xcd, 0xfa, 0x2b, 0x7c, 0x57, + 0x4a, 0x73, 0xc6, 0x86, 0xe9, 0xa1, 0x1d, 0x4a, 0x1d, 0xdb, 0x2e, 0xe3, 0x48, 0xf3, 0x0d, 0xdc, + 0xc0, 0xf4, 0x31, 0xe7, 0x3f, 0xf1, 0x55, 0xb9, 0x81, 0x71, 0xa3, 0x85, 0x72, 0xf4, 0xbf, 0x8d, + 0xee, 0xad, 0x1c, 0xb1, 0x1d, 0xe4, 0x11, 0xd3, 0x69, 0x73, 0xc0, 0xe2, 0x28, 0xc0, 0x74, 0x7b, + 0x7c, 0x2b, 0x3d, 0xba, 0x65, 0x75, 0x3b, 0x26, 0xb1, 0x71, 0xe0, 0xb8, 0xc8, 0x4e, 0x64, 0x30, + 0x53, 0x7e, 0x64, 0xb6, 0x75, 0xd4, 0x74, 0x6c, 0x17, 0xe7, 0xe8, 0x5f, 0xb6, 0x94, 0xf9, 0x4e, + 0x00, 0xf0, 0x06, 0xb2, 0x1b, 0x4d, 0x82, 0xac, 0x75, 0x4c, 0x50, 0xa5, 0xed, 0x4b, 0xc1, 0xf3, + 0x60, 0x12, 0xd3, 0xa7, 0x94, 0xa0, 0x08, 0x4b, 0x73, 0xab, 0xe9, 0xec, 0xde, 0xd8, 0xb3, 0x43, + 0xbc, 0xc6, 0xd1, 0xb0, 0x0c, 0x26, 0xef, 0x52, 0xb5, 0x54, 0x54, 0x11, 0x96, 0x66, 0x0a, 0xe7, + 0x1f, 0x6f, 0xcb, 0x91, 0x3f, 0xb6, 0xe5, 0x93, 0x8c, 0xee, 0x59, 0xb7, 0xb3, 0x36, 0xce, 0x39, + 0x26, 0x69, 0x66, 0xaf, 0xa2, 0x86, 0x59, 0xef, 0x15, 0x51, 0xfd, 0xd9, 0xa3, 0x15, 0xc0, 0xd5, + 0x8b, 0xa8, 0xfe, 0xd3, 0xab, 0x87, 0xcb, 0x82, 0xc6, 0x55, 0x32, 0xdf, 0x08, 0x20, 0xa9, 0xa3, + 0x2d, 0x52, 0xed, 0xe0, 0x36, 0xf6, 0xcc, 0x16, 0x9c, 0x07, 0x13, 0xc4, 0x26, 0x2d, 0x44, 0xcf, + 0x35, 0xa3, 0xb1, 0x7f, 0xa0, 0x02, 0x12, 0x16, 0xf2, 0xea, 0x1d, 0x9b, 0x9d, 0x99, 0x7a, 0x6b, + 0xe1, 0xa5, 0xb5, 0x8f, 0x5f, 0x3f, 0x90, 0x85, 0x27, 0x8f, 0x56, 0xa4, 0x7d, 0xe2, 0xb8, 0x88, + 0x5d, 0x82, 0x5c, 0xd2, 0x7f, 0xf5, 0x70, 0x79, 0x81, 0x6d, 0xaf, 0x78, 0xd6, 0xed, 0x5c, 0xd8, + 0x37, 0xf3, 0xab, 0x00, 0xa6, 0x8a, 0xa8, 0x8d, 0x3d, 0x9b, 0x40, 0x19, 0x24, 0xda, 0x7c, 0xdd, + 0xb0, 0x2d, 0x7a, 0x92, 0xb8, 0x06, 0x82, 0xa5, 0x92, 0x05, 0xcf, 0x83, 0x19, 0x8b, 0x61, 0x71, + 0x87, 0x27, 0x22, 0xf5, 0xec, 0xd1, 0xca, 0x3c, 0xf7, 0xce, 0x5b, 0x56, 0x07, 0x79, 0x5e, 0x8d, + 0x74, 0x6c, 0xb7, 0xa1, 0x0d, 0xa1, 0xb0, 0x09, 0x26, 0x4d, 0x07, 0x77, 0x5d, 0x92, 0x8a, 0x29, + 0xb1, 0xa5, 0xc4, 0xea, 0x62, 0x90, 0x75, 0xbf, 0xba, 0x42, 0xc7, 0xb5, 0xdd, 0xc2, 0x07, 0x7e, + 0x62, 0x7f, 0x7e, 0x2e, 0x2f, 0x35, 0x6c, 0xd2, 0xec, 0x6e, 0x64, 0xeb, 0xd8, 0xe1, 0xef, 0x3a, + 0x17, 0x0a, 0x81, 0xf4, 0xda, 0xc8, 0xa3, 0x04, 0x8f, 0xe7, 0x95, 0xe9, 0xaf, 0x4d, 0xdf, 0x7b, + 0x20, 0x47, 0x5e, 0x3f, 0x90, 0x23, 0x99, 0xdf, 0x27, 0xc0, 0xf4, 0x4e, 0x76, 0x0f, 0x8c, 0xac, + 0x0c, 0xa6, 0xea, 0x2c, 0x5b, 0x34, 0xae, 0xc4, 0xea, 0x7c, 0x96, 0x95, 0x63, 0x36, 0x28, 0xc7, + 0x6c, 0xde, 0xed, 0x15, 0xd2, 0xef, 0xce, 0xb4, 0x16, 0x88, 0xc0, 0x35, 0x30, 0xe9, 0x11, 0x93, + 0x74, 0xbd, 0x54, 0x8c, 0xd6, 0x59, 0x66, 0xbf, 0x3a, 0x0b, 0x8e, 0x57, 0xa3, 0x48, 0x8d, 0x33, + 0xe0, 0xe7, 0x00, 0xde, 0xb2, 0x5d, 0xb3, 0x65, 0x10, 0xb3, 0xd5, 0xea, 0x19, 0x1d, 0xe4, 0x75, + 0x5b, 0x24, 0x15, 0xa7, 0xc7, 0x92, 0xf7, 0xd3, 0xd1, 0x7d, 0x9c, 0x46, 0x61, 0x85, 0x19, 0x3f, + 0x7f, 0x2c, 0x27, 0x22, 0x55, 0x09, 0x6d, 0xc2, 0x2b, 0x20, 0xe1, 0x75, 0x37, 0x1c, 0x9b, 0x18, + 0x7e, 0x5f, 0xa6, 0x26, 0xa8, 0xa4, 0xb4, 0x27, 0x52, 0x3d, 0x68, 0xda, 0xc2, 0xac, 0xaf, 0x76, + 0xff, 0xb9, 0x2c, 0x30, 0x45, 0xc0, 0xd8, 0xfe, 0x3e, 0xac, 0x01, 0x91, 0xbf, 0x60, 0x03, 0xb9, + 0x16, 0x13, 0x9c, 0x1c, 0x57, 0x70, 0x8e, 0x4b, 0xa8, 0xae, 0x45, 0x45, 0xbb, 0x60, 0x96, 0x60, + 0x62, 0xb6, 0x0c, 0xbe, 0x9e, 0x9a, 0xfa, 0x8f, 0xea, 0x25, 0x49, 0x6d, 0x82, 0xc2, 0xbf, 0x0e, + 0x8e, 0x6e, 0x62, 0x62, 0xbb, 0x0d, 0xc3, 0x23, 0x66, 0x87, 0x67, 0x67, 0x7a, 0xdc, 0x60, 0x8e, + 0x30, 0x8d, 0x9a, 0x2f, 0x41, 0xa3, 0xf9, 0x0c, 0xf0, 0xa5, 0x61, 0x86, 0x66, 0xc6, 0x15, 0x9d, + 0x65, 0x0a, 0x3c, 0x41, 0x6b, 0x71, 0xbf, 0xdd, 0x33, 0x3f, 0x46, 0x41, 0x22, 0xfc, 0x5e, 0x3f, + 0x02, 0xb1, 0x1e, 0xf2, 0xd8, 0xe8, 0x28, 0xbc, 0xcf, 0x47, 0xd3, 0xf1, 0xbd, 0xa3, 0xa9, 0xe4, + 0x92, 0xd0, 0x50, 0x2a, 0xb9, 0x44, 0xf3, 0x79, 0x50, 0x05, 0x53, 0xe6, 0x86, 0x47, 0x4c, 0x9b, + 0x4f, 0x98, 0xf1, 0x24, 0x02, 0x2e, 0xbc, 0x00, 0xa2, 0x2e, 0xa6, 0xf5, 0x3e, 0xa6, 0x42, 0xd4, + 0xc5, 0xf0, 0x1a, 0x48, 0xba, 0xd8, 0xb8, 0x6b, 0x93, 0xa6, 0xb1, 0x89, 0x08, 0xa6, 0xe5, 0x3e, + 0xa6, 0x0c, 0x70, 0xf1, 0x0d, 0x9b, 0x34, 0xd7, 0x11, 0xc1, 0x3c, 0x4f, 0xff, 0x08, 0x20, 0xee, + 0x0f, 0x73, 0x78, 0x6e, 0x9f, 0xfe, 0x2f, 0xc0, 0x37, 0xdb, 0x72, 0xd4, 0xb6, 0xbe, 0x7f, 0xf5, + 0x70, 0x39, 0x6a, 0x5b, 0xbc, 0xc2, 0x43, 0x33, 0x21, 0x0b, 0x26, 0x36, 0x31, 0x41, 0x07, 0x4f, + 0x3a, 0x06, 0xf3, 0x7b, 0x9e, 0x7f, 0x5b, 0x62, 0x87, 0xf9, 0xb6, 0x14, 0xa2, 0x29, 0x61, 0xe7, + 0xfb, 0xf2, 0x29, 0x98, 0x62, 0x4f, 0x5e, 0x2a, 0x4e, 0x4b, 0xfe, 0xbd, 0xfd, 0xc8, 0x7b, 0x3f, + 0x68, 0xe1, 0x7e, 0x0f, 0x14, 0x68, 0xf0, 0x91, 0x4c, 0x3f, 0x0a, 0x66, 0x79, 0x81, 0x57, 0xcd, + 0x8e, 0xe9, 0x78, 0xf0, 0x6b, 0x01, 0x24, 0x1c, 0xdb, 0xdd, 0x69, 0x2e, 0xe1, 0xa0, 0xe6, 0x2a, + 0xf9, 0xe2, 0x6f, 0xb6, 0xe5, 0xe3, 0x21, 0xd6, 0x69, 0xec, 0xd8, 0x04, 0x39, 0x6d, 0xd2, 0x1b, + 0xa7, 0xeb, 0x34, 0xe0, 0xd8, 0x6e, 0xd0, 0x6e, 0x77, 0x00, 0x74, 0xcc, 0xad, 0x40, 0xd0, 0x68, + 0xa3, 0x8e, 0x8d, 0x2d, 0x3e, 0x77, 0x17, 0xf7, 0xb4, 0x46, 0x91, 0x5f, 0x03, 0x0a, 0x4b, 0xfc, + 0x34, 0xa7, 0xf6, 0x92, 0x87, 0x87, 0xfa, 0xf6, 0xb9, 0x2c, 0x68, 0xa2, 0x63, 0x6e, 0x05, 0xa1, + 0xd3, 0xfd, 0x8c, 0x07, 0x92, 0xeb, 0xb4, 0x91, 0x78, 0x2a, 0xea, 0x80, 0x37, 0x56, 0xe0, 0x2e, + 0x1c, 0xe4, 0xfe, 0x7f, 0xee, 0xbe, 0xb0, 0x8b, 0x37, 0x62, 0x9c, 0x64, 0x9b, 0xdc, 0xf4, 0x49, + 0xd0, 0xa6, 0xdc, 0xf4, 0x4b, 0x30, 0x79, 0xa7, 0x8b, 0x3b, 0x5d, 0x87, 0xba, 0x25, 0x0b, 0xea, + 0x21, 0x2e, 0x11, 0x6f, 0xb6, 0x65, 0x91, 0x91, 0x86, 0x56, 0xbb, 0x2f, 0x16, 0x1a, 0x17, 0x85, + 0xb7, 0xc0, 0x0c, 0x69, 0x76, 0x90, 0xd7, 0xc4, 0x2d, 0x96, 0xcd, 0x64, 0xe1, 0xf2, 0xe1, 0x1c, + 0x8e, 0xed, 0xf0, 0xde, 0x6a, 0x32, 0x94, 0x86, 0x04, 0xcc, 0xf9, 0x2d, 0x6a, 0x0c, 0xcd, 0x62, + 0xd4, 0xec, 0xda, 0xe1, 0xcc, 0x52, 0xbb, 0xc9, 0x6f, 0x75, 0x9c, 0xf5, 0x71, 0x7a, 0x00, 0x5b, + 0xfe, 0x5b, 0x00, 0x20, 0x74, 0x91, 0x3b, 0x0d, 0x16, 0xd6, 0x2b, 0xba, 0x6a, 0x54, 0xaa, 0x7a, + 0xa9, 0x52, 0x36, 0xae, 0x97, 0x6b, 0x55, 0xf5, 0x62, 0xe9, 0x52, 0x49, 0x2d, 0x8a, 0x11, 0xe9, + 0x48, 0x7f, 0xa0, 0x24, 0x18, 0x50, 0xf5, 0x95, 0x61, 0x06, 0x1c, 0x09, 0xa3, 0x6f, 0xaa, 0x35, + 0x51, 0x90, 0x66, 0xfb, 0x03, 0x65, 0x86, 0xa1, 0x6e, 0x22, 0x0f, 0x2e, 0x83, 0x63, 0x61, 0x4c, + 0xbe, 0x50, 0xd3, 0xf3, 0xa5, 0xb2, 0x18, 0x95, 0x8e, 0xf6, 0x07, 0xca, 0x2c, 0xc3, 0xe5, 0xf9, + 0xa8, 0x53, 0xc0, 0x5c, 0x18, 0x5b, 0xae, 0x88, 0x31, 0x29, 0xd9, 0x1f, 0x28, 0xd3, 0x0c, 0x56, + 0xc6, 0x70, 0x15, 0xa4, 0x76, 0x23, 0x8c, 0x1b, 0x25, 0xfd, 0xb2, 0xb1, 0xae, 0xea, 0x15, 0x31, + 0x2e, 0xcd, 0xf7, 0x07, 0x8a, 0x18, 0x60, 0x83, 0xa1, 0x25, 0xc5, 0xef, 0xfd, 0x90, 0x8e, 0x2c, + 0xff, 0x12, 0x05, 0x73, 0xbb, 0x6f, 0x06, 0x30, 0x0b, 0x4e, 0x56, 0xb5, 0x4a, 0xb5, 0x52, 0xcb, + 0x5f, 0x35, 0x6a, 0x7a, 0x5e, 0xbf, 0x5e, 0x1b, 0x09, 0x98, 0x86, 0xc2, 0xc0, 0x65, 0xbb, 0x05, + 0x2f, 0x80, 0xf4, 0x28, 0xbe, 0xa8, 0x56, 0x2b, 0xb5, 0x92, 0x6e, 0x54, 0x55, 0xad, 0x54, 0x29, + 0x8a, 0x82, 0xb4, 0xd0, 0x1f, 0x28, 0xc7, 0x18, 0x65, 0x57, 0xab, 0xc0, 0x0f, 0xc1, 0xff, 0x46, + 0xc9, 0xeb, 0x15, 0xbd, 0x54, 0xfe, 0x24, 0xe0, 0x46, 0xa5, 0x13, 0xfd, 0x81, 0x02, 0x19, 0x77, + 0x3d, 0x54, 0xf0, 0xf0, 0x34, 0x38, 0x31, 0x4a, 0xad, 0xe6, 0x6b, 0x35, 0xb5, 0x28, 0xc6, 0x24, + 0xb1, 0x3f, 0x50, 0x92, 0x8c, 0x53, 0x35, 0x3d, 0x0f, 0x59, 0xf0, 0x0c, 0x48, 0x8d, 0xa2, 0x35, + 0xf5, 0x8a, 0x7a, 0x51, 0x57, 0x8b, 0x62, 0x5c, 0x82, 0xfd, 0x81, 0x32, 0xc7, 0x6f, 0x46, 0xe8, + 0x2b, 0x54, 0x27, 0x68, 0x5f, 0xfd, 0x4b, 0xf9, 0xd2, 0x55, 0xb5, 0x28, 0x4e, 0x84, 0xf5, 0x2f, + 0x99, 0x76, 0x0b, 0x59, 0x2c, 0x9d, 0x85, 0xf2, 0xe3, 0xbf, 0xd2, 0x91, 0xc7, 0x2f, 0xd2, 0xc2, + 0xd3, 0x17, 0x69, 0xe1, 0xcf, 0x17, 0x69, 0xe1, 0xfe, 0xcb, 0x74, 0xe4, 0xe9, 0xcb, 0x74, 0xe4, + 0xb7, 0x97, 0xe9, 0xc8, 0x17, 0x67, 0xde, 0x39, 0xc0, 0xb6, 0xe8, 0x0f, 0x26, 0x3a, 0xc6, 0x82, + 0xdf, 0x40, 0x1b, 0x93, 0x74, 0x34, 0x9c, 0xfb, 0x37, 0x00, 0x00, 0xff, 0xff, 0x15, 0xc3, 0xb3, + 0x11, 0x53, 0x0d, 0x00, 0x00, } func (this *TextProposal) Equal(that interface{}) bool { diff --git a/x/gov/types/v1beta1/msgs.go b/x/gov/types/v1beta1/msgs.go index 182e877846be..1f8a62019f05 100644 --- a/x/gov/types/v1beta1/msgs.go +++ b/x/gov/types/v1beta1/msgs.go @@ -39,12 +39,6 @@ func NewMsgSubmitProposal(content Content, initialDeposit sdk.Coins, proposer sd // GetInitialDeposit returns the initial deposit of MsgSubmitProposal. func (m *MsgSubmitProposal) GetInitialDeposit() sdk.Coins { return m.InitialDeposit } -// GetProposer returns the proposer address of MsgSubmitProposal. -func (m *MsgSubmitProposal) GetProposer() sdk.AccAddress { - proposer, _ := sdk.AccAddressFromBech32(m.Proposer) - return proposer -} - // GetContent returns the content of MsgSubmitProposal. func (m *MsgSubmitProposal) GetContent() Content { content, ok := m.Content.GetCachedValue().(Content) @@ -78,12 +72,6 @@ func (m *MsgSubmitProposal) SetContent(content Content) error { return nil } -// GetSigners returns the expected signers for a MsgSubmitProposal. -func (m MsgSubmitProposal) GetSigners() []sdk.AccAddress { - proposer, _ := sdk.AccAddressFromBech32(m.Proposer) - return []sdk.AccAddress{proposer} -} - // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (m MsgSubmitProposal) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { var content Content @@ -95,30 +83,12 @@ func NewMsgDeposit(depositor sdk.AccAddress, proposalID uint64, amount sdk.Coins return &MsgDeposit{proposalID, depositor.String(), amount} } -// GetSigners returns the expected signers for a MsgDeposit. -func (msg MsgDeposit) GetSigners() []sdk.AccAddress { - depositor, _ := sdk.AccAddressFromBech32(msg.Depositor) - return []sdk.AccAddress{depositor} -} - // NewMsgVote creates a message to cast a vote on an active proposal func NewMsgVote(voter sdk.AccAddress, proposalID uint64, option VoteOption) *MsgVote { return &MsgVote{proposalID, voter.String(), option} } -// GetSigners returns the expected signers for a MsgVote. -func (msg MsgVote) GetSigners() []sdk.AccAddress { - voter, _ := sdk.AccAddressFromBech32(msg.Voter) - return []sdk.AccAddress{voter} -} - // NewMsgVoteWeighted creates a message to cast a vote on an active proposal. func NewMsgVoteWeighted(voter sdk.AccAddress, proposalID uint64, options WeightedVoteOptions) *MsgVoteWeighted { return &MsgVoteWeighted{proposalID, voter.String(), options} } - -// GetSigners returns the expected signers for a MsgVoteWeighted. -func (msg MsgVoteWeighted) GetSigners() []sdk.AccAddress { - voter, _ := sdk.AccAddressFromBech32(msg.Voter) - return []sdk.AccAddress{voter} -} diff --git a/x/gov/types/v1beta1/params.go b/x/gov/types/v1beta1/params.go index 11033a012237..5ade9788fece 100644 --- a/x/gov/types/v1beta1/params.go +++ b/x/gov/types/v1beta1/params.go @@ -3,7 +3,7 @@ package v1beta1 import ( "time" - sdkmath "cosmossdk.io/math" + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -15,10 +15,10 @@ const ( // Default governance params var ( - DefaultMinDepositTokens = sdkmath.NewInt(10000000) - DefaultQuorum = sdkmath.LegacyNewDecWithPrec(334, 3) - DefaultThreshold = sdkmath.LegacyNewDecWithPrec(5, 1) - DefaultVetoThreshold = sdkmath.LegacyNewDecWithPrec(334, 3) + DefaultMinDepositTokens = math.NewInt(10000000) + DefaultQuorum = math.LegacyNewDecWithPrec(334, 3) + DefaultThreshold = math.LegacyNewDecWithPrec(5, 1) + DefaultVetoThreshold = math.LegacyNewDecWithPrec(334, 3) ) // NewDepositParams creates a new DepositParams object @@ -43,7 +43,7 @@ func (dp DepositParams) Equal(dp2 DepositParams) bool { } // NewTallyParams creates a new TallyParams object -func NewTallyParams(quorum, threshold, vetoThreshold sdk.Dec) TallyParams { +func NewTallyParams(quorum, threshold, vetoThreshold math.LegacyDec) TallyParams { return TallyParams{ Quorum: quorum, Threshold: threshold, diff --git a/x/gov/types/v1beta1/proposals_test.go b/x/gov/types/v1beta1/proposals_test.go index 6f3bee6092f6..77eb4076389b 100644 --- a/x/gov/types/v1beta1/proposals_test.go +++ b/x/gov/types/v1beta1/proposals_test.go @@ -4,8 +4,9 @@ import ( "fmt" "testing" - "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) func TestProposalStatus_Format(t *testing.T) { diff --git a/x/gov/types/v1beta1/query.pb.go b/x/gov/types/v1beta1/query.pb.go index 39597345ced4..36b0cd193332 100644 --- a/x/gov/types/v1beta1/query.pb.go +++ b/x/gov/types/v1beta1/query.pb.go @@ -932,7 +932,7 @@ type QueryClient interface { Votes(ctx context.Context, in *QueryVotesRequest, opts ...grpc.CallOption) (*QueryVotesResponse, error) // Params queries all parameters of the gov module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // Deposit queries single deposit information based proposalID, depositAddr. + // Deposit queries single deposit information based on proposalID, depositor address. Deposit(ctx context.Context, in *QueryDepositRequest, opts ...grpc.CallOption) (*QueryDepositResponse, error) // Deposits queries all deposits of a single proposal. Deposits(ctx context.Context, in *QueryDepositsRequest, opts ...grpc.CallOption) (*QueryDepositsResponse, error) @@ -1032,7 +1032,7 @@ type QueryServer interface { Votes(context.Context, *QueryVotesRequest) (*QueryVotesResponse, error) // Params queries all parameters of the gov module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // Deposit queries single deposit information based proposalID, depositAddr. + // Deposit queries single deposit information based on proposalID, depositor address. Deposit(context.Context, *QueryDepositRequest) (*QueryDepositResponse, error) // Deposits queries all deposits of a single proposal. Deposits(context.Context, *QueryDepositsRequest) (*QueryDepositsResponse, error) diff --git a/x/gov/types/v1beta1/tally.go b/x/gov/types/v1beta1/tally.go index 231700f4fb84..b4db63037360 100644 --- a/x/gov/types/v1beta1/tally.go +++ b/x/gov/types/v1beta1/tally.go @@ -17,7 +17,7 @@ type ValidatorGovInfo struct { // NewValidatorGovInfo creates a ValidatorGovInfo instance func NewValidatorGovInfo(address sdk.ValAddress, bondedTokens math.Int, delegatorShares, - delegatorDeductions sdk.Dec, options WeightedVoteOptions, + delegatorDeductions math.LegacyDec, options WeightedVoteOptions, ) ValidatorGovInfo { return ValidatorGovInfo{ Address: address, @@ -39,7 +39,7 @@ func NewTallyResult(yes, abstain, no, noWithVeto math.Int) TallyResult { } // NewTallyResultFromMap creates a new TallyResult instance from a Option -> Dec map -func NewTallyResultFromMap(results map[VoteOption]sdk.Dec) TallyResult { +func NewTallyResultFromMap(results map[VoteOption]math.LegacyDec) TallyResult { return NewTallyResult( results[OptionYes].TruncateInt(), results[OptionAbstain].TruncateInt(), diff --git a/x/group/README.md b/x/group/README.md index 29e5478b5fb2..71d91ccb4a24 100644 --- a/x/group/README.md +++ b/x/group/README.md @@ -1128,18 +1128,18 @@ Example: simd tx group update-group-policy-decision-policy cosmos1.. cosmos1.. '{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"2", "windows": {"voting_period": "120h", "min_execution_period": "0s"}}' ``` -#### create-proposal +#### submit-proposal -The `create-proposal` command allows users to submit a new proposal. +The `submit-proposal` command allows users to submit a new proposal. ```bash -simd tx group create-proposal [group-policy-account] [proposer[,proposer]*] [msg_tx_json_file] [metadata] [flags] +simd tx group submit-proposal [group-policy-account] [proposer[,proposer]*] [msg_tx_json_file] [metadata] [flags] ``` Example: ```bash -simd tx group create-proposal cosmos1.. cosmos1.. msg_tx.json "AQ==" +simd tx group submit-proposal cosmos1.. cosmos1.. msg_tx.json "AQ==" ``` #### withdraw-proposal @@ -2109,7 +2109,7 @@ Example Output: ## Metadata -The group module has four locations for metadata where users can provide further context about the on-chain actions they are taking. By default all metadata fields have a 255 character length field where metadata can be stored in json format, either on-chain or off-chain depending on the amount of data required. Here we provide a recommendation for the json structure and where the data should be stored. There are two important factors in making these recommendations. First, that the group and gov modules are consistent with one another, note the number of proposals made by all groups may be quite large. Second, that client applications such as block explorers and governance interfaces have confidence in the consistency of metadata structure accross chains. +The group module has four locations for metadata where users can provide further context about the on-chain actions they are taking. By default all metadata fields have a 255 character length field where metadata can be stored in json format, either on-chain or off-chain depending on the amount of data required. Here we provide a recommendation for the json structure and where the data should be stored. There are two important factors in making these recommendations. First, that the group and gov modules are consistent with one another, note the number of proposals made by all groups may be quite large. Second, that client applications such as block explorers and governance interfaces have confidence in the consistency of metadata structure across chains. ### Proposal diff --git a/x/group/client/cli/prompt.go b/x/group/client/cli/prompt.go index 7b4a2fc4507c..79b347f525a3 100644 --- a/x/group/client/cli/prompt.go +++ b/x/group/client/cli/prompt.go @@ -30,9 +30,9 @@ type proposalType struct { } // Prompt the proposal type values and return the proposal and its metadata. -func (p *proposalType) Prompt(cdc codec.Codec) (*Proposal, govtypes.ProposalMetadata, error) { +func (p *proposalType) Prompt(cdc codec.Codec, skipMetadata bool) (*Proposal, govtypes.ProposalMetadata, error) { // set metadata - metadata, err := govcli.Prompt(govtypes.ProposalMetadata{}, "proposal") + metadata, err := govcli.PromptMetadata(skipMetadata) if err != nil { return nil, metadata, fmt.Errorf("failed to set proposal metadata: %w", err) } @@ -86,6 +86,8 @@ func (p *proposalType) Prompt(cdc codec.Codec) (*Proposal, govtypes.ProposalMeta // NewCmdDraftProposal let a user generate a draft proposal. func NewCmdDraftProposal() *cobra.Command { + flagSkipMetadata := "skip-metadata" + cmd := &cobra.Command{ Use: "draft-proposal", Short: "Generate a draft proposal json file. The generated proposal json contains only one message (skeleton).", @@ -137,7 +139,9 @@ func NewCmdDraftProposal() *cobra.Command { panic("unexpected proposal type") } - result, metadata, err := proposal.Prompt(clientCtx.Codec) + skipMetadataPrompt, _ := cmd.Flags().GetBool(flagSkipMetadata) + + result, metadata, err := proposal.Prompt(clientCtx.Codec, skipMetadataPrompt) if err != nil { return err } @@ -146,17 +150,20 @@ func NewCmdDraftProposal() *cobra.Command { return err } - if err := writeFile(draftMetadataFileName, metadata); err != nil { - return err + if !skipMetadataPrompt { + if err := writeFile(draftMetadataFileName, metadata); err != nil { + return err + } } - fmt.Printf("The draft proposal has successfully been generated.\nProposals should contain off-chain metadata, please upload the metadata JSON to IPFS.\nThen, replace the generated metadata field with the IPFS CID.\n") + cmd.Println("The draft proposal has successfully been generated.\nProposals should contain off-chain metadata, please upload the metadata JSON to IPFS.\nThen, replace the generated metadata field with the IPFS CID.") return nil }, } flags.AddTxFlagsToCmd(cmd) + cmd.Flags().Bool(flagSkipMetadata, false, "skip metadata prompt") return cmd } diff --git a/x/group/client/cli/query.go b/x/group/client/cli/query.go deleted file mode 100644 index 88d2582473ef..000000000000 --- a/x/group/client/cli/query.go +++ /dev/null @@ -1,556 +0,0 @@ -package cli - -import ( - "strconv" - - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/x/group" -) - -// QueryCmd returns the cli query commands for the group module. -func QueryCmd(name string) *cobra.Command { - queryCmd := &cobra.Command{ - Use: name, - Short: "Querying commands for the group module", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - queryCmd.AddCommand( - QueryGroupInfoCmd(), - QueryGroupPolicyInfoCmd(), - QueryGroupMembersCmd(), - QueryGroupsByAdminCmd(), - QueryGroupPoliciesByGroupCmd(), - QueryGroupPoliciesByAdminCmd(), - QueryProposalCmd(), - QueryProposalsByGroupPolicyCmd(), - QueryVoteByProposalVoterCmd(), - QueryVotesByProposalCmd(), - QueryVotesByVoterCmd(), - QueryGroupsByMemberCmd(), - QueryTallyResultCmd(), - QueryGroupsCmd(), - ) - - return queryCmd -} - -// QueryGroupsByMemberCmd creates a CLI command for Query/GroupsByMember. -func QueryGroupsByMemberCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "groups-by-member [address]", - Short: "Query for groups by member address with pagination flags", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - queryClient := group.NewQueryClient(clientCtx) - res, err := queryClient.GroupsByMember(cmd.Context(), &group.QueryGroupsByMemberRequest{ - Address: args[0], - Pagination: pageReq, - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "groups-by-members") - return cmd -} - -// QueryGroupInfoCmd creates a CLI command for Query/GroupInfo. -func QueryGroupInfoCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "group-info [id]", - Short: "Query for group info by group id", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - groupID, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return err - } - - queryClient := group.NewQueryClient(clientCtx) - - res, err := queryClient.GroupInfo(cmd.Context(), &group.QueryGroupInfoRequest{ - GroupId: groupID, - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res.Info) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// QueryGroupPolicyInfoCmd creates a CLI command for Query/GroupPolicyInfo. -func QueryGroupPolicyInfoCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "group-policy-info [group-policy-account]", - Short: "Query for group policy info by account address of group policy", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - queryClient := group.NewQueryClient(clientCtx) - - res, err := queryClient.GroupPolicyInfo(cmd.Context(), &group.QueryGroupPolicyInfoRequest{ - Address: args[0], - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res.Info) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// QueryGroupMembersCmd creates a CLI command for Query/GroupMembers. -func QueryGroupMembersCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "group-members [id]", - Short: "Query for group members by group id with pagination flags", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - groupID, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - queryClient := group.NewQueryClient(clientCtx) - - res, err := queryClient.GroupMembers(cmd.Context(), &group.QueryGroupMembersRequest{ - GroupId: groupID, - Pagination: pageReq, - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "group-members") - - return cmd -} - -// QueryGroupsByAdminCmd creates a CLI command for Query/GroupsByAdmin. -func QueryGroupsByAdminCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "groups-by-admin [admin]", - Short: "Query for groups by admin account address with pagination flags", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - queryClient := group.NewQueryClient(clientCtx) - - res, err := queryClient.GroupsByAdmin(cmd.Context(), &group.QueryGroupsByAdminRequest{ - Admin: args[0], - Pagination: pageReq, - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "groups-by-admin") - - return cmd -} - -// QueryGroupPoliciesByGroupCmd creates a CLI command for Query/GroupPoliciesByGroup. -func QueryGroupPoliciesByGroupCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "group-policies-by-group [group-id]", - Short: "Query for group policies by group id with pagination flags", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - groupID, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - queryClient := group.NewQueryClient(clientCtx) - - res, err := queryClient.GroupPoliciesByGroup(cmd.Context(), &group.QueryGroupPoliciesByGroupRequest{ - GroupId: groupID, - Pagination: pageReq, - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "groups-policies-by-group") - - return cmd -} - -// QueryGroupPoliciesByAdminCmd creates a CLI command for Query/GroupPoliciesByAdmin. -func QueryGroupPoliciesByAdminCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "group-policies-by-admin [admin]", - Short: "Query for group policies by admin account address with pagination flags", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - queryClient := group.NewQueryClient(clientCtx) - - res, err := queryClient.GroupPoliciesByAdmin(cmd.Context(), &group.QueryGroupPoliciesByAdminRequest{ - Admin: args[0], - Pagination: pageReq, - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "group-policies-by-admin") - - return cmd -} - -// QueryProposalCmd creates a CLI command for Query/Proposal. -func QueryProposalCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "proposal [id]", - Short: "Query for proposal by id", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - proposalID, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return err - } - - queryClient := group.NewQueryClient(clientCtx) - - res, err := queryClient.Proposal(cmd.Context(), &group.QueryProposalRequest{ - ProposalId: proposalID, - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// QueryProposalsByGroupPolicyCmd creates a CLI command for Query/ProposalsByGroupPolicy. -func QueryProposalsByGroupPolicyCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "proposals-by-group-policy [group-policy-account]", - Short: "Query for proposals by account address of group policy with pagination flags", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - queryClient := group.NewQueryClient(clientCtx) - - res, err := queryClient.ProposalsByGroupPolicy(cmd.Context(), &group.QueryProposalsByGroupPolicyRequest{ - Address: args[0], - Pagination: pageReq, - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "proposals-by-group-policy") - - return cmd -} - -// QueryVoteByProposalVoterCmd creates a CLI command for Query/VoteByProposalVoter. -func QueryVoteByProposalVoterCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "vote [proposal-id] [voter]", - Short: "Query for vote by proposal id and voter account address", - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - proposalID, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return err - } - - queryClient := group.NewQueryClient(clientCtx) - - res, err := queryClient.VoteByProposalVoter(cmd.Context(), &group.QueryVoteByProposalVoterRequest{ - ProposalId: proposalID, - Voter: args[1], - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// QueryVotesByProposalCmd creates a CLI command for Query/VotesByProposal. -func QueryVotesByProposalCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "votes-by-proposal [proposal-id]", - Short: "Query for votes by proposal id with pagination flags", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - proposalID, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - queryClient := group.NewQueryClient(clientCtx) - - res, err := queryClient.VotesByProposal(cmd.Context(), &group.QueryVotesByProposalRequest{ - ProposalId: proposalID, - Pagination: pageReq, - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "votes-by-proposal") - - return cmd -} - -// QueryTallyResultCmd creates a CLI command for Query/TallyResult. -func QueryTallyResultCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "tally-result [proposal-id]", - Short: "Query tally result of proposal", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - proposalID, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return err - } - - queryClient := group.NewQueryClient(clientCtx) - - res, err := queryClient.TallyResult(cmd.Context(), &group.QueryTallyResultRequest{ - ProposalId: proposalID, - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// QueryVotesByVoterCmd creates a CLI command for Query/VotesByVoter. -func QueryVotesByVoterCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "votes-by-voter [voter]", - Short: "Query for votes by voter account address with pagination flags", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - queryClient := group.NewQueryClient(clientCtx) - - res, err := queryClient.VotesByVoter(cmd.Context(), &group.QueryVotesByVoterRequest{ - Voter: args[0], - Pagination: pageReq, - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "votes-by-voter") - - return cmd -} - -// QueryGroupsCmd creates a CLI command for Query/Groups. -func QueryGroupsCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "groups", - Short: "Query for groups present in the state", - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - queryClient := group.NewQueryClient(clientCtx) - - res, err := queryClient.Groups(cmd.Context(), &group.QueryGroupsRequest{ - Pagination: pageReq, - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "groups") - - return cmd -} diff --git a/x/group/client/cli/query_test.go b/x/group/client/cli/query_test.go deleted file mode 100644 index 5e9735ababcd..000000000000 --- a/x/group/client/cli/query_test.go +++ /dev/null @@ -1,513 +0,0 @@ -package cli_test - -import ( - "context" - "fmt" - "io" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" - "github.com/cosmos/cosmos-sdk/testutil" - "github.com/cosmos/cosmos-sdk/x/group/client/cli" -) - -func (s *CLITestSuite) TestQueryGroupInfo() { - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - name: "invalid id", - args: []string{"invalid id"}, - expCmdOutput: `[invalid id]`, - }, - { - name: "json output", - args: []string{"1", fmt.Sprintf("--%s=json", flags.FlagOutput)}, - expCmdOutput: `[1 --output=json]`, - }, - { - name: "text output", - args: []string{"1", fmt.Sprintf("--%s=text", flags.FlagOutput)}, - expCmdOutput: `[1 --output=text]`, - }, - } - - for _, tc := range testCases { - s.Run(tc.name, func() { - cmd := cli.QueryGroupInfoCmd() - - ctx := svrcmd.CreateExecuteContext(context.Background()) - - cmd.SetOut(io.Discard) - s.Require().NotNil(cmd) - - cmd.SetContext(ctx) - cmd.SetArgs(tc.args) - s.Require().NoError(client.SetCmdClientContextHandler(s.baseCtx, cmd)) - - s.Require().Contains(fmt.Sprint(cmd), "group-info [id] [] [] Query for group info by group id") - s.Require().Contains(fmt.Sprint(cmd), tc.expCmdOutput) - }) - } -} - -func (s *CLITestSuite) TestQueryGroupPolicyInfo() { - accounts := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) - - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - name: "json output", - args: []string{accounts[0].Address.String(), fmt.Sprintf("--%s=json", flags.FlagOutput)}, - expCmdOutput: fmt.Sprintf("%s --output=json", accounts[0].Address.String()), - }, - { - name: "text output", - args: []string{accounts[0].Address.String(), fmt.Sprintf("--%s=text", flags.FlagOutput)}, - expCmdOutput: fmt.Sprintf("%s --output=text", accounts[0].Address.String()), - }, - } - - for _, tc := range testCases { - s.Run(tc.name, func() { - cmd := cli.QueryGroupPolicyInfoCmd() - - ctx := svrcmd.CreateExecuteContext(context.Background()) - - cmd.SetOut(io.Discard) - s.Require().NotNil(cmd) - - cmd.SetContext(ctx) - cmd.SetArgs(tc.args) - s.Require().NoError(client.SetCmdClientContextHandler(s.baseCtx, cmd)) - - s.Require().Contains(fmt.Sprint(cmd), "group-policy-info [group-policy-account] [] [] Query for group policy info by account address of group policy") - s.Require().Contains(fmt.Sprint(cmd), tc.expCmdOutput) - }) - } -} - -func (s *CLITestSuite) TestQueryGroupMembers() { - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - name: "json output", - args: []string{"1", fmt.Sprintf("--%s=json", flags.FlagOutput)}, - expCmdOutput: "1 --output=json", - }, - { - name: "text output", - args: []string{"1", fmt.Sprintf("--%s=text", flags.FlagOutput)}, - expCmdOutput: "1 --output=text", - }, - } - - for _, tc := range testCases { - s.Run(tc.name, func() { - cmd := cli.QueryGroupMembersCmd() - - ctx := svrcmd.CreateExecuteContext(context.Background()) - - cmd.SetOut(io.Discard) - s.Require().NotNil(cmd) - - cmd.SetContext(ctx) - cmd.SetArgs(tc.args) - s.Require().NoError(client.SetCmdClientContextHandler(s.baseCtx, cmd)) - - s.Require().Contains(fmt.Sprint(cmd), "group-members [id] [] [] Query for group members by group id with pagination flags") - s.Require().Contains(fmt.Sprint(cmd), tc.expCmdOutput) - }) - } -} - -func (s *CLITestSuite) TestQueryGroupsByAdmin() { - accounts := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) - - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - name: "json output", - args: []string{accounts[0].Address.String(), fmt.Sprintf("--%s=json", flags.FlagOutput)}, - expCmdOutput: fmt.Sprintf("%s --output=json", accounts[0].Address.String()), - }, - { - name: "text output", - args: []string{accounts[0].Address.String(), fmt.Sprintf("--%s=text", flags.FlagOutput)}, - expCmdOutput: fmt.Sprintf("%s --output=text", accounts[0].Address.String()), - }, - } - - for _, tc := range testCases { - s.Run(tc.name, func() { - cmd := cli.QueryGroupsByAdminCmd() - - ctx := svrcmd.CreateExecuteContext(context.Background()) - - cmd.SetOut(io.Discard) - s.Require().NotNil(cmd) - - cmd.SetContext(ctx) - cmd.SetArgs(tc.args) - s.Require().NoError(client.SetCmdClientContextHandler(s.baseCtx, cmd)) - - s.Require().Contains(fmt.Sprint(cmd), "groups-by-admin [admin] [] [] Query for groups by admin account address with pagination flags") - s.Require().Contains(fmt.Sprint(cmd), tc.expCmdOutput) - }) - } -} - -func (s *CLITestSuite) TestQueryGroupPoliciesByGroup() { - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - name: "json output", - args: []string{"1", fmt.Sprintf("--%s=json", flags.FlagOutput)}, - expCmdOutput: "1 --output=json", - }, - { - name: "text output", - args: []string{"1", fmt.Sprintf("--%s=text", flags.FlagOutput)}, - expCmdOutput: "1 --output=text", - }, - } - - for _, tc := range testCases { - s.Run(tc.name, func() { - cmd := cli.QueryGroupPoliciesByGroupCmd() - - ctx := svrcmd.CreateExecuteContext(context.Background()) - - cmd.SetOut(io.Discard) - s.Require().NotNil(cmd) - - cmd.SetContext(ctx) - cmd.SetArgs(tc.args) - s.Require().NoError(client.SetCmdClientContextHandler(s.baseCtx, cmd)) - - s.Require().Contains(fmt.Sprint(cmd), "group-policies-by-group [group-id] [] [] Query for group policies by group id with pagination flags") - s.Require().Contains(fmt.Sprint(cmd), tc.expCmdOutput) - }) - } -} - -func (s *CLITestSuite) TestQueryGroupPoliciesByAdmin() { - accounts := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) - - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - name: "json output", - args: []string{accounts[0].Address.String(), fmt.Sprintf("--%s=json", flags.FlagOutput)}, - expCmdOutput: fmt.Sprintf("%s --output=json", accounts[0].Address.String()), - }, - { - name: "text output", - args: []string{accounts[0].Address.String(), fmt.Sprintf("--%s=text", flags.FlagOutput)}, - expCmdOutput: fmt.Sprintf("%s --output=text", accounts[0].Address.String()), - }, - } - - for _, tc := range testCases { - s.Run(tc.name, func() { - cmd := cli.QueryGroupPoliciesByAdminCmd() - - ctx := svrcmd.CreateExecuteContext(context.Background()) - - cmd.SetOut(io.Discard) - s.Require().NotNil(cmd) - - cmd.SetContext(ctx) - cmd.SetArgs(tc.args) - s.Require().NoError(client.SetCmdClientContextHandler(s.baseCtx, cmd)) - - s.Require().Contains(fmt.Sprint(cmd), "group-policies-by-admin [admin] [] [] Query for group policies by admin account address with pagination flags") - s.Require().Contains(fmt.Sprint(cmd), tc.expCmdOutput) - }) - } -} - -func (s *CLITestSuite) TestQueryProposal() { - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - name: "json output", - args: []string{"1", fmt.Sprintf("--%s=json", flags.FlagOutput)}, - expCmdOutput: "1 --output=json", - }, - { - name: "text output", - args: []string{"1", fmt.Sprintf("--%s=text", flags.FlagOutput)}, - expCmdOutput: "1 --output=text", - }, - } - - for _, tc := range testCases { - s.Run(tc.name, func() { - cmd := cli.QueryProposalCmd() - - ctx := svrcmd.CreateExecuteContext(context.Background()) - - cmd.SetOut(io.Discard) - s.Require().NotNil(cmd) - - cmd.SetContext(ctx) - cmd.SetArgs(tc.args) - s.Require().NoError(client.SetCmdClientContextHandler(s.baseCtx, cmd)) - - s.Require().Contains(fmt.Sprint(cmd), "proposal [id] [] [] Query for proposal by id") - s.Require().Contains(fmt.Sprint(cmd), tc.expCmdOutput) - }) - } -} - -func (s *CLITestSuite) TestQueryProposalsByGroupPolicy() { - accounts := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) - - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - name: "json output", - args: []string{accounts[0].Address.String(), fmt.Sprintf("--%s=json", flags.FlagOutput)}, - expCmdOutput: fmt.Sprintf("%s --output=json", accounts[0].Address.String()), - }, - { - name: "text output", - args: []string{accounts[0].Address.String(), fmt.Sprintf("--%s=text", flags.FlagOutput)}, - expCmdOutput: fmt.Sprintf("%s --output=text", accounts[0].Address.String()), - }, - } - - for _, tc := range testCases { - s.Run(tc.name, func() { - cmd := cli.QueryProposalsByGroupPolicyCmd() - - ctx := svrcmd.CreateExecuteContext(context.Background()) - - cmd.SetOut(io.Discard) - s.Require().NotNil(cmd) - - cmd.SetContext(ctx) - cmd.SetArgs(tc.args) - s.Require().NoError(client.SetCmdClientContextHandler(s.baseCtx, cmd)) - - s.Require().Contains(fmt.Sprint(cmd), "proposals-by-group-policy [group-policy-account] [] [] Query for proposals by account address of group policy with pagination flags") - s.Require().Contains(fmt.Sprint(cmd), tc.expCmdOutput) - }) - } -} - -func (s *CLITestSuite) TestQueryVoteByProposalVoter() { - accounts := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) - - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - name: "json output", - args: []string{"1", accounts[0].Address.String(), fmt.Sprintf("--%s=json", flags.FlagOutput)}, - expCmdOutput: fmt.Sprintf("1 %s --output=json", accounts[0].Address.String()), - }, - { - name: "text output", - args: []string{"1", accounts[0].Address.String(), fmt.Sprintf("--%s=text", flags.FlagOutput)}, - expCmdOutput: fmt.Sprintf("1 %s --output=text", accounts[0].Address.String()), - }, - } - - for _, tc := range testCases { - s.Run(tc.name, func() { - cmd := cli.QueryVoteByProposalVoterCmd() - - ctx := svrcmd.CreateExecuteContext(context.Background()) - - cmd.SetOut(io.Discard) - s.Require().NotNil(cmd) - - cmd.SetContext(ctx) - cmd.SetArgs(tc.args) - s.Require().NoError(client.SetCmdClientContextHandler(s.baseCtx, cmd)) - - s.Require().Contains(fmt.Sprint(cmd), "vote [proposal-id] [voter] [] [] Query for vote by proposal id and voter account address") - s.Require().Contains(fmt.Sprint(cmd), tc.expCmdOutput) - }) - } -} - -func (s *CLITestSuite) TestQueryVotesByProposal() { - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - name: "json output", - args: []string{"1", fmt.Sprintf("--%s=json", flags.FlagOutput)}, - expCmdOutput: "1 --output=json", - }, - { - name: "text output", - args: []string{"1", fmt.Sprintf("--%s=text", flags.FlagOutput)}, - expCmdOutput: "1 --output=text", - }, - } - - for _, tc := range testCases { - s.Run(tc.name, func() { - cmd := cli.QueryVotesByProposalCmd() - - ctx := svrcmd.CreateExecuteContext(context.Background()) - - cmd.SetOut(io.Discard) - s.Require().NotNil(cmd) - - cmd.SetContext(ctx) - cmd.SetArgs(tc.args) - s.Require().NoError(client.SetCmdClientContextHandler(s.baseCtx, cmd)) - - s.Require().Contains(fmt.Sprint(cmd), "votes-by-proposal [proposal-id] [] [] Query for votes by proposal id with pagination flags") - s.Require().Contains(fmt.Sprint(cmd), tc.expCmdOutput) - }) - } -} - -func (s *CLITestSuite) TestQueryTallyResult() { - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - name: "json output", - args: []string{"1", fmt.Sprintf("--%s=json", flags.FlagOutput)}, - expCmdOutput: "1 --output=json", - }, - { - name: "text output", - args: []string{"1", fmt.Sprintf("--%s=text", flags.FlagOutput)}, - expCmdOutput: "1 --output=text", - }, - } - - for _, tc := range testCases { - s.Run(tc.name, func() { - cmd := cli.QueryTallyResultCmd() - - ctx := svrcmd.CreateExecuteContext(context.Background()) - - cmd.SetOut(io.Discard) - s.Require().NotNil(cmd) - - cmd.SetContext(ctx) - cmd.SetArgs(tc.args) - s.Require().NoError(client.SetCmdClientContextHandler(s.baseCtx, cmd)) - - s.Require().Contains(fmt.Sprint(cmd), "tally-result [proposal-id] [] [] Query tally result of proposal") - s.Require().Contains(fmt.Sprint(cmd), tc.expCmdOutput) - }) - } -} - -func (s *CLITestSuite) TestQueryVotesByVoter() { - accounts := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) - - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - name: "json output", - args: []string{accounts[0].Address.String(), fmt.Sprintf("--%s=json", flags.FlagOutput)}, - expCmdOutput: fmt.Sprintf("%s --output=json", accounts[0].Address.String()), - }, - { - name: "text output", - args: []string{accounts[0].Address.String(), fmt.Sprintf("--%s=text", flags.FlagOutput)}, - expCmdOutput: fmt.Sprintf("%s --output=text", accounts[0].Address.String()), - }, - } - - for _, tc := range testCases { - s.Run(tc.name, func() { - cmd := cli.QueryVotesByVoterCmd() - - ctx := svrcmd.CreateExecuteContext(context.Background()) - - cmd.SetOut(io.Discard) - s.Require().NotNil(cmd) - - cmd.SetContext(ctx) - cmd.SetArgs(tc.args) - s.Require().NoError(client.SetCmdClientContextHandler(s.baseCtx, cmd)) - - s.Require().Contains(fmt.Sprint(cmd), "votes-by-voter [voter] [] [] Query for votes by voter account address with pagination flags") - s.Require().Contains(fmt.Sprint(cmd), tc.expCmdOutput) - }) - } -} - -func (s *CLITestSuite) TestQueryGroupsByMembers() { - accounts := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) - - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - name: "json output", - args: []string{accounts[0].Address.String(), fmt.Sprintf("--%s=json", flags.FlagOutput)}, - expCmdOutput: fmt.Sprintf("%s --output=json", accounts[0].Address.String()), - }, - { - name: "text output", - args: []string{accounts[0].Address.String(), fmt.Sprintf("--%s=text", flags.FlagOutput)}, - expCmdOutput: fmt.Sprintf("%s --output=text", accounts[0].Address.String()), - }, - } - - for _, tc := range testCases { - s.Run(tc.name, func() { - cmd := cli.QueryGroupsByMemberCmd() - - ctx := svrcmd.CreateExecuteContext(context.Background()) - - cmd.SetOut(io.Discard) - s.Require().NotNil(cmd) - - cmd.SetContext(ctx) - cmd.SetArgs(tc.args) - s.Require().NoError(client.SetCmdClientContextHandler(s.baseCtx, cmd)) - - s.Require().Contains(fmt.Sprint(cmd), "groups-by-member [address] [] [] Query for groups by member address with pagination flags") - s.Require().Contains(fmt.Sprint(cmd), tc.expCmdOutput) - }) - } -} diff --git a/x/group/client/cli/tx.go b/x/group/client/cli/tx.go index 172f64564b05..59c71073f678 100644 --- a/x/group/client/cli/tx.go +++ b/x/group/client/cli/tx.go @@ -6,9 +6,10 @@ import ( "strconv" "strings" - "cosmossdk.io/core/address" "github.com/spf13/cobra" + "cosmossdk.io/core/address" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" @@ -588,13 +589,13 @@ Parameters: "from_address": "cosmos1...", "to_address": "cosmos1...", "amount":[{"denom": "stake","amount": "10"}] - "title": "My proposal", - "summary": "This is a proposal to send 10 stake to cosmos1...", } ], // metadata can be any of base64 encoded, raw text, stringified json, IPFS link to json // see below for example metadata "metadata": "4pIMOgIGx1vZGU=", // base64-encoded metadata + "title": "My proposal", + "summary": "This is a proposal to send 10 stake to cosmos1...", "proposers": ["cosmos1...", "cosmos1..."], } @@ -650,7 +651,7 @@ metadata example: }, } - cmd.Flags().String(FlagExec, "", "Set to 1 to try to execute proposal immediately after creation (proposers signatures are considered as Yes votes)") + cmd.Flags().String(FlagExec, "", "Set to 1 or 'try' to try to execute proposal immediately after creation (proposers signatures are considered as Yes votes)") flags.AddTxFlagsToCmd(cmd) return cmd diff --git a/x/group/client/cli/tx_test.go b/x/group/client/cli/tx_test.go index 23b9aa5d6b71..cdf87fba7d2c 100644 --- a/x/group/client/cli/tx_test.go +++ b/x/group/client/cli/tx_test.go @@ -89,7 +89,7 @@ func (s *CLITestSuite) SetupSuite() { s.clientCtx, val.Address, account, - sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(2000))), address.NewBech32Codec("cosmos"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(2000))), address.NewBech32Codec("cosmos"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), ) diff --git a/x/group/client/cli/util.go b/x/group/client/cli/util.go index 65ad49425a54..2d91167adbbe 100644 --- a/x/group/client/cli/util.go +++ b/x/group/client/cli/util.go @@ -53,7 +53,7 @@ func parseMembers(membersFile string) ([]group.MemberRequest, error) { func execFromString(execStr string) group.Exec { exec := group.Exec_EXEC_UNSPECIFIED - if execStr == ExecTry { + if execStr == ExecTry || execStr == "1" { exec = group.Exec_EXEC_TRY } diff --git a/x/group/client/cli/util_test.go b/x/group/client/cli/util_test.go index 67b90ef3d65b..c883def2fa04 100644 --- a/x/group/client/cli/util_test.go +++ b/x/group/client/cli/util_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" ) -func Test_ParseCLIProposal(t *testing.T) { +func TestParseCLIProposal(t *testing.T) { data := []byte(`{ "group_policy_address": "cosmos15r295x4994egvckteam9skazy9kvfvzpak4naf", "messages": [ diff --git a/x/group/errors/orm.go b/x/group/errors/orm.go index 370abdb882b8..b0f1df156fe6 100644 --- a/x/group/errors/orm.go +++ b/x/group/errors/orm.go @@ -2,8 +2,8 @@ package errors import "cosmossdk.io/errors" -// mathCodespace is the codespace for all errors defined in orm package -const ormCodespace = "orm" +// ormCodespace is the codespace for all errors defined in orm package +const ormCodespace = "legacy_orm" var ( // ErrORMIteratorDone defines an error when an iterator is done diff --git a/x/group/genesis_test.go b/x/group/genesis_test.go index cf43ed699d41..ddfebf6ef28c 100644 --- a/x/group/genesis_test.go +++ b/x/group/genesis_test.go @@ -4,10 +4,11 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/stretchr/testify/require" ) var ( diff --git a/x/group/internal/orm/auto_uint64.go b/x/group/internal/orm/auto_uint64.go index 98b924f5533a..b3b6d22fc731 100644 --- a/x/group/internal/orm/auto_uint64.go +++ b/x/group/internal/orm/auto_uint64.go @@ -3,9 +3,8 @@ package orm import ( "github.com/cosmos/gogoproto/proto" - storetypes "cosmossdk.io/store/types" - "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" ) diff --git a/x/group/internal/orm/auto_uint64_test.go b/x/group/internal/orm/auto_uint64_test.go index 079b137c46c1..8f4108e6a5d8 100644 --- a/x/group/internal/orm/auto_uint64_test.go +++ b/x/group/internal/orm/auto_uint64_test.go @@ -4,11 +4,12 @@ import ( "math" "testing" - errorsmod "cosmossdk.io/errors" - storetypes "cosmossdk.io/store/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + errorsmod "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" diff --git a/x/group/internal/orm/genesis_test.go b/x/group/internal/orm/genesis_test.go index 58aa10d1a68f..72128c9e595c 100644 --- a/x/group/internal/orm/genesis_test.go +++ b/x/group/internal/orm/genesis_test.go @@ -3,9 +3,10 @@ package orm import ( "testing" - storetypes "cosmossdk.io/store/types" "github.com/stretchr/testify/require" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" diff --git a/x/group/internal/orm/index.go b/x/group/internal/orm/index.go index 7564f4705bec..27bb064af8b5 100644 --- a/x/group/internal/orm/index.go +++ b/x/group/internal/orm/index.go @@ -5,11 +5,10 @@ import ( "github.com/cosmos/gogoproto/proto" + errorsmod "cosmossdk.io/errors" "cosmossdk.io/store/prefix" "cosmossdk.io/store/types" - errorsmod "cosmossdk.io/errors" - "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/x/group/errors" ) diff --git a/x/group/internal/orm/index_property_test.go b/x/group/internal/orm/index_property_test.go index e48de3c12240..20b33546c5ae 100644 --- a/x/group/internal/orm/index_property_test.go +++ b/x/group/internal/orm/index_property_test.go @@ -3,9 +3,8 @@ package orm import ( "testing" - "pgregory.net/rapid" - "github.com/stretchr/testify/require" + "pgregory.net/rapid" ) func TestPrefixRangeProperty(t *testing.T) { diff --git a/x/group/internal/orm/index_test.go b/x/group/internal/orm/index_test.go index 4e2ec6becae3..a965190b647a 100644 --- a/x/group/internal/orm/index_test.go +++ b/x/group/internal/orm/index_test.go @@ -3,18 +3,17 @@ package orm import ( "testing" - storetypes "cosmossdk.io/store/types" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" errorsmod "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/x/group/errors" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) var _ Indexable = &nilRowGetterBuilder{} diff --git a/x/group/internal/orm/indexer.go b/x/group/internal/orm/indexer.go index a3600c6c8b4d..53f266b4146e 100644 --- a/x/group/internal/orm/indexer.go +++ b/x/group/internal/orm/indexer.go @@ -1,9 +1,8 @@ package orm import ( - storetypes "cosmossdk.io/store/types" - errorsmod "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/x/group/errors" ) diff --git a/x/group/internal/orm/indexer_test.go b/x/group/internal/orm/indexer_test.go index 18138cc97fed..0787bfc4abf8 100644 --- a/x/group/internal/orm/indexer_test.go +++ b/x/group/internal/orm/indexer_test.go @@ -5,12 +5,12 @@ import ( "fmt" "testing" - "cosmossdk.io/store/prefix" - storetypes "cosmossdk.io/store/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" errorsmod "cosmossdk.io/errors" + "cosmossdk.io/store/prefix" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/x/group/errors" ) diff --git a/x/group/internal/orm/iterator.go b/x/group/internal/orm/iterator.go index 7f96b6a4b907..6b3927b0949e 100644 --- a/x/group/internal/orm/iterator.go +++ b/x/group/internal/orm/iterator.go @@ -4,9 +4,10 @@ import ( "fmt" "reflect" - errorsmod "cosmossdk.io/errors" "github.com/cosmos/gogoproto/proto" + errorsmod "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/x/group/errors" ) diff --git a/x/group/internal/orm/orm_scenario_test.go b/x/group/internal/orm/orm_scenario_test.go index a8fc2c453cc6..f93fd76775bc 100644 --- a/x/group/internal/orm/orm_scenario_test.go +++ b/x/group/internal/orm/orm_scenario_test.go @@ -6,10 +6,11 @@ import ( "fmt" "testing" - storetypes "cosmossdk.io/store/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" diff --git a/x/group/internal/orm/primary_key.go b/x/group/internal/orm/primary_key.go index f8798589c6e8..5bf6a2b83995 100644 --- a/x/group/internal/orm/primary_key.go +++ b/x/group/internal/orm/primary_key.go @@ -1,9 +1,10 @@ package orm import ( - storetypes "cosmossdk.io/store/types" "github.com/cosmos/gogoproto/proto" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" ) diff --git a/x/group/internal/orm/primary_key_property_test.go b/x/group/internal/orm/primary_key_property_test.go index 3ed443be617f..2cdc39b2b4ce 100644 --- a/x/group/internal/orm/primary_key_property_test.go +++ b/x/group/internal/orm/primary_key_property_test.go @@ -3,14 +3,14 @@ package orm import ( "testing" + "github.com/stretchr/testify/require" + "pgregory.net/rapid" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" - - "github.com/stretchr/testify/require" - "pgregory.net/rapid" ) func TestPrimaryKeyTable(t *testing.T) { @@ -37,7 +37,7 @@ func testPrimaryKeyMachine(t *rapid.T) { // Create model state state := make(map[string]*testdata.TableModel) - t.Run(map[string]func(*rapid.T){ + t.Repeat(map[string]func(*rapid.T){ // Create is one of the model commands. It adds an object to the table, creating // an error if it already exists. "Create": func(t *rapid.T) { diff --git a/x/group/internal/orm/primary_key_test.go b/x/group/internal/orm/primary_key_test.go index f0fef3c142ac..d53a17c8cde7 100644 --- a/x/group/internal/orm/primary_key_test.go +++ b/x/group/internal/orm/primary_key_test.go @@ -3,17 +3,16 @@ package orm import ( "testing" - errorsmod "cosmossdk.io/errors" - storetypes "cosmossdk.io/store/types" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + errorsmod "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/x/group/errors" - "github.com/cosmos/cosmos-sdk/testutil/testdata" + "github.com/cosmos/cosmos-sdk/x/group/errors" ) func TestPrimaryKeyTablePrefixScan(t *testing.T) { diff --git a/x/group/internal/orm/sequence_property_test.go b/x/group/internal/orm/sequence_property_test.go index 33d47e2e7d23..ac73762d5528 100644 --- a/x/group/internal/orm/sequence_property_test.go +++ b/x/group/internal/orm/sequence_property_test.go @@ -3,10 +3,10 @@ package orm import ( "testing" - storetypes "cosmossdk.io/store/types" - "github.com/stretchr/testify/require" "pgregory.net/rapid" + + storetypes "cosmossdk.io/store/types" ) func TestSequence(t *testing.T) { @@ -30,7 +30,7 @@ func testSequenceMachine(t *rapid.T) { // Create model state state := initSeqVal - t.Run(map[string]func(*rapid.T){ + t.Repeat(map[string]func(*rapid.T){ // NextVal is one of the model commands. It checks that the next value of the // sequence matches the model and increments the model state. "NextVal": func(t *rapid.T) { diff --git a/x/group/internal/orm/sequence_test.go b/x/group/internal/orm/sequence_test.go index a14cfba7e1c0..dbecfcb34716 100644 --- a/x/group/internal/orm/sequence_test.go +++ b/x/group/internal/orm/sequence_test.go @@ -3,10 +3,11 @@ package orm import ( "testing" - storetypes "cosmossdk.io/store/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/x/group/errors" ) diff --git a/x/group/internal/orm/testsupport.go b/x/group/internal/orm/testsupport.go index bd0f1b06c754..b4fe3d0354ee 100644 --- a/x/group/internal/orm/testsupport.go +++ b/x/group/internal/orm/testsupport.go @@ -3,9 +3,9 @@ package orm import ( "fmt" - "cosmossdk.io/log" dbm "github.com/cosmos/cosmos-db" + "cosmossdk.io/log" "cosmossdk.io/store" "cosmossdk.io/store/gaskv" "cosmossdk.io/store/metrics" diff --git a/x/group/internal/orm/types_test.go b/x/group/internal/orm/types_test.go index 091dadc7eb8f..afcc59853d8a 100644 --- a/x/group/internal/orm/types_test.go +++ b/x/group/internal/orm/types_test.go @@ -4,11 +4,12 @@ import ( "reflect" "testing" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + errorsmod "cosmossdk.io/errors" "cosmossdk.io/store/prefix" storetypes "cosmossdk.io/store/types" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/x/group/keeper/grpc_query.go b/x/group/keeper/grpc_query.go index eed68bc46af4..2c036bdedf4a 100644 --- a/x/group/keeper/grpc_query.go +++ b/x/group/keeper/grpc_query.go @@ -39,6 +39,11 @@ func (k Keeper) getGroupInfo(ctx sdk.Context, id uint64) (group.GroupInfo, error // GroupPolicyInfo queries info about a group policy. func (k Keeper) GroupPolicyInfo(goCtx context.Context, request *group.QueryGroupPolicyInfoRequest) (*group.QueryGroupPolicyInfoResponse, error) { + _, err := k.accKeeper.AddressCodec().StringToBytes(request.Address) + if err != nil { + return nil, err + } + ctx := sdk.UnwrapSDKContext(goCtx) groupPolicyInfo, err := k.getGroupPolicyInfo(ctx, request.Address) if err != nil { diff --git a/x/group/keeper/grpc_query_test.go b/x/group/keeper/grpc_query_test.go index f5e7b07a1384..f71f86a84e6a 100644 --- a/x/group/keeper/grpc_query_test.go +++ b/x/group/keeper/grpc_query_test.go @@ -3,6 +3,7 @@ package keeper_test import ( "context" "testing" + "time" "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" @@ -25,7 +26,16 @@ import ( grouptestutil "github.com/cosmos/cosmos-sdk/x/group/testutil" ) -func initKeeper(t *testing.T) (types.Context, groupkeeper.Keeper, []types.AccAddress, group.QueryClient) { +type fixture struct { + ctx types.Context + keeper groupkeeper.Keeper + queryClient group.QueryClient + addrs []types.AccAddress + defaultGroup *group.MsgCreateGroupWithPolicyResponse +} + +func initKeeper(t *testing.T) *fixture { + t.Helper() var ( groupKeeper groupkeeper.Keeper interfaceRegistry codectypes.InterfaceRegistry @@ -52,80 +62,329 @@ func initKeeper(t *testing.T) (types.Context, groupkeeper.Keeper, []types.AccAdd } accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec("cosmos")).AnyTimes() - groupKeeper = groupkeeper.NewKeeper(key, encCfg.Codec, bApp.MsgServiceRouter(), accountKeeper, group.DefaultConfig()) + // group policy expected calls + accountKeeper.EXPECT().GetAccount(gomock.Any(), gomock.Any()).Return(nil).AnyTimes() + accountKeeper.EXPECT().NewAccount(gomock.Any(), gomock.Any()).Return(nil).AnyTimes() + accountKeeper.EXPECT().SetAccount(gomock.Any(), gomock.Any()).AnyTimes() + groupKeeper = groupkeeper.NewKeeper(key, encCfg.Codec, bApp.MsgServiceRouter(), accountKeeper, group.DefaultConfig()) queryHelper := baseapp.NewQueryServerTestHelper(ctx, interfaceRegistry) group.RegisterQueryServer(queryHelper, groupKeeper) queryClient := group.NewQueryClient(queryHelper) - return ctx, groupKeeper, addrs, queryClient + msgGroupAndPolicy := &group.MsgCreateGroupWithPolicy{ + Admin: addrs[0].String(), + Members: []group.MemberRequest{ + {Address: addrs[1].String(), Weight: "1"}, + {Address: addrs[3].String(), Weight: "2"}, + }, + } + err := msgGroupAndPolicy.SetDecisionPolicy(group.NewThresholdDecisionPolicy("2", time.Second, 20)) + require.NoError(t, err) + + resp, err := groupKeeper.CreateGroupWithPolicy(ctx, msgGroupAndPolicy) + require.NoError(t, err) + + return &fixture{ + ctx: ctx, + keeper: groupKeeper, + queryClient: queryClient, + addrs: addrs, + defaultGroup: resp, + } } -func TestQueryGroupsByMember(t *testing.T) { - ctx, groupKeeper, addrs, queryClient := initKeeper(t) +func TestQueryGroupInfo(t *testing.T) { + fixture := initKeeper(t) - // Initial group, group policy and balance setup - members := []group.MemberRequest{ - {Address: addrs[2].String(), Weight: "1"}, {Address: addrs[3].String(), Weight: "2"}, + testCases := []struct { + name string + req group.QueryGroupInfoRequest + expErrMsg string + }{ + { + name: "invalid req", + expErrMsg: "group: not found", + }, + { + name: "unknown id", + req: group.QueryGroupInfoRequest{GroupId: 20}, + expErrMsg: "group: not found", + }, + { + name: "valid id", + req: group.QueryGroupInfoRequest{GroupId: 1}, + expErrMsg: "", + }, } - _, err := groupKeeper.CreateGroup(ctx, &group.MsgCreateGroup{ - Admin: addrs[0].String(), - Members: members, - }) - require.NoError(t, err) + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + _, err := fixture.queryClient.GroupInfo(fixture.ctx, &tc.req) + if tc.expErrMsg != "" { + require.Error(t, err) + require.Contains(t, err.Error(), tc.expErrMsg) + } else { + require.NoError(t, err) + } + }) + } +} + +func TestQueryGroupPolicyInfo(t *testing.T) { + fixture := initKeeper(t) + + testCases := []struct { + name string + req group.QueryGroupPolicyInfoRequest + expErrMsg string + }{ + { + name: "valid address", + req: group.QueryGroupPolicyInfoRequest{Address: fixture.defaultGroup.GroupPolicyAddress}, + expErrMsg: "", + }, + { + name: "unexisting address", + req: group.QueryGroupPolicyInfoRequest{Address: fixture.addrs[5].String()}, + expErrMsg: "group policy: not found", + }, + { + name: "invalid address", + req: group.QueryGroupPolicyInfoRequest{Address: "invalid address"}, + expErrMsg: "decoding bech32 failed", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + _, err := fixture.queryClient.GroupPolicyInfo(fixture.ctx, &tc.req) + if tc.expErrMsg != "" { + require.Error(t, err) + require.Contains(t, err.Error(), tc.expErrMsg) + } else { + require.NoError(t, err) + } + }) + } +} + +func TestQueryGroupMembers(t *testing.T) { + fixture := initKeeper(t) + + testCases := []struct { + name string + req group.QueryGroupMembersRequest + postRun func(resp *group.QueryGroupMembersResponse) + expErrMsg string + }{ + { + name: "valid group", + req: group.QueryGroupMembersRequest{GroupId: 1}, + postRun: func(resp *group.QueryGroupMembersResponse) { + require.Len(t, resp.Members, 2) + }, + expErrMsg: "", + }, + { + name: "unexisting group", + req: group.QueryGroupMembersRequest{GroupId: 20}, + postRun: func(resp *group.QueryGroupMembersResponse) { + require.Len(t, resp.Members, 0) + }, + expErrMsg: "", + }, + } - members = []group.MemberRequest{ - {Address: addrs[3].String(), Weight: "1"}, {Address: addrs[4].String(), Weight: "2"}, + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + resp, err := fixture.queryClient.GroupMembers(fixture.ctx, &tc.req) + if tc.expErrMsg != "" { + require.Error(t, err) + require.Contains(t, err.Error(), tc.expErrMsg) + } else { + require.NoError(t, err) + } + + if tc.postRun != nil { + tc.postRun(resp) + } + }) } - _, err = groupKeeper.CreateGroup(ctx, &group.MsgCreateGroup{ - Admin: addrs[1].String(), +} + +func TestQueryGroupsByAdmin(t *testing.T) { + fixture := initKeeper(t) + + testCases := []struct { + name string + req group.QueryGroupsByAdminRequest + postRun func(resp *group.QueryGroupsByAdminResponse) + expErrMsg string + }{ + { + name: "valid admin", + req: group.QueryGroupsByAdminRequest{Admin: fixture.addrs[0].String()}, + postRun: func(resp *group.QueryGroupsByAdminResponse) { require.Len(t, resp.Groups, 1) }, + expErrMsg: "", + }, + { + name: "unexisting address", + req: group.QueryGroupsByAdminRequest{Admin: fixture.addrs[5].String()}, + postRun: func(resp *group.QueryGroupsByAdminResponse) { require.Len(t, resp.Groups, 0) }, + expErrMsg: "", + }, + { + name: "invalid address", + req: group.QueryGroupsByAdminRequest{Admin: "invalid address"}, + expErrMsg: "decoding bech32 failed", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + resp, err := fixture.queryClient.GroupsByAdmin(fixture.ctx, &tc.req) + if tc.expErrMsg != "" { + require.Error(t, err) + require.Contains(t, err.Error(), tc.expErrMsg) + } else { + require.NoError(t, err) + } + + if tc.postRun != nil { + tc.postRun(resp) + } + }) + } +} + +func TestQueryGroupPoliciesByGroup(t *testing.T) { + fixture := initKeeper(t) + + testCases := []struct { + name string + req group.QueryGroupPoliciesByGroupRequest + postRun func(resp *group.QueryGroupPoliciesByGroupResponse) + expErrMsg string + }{ + { + name: "valid group", + req: group.QueryGroupPoliciesByGroupRequest{GroupId: 1}, + postRun: func(resp *group.QueryGroupPoliciesByGroupResponse) { require.Len(t, resp.GroupPolicies, 1) }, + expErrMsg: "", + }, + { + name: "unexisting group", + req: group.QueryGroupPoliciesByGroupRequest{GroupId: 20}, + postRun: func(resp *group.QueryGroupPoliciesByGroupResponse) { require.Len(t, resp.GroupPolicies, 0) }, + expErrMsg: "", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + resp, err := fixture.keeper.GroupPoliciesByGroup(fixture.ctx, &tc.req) + if tc.expErrMsg != "" { + require.Error(t, err) + require.Contains(t, err.Error(), tc.expErrMsg) + } else { + require.NoError(t, err) + } + + if tc.postRun != nil { + tc.postRun(resp) + } + }) + } +} + +func TestQueryGroupPoliciesByAdmin(t *testing.T) { + fixture := initKeeper(t) + + testCases := []struct { + name string + req group.QueryGroupPoliciesByAdminRequest + postRun func(resp *group.QueryGroupPoliciesByAdminResponse) + expErrMsg string + }{ + { + name: "valid admin", + req: group.QueryGroupPoliciesByAdminRequest{Admin: fixture.addrs[0].String()}, + postRun: func(resp *group.QueryGroupPoliciesByAdminResponse) { require.Len(t, resp.GroupPolicies, 1) }, + expErrMsg: "", + }, + { + name: "unexisting address", + req: group.QueryGroupPoliciesByAdminRequest{Admin: fixture.addrs[5].String()}, + postRun: func(resp *group.QueryGroupPoliciesByAdminResponse) { require.Len(t, resp.GroupPolicies, 0) }, + expErrMsg: "", + }, + { + name: "invalid address", + req: group.QueryGroupPoliciesByAdminRequest{Admin: "invalid address"}, + expErrMsg: "decoding bech32 failed", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + resp, err := fixture.keeper.GroupPoliciesByAdmin(fixture.ctx, &tc.req) + if tc.expErrMsg != "" { + require.Error(t, err) + require.Contains(t, err.Error(), tc.expErrMsg) + } else { + require.NoError(t, err) + } + + if tc.postRun != nil { + tc.postRun(resp) + } + }) + } +} + +func TestQueryGroupsByMember(t *testing.T) { + fixture := initKeeper(t) + + members := []group.MemberRequest{ + {Address: fixture.addrs[3].String(), Weight: "1"}, {Address: fixture.addrs[4].String(), Weight: "2"}, + } + _, err := fixture.keeper.CreateGroup(fixture.ctx, &group.MsgCreateGroup{ + Admin: fixture.addrs[1].String(), Members: members, }) require.NoError(t, err) // not part of any group - resp, err := queryClient.GroupsByMember(context.Background(), &group.QueryGroupsByMemberRequest{ - Address: addrs[5].String(), + resp, err := fixture.queryClient.GroupsByMember(context.Background(), &group.QueryGroupsByMemberRequest{ + Address: fixture.addrs[5].String(), }) require.NoError(t, err) require.Len(t, resp.Groups, 0) // expect one group - resp, err = queryClient.GroupsByMember(context.Background(), &group.QueryGroupsByMemberRequest{ - Address: addrs[4].String(), + resp, err = fixture.queryClient.GroupsByMember(context.Background(), &group.QueryGroupsByMemberRequest{ + Address: fixture.addrs[4].String(), }) require.NoError(t, err) require.Len(t, resp.Groups, 1) // expect two groups - resp, err = queryClient.GroupsByMember(context.Background(), &group.QueryGroupsByMemberRequest{ - Address: addrs[3].String(), + resp, err = fixture.queryClient.GroupsByMember(context.Background(), &group.QueryGroupsByMemberRequest{ + Address: fixture.addrs[3].String(), }) require.NoError(t, err) require.Len(t, resp.Groups, 2) } func TestQueryGroups(t *testing.T) { - ctx, groupKeeper, addrs, queryClient := initKeeper(t) + fixture := initKeeper(t) - // Initial group, group policy and balance setup members := []group.MemberRequest{ - {Address: addrs[1].String(), Weight: "1"}, - {Address: addrs[3].String(), Weight: "2"}, - } - - _, err := groupKeeper.CreateGroup(ctx, &group.MsgCreateGroup{ - Admin: addrs[0].String(), - Members: members, - }) - require.NoError(t, err) - - members = []group.MemberRequest{ - {Address: addrs[3].String(), Weight: "1"}, + {Address: fixture.addrs[3].String(), Weight: "1"}, } - _, err = groupKeeper.CreateGroup(ctx, &group.MsgCreateGroup{ - Admin: addrs[2].String(), + _, err := fixture.keeper.CreateGroup(fixture.ctx, &group.MsgCreateGroup{ + Admin: fixture.addrs[2].String(), Members: members, }) require.NoError(t, err) @@ -157,7 +416,7 @@ func TestQueryGroups(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - resp, err := queryClient.Groups(context.Background(), &group.QueryGroupsRequest{ + resp, err := fixture.queryClient.Groups(context.Background(), &group.QueryGroupsRequest{ Pagination: &query.PageRequest{ Limit: tc.itemsPerPage, }, diff --git a/x/group/keeper/invariants_test.go b/x/group/keeper/invariants_test.go index 14ce082ef480..0136acc6f801 100644 --- a/x/group/keeper/invariants_test.go +++ b/x/group/keeper/invariants_test.go @@ -3,13 +3,14 @@ package keeper_test import ( "testing" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + dbm "github.com/cosmos/cosmos-db" + "github.com/stretchr/testify/suite" + "cosmossdk.io/log" "cosmossdk.io/store" "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" - dbm "github.com/cosmos/cosmos-db" - "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/x/group/keeper/keeper.go b/x/group/keeper/keeper.go index b888d11dcca8..4a79e7303348 100644 --- a/x/group/keeper/keeper.go +++ b/x/group/keeper/keeper.go @@ -4,12 +4,10 @@ import ( "fmt" "time" + errorsmod "cosmossdk.io/errors" "cosmossdk.io/log" - storetypes "cosmossdk.io/store/types" - errorsmod "cosmossdk.io/errors" - "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/group/keeper/msg_server.go b/x/group/keeper/msg_server.go index b60e29eaa4cf..b36215a75e60 100644 --- a/x/group/keeper/msg_server.go +++ b/x/group/keeper/msg_server.go @@ -13,12 +13,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/cosmos-sdk/x/group" "github.com/cosmos/cosmos-sdk/x/group/errors" "github.com/cosmos/cosmos-sdk/x/group/internal/math" "github.com/cosmos/cosmos-sdk/x/group/internal/orm" - - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" ) var _ group.MsgServer = Keeper{} @@ -430,6 +429,10 @@ func (k Keeper) UpdateGroupPolicyAdmin(goCtx context.Context, msg *group.MsgUpda return nil, errorsmod.Wrap(errors.ErrInvalid, "new and old admin are same") } + if _, err := k.accKeeper.AddressCodec().StringToBytes(msg.NewAdmin); err != nil { + return nil, errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "new admin address") + } + ctx := sdk.UnwrapSDKContext(goCtx) action := func(groupPolicy *group.GroupPolicyInfo) error { groupPolicy.Admin = msg.NewAdmin @@ -522,7 +525,7 @@ func (k Keeper) SubmitProposal(goCtx context.Context, msg *group.MsgSubmitPropos return nil, err } - if err := k.assertMetadataLength(msg.Summary, "proposal summary"); err != nil { + if err := k.assertSummaryLength(msg.Summary); err != nil { return nil, err } @@ -1063,6 +1066,15 @@ func (k Keeper) assertMetadataLength(metadata, description string) error { return nil } +// assertSummaryLength returns an error if given summary length +// is greater than a pre-defined 40*MaxMetadataLen. +func (k Keeper) assertSummaryLength(summary string) error { + if summary != "" && uint64(len(summary)) > 40*k.config.MaxMetadataLen { + return errorsmod.Wrapf(errors.ErrMaxLimit, "proposal summary is too long") + } + return nil +} + // validateDecisionPolicies loops through all decision policies from the group, // and calls each of their Validate() method. func (k Keeper) validateDecisionPolicies(ctx sdk.Context, g group.GroupInfo) error { diff --git a/x/group/keeper/msg_server_test.go b/x/group/keeper/msg_server_test.go index 70e0e6809bd0..32b058523791 100644 --- a/x/group/keeper/msg_server_test.go +++ b/x/group/keeper/msg_server_test.go @@ -8,9 +8,8 @@ import ( "strings" "time" - "github.com/golang/mock/gomock" - abci "github.com/cometbft/cometbft/abci/types" + "github.com/golang/mock/gomock" "github.com/cosmos/cosmos-sdk/codec/address" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" @@ -662,6 +661,15 @@ func (s *TestSuite) TestUpdateGroupAdmin() { CreatedAt: s.blockTime, }, }, + "with invalid new admin address": { + req: &group.MsgUpdateGroupAdmin{ + GroupId: groupID, + Admin: oldAdmin, + NewAdmin: "%s", + }, + expErr: true, + expErrMsg: "new admin address", + }, } for msg, spec := range specs { spec := spec @@ -1216,6 +1224,23 @@ func (s *TestSuite) TestUpdateGroupPolicyAdmin() { }, expErr: false, }, + "with invalid new admin address": { + req: &group.MsgUpdateGroupPolicyAdmin{ + Admin: admin.String(), + GroupPolicyAddress: groupPolicyAddr, + NewAdmin: "%s", + }, + expGroupPolicy: &group.GroupPolicyInfo{ + Admin: admin.String(), + Address: groupPolicyAddr, + GroupId: myGroupID, + Version: 2, + DecisionPolicy: nil, + CreatedAt: s.blockTime, + }, + expErr: true, + expErrMsg: "new admin address", + }, } for msg, spec := range specs { spec := spec @@ -1743,6 +1768,17 @@ func (s *TestSuite) TestSubmitProposal() { expErrMsg: "limit exceeded", postRun: func(sdkCtx sdk.Context) {}, }, + "summary too long": { + req: &group.MsgSubmitProposal{ + GroupPolicyAddress: accountAddr.String(), + Proposers: []string{addr2.String()}, + Metadata: "{\"title\":\"title\",\"summary\":\"description\"}", + Summary: strings.Repeat("a", 256*40), + }, + expErr: true, + expErrMsg: "limit exceeded", + postRun: func(sdkCtx sdk.Context) {}, + }, "group policy required": { req: &group.MsgSubmitProposal{ Proposers: []string{addr2.String()}, diff --git a/x/group/keeper/proposal_executor.go b/x/group/keeper/proposal_executor.go index 8f2b9165f5aa..ecbda22ced12 100644 --- a/x/group/keeper/proposal_executor.go +++ b/x/group/keeper/proposal_executor.go @@ -76,7 +76,7 @@ func ensureMsgAuthZ(msgs []sdk.Msg, groupPolicyAcc sdk.AccAddress, cdc codec.Cod for _, acct := range signers { if !bytes.Equal(groupPolicyAcc, acct) { - return errorsmod.Wrapf(sdkerrors.ErrUnauthorized, "msg does not have group policy authorization; expected %s, got %s", groupPolicyAcc.String(), acct) + return errorsmod.Wrapf(sdkerrors.ErrUnauthorized, "msg does not have group policy authorization; expected %s, got %s", groupPolicyAcc.String(), sdk.AccAddress(acct).String()) } } } diff --git a/x/group/migrations/v2/migrate.go b/x/group/migrations/v2/migrate.go index a1fc4fcc1e27..550ae51802a3 100644 --- a/x/group/migrations/v2/migrate.go +++ b/x/group/migrations/v2/migrate.go @@ -48,8 +48,13 @@ func Migrate( } for _, policy := range groupPolicies { + addr, err := accountKeeper.AddressCodec().StringToBytes(policy.Address) + if err != nil { + return fmt.Errorf("failed to convert group policy account address: %w", err) + } + // get the account address by acc id - oldAcc := accountKeeper.GetAccount(ctx, sdk.MustAccAddressFromBech32(policy.Address)) + oldAcc := accountKeeper.GetAccount(ctx, addr) // remove the old account accountKeeper.RemoveAccount(ctx, oldAcc) diff --git a/x/group/migrations/v2/migrate_test.go b/x/group/migrations/v2/migrate_test.go index 169665ce9f12..66810076dd37 100644 --- a/x/group/migrations/v2/migrate_test.go +++ b/x/group/migrations/v2/migrate_test.go @@ -8,6 +8,7 @@ import ( storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" @@ -78,7 +79,7 @@ func createGroupPolicies(ctx sdk.Context, storeKey storetypes.StoreKey, cdc code // createOldPolicyAccount re-creates the group policy account using a module account func createOldPolicyAccount(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.Codec, policies []sdk.AccAddress) ([]*authtypes.ModuleAccount, group.AccountKeeper) { - accountKeeper := authkeeper.NewAccountKeeper(cdc, runtime.NewKVStoreService(storeKey.(*storetypes.KVStoreKey)), authtypes.ProtoBaseAccount, nil, sdk.Bech32MainPrefix, authorityAddr.String()) + accountKeeper := authkeeper.NewAccountKeeper(cdc, runtime.NewKVStoreService(storeKey.(*storetypes.KVStoreKey)), authtypes.ProtoBaseAccount, nil, addresscodec.NewBech32Codec(sdk.Bech32MainPrefix), sdk.Bech32MainPrefix, authorityAddr.String()) oldPolicyAccounts := make([]*authtypes.ModuleAccount, len(policies)) for i, policyAddr := range policies { diff --git a/x/group/module/abci_test.go b/x/group/module/abci_test.go index 136536b1a9dd..06cd5c883b63 100644 --- a/x/group/module/abci_test.go +++ b/x/group/module/abci_test.go @@ -5,14 +5,15 @@ import ( "testing" "time" - "cosmossdk.io/core/address" - "cosmossdk.io/depinject" - "cosmossdk.io/log" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" cmttime "github.com/cometbft/cometbft/types/time" "github.com/stretchr/testify/suite" + "cosmossdk.io/core/address" + "cosmossdk.io/depinject" + "cosmossdk.io/log" + "cosmossdk.io/math" + codecaddress "github.com/cosmos/cosmos-sdk/codec/address" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" @@ -65,7 +66,7 @@ func (s *IntegrationTestSuite) SetupTest() { s.ctx = ctx - s.addrs = simtestutil.AddTestAddrsIncremental(s.bankKeeper, s.stakingKeeper, ctx, 4, sdk.NewInt(30000000)) + s.addrs = simtestutil.AddTestAddrsIncremental(s.bankKeeper, s.stakingKeeper, ctx, 4, math.NewInt(30000000)) s.addressCodec = codecaddress.NewBech32Codec("cosmos") } diff --git a/x/group/module/autocli.go b/x/group/module/autocli.go new file mode 100644 index 000000000000..e51f310dfeed --- /dev/null +++ b/x/group/module/autocli.go @@ -0,0 +1,211 @@ +package module + +import ( + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + groupv1 "cosmossdk.io/api/cosmos/group/v1" +) + +// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: groupv1.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "GroupInfo", + Use: "group-info [group-id]", + Short: "Query for group info by group id", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "group_id"}, + }, + }, + { + RpcMethod: "GroupPolicyInfo", + Use: "group-policy-info [group-policy-account]", + Short: "Query for group policy info by account address of group policy", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "address"}, + }, + }, + { + RpcMethod: "GroupMembers", + Use: "group-members [group-id]", + Short: "Query for group members by group id", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "group_id"}, + }, + }, + { + RpcMethod: "GroupsByAdmin", + Use: "groups-by-admin [admin]", + Short: "Query for groups by admin account address", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "admin"}, + }, + }, + { + RpcMethod: "GroupPoliciesByGroup", + Use: "group-policies-by-group [group-id]", + Short: "Query for group policies by group id", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "group_id"}, + }, + }, + { + RpcMethod: "GroupPoliciesByAdmin", + Use: "group-policies-by-admin [admin]", + Short: "Query for group policies by admin account address", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "admin"}, + }, + }, + { + RpcMethod: "Proposal", + Use: "proposal [proposal-id]", + Short: "Query for proposal by id", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "proposal_id"}, + }, + }, + { + RpcMethod: "ProposalsByGroupPolicy", + Use: "proposals-by-group-policy [group-policy-account]", + Short: "Query for proposals by account address of group policy", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "address"}, + }, + }, + { + RpcMethod: "VoteByProposalVoter", + Use: "vote [proposal-id] [voter]", + Short: "Query for vote by proposal id and voter account address", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "proposal_id"}, + {ProtoField: "voter"}, + }, + }, + { + RpcMethod: "VotesByProposal", + Use: "votes-by-proposal [proposal-id]", + Short: "Query for votes by proposal id", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "proposal_id"}, + }, + }, + { + RpcMethod: "VotesByVoter", + Use: "votes-by-voter [voter]", + Short: "Query for votes by voter account address", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "voter"}, + }, + }, + { + RpcMethod: "GroupsByMember", + Use: "groups-by-member [address]", + Short: "Query for groups by member address", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "address"}, + }, + }, + { + RpcMethod: "TallyResult", + Use: "tally-result [proposal-id]", + Short: "Query tally result of proposal", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "proposal_id"}, + }, + }, + { + RpcMethod: "Groups", + Use: "groups", + Short: "Query for all groups on chain", + }, + }, + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: groupv1.Msg_ServiceDesc.ServiceName, + EnhanceCustomCommand: false, // use custom commands only until v0.51 + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "UpdateGroupAdmin", + Use: "update-group-admin [admin] [group-id] [new-admin]", + Short: "Update a group's admin", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "admin"}, {ProtoField: "group_id"}, {ProtoField: "new_admin"}, + }, + }, + { + RpcMethod: "UpdateGroupMetadata", + Use: "update-group-metadata [admin] [group-id] [metadata]", + Short: "Update a group's metadata", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "admin"}, {ProtoField: "group_id"}, {ProtoField: "metadata"}, + }, + }, + { + RpcMethod: "UpdateGroupPolicyAdmin", + Use: "update-group-policy-admin [admin] [group-policy-account] [new-admin]", + Short: "Update a group policy admin", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "admin"}, {ProtoField: "group_policy_address"}, {ProtoField: "new_admin"}, + }, + }, + { + RpcMethod: "UpdateGroupPolicyMetadata", + Use: "update-group-policy-metadata [admin] [group-policy-account] [new-metadata]", + Short: "Update a group policy metadata", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "admin"}, {ProtoField: "group_policy_address"}, {ProtoField: "metadata"}, + }, + }, + { + RpcMethod: "WithdrawProposal", + Use: "withdraw-proposal [proposal-id] [group-policy-admin-or-proposer]", + Short: "Withdraw a submitted proposal", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "proposal_id"}, {ProtoField: "address"}, + }, + }, + { + RpcMethod: "Vote", + Use: "vote [proposal-id] [voter] [vote-option] [metadata]", + Long: `Vote on a proposal. +Parameters: + proposal-id: unique ID of the proposal + voter: voter account addresses. + vote-option: choice of the voter(s) + VOTE_OPTION_UNSPECIFIED: no-op + VOTE_OPTION_NO: no + VOTE_OPTION_YES: yes + VOTE_OPTION_ABSTAIN: abstain + VOTE_OPTION_NO_WITH_VETO: no-with-veto + Metadata: metadata for the vote +`, + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "proposal_id"}, {ProtoField: "voter"}, {ProtoField: "option"}, {ProtoField: "metadata"}, + }, + FlagOptions: map[string]*autocliv1.FlagOptions{ + "exec": {Name: "exec", DefaultValue: "", Usage: "Set to 'try' for trying to execute proposal immediately after voting"}, + }, + }, + { + RpcMethod: "Exec", + Use: "exec [proposal-id]", + Short: "Execute a proposal", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "proposal_id"}, + }, + }, + { + RpcMethod: "LeaveGroup", + Use: "leave-group [member-address] [group-id]", + Short: "Remove member from the group", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "address"}, {ProtoField: "group_id"}, + }, + }, + }, + }, + } +} diff --git a/x/group/module/module.go b/x/group/module/module.go index 026ff85ab802..889d22ab1787 100644 --- a/x/group/module/module.go +++ b/x/group/module/module.go @@ -5,7 +5,6 @@ import ( "encoding/json" "fmt" - abci "github.com/cometbft/cometbft/abci/types" gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -13,7 +12,6 @@ import ( "cosmossdk.io/core/address" "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" - store "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/baseapp" @@ -33,8 +31,14 @@ import ( const ConsensusVersion = 2 var ( - _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModuleBasic = AppModule{} _ module.AppModuleSimulation = AppModule{} + _ module.HasGenesis = AppModule{} + _ module.HasServices = AppModule{} + _ module.HasInvariants = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasEndBlocker = AppModule{} ) type AppModule struct { @@ -56,11 +60,6 @@ func NewAppModule(cdc codec.Codec, keeper keeper.Keeper, ak group.AccountKeeper, } } -var ( - _ appmodule.AppModule = AppModule{} - _ appmodule.HasEndBlocker = AppModule{} -) - // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} @@ -92,11 +91,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config sdkclient.TxEn return data.Validate() } -// GetQueryCmd returns the cli query commands for the group module -func (a AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.QueryCmd(a.Name()) -} - // GetTxCmd returns the transaction commands for the group module func (a AppModuleBasic) GetTxCmd() *cobra.Command { return cli.TxCmd(a.Name(), a.ac) @@ -119,11 +113,6 @@ func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { group.RegisterLegacyAminoCodec(cdc) } -// Name returns the group module's name. -func (AppModule) Name() string { - return group.ModuleName -} - // RegisterInvariants does nothing, there are no invariants to enforce func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { keeper.RegisterInvariants(ir, am.keeper) @@ -131,9 +120,8 @@ func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { // InitGenesis performs genesis initialization for the group module. It returns // no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) { am.keeper.InitGenesis(ctx, cdc, data) - return []abci.ValidatorUpdate{} } // ExportGenesis returns the exported genesis state as raw bytes for the group diff --git a/x/group/msgs.go b/x/group/msgs.go index e8b58534923e..59793d79adb3 100644 --- a/x/group/msgs.go +++ b/x/group/msgs.go @@ -3,8 +3,6 @@ package group import ( "github.com/cosmos/gogoproto/proto" - errorsmod "cosmossdk.io/errors" - "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -34,49 +32,21 @@ var ( _ types.UnpackInterfacesMessage = MsgCreateGroupWithPolicy{} ) -// GetSigners returns the expected signers for a MsgCreateGroup. -func (m MsgCreateGroup) GetSigners() []sdk.AccAddress { - admin := sdk.MustAccAddressFromBech32(m.Admin) - - return []sdk.AccAddress{admin} -} - -// GetSigners returns the expected signers for a MsgUpdateGroupAdmin. -func (m MsgUpdateGroupAdmin) GetSigners() []sdk.AccAddress { - admin := sdk.MustAccAddressFromBech32(m.Admin) - - return []sdk.AccAddress{admin} -} - -// GetGroupID gets the group id of the MsgUpdateGroupAdmin. -func (m *MsgUpdateGroupAdmin) GetGroupID() uint64 { - return m.GroupId -} - -// GetSigners returns the expected signers for a MsgUpdateGroupMetadata. -func (m MsgUpdateGroupMetadata) GetSigners() []sdk.AccAddress { - admin := sdk.MustAccAddressFromBech32(m.Admin) - - return []sdk.AccAddress{admin} -} - // GetGroupID gets the group id of the MsgUpdateGroupMetadata. func (m *MsgUpdateGroupMetadata) GetGroupID() uint64 { return m.GroupId } -// GetSigners returns the expected signers for a MsgUpdateGroupMembers. -func (m MsgUpdateGroupMembers) GetSigners() []sdk.AccAddress { - admin := sdk.MustAccAddressFromBech32(m.Admin) - - return []sdk.AccAddress{admin} -} - // GetGroupID gets the group id of the MsgUpdateGroupMembers. func (m *MsgUpdateGroupMembers) GetGroupID() uint64 { return m.GroupId } +// GetGroupID gets the group id of the MsgUpdateGroupAdmin. +func (m *MsgUpdateGroupAdmin) GetGroupID() uint64 { + return m.GroupId +} + // NewMsgCreateGroupWithPolicy creates a new MsgCreateGroupWithPolicy. func NewMsgCreateGroupWithPolicy(admin string, members []MemberRequest, groupMetadata, groupPolicyMetadata string, groupPolicyAsAdmin bool, decisionPolicy DecisionPolicy) (*MsgCreateGroupWithPolicy, error) { m := &MsgCreateGroupWithPolicy{ @@ -118,25 +88,6 @@ func (m MsgCreateGroupWithPolicy) UnpackInterfaces(unpacker types.AnyUnpacker) e return unpacker.UnpackAny(m.DecisionPolicy, &decisionPolicy) } -// GetSigners returns the expected signers for a MsgCreateGroupWithPolicy. -func (m MsgCreateGroupWithPolicy) GetSigners() []sdk.AccAddress { - admin := sdk.MustAccAddressFromBech32(m.Admin) - return []sdk.AccAddress{admin} -} - -// GetSigners returns the expected signers for a MsgCreateGroupPolicy. -func (m MsgCreateGroupPolicy) GetSigners() []sdk.AccAddress { - admin := sdk.MustAccAddressFromBech32(m.Admin) - return []sdk.AccAddress{admin} -} - -// GetSigners returns the expected signers for a MsgUpdateGroupPolicyAdmin. -func (m MsgUpdateGroupPolicyAdmin) GetSigners() []sdk.AccAddress { - admin := sdk.MustAccAddressFromBech32(m.Admin) - - return []sdk.AccAddress{admin} -} - // NewMsgUpdateGroupPolicyDecisionPolicy creates a new MsgUpdateGroupPolicyDecisionPolicy. func NewMsgUpdateGroupPolicyDecisionPolicy(admin, address sdk.AccAddress, decisionPolicy DecisionPolicy) (*MsgUpdateGroupPolicyDecisionPolicy, error) { m := &MsgUpdateGroupPolicyDecisionPolicy{ @@ -164,13 +115,6 @@ func (m *MsgUpdateGroupPolicyDecisionPolicy) SetDecisionPolicy(decisionPolicy De return nil } -// GetSigners returns the expected signers for a MsgUpdateGroupPolicyDecisionPolicy. -func (m MsgUpdateGroupPolicyDecisionPolicy) GetSigners() []sdk.AccAddress { - admin := sdk.MustAccAddressFromBech32(m.Admin) - - return []sdk.AccAddress{admin} -} - // GetDecisionPolicy gets the decision policy of MsgUpdateGroupPolicyDecisionPolicy. func (m *MsgUpdateGroupPolicyDecisionPolicy) GetDecisionPolicy() (DecisionPolicy, error) { decisionPolicy, ok := m.DecisionPolicy.GetCachedValue().(DecisionPolicy) @@ -187,13 +131,6 @@ func (m MsgUpdateGroupPolicyDecisionPolicy) UnpackInterfaces(unpacker types.AnyU return unpacker.UnpackAny(m.DecisionPolicy, &decisionPolicy) } -// GetSigners returns the expected signers for a MsgUpdateGroupPolicyMetadata. -func (m MsgUpdateGroupPolicyMetadata) GetSigners() []sdk.AccAddress { - admin := sdk.MustAccAddressFromBech32(m.Admin) - - return []sdk.AccAddress{admin} -} - // NewMsgCreateGroupPolicy creates a new MsgCreateGroupPolicy. func NewMsgCreateGroupPolicy(admin sdk.AccAddress, group uint64, metadata string, decisionPolicy DecisionPolicy) (*MsgCreateGroupPolicy, error) { m := &MsgCreateGroupPolicy{ @@ -265,30 +202,6 @@ func NewMsgSubmitProposal(address string, proposers []string, msgs []sdk.Msg, me return m, nil } -// GetSigners returns the expected signers for a MsgSubmitProposal. -func (m MsgSubmitProposal) GetSigners() []sdk.AccAddress { - addrs, err := m.getProposerAccAddresses() - if err != nil { - panic(err) - } - - return addrs -} - -// getProposerAccAddresses returns the proposers as `[]sdk.AccAddress`. -func (m *MsgSubmitProposal) getProposerAccAddresses() ([]sdk.AccAddress, error) { - addrs := make([]sdk.AccAddress, len(m.Proposers)) - for i, proposer := range m.Proposers { - addr, err := sdk.AccAddressFromBech32(proposer) - if err != nil { - return nil, errorsmod.Wrap(err, "proposers") - } - addrs[i] = addr - } - - return addrs, nil -} - // SetMsgs packs msgs into Any's func (m *MsgSubmitProposal) SetMsgs(msgs []sdk.Msg) error { anys, err := tx.SetMsgs(msgs) @@ -308,31 +221,3 @@ func (m MsgSubmitProposal) GetMsgs() ([]sdk.Msg, error) { func (m MsgSubmitProposal) UnpackInterfaces(unpacker types.AnyUnpacker) error { return tx.UnpackInterfaces(unpacker, m.Messages) } - -// GetSigners returns the expected signers for a MsgWithdrawProposal. -func (m MsgWithdrawProposal) GetSigners() []sdk.AccAddress { - admin := sdk.MustAccAddressFromBech32(m.Address) - - return []sdk.AccAddress{admin} -} - -// GetSigners returns the expected signers for a MsgVote. -func (m MsgVote) GetSigners() []sdk.AccAddress { - addr := sdk.MustAccAddressFromBech32(m.Voter) - - return []sdk.AccAddress{addr} -} - -// GetSigners returns the expected signers for a MsgExec. -func (m MsgExec) GetSigners() []sdk.AccAddress { - signer := sdk.MustAccAddressFromBech32(m.Executor) - - return []sdk.AccAddress{signer} -} - -// GetSigners returns the expected signers for a MsgLeaveGroup -func (m MsgLeaveGroup) GetSigners() []sdk.AccAddress { - signer := sdk.MustAccAddressFromBech32(m.Address) - - return []sdk.AccAddress{signer} -} diff --git a/x/group/simulation/genesis.go b/x/group/simulation/genesis.go index e9396e3f1658..d5273b97bb0d 100644 --- a/x/group/simulation/genesis.go +++ b/x/group/simulation/genesis.go @@ -9,7 +9,6 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/cosmos/cosmos-sdk/x/group" ) diff --git a/x/group/simulation/genesis_test.go b/x/group/simulation/genesis_test.go index 58cc6c09b5b3..1ca2be16fb7f 100644 --- a/x/group/simulation/genesis_test.go +++ b/x/group/simulation/genesis_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/require" sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/types/module" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" diff --git a/x/group/simulation/operations.go b/x/group/simulation/operations.go index edb87acfd061..94576d36d615 100644 --- a/x/group/simulation/operations.go +++ b/x/group/simulation/operations.go @@ -14,10 +14,9 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/group" "github.com/cosmos/cosmos-sdk/x/group/keeper" "github.com/cosmos/cosmos-sdk/x/simulation" - - "github.com/cosmos/cosmos-sdk/x/group" ) var initialGroupID = uint64(100000000000000) @@ -1230,8 +1229,9 @@ func randomGroup(r *rand.Rand, k keeper.Keeper, ak group.AccountKeeper, switch { case groupID > initialGroupID: - // select a random ID between [initialGroupID, groupID] - groupID = uint64(simtypes.RandIntBetween(r, int(initialGroupID), int(groupID))) + // select a random ID between (initialGroupID, groupID] + // if there is at least one group information, then the groupID at this time must be greater than or equal to 1 + groupID = uint64(simtypes.RandIntBetween(r, int(initialGroupID+1), int(groupID+1))) default: // This is called on the first call to this function @@ -1239,6 +1239,11 @@ func randomGroup(r *rand.Rand, k keeper.Keeper, ak group.AccountKeeper, initialGroupID = groupID } + // when groupID is 0, it proves that SimulateMsgCreateGroup has never been called. that is, no group exists in the chain + if groupID == 0 { + return nil, simtypes.Account{}, nil, nil + } + res, err := k.GroupInfo(ctx, &group.QueryGroupInfoRequest{GroupId: groupID}) if err != nil { return nil, simtypes.Account{}, nil, err diff --git a/x/group/simulation/operations_test.go b/x/group/simulation/operations_test.go index a247869f106b..b00039145b85 100644 --- a/x/group/simulation/operations_test.go +++ b/x/group/simulation/operations_test.go @@ -5,12 +5,13 @@ import ( "testing" "time" - "cosmossdk.io/depinject" - "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/suite" + "cosmossdk.io/depinject" + "cosmossdk.io/log" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/x/group/testutil/app_config.go b/x/group/testutil/app_config.go index 26a3ad0c7d13..a9dc1f950c37 100644 --- a/x/group/testutil/app_config.go +++ b/x/group/testutil/app_config.go @@ -2,7 +2,6 @@ package testutil import ( "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/authz" // import as blank for app wiring diff --git a/x/mint/README.md b/x/mint/README.md index 900615bbabb3..80198010dcb0 100644 --- a/x/mint/README.md +++ b/x/mint/README.md @@ -39,11 +39,11 @@ which should help provide some liquidity. It can be broken down in the following way: -* If the inflation rate is below the goal %-bonded the inflation rate will +* If the actual percentage of bonded tokens is below the goal %-bonded the inflation rate will increase until a maximum value is reached * If the goal % bonded (67% in Cosmos-Hub) is maintained, then the inflation rate will stay constant -* If the inflation rate is above the goal %-bonded the inflation rate will +* If the actual percentage of bonded tokens is above the goal %-bonded the inflation rate will decrease until a minimum value is reached @@ -61,7 +61,7 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/mint/v1beta1/ ### Params -The mint module stores it's params in state with the prefix of `0x01`, +The mint module stores its params in state with the prefix of `0x01`, it can be updated with governance or the address with authority. * Params: `mint/params -> legacy_amino(params)` @@ -91,7 +91,7 @@ type InflationCalculationFn func(ctx sdk.Context, minter Minter, params Params, The target annual inflation rate is recalculated each block. The inflation is also subject to a rate change (positive or negative) depending on the distance from the desired ratio (67%). The maximum rate change -possible is defined to be 13% per year, however the annual inflation is capped +possible is defined to be 13% per year, however, the annual inflation is capped as between 7% and 20%. ```go @@ -169,7 +169,7 @@ A user can query and interact with the `mint` module using the CLI. #### Query -The `query` commands allow users to query `mint` state. +The `query` commands allows users to query `mint` state. ```shell simd query mint --help @@ -177,7 +177,7 @@ simd query mint --help ##### annual-provisions -The `annual-provisions` command allow users to query the current minting annual provisions value +The `annual-provisions` command allows users to query the current minting annual provisions value ```shell simd query mint annual-provisions [flags] @@ -197,7 +197,7 @@ Example Output: ##### inflation -The `inflation` command allow users to query the current minting inflation value +The `inflation` command allows users to query the current minting inflation value ```shell simd query mint inflation [flags] @@ -217,7 +217,7 @@ Example Output: ##### params -The `params` command allow users to query the current minting parameters +The `params` command allows users to query the current minting parameters ```shell simd query mint params [flags] @@ -240,7 +240,7 @@ A user can query the `mint` module using gRPC endpoints. #### AnnualProvisions -The `AnnualProvisions` endpoint allow users to query the current minting annual provisions value +The `AnnualProvisions` endpoint allows users to query the current minting annual provisions value ```shell /cosmos.mint.v1beta1.Query/AnnualProvisions @@ -262,7 +262,7 @@ Example Output: #### Inflation -The `Inflation` endpoint allow users to query the current minting inflation value +The `Inflation` endpoint allows users to query the current minting inflation value ```shell /cosmos.mint.v1beta1.Query/Inflation @@ -284,7 +284,7 @@ Example Output: #### Params -The `Params` endpoint allow users to query the current minting parameters +The `Params` endpoint allows users to query the current minting parameters ```shell /cosmos.mint.v1beta1.Query/Params diff --git a/x/mint/abci.go b/x/mint/abci.go index 2e4b699971a1..e9108d3ee88d 100644 --- a/x/mint/abci.go +++ b/x/mint/abci.go @@ -2,7 +2,6 @@ package mint import ( "context" - "time" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" @@ -12,7 +11,7 @@ import ( // BeginBlocker mints new tokens for the previous block. func BeginBlocker(ctx context.Context, k keeper.Keeper, ic types.InflationCalculationFn) error { - defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) + defer telemetry.ModuleMeasureSince(types.ModuleName, telemetry.Now(), telemetry.MetricKeyBeginBlocker) // fetch stored minter & params minter, err := k.Minter.Get(ctx) @@ -26,12 +25,19 @@ func BeginBlocker(ctx context.Context, k keeper.Keeper, ic types.InflationCalcul } // recalculate inflation rate - totalStakingSupply := k.StakingTokenSupply(ctx) - bondedRatio := k.BondedRatio(ctx) + totalStakingSupply, err := k.StakingTokenSupply(ctx) + if err != nil { + return err + } + + bondedRatio, err := k.BondedRatio(ctx) + if err != nil { + return err + } + minter.Inflation = ic(ctx, minter, params, bondedRatio) minter.AnnualProvisions = minter.NextAnnualProvisions(params, totalStakingSupply) - err = k.Minter.Set(ctx, minter) - if err != nil { + if err = k.Minter.Set(ctx, minter); err != nil { return err } diff --git a/x/mint/autocli.go b/x/mint/autocli.go new file mode 100644 index 000000000000..8ac35d04b6c8 --- /dev/null +++ b/x/mint/autocli.go @@ -0,0 +1,40 @@ +package mint + +import ( + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + mintv1beta1 "cosmossdk.io/api/cosmos/mint/v1beta1" +) + +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: mintv1beta1.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Params", + Use: "params", + Short: "Query the current minting parameters", + }, + { + RpcMethod: "Inflation", + Use: "inflation", + Short: "Query the current minting inflation value", + }, + { + RpcMethod: "AnnualProvisions", + Use: "annual-provisions", + Short: "Query the current minting annual provisions value", + }, + }, + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: mintv1beta1.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "UpdateParams", + Skip: true, // skipped because authority gated + }, + }, + }, + } +} diff --git a/x/mint/client/cli/query.go b/x/mint/client/cli/query.go deleted file mode 100644 index 6bf31ba5a179..000000000000 --- a/x/mint/client/cli/query.go +++ /dev/null @@ -1,117 +0,0 @@ -package cli - -import ( - "fmt" - - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/x/mint/types" -) - -// GetQueryCmd returns the cli query commands for the minting module. -func GetQueryCmd() *cobra.Command { - mintingQueryCmd := &cobra.Command{ - Use: types.ModuleName, - Short: "Querying commands for the minting module", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - mintingQueryCmd.AddCommand( - GetCmdQueryParams(), - GetCmdQueryInflation(), - GetCmdQueryAnnualProvisions(), - ) - - return mintingQueryCmd -} - -// GetCmdQueryParams implements a command to return the current minting -// parameters. -func GetCmdQueryParams() *cobra.Command { - cmd := &cobra.Command{ - Use: "params", - Short: "Query the current minting parameters", - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - params := &types.QueryParamsRequest{} - res, err := queryClient.Params(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(&res.Params) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdQueryInflation implements a command to return the current minting -// inflation value. -func GetCmdQueryInflation() *cobra.Command { - cmd := &cobra.Command{ - Use: "inflation", - Short: "Query the current minting inflation value", - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - params := &types.QueryInflationRequest{} - res, err := queryClient.Inflation(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintString(fmt.Sprintf("%s\n", res.Inflation)) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdQueryAnnualProvisions implements a command to return the current minting -// annual provisions value. -func GetCmdQueryAnnualProvisions() *cobra.Command { - cmd := &cobra.Command{ - Use: "annual-provisions", - Short: "Query the current minting annual provisions value", - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - params := &types.QueryAnnualProvisionsRequest{} - res, err := queryClient.AnnualProvisions(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintString(fmt.Sprintf("%s\n", res.AnnualProvisions)) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/mint/client/cli/query_test.go b/x/mint/client/cli/query_test.go deleted file mode 100644 index 9bb4199fe293..000000000000 --- a/x/mint/client/cli/query_test.go +++ /dev/null @@ -1,207 +0,0 @@ -package cli_test - -import ( - "context" - "fmt" - "io" - "strings" - "testing" - - rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" - "github.com/stretchr/testify/require" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - - "github.com/cosmos/cosmos-sdk/crypto/keyring" - testutilmod "github.com/cosmos/cosmos-sdk/types/module/testutil" - "github.com/cosmos/cosmos-sdk/x/mint" - mintcli "github.com/cosmos/cosmos-sdk/x/mint/client/cli" -) - -func TestGetCmdQueryParams(t *testing.T) { - encCfg := testutilmod.MakeTestEncodingConfig(mint.AppModuleBasic{}) - kr := keyring.NewInMemory(encCfg.Codec) - baseCtx := client.Context{}. - WithKeyring(kr). - WithTxConfig(encCfg.TxConfig). - WithCodec(encCfg.Codec). - WithClient(clitestutil.MockCometRPC{Client: rpcclientmock.Client{}}). - WithAccountRetriever(client.MockAccountRetriever{}). - WithOutput(io.Discard). - WithChainID("test-chain") - - cmd := mintcli.GetCmdQueryParams() - - testCases := []struct { - name string - flagArgs []string - expCmdOutput string - expectedOutput string - }{ - { - "json output", - []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=json", flags.FlagOutput)}, - `[--height=1 --output=json]`, - `{"mint_denom":"","inflation_rate_change":"0","inflation_max":"0","inflation_min":"0","goal_bonded":"0","blocks_per_year":"0"}`, - }, - { - "text output", - []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=text", flags.FlagOutput)}, - `[--height=1 --output=text]`, - `blocks_per_year: "0" -goal_bonded: "0" -inflation_max: "0" -inflation_min: "0" -inflation_rate_change: "0" -mint_denom: ""`, - }, - } - - for _, tc := range testCases { - tc := tc - - t.Run(tc.name, func(t *testing.T) { - ctx := svrcmd.CreateExecuteContext(context.Background()) - - cmd.SetOut(io.Discard) - require.NotNil(t, cmd) - - cmd.SetContext(ctx) - cmd.SetArgs(tc.flagArgs) - - require.NoError(t, client.SetCmdClientContextHandler(baseCtx, cmd)) - - if len(tc.flagArgs) != 0 { - require.Contains(t, fmt.Sprint(cmd), "params [] [] Query the current minting parameters") - require.Contains(t, fmt.Sprint(cmd), tc.expCmdOutput) - } - - out, err := clitestutil.ExecTestCLICmd(baseCtx, cmd, tc.flagArgs) - require.NoError(t, err) - require.Equal(t, tc.expectedOutput, strings.TrimSpace(out.String())) - }) - } -} - -func TestGetCmdQueryInflation(t *testing.T) { - encCfg := testutilmod.MakeTestEncodingConfig(mint.AppModuleBasic{}) - kr := keyring.NewInMemory(encCfg.Codec) - baseCtx := client.Context{}. - WithKeyring(kr). - WithTxConfig(encCfg.TxConfig). - WithCodec(encCfg.Codec). - WithClient(clitestutil.MockCometRPC{Client: rpcclientmock.Client{}}). - WithAccountRetriever(client.MockAccountRetriever{}). - WithOutput(io.Discard). - WithChainID("test-chain") - - cmd := mintcli.GetCmdQueryInflation() - - testCases := []struct { - name string - flagArgs []string - expCmdOutput string - expectedOutput string - }{ - { - "json output", - []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=json", flags.FlagOutput)}, - `[--height=1 --output=json]`, - ``, - }, - { - "text output", - []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=text", flags.FlagOutput)}, - `[--height=1 --output=text]`, - ``, - }, - } - - for _, tc := range testCases { - tc := tc - - t.Run(tc.name, func(t *testing.T) { - ctx := svrcmd.CreateExecuteContext(context.Background()) - - cmd.SetOut(io.Discard) - require.NotNil(t, cmd) - - cmd.SetContext(ctx) - cmd.SetArgs(tc.flagArgs) - - require.NoError(t, client.SetCmdClientContextHandler(baseCtx, cmd)) - - if len(tc.flagArgs) != 0 { - require.Contains(t, fmt.Sprint(cmd), "inflation [] [] Query the current minting inflation value") - require.Contains(t, fmt.Sprint(cmd), tc.expCmdOutput) - } - - out, err := clitestutil.ExecTestCLICmd(baseCtx, cmd, tc.flagArgs) - require.NoError(t, err) - require.Equal(t, tc.expectedOutput, strings.TrimSpace(out.String())) - }) - } -} - -func TestGetCmdQueryAnnualProvisions(t *testing.T) { - encCfg := testutilmod.MakeTestEncodingConfig(mint.AppModuleBasic{}) - kr := keyring.NewInMemory(encCfg.Codec) - baseCtx := client.Context{}. - WithKeyring(kr). - WithTxConfig(encCfg.TxConfig). - WithCodec(encCfg.Codec). - WithClient(clitestutil.MockCometRPC{Client: rpcclientmock.Client{}}). - WithAccountRetriever(client.MockAccountRetriever{}). - WithOutput(io.Discard). - WithChainID("test-chain") - - cmd := mintcli.GetCmdQueryAnnualProvisions() - - testCases := []struct { - name string - flagArgs []string - expCmdOutput string - expectedOutput string - }{ - { - "json output", - []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=json", flags.FlagOutput)}, - `[--height=1 --output=json]`, - ``, - }, - { - "text output", - []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=text", flags.FlagOutput)}, - `[--height=1 --output=text]`, - ``, - }, - } - - for _, tc := range testCases { - tc := tc - - t.Run(tc.name, func(t *testing.T) { - ctx := svrcmd.CreateExecuteContext(context.Background()) - - cmd.SetOut(io.Discard) - require.NotNil(t, cmd) - - cmd.SetContext(ctx) - cmd.SetArgs(tc.flagArgs) - - require.NoError(t, client.SetCmdClientContextHandler(baseCtx, cmd)) - - if len(tc.flagArgs) != 0 { - require.Contains(t, fmt.Sprint(cmd), "annual-provisions [] [] Query the current minting annual provisions value") - require.Contains(t, fmt.Sprint(cmd), tc.expCmdOutput) - } - - out, err := clitestutil.ExecTestCLICmd(baseCtx, cmd, tc.flagArgs) - require.NoError(t, err) - require.Equal(t, tc.expectedOutput, strings.TrimSpace(out.String())) - }) - } -} diff --git a/x/mint/keeper/genesis_test.go b/x/mint/keeper/genesis_test.go index d919926232f9..e4097a8e3e18 100644 --- a/x/mint/keeper/genesis_test.go +++ b/x/mint/keeper/genesis_test.go @@ -3,11 +3,11 @@ package keeper_test import ( "testing" - "cosmossdk.io/collections" - "cosmossdk.io/math" "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" + "cosmossdk.io/collections" + "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" diff --git a/x/mint/keeper/grpc_query.go b/x/mint/keeper/grpc_query.go index eb29d8c3ff75..07ad05fabc95 100644 --- a/x/mint/keeper/grpc_query.go +++ b/x/mint/keeper/grpc_query.go @@ -3,7 +3,6 @@ package keeper import ( "context" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/mint/types" ) @@ -18,8 +17,7 @@ type queryServer struct { } // Params returns params of the mint module. -func (q queryServer) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { - ctx := sdk.UnwrapSDKContext(c) +func (q queryServer) Params(ctx context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { params, err := q.k.Params.Get(ctx) if err != nil { return nil, err @@ -29,8 +27,7 @@ func (q queryServer) Params(c context.Context, _ *types.QueryParamsRequest) (*ty } // Inflation returns minter.Inflation of the mint module. -func (q queryServer) Inflation(c context.Context, _ *types.QueryInflationRequest) (*types.QueryInflationResponse, error) { - ctx := sdk.UnwrapSDKContext(c) +func (q queryServer) Inflation(ctx context.Context, _ *types.QueryInflationRequest) (*types.QueryInflationResponse, error) { minter, err := q.k.Minter.Get(ctx) if err != nil { return nil, err @@ -40,8 +37,7 @@ func (q queryServer) Inflation(c context.Context, _ *types.QueryInflationRequest } // AnnualProvisions returns minter.AnnualProvisions of the mint module. -func (q queryServer) AnnualProvisions(c context.Context, _ *types.QueryAnnualProvisionsRequest) (*types.QueryAnnualProvisionsResponse, error) { - ctx := sdk.UnwrapSDKContext(c) +func (q queryServer) AnnualProvisions(ctx context.Context, _ *types.QueryAnnualProvisionsRequest) (*types.QueryAnnualProvisionsResponse, error) { minter, err := q.k.Minter.Get(ctx) if err != nil { return nil, err diff --git a/x/mint/keeper/keeper.go b/x/mint/keeper/keeper.go index 0eceb52ab50e..3fc2d68e62d3 100644 --- a/x/mint/keeper/keeper.go +++ b/x/mint/keeper/keeper.go @@ -5,11 +5,10 @@ import ( "fmt" "cosmossdk.io/collections" + storetypes "cosmossdk.io/core/store" "cosmossdk.io/log" "cosmossdk.io/math" - storetypes "cosmossdk.io/core/store" - "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/mint/types" @@ -80,16 +79,14 @@ func (k Keeper) Logger(ctx context.Context) log.Logger { // StakingTokenSupply implements an alias call to the underlying staking keeper's // StakingTokenSupply to be used in BeginBlocker. -func (k Keeper) StakingTokenSupply(ctx context.Context) math.Int { - sdkCtx := sdk.UnwrapSDKContext(ctx) - return k.stakingKeeper.StakingTokenSupply(sdkCtx) +func (k Keeper) StakingTokenSupply(ctx context.Context) (math.Int, error) { + return k.stakingKeeper.StakingTokenSupply(ctx) } // BondedRatio implements an alias call to the underlying staking keeper's // BondedRatio to be used in BeginBlocker. -func (k Keeper) BondedRatio(ctx context.Context) math.LegacyDec { - sdkCtx := sdk.UnwrapSDKContext(ctx) - return k.stakingKeeper.BondedRatio(sdkCtx) +func (k Keeper) BondedRatio(ctx context.Context) (math.LegacyDec, error) { + return k.stakingKeeper.BondedRatio(ctx) } // MintCoins implements an alias call to the underlying supply keeper's diff --git a/x/mint/keeper/keeper_test.go b/x/mint/keeper/keeper_test.go index 9cc7eb37d20c..c78261da1145 100644 --- a/x/mint/keeper/keeper_test.go +++ b/x/mint/keeper/keeper_test.go @@ -74,12 +74,16 @@ func (s *IntegrationTestSuite) SetupTest() { func (s *IntegrationTestSuite) TestAliasFunctions() { stakingTokenSupply := math.NewIntFromUint64(100000000000) - s.stakingKeeper.EXPECT().StakingTokenSupply(s.ctx).Return(stakingTokenSupply) - s.Require().Equal(s.mintKeeper.StakingTokenSupply(s.ctx), stakingTokenSupply) + s.stakingKeeper.EXPECT().StakingTokenSupply(s.ctx).Return(stakingTokenSupply, nil) + tokenSupply, err := s.mintKeeper.StakingTokenSupply(s.ctx) + s.Require().NoError(err) + s.Require().Equal(tokenSupply, stakingTokenSupply) bondedRatio := math.LegacyNewDecWithPrec(15, 2) - s.stakingKeeper.EXPECT().BondedRatio(s.ctx).Return(bondedRatio) - s.Require().Equal(s.mintKeeper.BondedRatio(s.ctx), bondedRatio) + s.stakingKeeper.EXPECT().BondedRatio(s.ctx).Return(bondedRatio, nil) + ratio, err := s.mintKeeper.BondedRatio(s.ctx) + s.Require().NoError(err) + s.Require().Equal(ratio, bondedRatio) coins := sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(1000000))) s.bankKeeper.EXPECT().MintCoins(s.ctx, types.ModuleName, coins).Return(nil) diff --git a/x/mint/keeper/msg_server.go b/x/mint/keeper/msg_server.go index 43fe1b758a65..4fdde2080f25 100644 --- a/x/mint/keeper/msg_server.go +++ b/x/mint/keeper/msg_server.go @@ -5,7 +5,6 @@ import ( "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/cosmos-sdk/x/mint/types" ) @@ -25,7 +24,7 @@ func NewMsgServerImpl(k Keeper) types.MsgServer { } // UpdateParams updates the params. -func (ms msgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { +func (ms msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { if ms.authority != msg.Authority { return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.authority, msg.Authority) } @@ -34,7 +33,6 @@ func (ms msgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdatePara return nil, err } - ctx := sdk.UnwrapSDKContext(goCtx) if err := ms.Params.Set(ctx, msg.Params); err != nil { return nil, err } diff --git a/x/mint/module.go b/x/mint/module.go index 8c7515202cd3..7d10342d966f 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -5,16 +5,12 @@ import ( "encoding/json" "fmt" - abci "github.com/cometbft/cometbft/abci/types" gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/spf13/cobra" modulev1 "cosmossdk.io/api/cosmos/mint/module/v1" "cosmossdk.io/core/appmodule" - - "cosmossdk.io/depinject" - "cosmossdk.io/core/store" + "cosmossdk.io/depinject" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -24,7 +20,6 @@ import ( simtypes "github.com/cosmos/cosmos-sdk/types/simulation" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/cosmos/cosmos-sdk/x/mint/client/cli" "github.com/cosmos/cosmos-sdk/x/mint/exported" "github.com/cosmos/cosmos-sdk/x/mint/keeper" "github.com/cosmos/cosmos-sdk/x/mint/simulation" @@ -35,8 +30,13 @@ import ( const ConsensusVersion = 2 var ( - _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModuleBasic = AppModule{} _ module.AppModuleSimulation = AppModule{} + _ module.HasGenesis = AppModule{} + _ module.HasServices = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasBeginBlocker = AppModule{} ) // AppModuleBasic defines the basic application module used by the mint module. @@ -44,8 +44,6 @@ type AppModuleBasic struct { cdc codec.Codec } -var _ module.AppModuleBasic = AppModuleBasic{} - // Name returns the mint module's name. func (AppModuleBasic) Name() string { return types.ModuleName @@ -84,14 +82,6 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *g } } -// GetTxCmd returns no root tx command for the mint module. -func (AppModuleBasic) GetTxCmd() *cobra.Command { return nil } - -// GetQueryCmd returns the root query command for the mint module. -func (AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.GetQueryCmd() -} - // AppModule implements an application module for the mint module. type AppModule struct { AppModuleBasic @@ -129,22 +119,12 @@ func NewAppModule( } } -var ( - _ appmodule.AppModule = AppModule{} - _ appmodule.HasBeginBlocker = AppModule{} -) - // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} // IsAppModule implements the appmodule.AppModule interface. func (am AppModule) IsAppModule() {} -// Name returns the mint module's name. -func (AppModule) Name() string { - return types.ModuleName -} - // RegisterServices registers a gRPC query service to respond to the // module-specific gRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { @@ -160,12 +140,11 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { // InitGenesis performs genesis initialization for the mint module. It returns // no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) { var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) am.keeper.InitGenesis(ctx, am.authKeeper, &genesisState) - return []abci.ValidatorUpdate{} } // ExportGenesis returns the exported genesis state as raw bytes for the mint diff --git a/x/mint/module_test.go b/x/mint/module_test.go index b573f4aa98c0..6ae3df35a925 100644 --- a/x/mint/module_test.go +++ b/x/mint/module_test.go @@ -3,9 +3,10 @@ package mint_test import ( "testing" + "github.com/stretchr/testify/require" + "cosmossdk.io/depinject" "cosmossdk.io/log" - "github.com/stretchr/testify/require" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" diff --git a/x/mint/simulation/genesis_test.go b/x/mint/simulation/genesis_test.go index c1938012bbe2..a923a6845db7 100644 --- a/x/mint/simulation/genesis_test.go +++ b/x/mint/simulation/genesis_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/require" "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" diff --git a/x/mint/simulation/proposals_test.go b/x/mint/simulation/proposals_test.go index 0dc21ac2b3c6..83bda1f0dec5 100644 --- a/x/mint/simulation/proposals_test.go +++ b/x/mint/simulation/proposals_test.go @@ -4,10 +4,11 @@ import ( "math/rand" "testing" - sdkmath "cosmossdk.io/math" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "gotest.tools/v3/assert" + sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" diff --git a/x/mint/testutil/expected_keepers_mocks.go b/x/mint/testutil/expected_keepers_mocks.go index 723e1effb1dc..26be50dd5327 100644 --- a/x/mint/testutil/expected_keepers_mocks.go +++ b/x/mint/testutil/expected_keepers_mocks.go @@ -37,11 +37,12 @@ func (m *MockStakingKeeper) EXPECT() *MockStakingKeeperMockRecorder { } // BondedRatio mocks base method. -func (m *MockStakingKeeper) BondedRatio(ctx types.Context) math.LegacyDec { +func (m *MockStakingKeeper) BondedRatio(ctx context.Context) (math.LegacyDec, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "BondedRatio", ctx) ret0, _ := ret[0].(math.LegacyDec) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // BondedRatio indicates an expected call of BondedRatio. @@ -51,11 +52,12 @@ func (mr *MockStakingKeeperMockRecorder) BondedRatio(ctx interface{}) *gomock.Ca } // StakingTokenSupply mocks base method. -func (m *MockStakingKeeper) StakingTokenSupply(ctx types.Context) math.Int { +func (m *MockStakingKeeper) StakingTokenSupply(ctx context.Context) (math.Int, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StakingTokenSupply", ctx) ret0, _ := ret[0].(math.Int) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // StakingTokenSupply indicates an expected call of StakingTokenSupply. diff --git a/x/mint/types/expected_keepers.go b/x/mint/types/expected_keepers.go index 1b04abfa9f3a..82edcc6a2092 100644 --- a/x/mint/types/expected_keepers.go +++ b/x/mint/types/expected_keepers.go @@ -10,8 +10,8 @@ import ( // StakingKeeper defines the expected staking keeper type StakingKeeper interface { - StakingTokenSupply(ctx sdk.Context) math.Int - BondedRatio(ctx sdk.Context) math.LegacyDec + StakingTokenSupply(ctx context.Context) (math.Int, error) + BondedRatio(ctx context.Context) (math.LegacyDec, error) } // AccountKeeper defines the contract required for account APIs. diff --git a/x/mint/types/mint.pb.go b/x/mint/types/mint.pb.go index 63f5537f64fb..708073628246 100644 --- a/x/mint/types/mint.pb.go +++ b/x/mint/types/mint.pb.go @@ -4,9 +4,9 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" _ "github.com/cosmos/cosmos-proto" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" @@ -29,9 +29,9 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Minter represents the minting state. type Minter struct { // current annual inflation rate - Inflation github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=inflation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inflation"` + Inflation cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=inflation,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"inflation"` // current annual expected provisions - AnnualProvisions github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=annual_provisions,json=annualProvisions,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"annual_provisions"` + AnnualProvisions cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=annual_provisions,json=annualProvisions,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"annual_provisions"` } func (m *Minter) Reset() { *m = Minter{} } @@ -72,13 +72,13 @@ type Params struct { // type of coin to mint MintDenom string `protobuf:"bytes,1,opt,name=mint_denom,json=mintDenom,proto3" json:"mint_denom,omitempty"` // maximum annual change in inflation rate - InflationRateChange github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=inflation_rate_change,json=inflationRateChange,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inflation_rate_change"` + InflationRateChange cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=inflation_rate_change,json=inflationRateChange,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"inflation_rate_change"` // maximum inflation rate - InflationMax github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=inflation_max,json=inflationMax,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inflation_max"` + InflationMax cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=inflation_max,json=inflationMax,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"inflation_max"` // minimum inflation rate - InflationMin github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=inflation_min,json=inflationMin,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inflation_min"` + InflationMin cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=inflation_min,json=inflationMin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"inflation_min"` // goal of percent bonded atoms - GoalBonded github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=goal_bonded,json=goalBonded,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"goal_bonded"` + GoalBonded cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=goal_bonded,json=goalBonded,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"goal_bonded"` // expected blocks per year BlocksPerYear uint64 `protobuf:"varint,6,opt,name=blocks_per_year,json=blocksPerYear,proto3" json:"blocks_per_year,omitempty"` } @@ -138,34 +138,35 @@ func init() { func init() { proto.RegisterFile("cosmos/mint/v1beta1/mint.proto", fileDescriptor_2df116d183c1e223) } var fileDescriptor_2df116d183c1e223 = []byte{ - // 423 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x93, 0x4f, 0x8f, 0xd2, 0x40, - 0x18, 0xc6, 0x3b, 0x8a, 0x4d, 0x18, 0xdd, 0xe8, 0xce, 0x6a, 0x52, 0x37, 0xd9, 0xee, 0x66, 0x0f, - 0x04, 0x49, 0x68, 0x43, 0xbc, 0x19, 0x2f, 0x02, 0x57, 0x12, 0xd2, 0x9b, 0x5c, 0x9a, 0x69, 0x3b, - 0x94, 0x09, 0xed, 0x0c, 0x99, 0x19, 0x08, 0x7c, 0x05, 0x4f, 0x5e, 0xfd, 0x06, 0x1e, 0x39, 0xf8, - 0x21, 0xb8, 0x49, 0x3c, 0x19, 0x0f, 0xc4, 0xc0, 0x81, 0xaf, 0x61, 0x3a, 0xd3, 0x14, 0xe3, 0xc1, - 0x8b, 0x78, 0xe9, 0x9f, 0xe7, 0x79, 0xfb, 0x7b, 0x9e, 0x36, 0x7d, 0xa1, 0x1b, 0x73, 0x99, 0x73, - 0xe9, 0xe7, 0x94, 0x29, 0x7f, 0xd1, 0x89, 0x88, 0xc2, 0x1d, 0x7d, 0xe3, 0xcd, 0x04, 0x57, 0x1c, - 0x5d, 0x19, 0xdf, 0xd3, 0x52, 0xe9, 0x5f, 0x3f, 0x4f, 0x79, 0xca, 0xb5, 0xef, 0x17, 0x57, 0x66, - 0xf4, 0xfa, 0xa5, 0x19, 0x0d, 0x8d, 0x51, 0x3e, 0x67, 0xac, 0x4b, 0x9c, 0x53, 0xc6, 0x7d, 0x7d, - 0x34, 0xd2, 0xfd, 0x57, 0x00, 0xed, 0x01, 0x65, 0x8a, 0x08, 0x34, 0x82, 0x75, 0xca, 0xc6, 0x19, - 0x56, 0x94, 0x33, 0x07, 0xdc, 0x81, 0x66, 0xbd, 0xfb, 0x76, 0xb3, 0xbb, 0xb5, 0x7e, 0xec, 0x6e, - 0x1b, 0x29, 0x55, 0x93, 0x79, 0xe4, 0xc5, 0x3c, 0x2f, 0x89, 0xe5, 0xa9, 0x2d, 0x93, 0xa9, 0xaf, - 0x56, 0x33, 0x22, 0xbd, 0x3e, 0x89, 0xbf, 0x7d, 0x69, 0xc3, 0x32, 0xb0, 0x4f, 0xe2, 0xe0, 0x84, - 0x43, 0x14, 0x5e, 0x62, 0xc6, 0xe6, 0x38, 0x2b, 0x6a, 0x2d, 0xa8, 0xa4, 0x9c, 0x49, 0xe7, 0xc1, - 0x19, 0x32, 0x9e, 0x19, 0xec, 0xb0, 0xa2, 0xde, 0x7f, 0xaa, 0x41, 0x7b, 0x88, 0x05, 0xce, 0x25, - 0xba, 0x81, 0xb0, 0xf8, 0x60, 0x61, 0x42, 0x18, 0xcf, 0xcd, 0x2b, 0x05, 0xf5, 0x42, 0xe9, 0x17, - 0x02, 0x9a, 0xc3, 0x17, 0x55, 0xc3, 0x50, 0x60, 0x45, 0xc2, 0x78, 0x82, 0x59, 0x4a, 0xca, 0x62, - 0xef, 0xfe, 0xa5, 0xd8, 0xe7, 0xe3, 0xba, 0x05, 0x82, 0xab, 0x8a, 0x1f, 0x60, 0x45, 0x7a, 0x9a, - 0x8e, 0xc6, 0xf0, 0xe2, 0x14, 0x9b, 0xe3, 0xa5, 0xf3, 0xf0, 0x5c, 0x71, 0x4f, 0x2a, 0xee, 0x00, - 0x2f, 0xff, 0xc8, 0xa1, 0xcc, 0xa9, 0xfd, 0x87, 0x1c, 0xca, 0x50, 0x04, 0x1f, 0xa7, 0x1c, 0x67, - 0x61, 0xc4, 0x59, 0x42, 0x12, 0xe7, 0xd1, 0xb9, 0x52, 0x60, 0x41, 0xed, 0x6a, 0x28, 0x6a, 0xc0, - 0xa7, 0x51, 0xc6, 0xe3, 0xa9, 0x0c, 0x67, 0x44, 0x84, 0x2b, 0x82, 0x85, 0x63, 0xdf, 0x81, 0x66, - 0x2d, 0xb8, 0x30, 0xf2, 0x90, 0x88, 0xf7, 0x04, 0x8b, 0x37, 0x37, 0x1f, 0x8e, 0xeb, 0x96, 0xf3, - 0x5b, 0xc2, 0xd2, 0xac, 0x94, 0xf9, 0x21, 0xba, 0xbd, 0xcd, 0xde, 0x05, 0xdb, 0xbd, 0x0b, 0x7e, - 0xee, 0x5d, 0xf0, 0xf1, 0xe0, 0x5a, 0xdb, 0x83, 0x6b, 0x7d, 0x3f, 0xb8, 0xd6, 0xe8, 0xd5, 0x5f, - 0x7b, 0x96, 0x14, 0x5d, 0x37, 0xb2, 0xf5, 0xe6, 0xbc, 0xfe, 0x15, 0x00, 0x00, 0xff, 0xff, 0xe5, - 0xf6, 0x61, 0x3e, 0xb4, 0x03, 0x00, 0x00, + // 436 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0xb1, 0x8e, 0xd3, 0x30, + 0x18, 0xc7, 0x63, 0xee, 0x88, 0x54, 0xc3, 0x09, 0xce, 0x07, 0x52, 0x38, 0x74, 0xb9, 0xd3, 0x0d, + 0xe8, 0x38, 0xe9, 0x12, 0x55, 0x48, 0x0c, 0x8c, 0xbd, 0x8e, 0x9c, 0xa8, 0xb2, 0x20, 0x40, 0x22, + 0xfa, 0x92, 0x98, 0xd4, 0x34, 0xb6, 0x2b, 0xdb, 0x57, 0xb5, 0xaf, 0xc0, 0xc4, 0x63, 0x30, 0x76, + 0x60, 0xe1, 0x0d, 0x3a, 0x56, 0x4c, 0x88, 0xa1, 0x42, 0xed, 0xd0, 0x89, 0x77, 0x40, 0x89, 0xa3, + 0x54, 0x82, 0x09, 0xca, 0x12, 0xc5, 0xff, 0xff, 0xe7, 0xdf, 0xf7, 0x97, 0xfd, 0x19, 0xfb, 0xa9, + 0xd4, 0x5c, 0xea, 0x90, 0x33, 0x61, 0xc2, 0x51, 0x3b, 0xa1, 0x06, 0xda, 0xd5, 0x22, 0x18, 0x2a, + 0x69, 0x24, 0x39, 0xb0, 0x7e, 0x50, 0x49, 0xb5, 0x7f, 0x78, 0x2f, 0x97, 0xb9, 0xac, 0xfc, 0xb0, + 0xfc, 0xb3, 0xa5, 0x87, 0x0f, 0x6c, 0x69, 0x6c, 0x8d, 0x7a, 0x9f, 0xb5, 0xf6, 0x81, 0x33, 0x21, + 0xc3, 0xea, 0x6b, 0xa5, 0xd3, 0x2f, 0x08, 0xbb, 0x57, 0x4c, 0x18, 0xaa, 0xc8, 0x0b, 0xdc, 0x62, + 0xe2, 0x5d, 0x01, 0x86, 0x49, 0xe1, 0xa1, 0x13, 0x74, 0xd6, 0xea, 0xb4, 0x67, 0x8b, 0x63, 0xe7, + 0xfb, 0xe2, 0xf8, 0xa1, 0xc5, 0xe8, 0x6c, 0x10, 0x30, 0x19, 0x72, 0x30, 0xfd, 0xe0, 0x39, 0xcd, + 0x21, 0x9d, 0x74, 0x69, 0xfa, 0xf5, 0xf3, 0x05, 0xae, 0xbb, 0x74, 0x69, 0x1a, 0x6d, 0x18, 0xe4, + 0x2d, 0xde, 0x07, 0x21, 0xae, 0xa1, 0x28, 0xb3, 0x8c, 0x98, 0x66, 0x52, 0x68, 0xef, 0xc6, 0xbf, + 0x82, 0xef, 0x5a, 0x56, 0xaf, 0x41, 0x9d, 0xfe, 0xdc, 0xc1, 0x6e, 0x0f, 0x14, 0x70, 0x4d, 0x8e, + 0x30, 0x2e, 0x8f, 0x26, 0xce, 0xa8, 0x90, 0xdc, 0x86, 0x8f, 0x5a, 0xa5, 0xd2, 0x2d, 0x05, 0xf2, + 0x1e, 0xdf, 0x6f, 0x62, 0xc5, 0x0a, 0x0c, 0x8d, 0xd3, 0x3e, 0x88, 0x9c, 0xd6, 0x69, 0x9e, 0xfe, + 0x75, 0x9a, 0x4f, 0xeb, 0xe9, 0x39, 0x8a, 0x0e, 0x1a, 0x68, 0x04, 0x86, 0x5e, 0x56, 0x48, 0xf2, + 0x06, 0xef, 0x6d, 0x7a, 0x71, 0x18, 0x7b, 0x3b, 0x5b, 0xf5, 0xb8, 0xdd, 0xc0, 0xae, 0x60, 0xfc, + 0x1b, 0x9c, 0x09, 0x6f, 0xf7, 0x7f, 0xc1, 0x99, 0x20, 0x2f, 0xf1, 0xad, 0x5c, 0x42, 0x11, 0x27, + 0x52, 0x64, 0x34, 0xf3, 0x6e, 0x6e, 0x85, 0xc6, 0x25, 0xaa, 0x53, 0x91, 0xc8, 0x23, 0x7c, 0x27, + 0x29, 0x64, 0x3a, 0xd0, 0xf1, 0x90, 0xaa, 0x78, 0x42, 0x41, 0x79, 0xee, 0x09, 0x3a, 0xdb, 0x8d, + 0xf6, 0xac, 0xdc, 0xa3, 0xea, 0x15, 0x05, 0xf5, 0xec, 0xe8, 0xc3, 0x7a, 0x7a, 0xee, 0x59, 0xd2, + 0x85, 0xce, 0x06, 0xe1, 0xd8, 0x3e, 0x08, 0x7b, 0xc9, 0x9d, 0xcb, 0xd9, 0xd2, 0x47, 0xf3, 0xa5, + 0x8f, 0x7e, 0x2c, 0x7d, 0xf4, 0x71, 0xe5, 0x3b, 0xf3, 0x95, 0xef, 0x7c, 0x5b, 0xf9, 0xce, 0xeb, + 0xc7, 0x39, 0x33, 0xfd, 0xeb, 0x24, 0x48, 0x25, 0xaf, 0x27, 0x3e, 0xfc, 0x93, 0x62, 0x26, 0x43, + 0xaa, 0x13, 0xb7, 0x9a, 0xfb, 0x27, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xc2, 0xd0, 0x42, 0xaf, + 0x72, 0x03, 0x00, 0x00, } func (m *Minter) Marshal() (dAtA []byte, err error) { diff --git a/x/mint/types/minter_test.go b/x/mint/types/minter_test.go index d1f2a444dd14..dbfdf4cd2a94 100644 --- a/x/mint/types/minter_test.go +++ b/x/mint/types/minter_test.go @@ -4,9 +4,10 @@ import ( "math/rand" "testing" - "cosmossdk.io/math" "github.com/stretchr/testify/require" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/mint/types/msgs.go b/x/mint/types/msgs.go deleted file mode 100644 index e5a18898cdca..000000000000 --- a/x/mint/types/msgs.go +++ /dev/null @@ -1,13 +0,0 @@ -package types - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -var _ sdk.Msg = &MsgUpdateParams{} - -// GetSigners returns the expected signers for a MsgUpdateParams message. -func (m MsgUpdateParams) GetSigners() []sdk.AccAddress { - addr, _ := sdk.AccAddressFromBech32(m.Authority) - return []sdk.AccAddress{addr} -} diff --git a/x/mint/types/query.pb.go b/x/mint/types/query.pb.go index fd255a02d6fb..838e86a8402b 100644 --- a/x/mint/types/query.pb.go +++ b/x/mint/types/query.pb.go @@ -5,8 +5,9 @@ package types import ( context "context" + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -155,7 +156,7 @@ var xxx_messageInfo_QueryInflationRequest proto.InternalMessageInfo // method. type QueryInflationResponse struct { // inflation is the current minting inflation value. - Inflation github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=inflation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inflation"` + Inflation cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=inflation,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"inflation"` } func (m *QueryInflationResponse) Reset() { *m = QueryInflationResponse{} } @@ -233,7 +234,7 @@ var xxx_messageInfo_QueryAnnualProvisionsRequest proto.InternalMessageInfo // Query/AnnualProvisions RPC method. type QueryAnnualProvisionsResponse struct { // annual_provisions is the current minting annual provisions value. - AnnualProvisions github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=annual_provisions,json=annualProvisions,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"annual_provisions"` + AnnualProvisions cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=annual_provisions,json=annualProvisions,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"annual_provisions"` } func (m *QueryAnnualProvisionsResponse) Reset() { *m = QueryAnnualProvisionsResponse{} } @@ -281,37 +282,38 @@ func init() { func init() { proto.RegisterFile("cosmos/mint/v1beta1/query.proto", fileDescriptor_d0a1e393be338aea) } var fileDescriptor_d0a1e393be338aea = []byte{ - // 465 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xce, 0x2f, 0xce, - 0xcd, 0x2f, 0xd6, 0xcf, 0xcd, 0xcc, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, - 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x86, 0x28, 0xd0, - 0x03, 0x29, 0xd0, 0x83, 0x2a, 0x90, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xcb, 0xeb, 0x83, 0x58, - 0x10, 0xa5, 0x52, 0x32, 0xe9, 0xf9, 0xf9, 0xe9, 0x39, 0xa9, 0xfa, 0x89, 0x05, 0x99, 0xfa, 0x89, - 0x79, 0x79, 0xf9, 0x25, 0x89, 0x25, 0x99, 0xf9, 0x79, 0xc5, 0x50, 0x59, 0x39, 0x6c, 0x36, 0x81, - 0x4d, 0x85, 0xc8, 0x0b, 0x26, 0xe6, 0x66, 0xe6, 0xe5, 0xeb, 0x83, 0x49, 0x88, 0x90, 0x92, 0x08, - 0x97, 0x50, 0x20, 0xc8, 0x29, 0x01, 0x89, 0x45, 0x89, 0xb9, 0xc5, 0x41, 0xa9, 0x85, 0xa5, 0xa9, - 0xc5, 0x25, 0x4a, 0xa1, 0x5c, 0xc2, 0x28, 0xa2, 0xc5, 0x05, 0xf9, 0x79, 0xc5, 0xa9, 0x42, 0x76, - 0x5c, 0x6c, 0x05, 0x60, 0x11, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x69, 0x3d, 0x2c, 0x2e, - 0xd7, 0x83, 0x68, 0x72, 0xe2, 0x3c, 0x71, 0x4f, 0x9e, 0x61, 0xc5, 0xf3, 0x0d, 0x5a, 0x8c, 0x41, - 0x50, 0x5d, 0x4a, 0xe2, 0x5c, 0xa2, 0x60, 0x63, 0x3d, 0xf3, 0xd2, 0x72, 0xc0, 0x0e, 0x87, 0xd9, - 0x97, 0xcd, 0x25, 0x86, 0x2e, 0x01, 0xb5, 0x32, 0x90, 0x8b, 0x33, 0x13, 0x26, 0x08, 0xb6, 0x95, - 0xc7, 0xc9, 0x18, 0x64, 0xf0, 0xad, 0x7b, 0xf2, 0x6a, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, - 0xc9, 0xf9, 0xb9, 0xfa, 0x50, 0x8f, 0x43, 0x28, 0xdd, 0xe2, 0x94, 0x6c, 0xfd, 0x92, 0xca, 0x82, - 0xd4, 0x62, 0x3d, 0x97, 0xd4, 0x64, 0x88, 0x13, 0x10, 0xa6, 0x28, 0xc9, 0x71, 0xc9, 0x80, 0x2d, - 0x73, 0xcc, 0xcb, 0x2b, 0x4d, 0xcc, 0x09, 0x28, 0xca, 0x2f, 0xcb, 0x2c, 0x06, 0x05, 0x22, 0xcc, - 0x31, 0x8d, 0x8c, 0x5c, 0xb2, 0x38, 0x14, 0x40, 0x1d, 0x95, 0xc0, 0x25, 0x98, 0x08, 0x96, 0x8b, - 0x2f, 0x80, 0x4b, 0x52, 0xe2, 0x38, 0x81, 0x44, 0x34, 0x9b, 0x8c, 0x8e, 0x32, 0x73, 0xb1, 0x82, - 0xdd, 0x20, 0xd4, 0xc0, 0xc8, 0xc5, 0x06, 0x09, 0x51, 0x21, 0x75, 0xac, 0xc1, 0x8d, 0x19, 0x7d, - 0x52, 0x1a, 0x84, 0x15, 0x42, 0x7c, 0xa2, 0xa4, 0xdc, 0x74, 0xf9, 0xc9, 0x64, 0x26, 0x59, 0x21, - 0x69, 0x7d, 0x6c, 0x49, 0x07, 0x12, 0x6d, 0x42, 0x3d, 0x8c, 0x5c, 0x9c, 0xf0, 0x98, 0x11, 0xd2, - 0xc2, 0x6d, 0x38, 0x7a, 0xbc, 0x4a, 0x69, 0x13, 0xa5, 0x16, 0xea, 0x16, 0x35, 0xb0, 0x5b, 0x14, - 0x84, 0xe4, 0xb0, 0xba, 0x05, 0x1e, 0x7f, 0x42, 0x2b, 0x19, 0xb9, 0x04, 0xd0, 0xa3, 0x46, 0xc8, - 0x10, 0xb7, 0x4d, 0x38, 0xe2, 0x59, 0xca, 0x88, 0x14, 0x2d, 0x50, 0x37, 0xea, 0x81, 0xdd, 0xa8, - 0x21, 0xa4, 0x86, 0xd5, 0x8d, 0x18, 0x89, 0xc2, 0xc9, 0xf9, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, - 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, - 0x8f, 0xe5, 0x18, 0xa2, 0x34, 0xf1, 0x26, 0x90, 0x0a, 0x88, 0xc1, 0xe0, 0x74, 0x92, 0xc4, 0x06, - 0xce, 0xaa, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x39, 0xdf, 0xd1, 0xc0, 0x49, 0x04, 0x00, - 0x00, + // 494 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x93, 0x4d, 0x6b, 0x14, 0x31, + 0x18, 0xc7, 0x37, 0x8a, 0x0b, 0x1b, 0x3d, 0xb4, 0x69, 0x7d, 0x9b, 0x6d, 0xb3, 0x65, 0x84, 0xba, + 0x56, 0x9a, 0xb0, 0x2b, 0x78, 0x14, 0x5c, 0x7b, 0x11, 0x3c, 0xd4, 0xa2, 0x17, 0x2f, 0x92, 0x9d, + 0xc6, 0x69, 0xe8, 0x4e, 0x32, 0xdd, 0x64, 0x8a, 0x7b, 0x13, 0xf1, 0xe8, 0x41, 0xf0, 0x4b, 0xe8, + 0xcd, 0x83, 0x5f, 0x41, 0xe8, 0xb1, 0xe8, 0x45, 0x3c, 0x14, 0xd9, 0x15, 0xfc, 0x1a, 0x32, 0x49, + 0xa6, 0xe2, 0x74, 0x06, 0x95, 0x5e, 0x76, 0x67, 0x9e, 0xb7, 0xff, 0x2f, 0xcf, 0x3f, 0x03, 0x3b, + 0x91, 0xd2, 0x89, 0xd2, 0x34, 0x11, 0xd2, 0xd0, 0xfd, 0xde, 0x90, 0x1b, 0xd6, 0xa3, 0x7b, 0x19, + 0x1f, 0x4f, 0x48, 0x3a, 0x56, 0x46, 0xa1, 0x05, 0x57, 0x40, 0xf2, 0x02, 0xe2, 0x0b, 0x82, 0xc5, + 0x58, 0xc5, 0xca, 0xe6, 0x69, 0xfe, 0xe4, 0x4a, 0x83, 0xa5, 0x58, 0xa9, 0x78, 0xc4, 0x29, 0x4b, + 0x05, 0x65, 0x52, 0x2a, 0xc3, 0x8c, 0x50, 0x52, 0xfb, 0x2c, 0xae, 0x52, 0xb2, 0x53, 0x5d, 0x7e, + 0x9e, 0x25, 0x42, 0x2a, 0x6a, 0x7f, 0x7d, 0xe8, 0xaa, 0x6b, 0x79, 0xea, 0x94, 0x3c, 0x88, 0x7d, + 0x09, 0x17, 0x21, 0x7a, 0x98, 0x53, 0x6e, 0xb2, 0x31, 0x4b, 0xf4, 0x16, 0xdf, 0xcb, 0xb8, 0x36, + 0xe1, 0x63, 0xb8, 0xf0, 0x47, 0x54, 0xa7, 0x4a, 0x6a, 0x8e, 0xee, 0xc0, 0x66, 0x6a, 0x23, 0x57, + 0xc0, 0x0a, 0xe8, 0x9e, 0xef, 0xb7, 0x49, 0xc5, 0xa1, 0x88, 0x6b, 0x1a, 0xb4, 0x0e, 0x8e, 0x3a, + 0x8d, 0x77, 0x3f, 0x3f, 0xac, 0x81, 0x2d, 0xdf, 0x15, 0x5e, 0x86, 0x17, 0xed, 0xd8, 0xfb, 0xf2, + 0xd9, 0xc8, 0x9e, 0xa9, 0xd0, 0x93, 0xf0, 0x52, 0x39, 0xe1, 0x25, 0x1f, 0xc1, 0x96, 0x28, 0x82, + 0x56, 0xf5, 0xc2, 0xe0, 0x76, 0x3e, 0xf8, 0xdb, 0x51, 0xa7, 0xed, 0xc4, 0xf5, 0xf6, 0x2e, 0x11, + 0x8a, 0x26, 0xcc, 0xec, 0x90, 0x07, 0x3c, 0x66, 0xd1, 0x64, 0x83, 0x47, 0x9f, 0x3f, 0xae, 0x43, + 0xcf, 0xb6, 0xc1, 0x23, 0x47, 0xf1, 0x7b, 0x50, 0x88, 0xe1, 0x92, 0xd5, 0xbb, 0x2b, 0x65, 0xc6, + 0x46, 0x9b, 0x63, 0xb5, 0x2f, 0x74, 0xbe, 0xe2, 0x82, 0xe7, 0x15, 0x80, 0xcb, 0x35, 0x05, 0x9e, + 0x2b, 0x82, 0xf3, 0xcc, 0xe6, 0xf2, 0xa5, 0xfa, 0xe4, 0x29, 0xf9, 0xe6, 0x58, 0x49, 0xac, 0xff, + 0xe9, 0x2c, 0x3c, 0x67, 0x31, 0xd0, 0x0b, 0x00, 0x9b, 0x6e, 0xaf, 0xe8, 0x7a, 0xe5, 0xd2, 0x4f, + 0x9a, 0x18, 0x74, 0xff, 0x5e, 0xe8, 0x0e, 0x13, 0x5e, 0x7b, 0xf9, 0xe5, 0xc7, 0xdb, 0x33, 0xcb, + 0xa8, 0x4d, 0xab, 0xee, 0x96, 0x33, 0x0f, 0xbd, 0x06, 0xb0, 0x75, 0xec, 0x0f, 0x5a, 0xab, 0x1f, + 0x5e, 0x76, 0x37, 0xb8, 0xf9, 0x4f, 0xb5, 0x9e, 0x65, 0xd5, 0xb2, 0xac, 0x20, 0x5c, 0xc9, 0x72, + 0x6c, 0x21, 0x7a, 0x0f, 0xe0, 0x5c, 0xd9, 0x1d, 0xd4, 0xab, 0x57, 0xaa, 0xb1, 0x3a, 0xe8, 0xff, + 0x4f, 0x8b, 0x67, 0x24, 0x96, 0xb1, 0x8b, 0x56, 0x2b, 0x19, 0x4f, 0xdc, 0x8b, 0xc1, 0xbd, 0x83, + 0x29, 0x06, 0x87, 0x53, 0x0c, 0xbe, 0x4f, 0x31, 0x78, 0x33, 0xc3, 0x8d, 0xc3, 0x19, 0x6e, 0x7c, + 0x9d, 0xe1, 0xc6, 0x93, 0x1b, 0xb1, 0x30, 0x3b, 0xd9, 0x90, 0x44, 0x2a, 0x29, 0x66, 0xb9, 0xbf, + 0x75, 0xbd, 0xbd, 0x4b, 0x9f, 0xbb, 0xc1, 0x66, 0x92, 0x72, 0x3d, 0x6c, 0xda, 0x0f, 0xf6, 0xd6, + 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x62, 0x1a, 0x74, 0xc5, 0x6a, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/nft/CHANGELOG.md b/x/nft/CHANGELOG.md index e79fa1e4405a..0003432624d7 100644 --- a/x/nft/CHANGELOG.md +++ b/x/nft/CHANGELOG.md @@ -28,3 +28,14 @@ Ref: https://keepachangelog.com/en/1.0.0/ --> # Changelog + +## [v0.1.1](https://github.com/cosmos/cosmos-sdk/releases/tag/x/nft/v0.1.1) - 2024-04-22 + +### Improvements + +* (deps) [#19810](https://github.com/cosmos/cosmos-sdk/pull/19810) Upgrade SDK version due to prometheus breaking change. +* (deps) [#19810](https://github.com/cosmos/cosmos-sdk/pull/19810) Bump `cosmossdk.io/store` to v1.1.0. + +## [v0.1.0](https://github.com/cosmos/cosmos-sdk/releases/tag/x/nft/v0.1.0) - 2023-11-07 + +* Initial release of the standalone NFT module. \ No newline at end of file diff --git a/x/nft/client/cli/tx.go b/x/nft/client/cli/tx.go deleted file mode 100644 index e6cdd2b7716e..000000000000 --- a/x/nft/client/cli/tx.go +++ /dev/null @@ -1,65 +0,0 @@ -package cli - -import ( - "fmt" - "strings" - - "github.com/spf13/cobra" - - "cosmossdk.io/x/nft" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/cosmos/cosmos-sdk/version" -) - -// GetTxCmd returns the transaction commands for this module -func GetTxCmd() *cobra.Command { - nftTxCmd := &cobra.Command{ - Use: nft.ModuleName, - Short: "nft transactions subcommands", - Long: "Provides the most common nft logic for upper-level applications, compatible with Ethereum's erc721 contract", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - nftTxCmd.AddCommand( - NewCmdSend(), - ) - - return nftTxCmd -} - -// NewCmdSend creates a CLI command for MsgSend. -func NewCmdSend() *cobra.Command { - cmd := &cobra.Command{ - Use: "send [class-id] [nft-id] [receiver] --from [sender]", - Args: cobra.ExactArgs(3), - Short: "transfer ownership of nft", - Long: strings.TrimSpace(fmt.Sprintf(` - $ %s tx %s send --from --chain-id `, version.AppName, nft.ModuleName), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - if args[0] == "" || args[1] == "" || args[2] == "" { - return fmt.Errorf("class-id, nft-id and receiver cannot be empty") - } - - msg := nft.MsgSend{ - ClassId: args[0], - Id: args[1], - Sender: clientCtx.GetFromAddress().String(), - Receiver: args[2], - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - return cmd -} diff --git a/x/nft/client/cli/tx_test.go b/x/nft/client/cli/tx_test.go deleted file mode 100644 index a6ad4dc0bc2a..000000000000 --- a/x/nft/client/cli/tx_test.go +++ /dev/null @@ -1,238 +0,0 @@ -package cli_test - -import ( - "context" - "fmt" - "io" - "testing" - - abci "github.com/cometbft/cometbft/abci/types" - rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" - "github.com/stretchr/testify/suite" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - codecaddress "github.com/cosmos/cosmos-sdk/codec/address" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" - "github.com/cosmos/cosmos-sdk/testutil" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - "github.com/cosmos/cosmos-sdk/testutil/network" - sdk "github.com/cosmos/cosmos-sdk/types" - testutilmod "github.com/cosmos/cosmos-sdk/types/module/testutil" - - "cosmossdk.io/core/address" - "cosmossdk.io/x/nft" - "cosmossdk.io/x/nft/client/cli" - nftmodule "cosmossdk.io/x/nft/module" - nfttestutil "cosmossdk.io/x/nft/testutil" -) - -const ( - OwnerName = "owner" - Owner = "cosmos1kznrznww4pd6gx0zwrpthjk68fdmqypjpkj5hp" - OwnerArmor = `-----BEGIN TENDERMINT PRIVATE KEY----- -salt: C3586B75587D2824187D2CDA22B6AFB6 -type: secp256k1 -kdf: bcrypt - -1+15OrCKgjnwym1zO3cjo/SGe3PPqAYChQ5wMHjdUbTZM7mWsH3/ueL6swgjzI3b -DDzEQAPXBQflzNW6wbne9IfT651zCSm+j1MWaGk= -=wEHs ------END TENDERMINT PRIVATE KEY-----` - - testClassID = "kitty" - testClassName = "Crypto Kitty" - testClassSymbol = "kitty" - testClassDescription = "Crypto Kitty" - testClassURI = "class uri" - testID = "kitty1" - testURI = "kitty uri" -) - -var ( - ExpClass = nft.Class{ - Id: testClassID, - Name: testClassName, - Symbol: testClassSymbol, - Description: testClassDescription, - Uri: testClassURI, - } - - ExpNFT = nft.NFT{ - ClassId: testClassID, - Id: testID, - Uri: testURI, - } -) - -type CLITestSuite struct { - suite.Suite - - kr keyring.Keyring - encCfg testutilmod.TestEncodingConfig - baseCtx client.Context - clientCtx client.Context - ctx context.Context - - owner sdk.AccAddress - - ac address.Codec -} - -func TestCLITestSuite(t *testing.T) { - suite.Run(t, new(CLITestSuite)) -} - -func (s *CLITestSuite) SetupSuite() { - s.encCfg = testutilmod.MakeTestEncodingConfig(nftmodule.AppModuleBasic{}) - s.kr = keyring.NewInMemory(s.encCfg.Codec) - s.baseCtx = client.Context{}. - WithKeyring(s.kr). - WithTxConfig(s.encCfg.TxConfig). - WithCodec(s.encCfg.Codec). - WithClient(clitestutil.MockCometRPC{Client: rpcclientmock.Client{}}). - WithAccountRetriever(client.MockAccountRetriever{}). - WithOutput(io.Discard). - WithChainID("test-chain") - - s.ctx = svrcmd.CreateExecuteContext(context.Background()) - ctxGen := func() client.Context { - bz, _ := s.encCfg.Codec.Marshal(&sdk.TxResponse{}) - c := clitestutil.NewMockCometRPC(abci.ResponseQuery{ - Value: bz, - }) - return s.baseCtx.WithClient(c) - } - s.clientCtx = ctxGen() - - cfg, err := network.DefaultConfigWithAppConfig(nfttestutil.AppConfig) - s.Require().NoError(err) - - genesisState := cfg.GenesisState - nftGenesis := nft.GenesisState{ - Classes: []*nft.Class{&ExpClass}, - Entries: []*nft.Entry{{ - Owner: Owner, - Nfts: []*nft.NFT{&ExpNFT}, - }}, - } - - nftDataBz, err := s.encCfg.Codec.MarshalJSON(&nftGenesis) - s.Require().NoError(err) - genesisState[nft.ModuleName] = nftDataBz - - s.ac = codecaddress.NewBech32Codec("cosmos") - - s.initAccount() -} - -func (s *CLITestSuite) TestCLITxSend() { - accounts := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) - - extraArgs := []string{ - fmt.Sprintf("--%s=%s", flags.FlagFrom, OwnerName), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(10))).String()), - } - - testCases := []struct { - name string - args []string - expectedCode uint32 - expectErr bool - expErrMsg string - }{ - { - "class id is empty", - []string{ - "", - testID, - accounts[0].Address.String(), - }, - 0, - true, - "class-id, nft-id and receiver cannot be empty", - }, - { - "nft id is empty", - []string{ - testClassID, - "", - accounts[0].Address.String(), - }, - 0, - true, - "class-id, nft-id and receiver cannot be empty", - }, - { - "empty receiver address", - []string{ - testClassID, - testID, - "", - }, - 0, - true, - "class-id, nft-id and receiver cannot be empty", - }, - { - "valid transaction", - []string{ - testClassID, - testID, - accounts[0].Address.String(), - }, - 0, - false, - "", - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - args := append(tc.args, extraArgs...) - cmd := cli.NewCmdSend() - cmd.SetContext(s.ctx) - cmd.SetArgs(args) - - s.Require().NoError(client.SetCmdClientContextHandler(s.clientCtx, cmd)) - - out, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, args) - if tc.expectErr { - s.Require().Error(err) - s.Require().Contains(err.Error(), tc.expErrMsg) - } else { - var txResp sdk.TxResponse - s.Require().NoError(err) - s.Require().NoError(s.clientCtx.Codec.UnmarshalJSON(out.Bytes(), &txResp), out.String()) - s.Require().Equal(tc.expectedCode, txResp.Code, out.String()) - } - }) - } -} - -func (s *CLITestSuite) initAccount() { - ctx := s.clientCtx - err := ctx.Keyring.ImportPrivKey(OwnerName, OwnerArmor, "1234567890") - s.Require().NoError(err) - accounts := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) - - keyinfo, err := ctx.Keyring.Key(OwnerName) - s.Require().NoError(err) - - args := []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(10))).String()), - } - - s.owner, err = keyinfo.GetAddress() - s.Require().NoError(err) - - amount := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(200))) - _, err = clitestutil.MsgSendExec(ctx, accounts[0].Address, s.owner, amount, s.ac, args...) - s.Require().NoError(err) -} diff --git a/x/nft/go.mod b/x/nft/go.mod index 298b33e7cd2b..7b5e7b9d8c9d 100644 --- a/x/nft/go.mod +++ b/x/nft/go.mod @@ -1,159 +1,157 @@ module cosmossdk.io/x/nft -go 1.20 +go 1.21 require ( - cosmossdk.io/api v0.4.2 - cosmossdk.io/core v0.8.0 - cosmossdk.io/depinject v1.0.0-alpha.3 - cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741 - cosmossdk.io/log v1.1.0 - cosmossdk.io/math v1.0.1 - cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c - github.com/cometbft/cometbft v0.38.0-rc1 - github.com/cosmos/cosmos-proto v1.0.0-beta.3 - github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20230524212735-6cabb6aa5741 - github.com/cosmos/gogoproto v1.4.10 + cosmossdk.io/api v0.7.5 + cosmossdk.io/core v0.11.0 + cosmossdk.io/depinject v1.0.0-alpha.4 + cosmossdk.io/errors v1.0.1 + cosmossdk.io/log v1.4.1 + cosmossdk.io/math v1.3.0 + cosmossdk.io/store v1.1.0 + github.com/cometbft/cometbft v0.38.12 + github.com/cosmos/cosmos-proto v1.0.0-beta.5 + github.com/cosmos/cosmos-sdk v0.50.6 + github.com/cosmos/gogoproto v1.7.0 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/spf13/cobra v1.7.0 - github.com/stretchr/testify v1.8.4 - google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a - google.golang.org/grpc v1.55.0 + github.com/stretchr/testify v1.9.0 + google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 + google.golang.org/grpc v1.63.2 ) require ( - cosmossdk.io/collections v0.2.0 // indirect - cosmossdk.io/x/tx v0.8.0 // indirect + cosmossdk.io/collections v0.4.0 // indirect + cosmossdk.io/x/tx v0.13.4 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect + github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect - github.com/armon/go-metrics v0.4.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/cockroachdb/errors v1.9.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect + github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f // indirect - github.com/cockroachdb/redact v1.1.4 // indirect - github.com/cometbft/cometbft-db v0.7.0 // indirect + github.com/cockroachdb/pebble v1.1.1 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/cometbft/cometbft-db v0.11.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-db v1.0.0 // indirect + github.com/cosmos/cosmos-db v1.0.2 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v1.0.0-beta.2 // indirect - github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.13.0 // indirect + github.com/cosmos/iavl v1.1.2 // indirect + github.com/cosmos/ics23/go v0.11.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/danieljoos/wincred v1.1.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect - github.com/emicklei/dot v1.4.2 // indirect + github.com/dvsekhvalnov/jose2go v1.6.0 // indirect + github.com/emicklei/dot v1.6.1 // indirect github.com/fatih/color v1.15.0 // indirect - github.com/felixge/httpsnoop v1.0.2 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/getsentry/sentry-go v0.21.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.1.0 // indirect + github.com/golang/glog v1.2.0 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/mux v1.8.0 // indirect - github.com/gorilla/websocket v1.5.0 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-plugin v1.4.10 // indirect - github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect + github.com/hashicorp/go-metrics v0.5.3 // indirect + github.com/hashicorp/go-plugin v1.5.2 // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/huandu/skiplist v1.2.0 // indirect - github.com/iancoleman/strcase v0.2.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.16.5 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect - github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.0 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect - github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 // indirect + github.com/pelletier/go-toml/v2 v2.2.2 // indirect + github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.15.1 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.20.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect - github.com/rs/cors v1.8.3 // indirect - github.com/rs/zerolog v1.29.1 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rs/cors v1.11.1 // indirect + github.com/rs/zerolog v1.33.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/cast v1.5.1 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect + github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.16.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/spf13/viper v1.19.0 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tidwall/btree v1.6.0 // indirect - github.com/zondax/hid v0.9.1 // indirect - github.com/zondax/ledger-go v0.14.1 // indirect - go.etcd.io/bbolt v1.3.6 // indirect - golang.org/x/crypto v0.9.0 // indirect - golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect - google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect - google.golang.org/protobuf v1.30.0 // indirect + github.com/tidwall/btree v1.7.0 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect + go.etcd.io/bbolt v1.3.10 // indirect + go.uber.org/multierr v1.10.0 // indirect + golang.org/x/crypto v0.26.0 // indirect + golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - gotest.tools/v3 v3.4.0 // indirect + gotest.tools/v3 v3.5.1 // indirect nhooyr.io/websocket v1.8.6 // indirect - pgregory.net/rapid v0.6.2 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + pgregory.net/rapid v1.1.0 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) - -// Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities. -// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 -replace github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.0 - -replace github.com/cosmos/cosmos-sdk => ../.. diff --git a/x/nft/go.sum b/x/nft/go.sum index 520a0c799543..8bb436469235 100644 --- a/x/nft/go.sum +++ b/x/nft/go.sum @@ -1,58 +1,23 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.4.2 h1:lQBMl4xINnMnBOR/tQLtjlDnR4exr4e6/SfHR8PILE0= -cosmossdk.io/api v0.4.2/go.mod h1:qrVgOp7DIeAXa+Tt5dDjOC47bZCDrwx8ZHxrmy7STNE= -cosmossdk.io/collections v0.2.0 h1:CgMfLtE16+qox3zBYrGh60i4yKV8SeExLnIdOS2sbQs= -cosmossdk.io/collections v0.2.0/go.mod h1:Oc1FK0vlmxJZsgUn9/o3ldE6zNyWKvobVzaLhWknZJE= -cosmossdk.io/core v0.8.0 h1:LcJnu52E1a8f8E317VfQ1xK/RZe+IuhMNQAjnDLh25M= -cosmossdk.io/core v0.8.0/go.mod h1:LF6VLOv2DdCiaHxYVmr0MZcZpaSM9ZgvyrQSYTeg6D0= -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.0.20230524212735-6cabb6aa5741 h1:BCRz06fvddw7cKGiEGDiSox3qMsjQ97f92K+PDZDHdc= -cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741/go.mod h1:TB05o6YXkZkzsc+6bZFAV5kZRBtoCU9tUkbeMIqEg0w= -cosmossdk.io/log v1.1.0 h1:v0ogPHYeTzPcBTcPR1A3j1hkei4pZama8kz8LKlCMv0= -cosmossdk.io/log v1.1.0/go.mod h1:6zjroETlcDs+mm62gd8Ig7mZ+N+fVOZS91V17H+M4N4= -cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c h1:A+FMPW9GtfcPBDQNtFeDFN27h1SAP6OVjnGgPLlYXmI= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c/go.mod h1:RbYGvXCbz8uNBCXrwS9Z8SyydeWi+W5x5MZ33muyzMw= -cosmossdk.io/x/tx v0.8.0 h1:gLiGRL/Fy7fs6dd0IX8jOf0PrVr56/SG6XVMGQjyvJU= -cosmossdk.io/x/tx v0.8.0/go.mod h1:T9uEumGNgKU61gJYRv1t3uzQwLnASpJGmSE229HM3xA= +cosmossdk.io/api v0.7.5 h1:eMPTReoNmGUm8DeiQL9DyM8sYDjEhWzL1+nLbI9DqtQ= +cosmossdk.io/api v0.7.5/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= +cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= +cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= +cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= +cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= +cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= +cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= +cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= +cosmossdk.io/store v1.1.0 h1:LnKwgYMc9BInn9PhpTFEQVbL9UK475G2H911CGGnWHk= +cosmossdk.io/store v1.1.0/go.mod h1:oZfW/4Fc/zYqu3JmQcQdUJ3fqu5vnYTn3LZFFy8P8ng= +cosmossdk.io/x/tx v0.13.4 h1:Eg0PbJgeO0gM8p5wx6xa0fKR7hIV6+8lC56UrsvSo0Y= +cosmossdk.io/x/tx v0.13.4/go.mod h1:BkFqrnGGgW50Y6cwTy+JvgAhiffbGEKW6KF9ufcDpvk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= @@ -60,30 +25,28 @@ github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMb github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= +github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -95,14 +58,11 @@ github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -111,15 +71,16 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.7.0 h1:YjAGVd3XmtK9ktAbX8Zg2g2PwLIMjGREZJHlV4j7NEo= -github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= -github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= -github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= +github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= +github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ= +github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c= +github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= -github.com/bufbuild/protocompile v0.5.1 h1:mixz5lJX4Hiz4FpqFREJHIXLfaLBntfaJv1h+/jS+Qg= -github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= -github.com/bytedance/sonic v1.8.0 h1:ea0Xadu+sHlu7x5O3gKhRpQ1IKiMrSiHttPF0ybECuA= -github.com/bytedance/sonic v1.8.0/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= +github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -130,21 +91,18 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA 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.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= +github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= @@ -152,27 +110,29 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= +github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f h1:qQW3qCVRpjYsV4YNaUOjm6YLeliAD2jpgex9+D9tqU4= -github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f/go.mod h1:TkdVsGYRqtULUppt2RbC+YaKtTHnHoWa2apfFrSKABw= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/redact v1.1.4 h1:Y0XrVI2FAyofNyGveodTN//qdpPtFKcKTeCBsK3AHAQ= -github.com/cockroachdb/redact v1.1.4/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= +github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/cometbft/cometbft v0.38.0-rc1 h1:ph6smlqX82aH+d72KuxDHqu29M7LyusSp/obfGsGX/w= -github.com/cometbft/cometbft v0.38.0-rc1/go.mod h1:5Jz0Z8YsHSf0ZaAqGvi/ifioSdVFPtEGrm8Y9T/993k= -github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= -github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= +github.com/cometbft/cometbft v0.38.12 h1:OWsLZN2KcSSFe8bet9xCn07VwhBnavPea3VyPnNq1bg= +github.com/cometbft/cometbft v0.38.12/go.mod h1:GPHp3/pehPqgX1930HmK1BpBLZPxB75v/dZg8Viwy+o= +github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= +github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/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= @@ -181,41 +141,42 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= -github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= -github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= -github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= +github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= +github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/cosmos-sdk v0.50.6 h1:efR3MsvMHX5sxS3be+hOobGk87IzlZbSpsI2x/Vw3hk= +github.com/cosmos/cosmos-sdk v0.50.6/go.mod h1:lVkRY6cdMJ0fG3gp8y4hFrsKZqF4z7y0M2UXFb9Yt40= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cosmos/iavl v1.0.0-beta.2 h1:XOsIM80Yyml/KifCXEYOy9tWCXwMAbLa91n6pReW07Y= -github.com/cosmos/iavl v1.0.0-beta.2/go.mod h1:EA97dJ07TBktRlG/iGzK6g1eCXNj1q3MGoFYkVzrwHE= -github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= -github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= -github.com/cosmos/ledger-cosmos-go v0.13.0 h1:ex0CvCxToSR7j5WjrghPu2Bu9sSXKikjnVvUryNnx4s= -github.com/cosmos/ledger-cosmos-go v0.13.0/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= +github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= +github.com/cosmos/iavl v1.1.2 h1:zL9FK7C4L/P4IF1Dm5fIwz0WXCnn7Bp1M2FxH0ayM7Y= +github.com/cosmos/iavl v1.1.2/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= +github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= +github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew 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/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= 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= @@ -226,66 +187,57 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUn 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/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= -github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= +github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/emicklei/dot v1.4.2 h1:UbK6gX4yvrpHKlxuUQicwoAis4zl8Dzwit9SnbBAXWw= -github.com/emicklei/dot v1.4.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= +github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -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/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= -github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= 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/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.21.0 h1:c9l5F1nPF30JIppulk4veau90PK6Smu3abgVtVQWon4= -github.com/getsentry/sentry-go v0.21.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.9.0 h1:OjyFBKICoexlu99ctXNR2gg+c5pKrKMuyjgARg9qeY8= -github.com/gin-gonic/gin v1.9.0/go.mod h1:W1Me9+hsUSyj3CePGrd1/QrKJMSJ1Tu/0hFEH89961k= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -300,14 +252,16 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= -github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= -github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= -github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= -github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU= -github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= +github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= +github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= 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= @@ -317,13 +271,11 @@ github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/goccy/go-json v0.10.0 h1:mXKd9Qw4NuzShiRlOXKews24ufknHO7gx30lsDyokKA= -github.com/goccy/go-json v0.10.0/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -334,22 +286,12 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV 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/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -357,7 +299,6 @@ github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= 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= @@ -369,13 +310,12 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 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/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -384,41 +324,22 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a 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.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= @@ -429,8 +350,8 @@ github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= @@ -451,10 +372,12 @@ github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVH github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= +github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v1.4.10 h1:xUbmA4jC6Dq163/fWcp8P3JuHilrHHMLNRxzGQJ9hNk= -github.com/hashicorp/go-plugin v1.4.10/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -466,8 +389,10 @@ github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -484,24 +409,17 @@ github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0Jr github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= -github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= @@ -514,87 +432,60 @@ github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= 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.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= -github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid v1.2.1 h1:vJi+O/nMdFt0vqm8NZBI6wzALWdA2X+egi0ogNyrC/w= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= -github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.0 h1:H4L/LhP7GOMf1j17oQAElHgVlbEje2h14A8Tz9cM2BE= -github.com/linxGnu/grocksdb v1.8.0/go.mod h1:09CeBborffXhXdNpEcOeZrLKEnRtrZFEpFdPNI9Zjjg= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= +github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= @@ -617,9 +508,10 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -635,8 +527,8 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA 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/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce h1:/pEpMk55wH0X+E5zedGEMOdLuWmV8P4+4W3+LZaM6kg= -github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= @@ -644,7 +536,6 @@ github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DV 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.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= @@ -656,10 +547,14 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -669,19 +564,19 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 h1:W04oB3d0J01W5jgYRGKsV8LCM6g9EkCvPkZcmFuy0OE= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= @@ -692,9 +587,9 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -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/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -702,103 +597,102 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/prometheus/client_golang v1.20.1 h1:IMJXHOD6eARkQpxo8KkhgEVFlBNm+nkrFUyGlIu7Na8= +github.com/prometheus/client_golang v1.20.1/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= -github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= 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/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= 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.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= 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= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= +github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/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/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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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= @@ -808,69 +702,43 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= -github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= -github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.9 h1:rmenucSohSTiyL09Y+l2OCk+FrMxGMzho2+tjr5ticU= -github.com/ugorji/go/codec v1.2.9/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= -github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= -github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/bbolt v1.3.10 h1:+BqfJTcCzTItrop8mq/lbzL8wSGtj94UO/3U31shqG0= +go.etcd.io/bbolt v1.3.10/go.mod h1:bK3UQLPJZly7IlNmV7uVHJDxfe5aK9Ll93e/74Y9oEQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -880,70 +748,44 @@ go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -golang.org/x/arch v0.0.0-20210923205945-b76863e36670 h1:18EFjUmQOcUvxNYSkA6jO9VAiXCnxFY6NyDX0bHDmkU= -golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= 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= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 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/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -955,73 +797,37 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/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-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/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-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1033,17 +839,12 @@ golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1052,263 +853,120 @@ golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/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-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-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 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.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -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= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= 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= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 h1:x1vNwUhVOcsYoKyEGCZBH694SBmmBjA2EfauFVEI2+M= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a h1:HiYVD+FGJkTo+9zj1gqz0anapsa1JxjiSrN+BJKyUmE= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 h1:rIo7ocm2roD9DcFIX67Ym8icoGCKSARAiPljFhh5suQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2/go.mod h1:O1cOfN1Cy6QEYr7VxtjOyP5AdAuR0aJ/MYZaaof623Y= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= @@ -1323,8 +981,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1336,10 +994,8 @@ gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= @@ -1354,30 +1010,21 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -pgregory.net/rapid v0.6.2 h1:ErW5sL+UKtfBfUTsWHDCoeB+eZKLKMxrSd1VJY6W4bw= -pgregory.net/rapid v0.6.2/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/x/nft/keeper/genesis.go b/x/nft/keeper/genesis.go index 9b57cd8b65e1..20631dbbf65b 100644 --- a/x/nft/keeper/genesis.go +++ b/x/nft/keeper/genesis.go @@ -4,6 +4,7 @@ import ( "sort" "cosmossdk.io/x/nft" + sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -37,11 +38,15 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *nft.GenesisState { nfts := k.GetNFTsOfClass(ctx, class.Id) for i, n := range nfts { owner := k.GetOwner(ctx, n.ClassId, n.Id) - nftArr, ok := nftMap[owner.String()] + ownerStr, err := k.ac.BytesToString(owner.Bytes()) + if err != nil { + panic(err) + } + nftArr, ok := nftMap[ownerStr] if !ok { nftArr = make([]*nft.NFT, 0) } - nftMap[owner.String()] = append(nftArr, &nfts[i]) + nftMap[ownerStr] = append(nftArr, &nfts[i]) } } diff --git a/x/nft/keeper/grpc_query.go b/x/nft/keeper/grpc_query.go index 274238288185..e4ccb1cc31f6 100644 --- a/x/nft/keeper/grpc_query.go +++ b/x/nft/keeper/grpc_query.go @@ -50,7 +50,14 @@ func (k Keeper) Owner(goCtx context.Context, r *nft.QueryOwnerRequest) (*nft.Que ctx := sdk.UnwrapSDKContext(goCtx) owner := k.GetOwner(ctx, r.ClassId, r.Id) - return &nft.QueryOwnerResponse{Owner: owner.String()}, nil + if owner.Empty() { + return &nft.QueryOwnerResponse{Owner: ""}, nil + } + ownerstr, err := k.ac.BytesToString(owner.Bytes()) + if err != nil { + return nil, err + } + return &nft.QueryOwnerResponse{Owner: ownerstr}, nil } // Supply return the number of NFTs from the given class, same as totalSupply of ERC721. diff --git a/x/nft/keeper/grpc_query_test.go b/x/nft/keeper/grpc_query_test.go index fb84c14b3714..42e5c5658662 100644 --- a/x/nft/keeper/grpc_query_test.go +++ b/x/nft/keeper/grpc_query_test.go @@ -5,11 +5,12 @@ import ( "fmt" "testing" - "github.com/cosmos/cosmos-sdk/codec/address" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" "cosmossdk.io/x/nft" + + "github.com/cosmos/cosmos-sdk/codec/address" ) func TestGRPCQuery(t *testing.T) { @@ -53,7 +54,7 @@ func (s *TestSuite) TestBalance() { s.TestMint() req = &nft.QueryBalanceRequest{ ClassId: testClassID, - Owner: s.addrs[0].String(), + Owner: s.encodedAddrs[0], } }, "", @@ -144,7 +145,7 @@ func (s *TestSuite) TestOwner() { ClassId: testClassID, Id: testID, } - owner = s.addrs[0].String() + owner = s.encodedAddrs[0] }, "", func(index int, require *require.Assertions, res *nft.QueryOwnerResponse) { @@ -274,7 +275,7 @@ func (s *TestSuite) TestNFTs() { "success,empty ClassId and no nft", func(index int, require *require.Assertions) { req = &nft.QueryNFTsRequest{ - Owner: s.addrs[1].String(), + Owner: s.encodedAddrs[1], } s.TestSaveClass() }, @@ -322,7 +323,7 @@ func (s *TestSuite) TestNFTs() { } req = &nft.QueryNFTsRequest{ - Owner: s.addrs[2].String(), + Owner: s.encodedAddrs[2], } }, "", @@ -347,7 +348,7 @@ func (s *TestSuite) TestNFTs() { func(index int, require *require.Assertions) { req = &nft.QueryNFTsRequest{ ClassId: testClassID, - Owner: s.addrs[0].String(), + Owner: s.encodedAddrs[0], } nfts = []*nft.NFT{ { diff --git a/x/nft/keeper/keeper_test.go b/x/nft/keeper/keeper_test.go index be8e4a47ac44..13d7e6d1caa7 100644 --- a/x/nft/keeper/keeper_test.go +++ b/x/nft/keeper/keeper_test.go @@ -40,6 +40,7 @@ type TestSuite struct { ctx sdk.Context addrs []sdk.AccAddress + encodedAddrs []string queryClient nft.QueryClient nftKeeper keeper.Keeper accountKeeper *nfttestutil.MockAccountKeeper @@ -64,6 +65,12 @@ func (s *TestSuite) SetupTest() { accountKeeper.EXPECT().GetModuleAddress("nft").Return(s.addrs[0]).AnyTimes() accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec("cosmos")).AnyTimes() + for _, addr := range s.addrs { + st, err := accountKeeper.AddressCodec().BytesToString(addr.Bytes()) + s.Require().NoError(err) + s.encodedAddrs = append(s.encodedAddrs, st) + } + s.accountKeeper = accountKeeper nftKeeper := keeper.NewKeeper(storeService, s.encCfg.Codec, accountKeeper, bankKeeper) @@ -348,7 +355,7 @@ func (s *TestSuite) TestExportGenesis() { expGenesis := &nft.GenesisState{ Classes: []*nft.Class{&class}, Entries: []*nft.Entry{{ - Owner: s.addrs[0].String(), + Owner: s.encodedAddrs[0], Nfts: []*nft.NFT{&expNFT}, }}, } @@ -373,7 +380,7 @@ func (s *TestSuite) TestInitGenesis() { expGenesis := &nft.GenesisState{ Classes: []*nft.Class{&expClass}, Entries: []*nft.Entry{{ - Owner: s.addrs[0].String(), + Owner: s.encodedAddrs[0], Nfts: []*nft.NFT{&expNFT}, }}, } diff --git a/x/nft/keeper/keys.go b/x/nft/keeper/keys.go index 8b725542aa3a..51c8b274356d 100644 --- a/x/nft/keeper/keys.go +++ b/x/nft/keeper/keys.go @@ -5,6 +5,7 @@ import ( "cosmossdk.io/x/nft" "cosmossdk.io/x/nft/internal/conv" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" ) diff --git a/x/nft/keeper/msg_server_test.go b/x/nft/keeper/msg_server_test.go index fc044a5f995c..ae70d60b52d9 100644 --- a/x/nft/keeper/msg_server_test.go +++ b/x/nft/keeper/msg_server_test.go @@ -37,7 +37,7 @@ func (s *TestSuite) TestSend() { expGenesis := &nft.GenesisState{ Classes: []*nft.Class{&ExpClass}, Entries: []*nft.Entry{{ - Owner: s.addrs[0].String(), + Owner: s.encodedAddrs[0], Nfts: []*nft.NFT{&ExpNFT}, }}, } @@ -55,8 +55,8 @@ func (s *TestSuite) TestSend() { req: &nft.MsgSend{ ClassId: testClassID, Id: "", - Sender: s.addrs[0].String(), - Receiver: s.addrs[1].String(), + Sender: s.encodedAddrs[0], + Receiver: s.encodedAddrs[1], }, expErr: true, errMsg: "empty nft id", @@ -66,8 +66,8 @@ func (s *TestSuite) TestSend() { req: &nft.MsgSend{ ClassId: "", Id: testID, - Sender: s.addrs[0].String(), - Receiver: s.addrs[1].String(), + Sender: s.encodedAddrs[0], + Receiver: s.encodedAddrs[1], }, expErr: true, errMsg: "empty class id", @@ -77,8 +77,8 @@ func (s *TestSuite) TestSend() { req: &nft.MsgSend{ ClassId: "invalid ClassId", Id: testID, - Sender: s.addrs[0].String(), - Receiver: s.addrs[1].String(), + Sender: s.encodedAddrs[0], + Receiver: s.encodedAddrs[1], }, expErr: true, errMsg: "unauthorized", @@ -88,8 +88,8 @@ func (s *TestSuite) TestSend() { req: &nft.MsgSend{ ClassId: testClassID, Id: "invalid Id", - Sender: s.addrs[0].String(), - Receiver: s.addrs[1].String(), + Sender: s.encodedAddrs[0], + Receiver: s.encodedAddrs[1], }, expErr: true, errMsg: "unauthorized", @@ -99,19 +99,19 @@ func (s *TestSuite) TestSend() { req: &nft.MsgSend{ ClassId: testClassID, Id: testID, - Sender: s.addrs[1].String(), - Receiver: s.addrs[2].String(), + Sender: s.encodedAddrs[1], + Receiver: s.encodedAddrs[2], }, expErr: true, - errMsg: fmt.Sprintf("%s is not the owner of nft %s", s.addrs[1].String(), testID), + errMsg: fmt.Sprintf("%s is not the owner of nft %s", s.encodedAddrs[1], testID), }, { name: "valid transaction", req: &nft.MsgSend{ ClassId: testClassID, Id: testID, - Sender: s.addrs[0].String(), - Receiver: s.addrs[1].String(), + Sender: s.encodedAddrs[0], + Receiver: s.encodedAddrs[1], }, expErr: false, errMsg: "", diff --git a/x/nft/keeper/nft.go b/x/nft/keeper/nft.go index a2f1426891b9..d99af1322c73 100644 --- a/x/nft/keeper/nft.go +++ b/x/nft/keeper/nft.go @@ -21,22 +21,25 @@ func (k Keeper) Mint(ctx context.Context, token nft.NFT, receiver sdk.AccAddress return errors.Wrap(nft.ErrNFTExists, token.Id) } - k.mintWithNoCheck(ctx, token, receiver) - return nil + return k.mintWithNoCheck(ctx, token, receiver) } // mintWithNoCheck defines a method for minting a new nft // Note: this method does not check whether the class already exists in nft. // The upper-layer application needs to check it when it needs to use it. -func (k Keeper) mintWithNoCheck(ctx context.Context, token nft.NFT, receiver sdk.AccAddress) { +func (k Keeper) mintWithNoCheck(ctx context.Context, token nft.NFT, receiver sdk.AccAddress) error { k.setNFT(ctx, token) k.setOwner(ctx, token.ClassId, token.Id, receiver) k.incrTotalSupply(ctx, token.ClassId) - sdk.UnwrapSDKContext(ctx).EventManager().EmitTypedEvent(&nft.EventMint{ + recStr, err := k.ac.BytesToString(receiver.Bytes()) + if err != nil { + return err + } + return sdk.UnwrapSDKContext(ctx).EventManager().EmitTypedEvent(&nft.EventMint{ ClassId: token.ClassId, Id: token.Id, - Owner: receiver.String(), + Owner: recStr, }) } @@ -65,12 +68,16 @@ func (k Keeper) burnWithNoCheck(ctx context.Context, classID, nftID string) erro k.deleteOwner(ctx, classID, nftID, owner) k.decrTotalSupply(ctx, classID) - sdk.UnwrapSDKContext(ctx).EventManager().EmitTypedEvent(&nft.EventBurn{ + ownerStr, err := k.ac.BytesToString(owner.Bytes()) + if err != nil { + return err + } + + return sdk.UnwrapSDKContext(ctx).EventManager().EmitTypedEvent(&nft.EventBurn{ ClassId: classID, Id: nftID, - Owner: owner.String(), + Owner: ownerStr, }) - return nil } // Update defines a method for updating an exist nft diff --git a/x/nft/keeper/nft_batch.go b/x/nft/keeper/nft_batch.go index 474842869f66..889e67fe334c 100644 --- a/x/nft/keeper/nft_batch.go +++ b/x/nft/keeper/nft_batch.go @@ -25,7 +25,9 @@ func (k Keeper) BatchMint(ctx context.Context, } checked[token.ClassId] = true - k.mintWithNoCheck(ctx, token, receiver) + if err := k.mintWithNoCheck(ctx, token, receiver); err != nil { + return err + } } return nil } diff --git a/x/nft/module/autocli.go b/x/nft/module/autocli.go index 3dec1af45eb5..5a9d8289fc5c 100644 --- a/x/nft/module/autocli.go +++ b/x/nft/module/autocli.go @@ -6,6 +6,7 @@ import ( autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" nftv1beta1 "cosmossdk.io/api/cosmos/nft/v1beta1" "cosmossdk.io/x/nft" + "github.com/cosmos/cosmos-sdk/version" ) @@ -82,6 +83,19 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { }, Tx: &autocliv1.ServiceCommandDescriptor{ Service: nftv1beta1.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Send", + Use: "send [class-id] [nft-id] [receiver] --from [sender]", + Short: "Transfer ownership of NFT", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "class_id"}, + {ProtoField: "id"}, + {ProtoField: "receiver"}, + }, + // Sender is the signer of the transaction and is automatically added as from flag by AutoCLI. + }, + }, }, } } diff --git a/x/nft/module/module.go b/x/nft/module/module.go index aa661b328db4..2728032358c9 100644 --- a/x/nft/module/module.go +++ b/x/nft/module/module.go @@ -4,16 +4,18 @@ import ( "context" "encoding/json" - abci "github.com/cometbft/cometbft/abci/types" gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/spf13/cobra" "google.golang.org/grpc" + modulev1 "cosmossdk.io/api/cosmos/nft/module/v1" "cosmossdk.io/core/address" "cosmossdk.io/core/appmodule" "cosmossdk.io/core/store" "cosmossdk.io/depinject" "cosmossdk.io/errors" + "cosmossdk.io/x/nft" + "cosmossdk.io/x/nft/keeper" + "cosmossdk.io/x/nft/simulation" sdkclient "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -21,19 +23,15 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - - modulev1 "cosmossdk.io/api/cosmos/nft/module/v1" - - "cosmossdk.io/x/nft" - "cosmossdk.io/x/nft/client/cli" - "cosmossdk.io/x/nft/keeper" - "cosmossdk.io/x/nft/simulation" ) var ( - _ module.AppModule = AppModule{} - _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModuleBasic = AppModule{} _ module.AppModuleSimulation = AppModule{} + _ module.HasGenesis = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasServices = AppModule{} ) // AppModuleBasic defines the basic application module used by the nft module. @@ -86,17 +84,6 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx sdkclient.Context, mux } } -// GetQueryCmd returns a no-op command for the nft module. -// Queries for NFT are registered by autocli. -func (ab AppModuleBasic) GetQueryCmd() *cobra.Command { - return nil -} - -// GetTxCmd returns the transaction commands for the nft module -func (AppModuleBasic) GetTxCmd() *cobra.Command { - return cli.GetTxCmd() -} - // AppModule implements the sdk.AppModule interface type AppModule struct { AppModuleBasic @@ -118,29 +105,18 @@ func NewAppModule(cdc codec.Codec, keeper keeper.Keeper, ak nft.AccountKeeper, b } } -var ( - _ appmodule.AppModule = AppModule{} - _ appmodule.HasServices = AppModule{} -) - // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} // IsAppModule implements the appmodule.AppModule interface. func (am AppModule) IsAppModule() {} -// Name returns the nft module's name. -func (AppModule) Name() string { - return nft.ModuleName -} - // InitGenesis performs genesis initialization for the nft module. It returns // no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) { var genesisState nft.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) am.keeper.InitGenesis(ctx, &genesisState) - return []abci.ValidatorUpdate{} } // ExportGenesis returns the exported genesis state as raw bytes for the nft @@ -158,8 +134,8 @@ func (AppModule) ConsensusVersion() uint64 { return 1 } // AppModuleSimulation functions // GenerateGenesisState creates a randomized GenState of the nft module. -func (AppModule) GenerateGenesisState(simState *module.SimulationState) { - simulation.RandomizedGenState(simState) +func (am AppModule) GenerateGenesisState(simState *module.SimulationState) { + simulation.RandomizedGenState(simState, am.accountKeeper.AddressCodec()) } // RegisterStoreDecoder registers a decoder for nft module's types diff --git a/x/nft/msgs.go b/x/nft/msgs.go deleted file mode 100644 index 081737eb973d..000000000000 --- a/x/nft/msgs.go +++ /dev/null @@ -1,18 +0,0 @@ -package nft - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -const ( - // TypeMsgSend nft message types - TypeMsgSend = "send" -) - -var _ sdk.Msg = &MsgSend{} - -// GetSigners returns the expected signers for MsgSend. -func (m MsgSend) GetSigners() []sdk.AccAddress { - signer, _ := sdk.AccAddressFromBech32(m.Sender) - return []sdk.AccAddress{signer} -} diff --git a/x/nft/simulation/decoder.go b/x/nft/simulation/decoder.go index 6dbfef23350f..7c7fcef4a0bf 100644 --- a/x/nft/simulation/decoder.go +++ b/x/nft/simulation/decoder.go @@ -6,6 +6,7 @@ import ( "cosmossdk.io/x/nft" "cosmossdk.io/x/nft/keeper" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/kv" diff --git a/x/nft/simulation/decoder_test.go b/x/nft/simulation/decoder_test.go index 4e9b26a40a9b..d3fff88a87a2 100644 --- a/x/nft/simulation/decoder_test.go +++ b/x/nft/simulation/decoder_test.go @@ -10,6 +10,7 @@ import ( "cosmossdk.io/x/nft/keeper" "cosmossdk.io/x/nft/module" "cosmossdk.io/x/nft/simulation" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/kv" diff --git a/x/nft/simulation/genesis.go b/x/nft/simulation/genesis.go index b40f07f04500..ec115681f7e0 100644 --- a/x/nft/simulation/genesis.go +++ b/x/nft/simulation/genesis.go @@ -3,6 +3,7 @@ package simulation import ( "math/rand" + "cosmossdk.io/core/address" "cosmossdk.io/x/nft" "github.com/cosmos/cosmos-sdk/types/module" @@ -25,12 +26,16 @@ func genClasses(r *rand.Rand, accounts []simtypes.Account) []*nft.Class { } // genNFT returns a slice of nft. -func genNFT(r *rand.Rand, classID string, accounts []simtypes.Account) []*nft.Entry { +func genNFT(r *rand.Rand, classID string, accounts []simtypes.Account, ac address.Codec) []*nft.Entry { entries := make([]*nft.Entry, len(accounts)-1) for i := 0; i < len(accounts)-1; i++ { owner := accounts[i] + oast, err := ac.BytesToString(owner.Address.Bytes()) + if err != nil { + panic(err) + } entries[i] = &nft.Entry{ - Owner: owner.Address.String(), + Owner: oast, Nfts: []*nft.NFT{ { ClassId: classID, @@ -44,7 +49,7 @@ func genNFT(r *rand.Rand, classID string, accounts []simtypes.Account) []*nft.En } // RandomizedGenState generates a random GenesisState for nft. -func RandomizedGenState(simState *module.SimulationState) { +func RandomizedGenState(simState *module.SimulationState, ac address.Codec) { var classes []*nft.Class simState.AppParams.GetOrGenerate( "nft", &classes, simState.Rand, @@ -56,7 +61,7 @@ func RandomizedGenState(simState *module.SimulationState) { "nft", &entries, simState.Rand, func(r *rand.Rand) { class := classes[r.Int63n(int64(len(classes)))] - entries = genNFT(r, class.Id, simState.Accounts) + entries = genNFT(r, class.Id, simState.Accounts, ac) }, ) diff --git a/x/nft/simulation/genesis_test.go b/x/nft/simulation/genesis_test.go index b352450646e8..a04511ed154a 100644 --- a/x/nft/simulation/genesis_test.go +++ b/x/nft/simulation/genesis_test.go @@ -11,6 +11,8 @@ import ( "cosmossdk.io/x/nft" nftmodule "cosmossdk.io/x/nft/module" "cosmossdk.io/x/nft/simulation" + + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/types/module" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -32,7 +34,7 @@ func TestRandomizedGenState(t *testing.T) { GenState: make(map[string]json.RawMessage), } - simulation.RandomizedGenState(&simState) + simulation.RandomizedGenState(&simState, addresscodec.NewBech32Codec("cosmos")) var nftGenesis nft.GenesisState simState.Cdc.MustUnmarshalJSON(simState.GenState[nft.ModuleName], &nftGenesis) diff --git a/x/nft/simulation/operations.go b/x/nft/simulation/operations.go index 2f76e648d4cc..c7bdbaa2e753 100644 --- a/x/nft/simulation/operations.go +++ b/x/nft/simulation/operations.go @@ -3,6 +3,9 @@ package simulation import ( "math/rand" + "cosmossdk.io/x/nft" + "cosmossdk.io/x/nft/keeper" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -11,9 +14,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" - - "cosmossdk.io/x/nft" - "cosmossdk.io/x/nft/keeper" ) const ( @@ -87,11 +87,21 @@ func SimulateMsgSend( return simtypes.NoOpMsg(nft.ModuleName, TypeMsgSend, err.Error()), nil, err } + senderStr, err := ak.AddressCodec().BytesToString(senderAcc.GetAddress().Bytes()) + if err != nil { + return simtypes.NoOpMsg(nft.ModuleName, TypeMsgSend, err.Error()), nil, err + } + + recieverStr, err := ak.AddressCodec().BytesToString(receiver.Address.Bytes()) + if err != nil { + return simtypes.NoOpMsg(nft.ModuleName, TypeMsgSend, err.Error()), nil, err + } + msg := &nft.MsgSend{ ClassId: n.ClassId, Id: n.Id, - Sender: senderAcc.GetAddress().String(), - Receiver: receiver.Address.String(), + Sender: senderStr, + Receiver: recieverStr, } tx, err := simtestutil.GenSignedMockTx( diff --git a/x/nft/simulation/operations_test.go b/x/nft/simulation/operations_test.go index 6c315f323027..fad8cf9996e7 100644 --- a/x/nft/simulation/operations_test.go +++ b/x/nft/simulation/operations_test.go @@ -5,12 +5,11 @@ import ( "testing" "time" - "github.com/stretchr/testify/suite" - - "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" + "github.com/stretchr/testify/suite" "cosmossdk.io/depinject" + "cosmossdk.io/log" "cosmossdk.io/x/nft" nftkeeper "cosmossdk.io/x/nft/keeper" "cosmossdk.io/x/nft/simulation" diff --git a/x/nft/testutil/app_config.go b/x/nft/testutil/app_config.go index fab097763fa8..6e7d85f77539 100644 --- a/x/nft/testutil/app_config.go +++ b/x/nft/testutil/app_config.go @@ -1,9 +1,9 @@ package testutil import ( - "github.com/cosmos/cosmos-sdk/testutil/configurator" + _ "cosmossdk.io/x/nft/module" // import as blank for app wiring - _ "cosmossdk.io/x/nft/module" // import as blank for app wiring + "github.com/cosmos/cosmos-sdk/testutil/configurator" _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/bank" // import as blank for app wiring diff --git a/x/params/autocli.go b/x/params/autocli.go new file mode 100644 index 000000000000..b01e73e45504 --- /dev/null +++ b/x/params/autocli.go @@ -0,0 +1,31 @@ +package params + +import ( + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + paramsv1beta1 "cosmossdk.io/api/cosmos/params/v1beta1" +) + +// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: paramsv1beta1.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Params", + Use: "subspace [subspace] [key]", + Short: "Query for raw parameters by subspace and key", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "subspace"}, + {ProtoField: "key"}, + }, + }, + { + RpcMethod: "Subspaces", + Use: "subspaces", + Short: "Query for all registered subspaces and all keys for a subspace", + }, + }, + }, + } +} diff --git a/x/params/client/cli/query.go b/x/params/client/cli/query.go deleted file mode 100644 index ce7b45d0602d..000000000000 --- a/x/params/client/cli/query.go +++ /dev/null @@ -1,54 +0,0 @@ -package cli - -import ( - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/cosmos/cosmos-sdk/x/params/types/proposal" -) - -// NewQueryCmd returns a root CLI command handler for all x/params query commands. -func NewQueryCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: types.ModuleName, - Short: "Querying commands for the params module", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - cmd.AddCommand(NewQuerySubspaceParamsCmd()) - - return cmd -} - -// NewQuerySubspaceParamsCmd returns a CLI command handler for querying subspace -// parameters managed by the x/params module. -func NewQuerySubspaceParamsCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "subspace [subspace] [key]", - Short: "Query for raw parameters by subspace and key", - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := proposal.NewQueryClient(clientCtx) - - params := proposal.QueryParamsRequest{Subspace: args[0], Key: args[1]} - res, err := queryClient.Params(cmd.Context(), ¶ms) - if err != nil { - return err - } - - return clientCtx.PrintProto(&res.Param) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/params/keeper/keeper_test.go b/x/params/keeper/keeper_test.go index 721253ca6b19..eca29c0462bc 100644 --- a/x/params/keeper/keeper_test.go +++ b/x/params/keeper/keeper_test.go @@ -4,10 +4,10 @@ import ( "reflect" "testing" - "cosmossdk.io/math" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" + "cosmossdk.io/math" "cosmossdk.io/store/prefix" storetypes "cosmossdk.io/store/types" diff --git a/x/params/module.go b/x/params/module.go index 5f312dd5cc6b..8dfe121bea9b 100644 --- a/x/params/module.go +++ b/x/params/module.go @@ -3,10 +3,7 @@ package params import ( "context" - govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/spf13/cobra" modulev1 "cosmossdk.io/api/cosmos/params/module/v1" "cosmossdk.io/core/appmodule" @@ -18,16 +15,18 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/cosmos-sdk/x/params/client/cli" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/cosmos/cosmos-sdk/x/params/keeper" "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/cosmos/cosmos-sdk/x/params/types/proposal" ) var ( - _ module.AppModule = AppModule{} - _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModuleBasic = AppModule{} _ module.AppModuleSimulation = AppModule{} + _ module.HasServices = AppModule{} + + _ appmodule.AppModule = AppModule{} ) // ConsensusVersion defines the current x/params module consensus version. @@ -53,14 +52,6 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *g } } -// GetTxCmd returns no root tx command for the params module. -func (AppModuleBasic) GetTxCmd() *cobra.Command { return nil } - -// GetQueryCmd returns no root query command for the params module. -func (AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.NewQueryCmd() -} - func (am AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { proposal.RegisterInterfaces(registry) } @@ -80,8 +71,6 @@ func NewAppModule(k keeper.Keeper) AppModule { } } -var _ appmodule.AppModule = AppModule{} - // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} diff --git a/x/params/proposal_handler_test.go b/x/params/proposal_handler_test.go index 5b36ea9f067e..fb81c4daf91f 100644 --- a/x/params/proposal_handler_test.go +++ b/x/params/proposal_handler_test.go @@ -1,6 +1,7 @@ package params_test import ( + "context" "testing" "github.com/golang/mock/gomock" @@ -22,7 +23,7 @@ import ( // StakingKeeper defines the expected staking keeper type StakingKeeper interface { - MaxValidators(ctx sdk.Context) (res uint32) + MaxValidators(ctx context.Context) (res uint32, err error) } type HandlerTestSuite struct { @@ -43,7 +44,7 @@ func (suite *HandlerTestSuite) SetupTest() { paramsKeeper.Subspace("staking").WithKeyTable(stakingtypes.ParamKeyTable()) //nolint:staticcheck // TODO: depreacte this test case ctrl := gomock.NewController(suite.T()) stakingKeeper := paramstestutil.NewMockStakingKeeper(ctrl) - stakingKeeper.EXPECT().MaxValidators(ctx).Return(uint32(1)) + stakingKeeper.EXPECT().MaxValidators(ctx).Return(uint32(1), nil) suite.govHandler = params.NewParamChangeProposalHandler(paramsKeeper) suite.stakingKeeper = stakingKeeper @@ -69,7 +70,8 @@ func (suite *HandlerTestSuite) TestProposalHandler() { "all fields", testProposal(proposal.NewParamChange(stakingtypes.ModuleName, string(stakingtypes.KeyMaxValidators), "1")), func() { - maxVals := suite.stakingKeeper.MaxValidators(suite.ctx) + maxVals, err := suite.stakingKeeper.MaxValidators(suite.ctx) + suite.Require().NoError(err) suite.Require().Equal(uint32(1), maxVals) }, false, @@ -91,7 +93,7 @@ func (suite *HandlerTestSuite) TestProposalHandler() { // depositParams := suite.app.GovKeeper.GetDepositParams(suite.ctx) // defaultPeriod := govv1.DefaultPeriod // suite.Require().Equal(govv1.DepositParams{ - // MinDeposit: sdk.NewCoins(sdk.NewCoin("uatom", sdk.NewInt(64000000))), + // MinDeposit: sdk.NewCoins(sdk.NewCoin("uatom", sdkmath.NewInt(64000000))), // MaxDepositPeriod: &defaultPeriod, // }, depositParams) // }, diff --git a/x/params/testutil/staking_keeper_mock.go b/x/params/testutil/staking_keeper_mock.go index a90f80ad43ae..bc5a94ffb50b 100644 --- a/x/params/testutil/staking_keeper_mock.go +++ b/x/params/testutil/staking_keeper_mock.go @@ -5,9 +5,9 @@ package testutil import ( + context "context" reflect "reflect" - types "github.com/cosmos/cosmos-sdk/types" gomock "github.com/golang/mock/gomock" ) @@ -35,11 +35,12 @@ func (m *MockStakingKeeper) EXPECT() *MockStakingKeeperMockRecorder { } // MaxValidators mocks base method. -func (m *MockStakingKeeper) MaxValidators(ctx types.Context) uint32 { +func (m *MockStakingKeeper) MaxValidators(ctx context.Context) (uint32, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "MaxValidators", ctx) ret0, _ := ret[0].(uint32) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // MaxValidators indicates an expected call of MaxValidators. diff --git a/x/params/types/subspace_test.go b/x/params/types/subspace_test.go index bb8c84477cb4..a9a1e7ebcc51 100644 --- a/x/params/types/subspace_test.go +++ b/x/params/types/subspace_test.go @@ -6,11 +6,11 @@ import ( "testing" "time" - "cosmossdk.io/log" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/suite" + "cosmossdk.io/log" "cosmossdk.io/store" "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" diff --git a/x/simulation/client/cli/flags.go b/x/simulation/client/cli/flags.go index 43f0e4c52465..c157bdb8e805 100644 --- a/x/simulation/client/cli/flags.go +++ b/x/simulation/client/cli/flags.go @@ -30,6 +30,7 @@ var ( FlagVerboseValue bool FlagPeriodValue uint FlagGenesisTimeValue int64 + FlagSigverifyTxValue bool ) // GetSimulatorFlags gets the values of all the available simulation flags @@ -56,6 +57,7 @@ func GetSimulatorFlags() { flag.BoolVar(&FlagVerboseValue, "Verbose", false, "verbose log output") flag.UintVar(&FlagPeriodValue, "Period", 0, "run slow invariants only once every period assertions") flag.Int64Var(&FlagGenesisTimeValue, "GenesisTime", 0, "override genesis UNIX time instead of using a random UNIX time") + flag.BoolVar(&FlagSigverifyTxValue, "SigverifyTx", true, "whether to sigverify check for transaction ") } // NewConfigFromFlags creates a simulation from the retrieved values of the flags. diff --git a/x/simulation/log.go b/x/simulation/log.go index b22709b65414..42eba43b8978 100644 --- a/x/simulation/log.go +++ b/x/simulation/log.go @@ -49,7 +49,7 @@ func (lw *StandardLogWriter) PrintLogs() { func createLogFile() *os.File { var f *os.File - fileName := fmt.Sprintf("%s.log", time.Now().Format("2006-01-02_15:04:05")) + fileName := fmt.Sprintf("%d.log", time.Now().UnixMilli()) folderPath := path.Join(os.ExpandEnv("$HOME"), ".simapp", "simulations") filePath := path.Join(folderPath, fileName) diff --git a/x/simulation/params.go b/x/simulation/params.go index 73b520a0fd74..7be6d77ae08b 100644 --- a/x/simulation/params.go +++ b/x/simulation/params.go @@ -176,7 +176,7 @@ func (w WeightedProposalContent) ContentSimulatorFn() simulation.ContentSimulato // Consensus Params // randomConsensusParams returns random simulation consensus parameters, it extracts the Evidence from the Staking genesis state. -func randomConsensusParams(r *rand.Rand, appState json.RawMessage, cdc codec.JSONCodec) *cmtproto.ConsensusParams { +func randomConsensusParams(r *rand.Rand, appState json.RawMessage, cdc codec.JSONCodec, maxGas int64) *cmtproto.ConsensusParams { var genesisState map[string]json.RawMessage err := json.Unmarshal(appState, &genesisState) if err != nil { @@ -187,7 +187,7 @@ func randomConsensusParams(r *rand.Rand, appState json.RawMessage, cdc codec.JSO consensusParams := &cmtproto.ConsensusParams{ Block: &cmtproto.BlockParams{ MaxBytes: int64(simulation.RandIntBetween(r, 20000000, 30000000)), - MaxGas: -1, + MaxGas: maxGas, }, Validator: &cmtproto.ValidatorParams{ PubKeyTypes: []string{types.ABCIPubKeyTypeEd25519}, diff --git a/x/simulation/simulate.go b/x/simulation/simulate.go index 2583e39aacb4..0e7819b65075 100644 --- a/x/simulation/simulate.go +++ b/x/simulation/simulate.go @@ -31,8 +31,12 @@ func initChain( config simulation.Config, cdc codec.JSONCodec, ) (mockValidators, time.Time, []simulation.Account, string) { + blockMaxGas := int64(-1) + if config.BlockMaxGas > 0 { + blockMaxGas = config.BlockMaxGas + } appState, accounts, chainID, genesisTimestamp := appStateFn(r, accounts, config) - consensusParams := randomConsensusParams(r, appState, cdc) + consensusParams := randomConsensusParams(r, appState, cdc, blockMaxGas) req := abci.RequestInitChain{ AppStateBytes: appState, ChainId: chainID, @@ -77,8 +81,10 @@ func SimulateFromSeed( // Second variable to keep pending validator set (delayed one block since // TM 0.24) Initially this is the same as the initial validator set validators, blockTime, accs, chainID := initChain(r, params, accs, app, appStateFn, config, cdc) - if len(accs) == 0 { - return true, params, fmt.Errorf("must have greater than zero genesis accounts") + // At least 2 accounts must be added here, otherwise when executing SimulateMsgSend + // two accounts will be selected to meet the conditions from != to and it will fall into an infinite loop. + if len(accs) <= 1 { + return true, params, fmt.Errorf("at least two genesis accounts are required") } config.ChainID = chainID @@ -99,6 +105,10 @@ func SimulateFromSeed( accs = tmpAccs nextValidators := validators + if len(nextValidators) == 0 { + tb.Skip("skipping: empty validator set in genesis") + return true, params, nil + } var ( pastTimes []time.Time @@ -237,6 +247,10 @@ func SimulateFromSeed( // on the next block validators = nextValidators nextValidators = updateValidators(tb, r, params, validators, res.ValidatorUpdates, eventStats.Tally) + if len(nextValidators) == 0 { + tb.Skip("skipping: empty validator set") + return true, params, nil + } // update the exported params if config.ExportParamsPath != "" && int64(config.ExportParamsHeight) == blockHeight { diff --git a/x/slashing/abci.go b/x/slashing/abci.go index af987c394a3b..42a95b7b10ff 100644 --- a/x/slashing/abci.go +++ b/x/slashing/abci.go @@ -2,7 +2,6 @@ package slashing import ( "context" - "time" "cosmossdk.io/core/comet" @@ -15,7 +14,7 @@ import ( // BeginBlocker check for infraction evidence or downtime of validators // on every begin block func BeginBlocker(ctx context.Context, k keeper.Keeper) error { - defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) + defer telemetry.ModuleMeasureSince(types.ModuleName, telemetry.Now(), telemetry.MetricKeyBeginBlocker) // Iterate over all the validators which *should* have signed this block // store whether or not they have actually signed it and slash/unbond any diff --git a/x/slashing/abci_test.go b/x/slashing/abci_test.go index 79c5fbbcffb7..2bdbd90913ce 100644 --- a/x/slashing/abci_test.go +++ b/x/slashing/abci_test.go @@ -4,12 +4,13 @@ import ( "testing" "time" - "cosmossdk.io/depinject" - "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/require" + "cosmossdk.io/depinject" + "cosmossdk.io/log" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" @@ -23,10 +24,12 @@ import ( ) func TestBeginBlocker(t *testing.T) { - var interfaceRegistry codectypes.InterfaceRegistry - var bankKeeper bankkeeper.Keeper - var stakingKeeper *stakingkeeper.Keeper - var slashingKeeper slashingkeeper.Keeper + var ( + interfaceRegistry codectypes.InterfaceRegistry + bankKeeper bankkeeper.Keeper + stakingKeeper *stakingkeeper.Keeper + slashingKeeper slashingkeeper.Keeper + ) app, err := simtestutil.Setup( depinject.Configs( @@ -51,19 +54,23 @@ func TestBeginBlocker(t *testing.T) { power := int64(100) amt := tstaking.CreateValidatorWithValPower(addr, pk, power, true) stakingKeeper.EndBlocker(ctx) + bondDenom, err := stakingKeeper.BondDenom(ctx) + require.NoError(t, err) require.Equal( t, bankKeeper.GetAllBalances(ctx, sdk.AccAddress(addr)), - sdk.NewCoins(sdk.NewCoin(stakingKeeper.GetParams(ctx).BondDenom, testutil.InitTokens.Sub(amt))), + sdk.NewCoins(sdk.NewCoin(bondDenom, testutil.InitTokens.Sub(amt))), ) - require.Equal(t, amt, stakingKeeper.Validator(ctx, addr).GetBondedTokens()) + val, err := stakingKeeper.Validator(ctx, addr) + require.NoError(t, err) + require.Equal(t, amt, val.GetBondedTokens()) - val := abci.Validator{ + abciVal := abci.Validator{ Address: pk.Address(), Power: power, } ctx = ctx.WithVoteInfos([]abci.VoteInfo{{ - Validator: val, + Validator: abciVal, BlockIdFlag: cmtproto.BlockIDFlagCommit, }}) @@ -85,7 +92,7 @@ func TestBeginBlocker(t *testing.T) { for ; height < signedBlocksWindow; height++ { ctx = ctx.WithBlockHeight(height). WithVoteInfos([]abci.VoteInfo{{ - Validator: val, + Validator: abciVal, BlockIdFlag: cmtproto.BlockIDFlagCommit, }}) @@ -99,7 +106,7 @@ func TestBeginBlocker(t *testing.T) { for ; height < ((signedBlocksWindow * 2) - minSignedPerWindow + 1); height++ { ctx = ctx.WithBlockHeight(height). WithVoteInfos([]abci.VoteInfo{{ - Validator: val, + Validator: abciVal, BlockIdFlag: cmtproto.BlockIDFlagAbsent, }}) @@ -112,7 +119,7 @@ func TestBeginBlocker(t *testing.T) { require.NoError(t, err) // validator should be jailed - validator, found := stakingKeeper.GetValidatorByConsAddr(ctx, sdk.GetConsAddress(pk)) - require.True(t, found) + validator, err := stakingKeeper.GetValidatorByConsAddr(ctx, sdk.GetConsAddress(pk)) + require.NoError(t, err) require.Equal(t, stakingtypes.Unbonding, validator.GetStatus()) } diff --git a/x/slashing/app_test.go b/x/slashing/app_test.go index 9add8e28167d..700840a77aff 100644 --- a/x/slashing/app_test.go +++ b/x/slashing/app_test.go @@ -4,12 +4,12 @@ import ( "errors" "testing" - "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/require" "cosmossdk.io/depinject" + "cosmossdk.io/log" "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" @@ -81,7 +81,7 @@ func TestSlashingMsgs(t *testing.T) { commission := stakingtypes.NewCommissionRates(math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyZeroDec()) createValidatorMsg, err := stakingtypes.NewMsgCreateValidator( - sdk.ValAddress(addr1), valKey.PubKey(), bondCoin, description, commission, math.OneInt(), + sdk.ValAddress(addr1).String(), valKey.PubKey(), bondCoin, description, commission, math.OneInt(), ) require.NoError(t, err) @@ -94,8 +94,9 @@ func TestSlashingMsgs(t *testing.T) { app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: app.LastBlockHeight() + 1}) ctxCheck = baseApp.NewContext(true) - validator, found := stakingKeeper.GetValidator(ctxCheck, sdk.ValAddress(addr1)) - require.True(t, found) + validator, err := stakingKeeper.GetValidator(ctxCheck, sdk.ValAddress(addr1)) + require.NoError(t, err) + require.Equal(t, sdk.ValAddress(addr1).String(), validator.OperatorAddress) require.Equal(t, stakingtypes.Bonded, validator.Status) require.True(math.IntEq(t, bondTokens, validator.BondedTokens())) diff --git a/x/slashing/autocli.go b/x/slashing/autocli.go new file mode 100644 index 000000000000..fede1143e72d --- /dev/null +++ b/x/slashing/autocli.go @@ -0,0 +1,55 @@ +package slashing + +import ( + "fmt" + + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + slashingv1beta "cosmossdk.io/api/cosmos/slashing/v1beta1" + + "github.com/cosmos/cosmos-sdk/version" +) + +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: slashingv1beta.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Params", + Use: "params", + Short: "Query the current slashing parameters", + }, + { + RpcMethod: "SigningInfo", + Use: "signing-info [validator-conspub/address]", + Short: "Query a validator's signing information", + Long: "Query a validator's signing information, with a pubkey (' comet show-validator') or a validator consensus address", + Example: fmt.Sprintf(`%s query slashing signing-info '{"@type":"/cosmos.crypto.ed25519.PubKey","key":"OauFcTKbN5Lx3fJL689cikXBqe+hcp6Y+x0rYUdR9Jk="}'`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "cons_address"}, + }, + }, + { + RpcMethod: "SigningInfos", + Use: "signing-infos", + Short: "Query signing information of all validators", + }, + }, + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: slashingv1beta.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Unjail", + Use: "unjail", + Short: "Unjail a jailed validator", + Example: fmt.Sprintf("%s tx slashing unjail --from [validator]", version.AppName), + }, + { + RpcMethod: "UpdateParams", + Skip: true, // skipped because authority gated + }, + }, + }, + } +} diff --git a/x/slashing/client/cli/flags.go b/x/slashing/client/cli/flags.go deleted file mode 100644 index 4f384512189f..000000000000 --- a/x/slashing/client/cli/flags.go +++ /dev/null @@ -1,5 +0,0 @@ -package cli - -const ( - FlagAddressValidator = "validator" -) diff --git a/x/slashing/client/cli/query.go b/x/slashing/client/cli/query.go deleted file mode 100644 index 500a490d64eb..000000000000 --- a/x/slashing/client/cli/query.go +++ /dev/null @@ -1,141 +0,0 @@ -package cli - -import ( - "strings" - - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/slashing/types" -) - -// GetQueryCmd returns the cli query commands for this module -func GetQueryCmd() *cobra.Command { - // Group slashing queries under a subcommand - slashingQueryCmd := &cobra.Command{ - Use: types.ModuleName, - Short: "Querying commands for the slashing module", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - slashingQueryCmd.AddCommand( - GetCmdQuerySigningInfo(), - GetCmdQueryParams(), - GetCmdQuerySigningInfos(), - ) - - return slashingQueryCmd -} - -// GetCmdQuerySigningInfo implements the command to query signing info. -func GetCmdQuerySigningInfo() *cobra.Command { - cmd := &cobra.Command{ - Use: "signing-info [validator-conspub]", - Short: "Query a validator's signing information", - Long: strings.TrimSpace(`Use a validators' consensus public key to find the signing-info for that validator: - -$ query slashing signing-info '{"@type":"/cosmos.crypto.ed25519.PubKey","key":"OauFcTKbN5Lx3fJL689cikXBqe+hcp6Y+x0rYUdR9Jk="}' -`), - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - var pk cryptotypes.PubKey - if err := clientCtx.Codec.UnmarshalInterfaceJSON([]byte(args[0]), &pk); err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - consAddr := sdk.ConsAddress(pk.Address()) - params := &types.QuerySigningInfoRequest{ConsAddress: consAddr.String()} - res, err := queryClient.SigningInfo(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(&res.ValSigningInfo) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdQuerySigningInfos implements the command to query signing infos. -func GetCmdQuerySigningInfos() *cobra.Command { - cmd := &cobra.Command{ - Use: "signing-infos", - Short: "Query signing information of all validators", - Long: strings.TrimSpace(`signing infos of validators: - -$ query slashing signing-infos -`), - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - params := &types.QuerySigningInfosRequest{Pagination: pageReq} - res, err := queryClient.SigningInfos(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "signing infos") - - return cmd -} - -// GetCmdQueryParams implements a command to fetch slashing parameters. -func GetCmdQueryParams() *cobra.Command { - cmd := &cobra.Command{ - Use: "params", - Short: "Query the current slashing parameters", - Args: cobra.NoArgs, - Long: strings.TrimSpace(`Query genesis parameters for the slashing module: - -$ query slashing params -`), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - params := &types.QueryParamsRequest{} - res, err := queryClient.Params(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(&res.Params) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/slashing/client/cli/query_test.go b/x/slashing/client/cli/query_test.go deleted file mode 100644 index 0779025cfc99..000000000000 --- a/x/slashing/client/cli/query_test.go +++ /dev/null @@ -1,148 +0,0 @@ -package cli_test - -import ( - "fmt" - "io" - "testing" - - abci "github.com/cometbft/cometbft/abci/types" - rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" - "github.com/stretchr/testify/suite" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/crypto/hd" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - "github.com/cosmos/cosmos-sdk/crypto/types" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - sdk "github.com/cosmos/cosmos-sdk/types" - testutilmod "github.com/cosmos/cosmos-sdk/types/module/testutil" - "github.com/cosmos/cosmos-sdk/x/slashing" - "github.com/cosmos/cosmos-sdk/x/slashing/client/cli" -) - -type CLITestSuite struct { - suite.Suite - - kr keyring.Keyring - baseCtx client.Context - clientCtx client.Context - encCfg testutilmod.TestEncodingConfig - - pub types.PubKey - addr sdk.AccAddress -} - -func TestCLITestSuite(t *testing.T) { - suite.Run(t, new(CLITestSuite)) -} - -func (s *CLITestSuite) SetupSuite() { - s.T().Log("setting up integration test suite") - - s.encCfg = testutilmod.MakeTestEncodingConfig(slashing.AppModuleBasic{}) - s.kr = keyring.NewInMemory(s.encCfg.Codec) - s.baseCtx = client.Context{}. - WithKeyring(s.kr). - WithTxConfig(s.encCfg.TxConfig). - WithCodec(s.encCfg.Codec). - WithClient(clitestutil.MockCometRPC{Client: rpcclientmock.Client{}}). - WithAccountRetriever(client.MockAccountRetriever{}). - WithOutput(io.Discard). - WithChainID("test-chain") - - ctxGen := func() client.Context { - bz, _ := s.encCfg.Codec.Marshal(&sdk.TxResponse{}) - c := clitestutil.NewMockCometRPC(abci.ResponseQuery{ - Value: bz, - }) - - return s.baseCtx.WithClient(c) - } - s.clientCtx = ctxGen() - - k, _, err := s.clientCtx.Keyring.NewMnemonic("NewValidator", keyring.English, sdk.FullFundraiserPath, keyring.DefaultBIP39Passphrase, hd.Secp256k1) - s.Require().NoError(err) - - pub, err := k.GetPubKey() - s.Require().NoError(err) - - s.pub = pub - s.addr = sdk.AccAddress(pub.Address()) -} - -func (s *CLITestSuite) TestGetCmdQuerySigningInfo() { - pubKeyBz, err := s.encCfg.Codec.MarshalInterfaceJSON(s.pub) - s.Require().NoError(err) - pubKeyStr := string(pubKeyBz) - - testCases := []struct { - name string - args []string - expectErr bool - }{ - {"invalid address", []string{"foo"}, true}, - { - "valid address (json output)", - []string{ - pubKeyStr, - fmt.Sprintf("--%s=json", flags.FlagOutput), - fmt.Sprintf("--%s=1", flags.FlagHeight), - }, - false, - }, - { - "valid address (text output)", - []string{ - pubKeyStr, - fmt.Sprintf("--%s=text", flags.FlagOutput), - fmt.Sprintf("--%s=1", flags.FlagHeight), - }, - false, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQuerySigningInfo() - clientCtx := s.clientCtx - - _, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - } - }) - } -} - -func (s *CLITestSuite) TestGetCmdQueryParams() { - testCases := []struct { - name string - args []string - }{ - { - "json output", - []string{fmt.Sprintf("--%s=json", flags.FlagOutput)}, - }, - { - "text output", - []string{fmt.Sprintf("--%s=text", flags.FlagOutput)}, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryParams() - clientCtx := s.clientCtx - - _, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - s.Require().NoError(err) - }) - } -} diff --git a/x/slashing/client/cli/tx.go b/x/slashing/client/cli/tx.go deleted file mode 100644 index bcb7836e6d7d..000000000000 --- a/x/slashing/client/cli/tx.go +++ /dev/null @@ -1,53 +0,0 @@ -package cli - -import ( - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/slashing/types" -) - -// NewTxCmd returns a root CLI command handler for all x/slashing transaction commands. -func NewTxCmd() *cobra.Command { - slashingTxCmd := &cobra.Command{ - Use: types.ModuleName, - Short: "Slashing transaction subcommands", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - slashingTxCmd.AddCommand(NewUnjailTxCmd()) - return slashingTxCmd -} - -// NewUnjailTxCmd returns a CLI command handler for creating a MsgUnjail transaction. -func NewUnjailTxCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "unjail", - Args: cobra.NoArgs, - Short: "unjail validator previously jailed for downtime", - Long: `unjail a jailed validator: - -$ tx slashing unjail --from mykey -`, - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - valAddr := clientCtx.GetFromAddress() - - msg := types.NewMsgUnjail(sdk.ValAddress(valAddr)) - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/slashing/client/cli/tx_test.go b/x/slashing/client/cli/tx_test.go deleted file mode 100644 index c3b5d3803e5c..000000000000 --- a/x/slashing/client/cli/tx_test.go +++ /dev/null @@ -1,50 +0,0 @@ -package cli_test - -import ( - "fmt" - - sdkmath "cosmossdk.io/math" - - "github.com/cosmos/cosmos-sdk/client/flags" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/slashing/client/cli" -) - -func (s *CLITestSuite) TestNewUnjailTxCmd() { - val := s.addr - testCases := []struct { - name string - args []string - expectErrMsg string - }{ - { - "valid transaction", - []string{ - fmt.Sprintf("--%s=%s", flags.FlagFrom, val.String()), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), // sync mode as there are no funds yet - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), - }, - "", - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.NewUnjailTxCmd() - clientCtx := s.clientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErrMsg != "" { - s.Require().Error(err) - } else { - s.Require().NoError(err) - txResp := &sdk.TxResponse{} - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), txResp), out.String()) - } - }) - } -} diff --git a/x/slashing/keeper/genesis.go b/x/slashing/keeper/genesis.go index 5fc8586d3946..bb83aabbaeeb 100644 --- a/x/slashing/keeper/genesis.go +++ b/x/slashing/keeper/genesis.go @@ -22,7 +22,7 @@ func (keeper Keeper) InitGenesis(ctx sdk.Context, stakingKeeper types.StakingKee ) for _, info := range data.SigningInfos { - address, err := sdk.ConsAddressFromBech32(info.Address) + address, err := keeper.sk.ConsensusAddressCodec().StringToBytes(info.Address) if err != nil { panic(err) } @@ -30,7 +30,7 @@ func (keeper Keeper) InitGenesis(ctx sdk.Context, stakingKeeper types.StakingKee } for _, array := range data.MissedBlocks { - address, err := sdk.ConsAddressFromBech32(array.Address) + address, err := keeper.sk.ConsensusAddressCodec().StringToBytes(array.Address) if err != nil { panic(err) } diff --git a/x/slashing/keeper/genesis_test.go b/x/slashing/keeper/genesis_test.go index eac73841f166..b5eedcc08bba 100644 --- a/x/slashing/keeper/genesis_test.go +++ b/x/slashing/keeper/genesis_test.go @@ -45,7 +45,7 @@ func (s *KeeperTestSuite) TestExportAndInitGenesis() { require.NotEqual(info1, newInfo1) // Initialize genesis with genesis state before tombstone - s.stakingKeeper.EXPECT().IterateValidators(ctx, gomock.Any()).Return() + s.stakingKeeper.EXPECT().IterateValidators(ctx, gomock.Any()).Return(nil) keeper.InitGenesis(ctx, s.stakingKeeper, genesisState) // Validator isTombstoned should return false as GenesisState is initialized diff --git a/x/slashing/keeper/grpc_query.go b/x/slashing/keeper/grpc_query.go index f702edc85ba0..2edce8b78718 100644 --- a/x/slashing/keeper/grpc_query.go +++ b/x/slashing/keeper/grpc_query.go @@ -9,7 +9,6 @@ import ( "cosmossdk.io/store/prefix" "github.com/cosmos/cosmos-sdk/runtime" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/x/slashing/types" ) @@ -45,7 +44,7 @@ func (k Keeper) SigningInfo(ctx context.Context, req *types.QuerySigningInfoRequ return nil, status.Errorf(codes.InvalidArgument, "invalid request") } - consAddr, err := sdk.ConsAddressFromBech32(req.ConsAddress) + consAddr, err := k.sk.ConsensusAddressCodec().StringToBytes(req.ConsAddress) if err != nil { return nil, err } diff --git a/x/slashing/keeper/hooks.go b/x/slashing/keeper/hooks.go index 0a307d1e72db..f90ba4da96d6 100644 --- a/x/slashing/keeper/hooks.go +++ b/x/slashing/keeper/hooks.go @@ -1,11 +1,13 @@ package keeper import ( + "context" "time" - sdkmath "cosmossdk.io/math" "github.com/cometbft/cometbft/crypto" + sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/slashing/types" ) @@ -23,14 +25,15 @@ func (k Keeper) Hooks() Hooks { } // AfterValidatorBonded updates the signing info start height or create a new signing info -func (h Hooks) AfterValidatorBonded(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error { +func (h Hooks) AfterValidatorBonded(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error { + sdkCtx := sdk.UnwrapSDKContext(ctx) signingInfo, err := h.k.GetValidatorSigningInfo(ctx, consAddr) if err == nil { - signingInfo.StartHeight = ctx.BlockHeight() + signingInfo.StartHeight = sdkCtx.BlockHeight() } else { signingInfo = types.NewValidatorSigningInfo( consAddr, - ctx.BlockHeight(), + sdkCtx.BlockHeight(), 0, time.Unix(0, 0), false, @@ -42,49 +45,54 @@ func (h Hooks) AfterValidatorBonded(ctx sdk.Context, consAddr sdk.ConsAddress, v } // AfterValidatorRemoved deletes the address-pubkey relation when a validator is removed, -func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, _ sdk.ValAddress) error { +func (h Hooks) AfterValidatorRemoved(ctx context.Context, consAddr sdk.ConsAddress, _ sdk.ValAddress) error { return h.k.deleteAddrPubkeyRelation(ctx, crypto.Address(consAddr)) } // AfterValidatorCreated adds the address-pubkey relation when a validator is created. -func (h Hooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) error { - validator := h.k.sk.Validator(ctx, valAddr) +func (h Hooks) AfterValidatorCreated(ctx context.Context, valAddr sdk.ValAddress) error { + sdkCtx := sdk.UnwrapSDKContext(ctx) + validator, err := h.k.sk.Validator(ctx, valAddr) + if err != nil { + return err + } + consPk, err := validator.ConsPubKey() if err != nil { return err } - return h.k.AddPubkey(ctx, consPk) + return h.k.AddPubkey(sdkCtx, consPk) } -func (h Hooks) AfterValidatorBeginUnbonding(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error { +func (h Hooks) AfterValidatorBeginUnbonding(_ context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error { return nil } -func (h Hooks) BeforeValidatorModified(_ sdk.Context, _ sdk.ValAddress) error { +func (h Hooks) BeforeValidatorModified(_ context.Context, _ sdk.ValAddress) error { return nil } -func (h Hooks) BeforeDelegationCreated(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error { +func (h Hooks) BeforeDelegationCreated(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error { return nil } -func (h Hooks) BeforeDelegationSharesModified(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error { +func (h Hooks) BeforeDelegationSharesModified(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error { return nil } -func (h Hooks) BeforeDelegationRemoved(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error { +func (h Hooks) BeforeDelegationRemoved(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error { return nil } -func (h Hooks) AfterDelegationModified(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error { +func (h Hooks) AfterDelegationModified(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error { return nil } -func (h Hooks) BeforeValidatorSlashed(_ sdk.Context, _ sdk.ValAddress, _ sdkmath.LegacyDec) error { +func (h Hooks) BeforeValidatorSlashed(_ context.Context, _ sdk.ValAddress, _ sdkmath.LegacyDec) error { return nil } -func (h Hooks) AfterUnbondingInitiated(_ sdk.Context, _ uint64) error { +func (h Hooks) AfterUnbondingInitiated(_ context.Context, _ uint64) error { return nil } diff --git a/x/slashing/keeper/hooks_test.go b/x/slashing/keeper/hooks_test.go index d9c592ffc15b..4d4f729a4c63 100644 --- a/x/slashing/keeper/hooks_test.go +++ b/x/slashing/keeper/hooks_test.go @@ -24,10 +24,10 @@ func (s *KeeperTestSuite) TestAfterValidatorCreatedOrRemoved() { _, pubKey, addr := testdata.KeyTestPubAddr() valAddr := sdk.ValAddress(addr) - validator, err := stakingtypes.NewValidator(sdk.ValAddress(addr), pubKey, stakingtypes.Description{}) + validator, err := stakingtypes.NewValidator(sdk.ValAddress(addr).String(), pubKey, stakingtypes.Description{}) require.NoError(err) - s.stakingKeeper.EXPECT().Validator(ctx, valAddr).Return(validator) + s.stakingKeeper.EXPECT().Validator(ctx, valAddr).Return(validator, nil) err = keeper.Hooks().AfterValidatorCreated(ctx, valAddr) require.NoError(err) diff --git a/x/slashing/keeper/infractions.go b/x/slashing/keeper/infractions.go index 5a6fee86d6a4..003963069f7a 100644 --- a/x/slashing/keeper/infractions.go +++ b/x/slashing/keeper/infractions.go @@ -4,9 +4,10 @@ import ( "context" "fmt" - "cosmossdk.io/core/comet" "github.com/cockroachdb/errors" + "cosmossdk.io/core/comet" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/slashing/types" @@ -23,7 +24,12 @@ func (k Keeper) HandleValidatorSignature(ctx context.Context, addr cryptotypes.A consAddr := sdk.ConsAddress(addr) // don't update missed blocks when validator's jailed - if k.sk.IsValidatorJailed(sdkCtx, consAddr) { + isJailed, err := k.sk.IsValidatorJailed(ctx, consAddr) + if err != nil { + return err + } + + if isJailed { return nil } @@ -105,7 +111,10 @@ func (k Keeper) HandleValidatorSignature(ctx context.Context, addr cryptotypes.A // if we are past the minimum height and the validator has missed too many blocks, punish them if height > minHeight && signInfo.MissedBlocksCounter > maxMissed { - validator := k.sk.ValidatorByConsAddr(sdkCtx, consAddr) + validator, err := k.sk.ValidatorByConsAddr(ctx, consAddr) + if err != nil { + return err + } if validator != nil && !validator.IsJailed() { // Downtime confirmed: slash and jail the validator // We need to retrieve the stake distribution which signed the block, so we subtract ValidatorUpdateDelay from the evidence height, @@ -120,7 +129,11 @@ func (k Keeper) HandleValidatorSignature(ctx context.Context, addr cryptotypes.A return err } - coinsBurned := k.sk.SlashWithInfractionReason(sdkCtx, consAddr, distributionHeight, power, slashFractionDowntime, stakingtypes.Infraction_INFRACTION_DOWNTIME) + coinsBurned, err := k.sk.SlashWithInfractionReason(ctx, consAddr, distributionHeight, power, slashFractionDowntime, stakingtypes.Infraction_INFRACTION_DOWNTIME) + if err != nil { + return err + } + sdkCtx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeSlash, diff --git a/x/slashing/keeper/keeper.go b/x/slashing/keeper/keeper.go index 374f702f0675..b710e78e3f94 100644 --- a/x/slashing/keeper/keeper.go +++ b/x/slashing/keeper/keeper.go @@ -4,11 +4,10 @@ import ( "context" "fmt" + storetypes "cosmossdk.io/core/store" "cosmossdk.io/log" sdkmath "cosmossdk.io/math" - storetypes "cosmossdk.io/core/store" - "github.com/cosmos/cosmos-sdk/codec" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -84,14 +83,26 @@ func (k Keeper) Slash(ctx context.Context, consAddr sdk.ConsAddress, fraction sd // SlashWithInfractionReason attempts to slash a validator. The slash is delegated to the staking // module to make the necessary validator changes. It specifies an intraction reason. func (k Keeper) SlashWithInfractionReason(ctx context.Context, consAddr sdk.ConsAddress, fraction sdkmath.LegacyDec, power, distributionHeight int64, infraction stakingtypes.Infraction) error { + coinsBurned, err := k.sk.SlashWithInfractionReason(ctx, consAddr, distributionHeight, power, fraction, infraction) + if err != nil { + return err + } + + reasonAttr := sdk.NewAttribute(types.AttributeKeyReason, types.AttributeValueUnspecified) + switch infraction { + case stakingtypes.Infraction_INFRACTION_DOUBLE_SIGN: + reasonAttr = sdk.NewAttribute(types.AttributeKeyReason, types.AttributeValueDoubleSign) + case stakingtypes.Infraction_INFRACTION_DOWNTIME: + reasonAttr = sdk.NewAttribute(types.AttributeKeyReason, types.AttributeValueMissingSignature) + } + sdkCtx := sdk.UnwrapSDKContext(ctx) - coinsBurned := k.sk.SlashWithInfractionReason(sdkCtx, consAddr, distributionHeight, power, fraction, infraction) sdkCtx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeSlash, sdk.NewAttribute(types.AttributeKeyAddress, consAddr.String()), sdk.NewAttribute(types.AttributeKeyPower, fmt.Sprintf("%d", power)), - sdk.NewAttribute(types.AttributeKeyReason, types.AttributeValueDoubleSign), + reasonAttr, sdk.NewAttribute(types.AttributeKeyBurnedCoins, coinsBurned.String()), ), ) diff --git a/x/slashing/keeper/keeper_test.go b/x/slashing/keeper/keeper_test.go index 83f44bba3359..0f62f5e7a0d4 100644 --- a/x/slashing/keeper/keeper_test.go +++ b/x/slashing/keeper/keeper_test.go @@ -3,16 +3,16 @@ package keeper_test import ( "testing" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/suite" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" cmttime "github.com/cometbft/cometbft/types/time" + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/suite" sdkmath "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/runtime" sdktestutil "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/testdata" @@ -48,6 +48,8 @@ func (s *KeeperTestSuite) SetupTest() { // gomock initializations ctrl := gomock.NewController(s.T()) s.stakingKeeper = slashingtestutil.NewMockStakingKeeper(ctrl) + s.stakingKeeper.EXPECT().ValidatorAddressCodec().Return(address.NewBech32Codec("cosmosvaloper")).AnyTimes() + s.stakingKeeper.EXPECT().ConsensusAddressCodec().Return(address.NewBech32Codec("cosmosvalcons")).AnyTimes() s.ctx = ctx s.slashingKeeper = slashingkeeper.NewKeeper( @@ -90,7 +92,7 @@ func (s *KeeperTestSuite) TestJailAndSlash() { sdk.TokensToConsensusPower(sdkmath.NewInt(1), sdk.DefaultPowerReduction), slashFractionDoubleSign, stakingtypes.Infraction_INFRACTION_UNSPECIFIED, - ).Return(sdkmath.NewInt(0)) + ).Return(sdkmath.NewInt(0), nil) s.slashingKeeper.Slash( s.ctx, @@ -100,7 +102,7 @@ func (s *KeeperTestSuite) TestJailAndSlash() { s.ctx.BlockHeight(), ) - s.stakingKeeper.EXPECT().Jail(s.ctx, consAddr).Return() + s.stakingKeeper.EXPECT().Jail(s.ctx, consAddr).Return(nil) s.slashingKeeper.Jail(s.ctx, consAddr) } @@ -114,7 +116,7 @@ func (s *KeeperTestSuite) TestJailAndSlashWithInfractionReason() { sdk.TokensToConsensusPower(sdkmath.NewInt(1), sdk.DefaultPowerReduction), slashFractionDoubleSign, stakingtypes.Infraction_INFRACTION_DOUBLE_SIGN, - ).Return(sdkmath.NewInt(0)) + ).Return(sdkmath.NewInt(0), nil) s.slashingKeeper.SlashWithInfractionReason( s.ctx, @@ -125,7 +127,7 @@ func (s *KeeperTestSuite) TestJailAndSlashWithInfractionReason() { stakingtypes.Infraction_INFRACTION_DOUBLE_SIGN, ) - s.stakingKeeper.EXPECT().Jail(s.ctx, consAddr).Return() + s.stakingKeeper.EXPECT().Jail(s.ctx, consAddr).Return(nil) s.slashingKeeper.Jail(s.ctx, consAddr) } diff --git a/x/slashing/keeper/msg_server.go b/x/slashing/keeper/msg_server.go index b5663393342f..70e5fc66d23c 100644 --- a/x/slashing/keeper/msg_server.go +++ b/x/slashing/keeper/msg_server.go @@ -46,7 +46,7 @@ func (k msgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParam // Validators must submit a transaction to unjail itself after // having been jailed (and thus unbonded) for downtime func (k msgServer) Unjail(goCtx context.Context, msg *types.MsgUnjail) (*types.MsgUnjailResponse, error) { - valAddr, err := sdk.ValAddressFromBech32(msg.ValidatorAddr) + valAddr, err := k.sk.ValidatorAddressCodec().StringToBytes(msg.ValidatorAddr) if err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("validator input address: %s", err) } diff --git a/x/slashing/keeper/msg_server_test.go b/x/slashing/keeper/msg_server_test.go index cb401957771e..682379972d25 100644 --- a/x/slashing/keeper/msg_server_test.go +++ b/x/slashing/keeper/msg_server_test.go @@ -167,11 +167,11 @@ func (s *KeeperTestSuite) TestUnjail() { malleate: func() *slashingtypes.MsgUnjail { _, pubKey, addr := testdata.KeyTestPubAddr() valAddr := sdk.ValAddress(addr) - val, err := types.NewValidator(valAddr, pubKey, types.Description{Moniker: "test"}) + val, err := types.NewValidator(valAddr.String(), pubKey, types.Description{Moniker: "test"}) s.Require().NoError(err) - s.stakingKeeper.EXPECT().Validator(s.ctx, valAddr).Return(val) - s.stakingKeeper.EXPECT().Delegation(s.ctx, addr, valAddr).Return(nil) + s.stakingKeeper.EXPECT().Validator(s.ctx, valAddr).Return(val, nil) + s.stakingKeeper.EXPECT().Delegation(s.ctx, addr, valAddr).Return(nil, nil) return &slashingtypes.MsgUnjail{ ValidatorAddr: sdk.ValAddress(addr).String(), @@ -186,7 +186,7 @@ func (s *KeeperTestSuite) TestUnjail() { _, _, addr := testdata.KeyTestPubAddr() valAddr := sdk.ValAddress(addr) - s.stakingKeeper.EXPECT().Validator(s.ctx, valAddr).Return(nil) + s.stakingKeeper.EXPECT().Validator(s.ctx, valAddr).Return(nil, nil) return &slashingtypes.MsgUnjail{ ValidatorAddr: valAddr.String(), @@ -201,7 +201,7 @@ func (s *KeeperTestSuite) TestUnjail() { _, pubKey, addr := testdata.KeyTestPubAddr() valAddr := sdk.ValAddress(addr) - val, err := types.NewValidator(valAddr, pubKey, types.Description{Moniker: "test"}) + val, err := types.NewValidator(valAddr.String(), pubKey, types.Description{Moniker: "test"}) val.Tokens = sdkmath.NewInt(1000) val.DelegatorShares = sdkmath.LegacyNewDec(1) val.Jailed = false @@ -213,10 +213,10 @@ func (s *KeeperTestSuite) TestUnjail() { s.slashingKeeper.SetValidatorSigningInfo(s.ctx, sdk.ConsAddress(addr), info) - s.stakingKeeper.EXPECT().Validator(s.ctx, valAddr).Return(val) - del := types.NewDelegation(addr, valAddr, sdkmath.LegacyNewDec(100)) + s.stakingKeeper.EXPECT().Validator(s.ctx, valAddr).Return(val, nil) + del := types.NewDelegation(addr.String(), valAddr.String(), sdkmath.LegacyNewDec(100)) - s.stakingKeeper.EXPECT().Delegation(s.ctx, addr, valAddr).Return(del) + s.stakingKeeper.EXPECT().Delegation(s.ctx, addr, valAddr).Return(del, nil) return &slashingtypes.MsgUnjail{ ValidatorAddr: sdk.ValAddress(addr).String(), @@ -231,7 +231,7 @@ func (s *KeeperTestSuite) TestUnjail() { _, pubKey, addr := testdata.KeyTestPubAddr() valAddr := sdk.ValAddress(addr) - val, err := types.NewValidator(valAddr, pubKey, types.Description{Moniker: "test"}) + val, err := types.NewValidator(valAddr.String(), pubKey, types.Description{Moniker: "test"}) val.Tokens = sdkmath.NewInt(1000) val.DelegatorShares = sdkmath.LegacyNewDec(1) val.Jailed = true @@ -243,10 +243,10 @@ func (s *KeeperTestSuite) TestUnjail() { s.slashingKeeper.SetValidatorSigningInfo(s.ctx, sdk.ConsAddress(addr), info) - s.stakingKeeper.EXPECT().Validator(s.ctx, valAddr).Return(val) - del := types.NewDelegation(addr, valAddr, sdkmath.LegacyNewDec(100)) + s.stakingKeeper.EXPECT().Validator(s.ctx, valAddr).Return(val, nil) + del := types.NewDelegation(addr.String(), valAddr.String(), sdkmath.LegacyNewDec(100)) - s.stakingKeeper.EXPECT().Delegation(s.ctx, addr, valAddr).Return(del) + s.stakingKeeper.EXPECT().Delegation(s.ctx, addr, valAddr).Return(del, nil) return &slashingtypes.MsgUnjail{ ValidatorAddr: sdk.ValAddress(addr).String(), @@ -261,7 +261,7 @@ func (s *KeeperTestSuite) TestUnjail() { _, pubKey, addr := testdata.KeyTestPubAddr() valAddr := sdk.ValAddress(addr) - val, err := types.NewValidator(valAddr, pubKey, types.Description{Moniker: "test"}) + val, err := types.NewValidator(valAddr.String(), pubKey, types.Description{Moniker: "test"}) val.Tokens = sdkmath.NewInt(1000) val.DelegatorShares = sdkmath.LegacyNewDec(1) val.Jailed = true @@ -273,10 +273,10 @@ func (s *KeeperTestSuite) TestUnjail() { s.slashingKeeper.SetValidatorSigningInfo(s.ctx, sdk.ConsAddress(addr), info) - s.stakingKeeper.EXPECT().Validator(s.ctx, valAddr).Return(val) - del := types.NewDelegation(addr, valAddr, sdkmath.LegacyNewDec(10000)) + s.stakingKeeper.EXPECT().Validator(s.ctx, valAddr).Return(val, nil) + del := types.NewDelegation(addr.String(), valAddr.String(), sdkmath.LegacyNewDec(10000)) - s.stakingKeeper.EXPECT().Delegation(s.ctx, addr, valAddr).Return(del) + s.stakingKeeper.EXPECT().Delegation(s.ctx, addr, valAddr).Return(del, nil) return &slashingtypes.MsgUnjail{ ValidatorAddr: sdk.ValAddress(addr).String(), @@ -291,7 +291,7 @@ func (s *KeeperTestSuite) TestUnjail() { _, pubKey, addr := testdata.KeyTestPubAddr() valAddr := sdk.ValAddress(addr) - val, err := types.NewValidator(valAddr, pubKey, types.Description{Moniker: "test"}) + val, err := types.NewValidator(valAddr.String(), pubKey, types.Description{Moniker: "test"}) val.Tokens = sdkmath.NewInt(1000) val.DelegatorShares = sdkmath.LegacyNewDec(1) @@ -303,11 +303,11 @@ func (s *KeeperTestSuite) TestUnjail() { s.slashingKeeper.SetValidatorSigningInfo(s.ctx, sdk.ConsAddress(addr), info) - s.stakingKeeper.EXPECT().Validator(s.ctx, valAddr).Return(val) - del := types.NewDelegation(addr, valAddr, sdkmath.LegacyNewDec(100)) + s.stakingKeeper.EXPECT().Validator(s.ctx, valAddr).Return(val, nil) + del := types.NewDelegation(addr.String(), valAddr.String(), sdkmath.LegacyNewDec(100)) - s.stakingKeeper.EXPECT().Delegation(s.ctx, addr, valAddr).Return(del) - s.stakingKeeper.EXPECT().Unjail(s.ctx, sdk.ConsAddress(addr)).Return() + s.stakingKeeper.EXPECT().Delegation(s.ctx, addr, valAddr).Return(del, nil) + s.stakingKeeper.EXPECT().Unjail(s.ctx, sdk.ConsAddress(addr)).Return(nil) return &slashingtypes.MsgUnjail{ ValidatorAddr: sdk.ValAddress(addr).String(), diff --git a/x/slashing/keeper/signing_info.go b/x/slashing/keeper/signing_info.go index 7aec8e50cae1..97e85f4cab1b 100644 --- a/x/slashing/keeper/signing_info.go +++ b/x/slashing/keeper/signing_info.go @@ -4,9 +4,10 @@ import ( "context" "time" + "github.com/bits-and-blooms/bitset" + "cosmossdk.io/errors" storetypes "cosmossdk.io/store/types" - "github.com/bits-and-blooms/bitset" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/slashing/types" diff --git a/x/slashing/keeper/signing_info_test.go b/x/slashing/keeper/signing_info_test.go index c24ece21c6ec..e6e0af449f0b 100644 --- a/x/slashing/keeper/signing_info_test.go +++ b/x/slashing/keeper/signing_info_test.go @@ -4,7 +4,6 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/slashing/testutil" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" ) diff --git a/x/slashing/keeper/slash_redelegation_test.go b/x/slashing/keeper/slash_redelegation_test.go new file mode 100644 index 000000000000..f569903e19df --- /dev/null +++ b/x/slashing/keeper/slash_redelegation_test.go @@ -0,0 +1,165 @@ +package keeper_test + +import ( + "fmt" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "cosmossdk.io/core/header" + "cosmossdk.io/depinject" + "cosmossdk.io/log" + "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + sdk "github.com/cosmos/cosmos-sdk/types" + bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + banktestutil "github.com/cosmos/cosmos-sdk/x/bank/testutil" + distributionkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" + slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" + "github.com/cosmos/cosmos-sdk/x/slashing/testutil" + stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +func TestSlashRedelegation(t *testing.T) { + // setting up + var stakingKeeper *stakingkeeper.Keeper + var bankKeeper bankkeeper.Keeper + var slashKeeper slashingkeeper.Keeper + var distrKeeper distributionkeeper.Keeper + + app, err := simtestutil.Setup(depinject.Configs( + depinject.Supply(log.NewNopLogger()), + testutil.AppConfig, + ), &stakingKeeper, &bankKeeper, &slashKeeper, &distrKeeper) + require.NoError(t, err) + + // get sdk context, staking msg server and bond denom + ctx := app.BaseApp.NewContext(false) + stakingMsgServer := stakingkeeper.NewMsgServerImpl(stakingKeeper) + bondDenom, err := stakingKeeper.BondDenom(ctx) + require.NoError(t, err) + + // evilVal will be slashed, goodVal won't be slashed + evilValPubKey := secp256k1.GenPrivKey().PubKey() + goodValPubKey := secp256k1.GenPrivKey().PubKey() + + // both test acc 1 and 2 delegated to evil val, both acc should be slashed when evil val is slashed + // test acc 1 use the "undelegation after redelegation" trick (redelegate to good val and then undelegate) to avoid slashing + // test acc 2 only undelegate from evil val + testAcc1 := sdk.AccAddress([]byte("addr1_______________")) + testAcc2 := sdk.AccAddress([]byte("addr2_______________")) + + // fund acc 1 and acc 2 + testCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, stakingKeeper.TokensFromConsensusPower(ctx, 10))) + banktestutil.FundAccount(ctx, bankKeeper, testAcc1, testCoins) + banktestutil.FundAccount(ctx, bankKeeper, testAcc2, testCoins) + + balance1Before := bankKeeper.GetBalance(ctx, testAcc1, bondDenom) + balance2Before := bankKeeper.GetBalance(ctx, testAcc2, bondDenom) + + // assert acc 1 and acc 2 balance + require.Equal(t, balance1Before.Amount.String(), testCoins[0].Amount.String()) + require.Equal(t, balance2Before.Amount.String(), testCoins[0].Amount.String()) + + // creating evil val + evilValAddr := sdk.ValAddress(evilValPubKey.Address()) + banktestutil.FundAccount(ctx, bankKeeper, sdk.AccAddress(evilValAddr), testCoins) + createValMsg1, _ := stakingtypes.NewMsgCreateValidator( + evilValAddr.String(), evilValPubKey, testCoins[0], stakingtypes.Description{Details: "test"}, stakingtypes.NewCommissionRates(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)), math.OneInt()) + _, err = stakingMsgServer.CreateValidator(ctx, createValMsg1) + require.NoError(t, err) + + // creating good val + goodValAddr := sdk.ValAddress(goodValPubKey.Address()) + banktestutil.FundAccount(ctx, bankKeeper, sdk.AccAddress(goodValAddr), testCoins) + createValMsg2, _ := stakingtypes.NewMsgCreateValidator( + goodValAddr.String(), goodValPubKey, testCoins[0], stakingtypes.Description{Details: "test"}, stakingtypes.NewCommissionRates(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)), math.OneInt()) + _, err = stakingMsgServer.CreateValidator(ctx, createValMsg2) + require.NoError(t, err) + + // next block, commit height 2, move to height 3 + // acc 1 and acc 2 delegate to evil val + ctx = ctx.WithBlockHeight(app.LastBlockHeight() + 1).WithHeaderInfo(header.Info{Height: app.LastBlockHeight() + 1}) + fmt.Println() + ctx, err = simtestutil.NextBlock(app, ctx, time.Duration(1)) + require.NoError(t, err) + + // Acc 2 delegate + delMsg := stakingtypes.NewMsgDelegate(testAcc2.String(), evilValAddr.String(), testCoins[0]) + _, err = stakingMsgServer.Delegate(ctx, delMsg) + require.NoError(t, err) + + // Acc 1 delegate + delMsg = stakingtypes.NewMsgDelegate(testAcc1.String(), evilValAddr.String(), testCoins[0]) + _, err = stakingMsgServer.Delegate(ctx, delMsg) + require.NoError(t, err) + + // next block, commit height 3, move to height 4 + // with the new delegations, evil val increases in voting power and commit byzantine behavior at height 4 consensus + // at the same time, acc 1 and acc 2 withdraw delegation from evil val + ctx, err = simtestutil.NextBlock(app, ctx, time.Duration(1)) + require.NoError(t, err) + + evilVal, err := stakingKeeper.GetValidator(ctx, evilValAddr) + require.NoError(t, err) + + evilPower := stakingKeeper.TokensToConsensusPower(ctx, evilVal.Tokens) + + // Acc 1 redelegate from evil val to good val + redelMsg := stakingtypes.NewMsgBeginRedelegate(testAcc1.String(), evilValAddr.String(), goodValAddr.String(), testCoins[0]) + _, err = stakingMsgServer.BeginRedelegate(ctx, redelMsg) + require.NoError(t, err) + + // Acc 1 undelegate from good val + undelMsg := stakingtypes.NewMsgUndelegate(testAcc1.String(), goodValAddr.String(), testCoins[0]) + _, err = stakingMsgServer.Undelegate(ctx, undelMsg) + require.NoError(t, err) + + // Acc 2 undelegate from evil val + undelMsg = stakingtypes.NewMsgUndelegate(testAcc2.String(), evilValAddr.String(), testCoins[0]) + _, err = stakingMsgServer.Undelegate(ctx, undelMsg) + require.NoError(t, err) + + // next block, commit height 4, move to height 5 + // Slash evil val for byzantine behavior at height 4 consensus, + // at which acc 1 and acc 2 still contributed to evil val voting power + // even tho they undelegate at block 4, the valset update is applied after committed block 4 when height 4 consensus already passes + ctx, err = simtestutil.NextBlock(app, ctx, time.Duration(1)) + require.NoError(t, err) + + // slash evil val with slash factor = 0.9, leaving only 10% of stake after slashing + evilVal, _ = stakingKeeper.GetValidator(ctx, evilValAddr) + evilValConsAddr, err := evilVal.GetConsAddr() + require.NoError(t, err) + + err = slashKeeper.Slash(ctx, evilValConsAddr, math.LegacyMustNewDecFromStr("0.9"), evilPower, 3) + require.NoError(t, err) + + // assert invariant to make sure we conduct slashing correctly + _, stop := stakingkeeper.AllInvariants(stakingKeeper)(ctx) + require.False(t, stop) + + _, stop = bankkeeper.AllInvariants(bankKeeper)(ctx) + require.False(t, stop) + + _, stop = distributionkeeper.AllInvariants(distrKeeper)(ctx) + require.False(t, stop) + + // one eternity later + ctx, err = simtestutil.NextBlock(app, ctx, time.Duration(1000000000000000000)) + require.NoError(t, err) + + ctx, err = simtestutil.NextBlock(app, ctx, time.Duration(1)) + require.NoError(t, err) + + // confirm that account 1 and account 2 has been slashed, and the slash amount is correct + balance1AfterSlashing := bankKeeper.GetBalance(ctx, testAcc1, bondDenom) + balance2AfterSlashing := bankKeeper.GetBalance(ctx, testAcc2, bondDenom) + + require.Equal(t, balance1AfterSlashing.Amount.Mul(math.NewIntFromUint64(10)).String(), balance1Before.Amount.String()) + require.Equal(t, balance2AfterSlashing.Amount.Mul(math.NewIntFromUint64(10)).String(), balance2Before.Amount.String()) +} diff --git a/x/slashing/keeper/unjail.go b/x/slashing/keeper/unjail.go index 92168dc2c76a..b3ab0706e243 100644 --- a/x/slashing/keeper/unjail.go +++ b/x/slashing/keeper/unjail.go @@ -12,14 +12,20 @@ import ( // Unjail calls the staking Unjail function to unjail a validator if the // jailed period has concluded func (k Keeper) Unjail(ctx context.Context, validatorAddr sdk.ValAddress) error { - sdkCtx := sdk.UnwrapSDKContext(ctx) - validator := k.sk.Validator(sdkCtx, validatorAddr) + validator, err := k.sk.Validator(ctx, validatorAddr) + if err != nil { + return err + } if validator == nil { return types.ErrNoValidatorForAddress } // cannot be unjailed if no self-delegation exists - selfDel := k.sk.Delegation(sdkCtx, sdk.AccAddress(validatorAddr), validatorAddr) + selfDel, err := k.sk.Delegation(ctx, sdk.AccAddress(validatorAddr), validatorAddr) + if err != nil { + return err + } + if selfDel == nil { return types.ErrMissingSelfDelegation } @@ -57,11 +63,11 @@ func (k Keeper) Unjail(ctx context.Context, validatorAddr sdk.ValAddress) error } // cannot be unjailed until out of jail + sdkCtx := sdk.UnwrapSDKContext(ctx) if sdkCtx.BlockHeader().Time.Before(info.JailedUntil) { return types.ErrValidatorJailed } } - k.sk.Unjail(sdkCtx, consAddr) - return nil + return k.sk.Unjail(ctx, consAddr) } diff --git a/x/slashing/migrations/v2/store_test.go b/x/slashing/migrations/v2/store_test.go index c1f7f0fec6d1..4b8794c42db6 100644 --- a/x/slashing/migrations/v2/store_test.go +++ b/x/slashing/migrations/v2/store_test.go @@ -4,9 +4,10 @@ import ( "bytes" "testing" - storetypes "cosmossdk.io/store/types" "github.com/stretchr/testify/require" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/testdata" diff --git a/x/slashing/migrations/v4/keys.go b/x/slashing/migrations/v4/keys.go index 1ac42b6c1aff..c5ab30ff72bd 100644 --- a/x/slashing/migrations/v4/keys.go +++ b/x/slashing/migrations/v4/keys.go @@ -28,7 +28,7 @@ func ValidatorSigningInfoAddress(key []byte) (v sdk.ConsAddress) { } func validatorMissedBlockBitArrayPrefixKey(v sdk.ConsAddress) []byte { - return append(validatorMissedBlockBitArrayKeyPrefix, v.Bytes()...) + return append(validatorMissedBlockBitArrayKeyPrefix, address.MustLengthPrefix(v.Bytes())...) } func ValidatorMissedBlockBitArrayKey(v sdk.ConsAddress, i int64) []byte { diff --git a/x/slashing/migrations/v4/migrate.go b/x/slashing/migrations/v4/migrate.go index 01480c05e185..2771e877b3da 100644 --- a/x/slashing/migrations/v4/migrate.go +++ b/x/slashing/migrations/v4/migrate.go @@ -1,11 +1,12 @@ package v4 import ( - "cosmossdk.io/errors" - storetypes "cosmossdk.io/store/types" "github.com/bits-and-blooms/bitset" gogotypes "github.com/cosmos/gogoproto/types" + "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/slashing/types" diff --git a/x/slashing/migrations/v4/migrate_test.go b/x/slashing/migrations/v4/migrate_test.go index a49ae658166f..fc8a043610b9 100644 --- a/x/slashing/migrations/v4/migrate_test.go +++ b/x/slashing/migrations/v4/migrate_test.go @@ -3,11 +3,12 @@ package v4_test import ( "testing" - storetypes "cosmossdk.io/store/types" "github.com/bits-and-blooms/bitset" gogotypes "github.com/cosmos/gogoproto/types" "github.com/stretchr/testify/require" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" @@ -40,10 +41,6 @@ func TestMigrate(t *testing.T) { err := v4.Migrate(ctx, cdc, store, params) require.NoError(t, err) - // ensure old entries no longer exist and new bitmap chunk entries exist - entries := v4.GetValidatorMissedBlocks(ctx, cdc, store, consAddr, params) - require.Empty(t, entries) - for i := int64(0); i < params.SignedBlocksWindow; i++ { chunkIndex := i / v4.MissedBlockBitmapChunkSize chunk := store.Get(v4.ValidatorMissedBlockBitmapKey(consAddr, chunkIndex)) diff --git a/x/slashing/module.go b/x/slashing/module.go index b953b83ecaeb..6fd9b89b01ce 100644 --- a/x/slashing/module.go +++ b/x/slashing/module.go @@ -5,13 +5,12 @@ import ( "encoding/json" "fmt" + gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" + modulev1 "cosmossdk.io/api/cosmos/slashing/module/v1" "cosmossdk.io/core/appmodule" store "cosmossdk.io/core/store" "cosmossdk.io/depinject" - abci "github.com/cometbft/cometbft/abci/types" - gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -21,7 +20,6 @@ import ( simtypes "github.com/cosmos/cosmos-sdk/types/simulation" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/cosmos/cosmos-sdk/x/slashing/client/cli" "github.com/cosmos/cosmos-sdk/x/slashing/exported" "github.com/cosmos/cosmos-sdk/x/slashing/keeper" "github.com/cosmos/cosmos-sdk/x/slashing/simulation" @@ -33,8 +31,13 @@ import ( const ConsensusVersion = 4 var ( - _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModuleBasic = AppModule{} _ module.AppModuleSimulation = AppModule{} + _ module.HasGenesis = AppModule{} + _ module.HasServices = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasBeginBlocker = AppModule{} ) // AppModuleBasic defines the basic application module used by the slashing module. @@ -42,8 +45,6 @@ type AppModuleBasic struct { cdc codec.Codec } -var _ module.AppModuleBasic = AppModuleBasic{} - // Name returns the slashing module's name. func (AppModuleBasic) Name() string { return types.ModuleName @@ -82,16 +83,6 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *g } } -// GetTxCmd returns the root tx command for the slashing module. -func (AppModuleBasic) GetTxCmd() *cobra.Command { - return cli.NewTxCmd() -} - -// GetQueryCmd returns no root query command for the slashing module. -func (AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.GetQueryCmd() -} - // AppModule implements an application module for the slashing module. type AppModule struct { AppModuleBasic @@ -127,22 +118,12 @@ func NewAppModule( } } -var ( - _ appmodule.AppModule = AppModule{} - _ appmodule.HasBeginBlocker = AppModule{} -) - // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} // IsAppModule implements the appmodule.AppModule interface. func (am AppModule) IsAppModule() {} -// Name returns the slashing module's name. -func (AppModule) Name() string { - return types.ModuleName -} - // RegisterServices registers module services. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) @@ -164,11 +145,10 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { // InitGenesis performs genesis initialization for the slashing module. It returns // no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) { var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) am.keeper.InitGenesis(ctx, am.stakingKeeper, &genesisState) - return []abci.ValidatorUpdate{} } // ExportGenesis returns the exported genesis state as raw bytes for the slashing diff --git a/x/slashing/simulation/genesis_test.go b/x/slashing/simulation/genesis_test.go index b24c6e08d60f..33d42e8e333c 100644 --- a/x/slashing/simulation/genesis_test.go +++ b/x/slashing/simulation/genesis_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/require" sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/types/module" diff --git a/x/slashing/simulation/operations.go b/x/slashing/simulation/operations.go index a2618a522c5a..280e06f7eec5 100644 --- a/x/slashing/simulation/operations.go +++ b/x/slashing/simulation/operations.go @@ -63,12 +63,22 @@ func SimulateMsgUnjail( ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { msgType := sdk.MsgTypeURL(&types.MsgUnjail{}) - validator, ok := testutil.RandSliceElem(r, sk.GetAllValidators(ctx)) + allVals, err := sk.GetAllValidators(ctx) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "unable to get all validators"), nil, err + } + + validator, ok := testutil.RandSliceElem(r, allVals) if !ok { return simtypes.NoOpMsg(types.ModuleName, msgType, "validator is not ok"), nil, nil // skip } - simAccount, found := simtypes.FindAccount(accs, sdk.AccAddress(validator.GetOperator())) + bz, err := sk.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "unable to convert validator address to bytes"), nil, err + } + + simAccount, found := simtypes.FindAccount(accs, sdk.AccAddress(bz)) if !found { return simtypes.NoOpMsg(types.ModuleName, msgType, "unable to find account"), nil, nil // skip } @@ -87,12 +97,16 @@ func SimulateMsgUnjail( return simtypes.NoOpMsg(types.ModuleName, msgType, "unable to find validator signing info"), nil, err // skip } - selfDel := sk.Delegation(ctx, simAccount.Address, validator.GetOperator()) + selfDel, err := sk.Delegation(ctx, simAccount.Address, bz) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "unable to get self delegation"), nil, err + } + if selfDel == nil { return simtypes.NoOpMsg(types.ModuleName, msgType, "self delegation is nil"), nil, nil // skip } - account := ak.GetAccount(ctx, sdk.AccAddress(validator.GetOperator())) + account := ak.GetAccount(ctx, sdk.AccAddress(bz)) spendable := bk.SpendableCoins(ctx, account.GetAddress()) fees, err := simtypes.RandomFees(r, ctx, spendable) diff --git a/x/slashing/simulation/operations_test.go b/x/slashing/simulation/operations_test.go index f0d970a41043..e55e207ae021 100644 --- a/x/slashing/simulation/operations_test.go +++ b/x/slashing/simulation/operations_test.go @@ -175,9 +175,10 @@ func (suite *SimTestSuite) TestSimulateMsgUnjail() { validator0, issuedShares := validator0.AddTokensFromDel(delTokens) val0AccAddress, err := sdk.ValAddressFromBech32(validator0.OperatorAddress) suite.Require().NoError(err) - selfDelegation := stakingtypes.NewDelegation(val0AccAddress.Bytes(), validator0.GetOperator(), issuedShares) - suite.stakingKeeper.SetDelegation(ctx, selfDelegation) - suite.distrKeeper.SetDelegatorStartingInfo(ctx, validator0.GetOperator(), val0AccAddress.Bytes(), distrtypes.NewDelegatorStartingInfo(2, math.LegacyOneDec(), 200)) + + selfDelegation := stakingtypes.NewDelegation(suite.accounts[0].Address.String(), validator0.GetOperator(), issuedShares) + suite.Require().NoError(suite.stakingKeeper.SetDelegation(ctx, selfDelegation)) + suite.Require().NoError(suite.distrKeeper.SetDelegatorStartingInfo(ctx, val0AccAddress, val0AccAddress.Bytes(), distrtypes.NewDelegatorStartingInfo(2, math.LegacyOneDec(), 200))) // begin a new block suite.app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: suite.app.LastBlockHeight() + 1, Hash: suite.app.LastCommitID().Hash, Time: blockTime}) @@ -204,7 +205,7 @@ func getTestingValidator(ctx sdk.Context, stakingKeeper *stakingkeeper.Keeper, a account := accounts[n] valPubKey := account.ConsKey.PubKey() valAddr := sdk.ValAddress(account.PubKey.Address().Bytes()) - validator, err := stakingtypes.NewValidator(valAddr, valPubKey, stakingtypes.Description{}) + validator, err := stakingtypes.NewValidator(valAddr.String(), valPubKey, stakingtypes.Description{}) if err != nil { return stakingtypes.Validator{}, fmt.Errorf("failed to create validator: %w", err) } diff --git a/x/slashing/simulation/proposals_test.go b/x/slashing/simulation/proposals_test.go index 356c53777155..67f00516193d 100644 --- a/x/slashing/simulation/proposals_test.go +++ b/x/slashing/simulation/proposals_test.go @@ -5,10 +5,11 @@ import ( "testing" "time" - sdkmath "cosmossdk.io/math" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "gotest.tools/v3/assert" + sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" diff --git a/x/slashing/testutil/expected_keepers_mocks.go b/x/slashing/testutil/expected_keepers_mocks.go index 037343fb226f..6080d7104008 100644 --- a/x/slashing/testutil/expected_keepers_mocks.go +++ b/x/slashing/testutil/expected_keepers_mocks.go @@ -8,6 +8,7 @@ import ( context "context" reflect "reflect" + address "cosmossdk.io/core/address" math "cosmossdk.io/math" types "github.com/cosmos/cosmos-sdk/types" types0 "github.com/cosmos/cosmos-sdk/x/params/types" @@ -253,12 +254,27 @@ func (m *MockStakingKeeper) EXPECT() *MockStakingKeeperMockRecorder { return m.recorder } +// ConsensusAddressCodec mocks base method. +func (m *MockStakingKeeper) ConsensusAddressCodec() address.Codec { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ConsensusAddressCodec") + ret0, _ := ret[0].(address.Codec) + return ret0 +} + +// ConsensusAddressCodec indicates an expected call of ConsensusAddressCodec. +func (mr *MockStakingKeeperMockRecorder) ConsensusAddressCodec() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConsensusAddressCodec", reflect.TypeOf((*MockStakingKeeper)(nil).ConsensusAddressCodec)) +} + // Delegation mocks base method. -func (m *MockStakingKeeper) Delegation(arg0 types.Context, arg1 types.AccAddress, arg2 types.ValAddress) types1.DelegationI { +func (m *MockStakingKeeper) Delegation(arg0 context.Context, arg1 types.AccAddress, arg2 types.ValAddress) (types1.DelegationI, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Delegation", arg0, arg1, arg2) ret0, _ := ret[0].(types1.DelegationI) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // Delegation indicates an expected call of Delegation. @@ -268,11 +284,12 @@ func (mr *MockStakingKeeperMockRecorder) Delegation(arg0, arg1, arg2 interface{} } // GetAllValidators mocks base method. -func (m *MockStakingKeeper) GetAllValidators(ctx types.Context) []types1.Validator { +func (m *MockStakingKeeper) GetAllValidators(ctx context.Context) ([]types1.Validator, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetAllValidators", ctx) ret0, _ := ret[0].([]types1.Validator) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // GetAllValidators indicates an expected call of GetAllValidators. @@ -282,11 +299,12 @@ func (mr *MockStakingKeeperMockRecorder) GetAllValidators(ctx interface{}) *gomo } // IsValidatorJailed mocks base method. -func (m *MockStakingKeeper) IsValidatorJailed(ctx types.Context, addr types.ConsAddress) bool { +func (m *MockStakingKeeper) IsValidatorJailed(ctx context.Context, addr types.ConsAddress) (bool, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "IsValidatorJailed", ctx, addr) ret0, _ := ret[0].(bool) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // IsValidatorJailed indicates an expected call of IsValidatorJailed. @@ -296,9 +314,11 @@ func (mr *MockStakingKeeperMockRecorder) IsValidatorJailed(ctx, addr interface{} } // IterateValidators mocks base method. -func (m *MockStakingKeeper) IterateValidators(arg0 types.Context, arg1 func(int64, types1.ValidatorI) bool) { +func (m *MockStakingKeeper) IterateValidators(arg0 context.Context, arg1 func(int64, types1.ValidatorI) bool) error { m.ctrl.T.Helper() - m.ctrl.Call(m, "IterateValidators", arg0, arg1) + ret := m.ctrl.Call(m, "IterateValidators", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 } // IterateValidators indicates an expected call of IterateValidators. @@ -308,9 +328,11 @@ func (mr *MockStakingKeeperMockRecorder) IterateValidators(arg0, arg1 interface{ } // Jail mocks base method. -func (m *MockStakingKeeper) Jail(arg0 types.Context, arg1 types.ConsAddress) { +func (m *MockStakingKeeper) Jail(arg0 context.Context, arg1 types.ConsAddress) error { m.ctrl.T.Helper() - m.ctrl.Call(m, "Jail", arg0, arg1) + ret := m.ctrl.Call(m, "Jail", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 } // Jail indicates an expected call of Jail. @@ -320,11 +342,12 @@ func (mr *MockStakingKeeperMockRecorder) Jail(arg0, arg1 interface{}) *gomock.Ca } // MaxValidators mocks base method. -func (m *MockStakingKeeper) MaxValidators(arg0 types.Context) uint32 { +func (m *MockStakingKeeper) MaxValidators(arg0 context.Context) (uint32, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "MaxValidators", arg0) ret0, _ := ret[0].(uint32) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // MaxValidators indicates an expected call of MaxValidators. @@ -334,11 +357,12 @@ func (mr *MockStakingKeeperMockRecorder) MaxValidators(arg0 interface{}) *gomock } // Slash mocks base method. -func (m *MockStakingKeeper) Slash(arg0 types.Context, arg1 types.ConsAddress, arg2, arg3 int64, arg4 math.LegacyDec) math.Int { +func (m *MockStakingKeeper) Slash(arg0 context.Context, arg1 types.ConsAddress, arg2, arg3 int64, arg4 math.LegacyDec) (math.Int, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Slash", arg0, arg1, arg2, arg3, arg4) ret0, _ := ret[0].(math.Int) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // Slash indicates an expected call of Slash. @@ -348,11 +372,12 @@ func (mr *MockStakingKeeperMockRecorder) Slash(arg0, arg1, arg2, arg3, arg4 inte } // SlashWithInfractionReason mocks base method. -func (m *MockStakingKeeper) SlashWithInfractionReason(arg0 types.Context, arg1 types.ConsAddress, arg2, arg3 int64, arg4 math.LegacyDec, arg5 types1.Infraction) math.Int { +func (m *MockStakingKeeper) SlashWithInfractionReason(arg0 context.Context, arg1 types.ConsAddress, arg2, arg3 int64, arg4 math.LegacyDec, arg5 types1.Infraction) (math.Int, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SlashWithInfractionReason", arg0, arg1, arg2, arg3, arg4, arg5) ret0, _ := ret[0].(math.Int) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // SlashWithInfractionReason indicates an expected call of SlashWithInfractionReason. @@ -362,9 +387,11 @@ func (mr *MockStakingKeeperMockRecorder) SlashWithInfractionReason(arg0, arg1, a } // Unjail mocks base method. -func (m *MockStakingKeeper) Unjail(arg0 types.Context, arg1 types.ConsAddress) { +func (m *MockStakingKeeper) Unjail(arg0 context.Context, arg1 types.ConsAddress) error { m.ctrl.T.Helper() - m.ctrl.Call(m, "Unjail", arg0, arg1) + ret := m.ctrl.Call(m, "Unjail", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 } // Unjail indicates an expected call of Unjail. @@ -374,11 +401,12 @@ func (mr *MockStakingKeeperMockRecorder) Unjail(arg0, arg1 interface{}) *gomock. } // Validator mocks base method. -func (m *MockStakingKeeper) Validator(arg0 types.Context, arg1 types.ValAddress) types1.ValidatorI { +func (m *MockStakingKeeper) Validator(arg0 context.Context, arg1 types.ValAddress) (types1.ValidatorI, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Validator", arg0, arg1) ret0, _ := ret[0].(types1.ValidatorI) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // Validator indicates an expected call of Validator. @@ -387,12 +415,27 @@ func (mr *MockStakingKeeperMockRecorder) Validator(arg0, arg1 interface{}) *gomo return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validator", reflect.TypeOf((*MockStakingKeeper)(nil).Validator), arg0, arg1) } +// ValidatorAddressCodec mocks base method. +func (m *MockStakingKeeper) ValidatorAddressCodec() address.Codec { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ValidatorAddressCodec") + ret0, _ := ret[0].(address.Codec) + return ret0 +} + +// ValidatorAddressCodec indicates an expected call of ValidatorAddressCodec. +func (mr *MockStakingKeeperMockRecorder) ValidatorAddressCodec() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatorAddressCodec", reflect.TypeOf((*MockStakingKeeper)(nil).ValidatorAddressCodec)) +} + // ValidatorByConsAddr mocks base method. -func (m *MockStakingKeeper) ValidatorByConsAddr(arg0 types.Context, arg1 types.ConsAddress) types1.ValidatorI { +func (m *MockStakingKeeper) ValidatorByConsAddr(arg0 context.Context, arg1 types.ConsAddress) (types1.ValidatorI, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ValidatorByConsAddr", arg0, arg1) ret0, _ := ret[0].(types1.ValidatorI) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // ValidatorByConsAddr indicates an expected call of ValidatorByConsAddr. @@ -425,7 +468,7 @@ func (m *MockStakingHooks) EXPECT() *MockStakingHooksMockRecorder { } // AfterDelegationModified mocks base method. -func (m *MockStakingHooks) AfterDelegationModified(ctx types.Context, delAddr types.AccAddress, valAddr types.ValAddress) error { +func (m *MockStakingHooks) AfterDelegationModified(ctx context.Context, delAddr types.AccAddress, valAddr types.ValAddress) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AfterDelegationModified", ctx, delAddr, valAddr) ret0, _ := ret[0].(error) @@ -439,7 +482,7 @@ func (mr *MockStakingHooksMockRecorder) AfterDelegationModified(ctx, delAddr, va } // AfterValidatorBeginUnbonding mocks base method. -func (m *MockStakingHooks) AfterValidatorBeginUnbonding(ctx types.Context, consAddr types.ConsAddress, valAddr types.ValAddress) error { +func (m *MockStakingHooks) AfterValidatorBeginUnbonding(ctx context.Context, consAddr types.ConsAddress, valAddr types.ValAddress) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AfterValidatorBeginUnbonding", ctx, consAddr, valAddr) ret0, _ := ret[0].(error) @@ -453,7 +496,7 @@ func (mr *MockStakingHooksMockRecorder) AfterValidatorBeginUnbonding(ctx, consAd } // AfterValidatorBonded mocks base method. -func (m *MockStakingHooks) AfterValidatorBonded(ctx types.Context, consAddr types.ConsAddress, valAddr types.ValAddress) error { +func (m *MockStakingHooks) AfterValidatorBonded(ctx context.Context, consAddr types.ConsAddress, valAddr types.ValAddress) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AfterValidatorBonded", ctx, consAddr, valAddr) ret0, _ := ret[0].(error) @@ -467,7 +510,7 @@ func (mr *MockStakingHooksMockRecorder) AfterValidatorBonded(ctx, consAddr, valA } // AfterValidatorCreated mocks base method. -func (m *MockStakingHooks) AfterValidatorCreated(ctx types.Context, valAddr types.ValAddress) error { +func (m *MockStakingHooks) AfterValidatorCreated(ctx context.Context, valAddr types.ValAddress) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AfterValidatorCreated", ctx, valAddr) ret0, _ := ret[0].(error) @@ -481,7 +524,7 @@ func (mr *MockStakingHooksMockRecorder) AfterValidatorCreated(ctx, valAddr inter } // AfterValidatorRemoved mocks base method. -func (m *MockStakingHooks) AfterValidatorRemoved(ctx types.Context, consAddr types.ConsAddress, valAddr types.ValAddress) error { +func (m *MockStakingHooks) AfterValidatorRemoved(ctx context.Context, consAddr types.ConsAddress, valAddr types.ValAddress) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AfterValidatorRemoved", ctx, consAddr, valAddr) ret0, _ := ret[0].(error) @@ -495,7 +538,7 @@ func (mr *MockStakingHooksMockRecorder) AfterValidatorRemoved(ctx, consAddr, val } // BeforeDelegationCreated mocks base method. -func (m *MockStakingHooks) BeforeDelegationCreated(ctx types.Context, delAddr types.AccAddress, valAddr types.ValAddress) error { +func (m *MockStakingHooks) BeforeDelegationCreated(ctx context.Context, delAddr types.AccAddress, valAddr types.ValAddress) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "BeforeDelegationCreated", ctx, delAddr, valAddr) ret0, _ := ret[0].(error) @@ -509,7 +552,7 @@ func (mr *MockStakingHooksMockRecorder) BeforeDelegationCreated(ctx, delAddr, va } // BeforeDelegationRemoved mocks base method. -func (m *MockStakingHooks) BeforeDelegationRemoved(ctx types.Context, delAddr types.AccAddress, valAddr types.ValAddress) error { +func (m *MockStakingHooks) BeforeDelegationRemoved(ctx context.Context, delAddr types.AccAddress, valAddr types.ValAddress) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "BeforeDelegationRemoved", ctx, delAddr, valAddr) ret0, _ := ret[0].(error) @@ -523,7 +566,7 @@ func (mr *MockStakingHooksMockRecorder) BeforeDelegationRemoved(ctx, delAddr, va } // BeforeDelegationSharesModified mocks base method. -func (m *MockStakingHooks) BeforeDelegationSharesModified(ctx types.Context, delAddr types.AccAddress, valAddr types.ValAddress) error { +func (m *MockStakingHooks) BeforeDelegationSharesModified(ctx context.Context, delAddr types.AccAddress, valAddr types.ValAddress) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "BeforeDelegationSharesModified", ctx, delAddr, valAddr) ret0, _ := ret[0].(error) @@ -537,7 +580,7 @@ func (mr *MockStakingHooksMockRecorder) BeforeDelegationSharesModified(ctx, delA } // BeforeValidatorModified mocks base method. -func (m *MockStakingHooks) BeforeValidatorModified(ctx types.Context, valAddr types.ValAddress) error { +func (m *MockStakingHooks) BeforeValidatorModified(ctx context.Context, valAddr types.ValAddress) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "BeforeValidatorModified", ctx, valAddr) ret0, _ := ret[0].(error) @@ -551,7 +594,7 @@ func (mr *MockStakingHooksMockRecorder) BeforeValidatorModified(ctx, valAddr int } // BeforeValidatorSlashed mocks base method. -func (m *MockStakingHooks) BeforeValidatorSlashed(ctx types.Context, valAddr types.ValAddress, fraction math.LegacyDec) error { +func (m *MockStakingHooks) BeforeValidatorSlashed(ctx context.Context, valAddr types.ValAddress, fraction math.LegacyDec) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "BeforeValidatorSlashed", ctx, valAddr, fraction) ret0, _ := ret[0].(error) diff --git a/x/slashing/types/events.go b/x/slashing/types/events.go index 600e59932ec2..af115fee539f 100644 --- a/x/slashing/types/events.go +++ b/x/slashing/types/events.go @@ -13,6 +13,7 @@ const ( AttributeKeyMissedBlocks = "missed_blocks" AttributeKeyBurnedCoins = "burned_coins" + AttributeValueUnspecified = "unspecified" AttributeValueDoubleSign = "double_sign" AttributeValueMissingSignature = "missing_signature" ) diff --git a/x/slashing/types/expected_keepers.go b/x/slashing/types/expected_keepers.go index 2e57cf09d28a..7c2a6b5d9b1e 100644 --- a/x/slashing/types/expected_keepers.go +++ b/x/slashing/types/expected_keepers.go @@ -3,6 +3,7 @@ package types import ( context "context" + "cosmossdk.io/core/address" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" @@ -35,43 +36,45 @@ type ParamSubspace interface { // StakingKeeper expected staking keeper type StakingKeeper interface { + ValidatorAddressCodec() address.Codec + ConsensusAddressCodec() address.Codec // iterate through validators by operator address, execute func for each validator - IterateValidators(sdk.Context, - func(index int64, validator stakingtypes.ValidatorI) (stop bool)) + IterateValidators(context.Context, + func(index int64, validator stakingtypes.ValidatorI) (stop bool)) error - Validator(sdk.Context, sdk.ValAddress) stakingtypes.ValidatorI // get a particular validator by operator address - ValidatorByConsAddr(sdk.Context, sdk.ConsAddress) stakingtypes.ValidatorI // get a particular validator by consensus address + Validator(context.Context, sdk.ValAddress) (stakingtypes.ValidatorI, error) // get a particular validator by operator address + ValidatorByConsAddr(context.Context, sdk.ConsAddress) (stakingtypes.ValidatorI, error) // get a particular validator by consensus address // slash the validator and delegators of the validator, specifying offense height, offense power, and slash fraction - Slash(sdk.Context, sdk.ConsAddress, int64, int64, math.LegacyDec) math.Int - SlashWithInfractionReason(sdk.Context, sdk.ConsAddress, int64, int64, math.LegacyDec, stakingtypes.Infraction) math.Int - Jail(sdk.Context, sdk.ConsAddress) // jail a validator - Unjail(sdk.Context, sdk.ConsAddress) // unjail a validator + Slash(context.Context, sdk.ConsAddress, int64, int64, math.LegacyDec) (math.Int, error) + SlashWithInfractionReason(context.Context, sdk.ConsAddress, int64, int64, math.LegacyDec, stakingtypes.Infraction) (math.Int, error) + Jail(context.Context, sdk.ConsAddress) error // jail a validator + Unjail(context.Context, sdk.ConsAddress) error // unjail a validator // Delegation allows for getting a particular delegation for a given validator // and delegator outside the scope of the staking module. - Delegation(sdk.Context, sdk.AccAddress, sdk.ValAddress) stakingtypes.DelegationI - GetAllValidators(ctx sdk.Context) (validators []stakingtypes.Validator) + Delegation(context.Context, sdk.AccAddress, sdk.ValAddress) (stakingtypes.DelegationI, error) + GetAllValidators(ctx context.Context) ([]stakingtypes.Validator, error) // MaxValidators returns the maximum amount of bonded validators - MaxValidators(sdk.Context) uint32 + MaxValidators(context.Context) (uint32, error) // IsValidatorJailed returns if the validator is jailed. - IsValidatorJailed(ctx sdk.Context, addr sdk.ConsAddress) bool + IsValidatorJailed(ctx context.Context, addr sdk.ConsAddress) (bool, error) } // StakingHooks event hooks for staking validator object (noalias) type StakingHooks interface { - AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) error // Must be called when a validator is created - BeforeValidatorModified(ctx sdk.Context, valAddr sdk.ValAddress) error // Must be called when a validator's state changes - AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error // Must be called when a validator is deleted + AfterValidatorCreated(ctx context.Context, valAddr sdk.ValAddress) error // Must be called when a validator is created + BeforeValidatorModified(ctx context.Context, valAddr sdk.ValAddress) error // Must be called when a validator's state changes + AfterValidatorRemoved(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error // Must be called when a validator is deleted - AfterValidatorBonded(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error // Must be called when a validator is bonded - AfterValidatorBeginUnbonding(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error // Must be called when a validator begins unbonding + AfterValidatorBonded(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error // Must be called when a validator is bonded + AfterValidatorBeginUnbonding(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error // Must be called when a validator begins unbonding - BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error // Must be called when a delegation is created - BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error // Must be called when a delegation's shares are modified - BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error // Must be called when a delegation is removed - AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error - BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction math.LegacyDec) error + BeforeDelegationCreated(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error // Must be called when a delegation is created + BeforeDelegationSharesModified(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error // Must be called when a delegation's shares are modified + BeforeDelegationRemoved(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error // Must be called when a delegation is removed + AfterDelegationModified(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error + BeforeValidatorSlashed(ctx context.Context, valAddr sdk.ValAddress, fraction math.LegacyDec) error } diff --git a/x/slashing/types/msg.go b/x/slashing/types/msg.go index ed2604e6257e..e7a48f2ddd83 100644 --- a/x/slashing/types/msg.go +++ b/x/slashing/types/msg.go @@ -11,20 +11,8 @@ var ( ) // NewMsgUnjail creates a new MsgUnjail instance -func NewMsgUnjail(validatorAddr sdk.ValAddress) *MsgUnjail { +func NewMsgUnjail(validatorAddr string) *MsgUnjail { return &MsgUnjail{ - ValidatorAddr: validatorAddr.String(), + ValidatorAddr: validatorAddr, } } - -// GetSigners returns the expected signers for MsgUnjail. -func (msg MsgUnjail) GetSigners() []sdk.AccAddress { - valAddr, _ := sdk.ValAddressFromBech32(msg.ValidatorAddr) - return []sdk.AccAddress{sdk.AccAddress(valAddr)} -} - -// GetSigners returns the expected signers for a MsgUpdateParams message. -func (msg MsgUpdateParams) GetSigners() []sdk.AccAddress { - addr, _ := sdk.AccAddressFromBech32(msg.Authority) - return []sdk.AccAddress{addr} -} diff --git a/x/slashing/types/msg_test.go b/x/slashing/types/msg_test.go index 17f3ba6d6032..6ccf68376943 100644 --- a/x/slashing/types/msg_test.go +++ b/x/slashing/types/msg_test.go @@ -12,7 +12,7 @@ import ( func TestMsgUnjailGetSignBytes(t *testing.T) { addr := sdk.AccAddress("abcd") - msg := NewMsgUnjail(sdk.ValAddress(addr)) + msg := NewMsgUnjail(sdk.ValAddress(addr).String()) pc := codec.NewProtoCodec(types.NewInterfaceRegistry()) bytes, err := pc.MarshalAminoJSON(msg) require.NoError(t, err) diff --git a/x/slashing/types/query.pb.go b/x/slashing/types/query.pb.go index 905cd4a06227..5b9a6305d447 100644 --- a/x/slashing/types/query.pb.go +++ b/x/slashing/types/query.pb.go @@ -323,43 +323,43 @@ func init() { } var fileDescriptor_791b11d41a861ed0 = []byte{ - // 566 bytes of a gzipped FileDescriptorProto + // 572 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0x41, 0x6b, 0x13, 0x41, - 0x14, 0xc7, 0x33, 0xad, 0x16, 0x3a, 0x29, 0xa2, 0x63, 0xa0, 0x69, 0x90, 0x8d, 0xae, 0x90, 0x96, - 0x6a, 0x76, 0x4c, 0x44, 0x3c, 0x88, 0x07, 0x73, 0xb0, 0x08, 0x1e, 0x34, 0x85, 0x82, 0x5e, 0xc2, - 0x6c, 0x32, 0x9d, 0x0e, 0x6e, 0x66, 0xb6, 0x3b, 0x9b, 0x60, 0x11, 0x3d, 0x78, 0xf6, 0x20, 0xf8, - 0x19, 0x04, 0x8f, 0x2a, 0x7e, 0x88, 0x1e, 0x8b, 0x5e, 0x3c, 0x89, 0x24, 0x82, 0x77, 0x3f, 0x81, - 0x64, 0x66, 0x92, 0x4c, 0x89, 0xab, 0x29, 0x5e, 0x92, 0xe5, 0xbd, 0xf7, 0x7f, 0xff, 0xdf, 0x7b, - 0x79, 0x1b, 0x78, 0xb9, 0x2d, 0x55, 0x57, 0x2a, 0xac, 0x22, 0xa2, 0xf6, 0xb8, 0x60, 0xb8, 0x5f, - 0x0b, 0x69, 0x4a, 0x6a, 0x78, 0xbf, 0x47, 0x93, 0x83, 0x20, 0x4e, 0x64, 0x2a, 0xd1, 0xaa, 0x29, - 0x0a, 0xc6, 0x45, 0x81, 0x2d, 0x2a, 0x6d, 0x5a, 0x75, 0x48, 0x14, 0x35, 0x8a, 0x89, 0x3e, 0x26, - 0x8c, 0x0b, 0x92, 0x72, 0x29, 0x4c, 0x93, 0x52, 0x81, 0x49, 0x26, 0xf5, 0x23, 0x1e, 0x3d, 0xd9, - 0xe8, 0x05, 0x26, 0x25, 0x8b, 0x28, 0x26, 0x31, 0xc7, 0x44, 0x08, 0x99, 0x6a, 0x89, 0xb2, 0xd9, - 0x4a, 0x16, 0xdd, 0x84, 0xc4, 0xd4, 0xad, 0x99, 0xba, 0x96, 0x69, 0x6f, 0x69, 0x4d, 0xea, 0x1c, - 0xe9, 0x72, 0x21, 0xb1, 0xfe, 0x34, 0x21, 0xbf, 0x00, 0xd1, 0xc3, 0x11, 0xeb, 0x03, 0x92, 0x90, - 0xae, 0x6a, 0xd2, 0xfd, 0x1e, 0x55, 0xa9, 0xff, 0x08, 0x9e, 0x3f, 0x16, 0x55, 0xb1, 0x14, 0x8a, - 0xa2, 0x06, 0x5c, 0x8a, 0x75, 0xa4, 0x08, 0x2e, 0x82, 0x8d, 0x7c, 0xbd, 0x1c, 0x64, 0x2c, 0x23, - 0x30, 0xc2, 0xc6, 0xf2, 0xe1, 0xb7, 0x72, 0xee, 0xdd, 0xcf, 0xf7, 0x9b, 0xa0, 0x69, 0x95, 0xfe, - 0x0e, 0x5c, 0xd5, 0xad, 0xb7, 0x39, 0x13, 0x5c, 0xb0, 0x7b, 0x62, 0x57, 0x5a, 0x57, 0x74, 0x0b, - 0xae, 0xb4, 0xa5, 0x50, 0x2d, 0xd2, 0xe9, 0x24, 0x54, 0x19, 0x93, 0xe5, 0x46, 0xf1, 0xf3, 0xa7, - 0x6a, 0xc1, 0xfa, 0xdc, 0x31, 0x99, 0xed, 0x34, 0xe1, 0x82, 0x35, 0xf3, 0xa3, 0x6a, 0x1b, 0xf2, - 0x5f, 0xc0, 0xe2, 0x6c, 0x5f, 0xcb, 0x1d, 0xc2, 0xb3, 0x7d, 0x12, 0xb5, 0x94, 0x49, 0xb5, 0xb8, - 0xd8, 0x95, 0x76, 0x82, 0x6a, 0xe6, 0x04, 0x3b, 0x24, 0xe2, 0x1d, 0x92, 0xca, 0xc4, 0x69, 0xe8, - 0xce, 0x73, 0xa6, 0x4f, 0x22, 0x27, 0xe5, 0x87, 0xb3, 0xfe, 0xe3, 0x75, 0xa2, 0xbb, 0x10, 0x4e, - 0x4f, 0xc0, 0x3a, 0x57, 0xc6, 0xce, 0xa3, 0x7b, 0x09, 0xcc, 0x85, 0x4d, 0xb7, 0xc7, 0xa8, 0xd5, - 0x36, 0x1d, 0xa5, 0xff, 0x11, 0xc0, 0xb5, 0x3f, 0x98, 0xd8, 0x29, 0xef, 0xc3, 0x53, 0x76, 0xb2, - 0xc5, 0xff, 0x9a, 0x4c, 0x77, 0x41, 0x5b, 0xc7, 0x98, 0x17, 0x34, 0xf3, 0xfa, 0x3f, 0x99, 0x0d, - 0x8a, 0x0b, 0x5d, 0xff, 0xb5, 0x08, 0x4f, 0x6b, 0x68, 0xf4, 0x0a, 0xc0, 0x25, 0x73, 0x18, 0xe8, - 0x4a, 0x26, 0xdd, 0xec, 0x35, 0x96, 0xae, 0xce, 0x57, 0x6c, 0xbc, 0xfd, 0xf5, 0x97, 0x5f, 0x7e, - 0xbc, 0x59, 0xb8, 0x84, 0xca, 0x38, 0xeb, 0x85, 0x31, 0x97, 0x88, 0x3e, 0x00, 0x98, 0x77, 0x56, - 0x80, 0xae, 0xfd, 0xdd, 0x66, 0xf6, 0x60, 0x4b, 0xb5, 0x13, 0x28, 0x2c, 0xdd, 0x6d, 0x4d, 0x77, - 0x13, 0xdd, 0xc8, 0xa4, 0x73, 0xaf, 0x54, 0xe1, 0x67, 0xee, 0x1b, 0xf1, 0x1c, 0xbd, 0x05, 0x70, - 0xc5, 0xfd, 0xf1, 0xd1, 0xfc, 0x08, 0x93, 0x75, 0xd6, 0x4f, 0x22, 0xb1, 0xd8, 0x81, 0xc6, 0xde, - 0x40, 0x95, 0xf9, 0xb0, 0x1b, 0x5b, 0x87, 0x03, 0x0f, 0x1c, 0x0d, 0x3c, 0xf0, 0x7d, 0xe0, 0x81, - 0xd7, 0x43, 0x2f, 0x77, 0x34, 0xf4, 0x72, 0x5f, 0x87, 0x5e, 0xee, 0x71, 0x95, 0xf1, 0x74, 0xaf, - 0x17, 0x06, 0x6d, 0xd9, 0x1d, 0xf7, 0x32, 0x5f, 0x55, 0xd5, 0x79, 0x82, 0x9f, 0x4e, 0x1b, 0xa7, - 0x07, 0x31, 0x55, 0xe1, 0x92, 0xfe, 0x9b, 0xba, 0xfe, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x5f, 0xae, - 0x17, 0x98, 0x9c, 0x05, 0x00, 0x00, + 0x14, 0xc7, 0x33, 0xad, 0x06, 0x3a, 0x29, 0xa2, 0x63, 0xa1, 0x6d, 0xd0, 0x8d, 0x5d, 0x21, 0x2d, + 0xd5, 0xec, 0x98, 0x88, 0x78, 0xf2, 0x60, 0x14, 0x8b, 0xe0, 0x41, 0x53, 0x10, 0xf4, 0xb2, 0xcc, + 0x26, 0xd3, 0xe9, 0xe0, 0x66, 0x66, 0xbb, 0xb3, 0x09, 0x16, 0xd1, 0x83, 0x67, 0x0f, 0x82, 0x9f, + 0x41, 0xf0, 0xa8, 0xe2, 0x87, 0xe8, 0xb1, 0xe8, 0xc5, 0x93, 0x48, 0x22, 0x78, 0xf7, 0x13, 0xc8, + 0xce, 0x4c, 0x92, 0x2d, 0x71, 0x35, 0xc5, 0x4b, 0xb2, 0xbc, 0xf7, 0xfe, 0xef, 0xff, 0x7b, 0x2f, + 0x6f, 0x03, 0x2f, 0xb6, 0xa5, 0xea, 0x4a, 0x85, 0x55, 0x48, 0xd4, 0x2e, 0x17, 0x0c, 0xf7, 0xeb, + 0x01, 0x4d, 0x48, 0x1d, 0xef, 0xf5, 0x68, 0xbc, 0xef, 0x45, 0xb1, 0x4c, 0x24, 0x5a, 0x36, 0x45, + 0xde, 0xa8, 0xc8, 0xb3, 0x45, 0xe5, 0x4d, 0xab, 0x0e, 0x88, 0xa2, 0x46, 0x31, 0xd6, 0x47, 0x84, + 0x71, 0x41, 0x12, 0x2e, 0x85, 0x69, 0x52, 0x5e, 0x62, 0x92, 0x49, 0xfd, 0x88, 0xd3, 0x27, 0x1b, + 0x3d, 0xc7, 0xa4, 0x64, 0x21, 0xc5, 0x24, 0xe2, 0x98, 0x08, 0x21, 0x13, 0x2d, 0x51, 0x36, 0x5b, + 0xcd, 0xa3, 0x1b, 0x93, 0x98, 0xba, 0x55, 0x53, 0xe7, 0x9b, 0xf6, 0x96, 0xd6, 0xa4, 0xce, 0x90, + 0x2e, 0x17, 0x12, 0xeb, 0x4f, 0x13, 0x72, 0x97, 0x20, 0x7a, 0x90, 0xb2, 0xde, 0x27, 0x31, 0xe9, + 0xaa, 0x16, 0xdd, 0xeb, 0x51, 0x95, 0xb8, 0x8f, 0xe0, 0xd9, 0x23, 0x51, 0x15, 0x49, 0xa1, 0x28, + 0x6a, 0xc2, 0x62, 0xa4, 0x23, 0x2b, 0xe0, 0x02, 0xd8, 0x28, 0x35, 0x2a, 0x5e, 0xce, 0x32, 0x3c, + 0x23, 0x6c, 0x2e, 0x1c, 0x7c, 0xab, 0x14, 0xde, 0xfd, 0x7c, 0xbf, 0x09, 0x5a, 0x56, 0xe9, 0xfa, + 0x70, 0x59, 0xb7, 0xde, 0xe6, 0x4c, 0x70, 0xc1, 0xee, 0x8a, 0x1d, 0x69, 0x5d, 0xd1, 0x6d, 0xb8, + 0xd8, 0x96, 0x42, 0xf9, 0xa4, 0xd3, 0x89, 0xa9, 0x32, 0x26, 0x0b, 0xcd, 0xb5, 0xcf, 0x9f, 0x6a, + 0xe7, 0xad, 0xcf, 0xad, 0x14, 0x43, 0xa8, 0x9e, 0xba, 0x69, 0x4a, 0xb6, 0x93, 0x98, 0x0b, 0xd6, + 0x2a, 0xa5, 0x32, 0x1b, 0x72, 0x5f, 0xc0, 0x95, 0x69, 0x03, 0x3b, 0x40, 0x00, 0x4f, 0xf7, 0x49, + 0xe8, 0x2b, 0x93, 0xf2, 0xb9, 0xd8, 0x91, 0x76, 0x94, 0x5a, 0xee, 0x28, 0x0f, 0x49, 0xc8, 0x3b, + 0x24, 0x91, 0x71, 0xa6, 0x61, 0x76, 0xb0, 0x53, 0x7d, 0x12, 0x66, 0x52, 0x6e, 0x30, 0xed, 0x3f, + 0xda, 0x2b, 0xba, 0x03, 0xe1, 0xe4, 0x16, 0xac, 0x73, 0x75, 0xe4, 0x9c, 0x1e, 0x8e, 0x67, 0x4e, + 0x6d, 0xb2, 0x46, 0x46, 0xad, 0xb6, 0x95, 0x51, 0xba, 0x1f, 0x01, 0x5c, 0xfd, 0x83, 0x89, 0x9d, + 0xf2, 0x1e, 0x3c, 0x61, 0x27, 0x9b, 0xff, 0xaf, 0xc9, 0x74, 0x17, 0xb4, 0x75, 0x84, 0x79, 0x4e, + 0x33, 0xaf, 0xff, 0x93, 0xd9, 0xa0, 0x64, 0xa1, 0x1b, 0xbf, 0xe6, 0xe1, 0x49, 0x0d, 0x8d, 0x5e, + 0x01, 0x58, 0x34, 0x17, 0x82, 0x2e, 0xe5, 0xd2, 0x4d, 0x9f, 0x65, 0xf9, 0xf2, 0x6c, 0xc5, 0xc6, + 0xdb, 0x5d, 0x7f, 0xf9, 0xe5, 0xc7, 0x9b, 0xb9, 0x35, 0x54, 0xc1, 0x79, 0x6f, 0x8e, 0x39, 0x49, + 0xf4, 0x01, 0xc0, 0x52, 0x66, 0x05, 0xe8, 0xca, 0xdf, 0x6d, 0xa6, 0x2f, 0xb7, 0x5c, 0x3f, 0x86, + 0xc2, 0xd2, 0xdd, 0xd0, 0x74, 0xd7, 0xd1, 0xb5, 0x5c, 0xba, 0xec, 0x95, 0x2a, 0xfc, 0x2c, 0xfb, + 0x6a, 0x3c, 0x47, 0x6f, 0x01, 0x5c, 0xcc, 0xfe, 0xf8, 0x68, 0x76, 0x84, 0xf1, 0x3a, 0x1b, 0xc7, + 0x91, 0x58, 0x6c, 0x4f, 0x63, 0x6f, 0xa0, 0xea, 0x6c, 0xd8, 0xcd, 0xad, 0x83, 0x81, 0x03, 0x0e, + 0x07, 0x0e, 0xf8, 0x3e, 0x70, 0xc0, 0xeb, 0xa1, 0x53, 0x38, 0x1c, 0x3a, 0x85, 0xaf, 0x43, 0xa7, + 0xf0, 0xb8, 0xc6, 0x78, 0xb2, 0xdb, 0x0b, 0xbc, 0xb6, 0xec, 0x8e, 0x7a, 0x99, 0xaf, 0x9a, 0xea, + 0x3c, 0xc1, 0x4f, 0x27, 0x8d, 0x93, 0xfd, 0x88, 0xaa, 0xa0, 0xa8, 0xff, 0xaf, 0xae, 0xfe, 0x0e, + 0x00, 0x00, 0xff, 0xff, 0x19, 0x13, 0x5a, 0xf6, 0xa5, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/slashing/types/slashing.pb.go b/x/slashing/types/slashing.pb.go index dc6d17bb19b8..09a5f7744377 100644 --- a/x/slashing/types/slashing.pb.go +++ b/x/slashing/types/slashing.pb.go @@ -4,9 +4,9 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" _ "github.com/cosmos/cosmos-proto" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" @@ -129,11 +129,11 @@ func (m *ValidatorSigningInfo) GetMissedBlocksCounter() int64 { // Params represents the parameters used for by the slashing module. type Params struct { - SignedBlocksWindow int64 `protobuf:"varint,1,opt,name=signed_blocks_window,json=signedBlocksWindow,proto3" json:"signed_blocks_window,omitempty"` - MinSignedPerWindow github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=min_signed_per_window,json=minSignedPerWindow,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_signed_per_window"` - DowntimeJailDuration time.Duration `protobuf:"bytes,3,opt,name=downtime_jail_duration,json=downtimeJailDuration,proto3,stdduration" json:"downtime_jail_duration"` - SlashFractionDoubleSign github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=slash_fraction_double_sign,json=slashFractionDoubleSign,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"slash_fraction_double_sign"` - SlashFractionDowntime github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=slash_fraction_downtime,json=slashFractionDowntime,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"slash_fraction_downtime"` + SignedBlocksWindow int64 `protobuf:"varint,1,opt,name=signed_blocks_window,json=signedBlocksWindow,proto3" json:"signed_blocks_window,omitempty"` + MinSignedPerWindow cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=min_signed_per_window,json=minSignedPerWindow,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_signed_per_window"` + DowntimeJailDuration time.Duration `protobuf:"bytes,3,opt,name=downtime_jail_duration,json=downtimeJailDuration,proto3,stdduration" json:"downtime_jail_duration"` + SlashFractionDoubleSign cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=slash_fraction_double_sign,json=slashFractionDoubleSign,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"slash_fraction_double_sign"` + SlashFractionDowntime cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=slash_fraction_downtime,json=slashFractionDowntime,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"slash_fraction_downtime"` } func (m *Params) Reset() { *m = Params{} } @@ -193,47 +193,47 @@ func init() { } var fileDescriptor_1078e5d96a74cc52 = []byte{ - // 639 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x3f, 0x4f, 0x14, 0x4f, - 0x18, 0xbe, 0x01, 0x7e, 0xfc, 0x74, 0x0e, 0x13, 0x5d, 0x0f, 0x59, 0x2e, 0xba, 0x77, 0x50, 0x90, - 0x0b, 0x09, 0xbb, 0x82, 0x1d, 0x56, 0x1e, 0xc4, 0xe0, 0x9f, 0x44, 0x72, 0xf8, 0x27, 0xb1, 0x70, - 0x32, 0xbb, 0x33, 0xb7, 0x37, 0xb2, 0x3b, 0x73, 0xd9, 0x99, 0x15, 0x88, 0x8d, 0x8d, 0x8d, 0x15, - 0xa5, 0xb1, 0xb2, 0xa4, 0xa4, 0xf0, 0x0b, 0x58, 0x98, 0x50, 0x12, 0x2b, 0x63, 0x81, 0xe6, 0x28, - 0xf0, 0x63, 0x98, 0x9d, 0x99, 0x05, 0x02, 0x89, 0x15, 0xcd, 0xdd, 0xee, 0xf3, 0x3c, 0xef, 0xfb, - 0xbc, 0xf3, 0xcc, 0x9b, 0x85, 0x33, 0x91, 0x90, 0xa9, 0x90, 0x81, 0x4c, 0xb0, 0xec, 0x31, 0x1e, - 0x07, 0x6f, 0xe6, 0x43, 0xaa, 0xf0, 0xfc, 0x31, 0xe0, 0xf7, 0x33, 0xa1, 0x84, 0x33, 0x61, 0x74, - 0xfe, 0x31, 0x6c, 0x75, 0xf5, 0x5a, 0x2c, 0x62, 0xa1, 0x35, 0x41, 0xf1, 0x64, 0xe4, 0x75, 0x2f, - 0x16, 0x22, 0x4e, 0x68, 0xa0, 0xdf, 0xc2, 0xbc, 0x1b, 0x90, 0x3c, 0xc3, 0x8a, 0x09, 0x6e, 0xf9, - 0xc6, 0x59, 0x5e, 0xb1, 0x94, 0x4a, 0x85, 0xd3, 0xbe, 0x15, 0x4c, 0x1a, 0x3f, 0x64, 0x3a, 0x5b, - 0x73, 0x43, 0x5d, 0xc3, 0x29, 0xe3, 0x22, 0xd0, 0xbf, 0x06, 0x9a, 0xfe, 0x3a, 0x04, 0x6b, 0xcf, - 0x71, 0xc2, 0x08, 0x56, 0x22, 0x5b, 0x63, 0x31, 0x67, 0x3c, 0x7e, 0xc0, 0xbb, 0xc2, 0xb9, 0x0b, - 0xff, 0xc7, 0x84, 0x64, 0x54, 0x4a, 0x17, 0x34, 0x41, 0xeb, 0x72, 0x7b, 0xea, 0xfb, 0x97, 0xb9, - 0x5b, 0xb6, 0xdd, 0x92, 0xe0, 0x92, 0x72, 0x99, 0xcb, 0x7b, 0x46, 0xb2, 0xa6, 0x32, 0xc6, 0xe3, - 0x4e, 0x59, 0xe1, 0x4c, 0xc1, 0x31, 0xa9, 0x70, 0xa6, 0x50, 0x8f, 0xb2, 0xb8, 0xa7, 0xdc, 0xa1, - 0x26, 0x68, 0x0d, 0x77, 0xaa, 0x1a, 0x5b, 0xd1, 0x50, 0x21, 0x61, 0x9c, 0xd0, 0x4d, 0x24, 0xba, - 0x5d, 0x49, 0x95, 0x3b, 0x6c, 0x24, 0x1a, 0x7b, 0xa2, 0x21, 0xe7, 0x31, 0x1c, 0x7b, 0x8d, 0x59, - 0x42, 0x09, 0xca, 0xb9, 0x62, 0x89, 0x3b, 0xd2, 0x04, 0xad, 0xea, 0x42, 0xdd, 0x37, 0x09, 0xf8, - 0x65, 0x02, 0xfe, 0xd3, 0x32, 0x81, 0xf6, 0x95, 0xbd, 0x83, 0x46, 0x65, 0xfb, 0x57, 0x03, 0xec, - 0x1c, 0xed, 0xce, 0x82, 0x4e, 0xd5, 0x94, 0x3f, 0x2b, 0xaa, 0x1d, 0x0f, 0x42, 0x25, 0xd2, 0x50, - 0x2a, 0xc1, 0x29, 0x71, 0xff, 0x6b, 0x82, 0xd6, 0xa5, 0xce, 0x29, 0xc4, 0x59, 0x80, 0xe3, 0x29, - 0x93, 0x92, 0x12, 0x14, 0x26, 0x22, 0x5a, 0x97, 0x28, 0x12, 0x39, 0x57, 0x34, 0x73, 0x47, 0xf5, - 0x64, 0xd7, 0x0d, 0xd9, 0xd6, 0xdc, 0x92, 0xa1, 0x16, 0x47, 0xfe, 0x7c, 0x6e, 0x80, 0xe9, 0x6f, - 0x23, 0x70, 0x74, 0x15, 0x67, 0x38, 0x95, 0xce, 0x6d, 0x58, 0x93, 0x2c, 0xe6, 0x27, 0x4d, 0x36, - 0x18, 0x27, 0x62, 0x43, 0x47, 0x38, 0xdc, 0x71, 0x0c, 0x67, 0x7a, 0xbc, 0xd0, 0x8c, 0xf3, 0xb6, - 0xb0, 0xe5, 0xc8, 0x56, 0xf5, 0x69, 0x56, 0x96, 0x14, 0x99, 0x8d, 0xb5, 0x57, 0x8a, 0x13, 0xfd, - 0x3c, 0x68, 0xcc, 0xc4, 0x4c, 0xf5, 0xf2, 0xd0, 0x8f, 0x44, 0x6a, 0xef, 0xd4, 0xfe, 0xcd, 0x49, - 0xb2, 0x1e, 0xa8, 0xad, 0x3e, 0x95, 0xfe, 0x32, 0x8d, 0x3e, 0x1d, 0xed, 0xce, 0x5e, 0xb5, 0x0b, - 0x40, 0x68, 0x84, 0xc2, 0x2d, 0x45, 0xa5, 0x09, 0xc3, 0x49, 0x19, 0x5f, 0xd3, 0x2e, 0xab, 0x34, - 0xb3, 0xe6, 0xaf, 0xe0, 0x0d, 0x22, 0x36, 0x78, 0xb1, 0x42, 0xa8, 0xc8, 0x0a, 0x95, 0xcb, 0xa6, - 0xaf, 0xa3, 0xba, 0x30, 0x79, 0x2e, 0xeb, 0x65, 0x2b, 0x30, 0x51, 0x7f, 0x3c, 0x8e, 0xba, 0x56, - 0xf6, 0x79, 0x88, 0x59, 0x52, 0x8a, 0x9c, 0xf7, 0x00, 0xd6, 0xf5, 0xde, 0xa3, 0x6e, 0x86, 0xa3, - 0x02, 0x42, 0x44, 0xe4, 0x61, 0x42, 0xf5, 0x79, 0xf5, 0x85, 0x5e, 0xe4, 0x11, 0x27, 0xb4, 0xd7, - 0x7d, 0x6b, 0xb5, 0xac, 0x9d, 0x8a, 0x23, 0x3b, 0xef, 0x00, 0x9c, 0x38, 0x37, 0x87, 0x99, 0x57, - 0x6f, 0xc2, 0x45, 0x0e, 0x31, 0x7e, 0x66, 0x08, 0x63, 0xb3, 0x38, 0xf5, 0xe1, 0x68, 0x77, 0xf6, - 0xe6, 0xa9, 0x5e, 0x9b, 0x27, 0x5f, 0x0e, 0xb3, 0x3c, 0xed, 0x47, 0x3b, 0x03, 0x0f, 0xec, 0x0d, - 0x3c, 0xb0, 0x3f, 0xf0, 0xc0, 0xef, 0x81, 0x07, 0xb6, 0x0f, 0xbd, 0xca, 0xfe, 0xa1, 0x57, 0xf9, - 0x71, 0xe8, 0x55, 0x5e, 0xce, 0xfd, 0x73, 0xb2, 0x53, 0xdd, 0xf4, 0x90, 0xe1, 0xa8, 0xbe, 0xb2, - 0x3b, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x3d, 0x8c, 0xa5, 0x44, 0xa7, 0x04, 0x00, 0x00, + // 634 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xcf, 0x4f, 0x13, 0x41, + 0x14, 0xee, 0x00, 0xa2, 0x4e, 0xf1, 0xe0, 0x58, 0xa4, 0x54, 0xdd, 0x16, 0x0e, 0xa6, 0x21, 0xe9, + 0xae, 0x60, 0xe2, 0x01, 0x4f, 0x96, 0xc6, 0xf8, 0x83, 0x44, 0x52, 0xfc, 0x91, 0x78, 0x70, 0x33, + 0xbb, 0x33, 0x9d, 0x8e, 0xec, 0xce, 0x34, 0x3b, 0xb3, 0x02, 0xff, 0x82, 0x89, 0x09, 0x47, 0x8f, + 0x1e, 0x39, 0x72, 0xe0, 0x1f, 0xf0, 0xc6, 0x91, 0x70, 0x32, 0x1e, 0xd0, 0x94, 0x03, 0xfe, 0x19, + 0x66, 0x67, 0x76, 0x8b, 0x01, 0x4f, 0x5c, 0x9a, 0xf6, 0xfb, 0xbe, 0xf7, 0xbd, 0x7d, 0xdf, 0x7b, + 0x5d, 0x78, 0x3f, 0x94, 0x2a, 0x96, 0xca, 0x53, 0x11, 0x56, 0x7d, 0x2e, 0x98, 0xf7, 0x69, 0x31, + 0xa0, 0x1a, 0x2f, 0x8e, 0x00, 0x77, 0x90, 0x48, 0x2d, 0xd1, 0x8c, 0xd5, 0xb9, 0x23, 0x38, 0xd7, + 0xd5, 0x2a, 0x4c, 0x32, 0x69, 0x34, 0x5e, 0xf6, 0xcd, 0xca, 0x6b, 0x0e, 0x93, 0x92, 0x45, 0xd4, + 0x33, 0xbf, 0x82, 0xb4, 0xe7, 0x91, 0x34, 0xc1, 0x9a, 0x4b, 0x91, 0xf3, 0xf5, 0xf3, 0xbc, 0xe6, + 0x31, 0x55, 0x1a, 0xc7, 0x83, 0x5c, 0x30, 0x6b, 0xfb, 0xf9, 0xd6, 0x39, 0x6f, 0x6e, 0xa9, 0x9b, + 0x38, 0xe6, 0x42, 0x7a, 0xe6, 0xd3, 0x42, 0xf3, 0xdf, 0xc7, 0x60, 0xe5, 0x2d, 0x8e, 0x38, 0xc1, + 0x5a, 0x26, 0xeb, 0x9c, 0x09, 0x2e, 0xd8, 0x73, 0xd1, 0x93, 0xe8, 0x31, 0xbc, 0x8a, 0x09, 0x49, + 0xa8, 0x52, 0x55, 0xd0, 0x00, 0xcd, 0xeb, 0xed, 0xb9, 0xa3, 0xfd, 0xd6, 0xbd, 0xdc, 0x6e, 0x45, + 0x0a, 0x45, 0x85, 0x4a, 0xd5, 0x13, 0x2b, 0x59, 0xd7, 0x09, 0x17, 0xac, 0x5b, 0x54, 0xa0, 0x39, + 0x38, 0xa5, 0x34, 0x4e, 0xb4, 0xdf, 0xa7, 0x9c, 0xf5, 0x75, 0x75, 0xac, 0x01, 0x9a, 0xe3, 0xdd, + 0xb2, 0xc1, 0x9e, 0x19, 0x28, 0x93, 0x70, 0x41, 0xe8, 0x96, 0x2f, 0x7b, 0x3d, 0x45, 0x75, 0x75, + 0xdc, 0x4a, 0x0c, 0xf6, 0xca, 0x40, 0x68, 0x15, 0x4e, 0x7d, 0xc4, 0x3c, 0xa2, 0xc4, 0x4f, 0x85, + 0xe6, 0x51, 0x75, 0xa2, 0x01, 0x9a, 0xe5, 0xa5, 0x9a, 0x6b, 0x13, 0x70, 0x8b, 0x04, 0xdc, 0xd7, + 0x45, 0x02, 0xed, 0x1b, 0x07, 0xc7, 0xf5, 0xd2, 0xce, 0xaf, 0x3a, 0xd8, 0x3d, 0xdd, 0x5b, 0x00, + 0xdd, 0xb2, 0x2d, 0x7f, 0x93, 0x55, 0x23, 0x07, 0x42, 0x2d, 0xe3, 0x40, 0x69, 0x29, 0x28, 0xa9, + 0x5e, 0x69, 0x80, 0xe6, 0xb5, 0xee, 0x3f, 0x08, 0x5a, 0x82, 0xd3, 0x31, 0x57, 0x8a, 0x12, 0x3f, + 0x88, 0x64, 0xb8, 0xa1, 0xfc, 0x50, 0xa6, 0x42, 0xd3, 0xa4, 0x3a, 0x69, 0x9e, 0xec, 0x96, 0x25, + 0xdb, 0x86, 0x5b, 0xb1, 0xd4, 0xf2, 0xc4, 0x9f, 0x6f, 0x75, 0x30, 0xff, 0x65, 0x02, 0x4e, 0xae, + 0xe1, 0x04, 0xc7, 0x0a, 0x3d, 0x80, 0x15, 0xc5, 0x99, 0x38, 0x33, 0xd9, 0xe4, 0x82, 0xc8, 0x4d, + 0x13, 0xe1, 0x78, 0x17, 0x59, 0xce, 0x7a, 0xbc, 0x33, 0x0c, 0xe2, 0x59, 0x5b, 0xe1, 0xe7, 0x55, + 0x03, 0x9a, 0x14, 0x25, 0x59, 0x66, 0x53, 0xed, 0x47, 0xd9, 0x44, 0x3f, 0x8f, 0xeb, 0x77, 0x6c, + 0xf2, 0x8a, 0x6c, 0xb8, 0x5c, 0x7a, 0x31, 0xd6, 0x7d, 0x77, 0x95, 0x32, 0x1c, 0x6e, 0x77, 0x68, + 0x78, 0xb4, 0xdf, 0x82, 0xf9, 0x62, 0x3a, 0x34, 0xb4, 0xa3, 0xa3, 0x98, 0x8b, 0x75, 0xe3, 0xb9, + 0x46, 0x93, 0xbc, 0xd5, 0x07, 0x78, 0x9b, 0xc8, 0x4d, 0x91, 0x1d, 0x8c, 0x9f, 0x25, 0xe3, 0x17, + 0xa7, 0x65, 0xc2, 0x2f, 0x2f, 0xcd, 0x5e, 0x48, 0xb6, 0x93, 0x0b, 0x6c, 0xb0, 0x5f, 0x47, 0xc1, + 0x56, 0x0a, 0x9f, 0x17, 0x98, 0x47, 0x85, 0x08, 0x29, 0x58, 0x33, 0x47, 0xee, 0xf7, 0x12, 0x1c, + 0x66, 0x88, 0x4f, 0x64, 0x1a, 0x44, 0xd4, 0x0c, 0x67, 0xb6, 0x77, 0xf9, 0x79, 0x66, 0x8c, 0xf3, + 0xd3, 0xdc, 0xb8, 0x63, 0x7c, 0xb3, 0xf9, 0x90, 0x80, 0x33, 0x17, 0x9a, 0xda, 0x67, 0x33, 0x3b, + 0xbe, 0x7c, 0xc7, 0xe9, 0x73, 0x1d, 0xad, 0xe9, 0xf2, 0xdc, 0xe7, 0xd3, 0xbd, 0x85, 0xbb, 0x56, + 0xdc, 0x52, 0x64, 0xc3, 0xdb, 0x3a, 0x7b, 0x03, 0xd8, 0x23, 0x68, 0xbf, 0xdc, 0x1d, 0x3a, 0xe0, + 0x60, 0xe8, 0x80, 0xc3, 0xa1, 0x03, 0x7e, 0x0f, 0x1d, 0xb0, 0x73, 0xe2, 0x94, 0x0e, 0x4f, 0x9c, + 0xd2, 0x8f, 0x13, 0xa7, 0xf4, 0xbe, 0xc5, 0xb8, 0xee, 0xa7, 0x81, 0x1b, 0xca, 0x38, 0xff, 0x77, + 0x7a, 0xff, 0x77, 0xd3, 0xdb, 0x03, 0xaa, 0x82, 0x49, 0xb3, 0x8c, 0x87, 0x7f, 0x03, 0x00, 0x00, + 0xff, 0xff, 0xec, 0x7c, 0x0b, 0xf0, 0x6f, 0x04, 0x00, 0x00, } func (this *ValidatorSigningInfo) Equal(that interface{}) bool { diff --git a/x/staking/README.md b/x/staking/README.md index 5dd94dc696a5..c011a593dd34 100644 --- a/x/staking/README.md +++ b/x/staking/README.md @@ -75,14 +75,14 @@ Store entries prefixed with "Last" must remain unchanged until EndBlock. ### ValidatorUpdates -ValidatorUpdates contains the validator updates returned to ABCI at the end of every block. -The values are overwritten in every block. +ValidatorUpdates contains the validator updates returned to ABCI at the end of every block. +The values are overwritten in every block. * ValidatorUpdates `0x61 -> []abci.ValidatorUpdate` ### UnbondingID -UnbondingID stores the ID of the latest unbonding operation. It enables to create unique IDs for unbonding operation, i.e., UnbondingID is incremented every time a new unbonding operation (validator unbonding, unbonding delegation, redelegation) is initiated. +UnbondingID stores the ID of the latest unbonding operation. It enables creating unique IDs for unbonding operations, i.e., UnbondingID is incremented every time a new unbonding operation (validator unbonding, unbonding delegation, redelegation) is initiated. * UnbondingID: `0x37 -> uint64` @@ -115,7 +115,7 @@ Validators can have one of three statuses before their tokens are moved to their accounts from the `BondedPool`. :::warning -Tombstoning is permanent, once tombstoned a validators consensus key can not be reused within the chain where the tombstoning happened. +Tombstoning is permanent, once tombstoned a validator's consensus key can not be reused within the chain where the tombstoning happened. ::: Validators objects should be primarily stored and accessed by the @@ -137,7 +137,7 @@ associated validator, where the public key of that validator can change in the future. Delegators can refer to the immutable operator of the validator, without concern for the changing public key. -`ValidatorsByUnbondingID` is an additional index that enables lookups for +`ValidatorsByUnbondingID` is an additional index that enables lookups for validators by the unbonding IDs corresponding to their current unbonding. `ValidatorByConsAddr` is an additional index that enables lookups for slashing. @@ -182,7 +182,7 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/staking/v1bet #### Delegator Shares -When one Delegates tokens to a Validator they are issued a number of delegator shares based on a +When one delegates tokens to a Validator, they are issued a number of delegator shares based on a dynamic exchange rate, calculated as follows from the total number of tokens delegated to the validator and the number of shares issued so far: @@ -196,7 +196,7 @@ hold and the inverse exchange rate: These `Shares` are simply an accounting mechanism. They are not a fungible asset. The reason for this mechanism is to simplify the accounting around slashing. Rather than iteratively slashing the -tokens of every delegation entry, instead the Validators total bonded tokens can be slashed, +tokens of every delegation entry, instead the Validator's total bonded tokens can be slashed, effectively reducing the value of each issued delegator share. ### UnbondingDelegation @@ -217,8 +217,8 @@ detected. unbonding delegations associated with a given validator that need to be slashed. - `UnbondingDelegationByUnbondingId` is an additional index that enables - lookups for unbonding delegations by the unbonding IDs of the containing + `UnbondingDelegationByUnbondingId` is an additional index that enables + lookups for unbonding delegations by the unbonding IDs of the containing unbonding delegation entries. @@ -254,8 +254,8 @@ The first map here is used for queries, to lookup all redelegations for a given delegator. The second map is used for slashing based on the `ValidatorSrcAddr`, while the third map is for slashing based on the `ValidatorDstAddr`. -`RedelegationByUnbondingId` is an additional index that enables - lookups for redelegations by the unbonding IDs of the containing +`RedelegationByUnbondingId` is an additional index that enables + lookups for redelegations by the unbonding IDs of the containing redelegation entries. A redelegation object is created every time a redelegation occurs. To prevent @@ -272,13 +272,13 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/staking/v1bet ### Queues -All queues objects are sorted by timestamp. The time used within any queue is -first rounded to the nearest nanosecond then sorted. The sortable time format +All queue objects are sorted by timestamp. The time used within any queue is +firstly converted to UTC, rounded to the nearest nanosecond then sorted. The sortable time format used is a slight modification of the RFC3339Nano and uses the format string `"2006-01-02T15:04:05.000000000"`. Notably this format: * right pads all zeros -* drops the time zone info (uses UTC) +* drops the time zone info (we already use UTC) In all cases, the stored timestamp represents the maturation time of the queue element. @@ -312,7 +312,7 @@ queue is kept. * ValidatorQueueTime: `0x43 | format(time) -> []sdk.ValAddress` -The stored object as each key is an array of validator operator addresses from +The stored object by each key is an array of validator operator addresses from which the validator object can be accessed. Typically it is expected that only a single validator record will be associated with a given timestamp however it is possible that multiple validators exist in the queue at the same location. @@ -415,16 +415,16 @@ Delegation may be called. shares from the `BondedPool` to the `NotBondedPool` `ModuleAccount` * remove the validator if it is unbonded and there are no more delegation shares. * remove the validator if it is unbonded and there are no more delegation shares -* get a unique `unbondingId` and map it to the `UnbondingDelegationEntry` in `UnbondingDelegationByUnbondingId` +* get a unique `unbondingId` and map it to the `UnbondingDelegationEntry` in `UnbondingDelegationByUnbondingId` * call the `AfterUnbondingInitiated(unbondingId)` hook * add the unbonding delegation to `UnbondingDelegationQueue` with the completion time set to `UnbondingTime` -#### Cancel an `UnbondingDelegation` Entry +#### Cancel an `UnbondingDelegation` Entry When a `cancel unbond delegation` occurs both the `validator`, the `delegation` and an `UnbondingDelegationQueue` state will be updated. * if cancel unbonding delegation amount equals to the `UnbondingDelegation` entry `balance`, then the `UnbondingDelegation` entry deleted from `UnbondingDelegationQueue`. -* if the `cancel unbonding delegation amount is less than the `UnbondingDelegation` entry balance, then the `UnbondingDelegation` entry will be updated with new balance in the `UnbondingDelegationQueue`. +* if the `cancel unbonding delegation amount is less than the `UnbondingDelegation` entry balance, then the `UnbondingDelegation` entry will be updated with new balance in the `UnbondingDelegationQueue`. * cancel `amount` is [Delegated](#delegations) back to the original `validator`. #### Complete Unbonding @@ -661,7 +661,7 @@ This message is expected to fail if: When this message is processed the following actions occur: -* if the `unbondingDelegation` Entry balance is zero +* if the `unbondingDelegation` Entry balance is zero * in this condition `unbondingDelegation` entry will be removed from `unbondingDelegationQueue`. * otherwise `unbondingDelegationQueue` will be updated with new `unbondingDelegation` entry balance and initial balance * the validator's `DelegatorShares` and the delegation's `Shares` are both increased by the message `Amount`. @@ -791,11 +791,11 @@ validators that still have remaining delegations, the `validator.Status` is switched from `types.Unbonding` to `types.Unbonded`. -Unbonding operations can be put on hold by external modules via the `PutUnbondingOnHold(unbondingId)` method. - As a result, an unbonding operation (e.g., an unbonding delegation) that is on hold, cannot complete - even if it reaches maturity. For an unbonding operation with `unbondingId` to eventually complete - (after it reaches maturity), every call to `PutUnbondingOnHold(unbondingId)` must be matched - by a call to `UnbondingCanComplete(unbondingId)`. +Unbonding operations can be put on hold by external modules via the `PutUnbondingOnHold(unbondingId)` method. + As a result, an unbonding operation (e.g., an unbonding delegation) that is on hold, cannot complete + even if it reaches maturity. For an unbonding operation with `unbondingId` to eventually complete + (after it reaches maturity), every call to `PutUnbondingOnHold(unbondingId)` must be matched + by a call to `UnbondingCanComplete(unbondingId)`. #### Unbonding Delegations @@ -1666,7 +1666,7 @@ Example: simd tx staking unbond cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 100stake --from mykey ``` -##### cancel unbond +##### cancel unbond The command `cancel-unbond` allow users to cancel the unbonding delegation entry and delegate back to the original validator. diff --git a/x/staking/app_test.go b/x/staking/app_test.go index 4749eb6a30c5..ae68287c40a7 100644 --- a/x/staking/app_test.go +++ b/x/staking/app_test.go @@ -3,6 +3,8 @@ package staking_test import ( "testing" + abci "github.com/cometbft/cometbft/abci/types" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/require" "cosmossdk.io/depinject" @@ -11,13 +13,8 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - - abci "github.com/cometbft/cometbft/abci/types" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" - - sdk "github.com/cosmos/cosmos-sdk/types" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" bankKeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" @@ -72,7 +69,7 @@ func TestStakingMsgs(t *testing.T) { // create validator description := types.NewDescription("foo_moniker", "", "", "", "") createValidatorMsg, err := types.NewMsgCreateValidator( - sdk.ValAddress(addr1), valKey.PubKey(), bondCoin, description, commissionRates, math.OneInt(), + sdk.ValAddress(addr1).String(), valKey.PubKey(), bondCoin, description, commissionRates, math.OneInt(), ) require.NoError(t, err) @@ -82,32 +79,35 @@ func TestStakingMsgs(t *testing.T) { require.NoError(t, err) require.True(t, sdk.Coins{genCoin.Sub(bondCoin)}.Equal(bankKeeper.GetAllBalances(ctxCheck, addr1))) - app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: app.LastBlockHeight() + 1}) + _, err = app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: app.LastBlockHeight() + 1}) + require.NoError(t, err) ctxCheck = app.BaseApp.NewContext(true) - validator, found := stakingKeeper.GetValidator(ctxCheck, sdk.ValAddress(addr1)) - require.True(t, found) + validator, err := stakingKeeper.GetValidator(ctxCheck, sdk.ValAddress(addr1)) + require.NoError(t, err) + require.Equal(t, sdk.ValAddress(addr1).String(), validator.OperatorAddress) require.Equal(t, types.Bonded, validator.Status) require.True(math.IntEq(t, bondTokens, validator.BondedTokens())) - app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: app.LastBlockHeight() + 1}) + _, err = app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: app.LastBlockHeight() + 1}) + require.NoError(t, err) // edit the validator description = types.NewDescription("bar_moniker", "", "", "", "") - editValidatorMsg := types.NewMsgEditValidator(sdk.ValAddress(addr1), description, nil, nil) + editValidatorMsg := types.NewMsgEditValidator(sdk.ValAddress(addr1).String(), description, nil, nil) header = cmtproto.Header{Height: app.LastBlockHeight() + 1} _, _, err = simtestutil.SignCheckDeliver(t, txConfig, app.BaseApp, header, []sdk.Msg{editValidatorMsg}, "", []uint64{0}, []uint64{1}, true, true, priv1) require.NoError(t, err) ctxCheck = app.BaseApp.NewContext(true) - validator, found = stakingKeeper.GetValidator(ctxCheck, sdk.ValAddress(addr1)) - require.True(t, found) + validator, err = stakingKeeper.GetValidator(ctxCheck, sdk.ValAddress(addr1)) + require.NoError(t, err) require.Equal(t, description, validator.Description) // delegate require.True(t, sdk.Coins{genCoin}.Equal(bankKeeper.GetAllBalances(ctxCheck, addr2))) - delegateMsg := types.NewMsgDelegate(addr2, sdk.ValAddress(addr1), bondCoin) + delegateMsg := types.NewMsgDelegate(addr2.String(), sdk.ValAddress(addr1).String(), bondCoin) header = cmtproto.Header{Height: app.LastBlockHeight() + 1} _, _, err = simtestutil.SignCheckDeliver(t, txConfig, app.BaseApp, header, []sdk.Msg{delegateMsg}, "", []uint64{1}, []uint64{0}, true, true, priv2) @@ -115,19 +115,19 @@ func TestStakingMsgs(t *testing.T) { ctxCheck = app.BaseApp.NewContext(true) require.True(t, sdk.Coins{genCoin.Sub(bondCoin)}.Equal(bankKeeper.GetAllBalances(ctxCheck, addr2))) - _, found = stakingKeeper.GetDelegation(ctxCheck, addr2, sdk.ValAddress(addr1)) - require.True(t, found) + _, err = stakingKeeper.GetDelegation(ctxCheck, addr2, sdk.ValAddress(addr1)) + require.NoError(t, err) // begin unbonding - beginUnbondingMsg := types.NewMsgUndelegate(addr2, sdk.ValAddress(addr1), bondCoin) + beginUnbondingMsg := types.NewMsgUndelegate(addr2.String(), sdk.ValAddress(addr1).String(), bondCoin) header = cmtproto.Header{Height: app.LastBlockHeight() + 1} _, _, err = simtestutil.SignCheckDeliver(t, txConfig, app.BaseApp, header, []sdk.Msg{beginUnbondingMsg}, "", []uint64{1}, []uint64{1}, true, true, priv2) require.NoError(t, err) // delegation should exist anymore ctxCheck = app.BaseApp.NewContext(true) - _, found = stakingKeeper.GetDelegation(ctxCheck, addr2, sdk.ValAddress(addr1)) - require.False(t, found) + _, err = stakingKeeper.GetDelegation(ctxCheck, addr2, sdk.ValAddress(addr1)) + require.ErrorIs(t, err, types.ErrNoDelegation) // balance should be the same because bonding not yet complete require.True(t, sdk.Coins{genCoin.Sub(bondCoin)}.Equal(bankKeeper.GetAllBalances(ctxCheck, addr2))) diff --git a/x/staking/autocli.go b/x/staking/autocli.go new file mode 100644 index 000000000000..7793049bae2e --- /dev/null +++ b/x/staking/autocli.go @@ -0,0 +1,184 @@ +package staking + +import ( + "fmt" + + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + _ "cosmossdk.io/api/cosmos/crypto/ed25519" // register to that it shows up in protoregistry.GlobalTypes + stakingv1beta "cosmossdk.io/api/cosmos/staking/v1beta1" + + "github.com/cosmos/cosmos-sdk/version" +) + +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: stakingv1beta.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Validators", + Short: "Query for all validators", + Long: "Query details about all validators on a network.", + }, + { + RpcMethod: "Validator", + Use: "validator [validator-addr]", + Short: "Query a validator", + Long: "Query details about an individual validator.", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "validator_addr"}, + }, + }, + { + RpcMethod: "ValidatorDelegations", + Use: "delegations-to [validator-addr]", + Short: "Query all delegations made to one validator", + Long: "Query delegations on an individual validator.", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + { + ProtoField: "validator_addr", + }, + }, + }, + { + RpcMethod: "ValidatorUnbondingDelegations", + Use: "unbonding-delegations-from [validator-addr]", + Short: "Query all unbonding delegatations from a validator", + Long: "Query delegations that are unbonding _from_ a validator.", + Example: fmt.Sprintf("$ %s query staking unbonding-delegations-from [val-addr]", version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "validator_addr"}, + }, + }, + { + RpcMethod: "Delegation", + Use: "delegation [delegator-addr] [validator-addr]", + Short: "Query a delegation based on address and validator address", + Long: "Query delegations for an individual delegator on an individual validator", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "delegator_addr"}, + {ProtoField: "validator_addr"}, + }, + }, + { + RpcMethod: "UnbondingDelegation", + Use: "unbonding-delegation [delegator-addr] [validator-addr]", + Short: "Query an unbonding-delegation record based on delegator and validator address", + Long: "Query unbonding delegations for an individual delegator on an individual validator.", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "delegator_addr"}, + {ProtoField: "validator_addr"}, + }, + }, + { + RpcMethod: "DelegatorDelegations", + Use: "delegations [delegator-addr]", + Short: "Query all delegations made by one delegator", + Long: "Query delegations for an individual delegator on all validators.", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "delegator_addr"}, + }, + }, + { + RpcMethod: "DelegatorValidators", + Use: "delegator-validators [delegator-addr]", + Short: "Query all validators info for given delegator address", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "delegator_addr"}, + }, + }, + { + RpcMethod: "DelegatorValidator", + Use: "delegator-validator [delegator-addr] [validator-addr]", + Short: "Query validator info for given delegator validator pair", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "delegator_addr"}, + {ProtoField: "validator_addr"}, + }, + }, + { + RpcMethod: "DelegatorUnbondingDelegations", + Use: "unbonding-delegations [delegator-addr]", + Short: "Query all unbonding-delegations records for one delegator", + Long: "Query unbonding delegations for an individual delegator.", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "delegator_addr"}, + }, + }, + { + RpcMethod: "Redelegations", + Use: "redelegation [delegator-addr] [src-validator-addr] [dst-validator-addr]", + Short: "Query a redelegation record based on delegator and a source and destination validator address", + Long: "Query a redelegation record for an individual delegator between a source and destination validator.", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "delegator_addr"}, + {ProtoField: "src_validator_addr"}, + {ProtoField: "dst_validator_addr", Optional: true}, + }, + }, + { + RpcMethod: "HistoricalInfo", + Use: "historical-info [height]", + Short: "Query historical info at given height", + Example: fmt.Sprintf("$ %s query staking historical-info 5", version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "height"}, + }, + }, + { + RpcMethod: "Pool", + Use: "pool", + Short: "Query the current staking pool values", + Long: "Query values for amounts stored in the staking pool.", + }, + { + RpcMethod: "Params", + Use: "params", + Short: "Query the current staking parameters information", + Long: "Query values set as staking parameters.", + }, + }, + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: stakingv1beta.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Delegate", + Use: "delegate [validator-addr] [amount] --from [delegator_address]", + Short: "Delegate liquid tokens to a validator", + Long: "Delegate an amount of liquid coins to a validator from your wallet.", + Example: fmt.Sprintf("%s tx staking delegate cosmosvaloper... 1000stake --from mykey", version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "validator_address"}, {ProtoField: "amount"}}, + }, + { + RpcMethod: "BeginRedelegate", + Use: "redelegate [src-validator-addr] [dst-validator-addr] [amount] --from [delegator]", + Short: "Generate multisig signatures for transactions generated offline", + Long: "Redelegate an amount of illiquid staking tokens from one validator to another.", + Example: fmt.Sprintf(`%s tx staking redelegate cosmosvaloper... cosmosvaloper... 100stake --from mykey`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "validator_src_address"}, {ProtoField: "validator_dst_address"}, {ProtoField: "amount"}}, + }, + { + RpcMethod: "Undelegate", + Use: "unbond [validator-addr] [amount] --from [delegator_address]", + Short: "Unbond shares from a validator", + Long: "Unbond an amount of bonded shares from a validator.", + Example: fmt.Sprintf(`%s tx staking unbond cosmosvaloper... 100stake --from mykey`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "validator_address"}, {ProtoField: "amount"}}, + }, + { + RpcMethod: "CancelUnbondingDelegation", + Use: "cancel-unbond [validator-addr] [amount] [creation-height]", + Short: "Cancel unbonding delegation and delegate back to the validator", + Example: fmt.Sprintf(`%s tx staking cancel-unbond cosmosvaloper... 100stake 2 --from mykey`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "validator_address"}, {ProtoField: "amount"}, {ProtoField: "creation_height"}}, + }, + { + RpcMethod: "UpdateParams", + Skip: true, // skipped because authority gated + }, + }, + EnhanceCustomCommand: false, // use custom commands only until v0.51 + }, + } +} diff --git a/x/staking/bench_test.go b/x/staking/bench_test.go index 1d0fe95c4b4e..6f8461f11cdb 100644 --- a/x/staking/bench_test.go +++ b/x/staking/bench_test.go @@ -4,6 +4,7 @@ import ( "testing" "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking" diff --git a/x/staking/client/cli/flags.go b/x/staking/client/cli/flags.go index d4388e5c13f8..08789cfa6736 100644 --- a/x/staking/client/cli/flags.go +++ b/x/staking/client/cli/flags.go @@ -44,9 +44,9 @@ var ( func init() { fsShares.String(FlagSharesAmount, "", "Amount of source-shares to either unbond or redelegate as a positive integer or decimal") fsShares.String(FlagSharesFraction, "", "Fraction of source-shares to either unbond or redelegate as a positive integer or decimal >0 and <=1") - fsValidator.String(FlagAddressValidator, "", "The Bech32 address of the validator") - fsRedelegation.String(FlagAddressValidatorSrc, "", "The Bech32 address of the source validator") - fsRedelegation.String(FlagAddressValidatorDst, "", "The Bech32 address of the destination validator") + fsValidator.String(FlagAddressValidator, "", "The address of the validator") + fsRedelegation.String(FlagAddressValidatorSrc, "", "The address of the source validator") + fsRedelegation.String(FlagAddressValidatorDst, "", "The address of the destination validator") } // FlagSetCommissionCreate Returns the FlagSet used for commission create. diff --git a/x/staking/client/cli/query.go b/x/staking/client/cli/query.go deleted file mode 100644 index d896b54ef7a0..000000000000 --- a/x/staking/client/cli/query.go +++ /dev/null @@ -1,738 +0,0 @@ -package cli - -import ( - "fmt" - "strconv" - "strings" - - "cosmossdk.io/core/address" - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/version" - "github.com/cosmos/cosmos-sdk/x/staking/types" -) - -// GetQueryCmd returns the cli query commands for this module -func GetQueryCmd(ac address.Codec) *cobra.Command { - stakingQueryCmd := &cobra.Command{ - Use: types.ModuleName, - Short: "Querying commands for the staking module", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - stakingQueryCmd.AddCommand( - GetCmdQueryDelegation(ac), - GetCmdQueryDelegations(ac), - GetCmdQueryUnbondingDelegation(ac), - GetCmdQueryUnbondingDelegations(ac), - GetCmdQueryRedelegation(ac), - GetCmdQueryRedelegations(ac), - GetCmdQueryValidator(), - GetCmdQueryValidators(), - GetCmdQueryValidatorDelegations(), - GetCmdQueryValidatorUnbondingDelegations(), - GetCmdQueryValidatorRedelegations(), - GetCmdQueryHistoricalInfo(), - GetCmdQueryParams(), - GetCmdQueryPool(), - ) - - return stakingQueryCmd -} - -// GetCmdQueryValidator implements the validator query command. -func GetCmdQueryValidator() *cobra.Command { - bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() - - cmd := &cobra.Command{ - Use: "validator [validator-addr]", - Short: "Query a validator", - Long: strings.TrimSpace( - fmt.Sprintf(`Query details about an individual validator. - -Example: -$ %s query staking validator %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj -`, - version.AppName, bech32PrefixValAddr, - ), - ), - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - addr, err := sdk.ValAddressFromBech32(args[0]) - if err != nil { - return err - } - - params := &types.QueryValidatorRequest{ValidatorAddr: addr.String()} - res, err := queryClient.Validator(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(&res.Validator) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdQueryValidators implements the query all validators command. -func GetCmdQueryValidators() *cobra.Command { - cmd := &cobra.Command{ - Use: "validators", - Short: "Query for all validators", - Args: cobra.NoArgs, - Long: strings.TrimSpace( - fmt.Sprintf(`Query details about all validators on a network. - -Example: -$ %s query staking validators -`, - version.AppName, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - result, err := queryClient.Validators(cmd.Context(), &types.QueryValidatorsRequest{ - // Leaving status empty on purpose to query all validators. - Pagination: pageReq, - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(result) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "validators") - - return cmd -} - -// GetCmdQueryValidatorUnbondingDelegations implements the query all unbonding delegatations from a validator command. -func GetCmdQueryValidatorUnbondingDelegations() *cobra.Command { - bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() - - cmd := &cobra.Command{ - Use: "unbonding-delegations-from [validator-addr]", - Short: "Query all unbonding delegatations from a validator", - Long: strings.TrimSpace( - fmt.Sprintf(`Query delegations that are unbonding _from_ a validator. - -Example: -$ %s query staking unbonding-delegations-from %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj -`, - version.AppName, bech32PrefixValAddr, - ), - ), - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - valAddr, err := sdk.ValAddressFromBech32(args[0]) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - params := &types.QueryValidatorUnbondingDelegationsRequest{ - ValidatorAddr: valAddr.String(), - Pagination: pageReq, - } - - res, err := queryClient.ValidatorUnbondingDelegations(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "unbonding delegations") - - return cmd -} - -// GetCmdQueryValidatorRedelegations implements the query all redelegatations -// from a validator command. -func GetCmdQueryValidatorRedelegations() *cobra.Command { - bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() - - cmd := &cobra.Command{ - Use: "redelegations-from [validator-addr]", - Short: "Query all outgoing redelegatations from a validator", - Long: strings.TrimSpace( - fmt.Sprintf(`Query delegations that are redelegating _from_ a validator. - -Example: -$ %s query staking redelegations-from %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj -`, - version.AppName, bech32PrefixValAddr, - ), - ), - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - valSrcAddr, err := sdk.ValAddressFromBech32(args[0]) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - params := &types.QueryRedelegationsRequest{ - SrcValidatorAddr: valSrcAddr.String(), - Pagination: pageReq, - } - - res, err := queryClient.Redelegations(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "validator redelegations") - - return cmd -} - -// GetCmdQueryDelegation the query delegation command. -func GetCmdQueryDelegation(ac address.Codec) *cobra.Command { - cmd := &cobra.Command{ - Use: "delegation [delegator-addr] [validator-addr]", - Short: "Query a delegation based on address and validator address", - Example: fmt.Sprintf(`%s query staking delegation [delegator-address] [validator-address]`, - version.AppName), - Long: "Query delegations for an individual delegator on an individual validator", - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - _, err = ac.StringToBytes(args[0]) - if err != nil { - return err - } - - valAddr, err := sdk.ValAddressFromBech32(args[1]) - if err != nil { - return err - } - - params := &types.QueryDelegationRequest{ - DelegatorAddr: args[0], - ValidatorAddr: valAddr.String(), - } - - res, err := queryClient.Delegation(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res.DelegationResponse) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdQueryDelegations implements the command to query all the delegations -// made from one delegator. -func GetCmdQueryDelegations(ac address.Codec) *cobra.Command { - bech32PrefixAccAddr := sdk.GetConfig().GetBech32AccountAddrPrefix() - - cmd := &cobra.Command{ - Use: "delegations [delegator-addr]", - Short: "Query all delegations made by one delegator", - Long: strings.TrimSpace( - fmt.Sprintf(`Query delegations for an individual delegator on all validators. - -Example: -$ %s query staking delegations %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p -`, - version.AppName, bech32PrefixAccAddr, - ), - ), - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - _, err = ac.StringToBytes(args[0]) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - params := &types.QueryDelegatorDelegationsRequest{ - DelegatorAddr: args[0], - Pagination: pageReq, - } - - res, err := queryClient.DelegatorDelegations(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "delegations") - - return cmd -} - -// GetCmdQueryValidatorDelegations implements the command to query all the -// delegations to a specific validator. -func GetCmdQueryValidatorDelegations() *cobra.Command { - bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() - - cmd := &cobra.Command{ - Use: "delegations-to [validator-addr]", - Short: "Query all delegations made to one validator", - Long: strings.TrimSpace( - fmt.Sprintf(`Query delegations on an individual validator. - -Example: -$ %s query staking delegations-to %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj -`, - version.AppName, bech32PrefixValAddr, - ), - ), - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - valAddr, err := sdk.ValAddressFromBech32(args[0]) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - params := &types.QueryValidatorDelegationsRequest{ - ValidatorAddr: valAddr.String(), - Pagination: pageReq, - } - - res, err := queryClient.ValidatorDelegations(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "validator delegations") - - return cmd -} - -// GetCmdQueryUnbondingDelegation implements the command to query a single -// unbonding-delegation record. -func GetCmdQueryUnbondingDelegation(ac address.Codec) *cobra.Command { - bech32PrefixAccAddr := sdk.GetConfig().GetBech32AccountAddrPrefix() - bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() - - cmd := &cobra.Command{ - Use: "unbonding-delegation [delegator-addr] [validator-addr]", - Short: "Query an unbonding-delegation record based on delegator and validator address", - Long: strings.TrimSpace( - fmt.Sprintf(`Query unbonding delegations for an individual delegator on an individual validator. - -Example: -$ %s query staking unbonding-delegation %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj -`, - version.AppName, bech32PrefixAccAddr, bech32PrefixValAddr, - ), - ), - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - valAddr, err := sdk.ValAddressFromBech32(args[1]) - if err != nil { - return err - } - - _, err = ac.StringToBytes(args[0]) - if err != nil { - return err - } - - params := &types.QueryUnbondingDelegationRequest{ - DelegatorAddr: args[0], - ValidatorAddr: valAddr.String(), - } - - res, err := queryClient.UnbondingDelegation(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(&res.Unbond) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdQueryUnbondingDelegations implements the command to query all the -// unbonding-delegation records for a delegator. -func GetCmdQueryUnbondingDelegations(ac address.Codec) *cobra.Command { - bech32PrefixAccAddr := sdk.GetConfig().GetBech32AccountAddrPrefix() - - cmd := &cobra.Command{ - Use: "unbonding-delegations [delegator-addr]", - Short: "Query all unbonding-delegations records for one delegator", - Long: strings.TrimSpace( - fmt.Sprintf(`Query unbonding delegations for an individual delegator. - -Example: -$ %s query staking unbonding-delegations %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p -`, - version.AppName, bech32PrefixAccAddr, - ), - ), - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - _, err = ac.StringToBytes(args[0]) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - params := &types.QueryDelegatorUnbondingDelegationsRequest{ - DelegatorAddr: args[0], - Pagination: pageReq, - } - - res, err := queryClient.DelegatorUnbondingDelegations(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "unbonding delegations") - - return cmd -} - -// GetCmdQueryRedelegation implements the command to query a single -// redelegation record. -func GetCmdQueryRedelegation(ac address.Codec) *cobra.Command { - bech32PrefixAccAddr := sdk.GetConfig().GetBech32AccountAddrPrefix() - bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() - - cmd := &cobra.Command{ - Use: "redelegation [delegator-addr] [src-validator-addr] [dst-validator-addr]", - Short: "Query a redelegation record based on delegator and a source and destination validator address", - Long: strings.TrimSpace( - fmt.Sprintf(`Query a redelegation record for an individual delegator between a source and destination validator. - -Example: -$ %s query staking redelegation %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p %s1l2rsakp388kuv9k8qzq6lrm9taddae7fpx59wm %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj -`, - version.AppName, bech32PrefixAccAddr, bech32PrefixValAddr, bech32PrefixValAddr, - ), - ), - Args: cobra.ExactArgs(3), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - _, err = ac.StringToBytes(args[0]) - if err != nil { - return err - } - - valSrcAddr, err := sdk.ValAddressFromBech32(args[1]) - if err != nil { - return err - } - - valDstAddr, err := sdk.ValAddressFromBech32(args[2]) - if err != nil { - return err - } - - params := &types.QueryRedelegationsRequest{ - DelegatorAddr: args[0], - DstValidatorAddr: valDstAddr.String(), - SrcValidatorAddr: valSrcAddr.String(), - } - - res, err := queryClient.Redelegations(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdQueryRedelegations implements the command to query all the -// redelegation records for a delegator. -func GetCmdQueryRedelegations(ac address.Codec) *cobra.Command { - bech32PrefixAccAddr := sdk.GetConfig().GetBech32AccountAddrPrefix() - - cmd := &cobra.Command{ - Use: "redelegations [delegator-addr]", - Args: cobra.ExactArgs(1), - Short: "Query all redelegations records for one delegator", - Long: strings.TrimSpace( - fmt.Sprintf(`Query all redelegation records for an individual delegator. - -Example: -$ %s query staking redelegation %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p -`, - version.AppName, bech32PrefixAccAddr, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - _, err = ac.StringToBytes(args[0]) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - params := &types.QueryRedelegationsRequest{ - DelegatorAddr: args[0], - Pagination: pageReq, - } - - res, err := queryClient.Redelegations(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "delegator redelegations") - - return cmd -} - -// GetCmdQueryHistoricalInfo implements the historical info query command -func GetCmdQueryHistoricalInfo() *cobra.Command { - cmd := &cobra.Command{ - Use: "historical-info [height]", - Args: cobra.ExactArgs(1), - Short: "Query historical info at given height", - Long: strings.TrimSpace( - fmt.Sprintf(`Query historical info at given height. - -Example: -$ %s query staking historical-info 5 -`, - version.AppName, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - height, err := strconv.ParseInt(args[0], 10, 64) - if err != nil || height < 0 { - return fmt.Errorf("height argument provided must be a non-negative-integer: %v", err) - } - - params := &types.QueryHistoricalInfoRequest{Height: height} - res, err := queryClient.HistoricalInfo(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res.Hist) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdQueryPool implements the pool query command. -func GetCmdQueryPool() *cobra.Command { - cmd := &cobra.Command{ - Use: "pool", - Args: cobra.NoArgs, - Short: "Query the current staking pool values", - Long: strings.TrimSpace( - fmt.Sprintf(`Query values for amounts stored in the staking pool. - -Example: -$ %s query staking pool -`, - version.AppName, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.Pool(cmd.Context(), &types.QueryPoolRequest{}) - if err != nil { - return err - } - - return clientCtx.PrintProto(&res.Pool) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdQueryParams implements the params query command. -func GetCmdQueryParams() *cobra.Command { - cmd := &cobra.Command{ - Use: "params", - Args: cobra.NoArgs, - Short: "Query the current staking parameters information", - Long: strings.TrimSpace( - fmt.Sprintf(`Query values set as staking parameters. - -Example: -$ %s query staking params -`, - version.AppName, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.Params(cmd.Context(), &types.QueryParamsRequest{}) - if err != nil { - return err - } - - return clientCtx.PrintProto(&res.Params) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/staking/client/cli/query_test.go b/x/staking/client/cli/query_test.go deleted file mode 100644 index febffe77da3a..000000000000 --- a/x/staking/client/cli/query_test.go +++ /dev/null @@ -1,563 +0,0 @@ -package cli_test - -import ( - "fmt" - "strings" - - "github.com/cosmos/gogoproto/proto" - - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/codec/address" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/staking/client/cli" - "github.com/cosmos/cosmos-sdk/x/staking/types" -) - -func (s *CLITestSuite) TestGetCmdQueryValidator() { - testCases := []struct { - name string - args []string - expectErr bool - }{ - { - "with invalid address ", - []string{"somethinginvalidaddress", fmt.Sprintf("--%s=json", flags.FlagOutput)}, - true, - }, - { - "happy case", - []string{sdk.ValAddress(s.addrs[0]).String(), fmt.Sprintf("--%s=json", flags.FlagOutput)}, - false, - }, - } - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryValidator() - clientCtx := s.clientCtx - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - s.Require().NotEqual("internal", err.Error()) - } else { - var result types.Validator - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &result)) - } - }) - } -} - -func (s *CLITestSuite) TestGetCmdQueryValidators() { - testCases := []struct { - name string - args []string - minValidatorCount int - }{ - { - "one validator case", - []string{ - fmt.Sprintf("--%s=json", flags.FlagOutput), - fmt.Sprintf("--%s=1", flags.FlagLimit), - }, - 1, - }, - { - "multi validator case", - []string{fmt.Sprintf("--%s=json", flags.FlagOutput)}, - 0, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryValidators() - clientCtx := s.clientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - s.Require().NoError(err) - - var result types.QueryValidatorsResponse - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &result)) - }) - } -} - -func (s *CLITestSuite) TestGetCmdQueryDelegation() { - testCases := []struct { - name string - args []string - expErr bool - respType proto.Message - }{ - { - "with wrong delegator address", - []string{ - "wrongDelAddr", - s.addrs[1].String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, nil, - }, - { - "with wrong validator address", - []string{ - s.addrs[0].String(), - "wrongValAddr", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, nil, - }, - { - "with json output", - []string{ - s.addrs[0].String(), - sdk.ValAddress(s.addrs[1]).String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - &types.DelegationResponse{}, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryDelegation(address.NewBech32Codec("cosmos")) - clientCtx := s.clientCtx - - _, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expErr { - s.Require().Error(err) - } else { - s.Require().Contains(err.Error(), "Marshal called with nil") - } - }) - } -} - -func (s *CLITestSuite) TestGetCmdQueryDelegations() { - testCases := []struct { - name string - args []string - expErr bool - respType proto.Message - }{ - { - "with no delegator address", - []string{}, - true, nil, - }, - { - "with wrong delegator address", - []string{"wrongDelAddr"}, - true, nil, - }, - { - "valid request (height specific)", - []string{ - s.addrs[0].String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - fmt.Sprintf("--%s=1", flags.FlagHeight), - }, - false, - &types.QueryDelegatorDelegationsResponse{}, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryDelegations(address.NewBech32Codec("cosmos")) - clientCtx := s.clientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), tc.respType), out.String()) - } - }) - } -} - -func (s *CLITestSuite) TestGetCmdQueryValidatorDelegations() { - testCases := []struct { - name string - args []string - expErr bool - respType proto.Message - }{ - { - "with no validator address", - []string{}, - true, nil, - }, - { - "wrong validator address", - []string{"wrongValAddr"}, - true, nil, - }, - { - "valid request(height specific)", - []string{ - s.addrs[0].String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - fmt.Sprintf("--%s=1", flags.FlagHeight), - }, - false, - &types.QueryValidatorDelegationsResponse{}, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryDelegations(address.NewBech32Codec("cosmos")) - clientCtx := s.clientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), tc.respType), out.String()) - } - }) - } -} - -func (s *CLITestSuite) TestGetCmdQueryUnbondingDelegations() { - testCases := []struct { - name string - args []string - expErr bool - }{ - { - "wrong delegator address", - []string{ - "wrongDelAddr", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - }, - { - "valid request", - []string{ - s.addrs[0].String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryUnbondingDelegations(address.NewBech32Codec("cosmos")) - clientCtx := s.clientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - - if tc.expErr { - s.Require().Error(err) - } else { - var ubds types.QueryDelegatorUnbondingDelegationsResponse - err = s.clientCtx.Codec.UnmarshalJSON(out.Bytes(), &ubds) - - s.Require().NoError(err) - } - }) - } -} - -func (s *CLITestSuite) TestGetCmdQueryUnbondingDelegation() { - testCases := []struct { - name string - args []string - expErr bool - }{ - { - "wrong delegator address", - []string{ - "wrongDelAddr", - s.addrs[0].String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - }, - { - "wrong validator address", - []string{ - s.addrs[0].String(), - "wrongValAddr", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - }, - { - "valid request", - []string{ - s.addrs[0].String(), - sdk.ValAddress(s.addrs[1]).String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryUnbondingDelegation(address.NewBech32Codec("cosmos")) - clientCtx := s.clientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - - if tc.expErr { - s.Require().Error(err) - } else { - var ubd types.UnbondingDelegation - - err = s.clientCtx.Codec.UnmarshalJSON(out.Bytes(), &ubd) - s.Require().NoError(err) - } - }) - } -} - -func (s *CLITestSuite) TestGetCmdQueryValidatorUnbondingDelegations() { - testCases := []struct { - name string - args []string - expErr bool - }{ - { - "wrong validator address", - []string{ - "wrongValAddr", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - }, - { - "valid request", - []string{ - sdk.ValAddress(s.addrs[0]).String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryValidatorUnbondingDelegations() - clientCtx := s.clientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - - if tc.expErr { - s.Require().Error(err) - } else { - var ubds types.QueryValidatorUnbondingDelegationsResponse - err = s.clientCtx.Codec.UnmarshalJSON(out.Bytes(), &ubds) - s.Require().NoError(err) - } - }) - } -} - -func (s *CLITestSuite) TestGetCmdQueryRedelegations() { - testCases := []struct { - name string - args []string - expErr bool - }{ - { - "wrong delegator address", - []string{ - "wrongdeladdr", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - }, - { - "valid request", - []string{ - s.addrs[0].String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryRedelegations(address.NewBech32Codec("cosmos")) - clientCtx := s.clientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - - if tc.expErr { - s.Require().Error(err) - } else { - var redelegations types.QueryRedelegationsResponse - err = s.clientCtx.Codec.UnmarshalJSON(out.Bytes(), &redelegations) - s.Require().NoError(err) - } - }) - } -} - -func (s *CLITestSuite) TestGetCmdQueryRedelegation() { - testCases := []struct { - name string - args []string - expErr bool - }{ - { - "wrong delegator address", - []string{ - "wrongdeladdr", - sdk.ValAddress(s.addrs[0]).String(), - sdk.ValAddress(s.addrs[1]).String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - }, - { - "wrong source validator address address", - []string{ - s.addrs[0].String(), - "wrongSrcValAddress", - sdk.ValAddress(s.addrs[1]).String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - }, - { - "wrong destination validator address address", - []string{ - s.addrs[0].String(), - sdk.ValAddress(s.addrs[0]).String(), - "wrongDestValAddress", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - }, - { - "valid request", - []string{ - s.addrs[0].String(), - sdk.ValAddress(s.addrs[0]).String(), - sdk.ValAddress(s.addrs[1]).String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryRedelegation(address.NewBech32Codec("cosmos")) - clientCtx := s.clientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - - if tc.expErr { - s.Require().Error(err) - } else { - var redelegations types.QueryRedelegationsResponse - - err = s.clientCtx.Codec.UnmarshalJSON(out.Bytes(), &redelegations) - s.Require().NoError(err) - } - }) - } -} - -func (s *CLITestSuite) TestGetCmdQueryValidatorRedelegations() { - testCases := []struct { - name string - args []string - expErr bool - }{ - { - "wrong validator address", - []string{ - "wrongValAddr", - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - true, - }, - { - "valid request", - []string{ - sdk.ValAddress(s.addrs[0]).String(), - fmt.Sprintf("--%s=json", flags.FlagOutput), - }, - false, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryValidatorRedelegations() - clientCtx := s.clientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - - if tc.expErr { - s.Require().Error(err) - } else { - var redelegations types.QueryRedelegationsResponse - err = s.clientCtx.Codec.UnmarshalJSON(out.Bytes(), &redelegations) - s.Require().NoError(err) - } - }) - } -} - -func (s *CLITestSuite) TestGetCmdQueryPool() { - testCases := []struct { - name string - args []string - expectedOutput string - }{ - { - "with text", - []string{ - fmt.Sprintf("--%s=text", flags.FlagOutput), - fmt.Sprintf("--%s=1", flags.FlagHeight), - }, - `bonded_tokens: "0" -not_bonded_tokens: "0"`, - }, - { - "with json", - []string{ - fmt.Sprintf("--%s=json", flags.FlagOutput), - fmt.Sprintf("--%s=1", flags.FlagHeight), - }, - `{"not_bonded_tokens":"0","bonded_tokens":"0"}`, - }, - } - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryPool() - clientCtx := s.clientCtx - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - s.Require().NoError(err) - s.Require().Equal(tc.expectedOutput, strings.TrimSpace(out.String())) - }) - } -} diff --git a/x/staking/client/cli/tx.go b/x/staking/client/cli/tx.go index 879fa30589d8..86ab1a815880 100644 --- a/x/staking/client/cli/tx.go +++ b/x/staking/client/cli/tx.go @@ -6,12 +6,12 @@ import ( "strconv" "strings" - "cosmossdk.io/math" - "github.com/spf13/cobra" flag "github.com/spf13/pflag" + "cosmossdk.io/core/address" errorsmod "cosmossdk.io/errors" + "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" @@ -34,7 +34,7 @@ var ( ) // NewTxCmd returns a root CLI command handler for all x/staking transaction commands. -func NewTxCmd() *cobra.Command { +func NewTxCmd(valAddrCodec, ac address.Codec) *cobra.Command { stakingTxCmd := &cobra.Command{ Use: types.ModuleName, Short: "Staking transaction subcommands", @@ -44,19 +44,19 @@ func NewTxCmd() *cobra.Command { } stakingTxCmd.AddCommand( - NewCreateValidatorCmd(), - NewEditValidatorCmd(), - NewDelegateCmd(), - NewRedelegateCmd(), - NewUnbondCmd(), - NewCancelUnbondingDelegation(), + NewCreateValidatorCmd(valAddrCodec), + NewEditValidatorCmd(valAddrCodec), + NewDelegateCmd(valAddrCodec, ac), + NewRedelegateCmd(valAddrCodec, ac), + NewUnbondCmd(valAddrCodec, ac), + NewCancelUnbondingDelegation(valAddrCodec, ac), ) return stakingTxCmd } // NewCreateValidatorCmd returns a CLI command handler for creating a MsgCreateValidator transaction. -func NewCreateValidatorCmd() *cobra.Command { +func NewCreateValidatorCmd(ac address.Codec) *cobra.Command { cmd := &cobra.Command{ Use: "create-validator [path/to/validator.json]", Short: "create new validator initialized with a self-delegation to it", @@ -100,7 +100,7 @@ where we can get the pubkey using "%s tendermint show-validator" return err } - txf, msg, err := newBuildCreateValidatorMsg(clientCtx, txf, cmd.Flags(), validator) + txf, msg, err := newBuildCreateValidatorMsg(clientCtx, txf, cmd.Flags(), validator, ac) if err != nil { return err } @@ -119,7 +119,7 @@ where we can get the pubkey using "%s tendermint show-validator" } // NewEditValidatorCmd returns a CLI command handler for creating a MsgEditValidator transaction. -func NewEditValidatorCmd() *cobra.Command { +func NewEditValidatorCmd(ac address.Codec) *cobra.Command { cmd := &cobra.Command{ Use: "edit-validator", Short: "edit an existing validator account", @@ -128,7 +128,7 @@ func NewEditValidatorCmd() *cobra.Command { if err != nil { return err } - valAddr := clientCtx.GetFromAddress() + moniker, _ := cmd.Flags().GetString(FlagEditMoniker) identity, _ := cmd.Flags().GetString(FlagIdentity) website, _ := cmd.Flags().GetString(FlagWebsite) @@ -160,7 +160,12 @@ func NewEditValidatorCmd() *cobra.Command { newMinSelfDelegation = &msb } - msg := types.NewMsgEditValidator(sdk.ValAddress(valAddr), description, newRate, newMinSelfDelegation) + valAddr, err := ac.BytesToString(clientCtx.GetFromAddress()) + if err != nil { + return err + } + + msg := types.NewMsgEditValidator(valAddr, description, newRate, newMinSelfDelegation) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, @@ -175,9 +180,7 @@ func NewEditValidatorCmd() *cobra.Command { } // NewDelegateCmd returns a CLI command handler for creating a MsgDelegate transaction. -func NewDelegateCmd() *cobra.Command { - bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() - +func NewDelegateCmd(valAddrCodec, ac address.Codec) *cobra.Command { cmd := &cobra.Command{ Use: "delegate [validator-addr] [amount]", Args: cobra.ExactArgs(2), @@ -186,9 +189,9 @@ func NewDelegateCmd() *cobra.Command { fmt.Sprintf(`Delegate an amount of liquid coins to a validator from your wallet. Example: -$ %s tx staking delegate %s1l2rsakp388kuv9k8qzq6lrm9taddae7fpx59wm 1000stake --from mykey +$ %s tx staking delegate cosmosvalopers1l2rsakp388kuv9k8qzq6lrm9taddae7fpx59wm 1000stake --from mykey `, - version.AppName, bech32PrefixValAddr, + version.AppName, ), ), RunE: func(cmd *cobra.Command, args []string) error { @@ -201,13 +204,17 @@ $ %s tx staking delegate %s1l2rsakp388kuv9k8qzq6lrm9taddae7fpx59wm 1000stake --f return err } - delAddr := clientCtx.GetFromAddress() - valAddr, err := sdk.ValAddressFromBech32(args[0]) + delAddr, err := ac.BytesToString(clientCtx.GetFromAddress()) if err != nil { return err } - msg := types.NewMsgDelegate(delAddr, valAddr, amount) + _, err = valAddrCodec.StringToBytes(args[0]) + if err != nil { + return err + } + + msg := types.NewMsgDelegate(delAddr, args[0], amount) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, @@ -219,9 +226,7 @@ $ %s tx staking delegate %s1l2rsakp388kuv9k8qzq6lrm9taddae7fpx59wm 1000stake --f } // NewRedelegateCmd returns a CLI command handler for creating a MsgBeginRedelegate transaction. -func NewRedelegateCmd() *cobra.Command { - bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() - +func NewRedelegateCmd(valAddrCodec, ac address.Codec) *cobra.Command { cmd := &cobra.Command{ Use: "redelegate [src-validator-addr] [dst-validator-addr] [amount]", Short: "Redelegate illiquid tokens from one validator to another", @@ -230,9 +235,9 @@ func NewRedelegateCmd() *cobra.Command { fmt.Sprintf(`Redelegate an amount of illiquid staking tokens from one validator to another. Example: -$ %s tx staking redelegate %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj %s1l2rsakp388kuv9k8qzq6lrm9taddae7fpx59wm 100stake --from mykey +$ %s tx staking redelegate cosmosvalopers1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj cosmosvalopers1l2rsakp388kuv9k8qzq6lrm9taddae7fpx59wm 100stake --from mykey `, - version.AppName, bech32PrefixValAddr, bech32PrefixValAddr, + version.AppName, ), ), RunE: func(cmd *cobra.Command, args []string) error { @@ -240,13 +245,17 @@ $ %s tx staking redelegate %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj %s1l2rsakp3 if err != nil { return err } - delAddr := clientCtx.GetFromAddress() - valSrcAddr, err := sdk.ValAddressFromBech32(args[0]) + delAddr, err := ac.BytesToString(clientCtx.GetFromAddress()) if err != nil { return err } - valDstAddr, err := sdk.ValAddressFromBech32(args[1]) + _, err = valAddrCodec.StringToBytes(args[0]) + if err != nil { + return err + } + + _, err = valAddrCodec.StringToBytes(args[1]) if err != nil { return err } @@ -256,7 +265,7 @@ $ %s tx staking redelegate %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj %s1l2rsakp3 return err } - msg := types.NewMsgBeginRedelegate(delAddr, valSrcAddr, valDstAddr, amount) + msg := types.NewMsgBeginRedelegate(delAddr, args[0], args[1], amount) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, @@ -268,7 +277,7 @@ $ %s tx staking redelegate %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj %s1l2rsakp3 } // NewUnbondCmd returns a CLI command handler for creating a MsgUndelegate transaction. -func NewUnbondCmd() *cobra.Command { +func NewUnbondCmd(valAddrCodec, ac address.Codec) *cobra.Command { bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() cmd := &cobra.Command{ @@ -290,8 +299,11 @@ $ %s tx staking unbond %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 100stake --from return err } - delAddr := clientCtx.GetFromAddress() - valAddr, err := sdk.ValAddressFromBech32(args[0]) + delAddr, err := ac.BytesToString(clientCtx.GetFromAddress()) + if err != nil { + return err + } + _, err = valAddrCodec.StringToBytes(args[0]) if err != nil { return err } @@ -301,7 +313,7 @@ $ %s tx staking unbond %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 100stake --from return err } - msg := types.NewMsgUndelegate(delAddr, valAddr, amount) + msg := types.NewMsgUndelegate(delAddr, args[0], amount) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, @@ -313,7 +325,7 @@ $ %s tx staking unbond %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 100stake --from } // NewCancelUnbondingDelegation returns a CLI command handler for creating a MsgCancelUnbondingDelegation transaction. -func NewCancelUnbondingDelegation() *cobra.Command { +func NewCancelUnbondingDelegation(valAddrCodec, ac address.Codec) *cobra.Command { bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() cmd := &cobra.Command{ @@ -336,8 +348,12 @@ $ %s tx staking cancel-unbond %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 100stake if err != nil { return err } - delAddr := clientCtx.GetFromAddress() - valAddr, err := sdk.ValAddressFromBech32(args[0]) + delAddr, err := ac.BytesToString(clientCtx.GetFromAddress()) + if err != nil { + return err + } + + _, err = valAddrCodec.StringToBytes(args[0]) if err != nil { return err } @@ -352,7 +368,7 @@ $ %s tx staking cancel-unbond %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 100stake return errorsmod.Wrap(fmt.Errorf("invalid height: %d", creationHeight), "invalid height") } - msg := types.NewMsgCancelUnbondingDelegation(delAddr, valAddr, creationHeight, amount) + msg := types.NewMsgCancelUnbondingDelegation(delAddr, args[0], creationHeight, amount) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, @@ -363,7 +379,7 @@ $ %s tx staking cancel-unbond %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 100stake return cmd } -func newBuildCreateValidatorMsg(clientCtx client.Context, txf tx.Factory, fs *flag.FlagSet, val validator) (tx.Factory, *types.MsgCreateValidator, error) { +func newBuildCreateValidatorMsg(clientCtx client.Context, txf tx.Factory, fs *flag.FlagSet, val validator, valAc address.Codec) (tx.Factory, *types.MsgCreateValidator, error) { valAddr := clientCtx.GetFromAddress() description := types.NewDescription( @@ -374,13 +390,17 @@ func newBuildCreateValidatorMsg(clientCtx client.Context, txf tx.Factory, fs *fl val.Details, ) + valStr, err := valAc.BytesToString(sdk.ValAddress(valAddr)) + if err != nil { + return txf, nil, err + } msg, err := types.NewMsgCreateValidator( - sdk.ValAddress(valAddr), val.PubKey, val.Amount, description, val.CommissionRates, val.MinSelfDelegation, + valStr, val.PubKey, val.Amount, description, val.CommissionRates, val.MinSelfDelegation, ) if err != nil { return txf, nil, err } - if err := msg.Validate(); err != nil { + if err := msg.Validate(valAc); err != nil { return txf, nil, err } @@ -550,7 +570,7 @@ func PrepareConfigForTxCreateValidator(flagSet *flag.FlagSet, moniker, nodeID, c } // BuildCreateValidatorMsg makes a new MsgCreateValidator. -func BuildCreateValidatorMsg(clientCtx client.Context, config TxCreateValidatorConfig, txBldr tx.Factory, generateOnly bool) (tx.Factory, sdk.Msg, error) { +func BuildCreateValidatorMsg(clientCtx client.Context, config TxCreateValidatorConfig, txBldr tx.Factory, generateOnly bool, valCodec address.Codec) (tx.Factory, sdk.Msg, error) { amounstStr := config.Amount amount, err := sdk.ParseCoinNormalized(amounstStr) if err != nil { @@ -583,8 +603,13 @@ func BuildCreateValidatorMsg(clientCtx client.Context, config TxCreateValidatorC return txBldr, nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "minimum self delegation must be a positive integer") } + valStr, err := valCodec.BytesToString(sdk.ValAddress(valAddr)) + if err != nil { + return txBldr, nil, err + } + msg, err := types.NewMsgCreateValidator( - sdk.ValAddress(valAddr), + valStr, config.PubKey, amount, description, diff --git a/x/staking/client/cli/tx_test.go b/x/staking/client/cli/tx_test.go index 1e43f2e3a86c..77d4727606d2 100644 --- a/x/staking/client/cli/tx_test.go +++ b/x/staking/client/cli/tx_test.go @@ -8,11 +8,13 @@ import ( abci "github.com/cometbft/cometbft/abci/types" rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" "github.com/spf13/pflag" - "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" + sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" @@ -78,6 +80,7 @@ func (s *CLITestSuite) TestPrepareConfigForTxCreateValidator() { privKey := ed25519.GenPrivKey() valPubKey := privKey.PubKey() moniker := "DefaultMoniker" + require := s.Require() mkTxValCfg := func(amount, commission, commissionMax, commissionMaxChange, minSelfDelegation string) cli.TxCreateValidatorConfig { return cli.TxCreateValidatorConfig{ IP: ip, @@ -107,35 +110,35 @@ func (s *CLITestSuite) TestPrepareConfigForTxCreateValidator() { { name: "Custom amount", fsModify: func(fs *pflag.FlagSet) { - fs.Set(cli.FlagAmount, "2000stake") + require.NoError(fs.Set(cli.FlagAmount, "2000stake")) }, expectedCfg: mkTxValCfg("2000stake", "0.1", "0.2", "0.01", "1"), }, { name: "Custom commission rate", fsModify: func(fs *pflag.FlagSet) { - fs.Set(cli.FlagCommissionRate, "0.54") + require.NoError(fs.Set(cli.FlagCommissionRate, "0.54")) }, expectedCfg: mkTxValCfg(cli.DefaultTokens.String()+sdk.DefaultBondDenom, "0.54", "0.2", "0.01", "1"), }, { name: "Custom commission max rate", fsModify: func(fs *pflag.FlagSet) { - fs.Set(cli.FlagCommissionMaxRate, "0.89") + require.NoError(fs.Set(cli.FlagCommissionMaxRate, "0.89")) }, expectedCfg: mkTxValCfg(cli.DefaultTokens.String()+sdk.DefaultBondDenom, "0.1", "0.89", "0.01", "1"), }, { name: "Custom commission max change rate", fsModify: func(fs *pflag.FlagSet) { - fs.Set(cli.FlagCommissionMaxChangeRate, "0.55") + require.NoError(fs.Set(cli.FlagCommissionMaxChangeRate, "0.55")) }, expectedCfg: mkTxValCfg(cli.DefaultTokens.String()+sdk.DefaultBondDenom, "0.1", "0.2", "0.55", "1"), }, { name: "Custom min self delegations", fsModify: func(fs *pflag.FlagSet) { - fs.Set(cli.FlagMinSelfDelegation, "0.33") + require.NoError(fs.Set(cli.FlagMinSelfDelegation, "0.33")) }, expectedCfg: mkTxValCfg(cli.DefaultTokens.String()+sdk.DefaultBondDenom, "0.1", "0.2", "0.01", "0.33"), }, @@ -150,16 +153,16 @@ func (s *CLITestSuite) TestPrepareConfigForTxCreateValidator() { tc.fsModify(fs) cvCfg, err := cli.PrepareConfigForTxCreateValidator(fs, moniker, nodeID, chainID, valPubKey) - require.NoError(s.T(), err) + require.NoError(err) - require.Equal(s.T(), tc.expectedCfg, cvCfg) + require.Equal(tc.expectedCfg, cvCfg) }) } } func (s *CLITestSuite) TestNewCreateValidatorCmd() { require := s.Require() - cmd := cli.NewCreateValidatorCmd() + cmd := cli.NewCreateValidatorCmd(addresscodec.NewBech32Codec("cosmosvaloper")) validJSON := fmt.Sprintf(` { @@ -239,7 +242,7 @@ func (s *CLITestSuite) TestNewCreateValidatorCmd() { fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "must specify amount of coins to bond", }, @@ -250,7 +253,7 @@ func (s *CLITestSuite) TestNewCreateValidatorCmd() { fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "must specify the JSON encoded pubkey", }, @@ -261,7 +264,7 @@ func (s *CLITestSuite) TestNewCreateValidatorCmd() { fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "must specify the moniker name", }, @@ -272,7 +275,7 @@ func (s *CLITestSuite) TestNewCreateValidatorCmd() { fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "", }, @@ -283,7 +286,7 @@ func (s *CLITestSuite) TestNewCreateValidatorCmd() { fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "", }, @@ -306,7 +309,7 @@ func (s *CLITestSuite) TestNewCreateValidatorCmd() { } func (s *CLITestSuite) TestNewEditValidatorCmd() { - cmd := cli.NewEditValidatorCmd() + cmd := cli.NewEditValidatorCmd(addresscodec.NewBech32Codec("cosmos")) moniker := "testing" details := "bio" @@ -325,7 +328,7 @@ func (s *CLITestSuite) TestNewEditValidatorCmd() { fmt.Sprintf("--%s=%s", flags.FlagFrom, "with wrong from address"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "key not found", }, @@ -335,7 +338,7 @@ func (s *CLITestSuite) TestNewEditValidatorCmd() { fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "", }, @@ -346,7 +349,7 @@ func (s *CLITestSuite) TestNewEditValidatorCmd() { fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "", }, @@ -357,7 +360,7 @@ func (s *CLITestSuite) TestNewEditValidatorCmd() { fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "", }, @@ -368,7 +371,7 @@ func (s *CLITestSuite) TestNewEditValidatorCmd() { fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "", }, @@ -379,7 +382,7 @@ func (s *CLITestSuite) TestNewEditValidatorCmd() { fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "", }, @@ -390,7 +393,7 @@ func (s *CLITestSuite) TestNewEditValidatorCmd() { fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "", }, @@ -405,7 +408,7 @@ func (s *CLITestSuite) TestNewEditValidatorCmd() { fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "", }, @@ -429,7 +432,7 @@ func (s *CLITestSuite) TestNewEditValidatorCmd() { } func (s *CLITestSuite) TestNewDelegateCmd() { - cmd := cli.NewDelegateCmd() + cmd := cli.NewDelegateCmd(addresscodec.NewBech32Codec("cosmosvaloper"), addresscodec.NewBech32Codec("cosmos")) testCases := []struct { name string @@ -444,7 +447,7 @@ func (s *CLITestSuite) TestNewDelegateCmd() { fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "invalid decimal coin expression: fooCoin", }, @@ -452,11 +455,11 @@ func (s *CLITestSuite) TestNewDelegateCmd() { "invalid validator address", []string{ "abc", - sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(150)).String(), + sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(150)).String(), fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "decoding bech32 failed", }, @@ -464,11 +467,11 @@ func (s *CLITestSuite) TestNewDelegateCmd() { "valid transaction of delegate", []string{ sdk.ValAddress(s.addrs[0]).String(), - sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(150)).String(), + sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(150)).String(), fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "", }, @@ -492,7 +495,7 @@ func (s *CLITestSuite) TestNewDelegateCmd() { } func (s *CLITestSuite) TestNewRedelegateCmd() { - cmd := cli.NewRedelegateCmd() + cmd := cli.NewRedelegateCmd(addresscodec.NewBech32Codec("cosmosvaloper"), addresscodec.NewBech32Codec("cosmos")) testCases := []struct { name string @@ -508,7 +511,7 @@ func (s *CLITestSuite) TestNewRedelegateCmd() { fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "invalid decimal coin expression: fooCoin", }, @@ -517,12 +520,12 @@ func (s *CLITestSuite) TestNewRedelegateCmd() { []string{ "invalid", // wrong src-validator-addr sdk.ValAddress(s.addrs[1]).String(), // dst-validator-addr - sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(150)).String(), // amount + sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(150)).String(), // amount fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=%d", flags.FlagGas, 300000), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "invalid bech32", }, @@ -531,26 +534,26 @@ func (s *CLITestSuite) TestNewRedelegateCmd() { []string{ sdk.ValAddress(s.addrs[0]).String(), // src-validator-addr "invalid", // wrong dst-validator-addr - sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(150)).String(), // amount + sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(150)).String(), // amount fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=%d", flags.FlagGas, 300000), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "invalid bech32", }, { "valid transaction of delegate", []string{ - sdk.ValAddress(s.addrs[0]).String(), // src-validator-addr - sdk.ValAddress(s.addrs[1]).String(), // dst-validator-addr - sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(150)).String(), // amount + sdk.ValAddress(s.addrs[0]).String(), // src-validator-addr + sdk.ValAddress(s.addrs[1]).String(), // dst-validator-addr + sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(150)).String(), // amount fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=%d", flags.FlagGas, 300000), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "", }, @@ -574,7 +577,7 @@ func (s *CLITestSuite) TestNewRedelegateCmd() { } func (s *CLITestSuite) TestNewUnbondCmd() { - cmd := cli.NewUnbondCmd() + cmd := cli.NewUnbondCmd(addresscodec.NewBech32Codec("cosmosvaloper"), addresscodec.NewBech32Codec("cosmos")) testCases := []struct { name string @@ -589,7 +592,7 @@ func (s *CLITestSuite) TestNewUnbondCmd() { fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "invalid decimal coin expression: foo", }, @@ -597,11 +600,11 @@ func (s *CLITestSuite) TestNewUnbondCmd() { "invalid validator address", []string{ "foo", - sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(150)).String(), + sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(150)).String(), fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "decoding bech32 failed", }, @@ -609,11 +612,11 @@ func (s *CLITestSuite) TestNewUnbondCmd() { "valid transaction of unbond", []string{ sdk.ValAddress(s.addrs[0]).String(), - sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(150)).String(), + sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(150)).String(), fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "", }, @@ -637,7 +640,7 @@ func (s *CLITestSuite) TestNewUnbondCmd() { } func (s *CLITestSuite) TestNewCancelUnbondingDelegationCmd() { - cmd := cli.NewCancelUnbondingDelegation() + cmd := cli.NewCancelUnbondingDelegation(addresscodec.NewBech32Codec("cosmosvaloper"), addresscodec.NewBech32Codec("cosmos")) testCases := []struct { name string @@ -648,12 +651,12 @@ func (s *CLITestSuite) TestNewCancelUnbondingDelegationCmd() { "invalid validator address", []string{ "foo", - sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(150)).String(), - sdk.NewInt(10000).String(), + sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(150)).String(), + sdkmath.NewInt(10000).String(), fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "decoding bech32 failed", }, @@ -662,11 +665,11 @@ func (s *CLITestSuite) TestNewCancelUnbondingDelegationCmd() { []string{ sdk.ValAddress(s.addrs[0]).String(), "fooCoin", - sdk.NewInt(10000).String(), + sdkmath.NewInt(10000).String(), fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "invalid decimal coin expression", }, @@ -674,12 +677,12 @@ func (s *CLITestSuite) TestNewCancelUnbondingDelegationCmd() { "without unbond creation height", []string{ sdk.ValAddress(s.addrs[0]).String(), - sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(150)).String(), + sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(150)).String(), "abc", fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "invalid height: invalid height: 0", }, @@ -687,12 +690,12 @@ func (s *CLITestSuite) TestNewCancelUnbondingDelegationCmd() { "valid transaction of canceling unbonding delegation", []string{ sdk.ValAddress(s.addrs[0]).String(), - sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5)).String(), - sdk.NewInt(10000).String(), + sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5)).String(), + sdkmath.NewInt(10000).String(), fmt.Sprintf("--%s=%s", flags.FlagFrom, s.addrs[0]), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), }, "", }, diff --git a/x/staking/genesis.go b/x/staking/genesis.go index 7e2cf1efe04a..1d4cd64e4bba 100644 --- a/x/staking/genesis.go +++ b/x/staking/genesis.go @@ -13,7 +13,7 @@ import ( // WriteValidators returns a slice of bonded genesis validators. func WriteValidators(ctx sdk.Context, keeper *keeper.Keeper) (vals []cmttypes.GenesisValidator, returnErr error) { - keeper.IterateLastValidators(ctx, func(_ int64, validator types.ValidatorI) (stop bool) { + err := keeper.IterateLastValidators(ctx, func(_ int64, validator types.ValidatorI) (stop bool) { pk, err := validator.ConsPubKey() if err != nil { returnErr = err @@ -34,6 +34,9 @@ func WriteValidators(ctx sdk.Context, keeper *keeper.Keeper) (vals []cmttypes.Ge return false }) + if err != nil { + return nil, err + } return } diff --git a/x/staking/genesis_test.go b/x/staking/genesis_test.go index 8e33db0e3717..93419809d843 100644 --- a/x/staking/genesis_test.go +++ b/x/staking/genesis_test.go @@ -3,9 +3,10 @@ package staking_test import ( "testing" - "cosmossdk.io/math" "github.com/stretchr/testify/assert" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking" diff --git a/x/staking/keeper/abci.go b/x/staking/keeper/abci.go index fcb65377eba8..8131fa6dd16f 100644 --- a/x/staking/keeper/abci.go +++ b/x/staking/keeper/abci.go @@ -2,25 +2,22 @@ package keeper import ( "context" - "time" abci "github.com/cometbft/cometbft/abci/types" + "github.com/cosmos/cosmos-sdk/telemetry" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking/types" ) // BeginBlocker will persist the current header and validator set as a historical entry // and prune the oldest entry based on the HistoricalEntries parameter -func (k *Keeper) BeginBlocker(ctx sdk.Context) { - defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) - - k.TrackHistoricalInfo(ctx) +func (k *Keeper) BeginBlocker(ctx context.Context) error { + defer telemetry.ModuleMeasureSince(types.ModuleName, telemetry.Now(), telemetry.MetricKeyBeginBlocker) + return k.TrackHistoricalInfo(ctx) } -// Called every block, update validator set +// EndBlocker called at every block, update validator set func (k *Keeper) EndBlocker(ctx context.Context) ([]abci.ValidatorUpdate, error) { - defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyEndBlocker) - - return k.BlockValidatorUpdates(sdk.UnwrapSDKContext(ctx)), nil + defer telemetry.ModuleMeasureSince(types.ModuleName, telemetry.Now(), telemetry.MetricKeyEndBlocker) + return k.BlockValidatorUpdates(ctx) } diff --git a/x/staking/keeper/alias_functions.go b/x/staking/keeper/alias_functions.go index 8660d7735d9d..4379043cc6d6 100644 --- a/x/staking/keeper/alias_functions.go +++ b/x/staking/keeper/alias_functions.go @@ -1,7 +1,7 @@ package keeper import ( - "fmt" + "context" storetypes "cosmossdk.io/store/types" @@ -11,17 +11,22 @@ import ( // Validator Set -// iterate through the validator set and perform the provided function -func (k Keeper) IterateValidators(ctx sdk.Context, fn func(index int64, validator types.ValidatorI) (stop bool)) { - store := ctx.KVStore(k.storeKey) - - iterator := storetypes.KVStorePrefixIterator(store, types.ValidatorsKey) +// IterateValidators iterates through the validator set and perform the provided function +func (k Keeper) IterateValidators(ctx context.Context, fn func(index int64, validator types.ValidatorI) (stop bool)) error { + store := k.storeService.OpenKVStore(ctx) + iterator, err := store.Iterator(types.ValidatorsKey, storetypes.PrefixEndBytes(types.ValidatorsKey)) + if err != nil { + return err + } defer iterator.Close() i := int64(0) for ; iterator.Valid(); iterator.Next() { - validator := types.MustUnmarshalValidator(k.cdc, iterator.Value()) + validator, err := types.UnmarshalValidator(k.cdc, iterator.Value()) + if err != nil { + return err + } stop := fn(i, validator) // XXX is this safe will the validator unexposed fields be able to get written to? if stop { @@ -29,14 +34,22 @@ func (k Keeper) IterateValidators(ctx sdk.Context, fn func(index int64, validato } i++ } + + return nil } -// iterate through the bonded validator set and perform the provided function -func (k Keeper) IterateBondedValidatorsByPower(ctx sdk.Context, fn func(index int64, validator types.ValidatorI) (stop bool)) { - store := ctx.KVStore(k.storeKey) - maxValidators := k.MaxValidators(ctx) +// IterateBondedValidatorsByPower iterates through the bonded validator set and perform the provided function +func (k Keeper) IterateBondedValidatorsByPower(ctx context.Context, fn func(index int64, validator types.ValidatorI) (stop bool)) error { + store := k.storeService.OpenKVStore(ctx) + maxValidators, err := k.MaxValidators(ctx) + if err != nil { + return err + } - iterator := storetypes.KVStoreReversePrefixIterator(store, types.ValidatorsByPowerIndexKey) + iterator, err := store.ReverseIterator(types.ValidatorsByPowerIndexKey, storetypes.PrefixEndBytes(types.ValidatorsByPowerIndexKey)) + if err != nil { + return err + } defer iterator.Close() i := int64(0) @@ -52,11 +65,16 @@ func (k Keeper) IterateBondedValidatorsByPower(ctx sdk.Context, fn func(index in i++ } } + + return nil } -// iterate through the active validator set and perform the provided function -func (k Keeper) IterateLastValidators(ctx sdk.Context, fn func(index int64, validator types.ValidatorI) (stop bool)) { - iterator := k.LastValidatorsIterator(ctx) +// IterateLastValidators iterates through the active validator set and perform the provided function +func (k Keeper) IterateLastValidators(ctx context.Context, fn func(index int64, validator types.ValidatorI) (stop bool)) error { + iterator, err := k.LastValidatorsIterator(ctx) + if err != nil { + return err + } defer iterator.Close() i := int64(0) @@ -64,9 +82,9 @@ func (k Keeper) IterateLastValidators(ctx sdk.Context, fn func(index int64, vali for ; iterator.Valid(); iterator.Next() { address := types.AddressFromLastValidatorPowerKey(iterator.Key()) - validator, found := k.GetValidator(ctx, address) - if !found { - panic(fmt.Sprintf("validator record not found for address: %v\n", address)) + validator, err := k.GetValidator(ctx, address) + if err != nil { + return err } stop := fn(i, validator) // XXX is this safe will the validator unexposed fields be able to get written to? @@ -75,57 +93,53 @@ func (k Keeper) IterateLastValidators(ctx sdk.Context, fn func(index int64, vali } i++ } + return nil } // Validator gets the Validator interface for a particular address -func (k Keeper) Validator(ctx sdk.Context, address sdk.ValAddress) types.ValidatorI { - val, found := k.GetValidator(ctx, address) - if !found { - return nil - } - - return val +func (k Keeper) Validator(ctx context.Context, address sdk.ValAddress) (types.ValidatorI, error) { + return k.GetValidator(ctx, address) } // ValidatorByConsAddr gets the validator interface for a particular pubkey -func (k Keeper) ValidatorByConsAddr(ctx sdk.Context, addr sdk.ConsAddress) types.ValidatorI { - val, found := k.GetValidatorByConsAddr(ctx, addr) - if !found { - return nil - } - - return val +func (k Keeper) ValidatorByConsAddr(ctx context.Context, addr sdk.ConsAddress) (types.ValidatorI, error) { + return k.GetValidatorByConsAddr(ctx, addr) } // Delegation Set -// Returns self as it is both a validatorset and delegationset +// GetValidatorSet returns self as it is both a validatorset and delegationset func (k Keeper) GetValidatorSet() types.ValidatorSet { return k } -// Delegation get the delegation interface for a particular set of delegator and validator addresses -func (k Keeper) Delegation(ctx sdk.Context, addrDel sdk.AccAddress, addrVal sdk.ValAddress) types.DelegationI { - bond, ok := k.GetDelegation(ctx, addrDel, addrVal) - if !ok { - return nil +// Delegation gets the delegation interface for a particular set of delegator and validator addresses +func (k Keeper) Delegation(ctx context.Context, addrDel sdk.AccAddress, addrVal sdk.ValAddress) (types.DelegationI, error) { + bond, err := k.GetDelegation(ctx, addrDel, addrVal) + if err != nil { + return nil, err } - return bond + return bond, nil } -// iterate through all of the delegations from a delegator -func (k Keeper) IterateDelegations(ctx sdk.Context, delAddr sdk.AccAddress, +// IterateDelegations iterates through all of the delegations from a delegator +func (k Keeper) IterateDelegations(ctx context.Context, delAddr sdk.AccAddress, fn func(index int64, del types.DelegationI) (stop bool), -) { - store := ctx.KVStore(k.storeKey) +) error { + store := k.storeService.OpenKVStore(ctx) delegatorPrefixKey := types.GetDelegationsKey(delAddr) - - iterator := storetypes.KVStorePrefixIterator(store, delegatorPrefixKey) // smallest to largest + iterator, err := store.Iterator(delegatorPrefixKey, storetypes.PrefixEndBytes(delegatorPrefixKey)) + if err != nil { + return err + } defer iterator.Close() for i := int64(0); iterator.Valid(); iterator.Next() { - del := types.MustUnmarshalDelegation(k.cdc, iterator.Value()) + del, err := types.UnmarshalDelegation(k.cdc, iterator.Value()) + if err != nil { + return err + } stop := fn(i, del) if stop { @@ -133,18 +147,25 @@ func (k Keeper) IterateDelegations(ctx sdk.Context, delAddr sdk.AccAddress, } i++ } + + return nil } -// return all delegations used during genesis dump +// GetAllSDKDelegations returns all delegations used during genesis dump // TODO: remove this func, change all usage for iterate functionality -func (k Keeper) GetAllSDKDelegations(ctx sdk.Context) (delegations []types.Delegation) { - store := ctx.KVStore(k.storeKey) - - iterator := storetypes.KVStorePrefixIterator(store, types.DelegationKey) +func (k Keeper) GetAllSDKDelegations(ctx context.Context) (delegations []types.Delegation, err error) { + store := k.storeService.OpenKVStore(ctx) + iterator, err := store.Iterator(types.DelegationKey, storetypes.PrefixEndBytes(types.DelegationKey)) + if err != nil { + return delegations, err + } defer iterator.Close() for ; iterator.Valid(); iterator.Next() { - delegation := types.MustUnmarshalDelegation(k.cdc, iterator.Value()) + delegation, err := types.UnmarshalDelegation(k.cdc, iterator.Value()) + if err != nil { + return delegations, err + } delegations = append(delegations, delegation) } diff --git a/x/staking/keeper/delegation.go b/x/staking/keeper/delegation.go index 0047ef5414b6..606cb1e51c89 100644 --- a/x/staking/keeper/delegation.go +++ b/x/staking/keeper/delegation.go @@ -2,39 +2,45 @@ package keeper import ( "bytes" + "context" + "errors" "fmt" "time" + corestore "cosmossdk.io/core/store" + errorsmod "cosmossdk.io/errors" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/staking/types" ) // GetDelegation returns a specific delegation. -func (k Keeper) GetDelegation(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (delegation types.Delegation, found bool) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) GetDelegation(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (types.Delegation, error) { + store := k.storeService.OpenKVStore(ctx) key := types.GetDelegationKey(delAddr, valAddr) - value := store.Get(key) - if value == nil { - return delegation, false + value, err := store.Get(key) + if err != nil { + return types.Delegation{}, err } - delegation = types.MustUnmarshalDelegation(k.cdc, value) + if value == nil { + return types.Delegation{}, types.ErrNoDelegation + } - return delegation, true + return types.UnmarshalDelegation(k.cdc, value) } // IterateAllDelegations iterates through all of the delegations. -func (k Keeper) IterateAllDelegations(ctx sdk.Context, cb func(delegation types.Delegation) (stop bool)) { - store := ctx.KVStore(k.storeKey) - - iterator := storetypes.KVStorePrefixIterator(store, types.DelegationKey) +func (k Keeper) IterateAllDelegations(ctx context.Context, cb func(delegation types.Delegation) (stop bool)) error { + store := k.storeService.OpenKVStore(ctx) + iterator, err := store.Iterator(types.DelegationKey, storetypes.PrefixEndBytes(types.DelegationKey)) + if err != nil { + return err + } defer iterator.Close() for ; iterator.Valid(); iterator.Next() { @@ -43,318 +49,414 @@ func (k Keeper) IterateAllDelegations(ctx sdk.Context, cb func(delegation types. break } } + + return nil } // GetAllDelegations returns all delegations used during genesis dump. -func (k Keeper) GetAllDelegations(ctx sdk.Context) (delegations []types.Delegation) { - k.IterateAllDelegations(ctx, func(delegation types.Delegation) bool { +func (k Keeper) GetAllDelegations(ctx context.Context) (delegations []types.Delegation, err error) { + err = k.IterateAllDelegations(ctx, func(delegation types.Delegation) bool { delegations = append(delegations, delegation) return false }) - return delegations + return delegations, err } // GetValidatorDelegations returns all delegations to a specific validator. // Useful for querier. -func (k Keeper) GetValidatorDelegations(ctx sdk.Context, valAddr sdk.ValAddress) (delegations []types.Delegation) { - store := ctx.KVStore(k.storeKey) - - iterator := storetypes.KVStorePrefixIterator(store, types.GetDelegationsByValPrefixKey(valAddr)) +func (k Keeper) GetValidatorDelegations(ctx context.Context, valAddr sdk.ValAddress) (delegations []types.Delegation, err error) { + store := k.storeService.OpenKVStore(ctx) + prefix := types.GetDelegationsByValPrefixKey(valAddr) + iterator, err := store.Iterator(prefix, storetypes.PrefixEndBytes(prefix)) + if err != nil { + return delegations, err + } defer iterator.Close() for ; iterator.Valid(); iterator.Next() { var delegation types.Delegation valAddr, delAddr, err := types.ParseDelegationsByValKey(iterator.Key()) if err != nil { - panic(err) + return delegations, err + } + + bz, err := store.Get(types.GetDelegationKey(delAddr, valAddr)) + if err != nil { + return delegations, err } - bz := store.Get(types.GetDelegationKey(delAddr, valAddr)) if err := k.cdc.Unmarshal(bz, &delegation); err != nil { - panic(err) + return delegations, err } delegations = append(delegations, delegation) } - return delegations + return delegations, nil } // GetDelegatorDelegations returns a given amount of all the delegations from a // delegator. -func (k Keeper) GetDelegatorDelegations(ctx sdk.Context, delegator sdk.AccAddress, maxRetrieve uint16) (delegations []types.Delegation) { +func (k Keeper) GetDelegatorDelegations(ctx context.Context, delegator sdk.AccAddress, maxRetrieve uint16) (delegations []types.Delegation, err error) { delegations = make([]types.Delegation, maxRetrieve) - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) delegatorPrefixKey := types.GetDelegationsKey(delegator) - iterator := storetypes.KVStorePrefixIterator(store, delegatorPrefixKey) + iterator, err := store.Iterator(delegatorPrefixKey, storetypes.PrefixEndBytes(delegatorPrefixKey)) + if err != nil { + return delegations, err + } defer iterator.Close() i := 0 for ; iterator.Valid() && i < int(maxRetrieve); iterator.Next() { - delegation := types.MustUnmarshalDelegation(k.cdc, iterator.Value()) + delegation, err := types.UnmarshalDelegation(k.cdc, iterator.Value()) + if err != nil { + return delegations, err + } delegations[i] = delegation i++ } - return delegations[:i] // trim if the array length < maxRetrieve + return delegations[:i], nil // trim if the array length < maxRetrieve } // SetDelegation sets a delegation. -func (k Keeper) SetDelegation(ctx sdk.Context, delegation types.Delegation) { +func (k Keeper) SetDelegation(ctx context.Context, delegation types.Delegation) error { delegatorAddress, err := k.authKeeper.AddressCodec().StringToBytes(delegation.DelegatorAddress) if err != nil { - panic(err) + return err + } + + valAddr, err := k.validatorAddressCodec.StringToBytes(delegation.GetValidatorAddr()) + if err != nil { + return err } - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) b := types.MustMarshalDelegation(k.cdc, delegation) - store.Set(types.GetDelegationKey(delegatorAddress, delegation.GetValidatorAddr()), b) + err = store.Set(types.GetDelegationKey(delegatorAddress, valAddr), b) + if err != nil { + return err + } // set the delegation in validator delegator index - store.Set(types.GetDelegationsByValKey(delegation.GetValidatorAddr(), delegatorAddress), []byte{}) + return store.Set(types.GetDelegationsByValKey(valAddr, delegatorAddress), []byte{}) } // RemoveDelegation removes a delegation -func (k Keeper) RemoveDelegation(ctx sdk.Context, delegation types.Delegation) error { +func (k Keeper) RemoveDelegation(ctx context.Context, delegation types.Delegation) error { delegatorAddress, err := k.authKeeper.AddressCodec().StringToBytes(delegation.DelegatorAddress) if err != nil { - panic(err) + return err + } + + valAddr, err := k.validatorAddressCodec.StringToBytes(delegation.GetValidatorAddr()) + if err != nil { + return err } // TODO: Consider calling hooks outside of the store wrapper functions, it's unobvious. - if err := k.Hooks().BeforeDelegationRemoved(ctx, delegatorAddress, delegation.GetValidatorAddr()); err != nil { + if err := k.Hooks().BeforeDelegationRemoved(ctx, delegatorAddress, valAddr); err != nil { return err } - store := ctx.KVStore(k.storeKey) - store.Delete(types.GetDelegationKey(delegatorAddress, delegation.GetValidatorAddr())) - store.Delete(types.GetDelegationsByValKey(delegation.GetValidatorAddr(), delegatorAddress)) + store := k.storeService.OpenKVStore(ctx) + err = store.Delete(types.GetDelegationKey(delegatorAddress, valAddr)) + if err != nil { + return err + } - return nil + return store.Delete(types.GetDelegationsByValKey(valAddr, delegatorAddress)) } // GetUnbondingDelegations returns a given amount of all the delegator unbonding-delegations. -func (k Keeper) GetUnbondingDelegations(ctx sdk.Context, delegator sdk.AccAddress, maxRetrieve uint16) (unbondingDelegations []types.UnbondingDelegation) { +func (k Keeper) GetUnbondingDelegations(ctx context.Context, delegator sdk.AccAddress, maxRetrieve uint16) (unbondingDelegations []types.UnbondingDelegation, err error) { unbondingDelegations = make([]types.UnbondingDelegation, maxRetrieve) - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) delegatorPrefixKey := types.GetUBDsKey(delegator) - iterator := storetypes.KVStorePrefixIterator(store, delegatorPrefixKey) + iterator, err := store.Iterator(delegatorPrefixKey, storetypes.PrefixEndBytes(delegatorPrefixKey)) + if err != nil { + return unbondingDelegations, err + } defer iterator.Close() i := 0 for ; iterator.Valid() && i < int(maxRetrieve); iterator.Next() { - unbondingDelegation := types.MustUnmarshalUBD(k.cdc, iterator.Value()) + unbondingDelegation, err := types.UnmarshalUBD(k.cdc, iterator.Value()) + if err != nil { + return unbondingDelegations, err + } unbondingDelegations[i] = unbondingDelegation i++ } - return unbondingDelegations[:i] // trim if the array length < maxRetrieve + return unbondingDelegations[:i], nil // trim if the array length < maxRetrieve } // GetUnbondingDelegation returns a unbonding delegation. -func (k Keeper) GetUnbondingDelegation(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (ubd types.UnbondingDelegation, found bool) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) GetUnbondingDelegation(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (ubd types.UnbondingDelegation, err error) { + store := k.storeService.OpenKVStore(ctx) key := types.GetUBDKey(delAddr, valAddr) - value := store.Get(key) + value, err := store.Get(key) + if err != nil { + return ubd, err + } if value == nil { - return ubd, false + return ubd, types.ErrNoUnbondingDelegation } - ubd = types.MustUnmarshalUBD(k.cdc, value) - - return ubd, true + return types.UnmarshalUBD(k.cdc, value) } // GetUnbondingDelegationsFromValidator returns all unbonding delegations from a // particular validator. -func (k Keeper) GetUnbondingDelegationsFromValidator(ctx sdk.Context, valAddr sdk.ValAddress) (ubds []types.UnbondingDelegation) { - store := ctx.KVStore(k.storeKey) - - iterator := storetypes.KVStorePrefixIterator(store, types.GetUBDsByValIndexKey(valAddr)) +func (k Keeper) GetUnbondingDelegationsFromValidator(ctx context.Context, valAddr sdk.ValAddress) (ubds []types.UnbondingDelegation, err error) { + store := k.storeService.OpenKVStore(ctx) + prefix := types.GetUBDsByValIndexKey(valAddr) + iterator, err := store.Iterator(prefix, storetypes.PrefixEndBytes(prefix)) + if err != nil { + return ubds, err + } defer iterator.Close() for ; iterator.Valid(); iterator.Next() { key := types.GetUBDKeyFromValIndexKey(iterator.Key()) - value := store.Get(key) - ubd := types.MustUnmarshalUBD(k.cdc, value) + value, err := store.Get(key) + if err != nil { + return ubds, err + } + ubd, err := types.UnmarshalUBD(k.cdc, value) + if err != nil { + return ubds, err + } ubds = append(ubds, ubd) } - return ubds + return ubds, nil } // IterateUnbondingDelegations iterates through all of the unbonding delegations. -func (k Keeper) IterateUnbondingDelegations(ctx sdk.Context, fn func(index int64, ubd types.UnbondingDelegation) (stop bool)) { - store := ctx.KVStore(k.storeKey) - - iterator := storetypes.KVStorePrefixIterator(store, types.UnbondingDelegationKey) +func (k Keeper) IterateUnbondingDelegations(ctx context.Context, fn func(index int64, ubd types.UnbondingDelegation) (stop bool)) error { + store := k.storeService.OpenKVStore(ctx) + prefix := types.UnbondingDelegationKey + iterator, err := store.Iterator(prefix, storetypes.PrefixEndBytes(prefix)) + if err != nil { + return err + } defer iterator.Close() for i := int64(0); iterator.Valid(); iterator.Next() { - ubd := types.MustUnmarshalUBD(k.cdc, iterator.Value()) + ubd, err := types.UnmarshalUBD(k.cdc, iterator.Value()) + if err != nil { + return err + } if stop := fn(i, ubd); stop { break } i++ } + + return nil } // GetDelegatorUnbonding returns the total amount a delegator has unbonding. -func (k Keeper) GetDelegatorUnbonding(ctx sdk.Context, delegator sdk.AccAddress) math.Int { +func (k Keeper) GetDelegatorUnbonding(ctx context.Context, delegator sdk.AccAddress) (math.Int, error) { unbonding := math.ZeroInt() - k.IterateDelegatorUnbondingDelegations(ctx, delegator, func(ubd types.UnbondingDelegation) bool { + err := k.IterateDelegatorUnbondingDelegations(ctx, delegator, func(ubd types.UnbondingDelegation) bool { for _, entry := range ubd.Entries { unbonding = unbonding.Add(entry.Balance) } return false }) - return unbonding + return unbonding, err } // IterateDelegatorUnbondingDelegations iterates through a delegator's unbonding delegations. -func (k Keeper) IterateDelegatorUnbondingDelegations(ctx sdk.Context, delegator sdk.AccAddress, cb func(ubd types.UnbondingDelegation) (stop bool)) { - store := ctx.KVStore(k.storeKey) - - iterator := storetypes.KVStorePrefixIterator(store, types.GetUBDsKey(delegator)) +func (k Keeper) IterateDelegatorUnbondingDelegations(ctx context.Context, delegator sdk.AccAddress, cb func(ubd types.UnbondingDelegation) (stop bool)) error { + store := k.storeService.OpenKVStore(ctx) + prefix := types.GetUBDsKey(delegator) + iterator, err := store.Iterator(prefix, storetypes.PrefixEndBytes(prefix)) + if err != nil { + return err + } defer iterator.Close() for ; iterator.Valid(); iterator.Next() { - ubd := types.MustUnmarshalUBD(k.cdc, iterator.Value()) + ubd, err := types.UnmarshalUBD(k.cdc, iterator.Value()) + if err != nil { + return err + } if cb(ubd) { break } } + + return nil } // GetDelegatorBonded returs the total amount a delegator has bonded. -func (k Keeper) GetDelegatorBonded(ctx sdk.Context, delegator sdk.AccAddress) math.Int { +func (k Keeper) GetDelegatorBonded(ctx context.Context, delegator sdk.AccAddress) (math.Int, error) { bonded := math.LegacyZeroDec() - k.IterateDelegatorDelegations(ctx, delegator, func(delegation types.Delegation) bool { - validatorAddr, err := sdk.ValAddressFromBech32(delegation.ValidatorAddress) + err := k.IterateDelegatorDelegations(ctx, delegator, func(delegation types.Delegation) bool { + validatorAddr, err := k.validatorAddressCodec.StringToBytes(delegation.ValidatorAddress) if err != nil { panic(err) // shouldn't happen } - validator, found := k.GetValidator(ctx, validatorAddr) - if found { + validator, err := k.GetValidator(ctx, validatorAddr) + if err == nil { shares := delegation.Shares tokens := validator.TokensFromSharesTruncated(shares) bonded = bonded.Add(tokens) } return false }) - return bonded.RoundInt() + return bonded.RoundInt(), err } // IterateDelegatorDelegations iterates through one delegator's delegations. -func (k Keeper) IterateDelegatorDelegations(ctx sdk.Context, delegator sdk.AccAddress, cb func(delegation types.Delegation) (stop bool)) { - store := ctx.KVStore(k.storeKey) - delegatorPrefixKey := types.GetDelegationsKey(delegator) - iterator := storetypes.KVStorePrefixIterator(store, delegatorPrefixKey) +func (k Keeper) IterateDelegatorDelegations(ctx context.Context, delegator sdk.AccAddress, cb func(delegation types.Delegation) (stop bool)) error { + store := k.storeService.OpenKVStore(ctx) + prefix := types.GetDelegationsKey(delegator) + iterator, err := store.Iterator(prefix, storetypes.PrefixEndBytes(prefix)) + if err != nil { + return err + } defer iterator.Close() for ; iterator.Valid(); iterator.Next() { - delegation := types.MustUnmarshalDelegation(k.cdc, iterator.Value()) + delegation, err := types.UnmarshalDelegation(k.cdc, iterator.Value()) + if err != nil { + return err + } if cb(delegation) { break } } + return nil } // IterateDelegatorRedelegations iterates through one delegator's redelegations. -func (k Keeper) IterateDelegatorRedelegations(ctx sdk.Context, delegator sdk.AccAddress, cb func(red types.Redelegation) (stop bool)) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) IterateDelegatorRedelegations(ctx context.Context, delegator sdk.AccAddress, cb func(red types.Redelegation) (stop bool)) error { + store := k.storeService.OpenKVStore(ctx) delegatorPrefixKey := types.GetREDsKey(delegator) - - iterator := storetypes.KVStorePrefixIterator(store, delegatorPrefixKey) - defer iterator.Close() + iterator, err := store.Iterator(delegatorPrefixKey, storetypes.PrefixEndBytes(delegatorPrefixKey)) + if err != nil { + return err + } for ; iterator.Valid(); iterator.Next() { - red := types.MustUnmarshalRED(k.cdc, iterator.Value()) + red, err := types.UnmarshalRED(k.cdc, iterator.Value()) + if err != nil { + return err + } if cb(red) { break } } + return nil } -// HasMaxUnbondingDelegationEntries - check if unbonding delegation has maximum number of entries. -func (k Keeper) HasMaxUnbondingDelegationEntries(ctx sdk.Context, delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress) bool { - ubd, found := k.GetUnbondingDelegation(ctx, delegatorAddr, validatorAddr) - if !found { - return false +// HasMaxUnbondingDelegationEntries checks if unbonding delegation has maximum number of entries. +func (k Keeper) HasMaxUnbondingDelegationEntries(ctx context.Context, delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress) (bool, error) { + ubd, err := k.GetUnbondingDelegation(ctx, delegatorAddr, validatorAddr) + if err != nil && !errors.Is(err, types.ErrNoUnbondingDelegation) { + return false, err } - return len(ubd.Entries) >= int(k.MaxEntries(ctx)) + maxEntries, err := k.MaxEntries(ctx) + if err != nil { + return false, err + } + return len(ubd.Entries) >= int(maxEntries), nil } // SetUnbondingDelegation sets the unbonding delegation and associated index. -func (k Keeper) SetUnbondingDelegation(ctx sdk.Context, ubd types.UnbondingDelegation) { +func (k Keeper) SetUnbondingDelegation(ctx context.Context, ubd types.UnbondingDelegation) error { delAddr, err := k.authKeeper.AddressCodec().StringToBytes(ubd.DelegatorAddress) if err != nil { - panic(err) + return err } - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) bz := types.MustMarshalUBD(k.cdc, ubd) - valAddr, err := sdk.ValAddressFromBech32(ubd.ValidatorAddress) + valAddr, err := k.validatorAddressCodec.StringToBytes(ubd.ValidatorAddress) if err != nil { - panic(err) + return err } key := types.GetUBDKey(delAddr, valAddr) - store.Set(key, bz) - store.Set(types.GetUBDByValIndexKey(delAddr, valAddr), []byte{}) // index, store empty bytes + err = store.Set(key, bz) + if err != nil { + return err + } + + return store.Set(types.GetUBDByValIndexKey(delAddr, valAddr), []byte{}) // index, store empty bytes } // RemoveUnbondingDelegation removes the unbonding delegation object and associated index. -func (k Keeper) RemoveUnbondingDelegation(ctx sdk.Context, ubd types.UnbondingDelegation) { +func (k Keeper) RemoveUnbondingDelegation(ctx context.Context, ubd types.UnbondingDelegation) error { delegatorAddress, err := k.authKeeper.AddressCodec().StringToBytes(ubd.DelegatorAddress) if err != nil { - panic(err) + return err } - store := ctx.KVStore(k.storeKey) - addr, err := sdk.ValAddressFromBech32(ubd.ValidatorAddress) + store := k.storeService.OpenKVStore(ctx) + addr, err := k.validatorAddressCodec.StringToBytes(ubd.ValidatorAddress) if err != nil { - panic(err) + return err } key := types.GetUBDKey(delegatorAddress, addr) - store.Delete(key) - store.Delete(types.GetUBDByValIndexKey(delegatorAddress, addr)) + err = store.Delete(key) + if err != nil { + return err + } + + return store.Delete(types.GetUBDByValIndexKey(delegatorAddress, addr)) } // SetUnbondingDelegationEntry adds an entry to the unbonding delegation at // the given addresses. It creates the unbonding delegation if it does not exist. func (k Keeper) SetUnbondingDelegationEntry( - ctx sdk.Context, delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress, + ctx context.Context, delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress, creationHeight int64, minTime time.Time, balance math.Int, -) types.UnbondingDelegation { - ubd, found := k.GetUnbondingDelegation(ctx, delegatorAddr, validatorAddr) - id := k.IncrementUnbondingID(ctx) +) (types.UnbondingDelegation, error) { + id, err := k.IncrementUnbondingID(ctx) + if err != nil { + return types.UnbondingDelegation{}, err + } + isNewUbdEntry := true - if found { + ubd, err := k.GetUnbondingDelegation(ctx, delegatorAddr, validatorAddr) + if err == nil { isNewUbdEntry = ubd.AddEntry(creationHeight, minTime, balance, id) + } else if errors.Is(err, types.ErrNoUnbondingDelegation) { + ubd = types.NewUnbondingDelegation(delegatorAddr, validatorAddr, creationHeight, minTime, balance, id, k.validatorAddressCodec, k.authKeeper.AddressCodec()) } else { - ubd = types.NewUnbondingDelegation(delegatorAddr, validatorAddr, creationHeight, minTime, balance, id) + return ubd, err } - k.SetUnbondingDelegation(ctx, ubd) + if err = k.SetUnbondingDelegation(ctx, ubd); err != nil { + return ubd, err + } // only call the hook for new entries since // calls to AfterUnbondingInitiated are not idempotent if isNewUbdEntry { // Add to the UBDByUnbondingOp index to look up the UBD by the UBDE ID - k.SetUnbondingDelegationByUnbondingID(ctx, ubd, id) + if err = k.SetUnbondingDelegationByUnbondingID(ctx, ubd, id); err != nil { + return ubd, err + } if err := k.Hooks().AfterUnbondingInitiated(ctx, id); err != nil { k.Logger(ctx).Error("failed to call after unbonding initiated hook", "error", err) } } - return ubd + return ubd, nil } // unbonding delegation queue timeslice operations @@ -362,232 +464,304 @@ func (k Keeper) SetUnbondingDelegationEntry( // GetUBDQueueTimeSlice gets a specific unbonding queue timeslice. A timeslice // is a slice of DVPairs corresponding to unbonding delegations that expire at a // certain time. -func (k Keeper) GetUBDQueueTimeSlice(ctx sdk.Context, timestamp time.Time) (dvPairs []types.DVPair) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) GetUBDQueueTimeSlice(ctx context.Context, timestamp time.Time) (dvPairs []types.DVPair, err error) { + store := k.storeService.OpenKVStore(ctx) - bz := store.Get(types.GetUnbondingDelegationTimeKey(timestamp)) - if bz == nil { - return []types.DVPair{} + bz, err := store.Get(types.GetUnbondingDelegationTimeKey(timestamp)) + if bz == nil || err != nil { + return []types.DVPair{}, err } pairs := types.DVPairs{} - k.cdc.MustUnmarshal(bz, &pairs) + err = k.cdc.Unmarshal(bz, &pairs) - return pairs.Pairs + return pairs.Pairs, err } // SetUBDQueueTimeSlice sets a specific unbonding queue timeslice. -func (k Keeper) SetUBDQueueTimeSlice(ctx sdk.Context, timestamp time.Time, keys []types.DVPair) { - store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshal(&types.DVPairs{Pairs: keys}) - store.Set(types.GetUnbondingDelegationTimeKey(timestamp), bz) +func (k Keeper) SetUBDQueueTimeSlice(ctx context.Context, timestamp time.Time, keys []types.DVPair) error { + store := k.storeService.OpenKVStore(ctx) + bz, err := k.cdc.Marshal(&types.DVPairs{Pairs: keys}) + if err != nil { + return err + } + return store.Set(types.GetUnbondingDelegationTimeKey(timestamp), bz) } // InsertUBDQueue inserts an unbonding delegation to the appropriate timeslice // in the unbonding queue. -func (k Keeper) InsertUBDQueue(ctx sdk.Context, ubd types.UnbondingDelegation, completionTime time.Time) { +func (k Keeper) InsertUBDQueue(ctx context.Context, ubd types.UnbondingDelegation, completionTime time.Time) error { dvPair := types.DVPair{DelegatorAddress: ubd.DelegatorAddress, ValidatorAddress: ubd.ValidatorAddress} - timeSlice := k.GetUBDQueueTimeSlice(ctx, completionTime) + timeSlice, err := k.GetUBDQueueTimeSlice(ctx, completionTime) + if err != nil { + return err + } + if len(timeSlice) == 0 { - k.SetUBDQueueTimeSlice(ctx, completionTime, []types.DVPair{dvPair}) - } else { - timeSlice = append(timeSlice, dvPair) - k.SetUBDQueueTimeSlice(ctx, completionTime, timeSlice) + if err = k.SetUBDQueueTimeSlice(ctx, completionTime, []types.DVPair{dvPair}); err != nil { + return err + } + return nil } + + timeSlice = append(timeSlice, dvPair) + return k.SetUBDQueueTimeSlice(ctx, completionTime, timeSlice) } // UBDQueueIterator returns all the unbonding queue timeslices from time 0 until endTime. -func (k Keeper) UBDQueueIterator(ctx sdk.Context, endTime time.Time) storetypes.Iterator { - store := ctx.KVStore(k.storeKey) +func (k Keeper) UBDQueueIterator(ctx context.Context, endTime time.Time) (corestore.Iterator, error) { + store := k.storeService.OpenKVStore(ctx) return store.Iterator(types.UnbondingQueueKey, storetypes.InclusiveEndBytes(types.GetUnbondingDelegationTimeKey(endTime))) } // DequeueAllMatureUBDQueue returns a concatenated list of all the timeslices inclusively previous to // currTime, and deletes the timeslices from the queue. -func (k Keeper) DequeueAllMatureUBDQueue(ctx sdk.Context, currTime time.Time) (matureUnbonds []types.DVPair) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) DequeueAllMatureUBDQueue(ctx context.Context, currTime time.Time) (matureUnbonds []types.DVPair, err error) { + store := k.storeService.OpenKVStore(ctx) // gets an iterator for all timeslices from time 0 until the current Blockheader time - unbondingTimesliceIterator := k.UBDQueueIterator(ctx, currTime) + unbondingTimesliceIterator, err := k.UBDQueueIterator(ctx, currTime) + if err != nil { + return matureUnbonds, err + } defer unbondingTimesliceIterator.Close() for ; unbondingTimesliceIterator.Valid(); unbondingTimesliceIterator.Next() { timeslice := types.DVPairs{} value := unbondingTimesliceIterator.Value() - k.cdc.MustUnmarshal(value, ×lice) + if err = k.cdc.Unmarshal(value, ×lice); err != nil { + return matureUnbonds, err + } matureUnbonds = append(matureUnbonds, timeslice.Pairs...) - store.Delete(unbondingTimesliceIterator.Key()) + if err = store.Delete(unbondingTimesliceIterator.Key()); err != nil { + return matureUnbonds, err + } + } - return matureUnbonds + return matureUnbonds, nil } // GetRedelegations returns a given amount of all the delegator redelegations. -func (k Keeper) GetRedelegations(ctx sdk.Context, delegator sdk.AccAddress, maxRetrieve uint16) (redelegations []types.Redelegation) { +func (k Keeper) GetRedelegations(ctx context.Context, delegator sdk.AccAddress, maxRetrieve uint16) (redelegations []types.Redelegation, err error) { redelegations = make([]types.Redelegation, maxRetrieve) - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) delegatorPrefixKey := types.GetREDsKey(delegator) - - iterator := storetypes.KVStorePrefixIterator(store, delegatorPrefixKey) - defer iterator.Close() + iterator, err := store.Iterator(delegatorPrefixKey, storetypes.PrefixEndBytes(delegatorPrefixKey)) + if err != nil { + return nil, err + } i := 0 for ; iterator.Valid() && i < int(maxRetrieve); iterator.Next() { - redelegation := types.MustUnmarshalRED(k.cdc, iterator.Value()) + redelegation, err := types.UnmarshalRED(k.cdc, iterator.Value()) + if err != nil { + return nil, err + } redelegations[i] = redelegation i++ } - return redelegations[:i] // trim if the array length < maxRetrieve + return redelegations[:i], nil // trim if the array length < maxRetrieve } // GetRedelegation returns a redelegation. -func (k Keeper) GetRedelegation(ctx sdk.Context, delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) (red types.Redelegation, found bool) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) GetRedelegation(ctx context.Context, delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) (red types.Redelegation, err error) { + store := k.storeService.OpenKVStore(ctx) key := types.GetREDKey(delAddr, valSrcAddr, valDstAddr) - value := store.Get(key) - if value == nil { - return red, false + value, err := store.Get(key) + if err != nil { + return red, err } - red = types.MustUnmarshalRED(k.cdc, value) + if value == nil { + return red, types.ErrNoRedelegation + } - return red, true + return types.UnmarshalRED(k.cdc, value) } // GetRedelegationsFromSrcValidator returns all redelegations from a particular // validator. -func (k Keeper) GetRedelegationsFromSrcValidator(ctx sdk.Context, valAddr sdk.ValAddress) (reds []types.Redelegation) { - store := ctx.KVStore(k.storeKey) - - iterator := storetypes.KVStorePrefixIterator(store, types.GetREDsFromValSrcIndexKey(valAddr)) +func (k Keeper) GetRedelegationsFromSrcValidator(ctx context.Context, valAddr sdk.ValAddress) (reds []types.Redelegation, err error) { + store := k.storeService.OpenKVStore(ctx) + prefix := types.GetREDsFromValSrcIndexKey(valAddr) + iterator, err := store.Iterator(prefix, storetypes.PrefixEndBytes(prefix)) + if err != nil { + return nil, err + } defer iterator.Close() for ; iterator.Valid(); iterator.Next() { key := types.GetREDKeyFromValSrcIndexKey(iterator.Key()) - value := store.Get(key) - red := types.MustUnmarshalRED(k.cdc, value) + value, err := store.Get(key) + if err != nil { + return nil, err + } + red, err := types.UnmarshalRED(k.cdc, value) + if err != nil { + return nil, err + } reds = append(reds, red) } - return reds + return reds, nil } // HasReceivingRedelegation checks if validator is receiving a redelegation. -func (k Keeper) HasReceivingRedelegation(ctx sdk.Context, delAddr sdk.AccAddress, valDstAddr sdk.ValAddress) bool { - store := ctx.KVStore(k.storeKey) +func (k Keeper) HasReceivingRedelegation(ctx context.Context, delAddr sdk.AccAddress, valDstAddr sdk.ValAddress) (bool, error) { + store := k.storeService.OpenKVStore(ctx) prefix := types.GetREDsByDelToValDstIndexKey(delAddr, valDstAddr) - - iterator := storetypes.KVStorePrefixIterator(store, prefix) + iterator, err := store.Iterator(prefix, storetypes.PrefixEndBytes(prefix)) + if err != nil { + return false, err + } defer iterator.Close() - - return iterator.Valid() + return iterator.Valid(), nil } -// HasMaxRedelegationEntries checks if redelegation has maximum number of entries. -func (k Keeper) HasMaxRedelegationEntries(ctx sdk.Context, delegatorAddr sdk.AccAddress, validatorSrcAddr, validatorDstAddr sdk.ValAddress) bool { - red, found := k.GetRedelegation(ctx, delegatorAddr, validatorSrcAddr, validatorDstAddr) - if !found { - return false +// HasMaxRedelegationEntries checks if the redelegation entries reached maximum limit. +func (k Keeper) HasMaxRedelegationEntries(ctx context.Context, delegatorAddr sdk.AccAddress, validatorSrcAddr, validatorDstAddr sdk.ValAddress) (bool, error) { + red, err := k.GetRedelegation(ctx, delegatorAddr, validatorSrcAddr, validatorDstAddr) + if err != nil { + if err == types.ErrNoRedelegation { + return false, nil + } + + return false, err + } + maxEntries, err := k.MaxEntries(ctx) + if err != nil { + return false, err } - return len(red.Entries) >= int(k.MaxEntries(ctx)) + return len(red.Entries) >= int(maxEntries), nil } -// SetRedelegation set a redelegation and associated index. -func (k Keeper) SetRedelegation(ctx sdk.Context, red types.Redelegation) { +// SetRedelegation sets a redelegation and associated index. +func (k Keeper) SetRedelegation(ctx context.Context, red types.Redelegation) error { delegatorAddress, err := k.authKeeper.AddressCodec().StringToBytes(red.DelegatorAddress) if err != nil { - panic(err) + return err } - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) bz := types.MustMarshalRED(k.cdc, red) - valSrcAddr, err := sdk.ValAddressFromBech32(red.ValidatorSrcAddress) + valSrcAddr, err := k.validatorAddressCodec.StringToBytes(red.ValidatorSrcAddress) if err != nil { - panic(err) + return err } - valDestAddr, err := sdk.ValAddressFromBech32(red.ValidatorDstAddress) + valDestAddr, err := k.validatorAddressCodec.StringToBytes(red.ValidatorDstAddress) if err != nil { - panic(err) + return err } key := types.GetREDKey(delegatorAddress, valSrcAddr, valDestAddr) - store.Set(key, bz) - store.Set(types.GetREDByValSrcIndexKey(delegatorAddress, valSrcAddr, valDestAddr), []byte{}) - store.Set(types.GetREDByValDstIndexKey(delegatorAddress, valSrcAddr, valDestAddr), []byte{}) + if err = store.Set(key, bz); err != nil { + return err + } + + if err = store.Set(types.GetREDByValSrcIndexKey(delegatorAddress, valSrcAddr, valDestAddr), []byte{}); err != nil { + return err + } + + return store.Set(types.GetREDByValDstIndexKey(delegatorAddress, valSrcAddr, valDestAddr), []byte{}) } // SetRedelegationEntry adds an entry to the unbonding delegation at the given // addresses. It creates the unbonding delegation if it does not exist. -func (k Keeper) SetRedelegationEntry(ctx sdk.Context, +func (k Keeper) SetRedelegationEntry(ctx context.Context, delegatorAddr sdk.AccAddress, validatorSrcAddr, validatorDstAddr sdk.ValAddress, creationHeight int64, minTime time.Time, balance math.Int, sharesSrc, sharesDst math.LegacyDec, -) types.Redelegation { - red, found := k.GetRedelegation(ctx, delegatorAddr, validatorSrcAddr, validatorDstAddr) - id := k.IncrementUnbondingID(ctx) - if found { +) (types.Redelegation, error) { + id, err := k.IncrementUnbondingID(ctx) + if err != nil { + return types.Redelegation{}, err + } + + red, err := k.GetRedelegation(ctx, delegatorAddr, validatorSrcAddr, validatorDstAddr) + if err == nil { red.AddEntry(creationHeight, minTime, balance, sharesDst, id) - } else { + } else if errors.Is(err, types.ErrNoRedelegation) { red = types.NewRedelegation(delegatorAddr, validatorSrcAddr, - validatorDstAddr, creationHeight, minTime, balance, sharesDst, id) + validatorDstAddr, creationHeight, minTime, balance, sharesDst, id, k.validatorAddressCodec, k.authKeeper.AddressCodec()) + } else { + return types.Redelegation{}, err } - k.SetRedelegation(ctx, red) + if err = k.SetRedelegation(ctx, red); err != nil { + return types.Redelegation{}, err + } // Add to the UBDByEntry index to look up the UBD by the UBDE ID - k.SetRedelegationByUnbondingID(ctx, red, id) + if err = k.SetRedelegationByUnbondingID(ctx, red, id); err != nil { + return types.Redelegation{}, err + } if err := k.Hooks().AfterUnbondingInitiated(ctx, id); err != nil { k.Logger(ctx).Error("failed to call after unbonding initiated hook", "error", err) + // TODO (Facu): Should we return here? We are ignoring this error } - return red + return red, nil } // IterateRedelegations iterates through all redelegations. -func (k Keeper) IterateRedelegations(ctx sdk.Context, fn func(index int64, red types.Redelegation) (stop bool)) { - store := ctx.KVStore(k.storeKey) - - iterator := storetypes.KVStorePrefixIterator(store, types.RedelegationKey) +func (k Keeper) IterateRedelegations(ctx context.Context, fn func(index int64, red types.Redelegation) (stop bool)) error { + store := k.storeService.OpenKVStore(ctx) + iterator, err := store.Iterator(types.RedelegationKey, storetypes.PrefixEndBytes(types.RedelegationKey)) + if err != nil { + return err + } defer iterator.Close() for i := int64(0); iterator.Valid(); iterator.Next() { - red := types.MustUnmarshalRED(k.cdc, iterator.Value()) + red, err := types.UnmarshalRED(k.cdc, iterator.Value()) + if err != nil { + return err + } if stop := fn(i, red); stop { break } i++ } + + return nil } // RemoveRedelegation removes a redelegation object and associated index. -func (k Keeper) RemoveRedelegation(ctx sdk.Context, red types.Redelegation) { +func (k Keeper) RemoveRedelegation(ctx context.Context, red types.Redelegation) error { delegatorAddress, err := k.authKeeper.AddressCodec().StringToBytes(red.DelegatorAddress) if err != nil { - panic(err) + return err } - store := ctx.KVStore(k.storeKey) - valSrcAddr, err := sdk.ValAddressFromBech32(red.ValidatorSrcAddress) + store := k.storeService.OpenKVStore(ctx) + valSrcAddr, err := k.validatorAddressCodec.StringToBytes(red.ValidatorSrcAddress) if err != nil { - panic(err) + return err } - valDestAddr, err := sdk.ValAddressFromBech32(red.ValidatorDstAddress) + valDestAddr, err := k.validatorAddressCodec.StringToBytes(red.ValidatorDstAddress) if err != nil { - panic(err) + return err } redKey := types.GetREDKey(delegatorAddress, valSrcAddr, valDestAddr) - store.Delete(redKey) - store.Delete(types.GetREDByValSrcIndexKey(delegatorAddress, valSrcAddr, valDestAddr)) - store.Delete(types.GetREDByValDstIndexKey(delegatorAddress, valSrcAddr, valDestAddr)) + if err = store.Delete(redKey); err != nil { + return err + } + + if err = store.Delete(types.GetREDByValSrcIndexKey(delegatorAddress, valSrcAddr, valDestAddr)); err != nil { + return err + } + + return store.Delete(types.GetREDByValDstIndexKey(delegatorAddress, valSrcAddr, valDestAddr)) } // redelegation queue timeslice operations @@ -595,31 +769,43 @@ func (k Keeper) RemoveRedelegation(ctx sdk.Context, red types.Redelegation) { // GetRedelegationQueueTimeSlice gets a specific redelegation queue timeslice. A // timeslice is a slice of DVVTriplets corresponding to redelegations that // expire at a certain time. -func (k Keeper) GetRedelegationQueueTimeSlice(ctx sdk.Context, timestamp time.Time) (dvvTriplets []types.DVVTriplet) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) GetRedelegationQueueTimeSlice(ctx context.Context, timestamp time.Time) (dvvTriplets []types.DVVTriplet, err error) { + store := k.storeService.OpenKVStore(ctx) + bz, err := store.Get(types.GetRedelegationTimeKey(timestamp)) + if err != nil { + return nil, err + } - bz := store.Get(types.GetRedelegationTimeKey(timestamp)) if bz == nil { - return []types.DVVTriplet{} + return []types.DVVTriplet{}, nil } triplets := types.DVVTriplets{} - k.cdc.MustUnmarshal(bz, &triplets) + err = k.cdc.Unmarshal(bz, &triplets) + if err != nil { + return nil, err + } - return triplets.Triplets + return triplets.Triplets, nil } // SetRedelegationQueueTimeSlice sets a specific redelegation queue timeslice. -func (k Keeper) SetRedelegationQueueTimeSlice(ctx sdk.Context, timestamp time.Time, keys []types.DVVTriplet) { - store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshal(&types.DVVTriplets{Triplets: keys}) - store.Set(types.GetRedelegationTimeKey(timestamp), bz) +func (k Keeper) SetRedelegationQueueTimeSlice(ctx context.Context, timestamp time.Time, keys []types.DVVTriplet) error { + store := k.storeService.OpenKVStore(ctx) + bz, err := k.cdc.Marshal(&types.DVVTriplets{Triplets: keys}) + if err != nil { + return err + } + return store.Set(types.GetRedelegationTimeKey(timestamp), bz) } // InsertRedelegationQueue insert an redelegation delegation to the appropriate // timeslice in the redelegation queue. -func (k Keeper) InsertRedelegationQueue(ctx sdk.Context, red types.Redelegation, completionTime time.Time) { - timeSlice := k.GetRedelegationQueueTimeSlice(ctx, completionTime) +func (k Keeper) InsertRedelegationQueue(ctx context.Context, red types.Redelegation, completionTime time.Time) error { + timeSlice, err := k.GetRedelegationQueueTimeSlice(ctx, completionTime) + if err != nil { + return err + } dvvTriplet := types.DVVTriplet{ DelegatorAddress: red.DelegatorAddress, ValidatorSrcAddress: red.ValidatorSrcAddress, @@ -627,47 +813,55 @@ func (k Keeper) InsertRedelegationQueue(ctx sdk.Context, red types.Redelegation, } if len(timeSlice) == 0 { - k.SetRedelegationQueueTimeSlice(ctx, completionTime, []types.DVVTriplet{dvvTriplet}) - } else { - timeSlice = append(timeSlice, dvvTriplet) - k.SetRedelegationQueueTimeSlice(ctx, completionTime, timeSlice) + return k.SetRedelegationQueueTimeSlice(ctx, completionTime, []types.DVVTriplet{dvvTriplet}) } + + timeSlice = append(timeSlice, dvvTriplet) + return k.SetRedelegationQueueTimeSlice(ctx, completionTime, timeSlice) } // RedelegationQueueIterator returns all the redelegation queue timeslices from // time 0 until endTime. -func (k Keeper) RedelegationQueueIterator(ctx sdk.Context, endTime time.Time) storetypes.Iterator { - store := ctx.KVStore(k.storeKey) +func (k Keeper) RedelegationQueueIterator(ctx context.Context, endTime time.Time) (storetypes.Iterator, error) { + store := k.storeService.OpenKVStore(ctx) return store.Iterator(types.RedelegationQueueKey, storetypes.InclusiveEndBytes(types.GetRedelegationTimeKey(endTime))) } // DequeueAllMatureRedelegationQueue returns a concatenated list of all the // timeslices inclusively previous to currTime, and deletes the timeslices from // the queue. -func (k Keeper) DequeueAllMatureRedelegationQueue(ctx sdk.Context, currTime time.Time) (matureRedelegations []types.DVVTriplet) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) DequeueAllMatureRedelegationQueue(ctx context.Context, currTime time.Time) (matureRedelegations []types.DVVTriplet, err error) { + store := k.storeService.OpenKVStore(ctx) // gets an iterator for all timeslices from time 0 until the current Blockheader time - redelegationTimesliceIterator := k.RedelegationQueueIterator(ctx, ctx.BlockHeader().Time) + sdkCtx := sdk.UnwrapSDKContext(ctx) + redelegationTimesliceIterator, err := k.RedelegationQueueIterator(ctx, sdkCtx.HeaderInfo().Time) + if err != nil { + return nil, err + } defer redelegationTimesliceIterator.Close() for ; redelegationTimesliceIterator.Valid(); redelegationTimesliceIterator.Next() { timeslice := types.DVVTriplets{} value := redelegationTimesliceIterator.Value() - k.cdc.MustUnmarshal(value, ×lice) + if err = k.cdc.Unmarshal(value, ×lice); err != nil { + return nil, err + } matureRedelegations = append(matureRedelegations, timeslice.Triplets...) - store.Delete(redelegationTimesliceIterator.Key()) + if err = store.Delete(redelegationTimesliceIterator.Key()); err != nil { + return nil, err + } } - return matureRedelegations + return matureRedelegations, nil } // Delegate performs a delegation, set/update everything necessary within the store. // tokenSrc indicates the bond status of the incoming funds. func (k Keeper) Delegate( - ctx sdk.Context, delAddr sdk.AccAddress, bondAmt math.Int, tokenSrc types.BondStatus, + ctx context.Context, delAddr sdk.AccAddress, bondAmt math.Int, tokenSrc types.BondStatus, validator types.Validator, subtractAccount bool, ) (newShares math.LegacyDec, err error) { // In some situations, the exchange rate becomes invalid, e.g. if @@ -677,26 +871,31 @@ func (k Keeper) Delegate( return math.LegacyZeroDec(), types.ErrDelegatorShareExRateInvalid } - // Get or create the delegation object - delegation, found := k.GetDelegation(ctx, delAddr, validator.GetOperator()) - if !found { - delegation = types.NewDelegation(delAddr, validator.GetOperator(), math.LegacyZeroDec()) + valbz, err := k.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) + if err != nil { + return math.LegacyZeroDec(), err } - // call the appropriate hook if present - if found { - err = k.Hooks().BeforeDelegationSharesModified(ctx, delAddr, validator.GetOperator()) - } else { - err = k.Hooks().BeforeDelegationCreated(ctx, delAddr, validator.GetOperator()) - } + // Get or create the delegation object and call the appropriate hook if present + delegation, err := k.GetDelegation(ctx, delAddr, valbz) + if err == nil { + // found + err = k.Hooks().BeforeDelegationSharesModified(ctx, delAddr, valbz) + } else if errors.Is(err, types.ErrNoDelegation) { + // not found + delAddrStr, err1 := k.authKeeper.AddressCodec().BytesToString(delAddr) + if err1 != nil { + return math.LegacyDec{}, err1 + } - if err != nil { + delegation = types.NewDelegation(delAddrStr, validator.GetOperator(), math.LegacyZeroDec()) + err = k.Hooks().BeforeDelegationCreated(ctx, delAddr, valbz) + } else { return math.LegacyZeroDec(), err } - delegatorAddress, err := k.authKeeper.AddressCodec().StringToBytes(delegation.DelegatorAddress) if err != nil { - panic(err) + return math.LegacyZeroDec(), err } // if subtractAccount is true then we are @@ -718,8 +917,13 @@ func (k Keeper) Delegate( panic("invalid validator status") } - coins := sdk.NewCoins(sdk.NewCoin(k.BondDenom(ctx), bondAmt)) - if err := k.bankKeeper.DelegateCoinsFromAccountToModule(ctx, delegatorAddress, sendName, coins); err != nil { + bondDenom, err := k.BondDenom(ctx) + if err != nil { + return math.LegacyDec{}, err + } + + coins := sdk.NewCoins(sdk.NewCoin(bondDenom, bondAmt)) + if err := k.bankKeeper.DelegateCoinsFromAccountToModule(ctx, delAddr, sendName, coins); err != nil { return math.LegacyDec{}, err } } else { @@ -731,23 +935,34 @@ func (k Keeper) Delegate( // do nothing case (tokenSrc == types.Unbonded || tokenSrc == types.Unbonding) && validator.IsBonded(): // transfer pools - k.notBondedTokensToBonded(ctx, bondAmt) + err = k.notBondedTokensToBonded(ctx, bondAmt) + if err != nil { + return math.LegacyDec{}, err + } case tokenSrc == types.Bonded && !validator.IsBonded(): // transfer pools - k.bondedTokensToNotBonded(ctx, bondAmt) + err = k.bondedTokensToNotBonded(ctx, bondAmt) + if err != nil { + return math.LegacyDec{}, err + } default: panic("unknown token source bond status") } } - _, newShares = k.AddValidatorTokensAndShares(ctx, validator, bondAmt) + _, newShares, err = k.AddValidatorTokensAndShares(ctx, validator, bondAmt) + if err != nil { + return newShares, err + } // Update delegation delegation.Shares = delegation.Shares.Add(newShares) - k.SetDelegation(ctx, delegation) + if err = k.SetDelegation(ctx, delegation); err != nil { + return newShares, err + } // Call the after-modification hook - if err := k.Hooks().AfterDelegationModified(ctx, delegatorAddress, delegation.GetValidatorAddr()); err != nil { + if err := k.Hooks().AfterDelegationModified(ctx, delAddr, valbz); err != nil { return newShares, err } @@ -756,12 +971,14 @@ func (k Keeper) Delegate( // Unbond unbonds a particular delegation and perform associated store operations. func (k Keeper) Unbond( - ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, shares math.LegacyDec, + ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, shares math.LegacyDec, ) (amount math.Int, err error) { // check if a delegation object exists in the store - delegation, found := k.GetDelegation(ctx, delAddr, valAddr) - if !found { + delegation, err := k.GetDelegation(ctx, delAddr, valAddr) + if errors.Is(err, types.ErrNoDelegation) { return amount, types.ErrNoDelegatorForAddress + } else if err != nil { + return amount, err } // call the before-delegation-modified hook @@ -775,9 +992,9 @@ func (k Keeper) Unbond( } // get validator - validator, found := k.GetValidator(ctx, valAddr) - if !found { - return amount, types.ErrNoValidatorFound + validator, err := k.GetValidator(ctx, valAddr) + if err != nil { + return amount, err } // subtract shares from delegation @@ -788,22 +1005,38 @@ func (k Keeper) Unbond( return amount, err } - isValidatorOperator := bytes.Equal(delegatorAddress, validator.GetOperator()) + valbz, err := k.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) + if err != nil { + return amount, err + } + + isValidatorOperator := bytes.Equal(delegatorAddress, valbz) // If the delegation is the operator of the validator and undelegating will decrease the validator's // self-delegation below their minimum, we jail the validator. if isValidatorOperator && !validator.Jailed && validator.TokensFromShares(delegation.Shares).TruncateInt().LT(validator.MinSelfDelegation) { - k.jailValidator(ctx, validator) - validator = k.mustGetValidator(ctx, validator.GetOperator()) + err = k.jailValidator(ctx, validator) + if err != nil { + return amount, err + } + validator = k.mustGetValidator(ctx, valbz) } if delegation.Shares.IsZero() { err = k.RemoveDelegation(ctx, delegation) } else { - k.SetDelegation(ctx, delegation) + if err = k.SetDelegation(ctx, delegation); err != nil { + return amount, err + } + + valAddr, err1 := k.validatorAddressCodec.StringToBytes(delegation.GetValidatorAddr()) + if err1 != nil { + return amount, err1 + } + // call the after delegation modification hook - err = k.Hooks().AfterDelegationModified(ctx, delegatorAddress, delegation.GetValidatorAddr()) + err = k.Hooks().AfterDelegationModified(ctx, delegatorAddress, valAddr) } if err != nil { @@ -812,10 +1045,16 @@ func (k Keeper) Unbond( // remove the shares and coins from the validator // NOTE that the amount is later (in keeper.Delegation) moved between staking module pools - validator, amount = k.RemoveValidatorTokensAndShares(ctx, validator, shares) + validator, amount, err = k.RemoveValidatorTokensAndShares(ctx, validator, shares) + if err != nil { + return amount, err + } + if validator.DelegatorShares.IsZero() && validator.IsUnbonded() { // if not unbonded, we must instead remove validator in EndBlocker once it finishes its unbonding period - k.RemoveValidator(ctx, validator.GetOperator()) + if err = k.RemoveValidator(ctx, valbz); err != nil { + return amount, err + } } return amount, nil @@ -825,24 +1064,32 @@ func (k Keeper) Unbond( // with a boolean signaling if the redelegation is complete based on the source // validator. func (k Keeper) getBeginInfo( - ctx sdk.Context, valSrcAddr sdk.ValAddress, -) (completionTime time.Time, height int64, completeNow bool) { - validator, found := k.GetValidator(ctx, valSrcAddr) + ctx context.Context, valSrcAddr sdk.ValAddress, +) (completionTime time.Time, height int64, completeNow bool, err error) { + validator, err := k.GetValidator(ctx, valSrcAddr) + if err != nil && errors.Is(err, types.ErrNoValidatorFound) { + return + } + sdkCtx := sdk.UnwrapSDKContext(ctx) + unbondingTime, err := k.UnbondingTime(ctx) + if err != nil { + return + } // TODO: When would the validator not be found? switch { - case !found || validator.IsBonded(): + case errors.Is(err, types.ErrNoValidatorFound) || validator.IsBonded(): // the longest wait - just unbonding period from now - completionTime = ctx.BlockHeader().Time.Add(k.UnbondingTime(ctx)) - height = ctx.BlockHeight() + completionTime = sdkCtx.BlockHeader().Time.Add(unbondingTime) + height = sdkCtx.BlockHeight() - return completionTime, height, false + return completionTime, height, false, nil case validator.IsUnbonded(): - return completionTime, height, true + return completionTime, height, true, nil case validator.IsUnbonding(): - return validator.UnbondingTime, validator.UnbondingHeight, false + return validator.UnbondingTime, validator.UnbondingHeight, false, nil default: panic(fmt.Sprintf("unknown validator status: %s", validator.Status)) @@ -855,14 +1102,19 @@ func (k Keeper) getBeginInfo( // an unbonding object and inserting it into the unbonding queue which will be // processed during the staking EndBlocker. func (k Keeper) Undelegate( - ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, sharesAmount math.LegacyDec, + ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, sharesAmount math.LegacyDec, ) (time.Time, math.Int, error) { - validator, found := k.GetValidator(ctx, valAddr) - if !found { - return time.Time{}, math.Int{}, types.ErrNoDelegatorForAddress + validator, err := k.GetValidator(ctx, valAddr) + if err != nil { + return time.Time{}, math.Int{}, err + } + + hasMaxEntries, err := k.HasMaxUnbondingDelegationEntries(ctx, delAddr, valAddr) + if err != nil { + return time.Time{}, math.Int{}, err } - if k.HasMaxUnbondingDelegationEntries(ctx, delAddr, valAddr) { + if hasMaxEntries { return time.Time{}, math.Int{}, types.ErrMaxUnbondingDelegationEntries } @@ -873,12 +1125,28 @@ func (k Keeper) Undelegate( // transfer the validator tokens to the not bonded pool if validator.IsBonded() { - k.bondedTokensToNotBonded(ctx, returnAmount) + err = k.bondedTokensToNotBonded(ctx, returnAmount) + if err != nil { + return time.Time{}, math.Int{}, err + } } - completionTime := ctx.BlockHeader().Time.Add(k.UnbondingTime(ctx)) - ubd := k.SetUnbondingDelegationEntry(ctx, delAddr, valAddr, ctx.BlockHeight(), completionTime, returnAmount) - k.InsertUBDQueue(ctx, ubd, completionTime) + unbondingTime, err := k.UnbondingTime(ctx) + if err != nil { + return time.Time{}, math.Int{}, err + } + + sdkCtx := sdk.UnwrapSDKContext(ctx) + completionTime := sdkCtx.BlockHeader().Time.Add(unbondingTime) + ubd, err := k.SetUnbondingDelegationEntry(ctx, delAddr, valAddr, sdkCtx.BlockHeight(), completionTime, returnAmount) + if err != nil { + return time.Time{}, math.Int{}, err + } + + err = k.InsertUBDQueue(ctx, ubd, completionTime) + if err != nil { + return time.Time{}, math.Int{}, err + } return completionTime, returnAmount, nil } @@ -886,15 +1154,20 @@ func (k Keeper) Undelegate( // CompleteUnbonding completes the unbonding of all mature entries in the // retrieved unbonding delegation object and returns the total unbonding balance // or an error upon failure. -func (k Keeper) CompleteUnbonding(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (sdk.Coins, error) { - ubd, found := k.GetUnbondingDelegation(ctx, delAddr, valAddr) - if !found { - return nil, types.ErrNoUnbondingDelegation +func (k Keeper) CompleteUnbonding(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (sdk.Coins, error) { + ubd, err := k.GetUnbondingDelegation(ctx, delAddr, valAddr) + if err != nil { + return nil, err + } + + bondDenom, err := k.BondDenom(ctx) + if err != nil { + return nil, err } - bondDenom := k.GetParams(ctx).BondDenom balances := sdk.NewCoins() - ctxTime := ctx.BlockHeader().Time + sdkCtx := sdk.UnwrapSDKContext(ctx) + ctxTime := sdkCtx.BlockHeader().Time delegatorAddress, err := k.authKeeper.AddressCodec().StringToBytes(ubd.DelegatorAddress) if err != nil { @@ -907,7 +1180,9 @@ func (k Keeper) CompleteUnbonding(ctx sdk.Context, delAddr sdk.AccAddress, valAd if entry.IsMature(ctxTime) && !entry.OnHold() { ubd.RemoveEntry(int64(i)) i-- - k.DeleteUnbondingIndex(ctx, entry.UnbondingId) + if err = k.DeleteUnbondingIndex(ctx, entry.UnbondingId); err != nil { + return nil, err + } // track undelegation only when remaining or truncated shares are non-zero if !entry.Balance.IsZero() { @@ -925,9 +1200,13 @@ func (k Keeper) CompleteUnbonding(ctx sdk.Context, delAddr sdk.AccAddress, valAd // set the unbonding delegation or remove it if there are no more entries if len(ubd.Entries) == 0 { - k.RemoveUnbondingDelegation(ctx, ubd) + err = k.RemoveUnbondingDelegation(ctx, ubd) } else { - k.SetUnbondingDelegation(ctx, ubd) + err = k.SetUnbondingDelegation(ctx, ubd) + } + + if err != nil { + return nil, err } return balances, nil @@ -936,28 +1215,42 @@ func (k Keeper) CompleteUnbonding(ctx sdk.Context, delAddr sdk.AccAddress, valAd // BeginRedelegation begins unbonding / redelegation and creates a redelegation // record. func (k Keeper) BeginRedelegation( - ctx sdk.Context, delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress, sharesAmount math.LegacyDec, + ctx context.Context, delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress, sharesAmount math.LegacyDec, ) (completionTime time.Time, err error) { if bytes.Equal(valSrcAddr, valDstAddr) { return time.Time{}, types.ErrSelfRedelegation } - dstValidator, found := k.GetValidator(ctx, valDstAddr) - if !found { + dstValidator, err := k.GetValidator(ctx, valDstAddr) + if errors.Is(err, types.ErrNoValidatorFound) { return time.Time{}, types.ErrBadRedelegationDst + } else if err != nil { + return time.Time{}, err } - srcValidator, found := k.GetValidator(ctx, valSrcAddr) - if !found { - return time.Time{}, types.ErrBadRedelegationDst + srcValidator, err := k.GetValidator(ctx, valSrcAddr) + if errors.Is(err, types.ErrNoValidatorFound) { + return time.Time{}, types.ErrBadRedelegationSrc + } else if err != nil { + return time.Time{}, err } // check if this is a transitive redelegation - if k.HasReceivingRedelegation(ctx, delAddr, valSrcAddr) { + hasRecRedel, err := k.HasReceivingRedelegation(ctx, delAddr, valSrcAddr) + if err != nil { + return time.Time{}, err + } + + if hasRecRedel { return time.Time{}, types.ErrTransitiveRedelegation } - if k.HasMaxRedelegationEntries(ctx, delAddr, valSrcAddr, valDstAddr) { + hasMaxRedels, err := k.HasMaxRedelegationEntries(ctx, delAddr, valSrcAddr, valDstAddr) + if err != nil { + return time.Time{}, err + } + + if hasMaxRedels { return time.Time{}, types.ErrMaxRedelegationEntries } @@ -976,17 +1269,27 @@ func (k Keeper) BeginRedelegation( } // create the unbonding delegation - completionTime, height, completeNow := k.getBeginInfo(ctx, valSrcAddr) + completionTime, height, completeNow, err := k.getBeginInfo(ctx, valSrcAddr) + if err != nil { + return time.Time{}, err + } if completeNow { // no need to create the redelegation object return completionTime, nil } - red := k.SetRedelegationEntry( + red, err := k.SetRedelegationEntry( ctx, delAddr, valSrcAddr, valDstAddr, height, completionTime, returnAmount, sharesAmount, sharesCreated, ) - k.InsertRedelegationQueue(ctx, red, completionTime) + if err != nil { + return time.Time{}, err + } + + err = k.InsertRedelegationQueue(ctx, red, completionTime) + if err != nil { + return time.Time{}, err + } return completionTime, nil } @@ -995,16 +1298,21 @@ func (k Keeper) BeginRedelegation( // retrieved redelegation object and returns the total redelegation (initial) // balance or an error upon failure. func (k Keeper) CompleteRedelegation( - ctx sdk.Context, delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress, + ctx context.Context, delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress, ) (sdk.Coins, error) { - red, found := k.GetRedelegation(ctx, delAddr, valSrcAddr, valDstAddr) - if !found { - return nil, types.ErrNoRedelegation + red, err := k.GetRedelegation(ctx, delAddr, valSrcAddr, valDstAddr) + if err != nil { + return nil, err + } + + bondDenom, err := k.BondDenom(ctx) + if err != nil { + return nil, err } - bondDenom := k.GetParams(ctx).BondDenom balances := sdk.NewCoins() - ctxTime := ctx.BlockHeader().Time + sdkCtx := sdk.UnwrapSDKContext(ctx) + ctxTime := sdkCtx.BlockHeader().Time // loop through all the entries and complete mature redelegation entries for i := 0; i < len(red.Entries); i++ { @@ -1012,7 +1320,9 @@ func (k Keeper) CompleteRedelegation( if entry.IsMature(ctxTime) && !entry.OnHold() { red.RemoveEntry(int64(i)) i-- - k.DeleteUnbondingIndex(ctx, entry.UnbondingId) + if err = k.DeleteUnbondingIndex(ctx, entry.UnbondingId); err != nil { + return nil, err + } if !entry.InitialBalance.IsZero() { balances = balances.Add(sdk.NewCoin(bondDenom, entry.InitialBalance)) @@ -1022,28 +1332,32 @@ func (k Keeper) CompleteRedelegation( // set the redelegation or remove it if there are no more entries if len(red.Entries) == 0 { - k.RemoveRedelegation(ctx, red) + err = k.RemoveRedelegation(ctx, red) } else { - k.SetRedelegation(ctx, red) + err = k.SetRedelegation(ctx, red) + } + + if err != nil { + return nil, err } return balances, nil } // ValidateUnbondAmount validates that a given unbond or redelegation amount is -// valied based on upon the converted shares. If the amount is valid, the total +// valid based on upon the converted shares. If the amount is valid, the total // amount of respective shares is returned, otherwise an error is returned. func (k Keeper) ValidateUnbondAmount( - ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, amt math.Int, + ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, amt math.Int, ) (shares math.LegacyDec, err error) { - validator, found := k.GetValidator(ctx, valAddr) - if !found { - return shares, types.ErrNoValidatorFound + validator, err := k.GetValidator(ctx, valAddr) + if err != nil { + return shares, err } - del, found := k.GetDelegation(ctx, delAddr, valAddr) - if !found { - return shares, types.ErrNoDelegation + del, err := k.GetDelegation(ctx, delAddr, valAddr) + if err != nil { + return shares, err } shares, err = validator.SharesFromTokens(amt) diff --git a/x/staking/keeper/delegation_test.go b/x/staking/keeper/delegation_test.go index 53433fd95015..1404b18cd5d0 100644 --- a/x/staking/keeper/delegation_test.go +++ b/x/staking/keeper/delegation_test.go @@ -3,9 +3,10 @@ package keeper_test import ( "time" - "cosmossdk.io/math" "github.com/golang/mock/gomock" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/codec/address" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" @@ -41,53 +42,58 @@ func (s *KeeperTestSuite) TestDelegation() { } // first add a validators[0] to delegate too - bond1to1 := stakingtypes.NewDelegation(addrDels[0], valAddrs[0], math.LegacyNewDec(9)) + bond1to1 := stakingtypes.NewDelegation(addrDels[0].String(), valAddrs[0].String(), math.LegacyNewDec(9)) // check the empty keeper first - _, found := keeper.GetDelegation(ctx, addrDels[0], valAddrs[0]) - require.False(found) + _, err := keeper.GetDelegation(ctx, addrDels[0], valAddrs[0]) + require.ErrorIs(err, stakingtypes.ErrNoDelegation) // set and retrieve a record - keeper.SetDelegation(ctx, bond1to1) - resBond, found := keeper.GetDelegation(ctx, addrDels[0], valAddrs[0]) - require.True(found) + require.NoError(keeper.SetDelegation(ctx, bond1to1)) + resBond, err := keeper.GetDelegation(ctx, addrDels[0], valAddrs[0]) + require.NoError(err) require.Equal(bond1to1, resBond) // modify a records, save, and retrieve bond1to1.Shares = math.LegacyNewDec(99) - keeper.SetDelegation(ctx, bond1to1) - resBond, found = keeper.GetDelegation(ctx, addrDels[0], valAddrs[0]) - require.True(found) + require.NoError(keeper.SetDelegation(ctx, bond1to1)) + resBond, err = keeper.GetDelegation(ctx, addrDels[0], valAddrs[0]) + require.NoError(err) require.Equal(bond1to1, resBond) // add some more records - bond1to2 := stakingtypes.NewDelegation(addrDels[0], valAddrs[1], math.LegacyNewDec(9)) - bond1to3 := stakingtypes.NewDelegation(addrDels[0], valAddrs[2], math.LegacyNewDec(9)) - bond2to1 := stakingtypes.NewDelegation(addrDels[1], valAddrs[0], math.LegacyNewDec(9)) - bond2to2 := stakingtypes.NewDelegation(addrDels[1], valAddrs[1], math.LegacyNewDec(9)) - bond2to3 := stakingtypes.NewDelegation(addrDels[1], valAddrs[2], math.LegacyNewDec(9)) - keeper.SetDelegation(ctx, bond1to2) - keeper.SetDelegation(ctx, bond1to3) - keeper.SetDelegation(ctx, bond2to1) - keeper.SetDelegation(ctx, bond2to2) - keeper.SetDelegation(ctx, bond2to3) + bond1to2 := stakingtypes.NewDelegation(addrDels[0].String(), valAddrs[1].String(), math.LegacyNewDec(9)) + bond1to3 := stakingtypes.NewDelegation(addrDels[0].String(), valAddrs[2].String(), math.LegacyNewDec(9)) + bond2to1 := stakingtypes.NewDelegation(addrDels[1].String(), valAddrs[0].String(), math.LegacyNewDec(9)) + bond2to2 := stakingtypes.NewDelegation(addrDels[1].String(), valAddrs[1].String(), math.LegacyNewDec(9)) + bond2to3 := stakingtypes.NewDelegation(addrDels[1].String(), valAddrs[2].String(), math.LegacyNewDec(9)) + require.NoError(keeper.SetDelegation(ctx, bond1to2)) + require.NoError(keeper.SetDelegation(ctx, bond1to3)) + require.NoError(keeper.SetDelegation(ctx, bond2to1)) + require.NoError(keeper.SetDelegation(ctx, bond2to2)) + require.NoError(keeper.SetDelegation(ctx, bond2to3)) // test all bond retrieve capabilities - resBonds := keeper.GetDelegatorDelegations(ctx, addrDels[0], 5) + resBonds, err := keeper.GetDelegatorDelegations(ctx, addrDels[0], 5) + require.NoError(err) require.Equal(3, len(resBonds)) require.Equal(bond1to1, resBonds[0]) require.Equal(bond1to2, resBonds[1]) require.Equal(bond1to3, resBonds[2]) - resBonds = keeper.GetAllDelegatorDelegations(ctx, addrDels[0]) + resBonds, err = keeper.GetAllDelegatorDelegations(ctx, addrDels[0]) + require.NoError(err) require.Equal(3, len(resBonds)) - resBonds = keeper.GetDelegatorDelegations(ctx, addrDels[0], 2) + resBonds, err = keeper.GetDelegatorDelegations(ctx, addrDels[0], 2) + require.NoError(err) require.Equal(2, len(resBonds)) - resBonds = keeper.GetDelegatorDelegations(ctx, addrDels[1], 5) + resBonds, err = keeper.GetDelegatorDelegations(ctx, addrDels[1], 5) + require.NoError(err) require.Equal(3, len(resBonds)) require.Equal(bond2to1, resBonds[0]) require.Equal(bond2to2, resBonds[1]) require.Equal(bond2to3, resBonds[2]) - allBonds := keeper.GetAllDelegations(ctx) + allBonds, err := keeper.GetAllDelegations(ctx) + require.NoError(err) require.Equal(6, len(allBonds)) require.Equal(bond1to1, allBonds[0]) require.Equal(bond1to2, allBonds[1]) @@ -96,49 +102,56 @@ func (s *KeeperTestSuite) TestDelegation() { require.Equal(bond2to2, allBonds[4]) require.Equal(bond2to3, allBonds[5]) - resVals := keeper.GetDelegatorValidators(ctx, addrDels[0], 3) - require.Equal(3, len(resVals)) - resVals = keeper.GetDelegatorValidators(ctx, addrDels[1], 4) - require.Equal(3, len(resVals)) + resVals, err := keeper.GetDelegatorValidators(ctx, addrDels[0], 3) + require.NoError(err) + require.Equal(3, len(resVals.Validators)) + resVals, err = keeper.GetDelegatorValidators(ctx, addrDels[1], 4) + require.NoError(err) + require.Equal(3, len(resVals.Validators)) for i := 0; i < 3; i++ { resVal, err := keeper.GetDelegatorValidator(ctx, addrDels[0], valAddrs[i]) require.Nil(err) - require.Equal(valAddrs[i], resVal.GetOperator()) + require.Equal(valAddrs[i].String(), resVal.GetOperator()) resVal, err = keeper.GetDelegatorValidator(ctx, addrDels[1], valAddrs[i]) require.Nil(err) - require.Equal(valAddrs[i], resVal.GetOperator()) + require.Equal(valAddrs[i].String(), resVal.GetOperator()) - resDels := keeper.GetValidatorDelegations(ctx, valAddrs[i]) + resDels, err := keeper.GetValidatorDelegations(ctx, valAddrs[i]) + require.NoError(err) require.Len(resDels, 2) } // test total bonded for single delegator expBonded := bond1to1.Shares.Add(bond2to1.Shares).Add(bond1to3.Shares) - resDelBond := keeper.GetDelegatorBonded(ctx, addrDels[0]) + resDelBond, err := keeper.GetDelegatorBonded(ctx, addrDels[0]) + require.NoError(err) require.Equal(expBonded, math.LegacyNewDecFromInt(resDelBond)) // delete a record - keeper.RemoveDelegation(ctx, bond2to3) - _, found = keeper.GetDelegation(ctx, addrDels[1], valAddrs[2]) - require.False(found) - resBonds = keeper.GetDelegatorDelegations(ctx, addrDels[1], 5) + require.NoError(keeper.RemoveDelegation(ctx, bond2to3)) + _, err = keeper.GetDelegation(ctx, addrDels[1], valAddrs[2]) + require.ErrorIs(err, stakingtypes.ErrNoDelegation) + resBonds, err = keeper.GetDelegatorDelegations(ctx, addrDels[1], 5) + require.NoError(err) require.Equal(2, len(resBonds)) require.Equal(bond2to1, resBonds[0]) require.Equal(bond2to2, resBonds[1]) - resBonds = keeper.GetAllDelegatorDelegations(ctx, addrDels[1]) + resBonds, err = keeper.GetAllDelegatorDelegations(ctx, addrDels[1]) + require.NoError(err) require.Equal(2, len(resBonds)) // delete all the records from delegator 2 - keeper.RemoveDelegation(ctx, bond2to1) - keeper.RemoveDelegation(ctx, bond2to2) - _, found = keeper.GetDelegation(ctx, addrDels[1], valAddrs[0]) - require.False(found) - _, found = keeper.GetDelegation(ctx, addrDels[1], valAddrs[1]) - require.False(found) - resBonds = keeper.GetDelegatorDelegations(ctx, addrDels[1], 5) + require.NoError(keeper.RemoveDelegation(ctx, bond2to1)) + require.NoError(keeper.RemoveDelegation(ctx, bond2to2)) + _, err = keeper.GetDelegation(ctx, addrDels[1], valAddrs[0]) + require.ErrorIs(err, stakingtypes.ErrNoDelegation) + _, err = keeper.GetDelegation(ctx, addrDels[1], valAddrs[1]) + require.ErrorIs(err, stakingtypes.ErrNoDelegation) + resBonds, err = keeper.GetDelegatorDelegations(ctx, addrDels[1], 5) + require.NoError(err) require.Equal(0, len(resBonds)) } @@ -154,7 +167,7 @@ func (s *KeeperTestSuite) TestDelegationsByValIndex() { s.accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec("cosmos")).AnyTimes() // construct the validators - amts := []math.Int{sdk.NewInt(9), sdk.NewInt(8), sdk.NewInt(7)} + amts := []math.Int{math.NewInt(9), math.NewInt(8), math.NewInt(7)} var validators [3]stakingtypes.Validator for i, amt := range amts { validators[i] = testutil.NewValidator(s.T(), valAddrs[i], PKs[i]) @@ -166,55 +179,61 @@ func (s *KeeperTestSuite) TestDelegationsByValIndex() { // delegate 2 tokens // // total delegations after delegating: del1 -> 2stake - _, err := s.msgServer.Delegate(ctx, stakingtypes.NewMsgDelegate(addrDels[0], valAddrs[0], sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(2)))) + _, err := s.msgServer.Delegate(ctx, stakingtypes.NewMsgDelegate(addrDels[0].String(), valAddrs[0].String(), sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(2)))) require.NoError(err) - dels := s.stakingKeeper.GetValidatorDelegations(ctx, valAddrs[0]) + dels, err := s.stakingKeeper.GetValidatorDelegations(ctx, valAddrs[0]) + require.NoError(err) require.Len(dels, 1) // delegate 4 tokens // // total delegations after delegating: del1 -> 2stake, del2 -> 4stake - _, err = s.msgServer.Delegate(ctx, stakingtypes.NewMsgDelegate(addrDels[1], valAddrs[0], sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(4)))) + _, err = s.msgServer.Delegate(ctx, stakingtypes.NewMsgDelegate(addrDels[1].String(), valAddrs[0].String(), sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(4)))) require.NoError(err) - dels = s.stakingKeeper.GetValidatorDelegations(ctx, valAddrs[0]) + dels, err = s.stakingKeeper.GetValidatorDelegations(ctx, valAddrs[0]) + require.NoError(err) require.Len(dels, 2) // undelegate 1 token from del1 // // total delegations after undelegating: del1 -> 1stake, del2 -> 4stake - _, err = s.msgServer.Undelegate(ctx, stakingtypes.NewMsgUndelegate(addrDels[0], valAddrs[0], sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(1)))) + _, err = s.msgServer.Undelegate(ctx, stakingtypes.NewMsgUndelegate(addrDels[0].String(), valAddrs[0].String(), sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(1)))) require.NoError(err) - dels = s.stakingKeeper.GetValidatorDelegations(ctx, valAddrs[0]) + dels, err = s.stakingKeeper.GetValidatorDelegations(ctx, valAddrs[0]) + require.NoError(err) require.Len(dels, 2) // undelegate 1 token from del1 // // total delegations after undelegating: del2 -> 4stake - _, err = s.msgServer.Undelegate(ctx, stakingtypes.NewMsgUndelegate(addrDels[0], valAddrs[0], sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(1)))) + _, err = s.msgServer.Undelegate(ctx, stakingtypes.NewMsgUndelegate(addrDels[0].String(), valAddrs[0].String(), sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(1)))) require.NoError(err) - dels = s.stakingKeeper.GetValidatorDelegations(ctx, valAddrs[0]) + dels, err = s.stakingKeeper.GetValidatorDelegations(ctx, valAddrs[0]) + require.NoError(err) require.Len(dels, 1) // undelegate 2 tokens from del2 // // total delegations after undelegating: del2 -> 2stake - _, err = s.msgServer.Undelegate(ctx, stakingtypes.NewMsgUndelegate(addrDels[1], valAddrs[0], sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(2)))) + _, err = s.msgServer.Undelegate(ctx, stakingtypes.NewMsgUndelegate(addrDels[1].String(), valAddrs[0].String(), sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(2)))) require.NoError(err) - dels = s.stakingKeeper.GetValidatorDelegations(ctx, valAddrs[0]) + dels, err = s.stakingKeeper.GetValidatorDelegations(ctx, valAddrs[0]) + require.NoError(err) require.Len(dels, 1) // undelegate 2 tokens from del2 // // total delegations after undelegating: [] - _, err = s.msgServer.Undelegate(ctx, stakingtypes.NewMsgUndelegate(addrDels[1], valAddrs[0], sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(2)))) + _, err = s.msgServer.Undelegate(ctx, stakingtypes.NewMsgUndelegate(addrDels[1].String(), valAddrs[0].String(), sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(2)))) require.NoError(err) - dels = s.stakingKeeper.GetValidatorDelegations(ctx, valAddrs[0]) + dels, err = s.stakingKeeper.GetValidatorDelegations(ctx, valAddrs[0]) + require.NoError(err) require.Len(dels, 0) } @@ -234,41 +253,47 @@ func (s *KeeperTestSuite) TestUnbondingDelegation() { time.Unix(0, 0).UTC(), math.NewInt(5), 0, + address.NewBech32Codec("cosmosvaloper"), address.NewBech32Codec("cosmos"), ) // set and retrieve a record - keeper.SetUnbondingDelegation(ctx, ubd) - resUnbond, found := keeper.GetUnbondingDelegation(ctx, delAddrs[0], valAddrs[0]) - require.True(found) + require.NoError(keeper.SetUnbondingDelegation(ctx, ubd)) + resUnbond, err := keeper.GetUnbondingDelegation(ctx, delAddrs[0], valAddrs[0]) + require.NoError(err) require.Equal(ubd, resUnbond) // modify a records, save, and retrieve expUnbond := math.NewInt(21) ubd.Entries[0].Balance = expUnbond - keeper.SetUnbondingDelegation(ctx, ubd) + require.NoError(keeper.SetUnbondingDelegation(ctx, ubd)) - resUnbonds := keeper.GetUnbondingDelegations(ctx, delAddrs[0], 5) + resUnbonds, err := keeper.GetUnbondingDelegations(ctx, delAddrs[0], 5) + require.NoError(err) require.Equal(1, len(resUnbonds)) - resUnbonds = keeper.GetAllUnbondingDelegations(ctx, delAddrs[0]) + resUnbonds, err = keeper.GetAllUnbondingDelegations(ctx, delAddrs[0]) + require.NoError(err) require.Equal(1, len(resUnbonds)) - resUnbond, found = keeper.GetUnbondingDelegation(ctx, delAddrs[0], valAddrs[0]) - require.True(found) + resUnbond, err = keeper.GetUnbondingDelegation(ctx, delAddrs[0], valAddrs[0]) + require.NoError(err) require.Equal(ubd, resUnbond) - resDelUnbond := keeper.GetDelegatorUnbonding(ctx, delAddrs[0]) + resDelUnbond, err := keeper.GetDelegatorUnbonding(ctx, delAddrs[0]) + require.NoError(err) require.Equal(expUnbond, resDelUnbond) // delete a record - keeper.RemoveUnbondingDelegation(ctx, ubd) - _, found = keeper.GetUnbondingDelegation(ctx, delAddrs[0], valAddrs[0]) - require.False(found) + require.NoError(keeper.RemoveUnbondingDelegation(ctx, ubd)) + _, err = keeper.GetUnbondingDelegation(ctx, delAddrs[0], valAddrs[0]) + require.ErrorIs(err, stakingtypes.ErrNoUnbondingDelegation) - resUnbonds = keeper.GetUnbondingDelegations(ctx, delAddrs[0], 5) + resUnbonds, err = keeper.GetUnbondingDelegations(ctx, delAddrs[0], 5) + require.NoError(err) require.Equal(0, len(resUnbonds)) - resUnbonds = keeper.GetAllUnbondingDelegations(ctx, delAddrs[0]) + resUnbonds, err = keeper.GetAllUnbondingDelegations(ctx, delAddrs[0]) + require.NoError(err) require.Equal(0, len(resUnbonds)) } @@ -283,49 +308,57 @@ func (s *KeeperTestSuite) TestUnbondingDelegationsFromValidator() { valAddrs[0], 0, time.Unix(0, 0).UTC(), - sdk.NewInt(5), + math.NewInt(5), 0, + address.NewBech32Codec("cosmosvaloper"), address.NewBech32Codec("cosmos"), ) // set and retrieve a record - keeper.SetUnbondingDelegation(ctx, ubd) - resUnbond, found := keeper.GetUnbondingDelegation(ctx, delAddrs[0], valAddrs[0]) - require.True(found) + require.NoError(keeper.SetUnbondingDelegation(ctx, ubd)) + resUnbond, err := keeper.GetUnbondingDelegation(ctx, delAddrs[0], valAddrs[0]) + require.NoError(err) require.Equal(ubd, resUnbond) // modify a records, save, and retrieve - expUnbond := sdk.NewInt(21) + expUnbond := math.NewInt(21) ubd.Entries[0].Balance = expUnbond - keeper.SetUnbondingDelegation(ctx, ubd) + require.NoError(keeper.SetUnbondingDelegation(ctx, ubd)) - resUnbonds := keeper.GetUnbondingDelegations(ctx, delAddrs[0], 5) + resUnbonds, err := keeper.GetUnbondingDelegations(ctx, delAddrs[0], 5) + require.NoError(err) require.Equal(1, len(resUnbonds)) - resUnbonds = keeper.GetAllUnbondingDelegations(ctx, delAddrs[0]) + resUnbonds, err = keeper.GetAllUnbondingDelegations(ctx, delAddrs[0]) + require.NoError(err) require.Equal(1, len(resUnbonds)) - resUnbonds = keeper.GetUnbondingDelegationsFromValidator(ctx, valAddrs[0]) + resUnbonds, err = keeper.GetUnbondingDelegationsFromValidator(ctx, valAddrs[0]) + require.NoError(err) require.Equal(1, len(resUnbonds)) - resUnbond, found = keeper.GetUnbondingDelegation(ctx, delAddrs[0], valAddrs[0]) - require.True(found) + resUnbond, err = keeper.GetUnbondingDelegation(ctx, delAddrs[0], valAddrs[0]) + require.NoError(err) require.Equal(ubd, resUnbond) - resDelUnbond := keeper.GetDelegatorUnbonding(ctx, delAddrs[0]) + resDelUnbond, err := keeper.GetDelegatorUnbonding(ctx, delAddrs[0]) + require.NoError(err) require.Equal(expUnbond, resDelUnbond) // delete a record - keeper.RemoveUnbondingDelegation(ctx, ubd) - _, found = keeper.GetUnbondingDelegation(ctx, delAddrs[0], valAddrs[0]) - require.False(found) + require.NoError(keeper.RemoveUnbondingDelegation(ctx, ubd)) + _, err = keeper.GetUnbondingDelegation(ctx, delAddrs[0], valAddrs[0]) + require.ErrorIs(err, stakingtypes.ErrNoUnbondingDelegation) - resUnbonds = keeper.GetUnbondingDelegations(ctx, delAddrs[0], 5) + resUnbonds, err = keeper.GetUnbondingDelegations(ctx, delAddrs[0], 5) + require.NoError(err) require.Equal(0, len(resUnbonds)) - resUnbonds = keeper.GetAllUnbondingDelegations(ctx, delAddrs[0]) + resUnbonds, err = keeper.GetAllUnbondingDelegations(ctx, delAddrs[0]) + require.NoError(err) require.Equal(0, len(resUnbonds)) - resUnbonds = keeper.GetUnbondingDelegationsFromValidator(ctx, valAddrs[0]) + resUnbonds, err = keeper.GetUnbondingDelegationsFromValidator(ctx, valAddrs[0]) + require.NoError(err) require.Equal(0, len(resUnbonds)) } @@ -344,18 +377,18 @@ func (s *KeeperTestSuite) TestUnbondDelegation() { s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(gomock.Any(), stakingtypes.NotBondedPoolName, stakingtypes.BondedPoolName, gomock.Any()) _ = stakingkeeper.TestingUpdateValidator(keeper, ctx, validator, true) - delegation := stakingtypes.NewDelegation(delAddrs[0], valAddrs[0], issuedShares) - keeper.SetDelegation(ctx, delegation) + delegation := stakingtypes.NewDelegation(delAddrs[0].String(), valAddrs[0].String(), issuedShares) + require.NoError(keeper.SetDelegation(ctx, delegation)) bondTokens := keeper.TokensFromConsensusPower(ctx, 6) amount, err := keeper.Unbond(ctx, delAddrs[0], valAddrs[0], math.LegacyNewDecFromInt(bondTokens)) require.NoError(err) require.Equal(bondTokens, amount) // shares to be added to an unbonding delegation - delegation, found := keeper.GetDelegation(ctx, delAddrs[0], valAddrs[0]) - require.True(found) - validator, found = keeper.GetValidator(ctx, valAddrs[0]) - require.True(found) + delegation, err = keeper.GetDelegation(ctx, delAddrs[0], valAddrs[0]) + require.NoError(err) + validator, err = keeper.GetValidator(ctx, valAddrs[0]) + require.NoError(err) remainingTokens := startTokens.Sub(bondTokens) @@ -381,21 +414,21 @@ func (s *KeeperTestSuite) TestUndelegateSelfDelegationBelowMinSelfDelegation() { s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(gomock.Any(), stakingtypes.NotBondedPoolName, stakingtypes.BondedPoolName, gomock.Any()) validator = stakingkeeper.TestingUpdateValidator(keeper, ctx, validator, true) - keeper.SetValidatorByConsAddr(ctx, validator) + require.NoError(keeper.SetValidatorByConsAddr(ctx, validator)) require.True(validator.IsBonded()) - selfDelegation := stakingtypes.NewDelegation(sdk.AccAddress(addrVals[0].Bytes()), addrVals[0], issuedShares) - keeper.SetDelegation(ctx, selfDelegation) + selfDelegation := stakingtypes.NewDelegation(sdk.AccAddress(addrVals[0].Bytes()).String(), addrVals[0].String(), issuedShares) + require.NoError(keeper.SetDelegation(ctx, selfDelegation)) // create a second delegation to this validator - keeper.DeleteValidatorByPowerIndex(ctx, validator) + require.NoError(keeper.DeleteValidatorByPowerIndex(ctx, validator)) validator, issuedShares = validator.AddTokensFromDel(delTokens) require.True(validator.IsBonded()) require.Equal(delTokens, issuedShares.RoundInt()) validator = stakingkeeper.TestingUpdateValidator(keeper, ctx, validator, true) - delegation := stakingtypes.NewDelegation(addrDels[0], addrVals[0], issuedShares) - keeper.SetDelegation(ctx, delegation) + delegation := stakingtypes.NewDelegation(addrDels[0].String(), addrVals[0].String(), issuedShares) + require.NoError(keeper.SetDelegation(ctx, delegation)) val0AccAddr := sdk.AccAddress(addrVals[0].Bytes()) s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(gomock.Any(), stakingtypes.BondedPoolName, stakingtypes.NotBondedPoolName, gomock.Any()) @@ -406,8 +439,8 @@ func (s *KeeperTestSuite) TestUndelegateSelfDelegationBelowMinSelfDelegation() { s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(gomock.Any(), stakingtypes.BondedPoolName, stakingtypes.NotBondedPoolName, gomock.Any()) s.applyValidatorSetUpdates(ctx, keeper, 1) - validator, found := keeper.GetValidator(ctx, addrVals[0]) - require.True(found) + validator, err = keeper.GetValidator(ctx, addrVals[0]) + require.NoError(err) require.Equal(keeper.TokensFromConsensusPower(ctx, 14), validator.Tokens) require.Equal(stakingtypes.Unbonding, validator.Status) require.True(validator.Jailed) @@ -422,7 +455,7 @@ func (s *KeeperTestSuite) TestUndelegateFromUnbondingValidator() { // create a validator with a self-delegation validator := testutil.NewValidator(s.T(), addrVals[0], PKs[0]) - keeper.SetValidatorByConsAddr(ctx, validator) + require.NoError(keeper.SetValidatorByConsAddr(ctx, validator)) validator, issuedShares := validator.AddTokensFromDel(delTokens) require.Equal(delTokens, issuedShares.RoundInt()) @@ -431,18 +464,18 @@ func (s *KeeperTestSuite) TestUndelegateFromUnbondingValidator() { validator = stakingkeeper.TestingUpdateValidator(keeper, ctx, validator, true) require.True(validator.IsBonded()) - selfDelegation := stakingtypes.NewDelegation(addrVals[0].Bytes(), addrVals[0], issuedShares) - keeper.SetDelegation(ctx, selfDelegation) + selfDelegation := stakingtypes.NewDelegation(addrDels[0].String(), addrVals[0].String(), issuedShares) + require.NoError(keeper.SetDelegation(ctx, selfDelegation)) // create a second delegation to this validator - keeper.DeleteValidatorByPowerIndex(ctx, validator) + require.NoError(keeper.DeleteValidatorByPowerIndex(ctx, validator)) validator, issuedShares = validator.AddTokensFromDel(delTokens) require.Equal(delTokens, issuedShares.RoundInt()) stakingkeeper.TestingUpdateValidator(keeper, ctx, validator, true) - delegation := stakingtypes.NewDelegation(addrDels[1], addrVals[0], issuedShares) - keeper.SetDelegation(ctx, delegation) + delegation := stakingtypes.NewDelegation(addrDels[1].String(), addrVals[0].String(), issuedShares) + require.NoError(keeper.SetDelegation(ctx, delegation)) header := ctx.BlockHeader() blockHeight := int64(10) @@ -462,10 +495,11 @@ func (s *KeeperTestSuite) TestUndelegateFromUnbondingValidator() { s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(gomock.Any(), stakingtypes.BondedPoolName, stakingtypes.NotBondedPoolName, gomock.Any()) s.applyValidatorSetUpdates(ctx, keeper, 1) - validator, found := keeper.GetValidator(ctx, addrVals[0]) - require.True(found) + validator, err = keeper.GetValidator(ctx, addrVals[0]) + require.NoError(err) require.Equal(blockHeight, validator.UnbondingHeight) - params := keeper.GetParams(ctx) + params, err := keeper.GetParams(ctx) + require.NoError(err) require.True(blockTime.Add(params.UnbondingTime).Equal(validator.UnbondingTime)) blockHeight2 := int64(20) @@ -480,8 +514,8 @@ func (s *KeeperTestSuite) TestUndelegateFromUnbondingValidator() { require.Equal(math.LegacyNewDecFromInt(undelegatedAmount), undelegateAmount) // retrieve the unbonding delegation - ubd, found := keeper.GetUnbondingDelegation(ctx, addrDels[1], addrVals[0]) - require.True(found) + ubd, err := keeper.GetUnbondingDelegation(ctx, addrDels[1], addrVals[0]) + require.NoError(err) require.Len(ubd.Entries, 1) require.True(ubd.Entries[0].Balance.Equal(math.NewInt(6))) require.Equal(blockHeight2, ubd.Entries[0].CreationHeight) @@ -497,7 +531,7 @@ func (s *KeeperTestSuite) TestUndelegateFromUnbondedValidator() { // create a validator with a self-delegation validator := testutil.NewValidator(s.T(), addrVals[0], PKs[0]) - keeper.SetValidatorByConsAddr(ctx, validator) + require.NoError(keeper.SetValidatorByConsAddr(ctx, validator)) valTokens := keeper.TokensFromConsensusPower(ctx, 10) validator, issuedShares := validator.AddTokensFromDel(valTokens) @@ -507,17 +541,17 @@ func (s *KeeperTestSuite) TestUndelegateFromUnbondedValidator() { require.True(validator.IsBonded()) val0AccAddr := sdk.AccAddress(addrVals[0]) - selfDelegation := stakingtypes.NewDelegation(val0AccAddr, addrVals[0], issuedShares) - keeper.SetDelegation(ctx, selfDelegation) + selfDelegation := stakingtypes.NewDelegation(val0AccAddr.String(), addrVals[0].String(), issuedShares) + require.NoError(keeper.SetDelegation(ctx, selfDelegation)) // create a second delegation to this validator - keeper.DeleteValidatorByPowerIndex(ctx, validator) + require.NoError(keeper.DeleteValidatorByPowerIndex(ctx, validator)) validator, issuedShares = validator.AddTokensFromDel(delTokens) require.Equal(delTokens, issuedShares.RoundInt()) validator = stakingkeeper.TestingUpdateValidator(keeper, ctx, validator, true) require.True(validator.IsBonded()) - delegation := stakingtypes.NewDelegation(addrDels[1], addrVals[0], issuedShares) - keeper.SetDelegation(ctx, delegation) + delegation := stakingtypes.NewDelegation(addrDels[1].String(), addrVals[0].String(), issuedShares) + require.NoError(keeper.SetDelegation(ctx, delegation)) ctx = ctx.WithBlockHeight(10) ctx = ctx.WithBlockTime(time.Unix(333, 0)) @@ -532,19 +566,21 @@ func (s *KeeperTestSuite) TestUndelegateFromUnbondedValidator() { s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(gomock.Any(), stakingtypes.BondedPoolName, stakingtypes.NotBondedPoolName, gomock.Any()) s.applyValidatorSetUpdates(ctx, keeper, 1) - validator, found := keeper.GetValidator(ctx, addrVals[0]) - require.True(found) + validator, err = keeper.GetValidator(ctx, addrVals[0]) + require.NoError(err) require.Equal(ctx.BlockHeight(), validator.UnbondingHeight) - params := keeper.GetParams(ctx) + params, err := keeper.GetParams(ctx) + require.NoError(err) require.True(ctx.BlockHeader().Time.Add(params.UnbondingTime).Equal(validator.UnbondingTime)) // unbond the validator ctx = ctx.WithBlockTime(validator.UnbondingTime) - keeper.UnbondAllMatureValidators(ctx) + err = keeper.UnbondAllMatureValidators(ctx) + require.NoError(err) // Make sure validator is still in state because there is still an outstanding delegation - validator, found = keeper.GetValidator(ctx, addrVals[0]) - require.True(found) + validator, err = keeper.GetValidator(ctx, addrVals[0]) + require.NoError(err) require.Equal(validator.Status, stakingtypes.Unbonded) // unbond some of the other delegation's shares @@ -560,8 +596,8 @@ func (s *KeeperTestSuite) TestUndelegateFromUnbondedValidator() { require.Equal(amount3, remainingTokens) // now validator should be deleted from state - validator, found = keeper.GetValidator(ctx, addrVals[0]) - require.False(found, "%v", validator) + validator, err = keeper.GetValidator(ctx, addrVals[0]) + require.ErrorIs(err, stakingtypes.ErrNoValidatorFound) } func (s *KeeperTestSuite) TestUnbondingAllDelegationFromValidator() { @@ -573,7 +609,7 @@ func (s *KeeperTestSuite) TestUnbondingAllDelegationFromValidator() { // create a validator with a self-delegation validator := testutil.NewValidator(s.T(), addrVals[0], PKs[0]) - keeper.SetValidatorByConsAddr(ctx, validator) + require.NoError(keeper.SetValidatorByConsAddr(ctx, validator)) valTokens := keeper.TokensFromConsensusPower(ctx, 10) validator, issuedShares := validator.AddTokensFromDel(valTokens) @@ -584,19 +620,19 @@ func (s *KeeperTestSuite) TestUnbondingAllDelegationFromValidator() { require.True(validator.IsBonded()) val0AccAddr := sdk.AccAddress(addrVals[0].Bytes()) - selfDelegation := stakingtypes.NewDelegation(val0AccAddr, addrVals[0], issuedShares) - keeper.SetDelegation(ctx, selfDelegation) + selfDelegation := stakingtypes.NewDelegation(val0AccAddr.String(), addrVals[0].String(), issuedShares) + require.NoError(keeper.SetDelegation(ctx, selfDelegation)) // create a second delegation to this validator - keeper.DeleteValidatorByPowerIndex(ctx, validator) + require.NoError(keeper.DeleteValidatorByPowerIndex(ctx, validator)) validator, issuedShares = validator.AddTokensFromDel(delTokens) require.Equal(delTokens, issuedShares.RoundInt()) validator = stakingkeeper.TestingUpdateValidator(keeper, ctx, validator, true) require.True(validator.IsBonded()) - delegation := stakingtypes.NewDelegation(addrDels[1], addrVals[0], issuedShares) - keeper.SetDelegation(ctx, delegation) + delegation := stakingtypes.NewDelegation(addrDels[1].String(), addrVals[0].String(), issuedShares) + require.NoError(keeper.SetDelegation(ctx, delegation)) ctx = ctx.WithBlockHeight(10) ctx = ctx.WithBlockTime(time.Unix(333, 0)) @@ -617,17 +653,18 @@ func (s *KeeperTestSuite) TestUnbondingAllDelegationFromValidator() { require.Equal(amount2, delTokens) // validator should still be in state and still be in unbonding state - validator, found := keeper.GetValidator(ctx, addrVals[0]) - require.True(found) + validator, err = keeper.GetValidator(ctx, addrVals[0]) + require.NoError(err) require.Equal(validator.Status, stakingtypes.Unbonding) // unbond the validator ctx = ctx.WithBlockTime(validator.UnbondingTime) - keeper.UnbondAllMatureValidators(ctx) + err = keeper.UnbondAllMatureValidators(ctx) + require.NoError(err) // validator should now be deleted from state - _, found = keeper.GetValidator(ctx, addrVals[0]) - require.False(found) + _, err = keeper.GetValidator(ctx, addrVals[0]) + require.ErrorIs(err, stakingtypes.ErrNoValidatorFound) } // Make sure that that the retrieving the delegations doesn't affect the state @@ -639,20 +676,23 @@ func (s *KeeperTestSuite) TestGetRedelegationsFromSrcValidator() { rd := stakingtypes.NewRedelegation(addrDels[0], addrVals[0], addrVals[1], 0, time.Unix(0, 0), math.NewInt(5), - math.LegacyNewDec(5), 0) + math.LegacyNewDec(5), 0, address.NewBech32Codec("cosmosvaloper"), address.NewBech32Codec("cosmos")) // set and retrieve a record - keeper.SetRedelegation(ctx, rd) - resBond, found := keeper.GetRedelegation(ctx, addrDels[0], addrVals[0], addrVals[1]) - require.True(found) + err := keeper.SetRedelegation(ctx, rd) + require.NoError(err) + resBond, err := keeper.GetRedelegation(ctx, addrDels[0], addrVals[0], addrVals[1]) + require.NoError(err) // get the redelegations one time - redelegations := keeper.GetRedelegationsFromSrcValidator(ctx, addrVals[0]) + redelegations, err := keeper.GetRedelegationsFromSrcValidator(ctx, addrVals[0]) + require.NoError(err) require.Equal(1, len(redelegations)) require.Equal(redelegations[0], resBond) // get the redelegations a second time, should be exactly the same - redelegations = keeper.GetRedelegationsFromSrcValidator(ctx, addrVals[0]) + redelegations, err = keeper.GetRedelegationsFromSrcValidator(ctx, addrVals[0]) + require.NoError(err) require.Equal(1, len(redelegations)) require.Equal(redelegations[0], resBond) } @@ -666,58 +706,70 @@ func (s *KeeperTestSuite) TestRedelegation() { rd := stakingtypes.NewRedelegation(addrDels[0], addrVals[0], addrVals[1], 0, time.Unix(0, 0).UTC(), math.NewInt(5), - math.LegacyNewDec(5), 0) + math.LegacyNewDec(5), 0, address.NewBech32Codec("cosmosvaloper"), address.NewBech32Codec("cosmos")) // test shouldn't have and redelegations - has := keeper.HasReceivingRedelegation(ctx, addrDels[0], addrVals[1]) + has, err := keeper.HasReceivingRedelegation(ctx, addrDels[0], addrVals[1]) + require.NoError(err) require.False(has) // set and retrieve a record - keeper.SetRedelegation(ctx, rd) - resRed, found := keeper.GetRedelegation(ctx, addrDels[0], addrVals[0], addrVals[1]) - require.True(found) + err = keeper.SetRedelegation(ctx, rd) + require.NoError(err) + resRed, err := keeper.GetRedelegation(ctx, addrDels[0], addrVals[0], addrVals[1]) + require.NoError(err) - redelegations := keeper.GetRedelegationsFromSrcValidator(ctx, addrVals[0]) + redelegations, err := keeper.GetRedelegationsFromSrcValidator(ctx, addrVals[0]) + require.NoError(err) require.Equal(1, len(redelegations)) require.Equal(redelegations[0], resRed) - redelegations = keeper.GetRedelegations(ctx, addrDels[0], 5) + redelegations, err = keeper.GetRedelegations(ctx, addrDels[0], 5) + require.NoError(err) require.Equal(1, len(redelegations)) require.Equal(redelegations[0], resRed) - redelegations = keeper.GetAllRedelegations(ctx, addrDels[0], nil, nil) + redelegations, err = keeper.GetAllRedelegations(ctx, addrDels[0], nil, nil) + require.NoError(err) require.Equal(1, len(redelegations)) require.Equal(redelegations[0], resRed) // check if has the redelegation - has = keeper.HasReceivingRedelegation(ctx, addrDels[0], addrVals[1]) + has, err = keeper.HasReceivingRedelegation(ctx, addrDels[0], addrVals[1]) + require.NoError(err) require.True(has) // modify a records, save, and retrieve rd.Entries[0].SharesDst = math.LegacyNewDec(21) - keeper.SetRedelegation(ctx, rd) + err = keeper.SetRedelegation(ctx, rd) + require.NoError(err) - resRed, found = keeper.GetRedelegation(ctx, addrDels[0], addrVals[0], addrVals[1]) - require.True(found) + resRed, err = keeper.GetRedelegation(ctx, addrDels[0], addrVals[0], addrVals[1]) + require.NoError(err) require.Equal(rd, resRed) - redelegations = keeper.GetRedelegationsFromSrcValidator(ctx, addrVals[0]) + redelegations, err = keeper.GetRedelegationsFromSrcValidator(ctx, addrVals[0]) + require.NoError(err) require.Equal(1, len(redelegations)) require.Equal(redelegations[0], resRed) - redelegations = keeper.GetRedelegations(ctx, addrDels[0], 5) + redelegations, err = keeper.GetRedelegations(ctx, addrDels[0], 5) + require.NoError(err) require.Equal(1, len(redelegations)) require.Equal(redelegations[0], resRed) // delete a record - keeper.RemoveRedelegation(ctx, rd) - _, found = keeper.GetRedelegation(ctx, addrDels[0], addrVals[0], addrVals[1]) - require.False(found) + err = keeper.RemoveRedelegation(ctx, rd) + require.NoError(err) + _, err = keeper.GetRedelegation(ctx, addrDels[0], addrVals[0], addrVals[1]) + require.ErrorIs(err, stakingtypes.ErrNoRedelegation) - redelegations = keeper.GetRedelegations(ctx, addrDels[0], 5) + redelegations, err = keeper.GetRedelegations(ctx, addrDels[0], 5) + require.NoError(err) require.Equal(0, len(redelegations)) - redelegations = keeper.GetAllRedelegations(ctx, addrDels[0], nil, nil) + redelegations, err = keeper.GetAllRedelegations(ctx, addrDels[0], nil, nil) + require.NoError(err) require.Equal(0, len(redelegations)) } @@ -739,8 +791,8 @@ func (s *KeeperTestSuite) TestRedelegateToSameValidator() { val0AccAddr := sdk.AccAddress(addrVals[0].Bytes()) - selfDelegation := stakingtypes.NewDelegation(val0AccAddr, addrVals[0], issuedShares) - keeper.SetDelegation(ctx, selfDelegation) + selfDelegation := stakingtypes.NewDelegation(val0AccAddr.String(), addrVals[0].String(), issuedShares) + require.NoError(keeper.SetDelegation(ctx, selfDelegation)) _, err := keeper.BeginRedelegation(ctx, val0AccAddr, addrVals[0], addrVals[0], math.LegacyNewDec(5)) require.Error(err) @@ -761,8 +813,8 @@ func (s *KeeperTestSuite) TestRedelegationMaxEntries() { s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(gomock.Any(), stakingtypes.NotBondedPoolName, stakingtypes.BondedPoolName, gomock.Any()) _ = stakingkeeper.TestingUpdateValidator(keeper, ctx, validator, true) val0AccAddr := sdk.AccAddress(addrVals[0].Bytes()) - selfDelegation := stakingtypes.NewDelegation(val0AccAddr, addrVals[0], issuedShares) - keeper.SetDelegation(ctx, selfDelegation) + selfDelegation := stakingtypes.NewDelegation(val0AccAddr.String(), addrVals[0].String(), issuedShares) + require.NoError(keeper.SetDelegation(ctx, selfDelegation)) // create a second validator validator2 := testutil.NewValidator(s.T(), addrVals[1], PKs[1]) @@ -773,7 +825,8 @@ func (s *KeeperTestSuite) TestRedelegationMaxEntries() { validator2 = stakingkeeper.TestingUpdateValidator(keeper, ctx, validator2, true) require.Equal(stakingtypes.Bonded, validator2.Status) - maxEntries := keeper.MaxEntries(ctx) + maxEntries, err := keeper.MaxEntries(ctx) + require.NoError(err) // redelegations should pass var completionTime time.Time @@ -784,7 +837,7 @@ func (s *KeeperTestSuite) TestRedelegationMaxEntries() { } // an additional redelegation should fail due to max entries - _, err := keeper.BeginRedelegation(ctx, val0AccAddr, addrVals[0], addrVals[1], math.LegacyNewDec(1)) + _, err = keeper.BeginRedelegation(ctx, val0AccAddr, addrVals[0], addrVals[1], math.LegacyNewDec(1)) require.Error(err) // mature redelegations @@ -805,7 +858,7 @@ func (s *KeeperTestSuite) TestRedelegateSelfDelegation() { // create a validator with a self-delegation validator := testutil.NewValidator(s.T(), addrVals[0], PKs[0]) - keeper.SetValidatorByConsAddr(ctx, validator) + require.NoError(keeper.SetValidatorByConsAddr(ctx, validator)) valTokens := keeper.TokensFromConsensusPower(ctx, 10) validator, issuedShares := validator.AddTokensFromDel(valTokens) @@ -815,8 +868,8 @@ func (s *KeeperTestSuite) TestRedelegateSelfDelegation() { validator = stakingkeeper.TestingUpdateValidator(keeper, ctx, validator, true) val0AccAddr := sdk.AccAddress(addrVals[0]) - selfDelegation := stakingtypes.NewDelegation(val0AccAddr, addrVals[0], issuedShares) - keeper.SetDelegation(ctx, selfDelegation) + selfDelegation := stakingtypes.NewDelegation(val0AccAddr.String(), addrVals[0].String(), issuedShares) + require.NoError(keeper.SetDelegation(ctx, selfDelegation)) // create a second validator validator2 := testutil.NewValidator(s.T(), addrVals[1], PKs[1]) @@ -832,8 +885,8 @@ func (s *KeeperTestSuite) TestRedelegateSelfDelegation() { require.Equal(delTokens, issuedShares.RoundInt()) stakingkeeper.TestingUpdateValidator(keeper, ctx, validator, true) - delegation := stakingtypes.NewDelegation(addrDels[0], addrVals[0], issuedShares) - keeper.SetDelegation(ctx, delegation) + delegation := stakingtypes.NewDelegation(addrDels[0].String(), addrVals[0].String(), issuedShares) + require.NoError(keeper.SetDelegation(ctx, delegation)) _, err := keeper.BeginRedelegation(ctx, val0AccAddr, addrVals[0], addrVals[1], math.LegacyNewDecFromInt(delTokens)) require.NoError(err) @@ -842,8 +895,8 @@ func (s *KeeperTestSuite) TestRedelegateSelfDelegation() { s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(gomock.Any(), stakingtypes.BondedPoolName, stakingtypes.NotBondedPoolName, gomock.Any()) s.applyValidatorSetUpdates(ctx, keeper, 2) - validator, found := keeper.GetValidator(ctx, addrVals[0]) - require.True(found) + validator, err = keeper.GetValidator(ctx, addrVals[0]) + require.NoError(err) require.Equal(valTokens, validator.Tokens) require.Equal(stakingtypes.Unbonding, validator.Status) } @@ -856,7 +909,7 @@ func (s *KeeperTestSuite) TestRedelegateFromUnbondingValidator() { // create a validator with a self-delegation validator := testutil.NewValidator(s.T(), addrVals[0], PKs[0]) - keeper.SetValidatorByConsAddr(ctx, validator) + require.NoError(keeper.SetValidatorByConsAddr(ctx, validator)) valTokens := keeper.TokensFromConsensusPower(ctx, 10) validator, issuedShares := validator.AddTokensFromDel(valTokens) @@ -864,17 +917,17 @@ func (s *KeeperTestSuite) TestRedelegateFromUnbondingValidator() { s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(gomock.Any(), stakingtypes.NotBondedPoolName, stakingtypes.BondedPoolName, gomock.Any()) validator = stakingkeeper.TestingUpdateValidator(keeper, ctx, validator, true) val0AccAddr := sdk.AccAddress(addrVals[0].Bytes()) - selfDelegation := stakingtypes.NewDelegation(val0AccAddr, addrVals[0], issuedShares) - keeper.SetDelegation(ctx, selfDelegation) + selfDelegation := stakingtypes.NewDelegation(val0AccAddr.String(), addrVals[0].String(), issuedShares) + require.NoError(keeper.SetDelegation(ctx, selfDelegation)) // create a second delegation to this validator - keeper.DeleteValidatorByPowerIndex(ctx, validator) + require.NoError(keeper.DeleteValidatorByPowerIndex(ctx, validator)) delTokens := keeper.TokensFromConsensusPower(ctx, 10) validator, issuedShares = validator.AddTokensFromDel(delTokens) require.Equal(delTokens, issuedShares.RoundInt()) stakingkeeper.TestingUpdateValidator(keeper, ctx, validator, true) - delegation := stakingtypes.NewDelegation(addrDels[1], addrVals[0], issuedShares) - keeper.SetDelegation(ctx, delegation) + delegation := stakingtypes.NewDelegation(addrDels[1].String(), addrVals[0].String(), issuedShares) + require.NoError(keeper.SetDelegation(ctx, delegation)) // create a second validator validator2 := testutil.NewValidator(s.T(), addrVals[1], PKs[1]) @@ -900,10 +953,11 @@ func (s *KeeperTestSuite) TestRedelegateFromUnbondingValidator() { s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(gomock.Any(), stakingtypes.BondedPoolName, stakingtypes.NotBondedPoolName, gomock.Any()) s.applyValidatorSetUpdates(ctx, keeper, 1) - validator, found := keeper.GetValidator(ctx, addrVals[0]) - require.True(found) + validator, err = keeper.GetValidator(ctx, addrVals[0]) + require.NoError(err) require.Equal(blockHeight, validator.UnbondingHeight) - params := keeper.GetParams(ctx) + params, err := keeper.GetParams(ctx) + require.NoError(err) require.True(blockTime.Add(params.UnbondingTime).Equal(validator.UnbondingTime)) // change the context @@ -921,8 +975,8 @@ func (s *KeeperTestSuite) TestRedelegateFromUnbondingValidator() { require.NoError(err) // retrieve the unbonding delegation - ubd, found := keeper.GetRedelegation(ctx, addrDels[1], addrVals[0], addrVals[1]) - require.True(found) + ubd, err := keeper.GetRedelegation(ctx, addrDels[1], addrVals[0], addrVals[1]) + require.NoError(err) require.Len(ubd.Entries, 1) require.Equal(blockHeight, ubd.Entries[0].CreationHeight) require.True(blockTime.Add(params.UnbondingTime).Equal(ubd.Entries[0].CompletionTime)) @@ -936,7 +990,7 @@ func (s *KeeperTestSuite) TestRedelegateFromUnbondedValidator() { // create a validator with a self-delegation validator := testutil.NewValidator(s.T(), addrVals[0], PKs[0]) - keeper.SetValidatorByConsAddr(ctx, validator) + require.NoError(keeper.SetValidatorByConsAddr(ctx, validator)) valTokens := keeper.TokensFromConsensusPower(ctx, 10) validator, issuedShares := validator.AddTokensFromDel(valTokens) @@ -944,17 +998,17 @@ func (s *KeeperTestSuite) TestRedelegateFromUnbondedValidator() { s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(gomock.Any(), stakingtypes.NotBondedPoolName, stakingtypes.BondedPoolName, gomock.Any()) validator = stakingkeeper.TestingUpdateValidator(keeper, ctx, validator, true) val0AccAddr := sdk.AccAddress(addrVals[0].Bytes()) - selfDelegation := stakingtypes.NewDelegation(val0AccAddr, addrVals[0], issuedShares) - keeper.SetDelegation(ctx, selfDelegation) + selfDelegation := stakingtypes.NewDelegation(val0AccAddr.String(), addrVals[0].String(), issuedShares) + require.NoError(keeper.SetDelegation(ctx, selfDelegation)) // create a second delegation to this validator - keeper.DeleteValidatorByPowerIndex(ctx, validator) + require.NoError(keeper.DeleteValidatorByPowerIndex(ctx, validator)) delTokens := keeper.TokensFromConsensusPower(ctx, 10) validator, issuedShares = validator.AddTokensFromDel(delTokens) require.Equal(delTokens, issuedShares.RoundInt()) stakingkeeper.TestingUpdateValidator(keeper, ctx, validator, true) - delegation := stakingtypes.NewDelegation(addrDels[1], addrVals[0], issuedShares) - keeper.SetDelegation(ctx, delegation) + delegation := stakingtypes.NewDelegation(addrDels[1].String(), addrVals[0].String(), issuedShares) + require.NoError(keeper.SetDelegation(ctx, delegation)) // create a second validator validator2 := testutil.NewValidator(s.T(), addrVals[1], PKs[1]) @@ -977,14 +1031,16 @@ func (s *KeeperTestSuite) TestRedelegateFromUnbondedValidator() { s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(gomock.Any(), stakingtypes.BondedPoolName, stakingtypes.NotBondedPoolName, gomock.Any()) s.applyValidatorSetUpdates(ctx, keeper, 1) - validator, found := keeper.GetValidator(ctx, addrVals[0]) - require.True(found) + validator, err = keeper.GetValidator(ctx, addrVals[0]) + require.NoError(err) require.Equal(ctx.BlockHeight(), validator.UnbondingHeight) - params := keeper.GetParams(ctx) + params, err := keeper.GetParams(ctx) + require.NoError(err) require.True(ctx.BlockHeader().Time.Add(params.UnbondingTime).Equal(validator.UnbondingTime)) // unbond the validator - keeper.UnbondingToUnbonded(ctx, validator) + _, err = keeper.UnbondingToUnbonded(ctx, validator) + require.NoError(err) // redelegate some of the delegation's shares redelegationTokens := keeper.TokensFromConsensusPower(ctx, 6) @@ -993,8 +1049,8 @@ func (s *KeeperTestSuite) TestRedelegateFromUnbondedValidator() { require.NoError(err) // no red should have been found - red, found := keeper.GetRedelegation(ctx, addrDels[0], addrVals[0], addrVals[1]) - require.False(found, "%v", red) + red, err := keeper.GetRedelegation(ctx, addrDels[0], addrVals[0], addrVals[1]) + require.ErrorIs(err, stakingtypes.ErrNoRedelegation, "%v", red) } func (s *KeeperTestSuite) TestUnbondingDelegationAddEntry() { @@ -1012,6 +1068,7 @@ func (s *KeeperTestSuite) TestUnbondingDelegationAddEntry() { time.Unix(0, 0).UTC(), math.NewInt(10), 0, + address.NewBech32Codec("cosmosvaloper"), address.NewBech32Codec("cosmos"), ) var initialEntries []stakingtypes.UnbondingDelegationEntry initialEntries = append(initialEntries, ubd.Entries...) @@ -1053,12 +1110,13 @@ func (s *KeeperTestSuite) TestSetUnbondingDelegationEntry() { time.Unix(0, 0).UTC(), math.NewInt(5), 0, + address.NewBech32Codec("cosmosvaloper"), address.NewBech32Codec("cosmos"), ) // set and retrieve a record - keeper.SetUnbondingDelegation(ctx, ubd) - resUnbond, found := keeper.GetUnbondingDelegation(ctx, delAddr, valAddr) - require.True(found) + require.NoError(keeper.SetUnbondingDelegation(ctx, ubd)) + resUnbond, err := keeper.GetUnbondingDelegation(ctx, delAddr, valAddr) + require.NoError(err) require.Equal(ubd, resUnbond) initialEntries := ubd.Entries @@ -1068,7 +1126,7 @@ func (s *KeeperTestSuite) TestSetUnbondingDelegationEntry() { // set unbonding delegation entry for existing creationHeight // entries are expected to be merged - keeper.SetUnbondingDelegationEntry( + _, err = keeper.SetUnbondingDelegationEntry( ctx, delAddr, valAddr, @@ -1076,8 +1134,9 @@ func (s *KeeperTestSuite) TestSetUnbondingDelegationEntry() { time.Unix(0, 0).UTC(), math.NewInt(5), ) - resUnbonding, found := keeper.GetUnbondingDelegation(ctx, delAddr, valAddr) - require.True(found) + require.NoError(err) + resUnbonding, err := keeper.GetUnbondingDelegation(ctx, delAddr, valAddr) + require.NoError(err) require.Len(resUnbonding.Entries, 1) require.NotEqual(initialEntries, resUnbonding.Entries) require.Equal(creationHeight, resUnbonding.Entries[0].CreationHeight) @@ -1087,7 +1146,7 @@ func (s *KeeperTestSuite) TestSetUnbondingDelegationEntry() { // set unbonding delegation entry for newCreationHeight // new entry is expected to be appended to the existing entries newCreationHeight := int64(1) - keeper.SetUnbondingDelegationEntry( + _, err = keeper.SetUnbondingDelegationEntry( ctx, delAddr, valAddr, @@ -1095,8 +1154,9 @@ func (s *KeeperTestSuite) TestSetUnbondingDelegationEntry() { time.Unix(1, 0).UTC(), math.NewInt(10), ) - resUnbonding, found = keeper.GetUnbondingDelegation(ctx, delAddr, valAddr) - require.True(found) + require.NoError(err) + resUnbonding, err = keeper.GetUnbondingDelegation(ctx, delAddr, valAddr) + require.NoError(err) require.Len(resUnbonding.Entries, 2) require.NotEqual(initialEntries, resUnbonding.Entries) require.NotEqual(resUnbonding.Entries[0], resUnbonding.Entries[1]) diff --git a/x/staking/keeper/genesis.go b/x/staking/keeper/genesis.go index 85dc5e9e9bc2..738614ab8613 100644 --- a/x/staking/keeper/genesis.go +++ b/x/staking/keeper/genesis.go @@ -1,6 +1,7 @@ package keeper import ( + "context" "fmt" abci "github.com/cometbft/cometbft/abci/types" @@ -16,7 +17,7 @@ import ( // setting the indexes. In addition, it also sets any delegations found in // data. Finally, it updates the bonded validators. // Returns final validator set after applying all declaration and delegations -func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState) (res []abci.ValidatorUpdate) { +func (k Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) (res []abci.ValidatorUpdate) { bondedTokens := math.ZeroInt() notBondedTokens := math.ZeroInt() @@ -25,30 +26,48 @@ func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState) (res []ab // initialized for the validator set e.g. with a one-block offset - the // first TM block is at height 1, so state updates applied from // genesis.json are in block 0. - ctx = ctx.WithBlockHeight(1 - sdk.ValidatorUpdateDelay) + sdkCtx := sdk.UnwrapSDKContext(ctx) + sdkCtx = sdkCtx.WithBlockHeight(1 - sdk.ValidatorUpdateDelay) + ctx = sdkCtx if err := k.SetParams(ctx, data.Params); err != nil { panic(err) } - k.SetLastTotalPower(ctx, data.LastTotalPower) + + if err := k.SetLastTotalPower(ctx, data.LastTotalPower); err != nil { + panic(err) + } for _, validator := range data.Validators { - k.SetValidator(ctx, validator) + if err := k.SetValidator(ctx, validator); err != nil { + panic(err) + } // Manually set indices for the first time - k.SetValidatorByConsAddr(ctx, validator) - k.SetValidatorByPowerIndex(ctx, validator) + if err := k.SetValidatorByConsAddr(ctx, validator); err != nil { + panic(err) + } + + if err := k.SetValidatorByPowerIndex(ctx, validator); err != nil { + panic(err) + } // Call the creation hook if not exported if !data.Exported { - if err := k.Hooks().AfterValidatorCreated(ctx, validator.GetOperator()); err != nil { + valbz, err := k.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) + if err != nil { + panic(err) + } + if err := k.Hooks().AfterValidatorCreated(ctx, valbz); err != nil { panic(err) } } // update timeslice if necessary if validator.IsUnbonding() { - k.InsertUnbondingValidatorQueue(ctx, validator) + if err := k.InsertUnbondingValidatorQueue(ctx, validator); err != nil { + panic(err) + } } switch validator.GetStatus() { @@ -69,37 +88,52 @@ func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState) (res []ab panic(fmt.Errorf("invalid delegator address: %s", err)) } + valAddr, err := k.validatorAddressCodec.StringToBytes(delegation.GetValidatorAddr()) + if err != nil { + panic(err) + } + // Call the before-creation hook if not exported if !data.Exported { - if err := k.Hooks().BeforeDelegationCreated(ctx, delegatorAddress, delegation.GetValidatorAddr()); err != nil { + if err := k.Hooks().BeforeDelegationCreated(ctx, delegatorAddress, valAddr); err != nil { panic(err) } } - k.SetDelegation(ctx, delegation) + if err := k.SetDelegation(ctx, delegation); err != nil { + panic(err) + } // Call the after-modification hook if not exported if !data.Exported { - if err := k.Hooks().AfterDelegationModified(ctx, delegatorAddress, delegation.GetValidatorAddr()); err != nil { + if err := k.Hooks().AfterDelegationModified(ctx, delegatorAddress, valAddr); err != nil { panic(err) } } } for _, ubd := range data.UnbondingDelegations { - k.SetUnbondingDelegation(ctx, ubd) + if err := k.SetUnbondingDelegation(ctx, ubd); err != nil { + panic(err) + } for _, entry := range ubd.Entries { - k.InsertUBDQueue(ctx, ubd, entry.CompletionTime) + if err := k.InsertUBDQueue(ctx, ubd, entry.CompletionTime); err != nil { + panic(err) + } notBondedTokens = notBondedTokens.Add(entry.Balance) } } for _, red := range data.Redelegations { - k.SetRedelegation(ctx, red) + if err := k.SetRedelegation(ctx, red); err != nil { + panic(err) + } for _, entry := range red.Entries { - k.InsertRedelegationQueue(ctx, red, entry.CompletionTime) + if err := k.InsertRedelegationQueue(ctx, red, entry.CompletionTime); err != nil { + panic(err) + } } } @@ -143,15 +177,18 @@ func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState) (res []ab // don't need to run CometBFT updates if we exported if data.Exported { for _, lv := range data.LastValidatorPowers { - valAddr, err := sdk.ValAddressFromBech32(lv.Address) + valAddr, err := k.validatorAddressCodec.StringToBytes(lv.Address) if err != nil { panic(err) } - k.SetLastValidatorPower(ctx, valAddr, lv.Power) - validator, found := k.GetValidator(ctx, valAddr) + err = k.SetLastValidatorPower(ctx, valAddr, lv.Power) + if err != nil { + panic(err) + } - if !found { + validator, err := k.GetValidator(ctx, valAddr) + if err != nil { panic(fmt.Sprintf("validator %s not found", lv.Address)) } @@ -177,31 +214,64 @@ func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState) (res []ab func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { var unbondingDelegations []types.UnbondingDelegation - k.IterateUnbondingDelegations(ctx, func(_ int64, ubd types.UnbondingDelegation) (stop bool) { + err := k.IterateUnbondingDelegations(ctx, func(_ int64, ubd types.UnbondingDelegation) (stop bool) { unbondingDelegations = append(unbondingDelegations, ubd) return false }) + if err != nil { + panic(err) + } var redelegations []types.Redelegation - k.IterateRedelegations(ctx, func(_ int64, red types.Redelegation) (stop bool) { + err = k.IterateRedelegations(ctx, func(_ int64, red types.Redelegation) (stop bool) { redelegations = append(redelegations, red) return false }) + if err != nil { + panic(err) + } var lastValidatorPowers []types.LastValidatorPower - k.IterateLastValidatorPowers(ctx, func(addr sdk.ValAddress, power int64) (stop bool) { - lastValidatorPowers = append(lastValidatorPowers, types.LastValidatorPower{Address: addr.String(), Power: power}) + err = k.IterateLastValidatorPowers(ctx, func(addr sdk.ValAddress, power int64) (stop bool) { + addrStr, err := k.validatorAddressCodec.BytesToString(addr) + if err != nil { + panic(err) + } + lastValidatorPowers = append(lastValidatorPowers, types.LastValidatorPower{Address: addrStr, Power: power}) return false }) + if err != nil { + panic(err) + } + + params, err := k.GetParams(ctx) + if err != nil { + panic(err) + } + + totalPower, err := k.GetLastTotalPower(ctx) + if err != nil { + panic(err) + } + + allDelegations, err := k.GetAllDelegations(ctx) + if err != nil { + panic(err) + } + + allValidators, err := k.GetAllValidators(ctx) + if err != nil { + panic(err) + } return &types.GenesisState{ - Params: k.GetParams(ctx), - LastTotalPower: k.GetLastTotalPower(ctx), + Params: params, + LastTotalPower: totalPower, LastValidatorPowers: lastValidatorPowers, - Validators: k.GetAllValidators(ctx), - Delegations: k.GetAllDelegations(ctx), + Validators: allValidators, + Delegations: allDelegations, UnbondingDelegations: unbondingDelegations, Redelegations: redelegations, Exported: true, diff --git a/x/staking/keeper/grpc_query.go b/x/staking/keeper/grpc_query.go index 482be95055e9..890ca859c12b 100644 --- a/x/staking/keeper/grpc_query.go +++ b/x/staking/keeper/grpc_query.go @@ -10,6 +10,7 @@ import ( "cosmossdk.io/store/prefix" storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -27,7 +28,7 @@ func NewQuerier(keeper *Keeper) Querier { } // Validators queries all validators that match the given status -func (k Querier) Validators(c context.Context, req *types.QueryValidatorsRequest) (*types.QueryValidatorsResponse, error) { +func (k Querier) Validators(ctx context.Context, req *types.QueryValidatorsRequest) (*types.QueryValidatorsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -37,9 +38,7 @@ func (k Querier) Validators(c context.Context, req *types.QueryValidatorsRequest return nil, status.Errorf(codes.InvalidArgument, "invalid validator status %s", req.Status) } - ctx := sdk.UnwrapSDKContext(c) - - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) valStore := prefix.NewStore(store, types.ValidatorsKey) validators, pageRes, err := query.GenericFilteredPaginate(k.cdc, valStore, req.Pagination, func(key []byte, val *types.Validator) (*types.Validator, error) { @@ -57,14 +56,14 @@ func (k Querier) Validators(c context.Context, req *types.QueryValidatorsRequest vals := types.Validators{} for _, val := range validators { - vals = append(vals, *val) + vals.Validators = append(vals.Validators, *val) } - return &types.QueryValidatorsResponse{Validators: vals, Pagination: pageRes}, nil + return &types.QueryValidatorsResponse{Validators: vals.Validators, Pagination: pageRes}, nil } // Validator queries validator info for given validator address -func (k Querier) Validator(c context.Context, req *types.QueryValidatorRequest) (*types.QueryValidatorResponse, error) { +func (k Querier) Validator(ctx context.Context, req *types.QueryValidatorRequest) (*types.QueryValidatorResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -73,14 +72,13 @@ func (k Querier) Validator(c context.Context, req *types.QueryValidatorRequest) return nil, status.Error(codes.InvalidArgument, "validator address cannot be empty") } - valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddr) + valAddr, err := k.validatorAddressCodec.StringToBytes(req.ValidatorAddr) if err != nil { return nil, err } - ctx := sdk.UnwrapSDKContext(c) - validator, found := k.GetValidator(ctx, valAddr) - if !found { + validator, err := k.GetValidator(ctx, valAddr) + if err != nil { return nil, status.Errorf(codes.NotFound, "validator %s not found", req.ValidatorAddr) } @@ -88,7 +86,7 @@ func (k Querier) Validator(c context.Context, req *types.QueryValidatorRequest) } // ValidatorDelegations queries delegate info for given validator -func (k Querier) ValidatorDelegations(c context.Context, req *types.QueryValidatorDelegationsRequest) (*types.QueryValidatorDelegationsResponse, error) { +func (k Querier) ValidatorDelegations(ctx context.Context, req *types.QueryValidatorDelegationsRequest) (*types.QueryValidatorDelegationsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -97,13 +95,12 @@ func (k Querier) ValidatorDelegations(c context.Context, req *types.QueryValidat return nil, status.Error(codes.InvalidArgument, "validator address cannot be empty") } - valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddr) + valAddr, err := k.validatorAddressCodec.StringToBytes(req.ValidatorAddr) if err != nil { return nil, err } - ctx := sdk.UnwrapSDKContext(c) - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) delStore := prefix.NewStore(store, types.GetDelegationsByValPrefixKey(valAddr)) var ( @@ -136,7 +133,7 @@ func (k Querier) ValidatorDelegations(c context.Context, req *types.QueryValidat pageRes = pageResponse } - delResponses, err := DelegationsToDelegationResponses(ctx, k.Keeper, dels) + delResponses, err := delegationsToDelegationResponses(ctx, k.Keeper, dels) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -146,17 +143,17 @@ func (k Querier) ValidatorDelegations(c context.Context, req *types.QueryValidat }, nil } -func (k Querier) getValidatorDelegationsLegacy(ctx sdk.Context, req *types.QueryValidatorDelegationsRequest) ([]*types.Delegation, *query.PageResponse, error) { - store := ctx.KVStore(k.storeKey) +func (k Querier) getValidatorDelegationsLegacy(ctx context.Context, req *types.QueryValidatorDelegationsRequest) ([]*types.Delegation, *query.PageResponse, error) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) valStore := prefix.NewStore(store, types.DelegationKey) return query.GenericFilteredPaginate(k.cdc, valStore, req.Pagination, func(key []byte, delegation *types.Delegation) (*types.Delegation, error) { - valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddr) + _, err := k.validatorAddressCodec.StringToBytes(req.ValidatorAddr) if err != nil { return nil, err } - if !delegation.GetValidatorAddr().Equals(valAddr) { + if !strings.EqualFold(delegation.GetValidatorAddr(), req.ValidatorAddr) { return nil, nil } @@ -167,7 +164,7 @@ func (k Querier) getValidatorDelegationsLegacy(ctx sdk.Context, req *types.Query } // ValidatorUnbondingDelegations queries unbonding delegations of a validator -func (k Querier) ValidatorUnbondingDelegations(c context.Context, req *types.QueryValidatorUnbondingDelegationsRequest) (*types.QueryValidatorUnbondingDelegationsResponse, error) { +func (k Querier) ValidatorUnbondingDelegations(ctx context.Context, req *types.QueryValidatorUnbondingDelegationsRequest) (*types.QueryValidatorUnbondingDelegationsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -176,15 +173,13 @@ func (k Querier) ValidatorUnbondingDelegations(c context.Context, req *types.Que return nil, status.Error(codes.InvalidArgument, "validator address cannot be empty") } var ubds types.UnbondingDelegations - ctx := sdk.UnwrapSDKContext(c) - - store := ctx.KVStore(k.storeKey) - valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddr) + valAddr, err := k.validatorAddressCodec.StringToBytes(req.ValidatorAddr) if err != nil { return nil, err } + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) srcValPrefix := types.GetUBDsByValIndexKey(valAddr) ubdStore := prefix.NewStore(store, srcValPrefix) pageRes, err := query.Paginate(ubdStore, req.Pagination, func(key, value []byte) error { @@ -209,7 +204,7 @@ func (k Querier) ValidatorUnbondingDelegations(c context.Context, req *types.Que } // Delegation queries delegate info for given validator delegator pair -func (k Querier) Delegation(c context.Context, req *types.QueryDelegationRequest) (*types.QueryDelegationResponse, error) { +func (k Querier) Delegation(ctx context.Context, req *types.QueryDelegationRequest) (*types.QueryDelegationResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -221,26 +216,25 @@ func (k Querier) Delegation(c context.Context, req *types.QueryDelegationRequest return nil, status.Error(codes.InvalidArgument, "validator address cannot be empty") } - ctx := sdk.UnwrapSDKContext(c) delAddr, err := k.authKeeper.AddressCodec().StringToBytes(req.DelegatorAddr) if err != nil { return nil, err } - valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddr) + valAddr, err := k.validatorAddressCodec.StringToBytes(req.ValidatorAddr) if err != nil { return nil, err } - delegation, found := k.GetDelegation(ctx, delAddr, valAddr) - if !found { + delegation, err := k.GetDelegation(ctx, delAddr, valAddr) + if err != nil { return nil, status.Errorf( codes.NotFound, "delegation with delegator %s not found for validator %s", req.DelegatorAddr, req.ValidatorAddr) } - delResponse, err := DelegationToDelegationResponse(ctx, k.Keeper, delegation) + delResponse, err := delegationToDelegationResponse(ctx, k.Keeper, delegation) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -248,8 +242,8 @@ func (k Querier) Delegation(c context.Context, req *types.QueryDelegationRequest return &types.QueryDelegationResponse{DelegationResponse: &delResponse}, nil } -// UnbondingDelegation queries unbonding info for give validator delegator pair -func (k Querier) UnbondingDelegation(c context.Context, req *types.QueryUnbondingDelegationRequest) (*types.QueryUnbondingDelegationResponse, error) { +// UnbondingDelegation queries unbonding info for given validator delegator pair +func (k Querier) UnbondingDelegation(ctx context.Context, req *types.QueryUnbondingDelegationRequest) (*types.QueryUnbondingDelegationResponse, error) { if req == nil { return nil, status.Errorf(codes.InvalidArgument, "empty request") } @@ -261,20 +255,18 @@ func (k Querier) UnbondingDelegation(c context.Context, req *types.QueryUnbondin return nil, status.Errorf(codes.InvalidArgument, "validator address cannot be empty") } - ctx := sdk.UnwrapSDKContext(c) - delAddr, err := k.authKeeper.AddressCodec().StringToBytes(req.DelegatorAddr) if err != nil { return nil, err } - valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddr) + valAddr, err := k.validatorAddressCodec.StringToBytes(req.ValidatorAddr) if err != nil { return nil, err } - unbond, found := k.GetUnbondingDelegation(ctx, delAddr, valAddr) - if !found { + unbond, err := k.GetUnbondingDelegation(ctx, delAddr, valAddr) + if err != nil { return nil, status.Errorf( codes.NotFound, "unbonding delegation with delegator %s not found for validator %s", @@ -284,8 +276,8 @@ func (k Querier) UnbondingDelegation(c context.Context, req *types.QueryUnbondin return &types.QueryUnbondingDelegationResponse{Unbond: unbond}, nil } -// DelegatorDelegations queries all delegations of a give delegator address -func (k Querier) DelegatorDelegations(c context.Context, req *types.QueryDelegatorDelegationsRequest) (*types.QueryDelegatorDelegationsResponse, error) { +// DelegatorDelegations queries all delegations of a given delegator address +func (k Querier) DelegatorDelegations(ctx context.Context, req *types.QueryDelegatorDelegationsRequest) (*types.QueryDelegatorDelegationsResponse, error) { if req == nil { return nil, status.Errorf(codes.InvalidArgument, "empty request") } @@ -294,14 +286,13 @@ func (k Querier) DelegatorDelegations(c context.Context, req *types.QueryDelegat return nil, status.Error(codes.InvalidArgument, "delegator address cannot be empty") } var delegations types.Delegations - ctx := sdk.UnwrapSDKContext(c) delAddr, err := k.authKeeper.AddressCodec().StringToBytes(req.DelegatorAddr) if err != nil { return nil, err } - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) delStore := prefix.NewStore(store, types.GetDelegationsKey(delAddr)) pageRes, err := query.Paginate(delStore, req.Pagination, func(key, value []byte) error { delegation, err := types.UnmarshalDelegation(k.cdc, value) @@ -315,7 +306,7 @@ func (k Querier) DelegatorDelegations(c context.Context, req *types.QueryDelegat return nil, status.Error(codes.Internal, err.Error()) } - delegationResps, err := DelegationsToDelegationResponses(ctx, k.Keeper, delegations) + delegationResps, err := delegationsToDelegationResponses(ctx, k.Keeper, delegations) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -324,7 +315,7 @@ func (k Querier) DelegatorDelegations(c context.Context, req *types.QueryDelegat } // DelegatorValidator queries validator info for given delegator validator pair -func (k Querier) DelegatorValidator(c context.Context, req *types.QueryDelegatorValidatorRequest) (*types.QueryDelegatorValidatorResponse, error) { +func (k Querier) DelegatorValidator(ctx context.Context, req *types.QueryDelegatorValidatorRequest) (*types.QueryDelegatorValidatorResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -336,13 +327,12 @@ func (k Querier) DelegatorValidator(c context.Context, req *types.QueryDelegator return nil, status.Error(codes.InvalidArgument, "validator address cannot be empty") } - ctx := sdk.UnwrapSDKContext(c) delAddr, err := k.authKeeper.AddressCodec().StringToBytes(req.DelegatorAddr) if err != nil { return nil, err } - valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddr) + valAddr, err := k.validatorAddressCodec.StringToBytes(req.ValidatorAddr) if err != nil { return nil, err } @@ -356,7 +346,7 @@ func (k Querier) DelegatorValidator(c context.Context, req *types.QueryDelegator } // DelegatorUnbondingDelegations queries all unbonding delegations of a given delegator address -func (k Querier) DelegatorUnbondingDelegations(c context.Context, req *types.QueryDelegatorUnbondingDelegationsRequest) (*types.QueryDelegatorUnbondingDelegationsResponse, error) { +func (k Querier) DelegatorUnbondingDelegations(ctx context.Context, req *types.QueryDelegatorUnbondingDelegationsRequest) (*types.QueryDelegatorUnbondingDelegationsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -365,14 +355,13 @@ func (k Querier) DelegatorUnbondingDelegations(c context.Context, req *types.Que return nil, status.Error(codes.InvalidArgument, "delegator address cannot be empty") } var unbondingDelegations types.UnbondingDelegations - ctx := sdk.UnwrapSDKContext(c) - store := ctx.KVStore(k.storeKey) delAddr, err := k.authKeeper.AddressCodec().StringToBytes(req.DelegatorAddr) if err != nil { return nil, err } + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) unbStore := prefix.NewStore(store, types.GetUBDsKey(delAddr)) pageRes, err := query.Paginate(unbStore, req.Pagination, func(key, value []byte) error { unbond, err := types.UnmarshalUBD(k.cdc, value) @@ -392,7 +381,7 @@ func (k Querier) DelegatorUnbondingDelegations(c context.Context, req *types.Que } // HistoricalInfo queries the historical info for given height -func (k Querier) HistoricalInfo(c context.Context, req *types.QueryHistoricalInfoRequest) (*types.QueryHistoricalInfoResponse, error) { +func (k Querier) HistoricalInfo(ctx context.Context, req *types.QueryHistoricalInfoRequest) (*types.QueryHistoricalInfoResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -400,9 +389,9 @@ func (k Querier) HistoricalInfo(c context.Context, req *types.QueryHistoricalInf if req.Height < 0 { return nil, status.Error(codes.InvalidArgument, "height cannot be negative") } - ctx := sdk.UnwrapSDKContext(c) - hi, found := k.GetHistoricalInfo(ctx, req.Height) - if !found { + + hi, err := k.GetHistoricalInfo(ctx, req.Height) + if err != nil { return nil, status.Errorf(codes.NotFound, "historical info for height %d not found", req.Height) } @@ -410,7 +399,7 @@ func (k Querier) HistoricalInfo(c context.Context, req *types.QueryHistoricalInf } // Redelegations queries redelegations of given address -func (k Querier) Redelegations(c context.Context, req *types.QueryRedelegationsRequest) (*types.QueryRedelegationsResponse, error) { +func (k Querier) Redelegations(ctx context.Context, req *types.QueryRedelegationsRequest) (*types.QueryRedelegationsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -419,8 +408,7 @@ func (k Querier) Redelegations(c context.Context, req *types.QueryRedelegationsR var pageRes *query.PageResponse var err error - ctx := sdk.UnwrapSDKContext(c) - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) switch { case req.DelegatorAddr != "" && req.SrcValidatorAddr != "" && req.DstValidatorAddr != "": redels, err = queryRedelegation(ctx, k, req) @@ -432,7 +420,7 @@ func (k Querier) Redelegations(c context.Context, req *types.QueryRedelegationsR if err != nil { return nil, status.Error(codes.Internal, err.Error()) } - redelResponses, err := RedelegationsToRedelegationResponses(ctx, k.Keeper, redels) + redelResponses, err := redelegationsToRedelegationResponses(ctx, k.Keeper, redels) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -441,7 +429,7 @@ func (k Querier) Redelegations(c context.Context, req *types.QueryRedelegationsR } // DelegatorValidators queries all validators info for given delegator address -func (k Querier) DelegatorValidators(c context.Context, req *types.QueryDelegatorValidatorsRequest) (*types.QueryDelegatorValidatorsResponse, error) { +func (k Querier) DelegatorValidators(ctx context.Context, req *types.QueryDelegatorValidatorsRequest) (*types.QueryDelegatorValidatorsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -450,9 +438,8 @@ func (k Querier) DelegatorValidators(c context.Context, req *types.QueryDelegato return nil, status.Error(codes.InvalidArgument, "delegator address cannot be empty") } var validators types.Validators - ctx := sdk.UnwrapSDKContext(c) - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) delAddr, err := k.authKeeper.AddressCodec().StringToBytes(req.DelegatorAddr) if err != nil { return nil, err @@ -465,25 +452,32 @@ func (k Querier) DelegatorValidators(c context.Context, req *types.QueryDelegato return err } - validator, found := k.GetValidator(ctx, delegation.GetValidatorAddr()) - if !found { - return types.ErrNoValidatorFound + valAddr, err := k.validatorAddressCodec.StringToBytes(delegation.GetValidatorAddr()) + if err != nil { + return err + } + + validator, err := k.GetValidator(ctx, valAddr) + if err != nil { + return err } - validators = append(validators, validator) + validators.Validators = append(validators.Validators, validator) return nil }) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } - return &types.QueryDelegatorValidatorsResponse{Validators: validators, Pagination: pageRes}, nil + return &types.QueryDelegatorValidatorsResponse{Validators: validators.Validators, Pagination: pageRes}, nil } // Pool queries the pool info -func (k Querier) Pool(c context.Context, _ *types.QueryPoolRequest) (*types.QueryPoolResponse, error) { - ctx := sdk.UnwrapSDKContext(c) - bondDenom := k.BondDenom(ctx) +func (k Querier) Pool(ctx context.Context, _ *types.QueryPoolRequest) (*types.QueryPoolResponse, error) { + bondDenom, err := k.BondDenom(ctx) + if err != nil { + return nil, err + } bondedPool := k.GetBondedPool(ctx) notBondedPool := k.GetNotBondedPool(ctx) @@ -496,31 +490,32 @@ func (k Querier) Pool(c context.Context, _ *types.QueryPoolRequest) (*types.Quer } // Params queries the staking parameters -func (k Querier) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { - ctx := sdk.UnwrapSDKContext(c) - params := k.GetParams(ctx) - +func (k Querier) Params(ctx context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { + params, err := k.GetParams(ctx) + if err != nil { + return nil, err + } return &types.QueryParamsResponse{Params: params}, nil } -func queryRedelegation(ctx sdk.Context, k Querier, req *types.QueryRedelegationsRequest) (redels types.Redelegations, err error) { +func queryRedelegation(ctx context.Context, k Querier, req *types.QueryRedelegationsRequest) (redels types.Redelegations, err error) { delAddr, err := k.authKeeper.AddressCodec().StringToBytes(req.DelegatorAddr) if err != nil { return nil, err } - srcValAddr, err := sdk.ValAddressFromBech32(req.SrcValidatorAddr) + srcValAddr, err := k.validatorAddressCodec.StringToBytes(req.SrcValidatorAddr) if err != nil { return nil, err } - dstValAddr, err := sdk.ValAddressFromBech32(req.DstValidatorAddr) + dstValAddr, err := k.validatorAddressCodec.StringToBytes(req.DstValidatorAddr) if err != nil { return nil, err } - redel, found := k.GetRedelegation(ctx, delAddr, srcValAddr, dstValAddr) - if !found { + redel, err := k.GetRedelegation(ctx, delAddr, srcValAddr, dstValAddr) + if err != nil { return nil, status.Errorf( codes.NotFound, "redelegation not found for delegator address %s from validator address %s", @@ -528,11 +523,11 @@ func queryRedelegation(ctx sdk.Context, k Querier, req *types.QueryRedelegations } redels = []types.Redelegation{redel} - return redels, err + return redels, nil } func queryRedelegationsFromSrcValidator(store storetypes.KVStore, k Querier, req *types.QueryRedelegationsRequest) (redels types.Redelegations, res *query.PageResponse, err error) { - valAddr, err := sdk.ValAddressFromBech32(req.SrcValidatorAddr) + valAddr, err := k.validatorAddressCodec.StringToBytes(req.SrcValidatorAddr) if err != nil { return nil, nil, err } @@ -574,30 +569,40 @@ func queryAllRedelegations(store storetypes.KVStore, k Querier, req *types.Query // util -func DelegationToDelegationResponse(ctx sdk.Context, k *Keeper, del types.Delegation) (types.DelegationResponse, error) { - val, found := k.GetValidator(ctx, del.GetValidatorAddr()) - if !found { - return types.DelegationResponse{}, types.ErrNoValidatorFound +func delegationToDelegationResponse(ctx context.Context, k *Keeper, del types.Delegation) (types.DelegationResponse, error) { + valAddr, err := k.validatorAddressCodec.StringToBytes(del.GetValidatorAddr()) + if err != nil { + return types.DelegationResponse{}, err + } + + val, err := k.GetValidator(ctx, valAddr) + if err != nil { + return types.DelegationResponse{}, err + } + + _, err = k.authKeeper.AddressCodec().StringToBytes(del.DelegatorAddress) + if err != nil { + return types.DelegationResponse{}, err } - delegatorAddress, err := k.authKeeper.AddressCodec().StringToBytes(del.DelegatorAddress) + bondDenom, err := k.BondDenom(ctx) if err != nil { return types.DelegationResponse{}, err } return types.NewDelegationResp( - delegatorAddress, + del.DelegatorAddress, del.GetValidatorAddr(), del.Shares, - sdk.NewCoin(k.BondDenom(ctx), val.TokensFromShares(del.Shares).TruncateInt()), + sdk.NewCoin(bondDenom, val.TokensFromShares(del.Shares).TruncateInt()), ), nil } -func DelegationsToDelegationResponses(ctx sdk.Context, k *Keeper, delegations types.Delegations) (types.DelegationResponses, error) { +func delegationsToDelegationResponses(ctx context.Context, k *Keeper, delegations types.Delegations) (types.DelegationResponses, error) { resp := make(types.DelegationResponses, len(delegations)) for i, del := range delegations { - delResp, err := DelegationToDelegationResponse(ctx, k, del) + delResp, err := delegationToDelegationResponse(ctx, k, del) if err != nil { return nil, err } @@ -608,27 +613,27 @@ func DelegationsToDelegationResponses(ctx sdk.Context, k *Keeper, delegations ty return resp, nil } -func RedelegationsToRedelegationResponses(ctx sdk.Context, k *Keeper, redels types.Redelegations) (types.RedelegationResponses, error) { +func redelegationsToRedelegationResponses(ctx context.Context, k *Keeper, redels types.Redelegations) (types.RedelegationResponses, error) { resp := make(types.RedelegationResponses, len(redels)) for i, redel := range redels { - valSrcAddr, err := sdk.ValAddressFromBech32(redel.ValidatorSrcAddress) + _, err := k.validatorAddressCodec.StringToBytes(redel.ValidatorSrcAddress) if err != nil { - panic(err) + return nil, err } - valDstAddr, err := sdk.ValAddressFromBech32(redel.ValidatorDstAddress) + valDstAddr, err := k.validatorAddressCodec.StringToBytes(redel.ValidatorDstAddress) if err != nil { - panic(err) + return nil, err } - delegatorAddress, err := k.authKeeper.AddressCodec().StringToBytes(redel.DelegatorAddress) + _, err = k.authKeeper.AddressCodec().StringToBytes(redel.DelegatorAddress) if err != nil { return nil, err } - val, found := k.GetValidator(ctx, valDstAddr) - if !found { - return nil, types.ErrNoValidatorFound + val, err := k.GetValidator(ctx, valDstAddr) + if err != nil { + return nil, err } entryResponses := make([]types.RedelegationEntryResponse, len(redel.Entries)) @@ -644,9 +649,9 @@ func RedelegationsToRedelegationResponses(ctx sdk.Context, k *Keeper, redels typ } resp[i] = types.NewRedelegationResponse( - delegatorAddress, - valSrcAddr, - valDstAddr, + redel.DelegatorAddress, + redel.ValidatorSrcAddress, + redel.ValidatorDstAddress, entryResponses, ) } diff --git a/x/staking/keeper/grpc_query_test.go b/x/staking/keeper/grpc_query_test.go index 597636a9ec02..b55539d1b538 100644 --- a/x/staking/keeper/grpc_query_test.go +++ b/x/staking/keeper/grpc_query_test.go @@ -14,7 +14,7 @@ func (s *KeeperTestSuite) TestGRPCQueryValidator() { require := s.Require() validator := testutil.NewValidator(s.T(), sdk.ValAddress(PKs[0].Address().Bytes()), PKs[0]) - keeper.SetValidator(ctx, validator) + require.NoError(keeper.SetValidator(ctx, validator)) var req *types.QueryValidatorRequest testCases := []struct { msg string diff --git a/x/staking/keeper/historical_info.go b/x/staking/keeper/historical_info.go index 47895b19f8be..8b970b8af2d4 100644 --- a/x/staking/keeper/historical_info.go +++ b/x/staking/keeper/historical_info.go @@ -1,6 +1,9 @@ package keeper import ( + "context" + "errors" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -8,69 +11,85 @@ import ( ) // GetHistoricalInfo gets the historical info at a given height -func (k Keeper) GetHistoricalInfo(ctx sdk.Context, height int64) (types.HistoricalInfo, bool) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) GetHistoricalInfo(ctx context.Context, height int64) (types.HistoricalInfo, error) { + store := k.storeService.OpenKVStore(ctx) key := types.GetHistoricalInfoKey(height) - value := store.Get(key) + value, err := store.Get(key) + if err != nil { + return types.HistoricalInfo{}, err + } + if value == nil { - return types.HistoricalInfo{}, false + return types.HistoricalInfo{}, types.ErrNoHistoricalInfo } - return types.MustUnmarshalHistoricalInfo(k.cdc, value), true + return types.UnmarshalHistoricalInfo(k.cdc, value) } // SetHistoricalInfo sets the historical info at a given height -func (k Keeper) SetHistoricalInfo(ctx sdk.Context, height int64, hi *types.HistoricalInfo) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) SetHistoricalInfo(ctx context.Context, height int64, hi *types.HistoricalInfo) error { + store := k.storeService.OpenKVStore(ctx) key := types.GetHistoricalInfoKey(height) - value := k.cdc.MustMarshal(hi) - store.Set(key, value) + value, err := k.cdc.Marshal(hi) + if err != nil { + return err + } + return store.Set(key, value) } // DeleteHistoricalInfo deletes the historical info at a given height -func (k Keeper) DeleteHistoricalInfo(ctx sdk.Context, height int64) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) DeleteHistoricalInfo(ctx context.Context, height int64) error { + store := k.storeService.OpenKVStore(ctx) key := types.GetHistoricalInfoKey(height) - store.Delete(key) + return store.Delete(key) } -// IterateHistoricalInfo provides an interator over all stored HistoricalInfo -// -// objects. For each HistoricalInfo object, cb will be called. If the cb returns -// -// true, the iterator will close and stop. -func (k Keeper) IterateHistoricalInfo(ctx sdk.Context, cb func(types.HistoricalInfo) bool) { - store := ctx.KVStore(k.storeKey) - - iterator := storetypes.KVStorePrefixIterator(store, types.HistoricalInfoKey) +// IterateHistoricalInfo provides an iterator over all stored HistoricalInfo +// objects. For each HistoricalInfo object, cb will be called. If the cb returns +// true, the iterator will break and close. +func (k Keeper) IterateHistoricalInfo(ctx context.Context, cb func(types.HistoricalInfo) bool) error { + store := k.storeService.OpenKVStore(ctx) + iterator, err := store.Iterator(types.HistoricalInfoKey, storetypes.PrefixEndBytes(types.HistoricalInfoKey)) + if err != nil { + return err + } defer iterator.Close() for ; iterator.Valid(); iterator.Next() { - histInfo := types.MustUnmarshalHistoricalInfo(k.cdc, iterator.Value()) + histInfo, err := types.UnmarshalHistoricalInfo(k.cdc, iterator.Value()) + if err != nil { + return err + } if cb(histInfo) { break } } + + return nil } // GetAllHistoricalInfo returns all stored HistoricalInfo objects. -func (k Keeper) GetAllHistoricalInfo(ctx sdk.Context) []types.HistoricalInfo { +func (k Keeper) GetAllHistoricalInfo(ctx context.Context) ([]types.HistoricalInfo, error) { var infos []types.HistoricalInfo - - k.IterateHistoricalInfo(ctx, func(histInfo types.HistoricalInfo) bool { + err := k.IterateHistoricalInfo(ctx, func(histInfo types.HistoricalInfo) bool { infos = append(infos, histInfo) return false }) - return infos + return infos, err } // TrackHistoricalInfo saves the latest historical-info and deletes the oldest // heights that are below pruning height -func (k Keeper) TrackHistoricalInfo(ctx sdk.Context) { - entryNum := k.HistoricalEntries(ctx) +func (k Keeper) TrackHistoricalInfo(ctx context.Context) error { + entryNum, err := k.HistoricalEntries(ctx) + if err != nil { + return err + } + + sdkCtx := sdk.UnwrapSDKContext(ctx) // Prune store to ensure we only have parameter-defined historical entries. // In most cases, this will involve removing a single historical entry. @@ -79,24 +98,32 @@ func (k Keeper) TrackHistoricalInfo(ctx sdk.Context) { // Since the entries to be deleted are always in a continuous range, we can iterate // over the historical entries starting from the most recent version to be pruned // and then return at the first empty entry. - for i := ctx.BlockHeight() - int64(entryNum); i >= 0; i-- { - _, found := k.GetHistoricalInfo(ctx, i) - if found { - k.DeleteHistoricalInfo(ctx, i) - } else { - break + for i := sdkCtx.BlockHeight() - int64(entryNum); i >= 0; i-- { + _, err := k.GetHistoricalInfo(ctx, i) + if err != nil { + if errors.Is(err, types.ErrNoHistoricalInfo) { + break + } + return err + } + if err = k.DeleteHistoricalInfo(ctx, i); err != nil { + return err } } // if there is no need to persist historicalInfo, return if entryNum == 0 { - return + return nil } // Create HistoricalInfo struct - lastVals := k.GetLastValidators(ctx) - historicalEntry := types.NewHistoricalInfo(ctx.BlockHeader(), lastVals, k.PowerReduction(ctx)) + lastVals, err := k.GetLastValidators(ctx) + if err != nil { + return err + } + + historicalEntry := types.NewHistoricalInfo(sdkCtx.BlockHeader(), types.Validators{Validators: lastVals, ValidatorCodec: k.validatorAddressCodec}, k.PowerReduction(ctx)) // Set latest HistoricalInfo at current height - k.SetHistoricalInfo(ctx, ctx.BlockHeight(), &historicalEntry) + return k.SetHistoricalInfo(ctx, sdkCtx.BlockHeight(), &historicalEntry) } diff --git a/x/staking/keeper/historical_info_test.go b/x/staking/keeper/historical_info_test.go index f3b68ceec48a..b1ce611919e6 100644 --- a/x/staking/keeper/historical_info_test.go +++ b/x/staking/keeper/historical_info_test.go @@ -32,18 +32,18 @@ func (s *KeeperTestSuite) TestHistoricalInfo() { validators[i] = testutil.NewValidator(s.T(), valAddr, PKs[i]) } - hi := stakingtypes.NewHistoricalInfo(ctx.BlockHeader(), validators, keeper.PowerReduction(ctx)) - keeper.SetHistoricalInfo(ctx, 2, &hi) + hi := stakingtypes.NewHistoricalInfo(ctx.BlockHeader(), stakingtypes.Validators{Validators: validators}, keeper.PowerReduction(ctx)) + require.NoError(keeper.SetHistoricalInfo(ctx, 2, &hi)) - recv, found := keeper.GetHistoricalInfo(ctx, 2) - require.True(found, "HistoricalInfo not found after set") + recv, err := keeper.GetHistoricalInfo(ctx, 2) + require.NoError(err, "HistoricalInfo not found after set") require.Equal(hi, recv, "HistoricalInfo not equal") require.True(IsValSetSorted(recv.Valset, keeper.PowerReduction(ctx)), "HistoricalInfo validators is not sorted") - keeper.DeleteHistoricalInfo(ctx, 2) + require.NoError(keeper.DeleteHistoricalInfo(ctx, 2)) - recv, found = keeper.GetHistoricalInfo(ctx, 2) - require.False(found, "HistoricalInfo found after delete") + recv, err = keeper.GetHistoricalInfo(ctx, 2) + require.ErrorIs(err, stakingtypes.ErrNoHistoricalInfo, "HistoricalInfo found after delete") require.Equal(stakingtypes.HistoricalInfo{}, recv, "HistoricalInfo is not empty") } @@ -56,7 +56,7 @@ func (s *KeeperTestSuite) TestTrackHistoricalInfo() { // set historical entries in params to 5 params := stakingtypes.DefaultParams() params.HistoricalEntries = 5 - keeper.SetParams(ctx, params) + require.NoError(keeper.SetParams(ctx, params)) // set historical info at 5, 4 which should be pruned // and check that it has been stored @@ -72,28 +72,32 @@ func (s *KeeperTestSuite) TestTrackHistoricalInfo() { testutil.NewValidator(s.T(), addrVals[0], PKs[0]), testutil.NewValidator(s.T(), addrVals[1], PKs[1]), } - hi4 := stakingtypes.NewHistoricalInfo(h4, valSet, keeper.PowerReduction(ctx)) - hi5 := stakingtypes.NewHistoricalInfo(h5, valSet, keeper.PowerReduction(ctx)) - keeper.SetHistoricalInfo(ctx, 4, &hi4) - keeper.SetHistoricalInfo(ctx, 5, &hi5) - recv, found := keeper.GetHistoricalInfo(ctx, 4) - require.True(found) + hi4 := stakingtypes.NewHistoricalInfo(h4, stakingtypes.Validators{Validators: valSet}, keeper.PowerReduction(ctx)) + hi5 := stakingtypes.NewHistoricalInfo(h5, stakingtypes.Validators{Validators: valSet}, keeper.PowerReduction(ctx)) + require.NoError(keeper.SetHistoricalInfo(ctx, 4, &hi4)) + require.NoError(keeper.SetHistoricalInfo(ctx, 5, &hi5)) + recv, err := keeper.GetHistoricalInfo(ctx, 4) + require.NoError(err) require.Equal(hi4, recv) - recv, found = keeper.GetHistoricalInfo(ctx, 5) - require.True(found) + recv, err = keeper.GetHistoricalInfo(ctx, 5) + require.NoError(err) require.Equal(hi5, recv) // Set bonded validators in keeper val1 := testutil.NewValidator(s.T(), addrVals[2], PKs[2]) val1.Status = stakingtypes.Bonded // when not bonded, consensus power is Zero val1.Tokens = keeper.TokensFromConsensusPower(ctx, 10) - keeper.SetValidator(ctx, val1) - keeper.SetLastValidatorPower(ctx, val1.GetOperator(), 10) + require.NoError(keeper.SetValidator(ctx, val1)) + valbz, err := keeper.ValidatorAddressCodec().StringToBytes(val1.GetOperator()) + require.NoError(err) + require.NoError(keeper.SetLastValidatorPower(ctx, valbz, 10)) val2 := testutil.NewValidator(s.T(), addrVals[3], PKs[3]) val1.Status = stakingtypes.Bonded val2.Tokens = keeper.TokensFromConsensusPower(ctx, 80) - keeper.SetValidator(ctx, val2) - keeper.SetLastValidatorPower(ctx, val2.GetOperator(), 80) + require.NoError(keeper.SetValidator(ctx, val2)) + valbz, err = keeper.ValidatorAddressCodec().StringToBytes(val2.GetOperator()) + require.NoError(err) + require.NoError(keeper.SetLastValidatorPower(ctx, valbz, 80)) vals := []stakingtypes.Validator{val1, val2} require.True(IsValSetSorted(vals, keeper.PowerReduction(ctx))) @@ -105,23 +109,23 @@ func (s *KeeperTestSuite) TestTrackHistoricalInfo() { } ctx = ctx.WithBlockHeader(header) - keeper.TrackHistoricalInfo(ctx) + require.NoError(keeper.TrackHistoricalInfo(ctx)) // Check HistoricalInfo at height 10 is persisted expected := stakingtypes.HistoricalInfo{ Header: header, Valset: vals, } - recv, found = keeper.GetHistoricalInfo(ctx, 10) - require.True(found, "GetHistoricalInfo failed after BeginBlock") + recv, err = keeper.GetHistoricalInfo(ctx, 10) + require.NoError(err, "GetHistoricalInfo failed after BeginBlock") require.Equal(expected, recv, "GetHistoricalInfo returned unexpected result") // Check HistoricalInfo at height 5, 4 is pruned - recv, found = keeper.GetHistoricalInfo(ctx, 4) - require.False(found, "GetHistoricalInfo did not prune earlier height") + recv, err = keeper.GetHistoricalInfo(ctx, 4) + require.ErrorIs(err, stakingtypes.ErrNoHistoricalInfo, "GetHistoricalInfo did not prune earlier height") require.Equal(stakingtypes.HistoricalInfo{}, recv, "GetHistoricalInfo at height 4 is not empty after prune") - recv, found = keeper.GetHistoricalInfo(ctx, 5) - require.False(found, "GetHistoricalInfo did not prune first prune height") + recv, err = keeper.GetHistoricalInfo(ctx, 5) + require.ErrorIs(err, stakingtypes.ErrNoHistoricalInfo, "GetHistoricalInfo did not prune first prune height") require.Equal(stakingtypes.HistoricalInfo{}, recv, "GetHistoricalInfo at height 5 is not empty after prune") } @@ -147,9 +151,10 @@ func (s *KeeperTestSuite) TestGetAllHistoricalInfo() { expHistInfos := []stakingtypes.HistoricalInfo{hist1, hist2, hist3} for i, hi := range expHistInfos { - keeper.SetHistoricalInfo(ctx, int64(9+i), &hi) //nolint:gosec // G601: Implicit memory aliasing in for loop. + require.NoError(keeper.SetHistoricalInfo(ctx, int64(9+i), &hi)) //nolint:gosec // G601: Implicit memory aliasing in for loop. } - infos := keeper.GetAllHistoricalInfo(ctx) + infos, err := keeper.GetAllHistoricalInfo(ctx) + require.NoError(err) require.Equal(expHistInfos, infos) } diff --git a/x/staking/keeper/invariants.go b/x/staking/keeper/invariants.go index 975ccc673020..b23922643ed1 100644 --- a/x/staking/keeper/invariants.go +++ b/x/staking/keeper/invariants.go @@ -5,6 +5,7 @@ import ( "fmt" "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking/types" ) @@ -51,9 +52,12 @@ func ModuleAccountInvariants(k *Keeper) sdk.Invariant { notBonded := math.ZeroInt() bondedPool := k.GetBondedPool(ctx) notBondedPool := k.GetNotBondedPool(ctx) - bondDenom := k.BondDenom(ctx) + bondDenom, err := k.BondDenom(ctx) + if err != nil { + panic(err) + } - k.IterateValidators(ctx, func(_ int64, validator types.ValidatorI) bool { + err = k.IterateValidators(ctx, func(_ int64, validator types.ValidatorI) bool { switch validator.GetStatus() { case types.Bonded: bonded = bonded.Add(validator.GetTokens()) @@ -64,13 +68,19 @@ func ModuleAccountInvariants(k *Keeper) sdk.Invariant { } return false }) + if err != nil { + panic(err) + } - k.IterateUnbondingDelegations(ctx, func(_ int64, ubd types.UnbondingDelegation) bool { + err = k.IterateUnbondingDelegations(ctx, func(_ int64, ubd types.UnbondingDelegation) bool { for _, entry := range ubd.Entries { notBonded = notBonded.Add(entry.Balance) } return false }) + if err != nil { + panic(err) + } poolBonded := k.bankKeeper.GetBalance(ctx, bondedPool.GetAddress(), bondDenom) poolNotBonded := k.bankKeeper.GetBalance(ctx, notBondedPool.GetAddress(), bondDenom) @@ -99,14 +109,17 @@ func NonNegativePowerInvariant(k *Keeper) sdk.Invariant { broken bool ) - iterator := k.ValidatorsPowerStoreIterator(ctx) + iterator, err := k.ValidatorsPowerStoreIterator(ctx) + if err != nil { + panic(err) + } for ; iterator.Valid(); iterator.Next() { - validator, found := k.GetValidator(ctx, iterator.Value()) - if !found { + validator, err := k.GetValidator(ctx, iterator.Value()) + if err != nil { panic(fmt.Sprintf("validator record not found for address: %X\n", iterator.Value())) } - powerKey := types.GetValidatorsByPowerIndexKey(validator, k.PowerReduction(ctx)) + powerKey := types.GetValidatorsByPowerIndexKey(validator, k.PowerReduction(ctx), k.ValidatorAddressCodec()) if !bytes.Equal(iterator.Key(), powerKey) { broken = true @@ -134,7 +147,10 @@ func PositiveDelegationInvariant(k *Keeper) sdk.Invariant { count int ) - delegations := k.GetAllDelegations(ctx) + delegations, err := k.GetAllDelegations(ctx) + if err != nil { + panic(err) + } for _, delegation := range delegations { if delegation.Shares.IsNegative() { count++ @@ -164,18 +180,26 @@ func DelegatorSharesInvariant(k *Keeper) sdk.Invariant { broken bool ) - validators := k.GetAllValidators(ctx) + validators, err := k.GetAllValidators(ctx) + if err != nil { + panic(err) + } + validatorsDelegationShares := map[string]math.LegacyDec{} // initialize a map: validator -> its delegation shares for _, validator := range validators { - validatorsDelegationShares[validator.GetOperator().String()] = math.LegacyZeroDec() + validatorsDelegationShares[validator.GetOperator()] = math.LegacyZeroDec() } // iterate through all the delegations to calculate the total delegation shares for each validator - delegations := k.GetAllDelegations(ctx) + delegations, err := k.GetAllDelegations(ctx) + if err != nil { + panic(err) + } + for _, delegation := range delegations { - delegationValidatorAddr := delegation.GetValidatorAddr().String() + delegationValidatorAddr := delegation.GetValidatorAddr() validatorDelegationShares := validatorsDelegationShares[delegationValidatorAddr] validatorsDelegationShares[delegationValidatorAddr] = validatorDelegationShares.Add(delegation.Shares) } @@ -183,7 +207,7 @@ func DelegatorSharesInvariant(k *Keeper) sdk.Invariant { // for each validator, check if its total delegation shares calculated from the step above equals to its expected delegation shares for _, validator := range validators { expValTotalDelShares := validator.GetDelegatorShares() - calculatedValTotalDelShares := validatorsDelegationShares[validator.GetOperator().String()] + calculatedValTotalDelShares := validatorsDelegationShares[validator.GetOperator()] if !calculatedValTotalDelShares.Equal(expValTotalDelShares) { broken = true msg += fmt.Sprintf("broken delegator shares invariance:\n"+ diff --git a/x/staking/keeper/keeper.go b/x/staking/keeper/keeper.go index a9dd46b9a357..45948f72224c 100644 --- a/x/staking/keeper/keeper.go +++ b/x/staking/keeper/keeper.go @@ -1,13 +1,16 @@ package keeper import ( + "context" "fmt" + abci "github.com/cometbft/cometbft/abci/types" + + addresscodec "cosmossdk.io/core/address" + storetypes "cosmossdk.io/core/store" "cosmossdk.io/log" "cosmossdk.io/math" - abci "github.com/cometbft/cometbft/abci/types" - storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -21,21 +24,25 @@ var _ types.DelegationSet = Keeper{} // Keeper of the x/staking store type Keeper struct { - storeKey storetypes.StoreKey - cdc codec.BinaryCodec - authKeeper types.AccountKeeper - bankKeeper types.BankKeeper - hooks types.StakingHooks - authority string + storeService storetypes.KVStoreService + cdc codec.BinaryCodec + authKeeper types.AccountKeeper + bankKeeper types.BankKeeper + hooks types.StakingHooks + authority string + validatorAddressCodec addresscodec.Codec + consensusAddressCodec addresscodec.Codec } // NewKeeper creates a new staking Keeper instance func NewKeeper( cdc codec.BinaryCodec, - key storetypes.StoreKey, + storeService storetypes.KVStoreService, ak types.AccountKeeper, bk types.BankKeeper, authority string, + validatorAddressCodec addresscodec.Codec, + consensusAddressCodec addresscodec.Codec, ) *Keeper { // ensure bonded and not bonded module accounts are set if addr := ak.GetModuleAddress(types.BondedPoolName); addr == nil { @@ -51,19 +58,26 @@ func NewKeeper( panic("authority is not a valid acc address") } + if validatorAddressCodec == nil || consensusAddressCodec == nil { + panic("validator and/or consensus address codec are nil") + } + return &Keeper{ - storeKey: key, - cdc: cdc, - authKeeper: ak, - bankKeeper: bk, - hooks: nil, - authority: authority, + storeService: storeService, + cdc: cdc, + authKeeper: ak, + bankKeeper: bk, + hooks: nil, + authority: authority, + validatorAddressCodec: validatorAddressCodec, + consensusAddressCodec: consensusAddressCodec, } } // Logger returns a module-specific logger. -func (k Keeper) Logger(ctx sdk.Context) log.Logger { - return ctx.Logger().With("module", "x/"+types.ModuleName) +func (k Keeper) Logger(ctx context.Context) log.Logger { + sdkCtx := sdk.UnwrapSDKContext(ctx) + return sdkCtx.Logger().With("module", "x/"+types.ModuleName) } // Hooks gets the hooks for staking *Keeper { @@ -76,7 +90,7 @@ func (k *Keeper) Hooks() types.StakingHooks { return k.hooks } -// SetHooks Set the validator hooks. In contrast to other receivers, this method must take a pointer due to nature +// SetHooks sets the validator hooks. In contrast to other receivers, this method must take a pointer due to nature // of the hooks interface and SDK start up sequence. func (k *Keeper) SetHooks(sh types.StakingHooks) { if k.hooks != nil { @@ -86,26 +100,35 @@ func (k *Keeper) SetHooks(sh types.StakingHooks) { k.hooks = sh } -// GetLastTotalPower Load the last total validator power. -func (k Keeper) GetLastTotalPower(ctx sdk.Context) math.Int { - store := ctx.KVStore(k.storeKey) - bz := store.Get(types.LastTotalPowerKey) +// GetLastTotalPower loads the last total validator power. +func (k Keeper) GetLastTotalPower(ctx context.Context) (math.Int, error) { + store := k.storeService.OpenKVStore(ctx) + bz, err := store.Get(types.LastTotalPowerKey) + if err != nil { + return math.ZeroInt(), err + } if bz == nil { - return math.ZeroInt() + return math.ZeroInt(), nil } ip := sdk.IntProto{} - k.cdc.MustUnmarshal(bz, &ip) + err = k.cdc.Unmarshal(bz, &ip) + if err != nil { + return math.ZeroInt(), err + } - return ip.Int + return ip.Int, nil } -// SetLastTotalPower Set the last total validator power. -func (k Keeper) SetLastTotalPower(ctx sdk.Context, power math.Int) { - store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshal(&sdk.IntProto{Int: power}) - store.Set(types.LastTotalPowerKey, bz) +// SetLastTotalPower sets the last total validator power. +func (k Keeper) SetLastTotalPower(ctx context.Context, power math.Int) error { + store := k.storeService.OpenKVStore(ctx) + bz, err := k.cdc.Marshal(&sdk.IntProto{Int: power}) + if err != nil { + return err + } + return store.Set(types.LastTotalPowerKey, bz) } // GetAuthority returns the x/staking module's authority. @@ -113,20 +136,39 @@ func (k Keeper) GetAuthority() string { return k.authority } +// ValidatorAddressCodec returns the app validator address codec. +func (k Keeper) ValidatorAddressCodec() addresscodec.Codec { + return k.validatorAddressCodec +} + +// ConsensusAddressCodec returns the app consensus address codec. +func (k Keeper) ConsensusAddressCodec() addresscodec.Codec { + return k.consensusAddressCodec +} + // SetValidatorUpdates sets the ABCI validator power updates for the current block. -func (k Keeper) SetValidatorUpdates(ctx sdk.Context, valUpdates []abci.ValidatorUpdate) { - store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshal(&types.ValidatorUpdates{Updates: valUpdates}) - store.Set(types.ValidatorUpdatesKey, bz) +func (k Keeper) SetValidatorUpdates(ctx context.Context, valUpdates []abci.ValidatorUpdate) error { + store := k.storeService.OpenKVStore(ctx) + bz, err := k.cdc.Marshal(&types.ValidatorUpdates{Updates: valUpdates}) + if err != nil { + return err + } + return store.Set(types.ValidatorUpdatesKey, bz) } // GetValidatorUpdates returns the ABCI validator power updates within the current block. -func (k Keeper) GetValidatorUpdates(ctx sdk.Context) []abci.ValidatorUpdate { - store := ctx.KVStore(k.storeKey) - bz := store.Get(types.ValidatorUpdatesKey) +func (k Keeper) GetValidatorUpdates(ctx context.Context) ([]abci.ValidatorUpdate, error) { + store := k.storeService.OpenKVStore(ctx) + bz, err := store.Get(types.ValidatorUpdatesKey) + if err != nil { + return nil, err + } var valUpdates types.ValidatorUpdates - k.cdc.MustUnmarshal(bz, &valUpdates) + err = k.cdc.Unmarshal(bz, &valUpdates) + if err != nil { + return nil, err + } - return valUpdates.Updates + return valUpdates.Updates, nil } diff --git a/x/staking/keeper/keeper_test.go b/x/staking/keeper/keeper_test.go index bbfbeda17467..ce2000f733b8 100644 --- a/x/staking/keeper/keeper_test.go +++ b/x/staking/keeper/keeper_test.go @@ -3,16 +3,17 @@ package keeper_test import ( "testing" - "cosmossdk.io/math" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" cmttime "github.com/cometbft/cometbft/types/time" "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" + "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec/address" + "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" @@ -42,7 +43,9 @@ type KeeperTestSuite struct { } func (s *KeeperTestSuite) SetupTest() { + require := s.Require() key := storetypes.NewKVStoreKey(stakingtypes.StoreKey) + storeService := runtime.NewKVStoreService(key) testCtx := testutil.DefaultContextWithDB(s.T(), key, storetypes.NewTransientStoreKey("transient_test")) ctx := testCtx.Ctx.WithBlockHeader(cmtproto.Header{Time: cmttime.Now()}) encCfg := moduletestutil.MakeTestEncodingConfig() @@ -57,12 +60,14 @@ func (s *KeeperTestSuite) SetupTest() { keeper := stakingkeeper.NewKeeper( encCfg.Codec, - key, + storeService, accountKeeper, bankKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), + address.NewBech32Codec("cosmosvaloper"), + address.NewBech32Codec("cosmosvalcons"), ) - keeper.SetParams(ctx, stakingtypes.DefaultParams()) + require.NoError(keeper.SetParams(ctx, stakingtypes.DefaultParams())) s.ctx = ctx s.stakingKeeper = keeper @@ -82,13 +87,15 @@ func (s *KeeperTestSuite) TestParams() { expParams := stakingtypes.DefaultParams() // check that the empty keeper loads the default - resParams := keeper.GetParams(ctx) + resParams, err := keeper.GetParams(ctx) + require.NoError(err) require.Equal(expParams, resParams) expParams.MaxValidators = 555 expParams.MaxEntries = 111 - keeper.SetParams(ctx, expParams) - resParams = keeper.GetParams(ctx) + require.NoError(keeper.SetParams(ctx, expParams)) + resParams, err = keeper.GetParams(ctx) + require.NoError(err) require.True(expParams.Equal(resParams)) } @@ -97,8 +104,9 @@ func (s *KeeperTestSuite) TestLastTotalPower() { require := s.Require() expTotalPower := math.NewInt(10 ^ 9) - keeper.SetLastTotalPower(ctx, expTotalPower) - resTotalPower := keeper.GetLastTotalPower(ctx) + require.NoError(keeper.SetLastTotalPower(ctx, expTotalPower)) + resTotalPower, err := keeper.GetLastTotalPower(ctx) + require.NoError(err) require.True(expTotalPower.Equal(resTotalPower)) } diff --git a/x/staking/keeper/migrations.go b/x/staking/keeper/migrations.go index 8782f5978316..e94848b13397 100644 --- a/x/staking/keeper/migrations.go +++ b/x/staking/keeper/migrations.go @@ -1,6 +1,7 @@ package keeper import ( + "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking/exported" v2 "github.com/cosmos/cosmos-sdk/x/staking/migrations/v2" @@ -15,7 +16,7 @@ type Migrator struct { legacySubspace exported.Subspace } -// NewMigrator returns a new Migrator. +// NewMigrator returns a new Migrator instance. func NewMigrator(keeper *Keeper, legacySubspace exported.Subspace) Migrator { return Migrator{ keeper: keeper, @@ -25,20 +26,24 @@ func NewMigrator(keeper *Keeper, legacySubspace exported.Subspace) Migrator { // Migrate1to2 migrates from version 1 to 2. func (m Migrator) Migrate1to2(ctx sdk.Context) error { - return v2.MigrateStore(ctx, m.keeper.storeKey) + store := runtime.KVStoreAdapter(m.keeper.storeService.OpenKVStore(ctx)) + return v2.MigrateStore(ctx, store) } // Migrate2to3 migrates x/staking state from consensus version 2 to 3. func (m Migrator) Migrate2to3(ctx sdk.Context) error { - return v3.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc, m.legacySubspace) + store := runtime.KVStoreAdapter(m.keeper.storeService.OpenKVStore(ctx)) + return v3.MigrateStore(ctx, store, m.keeper.cdc, m.legacySubspace) } // Migrate3to4 migrates x/staking state from consensus version 3 to 4. func (m Migrator) Migrate3to4(ctx sdk.Context) error { - return v4.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc, m.legacySubspace) + store := runtime.KVStoreAdapter(m.keeper.storeService.OpenKVStore(ctx)) + return v4.MigrateStore(ctx, store, m.keeper.cdc, m.legacySubspace) } // Migrate4to5 migrates x/staking state from consensus version 4 to 5. func (m Migrator) Migrate4to5(ctx sdk.Context) error { - return v5.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc) + store := runtime.KVStoreAdapter(m.keeper.storeService.OpenKVStore(ctx)) + return v5.MigrateStore(ctx, store, m.keeper.cdc) } diff --git a/x/staking/keeper/msg_server.go b/x/staking/keeper/msg_server.go index 94793e455760..19b7ba7a2593 100644 --- a/x/staking/keeper/msg_server.go +++ b/x/staking/keeper/msg_server.go @@ -5,13 +5,13 @@ import ( "strconv" "time" - errorsmod "cosmossdk.io/errors" - "cosmossdk.io/math" - - "github.com/armon/go-metrics" + "github.com/hashicorp/go-metrics" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/math" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" @@ -24,7 +24,7 @@ type msgServer struct { *Keeper } -// NewMsgServerImpl returns an implementation of the bank MsgServer interface +// NewMsgServerImpl returns an implementation of the staking MsgServer interface // for the provided Keeper. func NewMsgServerImpl(keeper *Keeper) types.MsgServer { return &msgServer{Keeper: keeper} @@ -33,24 +33,27 @@ func NewMsgServerImpl(keeper *Keeper) types.MsgServer { var _ types.MsgServer = msgServer{} // CreateValidator defines a method for creating a new validator -func (k msgServer) CreateValidator(goCtx context.Context, msg *types.MsgCreateValidator) (*types.MsgCreateValidatorResponse, error) { - valAddr, err := sdk.ValAddressFromBech32(msg.ValidatorAddress) +func (k msgServer) CreateValidator(ctx context.Context, msg *types.MsgCreateValidator) (*types.MsgCreateValidatorResponse, error) { + valAddr, err := k.validatorAddressCodec.StringToBytes(msg.ValidatorAddress) if err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid validator address: %s", err) } - if err := msg.Validate(); err != nil { + if err := msg.Validate(k.validatorAddressCodec); err != nil { return nil, err } - ctx := sdk.UnwrapSDKContext(goCtx) + minCommRate, err := k.MinCommissionRate(ctx) + if err != nil { + return nil, err + } - if msg.Commission.Rate.LT(k.MinCommissionRate(ctx)) { - return nil, errorsmod.Wrapf(types.ErrCommissionLTMinRate, "cannot set validator commission to less than minimum rate of %s", k.MinCommissionRate(ctx)) + if msg.Commission.Rate.LT(minCommRate) { + return nil, errorsmod.Wrapf(types.ErrCommissionLTMinRate, "cannot set validator commission to less than minimum rate of %s", minCommRate) } // check to see if the pubkey or sender has been registered before - if _, found := k.GetValidator(ctx, valAddr); found { + if _, err := k.GetValidator(ctx, valAddr); err == nil { return nil, types.ErrValidatorOwnerExists } @@ -59,11 +62,15 @@ func (k msgServer) CreateValidator(goCtx context.Context, msg *types.MsgCreateVa return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidType, "Expecting cryptotypes.PubKey, got %T", pk) } - if _, found := k.GetValidatorByConsAddr(ctx, sdk.GetConsAddress(pk)); found { + if _, err := k.GetValidatorByConsAddr(ctx, sdk.GetConsAddress(pk)); err == nil { return nil, types.ErrValidatorPubKeyExists } - bondDenom := k.BondDenom(ctx) + bondDenom, err := k.BondDenom(ctx) + if err != nil { + return nil, err + } + if msg.Value.Denom != bondDenom { return nil, errorsmod.Wrapf( sdkerrors.ErrInvalidRequest, "invalid coin denomination: got %s, expected %s", msg.Value.Denom, bondDenom, @@ -74,7 +81,8 @@ func (k msgServer) CreateValidator(goCtx context.Context, msg *types.MsgCreateVa return nil, err } - cp := ctx.ConsensusParams() + sdkCtx := sdk.UnwrapSDKContext(ctx) + cp := sdkCtx.ConsensusParams() if cp.Validator != nil { pkType := pk.Type() hasKeyType := false @@ -92,14 +100,14 @@ func (k msgServer) CreateValidator(goCtx context.Context, msg *types.MsgCreateVa } } - validator, err := types.NewValidator(valAddr, pk, msg.Description) + validator, err := types.NewValidator(msg.ValidatorAddress, pk, msg.Description) if err != nil { return nil, err } commission := types.NewCommissionWithTime( msg.Commission.Rate, msg.Commission.MaxRate, - msg.Commission.MaxChangeRate, ctx.BlockHeader().Time, + msg.Commission.MaxChangeRate, sdkCtx.BlockHeader().Time, ) validator, err = validator.SetInitialCommission(commission) @@ -109,12 +117,23 @@ func (k msgServer) CreateValidator(goCtx context.Context, msg *types.MsgCreateVa validator.MinSelfDelegation = msg.MinSelfDelegation - k.SetValidator(ctx, validator) - k.SetValidatorByConsAddr(ctx, validator) - k.SetNewValidatorByPowerIndex(ctx, validator) + err = k.SetValidator(ctx, validator) + if err != nil { + return nil, err + } + + err = k.SetValidatorByConsAddr(ctx, validator) + if err != nil { + return nil, err + } + + err = k.SetNewValidatorByPowerIndex(ctx, validator) + if err != nil { + return nil, err + } // call the after-creation hook - if err := k.Hooks().AfterValidatorCreated(ctx, validator.GetOperator()); err != nil { + if err := k.Hooks().AfterValidatorCreated(ctx, valAddr); err != nil { return nil, err } @@ -126,7 +145,7 @@ func (k msgServer) CreateValidator(goCtx context.Context, msg *types.MsgCreateVa return nil, err } - ctx.EventManager().EmitEvents(sdk.Events{ + sdkCtx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeCreateValidator, sdk.NewAttribute(types.AttributeKeyValidator, msg.ValidatorAddress), @@ -138,8 +157,8 @@ func (k msgServer) CreateValidator(goCtx context.Context, msg *types.MsgCreateVa } // EditValidator defines a method for editing an existing validator -func (k msgServer) EditValidator(goCtx context.Context, msg *types.MsgEditValidator) (*types.MsgEditValidatorResponse, error) { - valAddr, err := sdk.ValAddressFromBech32(msg.ValidatorAddress) +func (k msgServer) EditValidator(ctx context.Context, msg *types.MsgEditValidator) (*types.MsgEditValidatorResponse, error) { + valAddr, err := k.validatorAddressCodec.StringToBytes(msg.ValidatorAddress) if err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid validator address: %s", err) } @@ -159,14 +178,21 @@ func (k msgServer) EditValidator(goCtx context.Context, msg *types.MsgEditValida if msg.CommissionRate.GT(math.LegacyOneDec()) || msg.CommissionRate.IsNegative() { return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "commission rate must be between 0 and 1 (inclusive)") } - } - ctx := sdk.UnwrapSDKContext(goCtx) + minCommissionRate, err := k.MinCommissionRate(ctx) + if err != nil { + return nil, errorsmod.Wrap(sdkerrors.ErrLogic, err.Error()) + } + + if msg.CommissionRate.LT(minCommissionRate) { + return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "commission rate cannot be less than the min commission rate %s", minCommissionRate.String()) + } + } // validator must already be registered - validator, found := k.GetValidator(ctx, valAddr) - if !found { - return nil, types.ErrNoValidatorFound + validator, err := k.GetValidator(ctx, valAddr) + if err != nil { + return nil, err } // replace all editable fields (clients should autofill existing values) @@ -203,9 +229,13 @@ func (k msgServer) EditValidator(goCtx context.Context, msg *types.MsgEditValida validator.MinSelfDelegation = *msg.MinSelfDelegation } - k.SetValidator(ctx, validator) + err = k.SetValidator(ctx, validator) + if err != nil { + return nil, err + } - ctx.EventManager().EmitEvents(sdk.Events{ + sdkCtx := sdk.UnwrapSDKContext(ctx) + sdkCtx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeEditValidator, sdk.NewAttribute(types.AttributeKeyCommissionRate, validator.Commission.String()), @@ -217,8 +247,8 @@ func (k msgServer) EditValidator(goCtx context.Context, msg *types.MsgEditValida } // Delegate defines a method for performing a delegation of coins from a delegator to a validator -func (k msgServer) Delegate(goCtx context.Context, msg *types.MsgDelegate) (*types.MsgDelegateResponse, error) { - valAddr, valErr := sdk.ValAddressFromBech32(msg.ValidatorAddress) +func (k msgServer) Delegate(ctx context.Context, msg *types.MsgDelegate) (*types.MsgDelegateResponse, error) { + valAddr, valErr := k.validatorAddressCodec.StringToBytes(msg.ValidatorAddress) if valErr != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid validator address: %s", valErr) } @@ -235,14 +265,16 @@ func (k msgServer) Delegate(goCtx context.Context, msg *types.MsgDelegate) (*typ ) } - ctx := sdk.UnwrapSDKContext(goCtx) + validator, err := k.GetValidator(ctx, valAddr) + if err != nil { + return nil, err + } - validator, found := k.GetValidator(ctx, valAddr) - if !found { - return nil, types.ErrNoValidatorFound + bondDenom, err := k.BondDenom(ctx) + if err != nil { + return nil, err } - bondDenom := k.BondDenom(ctx) if msg.Amount.Denom != bondDenom { return nil, errorsmod.Wrapf( sdkerrors.ErrInvalidRequest, "invalid coin denomination: got %s, expected %s", msg.Amount.Denom, bondDenom, @@ -266,10 +298,12 @@ func (k msgServer) Delegate(goCtx context.Context, msg *types.MsgDelegate) (*typ }() } - ctx.EventManager().EmitEvents(sdk.Events{ + sdkCtx := sdk.UnwrapSDKContext(ctx) + sdkCtx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeDelegate, sdk.NewAttribute(types.AttributeKeyValidator, msg.ValidatorAddress), + sdk.NewAttribute(types.AttributeKeyDelegator, msg.DelegatorAddress), sdk.NewAttribute(sdk.AttributeKeyAmount, msg.Amount.String()), sdk.NewAttribute(types.AttributeKeyNewShares, newShares.String()), ), @@ -278,14 +312,14 @@ func (k msgServer) Delegate(goCtx context.Context, msg *types.MsgDelegate) (*typ return &types.MsgDelegateResponse{}, nil } -// BeginRedelegate defines a method for performing a redelegation of coins from a delegator and source validator to a destination validator -func (k msgServer) BeginRedelegate(goCtx context.Context, msg *types.MsgBeginRedelegate) (*types.MsgBeginRedelegateResponse, error) { - valSrcAddr, err := sdk.ValAddressFromBech32(msg.ValidatorSrcAddress) +// BeginRedelegate defines a method for performing a redelegation of coins from a source validator to a destination validator of given delegator +func (k msgServer) BeginRedelegate(ctx context.Context, msg *types.MsgBeginRedelegate) (*types.MsgBeginRedelegateResponse, error) { + valSrcAddr, err := k.validatorAddressCodec.StringToBytes(msg.ValidatorSrcAddress) if err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid source validator address: %s", err) } - valDstAddr, err := sdk.ValAddressFromBech32(msg.ValidatorDstAddress) + valDstAddr, err := k.validatorAddressCodec.StringToBytes(msg.ValidatorDstAddress) if err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid destination validator address: %s", err) } @@ -302,8 +336,6 @@ func (k msgServer) BeginRedelegate(goCtx context.Context, msg *types.MsgBeginRed ) } - ctx := sdk.UnwrapSDKContext(goCtx) - shares, err := k.ValidateUnbondAmount( ctx, delegatorAddress, valSrcAddr, msg.Amount.Amount, ) @@ -311,7 +343,11 @@ func (k msgServer) BeginRedelegate(goCtx context.Context, msg *types.MsgBeginRed return nil, err } - bondDenom := k.BondDenom(ctx) + bondDenom, err := k.BondDenom(ctx) + if err != nil { + return nil, err + } + if msg.Amount.Denom != bondDenom { return nil, errorsmod.Wrapf( sdkerrors.ErrInvalidRequest, "invalid coin denomination: got %s, expected %s", msg.Amount.Denom, bondDenom, @@ -336,7 +372,8 @@ func (k msgServer) BeginRedelegate(goCtx context.Context, msg *types.MsgBeginRed }() } - ctx.EventManager().EmitEvents(sdk.Events{ + sdkCtx := sdk.UnwrapSDKContext(ctx) + sdkCtx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeRedelegate, sdk.NewAttribute(types.AttributeKeySrcValidator, msg.ValidatorSrcAddress), @@ -352,8 +389,8 @@ func (k msgServer) BeginRedelegate(goCtx context.Context, msg *types.MsgBeginRed } // Undelegate defines a method for performing an undelegation from a delegate and a validator -func (k msgServer) Undelegate(goCtx context.Context, msg *types.MsgUndelegate) (*types.MsgUndelegateResponse, error) { - addr, err := sdk.ValAddressFromBech32(msg.ValidatorAddress) +func (k msgServer) Undelegate(ctx context.Context, msg *types.MsgUndelegate) (*types.MsgUndelegateResponse, error) { + addr, err := k.validatorAddressCodec.StringToBytes(msg.ValidatorAddress) if err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid validator address: %s", err) } @@ -370,8 +407,6 @@ func (k msgServer) Undelegate(goCtx context.Context, msg *types.MsgUndelegate) ( ) } - ctx := sdk.UnwrapSDKContext(goCtx) - shares, err := k.ValidateUnbondAmount( ctx, delegatorAddress, addr, msg.Amount.Amount, ) @@ -379,7 +414,11 @@ func (k msgServer) Undelegate(goCtx context.Context, msg *types.MsgUndelegate) ( return nil, err } - bondDenom := k.BondDenom(ctx) + bondDenom, err := k.BondDenom(ctx) + if err != nil { + return nil, err + } + if msg.Amount.Denom != bondDenom { return nil, errorsmod.Wrapf( sdkerrors.ErrInvalidRequest, "invalid coin denomination: got %s, expected %s", msg.Amount.Denom, bondDenom, @@ -404,10 +443,12 @@ func (k msgServer) Undelegate(goCtx context.Context, msg *types.MsgUndelegate) ( }() } - ctx.EventManager().EmitEvents(sdk.Events{ + sdkCtx := sdk.UnwrapSDKContext(ctx) + sdkCtx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeUnbond, sdk.NewAttribute(types.AttributeKeyValidator, msg.ValidatorAddress), + sdk.NewAttribute(types.AttributeKeyDelegator, msg.DelegatorAddress), sdk.NewAttribute(sdk.AttributeKeyAmount, undelegatedCoin.String()), sdk.NewAttribute(types.AttributeKeyCompletionTime, completionTime.Format(time.RFC3339)), ), @@ -421,8 +462,8 @@ func (k msgServer) Undelegate(goCtx context.Context, msg *types.MsgUndelegate) ( // CancelUnbondingDelegation defines a method for canceling the unbonding delegation // and delegate back to the validator. -func (k msgServer) CancelUnbondingDelegation(goCtx context.Context, msg *types.MsgCancelUnbondingDelegation) (*types.MsgCancelUnbondingDelegationResponse, error) { - valAddr, err := sdk.ValAddressFromBech32(msg.ValidatorAddress) +func (k msgServer) CancelUnbondingDelegation(ctx context.Context, msg *types.MsgCancelUnbondingDelegation) (*types.MsgCancelUnbondingDelegationResponse, error) { + valAddr, err := k.validatorAddressCodec.StringToBytes(msg.ValidatorAddress) if err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid validator address: %s", err) } @@ -446,18 +487,20 @@ func (k msgServer) CancelUnbondingDelegation(goCtx context.Context, msg *types.M ) } - ctx := sdk.UnwrapSDKContext(goCtx) + bondDenom, err := k.BondDenom(ctx) + if err != nil { + return nil, err + } - bondDenom := k.BondDenom(ctx) if msg.Amount.Denom != bondDenom { return nil, errorsmod.Wrapf( sdkerrors.ErrInvalidRequest, "invalid coin denomination: got %s, expected %s", msg.Amount.Denom, bondDenom, ) } - validator, found := k.GetValidator(ctx, valAddr) - if !found { - return nil, types.ErrNoValidatorFound + validator, err := k.GetValidator(ctx, valAddr) + if err != nil { + return nil, err } // In some situations, the exchange rate becomes invalid, e.g. if @@ -471,8 +514,8 @@ func (k msgServer) CancelUnbondingDelegation(goCtx context.Context, msg *types.M return nil, types.ErrValidatorJailed } - ubd, found := k.GetUnbondingDelegation(ctx, delegatorAddress, valAddr) - if !found { + ubd, err := k.GetUnbondingDelegation(ctx, delegatorAddress, valAddr) + if err != nil { return nil, status.Errorf( codes.NotFound, "unbonding delegation with delegator %s not found for validator %s", @@ -500,7 +543,8 @@ func (k msgServer) CancelUnbondingDelegation(goCtx context.Context, msg *types.M return nil, sdkerrors.ErrInvalidRequest.Wrap("amount is greater than the unbonding delegation entry balance") } - if unbondEntry.CompletionTime.Before(ctx.BlockTime()) { + sdkCtx := sdk.UnwrapSDKContext(ctx) + if unbondEntry.CompletionTime.Before(sdkCtx.BlockTime()) { return nil, sdkerrors.ErrInvalidRequest.Wrap("unbonding delegation is already processed") } @@ -522,12 +566,16 @@ func (k msgServer) CancelUnbondingDelegation(goCtx context.Context, msg *types.M // set the unbonding delegation or remove it if there are no more entries if len(ubd.Entries) == 0 { - k.RemoveUnbondingDelegation(ctx, ubd) + err = k.RemoveUnbondingDelegation(ctx, ubd) } else { - k.SetUnbondingDelegation(ctx, ubd) + err = k.SetUnbondingDelegation(ctx, ubd) } - ctx.EventManager().EmitEvent( + if err != nil { + return nil, err + } + + sdkCtx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeCancelUnbondingDelegation, sdk.NewAttribute(sdk.AttributeKeyAmount, msg.Amount.String()), @@ -540,7 +588,8 @@ func (k msgServer) CancelUnbondingDelegation(goCtx context.Context, msg *types.M return &types.MsgCancelUnbondingDelegationResponse{}, nil } -func (k msgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { +// UpdateParams defines a method to perform updation of params exist in x/staking module. +func (k msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { if k.authority != msg.Authority { return nil, errorsmod.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.authority, msg.Authority) } @@ -549,8 +598,6 @@ func (k msgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParam return nil, err } - ctx := sdk.UnwrapSDKContext(goCtx) - // store params if err := k.SetParams(ctx, msg.Params); err != nil { return nil, err diff --git a/x/staking/keeper/msg_server_test.go b/x/staking/keeper/msg_server_test.go index bc153ee44fd3..df339ae371cb 100644 --- a/x/staking/keeper/msg_server_test.go +++ b/x/staking/keeper/msg_server_test.go @@ -4,10 +4,10 @@ import ( "testing" "time" - "cosmossdk.io/math" - "github.com/golang/mock/gomock" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/codec/address" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" @@ -49,8 +49,8 @@ func (s *KeeperTestSuite) TestMsgCreateValidator() { input: &stakingtypes.MsgCreateValidator{ Description: stakingtypes.Description{}, Commission: stakingtypes.CommissionRates{ - Rate: sdk.NewDecWithPrec(5, 1), - MaxRate: sdk.NewDecWithPrec(5, 1), + Rate: math.LegacyNewDecWithPrec(5, 1), + MaxRate: math.LegacyNewDecWithPrec(5, 1), MaxChangeRate: math.LegacyNewDec(0), }, MinSelfDelegation: math.NewInt(1), @@ -69,8 +69,8 @@ func (s *KeeperTestSuite) TestMsgCreateValidator() { Moniker: "NewValidator", }, Commission: stakingtypes.CommissionRates{ - Rate: sdk.NewDecWithPrec(5, 1), - MaxRate: sdk.NewDecWithPrec(5, 1), + Rate: math.LegacyNewDecWithPrec(5, 1), + MaxRate: math.LegacyNewDecWithPrec(5, 1), MaxChangeRate: math.LegacyNewDec(0), }, MinSelfDelegation: math.NewInt(1), @@ -89,8 +89,8 @@ func (s *KeeperTestSuite) TestMsgCreateValidator() { Moniker: "NewValidator", }, Commission: stakingtypes.CommissionRates{ - Rate: sdk.NewDecWithPrec(5, 1), - MaxRate: sdk.NewDecWithPrec(5, 1), + Rate: math.LegacyNewDecWithPrec(5, 1), + MaxRate: math.LegacyNewDecWithPrec(5, 1), MaxChangeRate: math.LegacyNewDec(0), }, MinSelfDelegation: math.NewInt(1), @@ -109,8 +109,8 @@ func (s *KeeperTestSuite) TestMsgCreateValidator() { Moniker: "NewValidator", }, Commission: stakingtypes.CommissionRates{ - Rate: sdk.NewDecWithPrec(5, 1), - MaxRate: sdk.NewDecWithPrec(5, 1), + Rate: math.LegacyNewDecWithPrec(5, 1), + MaxRate: math.LegacyNewDecWithPrec(5, 1), MaxChangeRate: math.LegacyNewDec(0), }, MinSelfDelegation: math.NewInt(1), @@ -129,8 +129,8 @@ func (s *KeeperTestSuite) TestMsgCreateValidator() { Moniker: "NewValidator", }, Commission: stakingtypes.CommissionRates{ - Rate: sdk.NewDecWithPrec(5, 1), - MaxRate: sdk.NewDecWithPrec(5, 1), + Rate: math.LegacyNewDecWithPrec(5, 1), + MaxRate: math.LegacyNewDecWithPrec(5, 1), MaxChangeRate: math.LegacyNewDec(0), }, MinSelfDelegation: math.NewInt(1), @@ -149,8 +149,8 @@ func (s *KeeperTestSuite) TestMsgCreateValidator() { Moniker: "NewValidator", }, Commission: stakingtypes.CommissionRates{ - Rate: sdk.NewDecWithPrec(5, 1), - MaxRate: sdk.NewDecWithPrec(5, 1), + Rate: math.LegacyNewDecWithPrec(5, 1), + MaxRate: math.LegacyNewDecWithPrec(5, 1), MaxChangeRate: math.LegacyNewDec(0), }, MinSelfDelegation: math.NewInt(0), @@ -169,8 +169,8 @@ func (s *KeeperTestSuite) TestMsgCreateValidator() { Moniker: "NewValidator", }, Commission: stakingtypes.CommissionRates{ - Rate: sdk.NewDecWithPrec(5, 1), - MaxRate: sdk.NewDecWithPrec(5, 1), + Rate: math.LegacyNewDecWithPrec(5, 1), + MaxRate: math.LegacyNewDecWithPrec(5, 1), MaxChangeRate: math.LegacyNewDec(0), }, MinSelfDelegation: math.NewInt(-1), @@ -189,8 +189,8 @@ func (s *KeeperTestSuite) TestMsgCreateValidator() { Moniker: "NewValidator", }, Commission: stakingtypes.CommissionRates{ - Rate: sdk.NewDecWithPrec(5, 1), - MaxRate: sdk.NewDecWithPrec(5, 1), + Rate: math.LegacyNewDecWithPrec(5, 1), + MaxRate: math.LegacyNewDecWithPrec(5, 1), MaxChangeRate: math.LegacyNewDec(0), }, MinSelfDelegation: math.NewInt(100), @@ -213,8 +213,8 @@ func (s *KeeperTestSuite) TestMsgCreateValidator() { Details: "details", }, Commission: stakingtypes.CommissionRates{ - Rate: sdk.NewDecWithPrec(5, 1), - MaxRate: sdk.NewDecWithPrec(5, 1), + Rate: math.LegacyNewDecWithPrec(5, 1), + MaxRate: math.LegacyNewDecWithPrec(5, 1), MaxChangeRate: math.LegacyNewDec(0), }, MinSelfDelegation: math.NewInt(1), @@ -252,7 +252,7 @@ func (s *KeeperTestSuite) TestMsgEditValidator() { require.NotNil(pk) comm := stakingtypes.NewCommissionRates(math.LegacyNewDec(0), math.LegacyNewDec(0), math.LegacyNewDec(0)) - msg, err := stakingtypes.NewMsgCreateValidator(ValAddr, pk, sdk.NewCoin("stake", sdk.NewInt(10)), stakingtypes.Description{Moniker: "NewVal"}, comm, math.OneInt()) + msg, err := stakingtypes.NewMsgCreateValidator(ValAddr.String(), pk, sdk.NewCoin("stake", math.NewInt(10)), stakingtypes.Description{Moniker: "NewVal"}, comm, math.OneInt()) require.NoError(err) res, err := msgServer.CreateValidator(ctx, msg) @@ -426,7 +426,7 @@ func (s *KeeperTestSuite) TestMsgDelegate() { comm := stakingtypes.NewCommissionRates(math.LegacyNewDec(0), math.LegacyNewDec(0), math.LegacyNewDec(0)) - msg, err := stakingtypes.NewMsgCreateValidator(ValAddr, pk, sdk.NewCoin("stake", sdk.NewInt(10)), stakingtypes.Description{Moniker: "NewVal"}, comm, math.OneInt()) + msg, err := stakingtypes.NewMsgCreateValidator(ValAddr.String(), pk, sdk.NewCoin("stake", math.NewInt(10)), stakingtypes.Description{Moniker: "NewVal"}, comm, math.OneInt()) require.NoError(err) res, err := msgServer.CreateValidator(ctx, msg) @@ -551,14 +551,14 @@ func (s *KeeperTestSuite) TestMsgBeginRedelegate() { comm := stakingtypes.NewCommissionRates(math.LegacyNewDec(0), math.LegacyNewDec(0), math.LegacyNewDec(0)) amt := sdk.Coin{Denom: sdk.DefaultBondDenom, Amount: keeper.TokensFromConsensusPower(s.ctx, int64(100))} - msg, err := stakingtypes.NewMsgCreateValidator(srcValAddr, pk, amt, stakingtypes.Description{Moniker: "NewVal"}, comm, math.OneInt()) + msg, err := stakingtypes.NewMsgCreateValidator(srcValAddr.String(), pk, amt, stakingtypes.Description{Moniker: "NewVal"}, comm, math.OneInt()) require.NoError(err) res, err := msgServer.CreateValidator(ctx, msg) require.NoError(err) require.NotNil(res) s.bankKeeper.EXPECT().DelegateCoinsFromAccountToModule(gomock.Any(), addr2, stakingtypes.NotBondedPoolName, gomock.Any()).AnyTimes() - msg, err = stakingtypes.NewMsgCreateValidator(dstValAddr, dstPk, amt, stakingtypes.Description{Moniker: "NewVal"}, comm, math.OneInt()) + msg, err = stakingtypes.NewMsgCreateValidator(dstValAddr.String(), dstPk, amt, stakingtypes.Description{Moniker: "NewVal"}, comm, math.OneInt()) require.NoError(err) res, err = msgServer.CreateValidator(ctx, msg) @@ -566,10 +566,10 @@ func (s *KeeperTestSuite) TestMsgBeginRedelegate() { require.NotNil(res) shares := math.LegacyNewDec(100) - del := stakingtypes.NewDelegation(Addr, srcValAddr, shares) - keeper.SetDelegation(ctx, del) - _, found := keeper.GetDelegation(ctx, Addr, srcValAddr) - require.True(found) + del := stakingtypes.NewDelegation(Addr.String(), srcValAddr.String(), shares) + require.NoError(keeper.SetDelegation(ctx, del)) + _, err = keeper.GetDelegation(ctx, Addr, srcValAddr) + require.NoError(err) testCases := []struct { name string @@ -713,17 +713,17 @@ func (s *KeeperTestSuite) TestMsgUndelegate() { comm := stakingtypes.NewCommissionRates(math.LegacyNewDec(0), math.LegacyNewDec(0), math.LegacyNewDec(0)) amt := sdk.Coin{Denom: sdk.DefaultBondDenom, Amount: keeper.TokensFromConsensusPower(s.ctx, int64(100))} - msg, err := stakingtypes.NewMsgCreateValidator(ValAddr, pk, amt, stakingtypes.Description{Moniker: "NewVal"}, comm, math.OneInt()) + msg, err := stakingtypes.NewMsgCreateValidator(ValAddr.String(), pk, amt, stakingtypes.Description{Moniker: "NewVal"}, comm, math.OneInt()) require.NoError(err) res, err := msgServer.CreateValidator(ctx, msg) require.NoError(err) require.NotNil(res) shares := math.LegacyNewDec(100) - del := stakingtypes.NewDelegation(Addr, ValAddr, shares) - keeper.SetDelegation(ctx, del) - _, found := keeper.GetDelegation(ctx, Addr, ValAddr) - require.True(found) + del := stakingtypes.NewDelegation(Addr.String(), ValAddr.String(), shares) + require.NoError(keeper.SetDelegation(ctx, del)) + _, err = keeper.GetDelegation(ctx, Addr, ValAddr) + require.NoError(err) testCases := []struct { name string @@ -827,7 +827,7 @@ func (s *KeeperTestSuite) TestMsgUndelegate() { } func (s *KeeperTestSuite) TestMsgCancelUnbondingDelegation() { - ctx, keeper, msgServer := s.ctx, s.stakingKeeper, s.msgServer + ctx, keeper, msgServer, ak := s.ctx, s.stakingKeeper, s.msgServer, s.accountKeeper require := s.Require() pk := ed25519.GenPrivKey().PubKey() @@ -838,23 +838,23 @@ func (s *KeeperTestSuite) TestMsgCancelUnbondingDelegation() { s.bankKeeper.EXPECT().DelegateCoinsFromAccountToModule(gomock.Any(), Addr, stakingtypes.NotBondedPoolName, gomock.Any()).AnyTimes() - msg, err := stakingtypes.NewMsgCreateValidator(ValAddr, pk, amt, stakingtypes.Description{Moniker: "NewVal"}, comm, math.OneInt()) + msg, err := stakingtypes.NewMsgCreateValidator(ValAddr.String(), pk, amt, stakingtypes.Description{Moniker: "NewVal"}, comm, math.OneInt()) require.NoError(err) res, err := msgServer.CreateValidator(ctx, msg) require.NoError(err) require.NotNil(res) shares := math.LegacyNewDec(100) - del := stakingtypes.NewDelegation(Addr, ValAddr, shares) - keeper.SetDelegation(ctx, del) - resDel, found := keeper.GetDelegation(ctx, Addr, ValAddr) - require.True(found) + del := stakingtypes.NewDelegation(Addr.String(), ValAddr.String(), shares) + require.NoError(keeper.SetDelegation(ctx, del)) + resDel, err := keeper.GetDelegation(ctx, Addr, ValAddr) + require.NoError(err) require.Equal(del, resDel) - ubd := stakingtypes.NewUnbondingDelegation(Addr, ValAddr, 10, ctx.BlockTime().Add(time.Minute*10), shares.RoundInt(), 0) - keeper.SetUnbondingDelegation(ctx, ubd) - resUnbond, found := keeper.GetUnbondingDelegation(ctx, Addr, ValAddr) - require.True(found) + ubd := stakingtypes.NewUnbondingDelegation(Addr, ValAddr, 10, ctx.BlockTime().Add(time.Minute*10), shares.RoundInt(), 0, keeper.ValidatorAddressCodec(), ak.AddressCodec()) + require.NoError(keeper.SetUnbondingDelegation(ctx, ubd)) + resUnbond, err := keeper.GetUnbondingDelegation(ctx, Addr, ValAddr) + require.NoError(err) require.Equal(ubd, resUnbond) testCases := []struct { @@ -945,7 +945,7 @@ func (s *KeeperTestSuite) TestMsgCancelUnbondingDelegation() { input: &stakingtypes.MsgCancelUnbondingDelegation{ DelegatorAddress: Addr.String(), ValidatorAddress: ValAddr.String(), - Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(101)), + Amount: sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(101)), CreationHeight: 10, }, expErr: true, @@ -956,7 +956,7 @@ func (s *KeeperTestSuite) TestMsgCancelUnbondingDelegation() { input: &stakingtypes.MsgCancelUnbondingDelegation{ DelegatorAddress: Addr.String(), ValidatorAddress: ValAddr.String(), - Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(0)), + Amount: sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(0)), CreationHeight: 10, }, expErr: true, diff --git a/x/staking/keeper/params.go b/x/staking/keeper/params.go index 74316694d9bf..83e29708470c 100644 --- a/x/staking/keeper/params.go +++ b/x/staking/keeper/params.go @@ -1,6 +1,7 @@ package keeper import ( + "context" "time" "cosmossdk.io/math" @@ -10,66 +11,74 @@ import ( ) // UnbondingTime - The time duration for unbonding -func (k Keeper) UnbondingTime(ctx sdk.Context) time.Duration { - return k.GetParams(ctx).UnbondingTime +func (k Keeper) UnbondingTime(ctx context.Context) (time.Duration, error) { + params, err := k.GetParams(ctx) + return params.UnbondingTime, err } // MaxValidators - Maximum number of validators -func (k Keeper) MaxValidators(ctx sdk.Context) uint32 { - return k.GetParams(ctx).MaxValidators +func (k Keeper) MaxValidators(ctx context.Context) (uint32, error) { + params, err := k.GetParams(ctx) + return params.MaxValidators, err } // MaxEntries - Maximum number of simultaneous unbonding // delegations or redelegations (per pair/trio) -func (k Keeper) MaxEntries(ctx sdk.Context) uint32 { - return k.GetParams(ctx).MaxEntries +func (k Keeper) MaxEntries(ctx context.Context) (uint32, error) { + params, err := k.GetParams(ctx) + return params.MaxEntries, err } // HistoricalEntries = number of historical info entries // to persist in store -func (k Keeper) HistoricalEntries(ctx sdk.Context) uint32 { - return k.GetParams(ctx).HistoricalEntries +func (k Keeper) HistoricalEntries(ctx context.Context) (uint32, error) { + params, err := k.GetParams(ctx) + return params.HistoricalEntries, err } // BondDenom - Bondable coin denomination -func (k Keeper) BondDenom(ctx sdk.Context) string { - return k.GetParams(ctx).BondDenom +func (k Keeper) BondDenom(ctx context.Context) (string, error) { + params, err := k.GetParams(ctx) + return params.BondDenom, err } // PowerReduction - is the amount of staking tokens required for 1 unit of consensus-engine power. // Currently, this returns a global variable that the app developer can tweak. // TODO: we might turn this into an on-chain param: // https://github.com/cosmos/cosmos-sdk/issues/8365 -func (k Keeper) PowerReduction(ctx sdk.Context) math.Int { +func (k Keeper) PowerReduction(ctx context.Context) math.Int { return sdk.DefaultPowerReduction } // MinCommissionRate - Minimum validator commission rate -func (k Keeper) MinCommissionRate(ctx sdk.Context) math.LegacyDec { - return k.GetParams(ctx).MinCommissionRate +func (k Keeper) MinCommissionRate(ctx context.Context) (math.LegacyDec, error) { + params, err := k.GetParams(ctx) + return params.MinCommissionRate, err } // SetParams sets the x/staking module parameters. // CONTRACT: This method performs no validation of the parameters. -func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error { - store := ctx.KVStore(k.storeKey) +func (k Keeper) SetParams(ctx context.Context, params types.Params) error { + store := k.storeService.OpenKVStore(ctx) bz, err := k.cdc.Marshal(¶ms) if err != nil { return err } - store.Set(types.ParamsKey, bz) - - return nil + return store.Set(types.ParamsKey, bz) } -// GetParams sets the x/staking module parameters. -func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { - store := ctx.KVStore(k.storeKey) - bz := store.Get(types.ParamsKey) +// GetParams gets the x/staking module parameters. +func (k Keeper) GetParams(ctx context.Context) (params types.Params, err error) { + store := k.storeService.OpenKVStore(ctx) + bz, err := store.Get(types.ParamsKey) + if err != nil { + return params, err + } + if bz == nil { - return params + return params, nil } - k.cdc.MustUnmarshal(bz, ¶ms) - return params + err = k.cdc.Unmarshal(bz, ¶ms) + return params, err } diff --git a/x/staking/keeper/pool.go b/x/staking/keeper/pool.go index 1d0bed38d255..dc81409ff6a7 100644 --- a/x/staking/keeper/pool.go +++ b/x/staking/keeper/pool.go @@ -1,6 +1,8 @@ package keeper import ( + "context" + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" @@ -8,72 +10,104 @@ import ( ) // GetBondedPool returns the bonded tokens pool's module account -func (k Keeper) GetBondedPool(ctx sdk.Context) (bondedPool sdk.ModuleAccountI) { +func (k Keeper) GetBondedPool(ctx context.Context) (bondedPool sdk.ModuleAccountI) { return k.authKeeper.GetModuleAccount(ctx, types.BondedPoolName) } // GetNotBondedPool returns the not bonded tokens pool's module account -func (k Keeper) GetNotBondedPool(ctx sdk.Context) (notBondedPool sdk.ModuleAccountI) { +func (k Keeper) GetNotBondedPool(ctx context.Context) (notBondedPool sdk.ModuleAccountI) { return k.authKeeper.GetModuleAccount(ctx, types.NotBondedPoolName) } // bondedTokensToNotBonded transfers coins from the bonded to the not bonded pool within staking -func (k Keeper) bondedTokensToNotBonded(ctx sdk.Context, tokens math.Int) { - coins := sdk.NewCoins(sdk.NewCoin(k.BondDenom(ctx), tokens)) - if err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.BondedPoolName, types.NotBondedPoolName, coins); err != nil { - panic(err) +func (k Keeper) bondedTokensToNotBonded(ctx context.Context, tokens math.Int) error { + bondDenom, err := k.BondDenom(ctx) + if err != nil { + return err } + + coins := sdk.NewCoins(sdk.NewCoin(bondDenom, tokens)) + return k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.BondedPoolName, types.NotBondedPoolName, coins) } // notBondedTokensToBonded transfers coins from the not bonded to the bonded pool within staking -func (k Keeper) notBondedTokensToBonded(ctx sdk.Context, tokens math.Int) { - coins := sdk.NewCoins(sdk.NewCoin(k.BondDenom(ctx), tokens)) - if err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.NotBondedPoolName, types.BondedPoolName, coins); err != nil { - panic(err) +func (k Keeper) notBondedTokensToBonded(ctx context.Context, tokens math.Int) error { + bondDenom, err := k.BondDenom(ctx) + if err != nil { + return err } + + coins := sdk.NewCoins(sdk.NewCoin(bondDenom, tokens)) + return k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.NotBondedPoolName, types.BondedPoolName, coins) } -// burnBondedTokens removes coins from the bonded pool module account -func (k Keeper) burnBondedTokens(ctx sdk.Context, amt math.Int) error { +// burnBondedTokens burns coins from the bonded pool module account +func (k Keeper) burnBondedTokens(ctx context.Context, amt math.Int) error { if !amt.IsPositive() { // skip as no coins need to be burned return nil } - coins := sdk.NewCoins(sdk.NewCoin(k.BondDenom(ctx), amt)) + bondDenom, err := k.BondDenom(ctx) + if err != nil { + return err + } + + coins := sdk.NewCoins(sdk.NewCoin(bondDenom, amt)) return k.bankKeeper.BurnCoins(ctx, types.BondedPoolName, coins) } -// burnNotBondedTokens removes coins from the not bonded pool module account -func (k Keeper) burnNotBondedTokens(ctx sdk.Context, amt math.Int) error { +// burnNotBondedTokens burns coins from the not bonded pool module account +func (k Keeper) burnNotBondedTokens(ctx context.Context, amt math.Int) error { if !amt.IsPositive() { // skip as no coins need to be burned return nil } - coins := sdk.NewCoins(sdk.NewCoin(k.BondDenom(ctx), amt)) + bondDenom, err := k.BondDenom(ctx) + if err != nil { + return err + } + + coins := sdk.NewCoins(sdk.NewCoin(bondDenom, amt)) return k.bankKeeper.BurnCoins(ctx, types.NotBondedPoolName, coins) } // TotalBondedTokens total staking tokens supply which is bonded -func (k Keeper) TotalBondedTokens(ctx sdk.Context) math.Int { +func (k Keeper) TotalBondedTokens(ctx context.Context) (math.Int, error) { bondedPool := k.GetBondedPool(ctx) - return k.bankKeeper.GetBalance(ctx, bondedPool.GetAddress(), k.BondDenom(ctx)).Amount + bondDenom, err := k.BondDenom(ctx) + if err != nil { + return math.ZeroInt(), err + } + return k.bankKeeper.GetBalance(ctx, bondedPool.GetAddress(), bondDenom).Amount, nil } // StakingTokenSupply staking tokens from the total supply -func (k Keeper) StakingTokenSupply(ctx sdk.Context) math.Int { - return k.bankKeeper.GetSupply(ctx, k.BondDenom(ctx)).Amount +func (k Keeper) StakingTokenSupply(ctx context.Context) (math.Int, error) { + bondDenom, err := k.BondDenom(ctx) + if err != nil { + return math.ZeroInt(), err + } + return k.bankKeeper.GetSupply(ctx, bondDenom).Amount, nil } // BondedRatio the fraction of the staking tokens which are currently bonded -func (k Keeper) BondedRatio(ctx sdk.Context) math.LegacyDec { - stakeSupply := k.StakingTokenSupply(ctx) +func (k Keeper) BondedRatio(ctx context.Context) (math.LegacyDec, error) { + stakeSupply, err := k.StakingTokenSupply(ctx) + if err != nil { + return math.LegacyZeroDec(), err + } + if stakeSupply.IsPositive() { - return math.LegacyNewDecFromInt(k.TotalBondedTokens(ctx)).QuoInt(stakeSupply) + totalBonded, err := k.TotalBondedTokens(ctx) + if err != nil { + return math.LegacyZeroDec(), err + } + return math.LegacyNewDecFromInt(totalBonded).QuoInt(stakeSupply), nil } - return math.LegacyZeroDec() + return math.LegacyZeroDec(), nil } diff --git a/x/staking/keeper/power_reduction.go b/x/staking/keeper/power_reduction.go index abed52d12f4c..7eaad0cbe4f6 100644 --- a/x/staking/keeper/power_reduction.go +++ b/x/staking/keeper/power_reduction.go @@ -1,16 +1,19 @@ package keeper import ( + "context" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" ) -// TokensToConsensusPower - convert input tokens to potential consensus-engine power -func (k Keeper) TokensToConsensusPower(ctx sdk.Context, tokens math.Int) int64 { +// TokensToConsensusPower converts input tokens to potential consensus-engine power +func (k Keeper) TokensToConsensusPower(ctx context.Context, tokens math.Int) int64 { return sdk.TokensToConsensusPower(tokens, k.PowerReduction(ctx)) } -// TokensFromConsensusPower - convert input power to tokens -func (k Keeper) TokensFromConsensusPower(ctx sdk.Context, power int64) math.Int { +// TokensFromConsensusPower converts input power to tokens +func (k Keeper) TokensFromConsensusPower(ctx context.Context, power int64) math.Int { return sdk.TokensFromConsensusPower(power, k.PowerReduction(ctx)) } diff --git a/x/staking/keeper/power_reduction_test.go b/x/staking/keeper/power_reduction_test.go index 0817622b8302..42b857f1b5dc 100644 --- a/x/staking/keeper/power_reduction_test.go +++ b/x/staking/keeper/power_reduction_test.go @@ -2,6 +2,7 @@ package keeper_test import ( sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/staking/keeper/query_utils.go b/x/staking/keeper/query_utils.go index 6750a12bba07..4b089da7800a 100644 --- a/x/staking/keeper/query_utils.go +++ b/x/staking/keeper/query_utils.go @@ -1,105 +1,127 @@ package keeper import ( + "context" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking/types" ) -// Return all validators that a delegator is bonded to. If maxRetrieve is supplied, the respective amount will be returned. +// GetDelegatorValidators returns all validators that a delegator is bonded to. If maxRetrieve is supplied, the respective amount will be returned. func (k Keeper) GetDelegatorValidators( - ctx sdk.Context, delegatorAddr sdk.AccAddress, maxRetrieve uint32, -) types.Validators { + ctx context.Context, delegatorAddr sdk.AccAddress, maxRetrieve uint32, +) (types.Validators, error) { validators := make([]types.Validator, maxRetrieve) - - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) delegatorPrefixKey := types.GetDelegationsKey(delegatorAddr) - iterator := storetypes.KVStorePrefixIterator(store, delegatorPrefixKey) // smallest to largest + iterator, err := store.Iterator(delegatorPrefixKey, storetypes.PrefixEndBytes(delegatorPrefixKey)) // smallest to largest + if err != nil { + return types.Validators{}, err + } defer iterator.Close() i := 0 for ; iterator.Valid() && i < int(maxRetrieve); iterator.Next() { delegation := types.MustUnmarshalDelegation(k.cdc, iterator.Value()) - validator, found := k.GetValidator(ctx, delegation.GetValidatorAddr()) - if !found { - panic(types.ErrNoValidatorFound) + valAddr, err := k.validatorAddressCodec.StringToBytes(delegation.GetValidatorAddr()) + if err != nil { + return types.Validators{}, err + } + + validator, err := k.GetValidator(ctx, valAddr) + if err != nil { + return types.Validators{}, err } validators[i] = validator i++ } - return validators[:i] // trim + return types.Validators{Validators: validators[:i], ValidatorCodec: k.validatorAddressCodec}, nil // trim } -// return a validator that a delegator is bonded to +// GetDelegatorValidator returns a validator that a delegator is bonded to func (k Keeper) GetDelegatorValidator( - ctx sdk.Context, delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress, + ctx context.Context, delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress, ) (validator types.Validator, err error) { - delegation, found := k.GetDelegation(ctx, delegatorAddr, validatorAddr) - if !found { - return validator, types.ErrNoDelegation + delegation, err := k.GetDelegation(ctx, delegatorAddr, validatorAddr) + if err != nil { + return validator, err } - validator, found = k.GetValidator(ctx, delegation.GetValidatorAddr()) - if !found { - panic(types.ErrNoValidatorFound) + valAddr, err := k.validatorAddressCodec.StringToBytes(delegation.GetValidatorAddr()) + if err != nil { + return validator, err } - return validator, nil + return k.GetValidator(ctx, valAddr) } -// return all delegations for a delegator -func (k Keeper) GetAllDelegatorDelegations(ctx sdk.Context, delegator sdk.AccAddress) []types.Delegation { +// GetAllDelegatorDelegations returns all delegations of a delegator +func (k Keeper) GetAllDelegatorDelegations(ctx context.Context, delegator sdk.AccAddress) ([]types.Delegation, error) { delegations := make([]types.Delegation, 0) - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) delegatorPrefixKey := types.GetDelegationsKey(delegator) - iterator := storetypes.KVStorePrefixIterator(store, delegatorPrefixKey) // smallest to largest + iterator, err := store.Iterator(delegatorPrefixKey, storetypes.PrefixEndBytes(delegatorPrefixKey)) // smallest to largest + if err != nil { + return nil, err + } defer iterator.Close() - i := 0 - - for ; iterator.Valid(); iterator.Next() { - delegation := types.MustUnmarshalDelegation(k.cdc, iterator.Value()) + for i := 0; iterator.Valid(); iterator.Next() { + delegation, err := types.UnmarshalDelegation(k.cdc, iterator.Value()) + if err != nil { + return nil, err + } delegations = append(delegations, delegation) i++ } - return delegations + return delegations, nil } -// return all unbonding-delegations for a delegator -func (k Keeper) GetAllUnbondingDelegations(ctx sdk.Context, delegator sdk.AccAddress) []types.UnbondingDelegation { +// GetAllUnbondingDelegations returns all unbonding-delegations of a delegator +func (k Keeper) GetAllUnbondingDelegations(ctx context.Context, delegator sdk.AccAddress) ([]types.UnbondingDelegation, error) { unbondingDelegations := make([]types.UnbondingDelegation, 0) - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) delegatorPrefixKey := types.GetUBDsKey(delegator) - iterator := storetypes.KVStorePrefixIterator(store, delegatorPrefixKey) // smallest to largest + iterator, err := store.Iterator(delegatorPrefixKey, storetypes.PrefixEndBytes(delegatorPrefixKey)) // smallest to largest + if err != nil { + return nil, err + } defer iterator.Close() for i := 0; iterator.Valid(); iterator.Next() { - unbondingDelegation := types.MustUnmarshalUBD(k.cdc, iterator.Value()) + unbondingDelegation, err := types.UnmarshalUBD(k.cdc, iterator.Value()) + if err != nil { + return nil, err + } unbondingDelegations = append(unbondingDelegations, unbondingDelegation) i++ } - return unbondingDelegations + return unbondingDelegations, nil } -// return all redelegations for a delegator +// GetAllRedelegations returns all redelegations of a delegator func (k Keeper) GetAllRedelegations( - ctx sdk.Context, delegator sdk.AccAddress, srcValAddress, dstValAddress sdk.ValAddress, -) []types.Redelegation { - store := ctx.KVStore(k.storeKey) + ctx context.Context, delegator sdk.AccAddress, srcValAddress, dstValAddress sdk.ValAddress, +) ([]types.Redelegation, error) { + store := k.storeService.OpenKVStore(ctx) delegatorPrefixKey := types.GetREDsKey(delegator) - iterator := storetypes.KVStorePrefixIterator(store, delegatorPrefixKey) // smallest to largest + iterator, err := store.Iterator(delegatorPrefixKey, storetypes.PrefixEndBytes(delegatorPrefixKey)) // smallest to largest + if err != nil { + return nil, err + } defer iterator.Close() srcValFilter := !(srcValAddress.Empty()) @@ -109,24 +131,24 @@ func (k Keeper) GetAllRedelegations( for ; iterator.Valid(); iterator.Next() { redelegation := types.MustUnmarshalRED(k.cdc, iterator.Value()) - valSrcAddr, err := sdk.ValAddressFromBech32(redelegation.ValidatorSrcAddress) + valSrcAddr, err := k.validatorAddressCodec.StringToBytes(redelegation.ValidatorSrcAddress) if err != nil { - panic(err) + return nil, err } - valDstAddr, err := sdk.ValAddressFromBech32(redelegation.ValidatorDstAddress) + valDstAddr, err := k.validatorAddressCodec.StringToBytes(redelegation.ValidatorDstAddress) if err != nil { - panic(err) + return nil, err } - if srcValFilter && !(srcValAddress.Equals(valSrcAddr)) { + if srcValFilter && !(srcValAddress.Equals(sdk.ValAddress(valSrcAddr))) { continue } - if dstValFilter && !(dstValAddress.Equals(valDstAddr)) { + if dstValFilter && !(dstValAddress.Equals(sdk.ValAddress(valDstAddr))) { continue } redelegations = append(redelegations, redelegation) } - return redelegations + return redelegations, nil } diff --git a/x/staking/keeper/slash.go b/x/staking/keeper/slash.go index 99bfd159dc48..e1fa8bb47d64 100644 --- a/x/staking/keeper/slash.go +++ b/x/staking/keeper/slash.go @@ -1,6 +1,8 @@ package keeper import ( + "context" + "errors" "fmt" "cosmossdk.io/math" @@ -29,12 +31,13 @@ import ( // CONTRACT: // // Infraction was committed at the current height or at a past height, -// not at a height in the future -func (k Keeper) Slash(ctx sdk.Context, consAddr sdk.ConsAddress, infractionHeight, power int64, slashFactor math.LegacyDec) math.Int { +// but not at a height in the future +func (k Keeper) Slash(ctx context.Context, consAddr sdk.ConsAddress, infractionHeight, power int64, slashFactor math.LegacyDec) (math.Int, error) { logger := k.Logger(ctx) + sdkCtx := sdk.UnwrapSDKContext(ctx) if slashFactor.IsNegative() { - panic(fmt.Errorf("attempted to slash with a negative slash factor: %v", slashFactor)) + return math.NewInt(0), fmt.Errorf("attempted to slash with a negative slash factor: %v", slashFactor) } // Amount of slashing = slash slashFactor * power at time of infraction @@ -44,25 +47,35 @@ func (k Keeper) Slash(ctx sdk.Context, consAddr sdk.ConsAddress, infractionHeigh // ref https://github.com/cosmos/cosmos-sdk/issues/1348 - validator, found := k.GetValidatorByConsAddr(ctx, consAddr) - if !found { + validator, err := k.GetValidatorByConsAddr(ctx, consAddr) + if errors.Is(err, types.ErrNoValidatorFound) { // If not found, the validator must have been overslashed and removed - so we don't need to do anything // NOTE: Correctness dependent on invariant that unbonding delegations / redelegations must also have been completely // slashed in this case - which we don't explicitly check, but should be true. // Log the slash attempt for future reference (maybe we should tag it too) + conStr, err := k.consensusAddressCodec.BytesToString(consAddr) + if err != nil { + panic(err) + } + logger.Error( "WARNING: ignored attempt to slash a nonexistent validator; we recommend you investigate immediately", - "validator", consAddr.String(), + "validator", conStr, ) - return math.NewInt(0) + return math.NewInt(0), nil + } else if err != nil { + return math.NewInt(0), err } // should not be slashing an unbonded validator if validator.IsUnbonded() { - panic(fmt.Sprintf("should not be slashing unbonded validator: %s", validator.GetOperator())) + return math.NewInt(0), fmt.Errorf("should not be slashing unbonded validator: %s", validator.GetOperator()) } - operatorAddress := validator.GetOperator() + operatorAddress, err := k.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) + if err != nil { + return math.Int{}, err + } // call the before-modification hook if err := k.Hooks().BeforeValidatorModified(ctx, operatorAddress); err != nil { @@ -75,13 +88,13 @@ func (k Keeper) Slash(ctx sdk.Context, consAddr sdk.ConsAddress, infractionHeigh remainingSlashAmount := slashAmount switch { - case infractionHeight > ctx.BlockHeight(): + case infractionHeight > sdkCtx.BlockHeight(): // Can't slash infractions in the future - panic(fmt.Sprintf( + return math.NewInt(0), fmt.Errorf( "impossible attempt to slash future infraction at height %d but we are at height %d", - infractionHeight, ctx.BlockHeight())) + infractionHeight, sdkCtx.BlockHeight()) - case infractionHeight == ctx.BlockHeight(): + case infractionHeight == sdkCtx.BlockHeight(): // Special-case slash at current height for efficiency - we don't need to // look through unbonding delegations or redelegations. logger.Info( @@ -89,11 +102,18 @@ func (k Keeper) Slash(ctx sdk.Context, consAddr sdk.ConsAddress, infractionHeigh "height", infractionHeight, ) - case infractionHeight < ctx.BlockHeight(): + case infractionHeight < sdkCtx.BlockHeight(): // Iterate through unbonding delegations from slashed validator - unbondingDelegations := k.GetUnbondingDelegationsFromValidator(ctx, operatorAddress) + unbondingDelegations, err := k.GetUnbondingDelegationsFromValidator(ctx, operatorAddress) + if err != nil { + return math.NewInt(0), err + } + for _, unbondingDelegation := range unbondingDelegations { - amountSlashed := k.SlashUnbondingDelegation(ctx, unbondingDelegation, infractionHeight, slashFactor) + amountSlashed, err := k.SlashUnbondingDelegation(ctx, unbondingDelegation, infractionHeight, slashFactor) + if err != nil { + return math.ZeroInt(), err + } if amountSlashed.IsZero() { continue } @@ -102,9 +122,17 @@ func (k Keeper) Slash(ctx sdk.Context, consAddr sdk.ConsAddress, infractionHeigh } // Iterate through redelegations from slashed source validator - redelegations := k.GetRedelegationsFromSrcValidator(ctx, operatorAddress) + redelegations, err := k.GetRedelegationsFromSrcValidator(ctx, operatorAddress) + if err != nil { + return math.NewInt(0), err + } + for _, redelegation := range redelegations { - amountSlashed := k.SlashRedelegation(ctx, validator, redelegation, infractionHeight, slashFactor) + amountSlashed, err := k.SlashRedelegation(ctx, validator, redelegation, infractionHeight, slashFactor) + if err != nil { + return math.NewInt(0), err + } + if amountSlashed.IsZero() { continue } @@ -117,12 +145,26 @@ func (k Keeper) Slash(ctx sdk.Context, consAddr sdk.ConsAddress, infractionHeigh tokensToBurn := math.MinInt(remainingSlashAmount, validator.Tokens) tokensToBurn = math.MaxInt(tokensToBurn, math.ZeroInt()) // defensive. + if tokensToBurn.IsZero() { + // Nothing to burn, we can end this route immediately! We also don't + // need to call the k.Hooks().BeforeValidatorSlashed hook as we won't + // be slashing at all. + logger.Info( + "no validator slashing because slash amount is zero", + "validator", validator.GetOperator(), + "slash_factor", slashFactor.String(), + "burned", tokensToBurn, + "validatorTokens", validator.Tokens, + ) + return math.NewInt(0), nil + } + // we need to calculate the *effective* slash fraction for distribution if validator.Tokens.IsPositive() { effectiveFraction := math.LegacyNewDecFromInt(tokensToBurn).QuoRoundUp(math.LegacyNewDecFromInt(validator.Tokens)) // possible if power has changed - if effectiveFraction.GT(math.LegacyOneDec()) { - effectiveFraction = math.LegacyOneDec() + if oneDec := math.LegacyOneDec(); effectiveFraction.GT(oneDec) { + effectiveFraction = oneDec } // call the before-slashed hook if err := k.Hooks().BeforeValidatorSlashed(ctx, operatorAddress, effectiveFraction); err != nil { @@ -132,16 +174,19 @@ func (k Keeper) Slash(ctx sdk.Context, consAddr sdk.ConsAddress, infractionHeigh // Deduct from validator's bonded tokens and update the validator. // Burn the slashed tokens from the pool account and decrease the total supply. - validator = k.RemoveValidatorTokens(ctx, validator, tokensToBurn) + validator, err = k.RemoveValidatorTokens(ctx, validator, tokensToBurn) + if err != nil { + return math.NewInt(0), err + } switch validator.GetStatus() { case types.Bonded: if err := k.burnBondedTokens(ctx, tokensToBurn); err != nil { - panic(err) + return math.NewInt(0), err } case types.Unbonding, types.Unbonded: if err := k.burnNotBondedTokens(ctx, tokensToBurn); err != nil { - panic(err) + return math.NewInt(0), err } default: panic("invalid validator status") @@ -149,32 +194,39 @@ func (k Keeper) Slash(ctx sdk.Context, consAddr sdk.ConsAddress, infractionHeigh logger.Info( "validator slashed by slash factor", - "validator", validator.GetOperator().String(), + "validator", validator.GetOperator(), "slash_factor", slashFactor.String(), "burned", tokensToBurn, ) - return tokensToBurn + return tokensToBurn, nil } // SlashWithInfractionReason implementation doesn't require the infraction (types.Infraction) to work but is required by Interchain Security. -func (k Keeper) SlashWithInfractionReason(ctx sdk.Context, consAddr sdk.ConsAddress, infractionHeight, power int64, slashFactor math.LegacyDec, _ types.Infraction) math.Int { +func (k Keeper) SlashWithInfractionReason(ctx context.Context, consAddr sdk.ConsAddress, infractionHeight, power int64, slashFactor math.LegacyDec, _ types.Infraction) (math.Int, error) { return k.Slash(ctx, consAddr, infractionHeight, power, slashFactor) } // jail a validator -func (k Keeper) Jail(ctx sdk.Context, consAddr sdk.ConsAddress) { +func (k Keeper) Jail(ctx context.Context, consAddr sdk.ConsAddress) error { validator := k.mustGetValidatorByConsAddr(ctx, consAddr) - k.jailValidator(ctx, validator) + if err := k.jailValidator(ctx, validator); err != nil { + return err + } + logger := k.Logger(ctx) logger.Info("validator jailed", "validator", consAddr) + return nil } // unjail a validator -func (k Keeper) Unjail(ctx sdk.Context, consAddr sdk.ConsAddress) { +func (k Keeper) Unjail(ctx context.Context, consAddr sdk.ConsAddress) error { validator := k.mustGetValidatorByConsAddr(ctx, consAddr) - k.unjailValidator(ctx, validator) + if err := k.unjailValidator(ctx, validator); err != nil { + return err + } logger := k.Logger(ctx) logger.Info("validator un-jailed", "validator", consAddr) + return nil } // slash an unbonding delegation and update the pool @@ -182,10 +234,11 @@ func (k Keeper) Unjail(ctx sdk.Context, consAddr sdk.ConsAddress) { // the unbonding delegation had enough stake to slash // (the amount actually slashed may be less if there's // insufficient stake remaining) -func (k Keeper) SlashUnbondingDelegation(ctx sdk.Context, unbondingDelegation types.UnbondingDelegation, +func (k Keeper) SlashUnbondingDelegation(ctx context.Context, unbondingDelegation types.UnbondingDelegation, infractionHeight int64, slashFactor math.LegacyDec, -) (totalSlashAmount math.Int) { - now := ctx.BlockHeader().Time +) (totalSlashAmount math.Int, err error) { + sdkCtx := sdk.UnwrapSDKContext(ctx) + now := sdkCtx.BlockHeader().Time totalSlashAmount = math.ZeroInt() burnedAmount := math.ZeroInt() @@ -220,14 +273,16 @@ func (k Keeper) SlashUnbondingDelegation(ctx sdk.Context, unbondingDelegation ty burnedAmount = burnedAmount.Add(unbondingSlashAmount) entry.Balance = entry.Balance.Sub(unbondingSlashAmount) unbondingDelegation.Entries[i] = entry - k.SetUnbondingDelegation(ctx, unbondingDelegation) + if err = k.SetUnbondingDelegation(ctx, unbondingDelegation); err != nil { + return math.ZeroInt(), err + } } if err := k.burnNotBondedTokens(ctx, burnedAmount); err != nil { - panic(err) + return math.ZeroInt(), err } - return totalSlashAmount + return totalSlashAmount, nil } // slash a redelegation and update the pool @@ -236,13 +291,24 @@ func (k Keeper) SlashUnbondingDelegation(ctx sdk.Context, unbondingDelegation ty // (the amount actually slashed may be less if there's // insufficient stake remaining) // NOTE this is only slashing for prior infractions from the source validator -func (k Keeper) SlashRedelegation(ctx sdk.Context, srcValidator types.Validator, redelegation types.Redelegation, +func (k Keeper) SlashRedelegation(ctx context.Context, srcValidator types.Validator, redelegation types.Redelegation, infractionHeight int64, slashFactor math.LegacyDec, -) (totalSlashAmount math.Int) { - now := ctx.BlockHeader().Time +) (totalSlashAmount math.Int, err error) { + sdkCtx := sdk.UnwrapSDKContext(ctx) + now := sdkCtx.BlockHeader().Time totalSlashAmount = math.ZeroInt() bondedBurnedAmount, notBondedBurnedAmount := math.ZeroInt(), math.ZeroInt() + valDstAddr, err := k.validatorAddressCodec.StringToBytes(redelegation.ValidatorDstAddress) + if err != nil { + return math.ZeroInt(), fmt.Errorf("SlashRedelegation: could not parse validator destination address: %w", err) + } + + delegatorAddress, err := k.authKeeper.AddressCodec().StringToBytes(redelegation.DelegatorAddress) + if err != nil { + return math.ZeroInt(), fmt.Errorf("SlashRedelegation: could not parse delegator address: %w", err) + } + // perform slashing on all entries within the redelegation for _, entry := range redelegation.Entries { // If redelegation started before this height, stake didn't contribute to infraction @@ -260,24 +326,53 @@ func (k Keeper) SlashRedelegation(ctx sdk.Context, srcValidator types.Validator, slashAmount := slashAmountDec.TruncateInt() totalSlashAmount = totalSlashAmount.Add(slashAmount) - // Unbond from target validator - sharesToUnbond := slashFactor.Mul(entry.SharesDst) - if sharesToUnbond.IsZero() { - continue - } - - valDstAddr, err := sdk.ValAddressFromBech32(redelegation.ValidatorDstAddress) + validatorDstAddress, err := sdk.ValAddressFromBech32(redelegation.ValidatorDstAddress) if err != nil { panic(err) } + // Handle undelegation after redelegation + // Prioritize slashing unbondingDelegation than delegation + unbondingDelegation, err := k.GetUnbondingDelegation(ctx, sdk.MustAccAddressFromBech32(redelegation.DelegatorAddress), validatorDstAddress) + if err == nil { + for i, entry := range unbondingDelegation.Entries { + // slash with the amount of `slashAmount` if possible, else slash all unbonding token + unbondingSlashAmount := math.MinInt(slashAmount, entry.Balance) + + switch { + // There's no token to slash + case unbondingSlashAmount.IsZero(): + continue + // If unbonding started before this height, stake didn't contribute to infraction + case entry.CreationHeight < infractionHeight: + continue + // Unbonding delegation no longer eligible for slashing, skip it + case entry.IsMature(now) && !entry.OnHold(): + continue + // Slash the unbonding delegation + default: + // update remaining slashAmount + slashAmount = slashAmount.Sub(unbondingSlashAmount) + + notBondedBurnedAmount = notBondedBurnedAmount.Add(unbondingSlashAmount) + entry.Balance = entry.Balance.Sub(unbondingSlashAmount) + unbondingDelegation.Entries[i] = entry + if err = k.SetUnbondingDelegation(ctx, unbondingDelegation); err != nil { + return math.ZeroInt(), err + } + } + } + } - delegatorAddress, err := k.authKeeper.AddressCodec().StringToBytes(redelegation.DelegatorAddress) - if err != nil { - panic(err) + // Slash the moved delegation + + // Unbond from target validator + sharesToUnbond := slashFactor.Mul(entry.SharesDst) + if sharesToUnbond.IsZero() || slashAmount.IsZero() { + continue } - delegation, found := k.GetDelegation(ctx, delegatorAddress, valDstAddr) - if !found { + delegation, err := k.GetDelegation(ctx, delegatorAddress, valDstAddr) + if err != nil { // If deleted, delegation has zero shares, and we can't unbond any more continue } @@ -288,12 +383,12 @@ func (k Keeper) SlashRedelegation(ctx sdk.Context, srcValidator types.Validator, tokensToBurn, err := k.Unbond(ctx, delegatorAddress, valDstAddr, sharesToUnbond) if err != nil { - panic(fmt.Errorf("error unbonding delegator: %v", err)) + return math.ZeroInt(), err } - dstValidator, found := k.GetValidator(ctx, valDstAddr) - if !found { - panic("destination validator not found") + dstValidator, err := k.GetValidator(ctx, valDstAddr) + if err != nil { + return math.ZeroInt(), err } // tokens of a redelegation currently live in the destination validator @@ -309,12 +404,12 @@ func (k Keeper) SlashRedelegation(ctx sdk.Context, srcValidator types.Validator, } if err := k.burnBondedTokens(ctx, bondedBurnedAmount); err != nil { - panic(err) + return math.ZeroInt(), err } if err := k.burnNotBondedTokens(ctx, notBondedBurnedAmount); err != nil { - panic(err) + return math.ZeroInt(), err } - return totalSlashAmount + return totalSlashAmount, nil } diff --git a/x/staking/keeper/slash_test.go b/x/staking/keeper/slash_test.go index b1f6d8c873c3..39a8f817a193 100644 --- a/x/staking/keeper/slash_test.go +++ b/x/staking/keeper/slash_test.go @@ -1,6 +1,8 @@ package keeper_test import ( + sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking/testutil" ) @@ -15,36 +17,36 @@ func (s *KeeperTestSuite) TestRevocation() { validator := testutil.NewValidator(s.T(), valAddr, PKs[0]) // initial state - keeper.SetValidator(ctx, validator) - keeper.SetValidatorByConsAddr(ctx, validator) - val, found := keeper.GetValidator(ctx, valAddr) - require.True(found) + require.NoError(keeper.SetValidator(ctx, validator)) + require.NoError(keeper.SetValidatorByConsAddr(ctx, validator)) + val, err := keeper.GetValidator(ctx, valAddr) + require.NoError(err) require.False(val.IsJailed()) // test jail - keeper.Jail(ctx, consAddr) - val, found = keeper.GetValidator(ctx, valAddr) - require.True(found) + require.NoError(keeper.Jail(ctx, consAddr)) + val, err = keeper.GetValidator(ctx, valAddr) + require.NoError(err) require.True(val.IsJailed()) // test unjail - keeper.Unjail(ctx, consAddr) - val, found = keeper.GetValidator(ctx, valAddr) - require.True(found) + require.NoError(keeper.Unjail(ctx, consAddr)) + val, err = keeper.GetValidator(ctx, valAddr) + require.NoError(err) require.False(val.IsJailed()) } -// tests Slash at a future height (must panic) +// tests Slash at a future height (must error) func (s *KeeperTestSuite) TestSlashAtFutureHeight() { ctx, keeper := s.ctx, s.stakingKeeper require := s.Require() consAddr := sdk.ConsAddress(PKs[0].Address()) validator := testutil.NewValidator(s.T(), sdk.ValAddress(PKs[0].Address().Bytes()), PKs[0]) - keeper.SetValidator(ctx, validator) - err := keeper.SetValidatorByConsAddr(ctx, validator) - require.NoError(err) + require.NoError(keeper.SetValidator(ctx, validator)) + require.NoError(keeper.SetValidatorByConsAddr(ctx, validator)) - fraction := sdk.NewDecWithPrec(5, 1) - require.Panics(func() { keeper.Slash(ctx, consAddr, 1, 10, fraction) }) + fraction := sdkmath.LegacyNewDecWithPrec(5, 1) + _, err := keeper.Slash(ctx, consAddr, 1, 10, fraction) + require.Error(err) } diff --git a/x/staking/keeper/test_common.go b/x/staking/keeper/test_common.go index c0da2a4b3f97..0fa31d8ef924 100644 --- a/x/staking/keeper/test_common.go +++ b/x/staking/keeper/test_common.go @@ -2,6 +2,7 @@ package keeper // noalias import ( "bytes" + "context" storetypes "cosmossdk.io/store/types" @@ -9,49 +10,68 @@ import ( "github.com/cosmos/cosmos-sdk/x/staking/types" ) -// does a certain by-power index record exist -func ValidatorByPowerIndexExists(ctx sdk.Context, keeper *Keeper, power []byte) bool { - store := ctx.KVStore(keeper.storeKey) - return store.Has(power) +// ValidatorByPowerIndexExists does a certain by-power index record exist +func ValidatorByPowerIndexExists(ctx context.Context, keeper *Keeper, power []byte) bool { + store := keeper.storeService.OpenKVStore(ctx) + has, err := store.Has(power) + if err != nil { + panic(err) + } + return has } -// update validator for testing +// TestingUpdateValidator updates a validator for testing func TestingUpdateValidator(keeper *Keeper, ctx sdk.Context, validator types.Validator, apply bool) types.Validator { - keeper.SetValidator(ctx, validator) + err := keeper.SetValidator(ctx, validator) + if err != nil { + panic(err) + } // Remove any existing power key for validator. - store := ctx.KVStore(keeper.storeKey) + store := keeper.storeService.OpenKVStore(ctx) deleted := false - iterator := storetypes.KVStorePrefixIterator(store, types.ValidatorsByPowerIndexKey) + iterator, err := store.Iterator(types.ValidatorsByPowerIndexKey, storetypes.PrefixEndBytes(types.ValidatorsByPowerIndexKey)) + if err != nil { + panic(err) + } defer iterator.Close() + bz, err := keeper.validatorAddressCodec.StringToBytes(validator.GetOperator()) + if err != nil { + panic(err) + } + for ; iterator.Valid(); iterator.Next() { valAddr := types.ParseValidatorPowerRankKey(iterator.Key()) - if bytes.Equal(valAddr, validator.GetOperator()) { + if bytes.Equal(valAddr, bz) { if deleted { panic("found duplicate power index key") } else { deleted = true } - store.Delete(iterator.Key()) + if err = store.Delete(iterator.Key()); err != nil { + panic(err) + } } } - keeper.SetValidatorByPowerIndex(ctx, validator) + if err = keeper.SetValidatorByPowerIndex(ctx, validator); err != nil { + panic(err) + } if !apply { ctx, _ = ctx.CacheContext() } - _, err := keeper.ApplyAndReturnValidatorSetUpdates(ctx) + _, err = keeper.ApplyAndReturnValidatorSetUpdates(ctx) if err != nil { panic(err) } - validator, found := keeper.GetValidator(ctx, validator.GetOperator()) - if !found { - panic("validator expected but not found") + validator, err = keeper.GetValidator(ctx, sdk.ValAddress(bz)) + if err != nil { + panic(err) } return validator diff --git a/x/staking/keeper/unbonding.go b/x/staking/keeper/unbonding.go index 740531322110..1813797b9761 100644 --- a/x/staking/keeper/unbonding.go +++ b/x/staking/keeper/unbonding.go @@ -1,6 +1,7 @@ package keeper import ( + "context" "encoding/binary" errorsmod "cosmossdk.io/errors" @@ -10,9 +11,13 @@ import ( ) // IncrementUnbondingID increments and returns a unique ID for an unbonding operation -func (k Keeper) IncrementUnbondingID(ctx sdk.Context) (unbondingID uint64) { - store := ctx.KVStore(k.storeKey) - bz := store.Get(types.UnbondingIDKey) +func (k Keeper) IncrementUnbondingID(ctx context.Context) (unbondingID uint64, err error) { + store := k.storeService.OpenKVStore(ctx) + bz, err := store.Get(types.UnbondingIDKey) + if err != nil { + return 0, err + } + if bz != nil { unbondingID = binary.BigEndian.Uint64(bz) } @@ -23,203 +28,244 @@ func (k Keeper) IncrementUnbondingID(ctx sdk.Context) (unbondingID uint64) { bz = make([]byte, 8) binary.BigEndian.PutUint64(bz, unbondingID) - store.Set(types.UnbondingIDKey, bz) + if err = store.Set(types.UnbondingIDKey, bz); err != nil { + return 0, err + } - return unbondingID + return unbondingID, err } // DeleteUnbondingIndex removes a mapping from UnbondingId to unbonding operation -func (k Keeper) DeleteUnbondingIndex(ctx sdk.Context, id uint64) { - store := ctx.KVStore(k.storeKey) - store.Delete(types.GetUnbondingIndexKey(id)) +func (k Keeper) DeleteUnbondingIndex(ctx context.Context, id uint64) error { + store := k.storeService.OpenKVStore(ctx) + return store.Delete(types.GetUnbondingIndexKey(id)) } -func (k Keeper) GetUnbondingType(ctx sdk.Context, id uint64) (unbondingType types.UnbondingType, found bool) { - store := ctx.KVStore(k.storeKey) +// GetUnbondingType returns the enum type of unbonding which is any of +// {UnbondingDelegation | Redelegation | ValidatorUnbonding} +func (k Keeper) GetUnbondingType(ctx context.Context, id uint64) (unbondingType types.UnbondingType, err error) { + store := k.storeService.OpenKVStore(ctx) + + bz, err := store.Get(types.GetUnbondingTypeKey(id)) + if err != nil { + return unbondingType, err + } - bz := store.Get(types.GetUnbondingTypeKey(id)) if bz == nil { - return unbondingType, false + return unbondingType, types.ErrNoUnbondingType } - return types.UnbondingType(binary.BigEndian.Uint64(bz)), true + return types.UnbondingType(binary.BigEndian.Uint64(bz)), nil } -func (k Keeper) SetUnbondingType(ctx sdk.Context, id uint64, unbondingType types.UnbondingType) { - store := ctx.KVStore(k.storeKey) +// SetUnbondingType sets the enum type of unbonding which is any of +// {UnbondingDelegation | Redelegation | ValidatorUnbonding} +func (k Keeper) SetUnbondingType(ctx context.Context, id uint64, unbondingType types.UnbondingType) error { + store := k.storeService.OpenKVStore(ctx) // Convert into bytes for storage bz := make([]byte, 8) binary.BigEndian.PutUint64(bz, uint64(unbondingType)) - store.Set(types.GetUnbondingTypeKey(id), bz) + return store.Set(types.GetUnbondingTypeKey(id), bz) } // GetUnbondingDelegationByUnbondingID returns a unbonding delegation that has an unbonding delegation entry with a certain ID -func (k Keeper) GetUnbondingDelegationByUnbondingID(ctx sdk.Context, id uint64) (ubd types.UnbondingDelegation, found bool) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) GetUnbondingDelegationByUnbondingID(ctx context.Context, id uint64) (ubd types.UnbondingDelegation, err error) { + store := k.storeService.OpenKVStore(ctx) + + ubdKey, err := store.Get(types.GetUnbondingIndexKey(id)) + if err != nil { + return types.UnbondingDelegation{}, err + } - ubdKey := store.Get(types.GetUnbondingIndexKey(id)) if ubdKey == nil { - return types.UnbondingDelegation{}, false + return types.UnbondingDelegation{}, types.ErrNoUnbondingDelegation + } + + value, err := store.Get(ubdKey) + if err != nil { + return types.UnbondingDelegation{}, err } - value := store.Get(ubdKey) if value == nil { - return types.UnbondingDelegation{}, false + return types.UnbondingDelegation{}, types.ErrNoUnbondingDelegation } - ubd, err := types.UnmarshalUBD(k.cdc, value) + ubd, err = types.UnmarshalUBD(k.cdc, value) // An error here means that what we got wasn't the right type if err != nil { - return types.UnbondingDelegation{}, false + return types.UnbondingDelegation{}, err } - return ubd, true + return ubd, nil } // GetRedelegationByUnbondingID returns a unbonding delegation that has an unbonding delegation entry with a certain ID -func (k Keeper) GetRedelegationByUnbondingID(ctx sdk.Context, id uint64) (red types.Redelegation, found bool) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) GetRedelegationByUnbondingID(ctx context.Context, id uint64) (red types.Redelegation, err error) { + store := k.storeService.OpenKVStore(ctx) + + redKey, err := store.Get(types.GetUnbondingIndexKey(id)) + if err != nil { + return types.Redelegation{}, err + } - redKey := store.Get(types.GetUnbondingIndexKey(id)) if redKey == nil { - return types.Redelegation{}, false + return types.Redelegation{}, types.ErrNoRedelegation + } + + value, err := store.Get(redKey) + if err != nil { + return types.Redelegation{}, err } - value := store.Get(redKey) if value == nil { - return types.Redelegation{}, false + return types.Redelegation{}, types.ErrNoRedelegation } - red, err := types.UnmarshalRED(k.cdc, value) + red, err = types.UnmarshalRED(k.cdc, value) // An error here means that what we got wasn't the right type if err != nil { - return types.Redelegation{}, false + return types.Redelegation{}, err } - return red, true + return red, nil } // GetValidatorByUnbondingID returns the validator that is unbonding with a certain unbonding op ID -func (k Keeper) GetValidatorByUnbondingID(ctx sdk.Context, id uint64) (val types.Validator, found bool) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) GetValidatorByUnbondingID(ctx context.Context, id uint64) (val types.Validator, err error) { + store := k.storeService.OpenKVStore(ctx) + + valKey, err := store.Get(types.GetUnbondingIndexKey(id)) + if err != nil { + return types.Validator{}, err + } - valKey := store.Get(types.GetUnbondingIndexKey(id)) if valKey == nil { - return types.Validator{}, false + return types.Validator{}, types.ErrNoValidatorFound + } + + value, err := store.Get(valKey) + if err != nil { + return types.Validator{}, err } - value := store.Get(valKey) if value == nil { - return types.Validator{}, false + return types.Validator{}, types.ErrNoValidatorFound } - val, err := types.UnmarshalValidator(k.cdc, value) + val, err = types.UnmarshalValidator(k.cdc, value) // An error here means that what we got wasn't the right type if err != nil { - return types.Validator{}, false + return types.Validator{}, err } - return val, true + return val, nil } -// SetUnbondingDelegationByUnbondingID sets an index to look up an UnbondingDelegation by the unbondingID of an UnbondingDelegationEntry that it contains -// Note, it does not set the unbonding delegation itself, use SetUnbondingDelegation(ctx, ubd) for that -func (k Keeper) SetUnbondingDelegationByUnbondingID(ctx sdk.Context, ubd types.UnbondingDelegation, id uint64) { - store := ctx.KVStore(k.storeKey) +// SetUnbondingDelegationByUnbondingID sets an index to look up an UnbondingDelegation +// by the unbondingID of an UnbondingDelegationEntry that it contains Note, it does not +// set the unbonding delegation itself, use SetUnbondingDelegation(ctx, ubd) for that +func (k Keeper) SetUnbondingDelegationByUnbondingID(ctx context.Context, ubd types.UnbondingDelegation, id uint64) error { + store := k.storeService.OpenKVStore(ctx) delAddr, err := k.authKeeper.AddressCodec().StringToBytes(ubd.DelegatorAddress) if err != nil { - panic(err) + return err } - valAddr, err := sdk.ValAddressFromBech32(ubd.ValidatorAddress) + valAddr, err := k.validatorAddressCodec.StringToBytes(ubd.ValidatorAddress) if err != nil { - panic(err) + return err } ubdKey := types.GetUBDKey(delAddr, valAddr) - store.Set(types.GetUnbondingIndexKey(id), ubdKey) + if err = store.Set(types.GetUnbondingIndexKey(id), ubdKey); err != nil { + return err + } // Set unbonding type so that we know how to deserialize it later - k.SetUnbondingType(ctx, id, types.UnbondingType_UnbondingDelegation) + return k.SetUnbondingType(ctx, id, types.UnbondingType_UnbondingDelegation) } // SetRedelegationByUnbondingID sets an index to look up an Redelegation by the unbondingID of an RedelegationEntry that it contains // Note, it does not set the redelegation itself, use SetRedelegation(ctx, red) for that -func (k Keeper) SetRedelegationByUnbondingID(ctx sdk.Context, red types.Redelegation, id uint64) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) SetRedelegationByUnbondingID(ctx context.Context, red types.Redelegation, id uint64) error { + store := k.storeService.OpenKVStore(ctx) delAddr, err := k.authKeeper.AddressCodec().StringToBytes(red.DelegatorAddress) if err != nil { - panic(err) + return err } - valSrcAddr, err := sdk.ValAddressFromBech32(red.ValidatorSrcAddress) + valSrcAddr, err := k.validatorAddressCodec.StringToBytes(red.ValidatorSrcAddress) if err != nil { - panic(err) + return err } - valDstAddr, err := sdk.ValAddressFromBech32(red.ValidatorDstAddress) + valDstAddr, err := k.validatorAddressCodec.StringToBytes(red.ValidatorDstAddress) if err != nil { - panic(err) + return err } redKey := types.GetREDKey(delAddr, valSrcAddr, valDstAddr) - store.Set(types.GetUnbondingIndexKey(id), redKey) + if err = store.Set(types.GetUnbondingIndexKey(id), redKey); err != nil { + return err + } // Set unbonding type so that we know how to deserialize it later - k.SetUnbondingType(ctx, id, types.UnbondingType_Redelegation) + return k.SetUnbondingType(ctx, id, types.UnbondingType_Redelegation) } // SetValidatorByUnbondingID sets an index to look up a Validator by the unbondingID corresponding to its current unbonding // Note, it does not set the validator itself, use SetValidator(ctx, val) for that -func (k Keeper) SetValidatorByUnbondingID(ctx sdk.Context, val types.Validator, id uint64) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) SetValidatorByUnbondingID(ctx context.Context, val types.Validator, id uint64) error { + store := k.storeService.OpenKVStore(ctx) - valAddr, err := sdk.ValAddressFromBech32(val.OperatorAddress) + valAddr, err := k.validatorAddressCodec.StringToBytes(val.OperatorAddress) if err != nil { - panic(err) + return err } valKey := types.GetValidatorKey(valAddr) - store.Set(types.GetUnbondingIndexKey(id), valKey) + if err = store.Set(types.GetUnbondingIndexKey(id), valKey); err != nil { + return err + } // Set unbonding type so that we know how to deserialize it later - k.SetUnbondingType(ctx, id, types.UnbondingType_ValidatorUnbonding) + return k.SetUnbondingType(ctx, id, types.UnbondingType_ValidatorUnbonding) } // unbondingDelegationEntryArrayIndex and redelegationEntryArrayIndex are utilities to find // at which position in the Entries array the entry with a given id is -func unbondingDelegationEntryArrayIndex(ubd types.UnbondingDelegation, id uint64) (index int, found bool) { +func unbondingDelegationEntryArrayIndex(ubd types.UnbondingDelegation, id uint64) (index int, err error) { for i, entry := range ubd.Entries { // we find the entry with the right ID if entry.UnbondingId == id { - return i, true + return i, nil } } - return 0, false + return 0, types.ErrNoUnbondingDelegation } -func redelegationEntryArrayIndex(red types.Redelegation, id uint64) (index int, found bool) { +func redelegationEntryArrayIndex(red types.Redelegation, id uint64) (index int, err error) { for i, entry := range red.Entries { // we find the entry with the right ID if entry.UnbondingId == id { - return i, true + return i, nil } } - return 0, false + return 0, types.ErrNoRedelegation } // UnbondingCanComplete allows a stopped unbonding operation, such as an // unbonding delegation, a redelegation, or a validator unbonding to complete. // In order for the unbonding operation with `id` to eventually complete, every call // to PutUnbondingOnHold(id) must be matched by a call to UnbondingCanComplete(id). -func (k Keeper) UnbondingCanComplete(ctx sdk.Context, id uint64) error { - unbondingType, found := k.GetUnbondingType(ctx, id) - if !found { - return types.ErrUnbondingNotFound +func (k Keeper) UnbondingCanComplete(ctx context.Context, id uint64) error { + unbondingType, err := k.GetUnbondingType(ctx, id) + if err != nil { + return err } switch unbondingType { @@ -242,15 +288,15 @@ func (k Keeper) UnbondingCanComplete(ctx sdk.Context, id uint64) error { return nil } -func (k Keeper) unbondingDelegationEntryCanComplete(ctx sdk.Context, id uint64) error { - ubd, found := k.GetUnbondingDelegationByUnbondingID(ctx, id) - if !found { - return types.ErrUnbondingNotFound +func (k Keeper) unbondingDelegationEntryCanComplete(ctx context.Context, id uint64) error { + ubd, err := k.GetUnbondingDelegationByUnbondingID(ctx, id) + if err != nil { + return err } - i, found := unbondingDelegationEntryArrayIndex(ubd, id) - if !found { - return types.ErrUnbondingNotFound + i, err := unbondingDelegationEntryArrayIndex(ubd, id) + if err != nil { + return err } // The entry must be on hold @@ -263,15 +309,19 @@ func (k Keeper) unbondingDelegationEntryCanComplete(ctx sdk.Context, id uint64) } ubd.Entries[i].UnbondingOnHoldRefCount-- + sdkCtx := sdk.UnwrapSDKContext(ctx) // Check if entry is matured. - if !ubd.Entries[i].OnHold() && ubd.Entries[i].IsMature(ctx.BlockHeader().Time) { + if !ubd.Entries[i].OnHold() && ubd.Entries[i].IsMature(sdkCtx.BlockHeader().Time) { // If matured, complete it. delegatorAddress, err := k.authKeeper.AddressCodec().StringToBytes(ubd.DelegatorAddress) if err != nil { return err } - bondDenom := k.GetParams(ctx).BondDenom + bondDenom, err := k.BondDenom(ctx) + if err != nil { + return err + } // track undelegation only when remaining or truncated shares are non-zero if !ubd.Entries[i].Balance.IsZero() { @@ -286,29 +336,30 @@ func (k Keeper) unbondingDelegationEntryCanComplete(ctx sdk.Context, id uint64) // Remove entry ubd.RemoveEntry(int64(i)) // Remove from the UnbondingIndex - k.DeleteUnbondingIndex(ctx, id) + err = k.DeleteUnbondingIndex(ctx, id) + if err != nil { + return err + } + } // set the unbonding delegation or remove it if there are no more entries if len(ubd.Entries) == 0 { - k.RemoveUnbondingDelegation(ctx, ubd) - } else { - k.SetUnbondingDelegation(ctx, ubd) + return k.RemoveUnbondingDelegation(ctx, ubd) } - // Successfully completed unbonding - return nil + return k.SetUnbondingDelegation(ctx, ubd) } -func (k Keeper) redelegationEntryCanComplete(ctx sdk.Context, id uint64) error { - red, found := k.GetRedelegationByUnbondingID(ctx, id) - if !found { - return types.ErrUnbondingNotFound +func (k Keeper) redelegationEntryCanComplete(ctx context.Context, id uint64) error { + red, err := k.GetRedelegationByUnbondingID(ctx, id) + if err != nil { + return err } - i, found := redelegationEntryArrayIndex(red, id) - if !found { - return types.ErrUnbondingNotFound + i, err := redelegationEntryArrayIndex(red, id) + if err != nil { + return err } // The entry must be on hold @@ -321,29 +372,29 @@ func (k Keeper) redelegationEntryCanComplete(ctx sdk.Context, id uint64) error { } red.Entries[i].UnbondingOnHoldRefCount-- - if !red.Entries[i].OnHold() && red.Entries[i].IsMature(ctx.BlockHeader().Time) { + sdkCtx := sdk.UnwrapSDKContext(ctx) + if !red.Entries[i].OnHold() && red.Entries[i].IsMature(sdkCtx.BlockHeader().Time) { // If matured, complete it. // Remove entry red.RemoveEntry(int64(i)) // Remove from the Unbonding index - k.DeleteUnbondingIndex(ctx, id) + if err = k.DeleteUnbondingIndex(ctx, id); err != nil { + return err + } } // set the redelegation or remove it if there are no more entries if len(red.Entries) == 0 { - k.RemoveRedelegation(ctx, red) - } else { - k.SetRedelegation(ctx, red) + return k.RemoveRedelegation(ctx, red) } - // Successfully completed unbonding - return nil + return k.SetRedelegation(ctx, red) } -func (k Keeper) validatorUnbondingCanComplete(ctx sdk.Context, id uint64) error { - val, found := k.GetValidatorByUnbondingID(ctx, id) - if !found { - return types.ErrUnbondingNotFound +func (k Keeper) validatorUnbondingCanComplete(ctx context.Context, id uint64) error { + val, err := k.GetValidatorByUnbondingID(ctx, id) + if err != nil { + return err } if val.UnbondingOnHoldRefCount <= 0 { @@ -354,19 +405,17 @@ func (k Keeper) validatorUnbondingCanComplete(ctx sdk.Context, id uint64) error ) } val.UnbondingOnHoldRefCount-- - k.SetValidator(ctx, val) - - return nil + return k.SetValidator(ctx, val) } // PutUnbondingOnHold allows an external module to stop an unbonding operation, // such as an unbonding delegation, a redelegation, or a validator unbonding. // In order for the unbonding operation with `id` to eventually complete, every call // to PutUnbondingOnHold(id) must be matched by a call to UnbondingCanComplete(id). -func (k Keeper) PutUnbondingOnHold(ctx sdk.Context, id uint64) error { - unbondingType, found := k.GetUnbondingType(ctx, id) - if !found { - return types.ErrUnbondingNotFound +func (k Keeper) PutUnbondingOnHold(ctx context.Context, id uint64) error { + unbondingType, err := k.GetUnbondingType(ctx, id) + if err != nil { + return err } switch unbondingType { case types.UnbondingType_UnbondingDelegation: @@ -388,48 +437,42 @@ func (k Keeper) PutUnbondingOnHold(ctx sdk.Context, id uint64) error { return nil } -func (k Keeper) putUnbondingDelegationEntryOnHold(ctx sdk.Context, id uint64) error { - ubd, found := k.GetUnbondingDelegationByUnbondingID(ctx, id) - if !found { - return types.ErrUnbondingNotFound +func (k Keeper) putUnbondingDelegationEntryOnHold(ctx context.Context, id uint64) error { + ubd, err := k.GetUnbondingDelegationByUnbondingID(ctx, id) + if err != nil { + return err } - i, found := unbondingDelegationEntryArrayIndex(ubd, id) - if !found { - return types.ErrUnbondingNotFound + i, err := unbondingDelegationEntryArrayIndex(ubd, id) + if err != nil { + return err } ubd.Entries[i].UnbondingOnHoldRefCount++ - k.SetUnbondingDelegation(ctx, ubd) - - return nil + return k.SetUnbondingDelegation(ctx, ubd) } -func (k Keeper) putRedelegationEntryOnHold(ctx sdk.Context, id uint64) error { - red, found := k.GetRedelegationByUnbondingID(ctx, id) - if !found { - return types.ErrUnbondingNotFound +func (k Keeper) putRedelegationEntryOnHold(ctx context.Context, id uint64) error { + red, err := k.GetRedelegationByUnbondingID(ctx, id) + if err != nil { + return err } - i, found := redelegationEntryArrayIndex(red, id) - if !found { - return types.ErrUnbondingNotFound + i, err := redelegationEntryArrayIndex(red, id) + if err != nil { + return err } red.Entries[i].UnbondingOnHoldRefCount++ - k.SetRedelegation(ctx, red) - - return nil + return k.SetRedelegation(ctx, red) } -func (k Keeper) putValidatorOnHold(ctx sdk.Context, id uint64) error { - val, found := k.GetValidatorByUnbondingID(ctx, id) - if !found { - return types.ErrUnbondingNotFound +func (k Keeper) putValidatorOnHold(ctx context.Context, id uint64) error { + val, err := k.GetValidatorByUnbondingID(ctx, id) + if err != nil { + return err } val.UnbondingOnHoldRefCount++ - k.SetValidator(ctx, val) - - return nil + return k.SetValidator(ctx, val) } diff --git a/x/staking/keeper/unbonding_test.go b/x/staking/keeper/unbonding_test.go index 8501afa3e8c6..65e7c9de835b 100644 --- a/x/staking/keeper/unbonding_test.go +++ b/x/staking/keeper/unbonding_test.go @@ -4,6 +4,8 @@ import ( "time" "cosmossdk.io/math" + + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking/testutil" "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -11,11 +13,14 @@ import ( func (s *KeeperTestSuite) TestIncrementUnbondingID() { for i := 1; i < 10; i++ { - s.Require().Equal(uint64(i), s.stakingKeeper.IncrementUnbondingID(s.ctx)) + id, err := s.stakingKeeper.IncrementUnbondingID(s.ctx) + s.Require().NoError(err) + s.Require().Equal(uint64(i), id) } } func (s *KeeperTestSuite) TestUnbondingTypeAccessors() { + require := s.Require() cases := []struct { exists bool name string @@ -40,15 +45,15 @@ func (s *KeeperTestSuite) TestUnbondingTypeAccessors() { for i, tc := range cases { s.Run(tc.name, func() { if tc.exists { - s.stakingKeeper.SetUnbondingType(s.ctx, uint64(i), tc.expected) + require.NoError(s.stakingKeeper.SetUnbondingType(s.ctx, uint64(i), tc.expected)) } - unbondingType, found := s.stakingKeeper.GetUnbondingType(s.ctx, uint64(i)) + unbondingType, err := s.stakingKeeper.GetUnbondingType(s.ctx, uint64(i)) if tc.exists { - s.Require().True(found) - s.Require().Equal(tc.expected, unbondingType) + require.NoError(err) + require.Equal(tc.expected, unbondingType) } else { - s.Require().False(found) + require.ErrorIs(err, types.ErrNoUnbondingType) } }) } @@ -56,6 +61,7 @@ func (s *KeeperTestSuite) TestUnbondingTypeAccessors() { func (s *KeeperTestSuite) TestUnbondingDelegationByUnbondingIDAccessors() { delAddrs, valAddrs := createValAddrs(2) + require := s.Require() type exists struct { setUnbondingDelegation bool @@ -75,8 +81,9 @@ func (s *KeeperTestSuite) TestUnbondingDelegationByUnbondingIDAccessors() { valAddrs[0], 0, time.Unix(0, 0).UTC(), - sdk.NewInt(5), + math.NewInt(5), 0, + addresscodec.NewBech32Codec("cosmosvaloper"), addresscodec.NewBech32Codec("cosmos"), ), }, { @@ -87,8 +94,9 @@ func (s *KeeperTestSuite) TestUnbondingDelegationByUnbondingIDAccessors() { valAddrs[1], 0, time.Unix(0, 0).UTC(), - sdk.NewInt(5), + math.NewInt(5), 0, + addresscodec.NewBech32Codec("cosmosvaloper"), addresscodec.NewBech32Codec("cosmos"), ), }, { @@ -99,8 +107,9 @@ func (s *KeeperTestSuite) TestUnbondingDelegationByUnbondingIDAccessors() { valAddrs[0], 0, time.Unix(0, 0).UTC(), - sdk.NewInt(5), + math.NewInt(5), 0, + addresscodec.NewBech32Codec("cosmosvaloper"), addresscodec.NewBech32Codec("cosmos"), ), }, } @@ -108,19 +117,19 @@ func (s *KeeperTestSuite) TestUnbondingDelegationByUnbondingIDAccessors() { for i, tc := range cases { s.Run(tc.name, func() { if tc.exists.setUnbondingDelegation { - s.stakingKeeper.SetUnbondingDelegation(s.ctx, tc.expected) + require.NoError(s.stakingKeeper.SetUnbondingDelegation(s.ctx, tc.expected)) } if tc.exists.setUnbondingDelegationByUnbondingID { - s.stakingKeeper.SetUnbondingDelegationByUnbondingID(s.ctx, tc.expected, uint64(i)) + require.NoError(s.stakingKeeper.SetUnbondingDelegationByUnbondingID(s.ctx, tc.expected, uint64(i))) } - ubd, found := s.stakingKeeper.GetUnbondingDelegationByUnbondingID(s.ctx, uint64(i)) + ubd, err := s.stakingKeeper.GetUnbondingDelegationByUnbondingID(s.ctx, uint64(i)) if tc.exists.setUnbondingDelegation && tc.exists.setUnbondingDelegationByUnbondingID { - s.Require().True(found) - s.Require().Equal(tc.expected, ubd) + require.NoError(err) + require.Equal(tc.expected, ubd) } else { - s.Require().False(found) + require.ErrorIs(err, types.ErrNoUnbondingDelegation) } }) } @@ -128,6 +137,7 @@ func (s *KeeperTestSuite) TestUnbondingDelegationByUnbondingIDAccessors() { func (s *KeeperTestSuite) TestRedelegationByUnbondingIDAccessors() { delAddrs, valAddrs := createValAddrs(2) + require := s.Require() type exists struct { setRedelegation bool @@ -148,9 +158,10 @@ func (s *KeeperTestSuite) TestRedelegationByUnbondingIDAccessors() { valAddrs[1], 0, time.Unix(5, 0).UTC(), - sdk.NewInt(10), + math.NewInt(10), math.LegacyNewDec(10), 0, + addresscodec.NewBech32Codec("cosmosvaloper"), addresscodec.NewBech32Codec("cosmos"), ), }, { @@ -162,9 +173,10 @@ func (s *KeeperTestSuite) TestRedelegationByUnbondingIDAccessors() { valAddrs[1], 0, time.Unix(5, 0).UTC(), - sdk.NewInt(10), + math.NewInt(10), math.LegacyNewDec(10), 0, + addresscodec.NewBech32Codec("cosmosvaloper"), addresscodec.NewBech32Codec("cosmos"), ), }, { @@ -176,9 +188,10 @@ func (s *KeeperTestSuite) TestRedelegationByUnbondingIDAccessors() { valAddrs[0], 0, time.Unix(5, 0).UTC(), - sdk.NewInt(10), + math.NewInt(10), math.LegacyNewDec(10), 0, + addresscodec.NewBech32Codec("cosmosvaloper"), addresscodec.NewBech32Codec("cosmos"), ), }, } @@ -186,19 +199,19 @@ func (s *KeeperTestSuite) TestRedelegationByUnbondingIDAccessors() { for i, tc := range cases { s.Run(tc.name, func() { if tc.exists.setRedelegation { - s.stakingKeeper.SetRedelegation(s.ctx, tc.expected) + require.NoError(s.stakingKeeper.SetRedelegation(s.ctx, tc.expected)) } if tc.exists.setRedelegationByUnbondingID { - s.stakingKeeper.SetRedelegationByUnbondingID(s.ctx, tc.expected, uint64(i)) + require.NoError(s.stakingKeeper.SetRedelegationByUnbondingID(s.ctx, tc.expected, uint64(i))) } - red, found := s.stakingKeeper.GetRedelegationByUnbondingID(s.ctx, uint64(i)) + red, err := s.stakingKeeper.GetRedelegationByUnbondingID(s.ctx, uint64(i)) if tc.exists.setRedelegation && tc.exists.setRedelegationByUnbondingID { - s.Require().True(found) - s.Require().Equal(tc.expected, red) + require.NoError(err) + require.Equal(tc.expected, red) } else { - s.Require().False(found) + require.ErrorIs(err, types.ErrNoRedelegation) } }) } @@ -206,6 +219,7 @@ func (s *KeeperTestSuite) TestRedelegationByUnbondingIDAccessors() { func (s *KeeperTestSuite) TestValidatorByUnbondingIDAccessors() { _, valAddrs := createValAddrs(3) + require := s.Require() type exists struct { setValidator bool @@ -237,19 +251,19 @@ func (s *KeeperTestSuite) TestValidatorByUnbondingIDAccessors() { for i, tc := range cases { s.Run(tc.name, func() { if tc.exists.setValidator { - s.stakingKeeper.SetValidator(s.ctx, tc.validator) + require.NoError(s.stakingKeeper.SetValidator(s.ctx, tc.validator)) } if tc.exists.setValidatorByUnbondingID { - s.stakingKeeper.SetValidatorByUnbondingID(s.ctx, tc.validator, uint64(i)) + require.NoError(s.stakingKeeper.SetValidatorByUnbondingID(s.ctx, tc.validator, uint64(i))) } - val, found := s.stakingKeeper.GetValidatorByUnbondingID(s.ctx, uint64(i)) + val, err := s.stakingKeeper.GetValidatorByUnbondingID(s.ctx, uint64(i)) if tc.exists.setValidator && tc.exists.setValidatorByUnbondingID { - s.Require().True(found) - s.Require().Equal(tc.validator, val) + require.NoError(err) + require.Equal(tc.validator, val) } else { - s.Require().False(found) + require.ErrorIs(err, types.ErrNoValidatorFound) } }) } @@ -257,42 +271,44 @@ func (s *KeeperTestSuite) TestValidatorByUnbondingIDAccessors() { func (s *KeeperTestSuite) TestUnbondingCanComplete() { delAddrs, valAddrs := createValAddrs(3) + require := s.Require() unbondingID := uint64(1) // no unbondingID set err := s.stakingKeeper.UnbondingCanComplete(s.ctx, unbondingID) - s.Require().ErrorIs(err, types.ErrUnbondingNotFound) + require.ErrorIs(err, types.ErrNoUnbondingType) // unbonding delegation - s.stakingKeeper.SetUnbondingType(s.ctx, unbondingID, types.UnbondingType_UnbondingDelegation) + require.NoError(s.stakingKeeper.SetUnbondingType(s.ctx, unbondingID, types.UnbondingType_UnbondingDelegation)) err = s.stakingKeeper.UnbondingCanComplete(s.ctx, unbondingID) - s.Require().ErrorIs(err, types.ErrUnbondingNotFound) + require.ErrorIs(err, types.ErrNoUnbondingDelegation) ubd := types.NewUnbondingDelegation( delAddrs[0], valAddrs[0], 0, time.Unix(0, 0).UTC(), - sdk.NewInt(5), + math.NewInt(5), unbondingID, + addresscodec.NewBech32Codec("cosmosvaloper"), addresscodec.NewBech32Codec("cosmos"), ) - s.stakingKeeper.SetUnbondingDelegation(s.ctx, ubd) - s.stakingKeeper.SetUnbondingDelegationByUnbondingID(s.ctx, ubd, unbondingID) + require.NoError(s.stakingKeeper.SetUnbondingDelegation(s.ctx, ubd)) + require.NoError(s.stakingKeeper.SetUnbondingDelegationByUnbondingID(s.ctx, ubd, unbondingID)) err = s.stakingKeeper.UnbondingCanComplete(s.ctx, unbondingID) - s.Require().ErrorIs(err, types.ErrUnbondingOnHoldRefCountNegative) + require.ErrorIs(err, types.ErrUnbondingOnHoldRefCountNegative) err = s.stakingKeeper.PutUnbondingOnHold(s.ctx, unbondingID) - s.Require().NoError(err) - s.bankKeeper.EXPECT().UndelegateCoinsFromModuleToAccount(s.ctx, types.NotBondedPoolName, delAddrs[0], sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5)))).Return(nil) + require.NoError(err) + s.bankKeeper.EXPECT().UndelegateCoinsFromModuleToAccount(s.ctx, types.NotBondedPoolName, delAddrs[0], sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(5)))).Return(nil) err = s.stakingKeeper.UnbondingCanComplete(s.ctx, unbondingID) - s.Require().NoError(err) + require.NoError(err) // redelegation unbondingID++ - s.stakingKeeper.SetUnbondingType(s.ctx, unbondingID, types.UnbondingType_Redelegation) + require.NoError(s.stakingKeeper.SetUnbondingType(s.ctx, unbondingID, types.UnbondingType_Redelegation)) err = s.stakingKeeper.UnbondingCanComplete(s.ctx, unbondingID) - s.Require().ErrorIs(err, types.ErrUnbondingNotFound) + require.ErrorIs(err, types.ErrNoRedelegation) red := types.NewRedelegation( delAddrs[0], @@ -300,34 +316,31 @@ func (s *KeeperTestSuite) TestUnbondingCanComplete() { valAddrs[1], 0, time.Unix(5, 0).UTC(), - sdk.NewInt(10), + math.NewInt(10), math.LegacyNewDec(10), unbondingID, + addresscodec.NewBech32Codec("cosmosvaloper"), addresscodec.NewBech32Codec("cosmos"), ) - s.stakingKeeper.SetRedelegation(s.ctx, red) - s.stakingKeeper.SetRedelegationByUnbondingID(s.ctx, red, unbondingID) + require.NoError(s.stakingKeeper.SetRedelegation(s.ctx, red)) + require.NoError(s.stakingKeeper.SetRedelegationByUnbondingID(s.ctx, red, unbondingID)) err = s.stakingKeeper.UnbondingCanComplete(s.ctx, unbondingID) - s.Require().ErrorIs(err, types.ErrUnbondingOnHoldRefCountNegative) + require.ErrorIs(err, types.ErrUnbondingOnHoldRefCountNegative) - err = s.stakingKeeper.PutUnbondingOnHold(s.ctx, unbondingID) - s.Require().NoError(err) - err = s.stakingKeeper.UnbondingCanComplete(s.ctx, unbondingID) - s.Require().NoError(err) + require.NoError(s.stakingKeeper.PutUnbondingOnHold(s.ctx, unbondingID)) + require.NoError(s.stakingKeeper.UnbondingCanComplete(s.ctx, unbondingID)) // validator unbonding unbondingID++ - s.stakingKeeper.SetUnbondingType(s.ctx, unbondingID, types.UnbondingType_ValidatorUnbonding) + require.NoError(s.stakingKeeper.SetUnbondingType(s.ctx, unbondingID, types.UnbondingType_ValidatorUnbonding)) err = s.stakingKeeper.UnbondingCanComplete(s.ctx, unbondingID) - s.Require().ErrorIs(err, types.ErrUnbondingNotFound) + require.ErrorIs(err, types.ErrNoValidatorFound) val := testutil.NewValidator(s.T(), valAddrs[0], PKs[0]) - s.stakingKeeper.SetValidator(s.ctx, val) - s.stakingKeeper.SetValidatorByUnbondingID(s.ctx, val, unbondingID) + require.NoError(s.stakingKeeper.SetValidator(s.ctx, val)) + require.NoError(s.stakingKeeper.SetValidatorByUnbondingID(s.ctx, val, unbondingID)) err = s.stakingKeeper.UnbondingCanComplete(s.ctx, unbondingID) - s.Require().ErrorIs(err, types.ErrUnbondingOnHoldRefCountNegative) + require.ErrorIs(err, types.ErrUnbondingOnHoldRefCountNegative) - err = s.stakingKeeper.PutUnbondingOnHold(s.ctx, unbondingID) - s.Require().NoError(err) - err = s.stakingKeeper.UnbondingCanComplete(s.ctx, unbondingID) - s.Require().NoError(err) + require.NoError(s.stakingKeeper.PutUnbondingOnHold(s.ctx, unbondingID)) + require.NoError(s.stakingKeeper.UnbondingCanComplete(s.ctx, unbondingID)) } diff --git a/x/staking/keeper/val_state_change.go b/x/staking/keeper/val_state_change.go index d459ed6ff318..444633983c36 100644 --- a/x/staking/keeper/val_state_change.go +++ b/x/staking/keeper/val_state_change.go @@ -2,12 +2,14 @@ package keeper import ( "bytes" + "context" "fmt" "sort" abci "github.com/cometbft/cometbft/abci/types" gogotypes "github.com/cosmos/gogoproto/types" + "cosmossdk.io/core/address" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" @@ -16,7 +18,7 @@ import ( // BlockValidatorUpdates calculates the ValidatorUpdates for the current block // Called in each EndBlock -func (k Keeper) BlockValidatorUpdates(ctx sdk.Context) []abci.ValidatorUpdate { +func (k Keeper) BlockValidatorUpdates(ctx context.Context) ([]abci.ValidatorUpdate, error) { // Calculate validator set changes. // // NOTE: ApplyAndReturnValidatorSetUpdates has to come before @@ -28,22 +30,30 @@ func (k Keeper) BlockValidatorUpdates(ctx sdk.Context) []abci.ValidatorUpdate { // UnbondAllMatureValidatorQueue). validatorUpdates, err := k.ApplyAndReturnValidatorSetUpdates(ctx) if err != nil { - panic(err) + return nil, err } // unbond all mature validators from the unbonding queue - k.UnbondAllMatureValidators(ctx) + err = k.UnbondAllMatureValidators(ctx) + if err != nil { + return nil, err + } + sdkCtx := sdk.UnwrapSDKContext(ctx) // Remove all mature unbonding delegations from the ubd queue. - matureUnbonds := k.DequeueAllMatureUBDQueue(ctx, ctx.BlockHeader().Time) + matureUnbonds, err := k.DequeueAllMatureUBDQueue(ctx, sdkCtx.BlockHeader().Time) + if err != nil { + return nil, err + } + for _, dvPair := range matureUnbonds { - addr, err := sdk.ValAddressFromBech32(dvPair.ValidatorAddress) + addr, err := k.validatorAddressCodec.StringToBytes(dvPair.ValidatorAddress) if err != nil { - panic(err) + return nil, err } delegatorAddress, err := k.authKeeper.AddressCodec().StringToBytes(dvPair.DelegatorAddress) if err != nil { - panic(err) + return nil, err } balances, err := k.CompleteUnbonding(ctx, delegatorAddress, addr) @@ -51,7 +61,7 @@ func (k Keeper) BlockValidatorUpdates(ctx sdk.Context) []abci.ValidatorUpdate { continue } - ctx.EventManager().EmitEvent( + sdkCtx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeCompleteUnbonding, sdk.NewAttribute(sdk.AttributeKeyAmount, balances.String()), @@ -62,19 +72,23 @@ func (k Keeper) BlockValidatorUpdates(ctx sdk.Context) []abci.ValidatorUpdate { } // Remove all mature redelegations from the red queue. - matureRedelegations := k.DequeueAllMatureRedelegationQueue(ctx, ctx.BlockHeader().Time) + matureRedelegations, err := k.DequeueAllMatureRedelegationQueue(ctx, sdkCtx.BlockHeader().Time) + if err != nil { + return nil, err + } + for _, dvvTriplet := range matureRedelegations { - valSrcAddr, err := sdk.ValAddressFromBech32(dvvTriplet.ValidatorSrcAddress) + valSrcAddr, err := k.validatorAddressCodec.StringToBytes(dvvTriplet.ValidatorSrcAddress) if err != nil { - panic(err) + return nil, err } - valDstAddr, err := sdk.ValAddressFromBech32(dvvTriplet.ValidatorDstAddress) + valDstAddr, err := k.validatorAddressCodec.StringToBytes(dvvTriplet.ValidatorDstAddress) if err != nil { - panic(err) + return nil, err } delegatorAddress, err := k.authKeeper.AddressCodec().StringToBytes(dvvTriplet.DelegatorAddress) if err != nil { - panic(err) + return nil, err } balances, err := k.CompleteRedelegation( @@ -87,7 +101,7 @@ func (k Keeper) BlockValidatorUpdates(ctx sdk.Context) []abci.ValidatorUpdate { continue } - ctx.EventManager().EmitEvent( + sdkCtx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeCompleteRedelegation, sdk.NewAttribute(sdk.AttributeKeyAmount, balances.String()), @@ -98,7 +112,7 @@ func (k Keeper) BlockValidatorUpdates(ctx sdk.Context) []abci.ValidatorUpdate { ) } - return validatorUpdates + return validatorUpdates, nil } // ApplyAndReturnValidatorSetUpdates applies and return accumulated updates to the bonded validator set. Also, @@ -113,8 +127,11 @@ func (k Keeper) BlockValidatorUpdates(ctx sdk.Context) []abci.ValidatorUpdate { // CONTRACT: Only validators with non-zero power or zero-power that were bonded // at the previous block height or were removed from the validator set entirely // are returned to CometBFT. -func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx sdk.Context) (updates []abci.ValidatorUpdate, err error) { - params := k.GetParams(ctx) +func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx context.Context) (updates []abci.ValidatorUpdate, err error) { + params, err := k.GetParams(ctx) + if err != nil { + return nil, err + } maxValidators := params.MaxValidators powerReduction := k.PowerReduction(ctx) totalPower := math.ZeroInt() @@ -129,7 +146,10 @@ func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx sdk.Context) (updates []ab } // Iterate over validators, highest power to lowest. - iterator := k.ValidatorsPowerStoreIterator(ctx) + iterator, err := k.ValidatorsPowerStoreIterator(ctx) + if err != nil { + return nil, err + } defer iterator.Close() for count := 0; iterator.Valid() && count < int(maxValidators); iterator.Next() { @@ -169,7 +189,7 @@ func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx sdk.Context) (updates []ab } // fetch the old power bytes - valAddrStr, err := sdk.Bech32ifyAddressBytes(sdk.GetConfig().GetBech32ValidatorAddrPrefix(), valAddr) + valAddrStr, err := k.validatorAddressCodec.BytesToString(valAddr) if err != nil { return nil, err } @@ -181,7 +201,9 @@ func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx sdk.Context) (updates []ab if !found || !bytes.Equal(oldPowerBytes, newPowerBytes) { updates = append(updates, validator.ABCIValidatorUpdate(powerReduction)) - k.SetLastValidatorPower(ctx, valAddr, newPower) + if err = k.SetLastValidatorPower(ctx, valAddr, newPower); err != nil { + return nil, err + } } delete(last, valAddrStr) @@ -190,7 +212,7 @@ func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx sdk.Context) (updates []ab totalPower = totalPower.Add(math.NewInt(newPower)) } - noLongerBonded, err := sortNoLongerBonded(last) + noLongerBonded, err := sortNoLongerBonded(last, k.validatorAddressCodec) if err != nil { return nil, err } @@ -199,10 +221,17 @@ func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx sdk.Context) (updates []ab validator := k.mustGetValidator(ctx, sdk.ValAddress(valAddrBytes)) validator, err = k.bondedToUnbonding(ctx, validator) if err != nil { - return + return nil, err + } + str, err := k.validatorAddressCodec.StringToBytes(validator.GetOperator()) + if err != nil { + return nil, err } amtFromBondedToNotBonded = amtFromBondedToNotBonded.Add(validator.GetTokens()) - k.DeleteLastValidatorPower(ctx, validator.GetOperator()) + if err = k.DeleteLastValidatorPower(ctx, str); err != nil { + return nil, err + } + updates = append(updates, validator.ABCIValidatorUpdateZero()) } @@ -215,26 +244,34 @@ func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx sdk.Context) (updates []ab // Compare and subtract the respective amounts to only perform one transfer. // This is done in order to avoid doing multiple updates inside each iterator/loop. case amtFromNotBondedToBonded.GT(amtFromBondedToNotBonded): - k.notBondedTokensToBonded(ctx, amtFromNotBondedToBonded.Sub(amtFromBondedToNotBonded)) + if err = k.notBondedTokensToBonded(ctx, amtFromNotBondedToBonded.Sub(amtFromBondedToNotBonded)); err != nil { + return nil, err + } case amtFromNotBondedToBonded.LT(amtFromBondedToNotBonded): - k.bondedTokensToNotBonded(ctx, amtFromBondedToNotBonded.Sub(amtFromNotBondedToBonded)) + if err = k.bondedTokensToNotBonded(ctx, amtFromBondedToNotBonded.Sub(amtFromNotBondedToBonded)); err != nil { + return nil, err + } default: // equal amounts of tokens; no update required } // set total power on lookup index if there are any updates if len(updates) > 0 { - k.SetLastTotalPower(ctx, totalPower) + if err = k.SetLastTotalPower(ctx, totalPower); err != nil { + return nil, err + } } // set the list of validator updates - k.SetValidatorUpdates(ctx, updates) + if err = k.SetValidatorUpdates(ctx, updates); err != nil { + return nil, err + } return updates, err } // Validator state transitions -func (k Keeper) bondedToUnbonding(ctx sdk.Context, validator types.Validator) (types.Validator, error) { +func (k Keeper) bondedToUnbonding(ctx context.Context, validator types.Validator) (types.Validator, error) { if !validator.IsBonded() { panic(fmt.Sprintf("bad state transition bondedToUnbonding, validator: %v\n", validator)) } @@ -242,7 +279,7 @@ func (k Keeper) bondedToUnbonding(ctx sdk.Context, validator types.Validator) (t return k.BeginUnbondingValidator(ctx, validator) } -func (k Keeper) unbondingToBonded(ctx sdk.Context, validator types.Validator) (types.Validator, error) { +func (k Keeper) unbondingToBonded(ctx context.Context, validator types.Validator) (types.Validator, error) { if !validator.IsUnbonding() { panic(fmt.Sprintf("bad state transition unbondingToBonded, validator: %v\n", validator)) } @@ -250,7 +287,7 @@ func (k Keeper) unbondingToBonded(ctx sdk.Context, validator types.Validator) (t return k.bondValidator(ctx, validator) } -func (k Keeper) unbondedToBonded(ctx sdk.Context, validator types.Validator) (types.Validator, error) { +func (k Keeper) unbondedToBonded(ctx context.Context, validator types.Validator) (types.Validator, error) { if !validator.IsUnbonded() { panic(fmt.Sprintf("bad state transition unbondedToBonded, validator: %v\n", validator)) } @@ -259,49 +296,64 @@ func (k Keeper) unbondedToBonded(ctx sdk.Context, validator types.Validator) (ty } // UnbondingToUnbonded switches a validator from unbonding state to unbonded state -func (k Keeper) UnbondingToUnbonded(ctx sdk.Context, validator types.Validator) types.Validator { +func (k Keeper) UnbondingToUnbonded(ctx context.Context, validator types.Validator) (types.Validator, error) { if !validator.IsUnbonding() { - panic(fmt.Sprintf("bad state transition unbondingToUnbonded, validator: %v\n", validator)) + return types.Validator{}, fmt.Errorf("bad state transition unbondingToUnbonded, validator: %v", validator) } return k.completeUnbondingValidator(ctx, validator) } // send a validator to jail -func (k Keeper) jailValidator(ctx sdk.Context, validator types.Validator) { +func (k Keeper) jailValidator(ctx context.Context, validator types.Validator) error { if validator.Jailed { - panic(fmt.Sprintf("cannot jail already jailed validator, validator: %v\n", validator)) + return types.ErrValidatorJailed.Wrapf("cannot jail already jailed validator, validator: %v", validator) } validator.Jailed = true - k.SetValidator(ctx, validator) - k.DeleteValidatorByPowerIndex(ctx, validator) + if err := k.SetValidator(ctx, validator); err != nil { + return err + } + + return k.DeleteValidatorByPowerIndex(ctx, validator) } // remove a validator from jail -func (k Keeper) unjailValidator(ctx sdk.Context, validator types.Validator) { +func (k Keeper) unjailValidator(ctx context.Context, validator types.Validator) error { if !validator.Jailed { - panic(fmt.Sprintf("cannot unjail already unjailed validator, validator: %v\n", validator)) + return fmt.Errorf("cannot unjail already unjailed validator, validator: %v", validator) } validator.Jailed = false - k.SetValidator(ctx, validator) - k.SetValidatorByPowerIndex(ctx, validator) + if err := k.SetValidator(ctx, validator); err != nil { + return err + } + + return k.SetValidatorByPowerIndex(ctx, validator) } // perform all the store operations for when a validator status becomes bonded -func (k Keeper) bondValidator(ctx sdk.Context, validator types.Validator) (types.Validator, error) { +func (k Keeper) bondValidator(ctx context.Context, validator types.Validator) (types.Validator, error) { // delete the validator by power index, as the key will change - k.DeleteValidatorByPowerIndex(ctx, validator) + if err := k.DeleteValidatorByPowerIndex(ctx, validator); err != nil { + return validator, err + } validator = validator.UpdateStatus(types.Bonded) // save the now bonded validator record to the two referenced stores - k.SetValidator(ctx, validator) - k.SetValidatorByPowerIndex(ctx, validator) + if err := k.SetValidator(ctx, validator); err != nil { + return validator, err + } + + if err := k.SetValidatorByPowerIndex(ctx, validator); err != nil { + return validator, err + } // delete from queue if present - k.DeleteValidatorQueue(ctx, validator) + if err := k.DeleteValidatorQueue(ctx, validator); err != nil { + return validator, err + } // trigger hook consAddr, err := validator.GetConsAddr() @@ -309,7 +361,12 @@ func (k Keeper) bondValidator(ctx sdk.Context, validator types.Validator) (types return validator, err } - if err := k.Hooks().AfterValidatorBonded(ctx, consAddr, validator.GetOperator()); err != nil { + str, err := k.validatorAddressCodec.StringToBytes(validator.GetOperator()) + if err != nil { + return validator, err + } + + if err := k.Hooks().AfterValidatorBonded(ctx, consAddr, str); err != nil { return validator, err } @@ -317,33 +374,49 @@ func (k Keeper) bondValidator(ctx sdk.Context, validator types.Validator) (types } // BeginUnbondingValidator performs all the store operations for when a validator begins unbonding -func (k Keeper) BeginUnbondingValidator(ctx sdk.Context, validator types.Validator) (types.Validator, error) { - params := k.GetParams(ctx) +func (k Keeper) BeginUnbondingValidator(ctx context.Context, validator types.Validator) (types.Validator, error) { + params, err := k.GetParams(ctx) + if err != nil { + return validator, err + } // delete the validator by power index, as the key will change - k.DeleteValidatorByPowerIndex(ctx, validator) + if err = k.DeleteValidatorByPowerIndex(ctx, validator); err != nil { + return validator, err + } // sanity check if validator.Status != types.Bonded { panic(fmt.Sprintf("should not already be unbonded or unbonding, validator: %v\n", validator)) } - id := k.IncrementUnbondingID(ctx) + id, err := k.IncrementUnbondingID(ctx) + if err != nil { + return validator, err + } validator = validator.UpdateStatus(types.Unbonding) + sdkCtx := sdk.UnwrapSDKContext(ctx) // set the unbonding completion time and completion height appropriately - validator.UnbondingTime = ctx.BlockHeader().Time.Add(params.UnbondingTime) - validator.UnbondingHeight = ctx.BlockHeader().Height + validator.UnbondingTime = sdkCtx.BlockHeader().Time.Add(params.UnbondingTime) + validator.UnbondingHeight = sdkCtx.BlockHeader().Height validator.UnbondingIds = append(validator.UnbondingIds, id) // save the now unbonded validator record and power index - k.SetValidator(ctx, validator) - k.SetValidatorByPowerIndex(ctx, validator) + if err = k.SetValidator(ctx, validator); err != nil { + return validator, err + } + + if err = k.SetValidatorByPowerIndex(ctx, validator); err != nil { + return validator, err + } // Adds to unbonding validator queue - k.InsertUnbondingValidatorQueue(ctx, validator) + if err = k.InsertUnbondingValidatorQueue(ctx, validator); err != nil { + return validator, err + } // trigger hook consAddr, err := validator.GetConsAddr() @@ -351,11 +424,18 @@ func (k Keeper) BeginUnbondingValidator(ctx sdk.Context, validator types.Validat return validator, err } - if err := k.Hooks().AfterValidatorBeginUnbonding(ctx, consAddr, validator.GetOperator()); err != nil { + str, err := k.validatorAddressCodec.StringToBytes(validator.GetOperator()) + if err != nil { + return validator, err + } + + if err := k.Hooks().AfterValidatorBeginUnbonding(ctx, consAddr, str); err != nil { return validator, err } - k.SetValidatorByUnbondingID(ctx, validator, id) + if err := k.SetValidatorByUnbondingID(ctx, validator, id); err != nil { + return validator, err + } if err := k.Hooks().AfterUnbondingInitiated(ctx, id); err != nil { return validator, err @@ -365,11 +445,13 @@ func (k Keeper) BeginUnbondingValidator(ctx sdk.Context, validator types.Validat } // perform all the store operations for when a validator status becomes unbonded -func (k Keeper) completeUnbondingValidator(ctx sdk.Context, validator types.Validator) types.Validator { +func (k Keeper) completeUnbondingValidator(ctx context.Context, validator types.Validator) (types.Validator, error) { validator = validator.UpdateStatus(types.Unbonded) - k.SetValidator(ctx, validator) + if err := k.SetValidator(ctx, validator); err != nil { + return validator, err + } - return validator + return validator, nil } // map of operator bech32-addresses to serialized power @@ -377,16 +459,19 @@ func (k Keeper) completeUnbondingValidator(ctx sdk.Context, validator types.Vali type validatorsByAddr map[string][]byte // get the last validator set -func (k Keeper) getLastValidatorsByAddr(ctx sdk.Context) (validatorsByAddr, error) { +func (k Keeper) getLastValidatorsByAddr(ctx context.Context) (validatorsByAddr, error) { last := make(validatorsByAddr) - iterator := k.LastValidatorsIterator(ctx) + iterator, err := k.LastValidatorsIterator(ctx) + if err != nil { + return nil, err + } defer iterator.Close() for ; iterator.Valid(); iterator.Next() { // extract the validator address from the key (prefix is 1-byte, addrLen is 1-byte) valAddr := types.AddressFromLastValidatorPowerKey(iterator.Key()) - valAddrStr, err := sdk.Bech32ifyAddressBytes(sdk.GetConfig().GetBech32ValidatorAddrPrefix(), valAddr) + valAddrStr, err := k.validatorAddressCodec.BytesToString(valAddr) if err != nil { return nil, err } @@ -401,13 +486,13 @@ func (k Keeper) getLastValidatorsByAddr(ctx sdk.Context) (validatorsByAddr, erro // given a map of remaining validators to previous bonded power // returns the list of validators to be unbonded, sorted by operator address -func sortNoLongerBonded(last validatorsByAddr) ([][]byte, error) { +func sortNoLongerBonded(last validatorsByAddr, ac address.Codec) ([][]byte, error) { // sort the map keys for determinism noLongerBonded := make([][]byte, len(last)) index := 0 for valAddrStr := range last { - valAddrBytes, err := sdk.ValAddressFromBech32(valAddrStr) + valAddrBytes, err := ac.StringToBytes(valAddrStr) if err != nil { return nil, err } diff --git a/x/staking/keeper/validator.go b/x/staking/keeper/validator.go index a9dd09d3c311..7d92d65a00e9 100644 --- a/x/staking/keeper/validator.go +++ b/x/staking/keeper/validator.go @@ -1,11 +1,17 @@ package keeper import ( + "bytes" + "context" + "errors" "fmt" "time" + cmtprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto" gogotypes "github.com/cosmos/gogoproto/types" + corestore "cosmossdk.io/core/store" + errorsmod "cosmossdk.io/errors" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" @@ -13,140 +19,189 @@ import ( "github.com/cosmos/cosmos-sdk/x/staking/types" ) -// get a single validator -func (k Keeper) GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator types.Validator, found bool) { - store := ctx.KVStore(k.storeKey) +// GetValidator gets a single validator +func (k Keeper) GetValidator(ctx context.Context, addr sdk.ValAddress) (validator types.Validator, err error) { + store := k.storeService.OpenKVStore(ctx) + value, err := store.Get(types.GetValidatorKey(addr)) + if err != nil { + return validator, err + } - value := store.Get(types.GetValidatorKey(addr)) if value == nil { - return validator, false + return validator, types.ErrNoValidatorFound } - validator = types.MustUnmarshalValidator(k.cdc, value) - return validator, true + return types.UnmarshalValidator(k.cdc, value) } -func (k Keeper) mustGetValidator(ctx sdk.Context, addr sdk.ValAddress) types.Validator { - validator, found := k.GetValidator(ctx, addr) - if !found { +func (k Keeper) mustGetValidator(ctx context.Context, addr sdk.ValAddress) types.Validator { + validator, err := k.GetValidator(ctx, addr) + if err != nil { panic(fmt.Sprintf("validator record not found for address: %X\n", addr)) } return validator } -// get a single validator by consensus address -func (k Keeper) GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (validator types.Validator, found bool) { - store := ctx.KVStore(k.storeKey) +// GetValidatorByConsAddr gets a single validator by consensus address +func (k Keeper) GetValidatorByConsAddr(ctx context.Context, consAddr sdk.ConsAddress) (validator types.Validator, err error) { + store := k.storeService.OpenKVStore(ctx) + opAddr, err := store.Get(types.GetValidatorByConsAddrKey(consAddr)) + if err != nil { + return validator, err + } - opAddr := store.Get(types.GetValidatorByConsAddrKey(consAddr)) if opAddr == nil { - return validator, false + return validator, types.ErrNoValidatorFound } return k.GetValidator(ctx, opAddr) } -func (k Keeper) mustGetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) types.Validator { - validator, found := k.GetValidatorByConsAddr(ctx, consAddr) - if !found { +func (k Keeper) mustGetValidatorByConsAddr(ctx context.Context, consAddr sdk.ConsAddress) types.Validator { + validator, err := k.GetValidatorByConsAddr(ctx, consAddr) + if err != nil { panic(fmt.Errorf("validator with consensus-Address %s not found", consAddr)) } return validator } -// set the main record holding validator details -func (k Keeper) SetValidator(ctx sdk.Context, validator types.Validator) { - store := ctx.KVStore(k.storeKey) +// SetValidator sets the main record holding validator details +func (k Keeper) SetValidator(ctx context.Context, validator types.Validator) error { + store := k.storeService.OpenKVStore(ctx) bz := types.MustMarshalValidator(k.cdc, &validator) - store.Set(types.GetValidatorKey(validator.GetOperator()), bz) + str, err := k.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) + if err != nil { + return err + } + return store.Set(types.GetValidatorKey(str), bz) } -// validator index -func (k Keeper) SetValidatorByConsAddr(ctx sdk.Context, validator types.Validator) error { +// SetValidatorByConsAddr sets a validator by conesensus address +func (k Keeper) SetValidatorByConsAddr(ctx context.Context, validator types.Validator) error { consPk, err := validator.GetConsAddr() if err != nil { return err } - store := ctx.KVStore(k.storeKey) - store.Set(types.GetValidatorByConsAddrKey(consPk), validator.GetOperator()) - return nil + store := k.storeService.OpenKVStore(ctx) + + bz, err := k.validatorAddressCodec.StringToBytes(validator.GetOperator()) + if err != nil { + return err + } + + return store.Set(types.GetValidatorByConsAddrKey(consPk), bz) } -// validator index -func (k Keeper) SetValidatorByPowerIndex(ctx sdk.Context, validator types.Validator) { +// SetValidatorByPowerIndex sets a validator by power index +func (k Keeper) SetValidatorByPowerIndex(ctx context.Context, validator types.Validator) error { // jailed validators are not kept in the power index if validator.Jailed { - return + return nil } - store := ctx.KVStore(k.storeKey) - store.Set(types.GetValidatorsByPowerIndexKey(validator, k.PowerReduction(ctx)), validator.GetOperator()) + store := k.storeService.OpenKVStore(ctx) + str, err := k.validatorAddressCodec.StringToBytes(validator.GetOperator()) + if err != nil { + return err + } + return store.Set(types.GetValidatorsByPowerIndexKey(validator, k.PowerReduction(ctx), k.validatorAddressCodec), str) } -// validator index -func (k Keeper) DeleteValidatorByPowerIndex(ctx sdk.Context, validator types.Validator) { - store := ctx.KVStore(k.storeKey) - store.Delete(types.GetValidatorsByPowerIndexKey(validator, k.PowerReduction(ctx))) +// DeleteValidatorByPowerIndex deletes a record by power index +func (k Keeper) DeleteValidatorByPowerIndex(ctx context.Context, validator types.Validator) error { + store := k.storeService.OpenKVStore(ctx) + return store.Delete(types.GetValidatorsByPowerIndexKey(validator, k.PowerReduction(ctx), k.validatorAddressCodec)) } -// validator index -func (k Keeper) SetNewValidatorByPowerIndex(ctx sdk.Context, validator types.Validator) { - store := ctx.KVStore(k.storeKey) - store.Set(types.GetValidatorsByPowerIndexKey(validator, k.PowerReduction(ctx)), validator.GetOperator()) +// SetNewValidatorByPowerIndex adds new entry by power index +func (k Keeper) SetNewValidatorByPowerIndex(ctx context.Context, validator types.Validator) error { + store := k.storeService.OpenKVStore(ctx) + str, err := k.validatorAddressCodec.StringToBytes(validator.GetOperator()) + if err != nil { + return err + } + return store.Set(types.GetValidatorsByPowerIndexKey(validator, k.PowerReduction(ctx), k.validatorAddressCodec), str) } -// Update the tokens of an existing validator, update the validators power index key -func (k Keeper) AddValidatorTokensAndShares(ctx sdk.Context, validator types.Validator, +// AddValidatorTokensAndShares updates the tokens of an existing validator, updates the validators power index key +func (k Keeper) AddValidatorTokensAndShares(ctx context.Context, validator types.Validator, tokensToAdd math.Int, -) (valOut types.Validator, addedShares math.LegacyDec) { - k.DeleteValidatorByPowerIndex(ctx, validator) +) (valOut types.Validator, addedShares math.LegacyDec, err error) { + err = k.DeleteValidatorByPowerIndex(ctx, validator) + if err != nil { + return valOut, addedShares, err + } + validator, addedShares = validator.AddTokensFromDel(tokensToAdd) - k.SetValidator(ctx, validator) - k.SetValidatorByPowerIndex(ctx, validator) + err = k.SetValidator(ctx, validator) + if err != nil { + return validator, addedShares, err + } - return validator, addedShares + err = k.SetValidatorByPowerIndex(ctx, validator) + return validator, addedShares, err } -// Update the tokens of an existing validator, update the validators power index key -func (k Keeper) RemoveValidatorTokensAndShares(ctx sdk.Context, validator types.Validator, +// RemoveValidatorTokensAndShares updates the tokens of an existing validator, updates the validators power index key +func (k Keeper) RemoveValidatorTokensAndShares(ctx context.Context, validator types.Validator, sharesToRemove math.LegacyDec, -) (valOut types.Validator, removedTokens math.Int) { - k.DeleteValidatorByPowerIndex(ctx, validator) +) (valOut types.Validator, removedTokens math.Int, err error) { + err = k.DeleteValidatorByPowerIndex(ctx, validator) + if err != nil { + return valOut, removedTokens, err + } validator, removedTokens = validator.RemoveDelShares(sharesToRemove) - k.SetValidator(ctx, validator) - k.SetValidatorByPowerIndex(ctx, validator) + err = k.SetValidator(ctx, validator) + if err != nil { + return validator, removedTokens, err + } - return validator, removedTokens + err = k.SetValidatorByPowerIndex(ctx, validator) + return validator, removedTokens, err } -// Update the tokens of an existing validator, update the validators power index key -func (k Keeper) RemoveValidatorTokens(ctx sdk.Context, +// RemoveValidatorTokens updates the tokens of an existing validator, updates the validators power index key +func (k Keeper) RemoveValidatorTokens(ctx context.Context, validator types.Validator, tokensToRemove math.Int, -) types.Validator { - k.DeleteValidatorByPowerIndex(ctx, validator) +) (types.Validator, error) { + if err := k.DeleteValidatorByPowerIndex(ctx, validator); err != nil { + return validator, err + } + validator = validator.RemoveTokens(tokensToRemove) - k.SetValidator(ctx, validator) - k.SetValidatorByPowerIndex(ctx, validator) + if err := k.SetValidator(ctx, validator); err != nil { + return validator, err + } - return validator + if err := k.SetValidatorByPowerIndex(ctx, validator); err != nil { + return validator, err + } + + return validator, nil } // UpdateValidatorCommission attempts to update a validator's commission rate. // An error is returned if the new commission rate is invalid. -func (k Keeper) UpdateValidatorCommission(ctx sdk.Context, +func (k Keeper) UpdateValidatorCommission(ctx context.Context, validator types.Validator, newRate math.LegacyDec, ) (types.Commission, error) { commission := validator.Commission - blockTime := ctx.BlockHeader().Time + sdkCtx := sdk.UnwrapSDKContext(ctx) + blockTime := sdkCtx.BlockHeader().Time if err := commission.ValidateNewRate(newRate, blockTime); err != nil { return commission, err } - if newRate.LT(k.MinCommissionRate(ctx)) { - return commission, fmt.Errorf("cannot set validator commission to less than minimum rate of %s", k.MinCommissionRate(ctx)) + minCommissionRate, err := k.MinCommissionRate(ctx) + if err != nil { + return commission, err + } + + if newRate.LT(minCommissionRate) { + return commission, fmt.Errorf("cannot set validator commission to less than minimum rate of %s", minCommissionRate) } commission.Rate = newRate @@ -155,81 +210,112 @@ func (k Keeper) UpdateValidatorCommission(ctx sdk.Context, return commission, nil } -// remove the validator record and associated indexes +// RemoveValidator removes the validator record and associated indexes // except for the bonded validator index which is only handled in ApplyAndReturnTendermintUpdates -// TODO, this function panics, and it's not good. -func (k Keeper) RemoveValidator(ctx sdk.Context, address sdk.ValAddress) { +func (k Keeper) RemoveValidator(ctx context.Context, address sdk.ValAddress) error { // first retrieve the old validator record - validator, found := k.GetValidator(ctx, address) - if !found { - return + validator, err := k.GetValidator(ctx, address) + if errors.Is(err, types.ErrNoValidatorFound) { + return nil } if !validator.IsUnbonded() { - panic("cannot call RemoveValidator on bonded or unbonding validators") + return types.ErrBadRemoveValidator.Wrap("cannot call RemoveValidator on bonded or unbonding validators") } if validator.Tokens.IsPositive() { - panic("attempting to remove a validator which still contains tokens") + return types.ErrBadRemoveValidator.Wrap("attempting to remove a validator which still contains tokens") } valConsAddr, err := validator.GetConsAddr() if err != nil { - panic(err) + return err } // delete the old validator record - store := ctx.KVStore(k.storeKey) - store.Delete(types.GetValidatorKey(address)) - store.Delete(types.GetValidatorByConsAddrKey(valConsAddr)) - store.Delete(types.GetValidatorsByPowerIndexKey(validator, k.PowerReduction(ctx))) + store := k.storeService.OpenKVStore(ctx) + if err = store.Delete(types.GetValidatorKey(address)); err != nil { + return err + } + + if err = store.Delete(types.GetValidatorByConsAddrKey(valConsAddr)); err != nil { + return err + } - if err := k.Hooks().AfterValidatorRemoved(ctx, valConsAddr, validator.GetOperator()); err != nil { + if err = store.Delete(types.GetValidatorsByPowerIndexKey(validator, k.PowerReduction(ctx), k.validatorAddressCodec)); err != nil { + return err + } + + str, err := k.validatorAddressCodec.StringToBytes(validator.GetOperator()) + if err != nil { + return err + } + + if err := k.Hooks().AfterValidatorRemoved(ctx, valConsAddr, str); err != nil { k.Logger(ctx).Error("error in after validator removed hook", "error", err) } + + return nil } // get groups of validators -// get the set of all validators with no limits, used during genesis dump -func (k Keeper) GetAllValidators(ctx sdk.Context) (validators []types.Validator) { - store := ctx.KVStore(k.storeKey) +// GetAllValidators gets the set of all validators with no limits, used during genesis dump +func (k Keeper) GetAllValidators(ctx context.Context) (validators []types.Validator, err error) { + store := k.storeService.OpenKVStore(ctx) - iterator := storetypes.KVStorePrefixIterator(store, types.ValidatorsKey) + iterator, err := store.Iterator(types.ValidatorsKey, storetypes.PrefixEndBytes(types.ValidatorsKey)) + if err != nil { + return nil, err + } defer iterator.Close() for ; iterator.Valid(); iterator.Next() { - validator := types.MustUnmarshalValidator(k.cdc, iterator.Value()) + validator, err := types.UnmarshalValidator(k.cdc, iterator.Value()) + if err != nil { + return nil, err + } validators = append(validators, validator) } - return validators + return validators, nil } -// return a given amount of all the validators -func (k Keeper) GetValidators(ctx sdk.Context, maxRetrieve uint32) (validators []types.Validator) { - store := ctx.KVStore(k.storeKey) +// GetValidators returns a given amount of all the validators +func (k Keeper) GetValidators(ctx context.Context, maxRetrieve uint32) (validators []types.Validator, err error) { + store := k.storeService.OpenKVStore(ctx) validators = make([]types.Validator, maxRetrieve) - iterator := storetypes.KVStorePrefixIterator(store, types.ValidatorsKey) - defer iterator.Close() + iterator, err := store.Iterator(types.ValidatorsKey, storetypes.PrefixEndBytes(types.ValidatorsKey)) + if err != nil { + return nil, err + } i := 0 for ; iterator.Valid() && i < int(maxRetrieve); iterator.Next() { - validator := types.MustUnmarshalValidator(k.cdc, iterator.Value()) + validator, err := types.UnmarshalValidator(k.cdc, iterator.Value()) + if err != nil { + return nil, err + } validators[i] = validator i++ } - return validators[:i] // trim if the array length < maxRetrieve + return validators[:i], nil // trim if the array length < maxRetrieve } -// get the current group of bonded validators sorted by power-rank -func (k Keeper) GetBondedValidatorsByPower(ctx sdk.Context) []types.Validator { - maxValidators := k.MaxValidators(ctx) +// GetBondedValidatorsByPower gets the current group of bonded validators sorted by power-rank +func (k Keeper) GetBondedValidatorsByPower(ctx context.Context) ([]types.Validator, error) { + maxValidators, err := k.MaxValidators(ctx) + if err != nil { + return nil, err + } validators := make([]types.Validator, maxValidators) - iterator := k.ValidatorsPowerStoreIterator(ctx) + iterator, err := k.ValidatorsPowerStoreIterator(ctx) + if err != nil { + return nil, err + } defer iterator.Close() i := 0 @@ -243,82 +329,99 @@ func (k Keeper) GetBondedValidatorsByPower(ctx sdk.Context) []types.Validator { } } - return validators[:i] // trim + return validators[:i], nil // trim } -// returns an iterator for the current validator power store -func (k Keeper) ValidatorsPowerStoreIterator(ctx sdk.Context) storetypes.Iterator { - store := ctx.KVStore(k.storeKey) - return storetypes.KVStoreReversePrefixIterator(store, types.ValidatorsByPowerIndexKey) +// ValidatorsPowerStoreIterator returns an iterator for the current validator power store +func (k Keeper) ValidatorsPowerStoreIterator(ctx context.Context) (corestore.Iterator, error) { + store := k.storeService.OpenKVStore(ctx) + return store.ReverseIterator(types.ValidatorsByPowerIndexKey, storetypes.PrefixEndBytes(types.ValidatorsByPowerIndexKey)) } // Last Validator Index -// Load the last validator power. +// GetLastValidatorPower loads the last validator power. // Returns zero if the operator was not a validator last block. -func (k Keeper) GetLastValidatorPower(ctx sdk.Context, operator sdk.ValAddress) (power int64) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) GetLastValidatorPower(ctx context.Context, operator sdk.ValAddress) (power int64, err error) { + store := k.storeService.OpenKVStore(ctx) + bz, err := store.Get(types.GetLastValidatorPowerKey(operator)) + if err != nil { + return 0, err + } - bz := store.Get(types.GetLastValidatorPowerKey(operator)) if bz == nil { - return 0 + return 0, nil } intV := gogotypes.Int64Value{} - k.cdc.MustUnmarshal(bz, &intV) + err = k.cdc.Unmarshal(bz, &intV) + if err != nil { + return 0, err + } - return intV.GetValue() + return intV.GetValue(), nil } -// Set the last validator power. -func (k Keeper) SetLastValidatorPower(ctx sdk.Context, operator sdk.ValAddress, power int64) { - store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshal(&gogotypes.Int64Value{Value: power}) - store.Set(types.GetLastValidatorPowerKey(operator), bz) +// SetLastValidatorPower sets the last validator power. +func (k Keeper) SetLastValidatorPower(ctx context.Context, operator sdk.ValAddress, power int64) error { + store := k.storeService.OpenKVStore(ctx) + bz, err := k.cdc.Marshal(&gogotypes.Int64Value{Value: power}) + if err != nil { + return err + } + return store.Set(types.GetLastValidatorPowerKey(operator), bz) } -// Delete the last validator power. -func (k Keeper) DeleteLastValidatorPower(ctx sdk.Context, operator sdk.ValAddress) { - store := ctx.KVStore(k.storeKey) - store.Delete(types.GetLastValidatorPowerKey(operator)) +// DeleteLastValidatorPower deletes the last validator power. +func (k Keeper) DeleteLastValidatorPower(ctx context.Context, operator sdk.ValAddress) error { + store := k.storeService.OpenKVStore(ctx) + return store.Delete(types.GetLastValidatorPowerKey(operator)) } -// returns an iterator for the consensus validators in the last block -func (k Keeper) LastValidatorsIterator(ctx sdk.Context) (iterator storetypes.Iterator) { - store := ctx.KVStore(k.storeKey) - iterator = storetypes.KVStorePrefixIterator(store, types.LastValidatorPowerKey) - - return iterator +// lastValidatorsIterator returns an iterator for the consensus validators in the last block +func (k Keeper) LastValidatorsIterator(ctx context.Context) (corestore.Iterator, error) { + store := k.storeService.OpenKVStore(ctx) + return store.Iterator(types.LastValidatorPowerKey, storetypes.PrefixEndBytes(types.LastValidatorPowerKey)) } -// Iterate over last validator powers. -func (k Keeper) IterateLastValidatorPowers(ctx sdk.Context, handler func(operator sdk.ValAddress, power int64) (stop bool)) { - store := ctx.KVStore(k.storeKey) - - iter := storetypes.KVStorePrefixIterator(store, types.LastValidatorPowerKey) - defer iter.Close() +// IterateLastValidatorPowers iterates over last validator powers. +func (k Keeper) IterateLastValidatorPowers(ctx context.Context, handler func(operator sdk.ValAddress, power int64) (stop bool)) error { + iter, err := k.LastValidatorsIterator(ctx) + if err != nil { + return err + } for ; iter.Valid(); iter.Next() { addr := sdk.ValAddress(types.AddressFromLastValidatorPowerKey(iter.Key())) intV := &gogotypes.Int64Value{} - k.cdc.MustUnmarshal(iter.Value(), intV) + if err = k.cdc.Unmarshal(iter.Value(), intV); err != nil { + return err + } if handler(addr, intV.GetValue()) { break } } + + return nil } -// get the group of the bonded validators -func (k Keeper) GetLastValidators(ctx sdk.Context) (validators []types.Validator) { - store := ctx.KVStore(k.storeKey) +// GetLastValidators gets the group of the bonded validators +func (k Keeper) GetLastValidators(ctx context.Context) (validators []types.Validator, err error) { + store := k.storeService.OpenKVStore(ctx) // add the actual validator power sorted store - maxValidators := k.MaxValidators(ctx) + maxValidators, err := k.MaxValidators(ctx) + if err != nil { + return nil, err + } validators = make([]types.Validator, maxValidators) - iterator := storetypes.KVStorePrefixIterator(store, types.LastValidatorPowerKey) + iterator, err := store.Iterator(types.LastValidatorPowerKey, storetypes.PrefixEndBytes(types.LastValidatorPowerKey)) + if err != nil { + return nil, err + } defer iterator.Close() i := 0 @@ -329,111 +432,133 @@ func (k Keeper) GetLastValidators(ctx sdk.Context) (validators []types.Validator } address := types.AddressFromLastValidatorPowerKey(iterator.Key()) - validator := k.mustGetValidator(ctx, address) + validator, err := k.GetValidator(ctx, address) + if err != nil { + return nil, err + } validators[i] = validator i++ } - return validators[:i] // trim + return validators[:i], nil // trim } // GetUnbondingValidators returns a slice of mature validator addresses that // complete their unbonding at a given time and height. -func (k Keeper) GetUnbondingValidators(ctx sdk.Context, endTime time.Time, endHeight int64) []string { - store := ctx.KVStore(k.storeKey) +func (k Keeper) GetUnbondingValidators(ctx context.Context, endTime time.Time, endHeight int64) ([]string, error) { + store := k.storeService.OpenKVStore(ctx) + + bz, err := store.Get(types.GetValidatorQueueKey(endTime, endHeight)) + if err != nil { + return nil, err + } - bz := store.Get(types.GetValidatorQueueKey(endTime, endHeight)) if bz == nil { - return []string{} + return []string{}, nil } addrs := types.ValAddresses{} - k.cdc.MustUnmarshal(bz, &addrs) + if err = k.cdc.Unmarshal(bz, &addrs); err != nil { + return nil, err + } - return addrs.Addresses + return addrs.Addresses, nil } // SetUnbondingValidatorsQueue sets a given slice of validator addresses into // the unbonding validator queue by a given height and time. -func (k Keeper) SetUnbondingValidatorsQueue(ctx sdk.Context, endTime time.Time, endHeight int64, addrs []string) { - store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshal(&types.ValAddresses{Addresses: addrs}) - store.Set(types.GetValidatorQueueKey(endTime, endHeight), bz) +func (k Keeper) SetUnbondingValidatorsQueue(ctx context.Context, endTime time.Time, endHeight int64, addrs []string) error { + store := k.storeService.OpenKVStore(ctx) + bz, err := k.cdc.Marshal(&types.ValAddresses{Addresses: addrs}) + if err != nil { + return err + } + return store.Set(types.GetValidatorQueueKey(endTime, endHeight), bz) } // InsertUnbondingValidatorQueue inserts a given unbonding validator address into // the unbonding validator queue for a given height and time. -func (k Keeper) InsertUnbondingValidatorQueue(ctx sdk.Context, val types.Validator) { - addrs := k.GetUnbondingValidators(ctx, val.UnbondingTime, val.UnbondingHeight) +func (k Keeper) InsertUnbondingValidatorQueue(ctx context.Context, val types.Validator) error { + addrs, err := k.GetUnbondingValidators(ctx, val.UnbondingTime, val.UnbondingHeight) + if err != nil { + return err + } addrs = append(addrs, val.OperatorAddress) - k.SetUnbondingValidatorsQueue(ctx, val.UnbondingTime, val.UnbondingHeight, addrs) + return k.SetUnbondingValidatorsQueue(ctx, val.UnbondingTime, val.UnbondingHeight, addrs) } // DeleteValidatorQueueTimeSlice deletes all entries in the queue indexed by a // given height and time. -func (k Keeper) DeleteValidatorQueueTimeSlice(ctx sdk.Context, endTime time.Time, endHeight int64) { - store := ctx.KVStore(k.storeKey) - store.Delete(types.GetValidatorQueueKey(endTime, endHeight)) +func (k Keeper) DeleteValidatorQueueTimeSlice(ctx context.Context, endTime time.Time, endHeight int64) error { + store := k.storeService.OpenKVStore(ctx) + return store.Delete(types.GetValidatorQueueKey(endTime, endHeight)) } // DeleteValidatorQueue removes a validator by address from the unbonding queue // indexed by a given height and time. -func (k Keeper) DeleteValidatorQueue(ctx sdk.Context, val types.Validator) { - addrs := k.GetUnbondingValidators(ctx, val.UnbondingTime, val.UnbondingHeight) +func (k Keeper) DeleteValidatorQueue(ctx context.Context, val types.Validator) error { + addrs, err := k.GetUnbondingValidators(ctx, val.UnbondingTime, val.UnbondingHeight) + if err != nil { + return err + } newAddrs := []string{} // since address string may change due to Bech32 prefix change, we parse the addresses into bytes // format for normalization - deletingAddr, err := sdk.ValAddressFromBech32(val.OperatorAddress) + deletingAddr, err := k.validatorAddressCodec.StringToBytes(val.OperatorAddress) if err != nil { - panic(err) + return err } for _, addr := range addrs { - storedAddr, err := sdk.ValAddressFromBech32(addr) + storedAddr, err := k.validatorAddressCodec.StringToBytes(addr) if err != nil { - // even if we don't panic here, it will panic in UnbondAllMatureValidators at unbond time - panic(err) + // even if we don't error here, it will error in UnbondAllMatureValidators at unbond time + return err } - if !storedAddr.Equals(deletingAddr) { - newAddrs = append(newAddrs, storedAddr.String()) + if !bytes.Equal(storedAddr, deletingAddr) { + newAddrs = append(newAddrs, addr) } } if len(newAddrs) == 0 { - k.DeleteValidatorQueueTimeSlice(ctx, val.UnbondingTime, val.UnbondingHeight) - } else { - k.SetUnbondingValidatorsQueue(ctx, val.UnbondingTime, val.UnbondingHeight, newAddrs) + return k.DeleteValidatorQueueTimeSlice(ctx, val.UnbondingTime, val.UnbondingHeight) } + + return k.SetUnbondingValidatorsQueue(ctx, val.UnbondingTime, val.UnbondingHeight, newAddrs) } // ValidatorQueueIterator returns an interator ranging over validators that are // unbonding whose unbonding completion occurs at the given height and time. -func (k Keeper) ValidatorQueueIterator(ctx sdk.Context, endTime time.Time, endHeight int64) storetypes.Iterator { - store := ctx.KVStore(k.storeKey) +func (k Keeper) ValidatorQueueIterator(ctx context.Context, endTime time.Time, endHeight int64) (corestore.Iterator, error) { + store := k.storeService.OpenKVStore(ctx) return store.Iterator(types.ValidatorQueueKey, storetypes.InclusiveEndBytes(types.GetValidatorQueueKey(endTime, endHeight))) } // UnbondAllMatureValidators unbonds all the mature unbonding validators that // have finished their unbonding period. -func (k Keeper) UnbondAllMatureValidators(ctx sdk.Context) { - blockTime := ctx.BlockTime() - blockHeight := ctx.BlockHeight() +func (k Keeper) UnbondAllMatureValidators(ctx context.Context) error { + sdkCtx := sdk.UnwrapSDKContext(ctx) + blockTime := sdkCtx.BlockTime() + blockHeight := sdkCtx.BlockHeight() // unbondingValIterator will contains all validator addresses indexed under // the ValidatorQueueKey prefix. Note, the entire index key is composed as // ValidatorQueueKey | timeBzLen (8-byte big endian) | timeBz | heightBz (8-byte big endian), // so it may be possible that certain validator addresses that are iterated // over are not ready to unbond, so an explicit check is required. - unbondingValIterator := k.ValidatorQueueIterator(ctx, blockTime, blockHeight) + unbondingValIterator, err := k.ValidatorQueueIterator(ctx, blockTime, blockHeight) + if err != nil { + return err + } defer unbondingValIterator.Close() for ; unbondingValIterator.Valid(); unbondingValIterator.Next() { key := unbondingValIterator.Key() keyTime, keyHeight, err := types.ParseValidatorQueueKey(key) if err != nil { - panic(fmt.Errorf("failed to parse unbonding key: %w", err)) + return fmt.Errorf("failed to parse unbonding key: %w", err) } // All addresses for the given key have the same unbonding height and time. @@ -441,49 +566,81 @@ func (k Keeper) UnbondAllMatureValidators(ctx sdk.Context) { // and time. if keyHeight <= blockHeight && (keyTime.Before(blockTime) || keyTime.Equal(blockTime)) { addrs := types.ValAddresses{} - k.cdc.MustUnmarshal(unbondingValIterator.Value(), &addrs) + if err = k.cdc.Unmarshal(unbondingValIterator.Value(), &addrs); err != nil { + return err + } for _, valAddr := range addrs.Addresses { - addr, err := sdk.ValAddressFromBech32(valAddr) + addr, err := k.validatorAddressCodec.StringToBytes(valAddr) if err != nil { - panic(err) + return err } - val, found := k.GetValidator(ctx, addr) - if !found { - panic("validator in the unbonding queue was not found") + val, err := k.GetValidator(ctx, addr) + if err != nil { + return errorsmod.Wrap(err, "validator in the unbonding queue was not found") } if !val.IsUnbonding() { - panic("unexpected validator in unbonding queue; status was not unbonding") + return fmt.Errorf("unexpected validator in unbonding queue; status was not unbonding") } if val.UnbondingOnHoldRefCount == 0 { for _, id := range val.UnbondingIds { - k.DeleteUnbondingIndex(ctx, id) + if err = k.DeleteUnbondingIndex(ctx, id); err != nil { + return err + } } - val = k.UnbondingToUnbonded(ctx, val) + val, err = k.UnbondingToUnbonded(ctx, val) + if err != nil { + return err + } if val.GetDelegatorShares().IsZero() { - k.RemoveValidator(ctx, val.GetOperator()) + str, err := k.validatorAddressCodec.StringToBytes(val.GetOperator()) + if err != nil { + return err + } + if err = k.RemoveValidator(ctx, str); err != nil { + return err + } } else { // remove unbonding ids val.UnbondingIds = []uint64{} } // remove validator from queue - k.DeleteValidatorQueue(ctx, val) + if err = k.DeleteValidatorQueue(ctx, val); err != nil { + return err + } } } } } + return nil } -func (k Keeper) IsValidatorJailed(ctx sdk.Context, addr sdk.ConsAddress) bool { - v, ok := k.GetValidatorByConsAddr(ctx, addr) - if !ok { - return false +// IsValidatorJailed checks and returns boolean of a validator status jailed or not. +func (k Keeper) IsValidatorJailed(ctx context.Context, addr sdk.ConsAddress) (bool, error) { + v, err := k.GetValidatorByConsAddr(ctx, addr) + if err != nil { + return false, err + } + + return v.Jailed, nil +} + +// GetPubKeyByConsAddr returns the consensus public key by consensus address. +func (k Keeper) GetPubKeyByConsAddr(ctx context.Context, addr sdk.ConsAddress) (cmtprotocrypto.PublicKey, error) { + v, err := k.GetValidatorByConsAddr(ctx, addr) + if err != nil { + return cmtprotocrypto.PublicKey{}, err + } + + pubkey, err := v.CmtConsPublicKey() + if err != nil { + return cmtprotocrypto.PublicKey{}, err } - return v.Jailed + return pubkey, nil } diff --git a/x/staking/keeper/validator_test.go b/x/staking/keeper/validator_test.go index 363378d96503..f5015f7844a2 100644 --- a/x/staking/keeper/validator_test.go +++ b/x/staking/keeper/validator_test.go @@ -3,12 +3,12 @@ package keeper_test import ( "time" + abci "github.com/cometbft/cometbft/abci/types" "github.com/golang/mock/gomock" "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - abci "github.com/cometbft/cometbft/abci/types" + sdk "github.com/cosmos/cosmos-sdk/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/cosmos/cosmos-sdk/x/staking/testutil" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -37,15 +37,15 @@ func (s *KeeperTestSuite) TestValidator() { require.Equal(stakingtypes.Unbonded, validator.Status) require.Equal(valTokens, validator.Tokens) require.Equal(valTokens, validator.DelegatorShares.RoundInt()) - keeper.SetValidator(ctx, validator) - keeper.SetValidatorByPowerIndex(ctx, validator) - keeper.SetValidatorByConsAddr(ctx, validator) + require.NoError(keeper.SetValidator(ctx, validator)) + require.NoError(keeper.SetValidatorByPowerIndex(ctx, validator)) + require.NoError(keeper.SetValidatorByConsAddr(ctx, validator)) // ensure update s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(gomock.Any(), stakingtypes.NotBondedPoolName, stakingtypes.BondedPoolName, gomock.Any()) updates := s.applyValidatorSetUpdates(ctx, keeper, 1) - validator, found := keeper.GetValidator(ctx, valAddr) - require.True(found) + validator, err := keeper.GetValidator(ctx, valAddr) + require.NoError(err) require.Equal(validator.ABCIValidatorUpdate(keeper.PowerReduction(ctx)), updates[0]) // after the save the validator should be bonded @@ -56,28 +56,33 @@ func (s *KeeperTestSuite) TestValidator() { // check each store for being saved consAddr, err := validator.GetConsAddr() require.NoError(err) - resVal, found := keeper.GetValidatorByConsAddr(ctx, consAddr) - require.True(found) + resVal, err := keeper.GetValidatorByConsAddr(ctx, consAddr) + require.NoError(err) require.True(validator.MinEqual(&resVal)) - resVals := keeper.GetLastValidators(ctx) + resVals, err := keeper.GetLastValidators(ctx) + require.NoError(err) require.Equal(1, len(resVals)) require.True(validator.MinEqual(&resVals[0])) - resVals = keeper.GetBondedValidatorsByPower(ctx) + resVals, err = keeper.GetBondedValidatorsByPower(ctx) + require.NoError(err) require.Equal(1, len(resVals)) require.True(validator.MinEqual(&resVals[0])) - allVals := keeper.GetAllValidators(ctx) + allVals, err := keeper.GetAllValidators(ctx) + require.NoError(err) require.Equal(1, len(allVals)) // check the last validator power power := int64(100) - keeper.SetLastValidatorPower(ctx, valAddr, power) - resPower := keeper.GetLastValidatorPower(ctx, valAddr) + require.NoError(keeper.SetLastValidatorPower(ctx, valAddr, power)) + resPower, err := keeper.GetLastValidatorPower(ctx, valAddr) + require.NoError(err) require.Equal(power, resPower) - keeper.DeleteLastValidatorPower(ctx, valAddr) - resPower = keeper.GetLastValidatorPower(ctx, valAddr) + require.NoError(keeper.DeleteLastValidatorPower(ctx, valAddr)) + resPower, err = keeper.GetLastValidatorPower(ctx, valAddr) + require.NoError(err) require.Equal(int64(0), resPower) } @@ -103,31 +108,34 @@ func (s *KeeperTestSuite) TestValidatorBasics() { require.Equal(keeper.TokensFromConsensusPower(ctx, 7), validators[2].Tokens) // check the empty keeper first - _, found := keeper.GetValidator(ctx, sdk.ValAddress(PKs[0].Address().Bytes())) - require.False(found) - resVals := keeper.GetLastValidators(ctx) + _, err := keeper.GetValidator(ctx, sdk.ValAddress(PKs[0].Address().Bytes())) + require.ErrorIs(err, stakingtypes.ErrNoValidatorFound) + resVals, err := keeper.GetLastValidators(ctx) + require.NoError(err) require.Zero(len(resVals)) - resVals = keeper.GetValidators(ctx, 2) + resVals, err = keeper.GetValidators(ctx, 2) + require.NoError(err) require.Len(resVals, 0) // set and retrieve a record s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(gomock.Any(), stakingtypes.NotBondedPoolName, stakingtypes.BondedPoolName, gomock.Any()) validators[0] = stakingkeeper.TestingUpdateValidator(keeper, ctx, validators[0], true) - keeper.SetValidatorByConsAddr(ctx, validators[0]) - resVal, found := keeper.GetValidator(ctx, sdk.ValAddress(PKs[0].Address().Bytes())) - require.True(found) + require.NoError(keeper.SetValidatorByConsAddr(ctx, validators[0])) + resVal, err := keeper.GetValidator(ctx, sdk.ValAddress(PKs[0].Address().Bytes())) + require.NoError(err) require.True(validators[0].MinEqual(&resVal)) // retrieve from consensus - resVal, found = keeper.GetValidatorByConsAddr(ctx, sdk.ConsAddress(PKs[0].Address())) - require.True(found) + resVal, err = keeper.GetValidatorByConsAddr(ctx, sdk.ConsAddress(PKs[0].Address())) + require.NoError(err) require.True(validators[0].MinEqual(&resVal)) - resVal, found = keeper.GetValidatorByConsAddr(ctx, sdk.GetConsAddress(PKs[0])) - require.True(found) + resVal, err = keeper.GetValidatorByConsAddr(ctx, sdk.GetConsAddress(PKs[0])) + require.NoError(err) require.True(validators[0].MinEqual(&resVal)) - resVals = keeper.GetLastValidators(ctx) + resVals, err = keeper.GetLastValidators(ctx) + require.NoError(err) require.Equal(1, len(resVals)) require.True(validators[0].MinEqual(&resVals[0])) require.Equal(stakingtypes.Bonded, validators[0].Status) @@ -138,11 +146,12 @@ func (s *KeeperTestSuite) TestValidatorBasics() { validators[0].Tokens = keeper.TokensFromConsensusPower(ctx, 10) validators[0].DelegatorShares = math.LegacyNewDecFromInt(validators[0].Tokens) validators[0] = stakingkeeper.TestingUpdateValidator(keeper, ctx, validators[0], true) - resVal, found = keeper.GetValidator(ctx, sdk.ValAddress(PKs[0].Address().Bytes())) - require.True(found) + resVal, err = keeper.GetValidator(ctx, sdk.ValAddress(PKs[0].Address().Bytes())) + require.NoError(err) require.True(validators[0].MinEqual(&resVal)) - resVals = keeper.GetLastValidators(ctx) + resVals, err = keeper.GetLastValidators(ctx) + require.NoError(err) require.Equal(1, len(resVals)) require.True(validators[0].MinEqual(&resVals[0])) @@ -151,33 +160,35 @@ func (s *KeeperTestSuite) TestValidatorBasics() { validators[1] = stakingkeeper.TestingUpdateValidator(keeper, ctx, validators[1], true) s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(gomock.Any(), stakingtypes.NotBondedPoolName, stakingtypes.BondedPoolName, gomock.Any()) validators[2] = stakingkeeper.TestingUpdateValidator(keeper, ctx, validators[2], true) - resVal, found = keeper.GetValidator(ctx, sdk.ValAddress(PKs[1].Address().Bytes())) - require.True(found) + resVal, err = keeper.GetValidator(ctx, sdk.ValAddress(PKs[1].Address().Bytes())) + require.NoError(err) require.True(validators[1].MinEqual(&resVal)) - resVal, found = keeper.GetValidator(ctx, sdk.ValAddress(PKs[2].Address().Bytes())) - require.True(found) + resVal, err = keeper.GetValidator(ctx, sdk.ValAddress(PKs[2].Address().Bytes())) + require.NoError(err) require.True(validators[2].MinEqual(&resVal)) - resVals = keeper.GetLastValidators(ctx) + resVals, err = keeper.GetLastValidators(ctx) + require.NoError(err) require.Equal(3, len(resVals)) // remove a record + bz, err := keeper.ValidatorAddressCodec().StringToBytes(validators[1].GetOperator()) + require.NoError(err) + // shouldn't be able to remove if status is not unbonded - require.PanicsWithValue("cannot call RemoveValidator on bonded or unbonding validators", - func() { keeper.RemoveValidator(ctx, validators[1].GetOperator()) }) + require.EqualError(keeper.RemoveValidator(ctx, bz), "cannot call RemoveValidator on bonded or unbonding validators: failed to remove validator") // shouldn't be able to remove if there are still tokens left validators[1].Status = stakingtypes.Unbonded - keeper.SetValidator(ctx, validators[1]) - require.PanicsWithValue("attempting to remove a validator which still contains tokens", - func() { keeper.RemoveValidator(ctx, validators[1].GetOperator()) }) + require.NoError(keeper.SetValidator(ctx, validators[1])) + require.EqualError(keeper.RemoveValidator(ctx, bz), "attempting to remove a validator which still contains tokens: failed to remove validator") validators[1].Tokens = math.ZeroInt() // ...remove all tokens - keeper.SetValidator(ctx, validators[1]) // ...set the validator - keeper.RemoveValidator(ctx, validators[1].GetOperator()) // Now it can be removed. - _, found = keeper.GetValidator(ctx, sdk.ValAddress(PKs[1].Address().Bytes())) - require.False(found) + require.NoError(keeper.SetValidator(ctx, validators[1])) // ...set the validator + require.NoError(keeper.RemoveValidator(ctx, bz)) // Now it can be removed. + _, err = keeper.GetValidator(ctx, sdk.ValAddress(PKs[1].Address().Bytes())) + require.ErrorIs(err, stakingtypes.ErrNoValidatorFound) } func (s *KeeperTestSuite) TestUpdateValidatorByPowerIndex() { @@ -196,30 +207,30 @@ func (s *KeeperTestSuite) TestUpdateValidatorByPowerIndex() { s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(gomock.Any(), stakingtypes.NotBondedPoolName, stakingtypes.BondedPoolName, gomock.Any()) stakingkeeper.TestingUpdateValidator(keeper, ctx, validator, true) - validator, found := keeper.GetValidator(ctx, valAddr) - require.True(found) + validator, err := keeper.GetValidator(ctx, valAddr) + require.NoError(err) require.Equal(valTokens, validator.Tokens) - power := stakingtypes.GetValidatorsByPowerIndexKey(validator, keeper.PowerReduction(ctx)) + power := stakingtypes.GetValidatorsByPowerIndexKey(validator, keeper.PowerReduction(ctx), keeper.ValidatorAddressCodec()) require.True(stakingkeeper.ValidatorByPowerIndexExists(ctx, keeper, power)) // burn half the delegator shares - keeper.DeleteValidatorByPowerIndex(ctx, validator) + require.NoError(keeper.DeleteValidatorByPowerIndex(ctx, validator)) validator, burned := validator.RemoveDelShares(delSharesCreated.Quo(math.LegacyNewDec(2))) require.Equal(keeper.TokensFromConsensusPower(ctx, 50), burned) stakingkeeper.TestingUpdateValidator(keeper, ctx, validator, true) // update the validator, possibly kicking it out require.False(stakingkeeper.ValidatorByPowerIndexExists(ctx, keeper, power)) - validator, found = keeper.GetValidator(ctx, valAddr) - require.True(found) + validator, err = keeper.GetValidator(ctx, valAddr) + require.NoError(err) - power = stakingtypes.GetValidatorsByPowerIndexKey(validator, keeper.PowerReduction(ctx)) + power = stakingtypes.GetValidatorsByPowerIndexKey(validator, keeper.PowerReduction(ctx), keeper.ValidatorAddressCodec()) require.True(stakingkeeper.ValidatorByPowerIndexExists(ctx, keeper, power)) // set new validator by power index - keeper.DeleteValidatorByPowerIndex(ctx, validator) + require.NoError(keeper.DeleteValidatorByPowerIndex(ctx, validator)) require.False(stakingkeeper.ValidatorByPowerIndexExists(ctx, keeper, power)) - keeper.SetNewValidatorByPowerIndex(ctx, validator) + require.NoError(keeper.SetNewValidatorByPowerIndex(ctx, validator)) require.True(stakingkeeper.ValidatorByPowerIndexExists(ctx, keeper, power)) } @@ -272,9 +283,10 @@ func (s *KeeperTestSuite) TestUpdateValidatorCommission() { require := s.Require() // Set MinCommissionRate to 0.05 - params := keeper.GetParams(ctx) + params, err := keeper.GetParams(ctx) + require.NoError(err) params.MinCommissionRate = math.LegacyNewDecWithPrec(5, 2) - keeper.SetParams(ctx, params) + require.NoError(keeper.SetParams(ctx, params)) commission1 := stakingtypes.NewCommissionWithTime( math.LegacyNewDecWithPrec(1, 1), math.LegacyNewDecWithPrec(3, 1), @@ -288,8 +300,8 @@ func (s *KeeperTestSuite) TestUpdateValidatorCommission() { val1, _ = val1.SetInitialCommission(commission1) val2, _ = val2.SetInitialCommission(commission2) - keeper.SetValidator(ctx, val1) - keeper.SetValidator(ctx, val2) + require.NoError(keeper.SetValidator(ctx, val1)) + require.NoError(keeper.SetValidator(ctx, val2)) testCases := []struct { validator stakingtypes.Validator @@ -310,16 +322,22 @@ func (s *KeeperTestSuite) TestUpdateValidatorCommission() { if tc.expectedErr { require.Error(err, "expected error for test case #%d with rate: %s", i, tc.newRate) } else { + require.NoError(err, + "unexpected error for test case #%d with rate: %s", i, tc.newRate, + ) + tc.validator.Commission = commission - keeper.SetValidator(ctx, tc.validator) - val, found := keeper.GetValidator(ctx, tc.validator.GetOperator()) + err = keeper.SetValidator(ctx, tc.validator) + require.NoError(err) - require.True(found, - "expected to find validator for test case #%d with rate: %s", i, tc.newRate, - ) + bz, err := keeper.ValidatorAddressCodec().StringToBytes(tc.validator.GetOperator()) + require.NoError(err) + + val, err := keeper.GetValidator(ctx, bz) require.NoError(err, - "unexpected error for test case #%d with rate: %s", i, tc.newRate, + "expected to find validator for test case #%d with rate: %s", i, tc.newRate, ) + require.Equal(tc.newRate, val.Commission.Rate, "expected new validator commission rate for test case #%d with rate: %s", i, tc.newRate, ) @@ -340,17 +358,20 @@ func (s *KeeperTestSuite) TestValidatorToken() { delTokens := keeper.TokensFromConsensusPower(ctx, 5) validator := testutil.NewValidator(s.T(), valAddr, valPubKey) - validator, _ = keeper.AddValidatorTokensAndShares(ctx, validator, addTokens) + validator, _, err := keeper.AddValidatorTokensAndShares(ctx, validator, addTokens) + require.NoError(err) require.Equal(addTokens, validator.Tokens) validator, _ = keeper.GetValidator(ctx, valAddr) require.Equal(math.LegacyNewDecFromInt(addTokens), validator.DelegatorShares) - keeper.RemoveValidatorTokensAndShares(ctx, validator, math.LegacyNewDecFromInt(delTokens)) + _, _, err = keeper.RemoveValidatorTokensAndShares(ctx, validator, math.LegacyNewDecFromInt(delTokens)) + require.NoError(err) validator, _ = keeper.GetValidator(ctx, valAddr) require.Equal(delTokens, validator.Tokens) require.True(validator.DelegatorShares.Equal(math.LegacyNewDecFromInt(delTokens))) - keeper.RemoveValidatorTokens(ctx, validator, delTokens) + _, err = keeper.RemoveValidatorTokens(ctx, validator, delTokens) + require.NoError(err) validator, _ = keeper.GetValidator(ctx, valAddr) require.True(validator.Tokens.IsZero()) } @@ -367,9 +388,10 @@ func (s *KeeperTestSuite) TestUnbondingValidator() { // set unbonding validator endTime := time.Now() endHeight := ctx.BlockHeight() + 10 - keeper.SetUnbondingValidatorsQueue(ctx, endTime, endHeight, []string{valAddr.String()}) + require.NoError(keeper.SetUnbondingValidatorsQueue(ctx, endTime, endHeight, []string{valAddr.String()})) - resVals := keeper.GetUnbondingValidators(ctx, endTime, endHeight) + resVals, err := keeper.GetUnbondingValidators(ctx, endTime, endHeight) + require.NoError(err) require.Equal(1, len(resVals)) require.Equal(valAddr.String(), resVals[0]) @@ -378,42 +400,43 @@ func (s *KeeperTestSuite) TestUnbondingValidator() { validator1 := testutil.NewValidator(s.T(), valAddr1, PKs[1]) validator1.UnbondingHeight = endHeight validator1.UnbondingTime = endTime - keeper.InsertUnbondingValidatorQueue(ctx, validator1) + require.NoError(keeper.InsertUnbondingValidatorQueue(ctx, validator1)) - resVals = keeper.GetUnbondingValidators(ctx, endTime, endHeight) + resVals, err = keeper.GetUnbondingValidators(ctx, endTime, endHeight) + require.NoError(err) require.Equal(2, len(resVals)) // delete unbonding validator from the queue - keeper.DeleteValidatorQueue(ctx, validator1) - resVals = keeper.GetUnbondingValidators(ctx, endTime, endHeight) + require.NoError(keeper.DeleteValidatorQueue(ctx, validator1)) + resVals, err = keeper.GetUnbondingValidators(ctx, endTime, endHeight) + require.NoError(err) require.Equal(1, len(resVals)) require.Equal(valAddr.String(), resVals[0]) // check unbonding mature validators ctx = ctx.WithBlockHeight(endHeight).WithBlockTime(endTime) - require.PanicsWithValue("validator in the unbonding queue was not found", func() { - keeper.UnbondAllMatureValidators(ctx) - }) + err = keeper.UnbondAllMatureValidators(ctx) + require.EqualError(err, "validator in the unbonding queue was not found: validator does not exist") - keeper.SetValidator(ctx, validator) + require.NoError(keeper.SetValidator(ctx, validator)) ctx = ctx.WithBlockHeight(endHeight).WithBlockTime(endTime) - require.PanicsWithValue("unexpected validator in unbonding queue; status was not unbonding", func() { - keeper.UnbondAllMatureValidators(ctx) - }) + + err = keeper.UnbondAllMatureValidators(ctx) + require.EqualError(err, "unexpected validator in unbonding queue; status was not unbonding") validator.Status = stakingtypes.Unbonding - keeper.SetValidator(ctx, validator) - keeper.UnbondAllMatureValidators(ctx) - validator, found := keeper.GetValidator(ctx, valAddr) - require.False(found) + require.NoError(keeper.SetValidator(ctx, validator)) + require.NoError(keeper.UnbondAllMatureValidators(ctx)) + validator, err = keeper.GetValidator(ctx, valAddr) + require.ErrorIs(err, stakingtypes.ErrNoValidatorFound) - keeper.SetUnbondingValidatorsQueue(ctx, endTime, endHeight, []string{valAddr.String()}) + require.NoError(keeper.SetUnbondingValidatorsQueue(ctx, endTime, endHeight, []string{valAddr.String()})) validator = testutil.NewValidator(s.T(), valAddr, valPubKey) validator, _ = validator.AddTokensFromDel(addTokens) validator.Status = stakingtypes.Unbonding - keeper.SetValidator(ctx, validator) - keeper.UnbondAllMatureValidators(ctx) - validator, found = keeper.GetValidator(ctx, valAddr) - require.True(found) + require.NoError(keeper.SetValidator(ctx, validator)) + require.NoError(keeper.UnbondAllMatureValidators(ctx)) + validator, err = keeper.GetValidator(ctx, valAddr) + require.NoError(err) require.Equal(stakingtypes.Unbonded, validator.Status) } diff --git a/x/staking/migrations/v2/store.go b/x/staking/migrations/v2/store.go index 5bfde36c67ff..7b20394eac8a 100644 --- a/x/staking/migrations/v2/store.go +++ b/x/staking/migrations/v2/store.go @@ -60,11 +60,8 @@ func migrateValidatorsByPowerIndexKey(store storetypes.KVStore) { // migration includes: // // - Setting the Power Reduction param in the paramstore -func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey) error { - store := ctx.KVStore(storeKey) - +func MigrateStore(ctx sdk.Context, store storetypes.KVStore) error { v2distribution.MigratePrefixAddress(store, v1.LastValidatorPowerKey) - v2distribution.MigratePrefixAddress(store, v1.ValidatorsKey) v2distribution.MigratePrefixAddress(store, v1.ValidatorsByConsAddrKey) migrateValidatorsByPowerIndexKey(store) diff --git a/x/staking/migrations/v2/store_test.go b/x/staking/migrations/v2/store_test.go index b9416ad4f80e..6bd1955159a0 100644 --- a/x/staking/migrations/v2/store_test.go +++ b/x/staking/migrations/v2/store_test.go @@ -9,6 +9,7 @@ import ( storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec/address" sdktestuil "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" @@ -64,7 +65,7 @@ func TestStoreMigration(t *testing.T) { { "ValidatorsByPowerIndexKey", v1.GetValidatorsByPowerIndexKey(val), - types.GetValidatorsByPowerIndexKey(val, sdk.DefaultPowerReduction), + types.GetValidatorsByPowerIndexKey(val, sdk.DefaultPowerReduction, address.NewBech32Codec("cosmosvaloper")), }, { "DelegationKey", @@ -124,7 +125,7 @@ func TestStoreMigration(t *testing.T) { } // Run migrations. - err := v2.MigrateStore(ctx, stakingKey) + err := v2.MigrateStore(ctx, store) require.NoError(t, err) // Make sure the new keys are set and old keys are deleted. diff --git a/x/staking/migrations/v3/store.go b/x/staking/migrations/v3/store.go index e558a11754d5..6cb6c6263113 100644 --- a/x/staking/migrations/v3/store.go +++ b/x/staking/migrations/v3/store.go @@ -23,7 +23,7 @@ type subspace interface { // The migration includes: // // - Setting the MinCommissionRate param in the paramstore -func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec, paramstore exported.Subspace) error { +func MigrateStore(ctx sdk.Context, store storetypes.KVStore, cdc codec.BinaryCodec, paramstore exported.Subspace) error { migrateParamsStore(ctx, paramstore.(subspace)) return nil diff --git a/x/staking/migrations/v3/store_test.go b/x/staking/migrations/v3/store_test.go index 3bca5ba7d6b1..96d9af167638 100644 --- a/x/staking/migrations/v3/store_test.go +++ b/x/staking/migrations/v3/store_test.go @@ -20,12 +20,13 @@ func TestStoreMigration(t *testing.T) { tStakingKey := storetypes.NewTransientStoreKey("transient_test") ctx := testutil.DefaultContext(stakingKey, tStakingKey) paramstore := paramtypes.NewSubspace(encCfg.Codec, encCfg.Amino, stakingKey, tStakingKey, "staking") + store := ctx.KVStore(stakingKey) // Check no params require.False(t, paramstore.Has(ctx, types.KeyMinCommissionRate)) // Run migrations. - err := v3.MigrateStore(ctx, stakingKey, encCfg.Codec, paramstore) + err := v3.MigrateStore(ctx, store, encCfg.Codec, paramstore) require.NoError(t, err) // Make sure the new params are set. diff --git a/x/staking/migrations/v4/migrations_test.go b/x/staking/migrations/v4/migrations_test.go index 420a24ebc304..90fa7f1ec9cf 100644 --- a/x/staking/migrations/v4/migrations_test.go +++ b/x/staking/migrations/v4/migrations_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/require" + "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" @@ -69,7 +70,7 @@ func TestMigrate(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { if tc.doMigration { - require.NoError(t, v4.MigrateStore(ctx, storeKey, cdc, legacySubspace)) + require.NoError(t, v4.MigrateStore(ctx, store, cdc, legacySubspace)) } ubd := getUBD(t, accAddr, valAddr, store, cdc) @@ -82,7 +83,7 @@ func TestMigrate(t *testing.T) { // checking the updated balance for duplicateCreationHeight for _, ubdEntry := range ubd.Entries { if ubdEntry.CreationHeight == duplicateCreationHeight { - require.Equal(t, sdk.NewInt(100*10), ubdEntry.Balance) + require.Equal(t, math.NewInt(100*10), ubdEntry.Balance) break } } @@ -98,7 +99,7 @@ func TestMigrate(t *testing.T) { // createOldStateUnbonding will create the ubd entries with duplicate heights // 10 duplicate heights and 10 unique ubd with creation height func createOldStateUnbonding(t *testing.T, creationHeight int64, valAddr sdk.ValAddress, accAddr sdk.AccAddress, cdc codec.BinaryCodec, store storetypes.KVStore) error { - unbondBalance := sdk.NewInt(100) + unbondBalance := math.NewInt(100) completionTime := time.Now() ubdEntries := make([]types.UnbondingDelegationEntry, 0, 10) diff --git a/x/staking/migrations/v4/store.go b/x/staking/migrations/v4/store.go index d9dc44f1a66c..a41069a09efa 100644 --- a/x/staking/migrations/v4/store.go +++ b/x/staking/migrations/v4/store.go @@ -3,6 +3,7 @@ package v4 import ( "sort" + sdkmath "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" @@ -12,9 +13,7 @@ import ( ) // MigrateStore performs in-place store migrations from v3 to v4. -func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec, legacySubspace exported.Subspace) error { - store := ctx.KVStore(storeKey) - +func MigrateStore(ctx sdk.Context, store storetypes.KVStore, cdc codec.BinaryCodec, legacySubspace exported.Subspace) error { // migrate params if err := migrateParams(ctx, store, cdc, legacySubspace); err != nil { return err @@ -67,8 +66,8 @@ func migrateUBDEntries(ctx sdk.Context, store storetypes.KVStore, cdc codec.Bina for _, h := range creationHeights { ubdEntry := types.UnbondingDelegationEntry{ - Balance: sdk.ZeroInt(), - InitialBalance: sdk.ZeroInt(), + Balance: sdkmath.ZeroInt(), + InitialBalance: sdkmath.ZeroInt(), } for _, entry := range entriesAtSameCreationHeight[h] { ubdEntry.Balance = ubdEntry.Balance.Add(entry.Balance) diff --git a/x/staking/migrations/v5/keys.go b/x/staking/migrations/v5/keys.go index d62b0a2dc027..5c11c8735c3d 100644 --- a/x/staking/migrations/v5/keys.go +++ b/x/staking/migrations/v5/keys.go @@ -6,6 +6,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" ) const ( @@ -15,8 +16,8 @@ const ( var ( DelegationKey = []byte{0x31} // key for a delegation - DelegationByValIndexKey = []byte{0x37} // key for delegations by a validator HistoricalInfoKey = []byte{0x50} // prefix for the historical info + DelegationByValIndexKey = []byte{0x71} // key for delegations by a validator ) // ParseDelegationKey parses given key and returns delagator, validator address bytes @@ -59,3 +60,14 @@ func GetHistoricalInfoKey(height int64) []byte { binary.BigEndian.PutUint64(heightBytes, uint64(height)) return append(HistoricalInfoKey, heightBytes...) } + +// GetDelegationsByValPrefixKey builds a prefix key bytes with the given validator address bytes. +func GetDelegationsByValPrefixKey(valAddr sdk.ValAddress) []byte { + return append(DelegationByValIndexKey, address.MustLengthPrefix(valAddr)...) +} + +// GetDelegationsByValKey creates the key for delegations by validator address +// VALUE: staking/Delegation +func GetDelegationsByValKey(valAddr sdk.ValAddress, delAddr sdk.AccAddress) []byte { + return append(GetDelegationsByValPrefixKey(valAddr), delAddr...) +} diff --git a/x/staking/migrations/v5/migrations_test.go b/x/staking/migrations/v5/migrations_test.go index 8f477cde6158..ef9ca6e8d726 100644 --- a/x/staking/migrations/v5/migrations_test.go +++ b/x/staking/migrations/v5/migrations_test.go @@ -6,9 +6,13 @@ import ( "testing" "time" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + sdkmath "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/sims" @@ -18,8 +22,6 @@ import ( v2 "github.com/cosmos/cosmos-sdk/x/staking/migrations/v2" v5 "github.com/cosmos/cosmos-sdk/x/staking/migrations/v5" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) func TestHistoricalKeysMigration(t *testing.T) { @@ -62,7 +64,7 @@ func TestHistoricalKeysMigration(t *testing.T) { } // migrate store to new key format - require.NoErrorf(t, v5.MigrateStore(ctx, storeKey, cdc), "v5.MigrateStore failed, seed: %d", seed) + require.NoErrorf(t, v5.MigrateStore(ctx, store, cdc), "v5.MigrateStore failed, seed: %d", seed) // check results for _, tc := range testCases { @@ -88,7 +90,7 @@ func TestDelegationsByValidatorMigrations(t *testing.T) { var addedDels []stakingtypes.Delegation for i := 1; i < 11; i++ { - del1 := stakingtypes.NewDelegation(accAddrs[i], valAddrs[0], sdkmath.LegacyNewDec(100)) + del1 := stakingtypes.NewDelegation(accAddrs[i].String(), valAddrs[0].String(), sdkmath.LegacyNewDec(100)) store.Set(stakingtypes.GetDelegationKey(accAddrs[i], valAddrs[0]), stakingtypes.MustMarshalDelegation(cdc, del1)) addedDels = append(addedDels, del1) } @@ -97,7 +99,7 @@ func TestDelegationsByValidatorMigrations(t *testing.T) { dels := getValDelegations(ctx, cdc, storeKey, valAddrs[0]) assert.Len(t, dels, 0) - err := v5.MigrateStore(ctx, storeKey, cdc) + err := v5.MigrateStore(ctx, store, cdc) assert.NoError(t, err) // after migration the state of delegations by val index should not be empty @@ -110,7 +112,7 @@ func getValDelegations(ctx sdk.Context, cdc codec.Codec, storeKey storetypes.Sto var delegations []stakingtypes.Delegation store := ctx.KVStore(storeKey) - iterator := storetypes.KVStorePrefixIterator(store, stakingtypes.GetDelegationsByValPrefixKey(valAddr)) + iterator := storetypes.KVStorePrefixIterator(store, v5.GetDelegationsByValPrefixKey(valAddr)) for ; iterator.Valid(); iterator.Next() { var delegation stakingtypes.Delegation valAddr, delAddr, err := stakingtypes.ParseDelegationsByValKey(iterator.Key()) diff --git a/x/staking/migrations/v5/store.go b/x/staking/migrations/v5/store.go index f87252da1a7e..569cc80c648f 100644 --- a/x/staking/migrations/v5/store.go +++ b/x/staking/migrations/v5/store.go @@ -6,16 +6,13 @@ import ( "cosmossdk.io/log" "cosmossdk.io/store/prefix" - storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/staking/types" ) -func migrateDelegationsByValidatorIndex(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) error { - store := ctx.KVStore(storeKey) - +func migrateDelegationsByValidatorIndex(ctx sdk.Context, store storetypes.KVStore, cdc codec.BinaryCodec) error { iterator := storetypes.KVStorePrefixIterator(store, DelegationKey) for ; iterator.Valid(); iterator.Next() { @@ -25,16 +22,15 @@ func migrateDelegationsByValidatorIndex(ctx sdk.Context, storeKey storetypes.Sto return err } - store.Set(types.GetDelegationsByValKey(val, del), []byte{}) + store.Set(GetDelegationsByValKey(val, del), []byte{}) } return nil } // MigrateStore performs in-place store migrations from v4 to v5. -func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) error { - store := ctx.KVStore(storeKey) - if err := migrateDelegationsByValidatorIndex(ctx, storeKey, cdc); err != nil { +func MigrateStore(ctx sdk.Context, store storetypes.KVStore, cdc codec.BinaryCodec) error { + if err := migrateDelegationsByValidatorIndex(ctx, store, cdc); err != nil { return err } return migrateHistoricalInfoKeys(store, ctx.Logger()) diff --git a/x/staking/module.go b/x/staking/module.go index 4588cfa7cda5..9fde311dffae 100644 --- a/x/staking/module.go +++ b/x/staking/module.go @@ -6,18 +6,20 @@ import ( "fmt" "sort" - modulev1 "cosmossdk.io/api/cosmos/staking/module/v1" - "cosmossdk.io/core/appmodule" - "cosmossdk.io/depinject" - store "cosmossdk.io/store/types" abci "github.com/cometbft/cometbft/abci/types" gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" "golang.org/x/exp/maps" + modulev1 "cosmossdk.io/api/cosmos/staking/module/v1" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/core/store" + "cosmossdk.io/depinject" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -35,11 +37,15 @@ const ( ) var ( - _ appmodule.AppModule = AppModule{} - _ appmodule.HasBeginBlocker = AppModule{} - _ module.HasABCIEndblock = AppModule{} _ module.AppModuleBasic = AppModuleBasic{} _ module.AppModuleSimulation = AppModule{} + _ module.HasServices = AppModule{} + _ module.HasInvariants = AppModule{} + _ module.HasABCIGenesis = AppModule{} + _ module.HasABCIEndBlock = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasBeginBlocker = AppModule{} ) // AppModuleBasic defines the basic application module used by the staking module. @@ -48,8 +54,6 @@ type AppModuleBasic struct { ak types.AccountKeeper } -var _ module.AppModuleBasic = AppModuleBasic{} - // Name returns the staking module's name. func (AppModuleBasic) Name() string { return types.ModuleName @@ -89,13 +93,8 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *g } // GetTxCmd returns the root tx command for the staking module. -func (AppModuleBasic) GetTxCmd() *cobra.Command { - return cli.NewTxCmd() -} - -// GetQueryCmd returns no root query command for the staking module. -func (ab AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.GetQueryCmd(ab.ak.AddressCodec()) +func (amb AppModuleBasic) GetTxCmd() *cobra.Command { + return cli.NewTxCmd(amb.cdc.InterfaceRegistry().SigningContext().ValidatorAddressCodec(), amb.cdc.InterfaceRegistry().SigningContext().AddressCodec()) } // AppModule implements an application module for the staking module. @@ -127,22 +126,12 @@ func NewAppModule( } } -var ( - _ appmodule.AppModule = AppModule{} - _ appmodule.HasBeginBlocker = AppModule{} -) - // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} // IsAppModule implements the appmodule.AppModule interface. func (am AppModule) IsAppModule() {} -// Name returns the staking module's name. -func (AppModule) Name() string { - return types.ModuleName -} - // RegisterInvariants registers the staking module invariants. func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { keeper.RegisterInvariants(ir, am.keeper) @@ -189,10 +178,7 @@ func (AppModule) ConsensusVersion() uint64 { return consensusVersion } // BeginBlock returns the begin blocker for the staking module. func (am AppModule) BeginBlock(ctx context.Context) error { - c := sdk.UnwrapSDKContext(ctx) - - am.keeper.BeginBlocker(c) - return nil + return am.keeper.BeginBlocker(ctx) } // EndBlock returns the end blocker for the staking module. It returns no validator @@ -212,11 +198,13 @@ func init() { type ModuleInputs struct { depinject.In - Config *modulev1.Module - AccountKeeper types.AccountKeeper - BankKeeper types.BankKeeper - Cdc codec.Codec - Key *store.KVStoreKey + Config *modulev1.Module + ValidatorAddressCodec runtime.ValidatorAddressCodec + ConsensusAddressCodec runtime.ConsensusAddressCodec + AccountKeeper types.AccountKeeper + BankKeeper types.BankKeeper + Cdc codec.Codec + StoreService store.KVStoreService // LegacySubspace is used solely for migration of x/params managed parameters LegacySubspace exported.Subspace `optional:"true"` @@ -239,10 +227,12 @@ func ProvideModule(in ModuleInputs) ModuleOutputs { k := keeper.NewKeeper( in.Cdc, - in.Key, + in.StoreService, in.AccountKeeper, in.BankKeeper, authority.String(), + in.ValidatorAddressCodec, + in.ConsensusAddressCodec, ) m := NewAppModule(in.Cdc, k, in.AccountKeeper, in.BankKeeper, in.LegacySubspace) return ModuleOutputs{StakingKeeper: k, Module: m} diff --git a/x/staking/module_test.go b/x/staking/module_test.go index f84741c6d9f4..37c4063fa27b 100644 --- a/x/staking/module_test.go +++ b/x/staking/module_test.go @@ -3,9 +3,10 @@ package staking_test import ( "testing" + "github.com/stretchr/testify/require" + "cosmossdk.io/depinject" "cosmossdk.io/log" - "github.com/stretchr/testify/require" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" authKeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" diff --git a/x/staking/simulation/decoder_test.go b/x/staking/simulation/decoder_test.go index a38663f228ef..589d396e682f 100644 --- a/x/staking/simulation/decoder_test.go +++ b/x/staking/simulation/decoder_test.go @@ -5,9 +5,11 @@ import ( "testing" "time" - "cosmossdk.io/math" "github.com/stretchr/testify/require" + "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/kv" @@ -27,11 +29,11 @@ func TestDecodeStore(t *testing.T) { dec := simulation.NewDecodeStore(cdc) bondTime := time.Now().UTC() - val, err := types.NewValidator(valAddr1, delPk1, types.NewDescription("test", "test", "test", "test", "test")) + val, err := types.NewValidator(valAddr1.String(), delPk1, types.NewDescription("test", "test", "test", "test", "test")) require.NoError(t, err) - del := types.NewDelegation(delAddr1, valAddr1, math.LegacyOneDec()) - ubd := types.NewUnbondingDelegation(delAddr1, valAddr1, 15, bondTime, math.OneInt(), 1) - red := types.NewRedelegation(delAddr1, valAddr1, valAddr1, 12, bondTime, math.OneInt(), math.LegacyOneDec(), 0) + del := types.NewDelegation(delAddr1.String(), valAddr1.String(), math.LegacyOneDec()) + ubd := types.NewUnbondingDelegation(delAddr1, valAddr1, 15, bondTime, math.OneInt(), 1, address.NewBech32Codec("cosmosvaloper"), address.NewBech32Codec("cosmos")) + red := types.NewRedelegation(delAddr1, valAddr1, valAddr1, 12, bondTime, math.OneInt(), math.LegacyOneDec(), 0, address.NewBech32Codec("cosmosvaloper"), address.NewBech32Codec("cosmos")) kvPairs := kv.Pairs{ Pairs: []kv.Pair{ diff --git a/x/staking/simulation/genesis.go b/x/staking/simulation/genesis.go index 1716fff3da8c..08cc7dd05c20 100644 --- a/x/staking/simulation/genesis.go +++ b/x/staking/simulation/genesis.go @@ -76,7 +76,7 @@ func RandomizedGenState(simState *module.SimulationState) { simulation.RandomDecAmount(simState.Rand, maxCommission), ) - validator, err := types.NewValidator(valAddr, simState.Accounts[i].ConsKey.PubKey(), types.Description{}) + validator, err := types.NewValidator(valAddr.String(), simState.Accounts[i].ConsKey.PubKey(), types.Description{}) if err != nil { panic(err) } @@ -84,7 +84,7 @@ func RandomizedGenState(simState *module.SimulationState) { validator.DelegatorShares = sdkmath.LegacyNewDecFromInt(simState.InitialStake) validator.Commission = commission - delegation := types.NewDelegation(simState.Accounts[i].Address, valAddr, sdkmath.LegacyNewDecFromInt(simState.InitialStake)) + delegation := types.NewDelegation(simState.Accounts[i].Address.String(), valAddr.String(), sdkmath.LegacyNewDecFromInt(simState.InitialStake)) validators = append(validators, validator) delegations = append(delegations, delegation) diff --git a/x/staking/simulation/genesis_test.go b/x/staking/simulation/genesis_test.go index c0c8835a78e0..d3b74e5758fe 100644 --- a/x/staking/simulation/genesis_test.go +++ b/x/staking/simulation/genesis_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/require" sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" @@ -57,7 +58,7 @@ func TestRandomizedGenState(t *testing.T) { require.Equal(t, "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", stakingGenesis.Delegations[0].ValidatorAddress) require.Equal(t, "1000.000000000000000000", stakingGenesis.Delegations[0].Shares.String()) // check validators - require.Equal(t, "cosmosvaloper1ghekyjucln7y67ntx7cf27m9dpuxxemnsvnaes", stakingGenesis.Validators[2].GetOperator().String()) + require.Equal(t, "cosmosvaloper1ghekyjucln7y67ntx7cf27m9dpuxxemnsvnaes", stakingGenesis.Validators[2].GetOperator()) require.Equal(t, []byte{0xa, 0x20, 0x51, 0xde, 0xbd, 0xe8, 0xfa, 0xdf, 0x4e, 0xfc, 0x33, 0xa5, 0x16, 0x94, 0xf6, 0xee, 0xd3, 0x69, 0x7a, 0x7a, 0x1c, 0x2d, 0x50, 0xb6, 0x2, 0xf7, 0x16, 0x4e, 0x66, 0x9f, 0xff, 0x38, 0x91, 0x9b}, stakingGenesis.Validators[2].ConsensusPubkey.Value) require.Equal(t, false, stakingGenesis.Validators[2].Jailed) require.Equal(t, "BOND_STATUS_UNBONDED", stakingGenesis.Validators[2].Status.String()) diff --git a/x/staking/simulation/operations.go b/x/staking/simulation/operations.go index de8276d29129..0776de5dbc45 100644 --- a/x/staking/simulation/operations.go +++ b/x/staking/simulation/operations.go @@ -1,6 +1,7 @@ package simulation import ( + "bytes" "fmt" "math/rand" @@ -120,12 +121,15 @@ func SimulateMsgCreateValidator( address := sdk.ValAddress(simAccount.Address) // ensure the validator doesn't exist already - _, found := k.GetValidator(ctx, address) - if found { + _, err := k.GetValidator(ctx, address) + if err == nil { return simtypes.NoOpMsg(types.ModuleName, msgType, "validator already exists"), nil, nil } - denom := k.GetParams(ctx).BondDenom + denom, err := k.BondDenom(ctx) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "bond denom not found"), nil, err + } balance := bk.GetBalance(ctx, simAccount.Address, denom).Amount if !balance.IsPositive() { @@ -160,14 +164,14 @@ func SimulateMsgCreateValidator( simtypes.RandStringOfLength(r, 10), ) - maxCommission := sdk.NewDecWithPrec(int64(simtypes.RandIntBetween(r, 0, 100)), 2) + maxCommission := math.LegacyNewDecWithPrec(int64(simtypes.RandIntBetween(r, 0, 100)), 2) commission := types.NewCommissionRates( simtypes.RandomDecAmount(r, maxCommission), maxCommission, simtypes.RandomDecAmount(r, maxCommission), ) - msg, err := types.NewMsgCreateValidator(address, simAccount.ConsKey.PubKey(), selfDelegation, description, commission, math.OneInt()) + msg, err := types.NewMsgCreateValidator(address.String(), simAccount.ConsKey.PubKey(), selfDelegation, description, commission, math.OneInt()) if err != nil { return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "unable to create CreateValidator message"), nil, err } @@ -200,11 +204,16 @@ func SimulateMsgEditValidator( ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { msgType := sdk.MsgTypeURL(&types.MsgEditValidator{}) - if len(k.GetAllValidators(ctx)) == 0 { + vals, err := k.GetAllValidators(ctx) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "unable to get validators"), nil, err + } + + if len(vals) == 0 { return simtypes.NoOpMsg(types.ModuleName, msgType, "number of validators equal zero"), nil, nil } - val, ok := testutil.RandSliceElem(r, k.GetAllValidators(ctx)) + val, ok := testutil.RandSliceElem(r, vals) if !ok { return simtypes.NoOpMsg(types.ModuleName, msgType, "unable to pick a validator"), nil, nil } @@ -217,7 +226,12 @@ func SimulateMsgEditValidator( return simtypes.NoOpMsg(types.ModuleName, msgType, "invalid commission rate"), nil, nil } - simAccount, found := simtypes.FindAccount(accs, sdk.AccAddress(val.GetOperator())) + bz, err := k.ValidatorAddressCodec().StringToBytes(val.GetOperator()) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "error getting validator address bytes"), nil, err + } + + simAccount, found := simtypes.FindAccount(accs, sdk.AccAddress(bz)) if !found { return simtypes.NoOpMsg(types.ModuleName, msgType, "unable to find account"), nil, fmt.Errorf("validator %s not found", val.GetOperator()) } @@ -264,14 +278,22 @@ func SimulateMsgDelegate( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { msgType := sdk.MsgTypeURL(&types.MsgDelegate{}) - denom := k.GetParams(ctx).BondDenom + denom, err := k.BondDenom(ctx) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "bond denom not found"), nil, err + } - if len(k.GetAllValidators(ctx)) == 0 { + vals, err := k.GetAllValidators(ctx) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "unable to get validators"), nil, err + } + + if len(vals) == 0 { return simtypes.NoOpMsg(types.ModuleName, msgType, "number of validators equal zero"), nil, nil } simAccount, _ := simtypes.RandomAcc(r, accs) - val, ok := testutil.RandSliceElem(r, k.GetAllValidators(ctx)) + val, ok := testutil.RandSliceElem(r, vals) if !ok { return simtypes.NoOpMsg(types.ModuleName, msgType, "unable to pick a validator"), nil, nil } @@ -285,7 +307,7 @@ func SimulateMsgDelegate( return simtypes.NoOpMsg(types.ModuleName, msgType, "balance is negative"), nil, nil } - amount, err := simtypes.RandPositiveInt(r, amount) + amount, err = simtypes.RandPositiveInt(r, amount) if err != nil { return simtypes.NoOpMsg(types.ModuleName, msgType, "unable to generate positive amount"), nil, err } @@ -305,7 +327,7 @@ func SimulateMsgDelegate( } } - msg := types.NewMsgDelegate(simAccount.Address, val.GetOperator(), bondAmt) + msg := types.NewMsgDelegate(simAccount.Address.String(), val.GetOperator(), bondAmt) txCtx := simulation.OperationInput{ R: r, @@ -335,13 +357,29 @@ func SimulateMsgUndelegate( ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { msgType := sdk.MsgTypeURL(&types.MsgUndelegate{}) - val, ok := testutil.RandSliceElem(r, k.GetAllValidators(ctx)) + vals, err := k.GetAllValidators(ctx) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "unable to get validators"), nil, err + } + + if len(vals) == 0 { + return simtypes.NoOpMsg(types.ModuleName, msgType, "number of validators equal zero"), nil, nil + } + + val, ok := testutil.RandSliceElem(r, vals) if !ok { return simtypes.NoOpMsg(types.ModuleName, msgType, "validator is not ok"), nil, nil } - valAddr := val.GetOperator() - delegations := k.GetValidatorDelegations(ctx, val.GetOperator()) + valAddr, err := k.ValidatorAddressCodec().StringToBytes(val.GetOperator()) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "error getting validator address bytes"), nil, err + } + delegations, err := k.GetValidatorDelegations(ctx, valAddr) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "error getting validator delegations"), nil, nil + } + if delegations == nil { return simtypes.NoOpMsg(types.ModuleName, msgType, "keeper does have any delegation entries"), nil, nil } @@ -350,7 +388,17 @@ func SimulateMsgUndelegate( delegation := delegations[r.Intn(len(delegations))] delAddr := delegation.GetDelegatorAddr() - if k.HasMaxUnbondingDelegationEntries(ctx, delAddr, valAddr) { + delAddrBz, err := ak.AddressCodec().StringToBytes(delAddr) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "error getting delegator address bytes"), nil, err + } + + hasMaxUD, err := k.HasMaxUnbondingDelegationEntries(ctx, delAddrBz, valAddr) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "error getting max unbonding delegation entries"), nil, err + } + + if hasMaxUD { return simtypes.NoOpMsg(types.ModuleName, msgType, "keeper does have a max unbonding delegation entries"), nil, nil } @@ -368,15 +416,20 @@ func SimulateMsgUndelegate( return simtypes.NoOpMsg(types.ModuleName, msgType, "unbond amount is zero"), nil, nil } + bondDenom, err := k.BondDenom(ctx) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "bond denom not found"), nil, err + } + msg := types.NewMsgUndelegate( - delAddr, valAddr, sdk.NewCoin(k.BondDenom(ctx), unbondAmt), + delAddr, val.GetOperator(), sdk.NewCoin(bondDenom, unbondAmt), ) // need to retrieve the simulation account associated with delegation to retrieve PrivKey var simAccount simtypes.Account for _, simAcc := range accs { - if simAcc.Address.Equals(delAddr) { + if simAcc.Address.Equals(sdk.AccAddress(delAddrBz)) { simAccount = simAcc break } @@ -386,7 +439,7 @@ func SimulateMsgUndelegate( return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "account private key is nil"), nil, nil } - account := ak.GetAccount(ctx, delAddr) + account := ak.GetAccount(ctx, delAddrBz) spendable := bk.SpendableCoins(ctx, account.GetAddress()) txCtx := simulation.OperationInput{ @@ -419,11 +472,17 @@ func SimulateMsgCancelUnbondingDelegate( ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { msgType := sdk.MsgTypeURL(&types.MsgCancelUnbondingDelegation{}) - if len(k.GetAllValidators(ctx)) == 0 { + vals, err := k.GetAllValidators(ctx) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "unable to get validators"), nil, err + } + + if len(vals) == 0 { return simtypes.NoOpMsg(types.ModuleName, msgType, "number of validators equal zero"), nil, nil } + simAccount, _ := simtypes.RandomAcc(r, accs) - val, ok := testutil.RandSliceElem(r, k.GetAllValidators(ctx)) + val, ok := testutil.RandSliceElem(r, vals) if !ok { return simtypes.NoOpMsg(types.ModuleName, msgType, "validator is not ok"), nil, nil } @@ -432,9 +491,12 @@ func SimulateMsgCancelUnbondingDelegate( return simtypes.NoOpMsg(types.ModuleName, msgType, "validator is jailed"), nil, nil } - valAddr := val.GetOperator() - unbondingDelegation, found := k.GetUnbondingDelegation(ctx, simAccount.Address, valAddr) - if !found { + valAddr, err := k.ValidatorAddressCodec().StringToBytes(val.GetOperator()) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "error getting validator address bytes"), nil, err + } + unbondingDelegation, err := k.GetUnbondingDelegation(ctx, simAccount.Address, valAddr) + if err != nil { return simtypes.NoOpMsg(types.ModuleName, msgType, "account does have any unbonding delegation"), nil, nil } @@ -469,8 +531,13 @@ func SimulateMsgCancelUnbondingDelegate( return simtypes.NoOpMsg(types.ModuleName, msgType, "cancelBondAmt amount is zero"), nil, nil } + bondDenom, err := k.BondDenom(ctx) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "bond denom not found"), nil, err + } + msg := types.NewMsgCancelUnbondingDelegation( - simAccount.Address, valAddr, unbondingDelegationEntry.CreationHeight, sdk.NewCoin(k.BondDenom(ctx), cancelBondAmt), + simAccount.Address.String(), val.GetOperator(), unbondingDelegationEntry.CreationHeight, sdk.NewCoin(bondDenom, cancelBondAmt), ) spendable := bk.SpendableCoins(ctx, simAccount.Address) @@ -505,14 +572,29 @@ func SimulateMsgBeginRedelegate( ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { msgType := sdk.MsgTypeURL(&types.MsgBeginRedelegate{}) - allVals := k.GetAllValidators(ctx) + allVals, err := k.GetAllValidators(ctx) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "unable to get validators"), nil, err + } + + if len(allVals) == 0 { + return simtypes.NoOpMsg(types.ModuleName, msgType, "number of validators equal zero"), nil, nil + } + srcVal, ok := testutil.RandSliceElem(r, allVals) if !ok { return simtypes.NoOpMsg(types.ModuleName, msgType, "unable to pick validator"), nil, nil } - srcAddr := srcVal.GetOperator() - delegations := k.GetValidatorDelegations(ctx, srcAddr) + srcAddr, err := k.ValidatorAddressCodec().StringToBytes(srcVal.GetOperator()) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "error getting validator address bytes"), nil, err + } + delegations, err := k.GetValidatorDelegations(ctx, srcAddr) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "error getting validator delegations"), nil, nil + } + if delegations == nil { return simtypes.NoOpMsg(types.ModuleName, msgType, "keeper does have any delegation entries"), nil, nil } @@ -521,7 +603,17 @@ func SimulateMsgBeginRedelegate( delegation := delegations[r.Intn(len(delegations))] delAddr := delegation.GetDelegatorAddr() - if k.HasReceivingRedelegation(ctx, delAddr, srcAddr) { + delAddrBz, err := ak.AddressCodec().StringToBytes(delAddr) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "error getting delegator address bytes"), nil, err + } + + hasRecRedel, err := k.HasReceivingRedelegation(ctx, delAddrBz, srcAddr) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "error getting receiving redelegation"), nil, err + } + + if hasRecRedel { return simtypes.NoOpMsg(types.ModuleName, msgType, "receveing redelegation is not allowed"), nil, nil // skip } @@ -531,8 +623,16 @@ func SimulateMsgBeginRedelegate( return simtypes.NoOpMsg(types.ModuleName, msgType, "unable to pick validator"), nil, nil } - destAddr := destVal.GetOperator() - if srcAddr.Equals(destAddr) || destVal.InvalidExRate() || k.HasMaxRedelegationEntries(ctx, delAddr, srcAddr, destAddr) { + destAddr, err := k.ValidatorAddressCodec().StringToBytes(destVal.GetOperator()) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "error getting validator address bytes"), nil, err + } + hasMaxRedel, err := k.HasMaxRedelegationEntries(ctx, delAddrBz, srcAddr, destAddr) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "error getting max redelegation entries"), nil, err + } + + if bytes.Equal(srcAddr, destAddr) || destVal.InvalidExRate() || hasMaxRedel { return simtypes.NoOpMsg(types.ModuleName, msgType, "checks failed"), nil, nil } @@ -564,7 +664,7 @@ func SimulateMsgBeginRedelegate( var simAccount simtypes.Account for _, simAcc := range accs { - if simAcc.Address.Equals(delAddr) { + if simAcc.Address.Equals(sdk.AccAddress(delAddrBz)) { simAccount = simAcc break } @@ -575,12 +675,17 @@ func SimulateMsgBeginRedelegate( return simtypes.NoOpMsg(types.ModuleName, msgType, "account private key is nil"), nil, nil } - account := ak.GetAccount(ctx, delAddr) + account := ak.GetAccount(ctx, delAddrBz) spendable := bk.SpendableCoins(ctx, account.GetAddress()) + bondDenom, err := k.BondDenom(ctx) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "bond denom not found"), nil, err + } + msg := types.NewMsgBeginRedelegate( - delAddr, srcAddr, destAddr, - sdk.NewCoin(k.BondDenom(ctx), redAmt), + delAddr, srcVal.GetOperator(), destVal.GetOperator(), + sdk.NewCoin(bondDenom, redAmt), ) txCtx := simulation.OperationInput{ diff --git a/x/staking/simulation/operations_test.go b/x/staking/simulation/operations_test.go index 453ac35a3ac5..f85060319792 100644 --- a/x/staking/simulation/operations_test.go +++ b/x/staking/simulation/operations_test.go @@ -6,40 +6,37 @@ import ( "testing" "time" - "cosmossdk.io/depinject" - sdklog "cosmossdk.io/log" - "cosmossdk.io/math" + abci "github.com/cometbft/cometbft/abci/types" + cmttypes "github.com/cometbft/cometbft/types" "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - abci "github.com/cometbft/cometbft/abci/types" - cmttypes "github.com/cometbft/cometbft/types" + "cosmossdk.io/depinject" + sdklog "cosmossdk.io/log" + "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec/address" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/runtime" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/staking/simulation" - "github.com/cosmos/cosmos-sdk/x/staking/testutil" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - banktestutil "github.com/cosmos/cosmos-sdk/x/bank/testutil" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" - "github.com/cosmos/cosmos-sdk/x/staking/types" - authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + banktestutil "github.com/cosmos/cosmos-sdk/x/bank/testutil" distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + "github.com/cosmos/cosmos-sdk/x/staking/simulation" + "github.com/cosmos/cosmos-sdk/x/staking/testutil" + "github.com/cosmos/cosmos-sdk/x/staking/types" ) type SimTestSuite struct { @@ -68,7 +65,7 @@ func (s *SimTestSuite) SetupTest() { senderPrivKey := secp256k1.GenPrivKey() acc := authtypes.NewBaseAccount(senderPrivKey.PubKey().Address().Bytes(), senderPrivKey.PubKey(), 0, 0) accs := []simtestutil.GenesisAccount{ - {GenesisAccount: acc, Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000000000000)))}, + {GenesisAccount: acc, Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(100000000000000)))}, } // create validator set with single validator @@ -166,7 +163,8 @@ func (s *SimTestSuite) TestWeightedOperations() { // Abonormal scenarios, where the message are created by an errors are not tested here. func (s *SimTestSuite) TestSimulateMsgCreateValidator() { require := s.Require() - s.app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: s.app.LastBlockHeight() + 1, Hash: s.app.LastCommitID().Hash}) + _, err := s.app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: s.app.LastBlockHeight() + 1, Hash: s.app.LastCommitID().Hash}) + require.NoError(err) // execute operation op := simulation.SimulateMsgCreateValidator(s.txConfig, s.accountKeeper, s.bankKeeper, s.stakingKeeper) @@ -199,18 +197,21 @@ func (s *SimTestSuite) TestSimulateMsgCancelUnbondingDelegation() { delTokens := s.stakingKeeper.TokensFromConsensusPower(ctx, 2) validator0, issuedShares := validator0.AddTokensFromDel(delTokens) delegator := s.accounts[2] - delegation := types.NewDelegation(delegator.Address, validator0.GetOperator(), issuedShares) - s.stakingKeeper.SetDelegation(ctx, delegation) - s.distrKeeper.SetDelegatorStartingInfo(ctx, validator0.GetOperator(), delegator.Address, distrtypes.NewDelegatorStartingInfo(2, math.LegacyOneDec(), 200)) + delegation := types.NewDelegation(delegator.Address.String(), validator0.GetOperator(), issuedShares) + require.NoError(s.stakingKeeper.SetDelegation(ctx, delegation)) + val0bz, err := s.stakingKeeper.ValidatorAddressCodec().StringToBytes(validator0.GetOperator()) + s.Require().NoError(err) + require.NoError(s.distrKeeper.SetDelegatorStartingInfo(ctx, val0bz, delegator.Address, distrtypes.NewDelegatorStartingInfo(2, math.LegacyOneDec(), 200))) - s.setupValidatorRewards(ctx, validator0.GetOperator()) + s.setupValidatorRewards(ctx, val0bz) // unbonding delegation - udb := types.NewUnbondingDelegation(delegator.Address, validator0.GetOperator(), s.app.LastBlockHeight()+1, blockTime.Add(2*time.Minute), delTokens, 0) - s.stakingKeeper.SetUnbondingDelegation(ctx, udb) - s.setupValidatorRewards(ctx, validator0.GetOperator()) + udb := types.NewUnbondingDelegation(delegator.Address, val0bz, s.app.LastBlockHeight()+1, blockTime.Add(2*time.Minute), delTokens, 0, address.NewBech32Codec("cosmosvaloper"), address.NewBech32Codec("cosmos")) + require.NoError(s.stakingKeeper.SetUnbondingDelegation(ctx, udb)) + s.setupValidatorRewards(ctx, val0bz) - s.app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: s.app.LastBlockHeight() + 1, Hash: s.app.LastCommitID().Hash, Time: blockTime}) + _, err = s.app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: s.app.LastBlockHeight() + 1, Hash: s.app.LastCommitID().Hash, Time: blockTime}) + require.NoError(err) // execute operation op := simulation.SimulateMsgCancelUnbondingDelegate(s.txConfig, s.accountKeeper, s.bankKeeper, s.stakingKeeper) @@ -224,7 +225,7 @@ func (s *SimTestSuite) TestSimulateMsgCancelUnbondingDelegation() { require.True(operationMsg.OK) require.Equal(sdk.MsgTypeURL(&types.MsgCancelUnbondingDelegation{}), sdk.MsgTypeURL(&msg)) require.Equal(delegator.Address.String(), msg.DelegatorAddress) - require.Equal(validator0.GetOperator().String(), msg.ValidatorAddress) + require.Equal(validator0.GetOperator(), msg.ValidatorAddress) require.Len(futureOperations, 0) } @@ -238,7 +239,8 @@ func (s *SimTestSuite) TestSimulateMsgEditValidator() { // setup accounts[0] as validator _ = s.getTestingValidator0(ctx) - s.app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: s.app.LastBlockHeight() + 1, Hash: s.app.LastCommitID().Hash, Time: blockTime}) + _, err := s.app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: s.app.LastBlockHeight() + 1, Hash: s.app.LastCommitID().Hash, Time: blockTime}) + require.NoError(err) // execute operation op := simulation.SimulateMsgEditValidator(s.txConfig, s.accountKeeper, s.bankKeeper, s.stakingKeeper) @@ -291,13 +293,16 @@ func (s *SimTestSuite) TestSimulateMsgUndelegate() { delTokens := s.stakingKeeper.TokensFromConsensusPower(ctx, 2) validator0, issuedShares := validator0.AddTokensFromDel(delTokens) delegator := s.accounts[2] - delegation := types.NewDelegation(delegator.Address, validator0.GetOperator(), issuedShares) - s.stakingKeeper.SetDelegation(ctx, delegation) - s.distrKeeper.SetDelegatorStartingInfo(ctx, validator0.GetOperator(), delegator.Address, distrtypes.NewDelegatorStartingInfo(2, math.LegacyOneDec(), 200)) + delegation := types.NewDelegation(delegator.Address.String(), validator0.GetOperator(), issuedShares) + require.NoError(s.stakingKeeper.SetDelegation(ctx, delegation)) + val0bz, err := s.stakingKeeper.ValidatorAddressCodec().StringToBytes(validator0.GetOperator()) + s.Require().NoError(err) + require.NoError(s.distrKeeper.SetDelegatorStartingInfo(ctx, val0bz, delegator.Address, distrtypes.NewDelegatorStartingInfo(2, math.LegacyOneDec(), 200))) - s.setupValidatorRewards(ctx, validator0.GetOperator()) + s.setupValidatorRewards(ctx, val0bz) - s.app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: s.app.LastBlockHeight() + 1, Hash: s.app.LastCommitID().Hash, Time: blockTime}) + _, err = s.app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: s.app.LastBlockHeight() + 1, Hash: s.app.LastCommitID().Hash, Time: blockTime}) + require.NoError(err) // execute operation op := simulation.SimulateMsgUndelegate(s.txConfig, s.accountKeeper, s.bankKeeper, s.stakingKeeper) @@ -332,14 +337,19 @@ func (s *SimTestSuite) TestSimulateMsgBeginRedelegate() { // setup accounts[3] as delegator delegator := s.accounts[3] - delegation := types.NewDelegation(delegator.Address, validator0.GetOperator(), issuedShares) - s.stakingKeeper.SetDelegation(ctx, delegation) - s.distrKeeper.SetDelegatorStartingInfo(ctx, validator0.GetOperator(), delegator.Address, distrtypes.NewDelegatorStartingInfo(2, math.LegacyOneDec(), 200)) + delegation := types.NewDelegation(delegator.Address.String(), validator0.GetOperator(), issuedShares) + require.NoError(s.stakingKeeper.SetDelegation(ctx, delegation)) + val0bz, err := s.stakingKeeper.ValidatorAddressCodec().StringToBytes(validator0.GetOperator()) + s.Require().NoError(err) + val1bz, err := s.stakingKeeper.ValidatorAddressCodec().StringToBytes(validator1.GetOperator()) + s.Require().NoError(err) + require.NoError(s.distrKeeper.SetDelegatorStartingInfo(ctx, val0bz, delegator.Address, distrtypes.NewDelegatorStartingInfo(2, math.LegacyOneDec(), 200))) - s.setupValidatorRewards(ctx, validator0.GetOperator()) - s.setupValidatorRewards(ctx, validator1.GetOperator()) + s.setupValidatorRewards(ctx, val0bz) + s.setupValidatorRewards(ctx, val1bz) - s.app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: s.app.LastBlockHeight() + 1, Hash: s.app.LastCommitID().Hash, Time: blockTime}) + _, err = s.app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: s.app.LastBlockHeight() + 1, Hash: s.app.LastCommitID().Hash, Time: blockTime}) + require.NoError(err) // execute operation op := simulation.SimulateMsgBeginRedelegate(s.txConfig, s.accountKeeper, s.bankKeeper, s.stakingKeeper) @@ -380,7 +390,7 @@ func (s *SimTestSuite) getTestingValidator(ctx sdk.Context, commission types.Com validator.DelegatorShares = math.LegacyNewDec(100) validator.Tokens = s.stakingKeeper.TokensFromConsensusPower(ctx, 100) - s.stakingKeeper.SetValidator(ctx, validator) + s.Require().NoError(s.stakingKeeper.SetValidator(ctx, validator)) return validator } diff --git a/x/staking/simulation/proposals_test.go b/x/staking/simulation/proposals_test.go index c12db5bbb3fe..040151747d46 100644 --- a/x/staking/simulation/proposals_test.go +++ b/x/staking/simulation/proposals_test.go @@ -5,10 +5,11 @@ import ( "testing" "time" - sdkmath "cosmossdk.io/math" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "gotest.tools/v3/assert" + sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" diff --git a/x/staking/testutil/app_config.go b/x/staking/testutil/app_config.go index d441f2b559bd..4f9118e395ce 100644 --- a/x/staking/testutil/app_config.go +++ b/x/staking/testutil/app_config.go @@ -2,7 +2,6 @@ package testutil import ( "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/bank" // import as blank for app wiring diff --git a/x/staking/testutil/cmt.go b/x/staking/testutil/cmt.go index 682471309fa7..6c3ca753da41 100644 --- a/x/staking/testutil/cmt.go +++ b/x/staking/testutil/cmt.go @@ -1,10 +1,11 @@ package testutil import ( - "cosmossdk.io/math" cmtcrypto "github.com/cometbft/cometbft/crypto" cmttypes "github.com/cometbft/cometbft/types" + "cosmossdk.io/math" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/x/staking/types" ) @@ -31,9 +32,9 @@ func ToCmtValidator(v types.Validator, r math.Int) (*cmttypes.Validator, error) // ToCmtValidators casts all validators to the corresponding CometBFT type. func ToCmtValidators(v types.Validators, r math.Int) ([]*cmttypes.Validator, error) { - validators := make([]*cmttypes.Validator, len(v)) + validators := make([]*cmttypes.Validator, len(v.Validators)) var err error - for i, val := range v { + for i, val := range v.Validators { validators[i], err = ToCmtValidator(val, r) if err != nil { return nil, err diff --git a/x/staking/testutil/expected_keepers_mocks.go b/x/staking/testutil/expected_keepers_mocks.go index 3123d781fbdc..dbea937f07f5 100644 --- a/x/staking/testutil/expected_keepers_mocks.go +++ b/x/staking/testutil/expected_keepers_mocks.go @@ -10,62 +10,12 @@ import ( address "cosmossdk.io/core/address" math "cosmossdk.io/math" + crypto "github.com/cometbft/cometbft/proto/tendermint/crypto" types "github.com/cosmos/cosmos-sdk/types" types0 "github.com/cosmos/cosmos-sdk/x/staking/types" gomock "github.com/golang/mock/gomock" ) -// MockDistributionKeeper is a mock of DistributionKeeper interface. -type MockDistributionKeeper struct { - ctrl *gomock.Controller - recorder *MockDistributionKeeperMockRecorder -} - -// MockDistributionKeeperMockRecorder is the mock recorder for MockDistributionKeeper. -type MockDistributionKeeperMockRecorder struct { - mock *MockDistributionKeeper -} - -// NewMockDistributionKeeper creates a new mock instance. -func NewMockDistributionKeeper(ctrl *gomock.Controller) *MockDistributionKeeper { - mock := &MockDistributionKeeper{ctrl: ctrl} - mock.recorder = &MockDistributionKeeperMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockDistributionKeeper) EXPECT() *MockDistributionKeeperMockRecorder { - return m.recorder -} - -// GetFeePoolCommunityCoins mocks base method. -func (m *MockDistributionKeeper) GetFeePoolCommunityCoins(ctx context.Context) types.DecCoins { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetFeePoolCommunityCoins", ctx) - ret0, _ := ret[0].(types.DecCoins) - return ret0 -} - -// GetFeePoolCommunityCoins indicates an expected call of GetFeePoolCommunityCoins. -func (mr *MockDistributionKeeperMockRecorder) GetFeePoolCommunityCoins(ctx interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFeePoolCommunityCoins", reflect.TypeOf((*MockDistributionKeeper)(nil).GetFeePoolCommunityCoins), ctx) -} - -// GetValidatorOutstandingRewardsCoins mocks base method. -func (m *MockDistributionKeeper) GetValidatorOutstandingRewardsCoins(ctx context.Context, val types.ValAddress) types.DecCoins { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetValidatorOutstandingRewardsCoins", ctx, val) - ret0, _ := ret[0].(types.DecCoins) - return ret0 -} - -// GetValidatorOutstandingRewardsCoins indicates an expected call of GetValidatorOutstandingRewardsCoins. -func (mr *MockDistributionKeeperMockRecorder) GetValidatorOutstandingRewardsCoins(ctx, val interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetValidatorOutstandingRewardsCoins", reflect.TypeOf((*MockDistributionKeeper)(nil).GetValidatorOutstandingRewardsCoins), ctx, val) -} - // MockAccountKeeper is a mock of AccountKeeper interface. type MockAccountKeeper struct { ctrl *gomock.Controller @@ -342,11 +292,12 @@ func (m *MockValidatorSet) EXPECT() *MockValidatorSetMockRecorder { } // Delegation mocks base method. -func (m *MockValidatorSet) Delegation(arg0 types.Context, arg1 types.AccAddress, arg2 types.ValAddress) types0.DelegationI { +func (m *MockValidatorSet) Delegation(arg0 context.Context, arg1 types.AccAddress, arg2 types.ValAddress) (types0.DelegationI, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Delegation", arg0, arg1, arg2) ret0, _ := ret[0].(types0.DelegationI) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // Delegation indicates an expected call of Delegation. @@ -355,10 +306,27 @@ func (mr *MockValidatorSetMockRecorder) Delegation(arg0, arg1, arg2 interface{}) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delegation", reflect.TypeOf((*MockValidatorSet)(nil).Delegation), arg0, arg1, arg2) } +// GetPubKeyByConsAddr mocks base method. +func (m *MockValidatorSet) GetPubKeyByConsAddr(arg0 context.Context, arg1 types.ConsAddress) (crypto.PublicKey, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetPubKeyByConsAddr", arg0, arg1) + ret0, _ := ret[0].(crypto.PublicKey) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetPubKeyByConsAddr indicates an expected call of GetPubKeyByConsAddr. +func (mr *MockValidatorSetMockRecorder) GetPubKeyByConsAddr(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPubKeyByConsAddr", reflect.TypeOf((*MockValidatorSet)(nil).GetPubKeyByConsAddr), arg0, arg1) +} + // IterateBondedValidatorsByPower mocks base method. -func (m *MockValidatorSet) IterateBondedValidatorsByPower(arg0 types.Context, arg1 func(int64, types0.ValidatorI) bool) { +func (m *MockValidatorSet) IterateBondedValidatorsByPower(arg0 context.Context, arg1 func(int64, types0.ValidatorI) bool) error { m.ctrl.T.Helper() - m.ctrl.Call(m, "IterateBondedValidatorsByPower", arg0, arg1) + ret := m.ctrl.Call(m, "IterateBondedValidatorsByPower", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 } // IterateBondedValidatorsByPower indicates an expected call of IterateBondedValidatorsByPower. @@ -368,9 +336,11 @@ func (mr *MockValidatorSetMockRecorder) IterateBondedValidatorsByPower(arg0, arg } // IterateLastValidators mocks base method. -func (m *MockValidatorSet) IterateLastValidators(arg0 types.Context, arg1 func(int64, types0.ValidatorI) bool) { +func (m *MockValidatorSet) IterateLastValidators(arg0 context.Context, arg1 func(int64, types0.ValidatorI) bool) error { m.ctrl.T.Helper() - m.ctrl.Call(m, "IterateLastValidators", arg0, arg1) + ret := m.ctrl.Call(m, "IterateLastValidators", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 } // IterateLastValidators indicates an expected call of IterateLastValidators. @@ -380,9 +350,11 @@ func (mr *MockValidatorSetMockRecorder) IterateLastValidators(arg0, arg1 interfa } // IterateValidators mocks base method. -func (m *MockValidatorSet) IterateValidators(arg0 types.Context, arg1 func(int64, types0.ValidatorI) bool) { +func (m *MockValidatorSet) IterateValidators(arg0 context.Context, arg1 func(int64, types0.ValidatorI) bool) error { m.ctrl.T.Helper() - m.ctrl.Call(m, "IterateValidators", arg0, arg1) + ret := m.ctrl.Call(m, "IterateValidators", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 } // IterateValidators indicates an expected call of IterateValidators. @@ -392,9 +364,11 @@ func (mr *MockValidatorSetMockRecorder) IterateValidators(arg0, arg1 interface{} } // Jail mocks base method. -func (m *MockValidatorSet) Jail(arg0 types.Context, arg1 types.ConsAddress) { +func (m *MockValidatorSet) Jail(arg0 context.Context, arg1 types.ConsAddress) error { m.ctrl.T.Helper() - m.ctrl.Call(m, "Jail", arg0, arg1) + ret := m.ctrl.Call(m, "Jail", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 } // Jail indicates an expected call of Jail. @@ -404,11 +378,12 @@ func (mr *MockValidatorSetMockRecorder) Jail(arg0, arg1 interface{}) *gomock.Cal } // MaxValidators mocks base method. -func (m *MockValidatorSet) MaxValidators(arg0 types.Context) uint32 { +func (m *MockValidatorSet) MaxValidators(arg0 context.Context) (uint32, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "MaxValidators", arg0) ret0, _ := ret[0].(uint32) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // MaxValidators indicates an expected call of MaxValidators. @@ -418,11 +393,12 @@ func (mr *MockValidatorSetMockRecorder) MaxValidators(arg0 interface{}) *gomock. } // Slash mocks base method. -func (m *MockValidatorSet) Slash(arg0 types.Context, arg1 types.ConsAddress, arg2, arg3 int64, arg4 math.LegacyDec) math.Int { +func (m *MockValidatorSet) Slash(arg0 context.Context, arg1 types.ConsAddress, arg2, arg3 int64, arg4 math.LegacyDec) (math.Int, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Slash", arg0, arg1, arg2, arg3, arg4) ret0, _ := ret[0].(math.Int) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // Slash indicates an expected call of Slash. @@ -432,11 +408,12 @@ func (mr *MockValidatorSetMockRecorder) Slash(arg0, arg1, arg2, arg3, arg4 inter } // SlashWithInfractionReason mocks base method. -func (m *MockValidatorSet) SlashWithInfractionReason(arg0 types.Context, arg1 types.ConsAddress, arg2, arg3 int64, arg4 math.LegacyDec, arg5 types0.Infraction) math.Int { +func (m *MockValidatorSet) SlashWithInfractionReason(arg0 context.Context, arg1 types.ConsAddress, arg2, arg3 int64, arg4 math.LegacyDec, arg5 types0.Infraction) (math.Int, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SlashWithInfractionReason", arg0, arg1, arg2, arg3, arg4, arg5) ret0, _ := ret[0].(math.Int) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // SlashWithInfractionReason indicates an expected call of SlashWithInfractionReason. @@ -446,11 +423,12 @@ func (mr *MockValidatorSetMockRecorder) SlashWithInfractionReason(arg0, arg1, ar } // StakingTokenSupply mocks base method. -func (m *MockValidatorSet) StakingTokenSupply(arg0 types.Context) math.Int { +func (m *MockValidatorSet) StakingTokenSupply(arg0 context.Context) (math.Int, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StakingTokenSupply", arg0) ret0, _ := ret[0].(math.Int) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // StakingTokenSupply indicates an expected call of StakingTokenSupply. @@ -460,11 +438,12 @@ func (mr *MockValidatorSetMockRecorder) StakingTokenSupply(arg0 interface{}) *go } // TotalBondedTokens mocks base method. -func (m *MockValidatorSet) TotalBondedTokens(arg0 types.Context) math.Int { +func (m *MockValidatorSet) TotalBondedTokens(arg0 context.Context) (math.Int, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TotalBondedTokens", arg0) ret0, _ := ret[0].(math.Int) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // TotalBondedTokens indicates an expected call of TotalBondedTokens. @@ -474,9 +453,11 @@ func (mr *MockValidatorSetMockRecorder) TotalBondedTokens(arg0 interface{}) *gom } // Unjail mocks base method. -func (m *MockValidatorSet) Unjail(arg0 types.Context, arg1 types.ConsAddress) { +func (m *MockValidatorSet) Unjail(arg0 context.Context, arg1 types.ConsAddress) error { m.ctrl.T.Helper() - m.ctrl.Call(m, "Unjail", arg0, arg1) + ret := m.ctrl.Call(m, "Unjail", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 } // Unjail indicates an expected call of Unjail. @@ -486,11 +467,12 @@ func (mr *MockValidatorSetMockRecorder) Unjail(arg0, arg1 interface{}) *gomock.C } // Validator mocks base method. -func (m *MockValidatorSet) Validator(arg0 types.Context, arg1 types.ValAddress) types0.ValidatorI { +func (m *MockValidatorSet) Validator(arg0 context.Context, arg1 types.ValAddress) (types0.ValidatorI, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Validator", arg0, arg1) ret0, _ := ret[0].(types0.ValidatorI) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // Validator indicates an expected call of Validator. @@ -500,11 +482,12 @@ func (mr *MockValidatorSetMockRecorder) Validator(arg0, arg1 interface{}) *gomoc } // ValidatorByConsAddr mocks base method. -func (m *MockValidatorSet) ValidatorByConsAddr(arg0 types.Context, arg1 types.ConsAddress) types0.ValidatorI { +func (m *MockValidatorSet) ValidatorByConsAddr(arg0 context.Context, arg1 types.ConsAddress) (types0.ValidatorI, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ValidatorByConsAddr", arg0, arg1) ret0, _ := ret[0].(types0.ValidatorI) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // ValidatorByConsAddr indicates an expected call of ValidatorByConsAddr. @@ -551,9 +534,11 @@ func (mr *MockDelegationSetMockRecorder) GetValidatorSet() *gomock.Call { } // IterateDelegations mocks base method. -func (m *MockDelegationSet) IterateDelegations(ctx types.Context, delegator types.AccAddress, fn func(int64, types0.DelegationI) bool) { +func (m *MockDelegationSet) IterateDelegations(ctx context.Context, delegator types.AccAddress, fn func(int64, types0.DelegationI) bool) error { m.ctrl.T.Helper() - m.ctrl.Call(m, "IterateDelegations", ctx, delegator, fn) + ret := m.ctrl.Call(m, "IterateDelegations", ctx, delegator, fn) + ret0, _ := ret[0].(error) + return ret0 } // IterateDelegations indicates an expected call of IterateDelegations. @@ -586,7 +571,7 @@ func (m *MockStakingHooks) EXPECT() *MockStakingHooksMockRecorder { } // AfterDelegationModified mocks base method. -func (m *MockStakingHooks) AfterDelegationModified(ctx types.Context, delAddr types.AccAddress, valAddr types.ValAddress) error { +func (m *MockStakingHooks) AfterDelegationModified(ctx context.Context, delAddr types.AccAddress, valAddr types.ValAddress) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AfterDelegationModified", ctx, delAddr, valAddr) ret0, _ := ret[0].(error) @@ -600,7 +585,7 @@ func (mr *MockStakingHooksMockRecorder) AfterDelegationModified(ctx, delAddr, va } // AfterUnbondingInitiated mocks base method. -func (m *MockStakingHooks) AfterUnbondingInitiated(ctx types.Context, id uint64) error { +func (m *MockStakingHooks) AfterUnbondingInitiated(ctx context.Context, id uint64) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AfterUnbondingInitiated", ctx, id) ret0, _ := ret[0].(error) @@ -614,7 +599,7 @@ func (mr *MockStakingHooksMockRecorder) AfterUnbondingInitiated(ctx, id interfac } // AfterValidatorBeginUnbonding mocks base method. -func (m *MockStakingHooks) AfterValidatorBeginUnbonding(ctx types.Context, consAddr types.ConsAddress, valAddr types.ValAddress) error { +func (m *MockStakingHooks) AfterValidatorBeginUnbonding(ctx context.Context, consAddr types.ConsAddress, valAddr types.ValAddress) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AfterValidatorBeginUnbonding", ctx, consAddr, valAddr) ret0, _ := ret[0].(error) @@ -628,7 +613,7 @@ func (mr *MockStakingHooksMockRecorder) AfterValidatorBeginUnbonding(ctx, consAd } // AfterValidatorBonded mocks base method. -func (m *MockStakingHooks) AfterValidatorBonded(ctx types.Context, consAddr types.ConsAddress, valAddr types.ValAddress) error { +func (m *MockStakingHooks) AfterValidatorBonded(ctx context.Context, consAddr types.ConsAddress, valAddr types.ValAddress) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AfterValidatorBonded", ctx, consAddr, valAddr) ret0, _ := ret[0].(error) @@ -642,7 +627,7 @@ func (mr *MockStakingHooksMockRecorder) AfterValidatorBonded(ctx, consAddr, valA } // AfterValidatorCreated mocks base method. -func (m *MockStakingHooks) AfterValidatorCreated(ctx types.Context, valAddr types.ValAddress) error { +func (m *MockStakingHooks) AfterValidatorCreated(ctx context.Context, valAddr types.ValAddress) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AfterValidatorCreated", ctx, valAddr) ret0, _ := ret[0].(error) @@ -656,7 +641,7 @@ func (mr *MockStakingHooksMockRecorder) AfterValidatorCreated(ctx, valAddr inter } // AfterValidatorRemoved mocks base method. -func (m *MockStakingHooks) AfterValidatorRemoved(ctx types.Context, consAddr types.ConsAddress, valAddr types.ValAddress) error { +func (m *MockStakingHooks) AfterValidatorRemoved(ctx context.Context, consAddr types.ConsAddress, valAddr types.ValAddress) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AfterValidatorRemoved", ctx, consAddr, valAddr) ret0, _ := ret[0].(error) @@ -670,7 +655,7 @@ func (mr *MockStakingHooksMockRecorder) AfterValidatorRemoved(ctx, consAddr, val } // BeforeDelegationCreated mocks base method. -func (m *MockStakingHooks) BeforeDelegationCreated(ctx types.Context, delAddr types.AccAddress, valAddr types.ValAddress) error { +func (m *MockStakingHooks) BeforeDelegationCreated(ctx context.Context, delAddr types.AccAddress, valAddr types.ValAddress) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "BeforeDelegationCreated", ctx, delAddr, valAddr) ret0, _ := ret[0].(error) @@ -684,7 +669,7 @@ func (mr *MockStakingHooksMockRecorder) BeforeDelegationCreated(ctx, delAddr, va } // BeforeDelegationRemoved mocks base method. -func (m *MockStakingHooks) BeforeDelegationRemoved(ctx types.Context, delAddr types.AccAddress, valAddr types.ValAddress) error { +func (m *MockStakingHooks) BeforeDelegationRemoved(ctx context.Context, delAddr types.AccAddress, valAddr types.ValAddress) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "BeforeDelegationRemoved", ctx, delAddr, valAddr) ret0, _ := ret[0].(error) @@ -698,7 +683,7 @@ func (mr *MockStakingHooksMockRecorder) BeforeDelegationRemoved(ctx, delAddr, va } // BeforeDelegationSharesModified mocks base method. -func (m *MockStakingHooks) BeforeDelegationSharesModified(ctx types.Context, delAddr types.AccAddress, valAddr types.ValAddress) error { +func (m *MockStakingHooks) BeforeDelegationSharesModified(ctx context.Context, delAddr types.AccAddress, valAddr types.ValAddress) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "BeforeDelegationSharesModified", ctx, delAddr, valAddr) ret0, _ := ret[0].(error) @@ -712,7 +697,7 @@ func (mr *MockStakingHooksMockRecorder) BeforeDelegationSharesModified(ctx, delA } // BeforeValidatorModified mocks base method. -func (m *MockStakingHooks) BeforeValidatorModified(ctx types.Context, valAddr types.ValAddress) error { +func (m *MockStakingHooks) BeforeValidatorModified(ctx context.Context, valAddr types.ValAddress) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "BeforeValidatorModified", ctx, valAddr) ret0, _ := ret[0].(error) @@ -726,7 +711,7 @@ func (mr *MockStakingHooksMockRecorder) BeforeValidatorModified(ctx, valAddr int } // BeforeValidatorSlashed mocks base method. -func (m *MockStakingHooks) BeforeValidatorSlashed(ctx types.Context, valAddr types.ValAddress, fraction math.LegacyDec) error { +func (m *MockStakingHooks) BeforeValidatorSlashed(ctx context.Context, valAddr types.ValAddress, fraction math.LegacyDec) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "BeforeValidatorSlashed", ctx, valAddr, fraction) ret0, _ := ret[0].(error) diff --git a/x/staking/testutil/helpers.go b/x/staking/testutil/helpers.go index a7a2298d039b..515eb36e09ee 100644 --- a/x/staking/testutil/helpers.go +++ b/x/staking/testutil/helpers.go @@ -5,9 +5,10 @@ import ( "testing" "time" - "cosmossdk.io/math" "github.com/stretchr/testify/require" + "cosmossdk.io/math" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking/keeper" @@ -50,7 +51,7 @@ func (sh *Helper) CreateValidatorWithValPower(addr sdk.ValAddress, pk cryptotype // CreateValidatorMsg returns a message used to create validator in this service. func (sh *Helper) CreateValidatorMsg(addr sdk.ValAddress, pk cryptotypes.PubKey, stakeAmount math.Int) *stakingtypes.MsgCreateValidator { coin := sdk.NewCoin(sh.Denom, stakeAmount) - msg, err := stakingtypes.NewMsgCreateValidator(addr, pk, coin, stakingtypes.Description{}, sh.Commission, math.OneInt()) + msg, err := stakingtypes.NewMsgCreateValidator(addr.String(), pk, coin, stakingtypes.Description{}, sh.Commission, math.OneInt()) require.NoError(sh.t, err) return msg } @@ -61,7 +62,7 @@ func (sh *Helper) CreateValidatorWithMsg(ctx context.Context, msg *stakingtypes. } func (sh *Helper) createValidator(addr sdk.ValAddress, pk cryptotypes.PubKey, coin sdk.Coin, ok bool) { - msg, err := stakingtypes.NewMsgCreateValidator(addr, pk, coin, stakingtypes.Description{Moniker: "TestValidator"}, sh.Commission, math.OneInt()) + msg, err := stakingtypes.NewMsgCreateValidator(addr.String(), pk, coin, stakingtypes.Description{Moniker: "TestValidator"}, sh.Commission, math.OneInt()) require.NoError(sh.t, err) res, err := sh.msgSrvr.CreateValidator(sh.Ctx, msg) if ok { @@ -76,7 +77,7 @@ func (sh *Helper) createValidator(addr sdk.ValAddress, pk cryptotypes.PubKey, co // Delegate calls staking module staking module `MsgServer/Delegate` to delegate stake for a validator func (sh *Helper) Delegate(delegator sdk.AccAddress, val sdk.ValAddress, amount math.Int) { coin := sdk.NewCoin(sh.Denom, amount) - msg := stakingtypes.NewMsgDelegate(delegator, val, coin) + msg := stakingtypes.NewMsgDelegate(delegator.String(), val.String(), coin) res, err := sh.msgSrvr.Delegate(sh.Ctx, msg) require.NoError(sh.t, err) require.NotNil(sh.t, res) @@ -85,7 +86,7 @@ func (sh *Helper) Delegate(delegator sdk.AccAddress, val sdk.ValAddress, amount // DelegateWithPower calls staking module `MsgServer/Delegate` to delegate stake for a validator func (sh *Helper) DelegateWithPower(delegator sdk.AccAddress, val sdk.ValAddress, power int64) { coin := sdk.NewCoin(sh.Denom, sh.k.TokensFromConsensusPower(sh.Ctx, power)) - msg := stakingtypes.NewMsgDelegate(delegator, val, coin) + msg := stakingtypes.NewMsgDelegate(delegator.String(), val.String(), coin) res, err := sh.msgSrvr.Delegate(sh.Ctx, msg) require.NoError(sh.t, err) require.NotNil(sh.t, res) @@ -94,7 +95,7 @@ func (sh *Helper) DelegateWithPower(delegator sdk.AccAddress, val sdk.ValAddress // Undelegate calls staking module `MsgServer/Undelegate` to unbound some stake from a validator. func (sh *Helper) Undelegate(delegator sdk.AccAddress, val sdk.ValAddress, amount math.Int, ok bool) { unbondAmt := sdk.NewCoin(sh.Denom, amount) - msg := stakingtypes.NewMsgUndelegate(delegator, val, unbondAmt) + msg := stakingtypes.NewMsgUndelegate(delegator.String(), val.String(), unbondAmt) res, err := sh.msgSrvr.Undelegate(sh.Ctx, msg) if ok { require.NoError(sh.t, err) @@ -108,8 +109,8 @@ func (sh *Helper) Undelegate(delegator sdk.AccAddress, val sdk.ValAddress, amoun // CheckValidator asserts that a validor exists and has a given status (if status!="") // and if has a right jailed flag. func (sh *Helper) CheckValidator(addr sdk.ValAddress, status stakingtypes.BondStatus, jailed bool) stakingtypes.Validator { - v, ok := sh.k.GetValidator(sh.Ctx, addr) - require.True(sh.t, ok) + v, err := sh.k.GetValidator(sh.Ctx, addr) + require.NoError(sh.t, err) require.Equal(sh.t, jailed, v.Jailed, "wrong Jalied status") if status >= 0 { require.Equal(sh.t, status, v.Status) @@ -126,7 +127,8 @@ func (sh *Helper) CheckDelegator(delegator sdk.AccAddress, val sdk.ValAddress, f // TurnBlock calls EndBlocker and updates the block time func (sh *Helper) TurnBlock(newTime time.Time) sdk.Context { sh.Ctx = sh.Ctx.WithBlockTime(newTime) - sh.k.EndBlocker(sh.Ctx) + _, err := sh.k.EndBlocker(sh.Ctx) + require.NoError(sh.t, err) return sh.Ctx } @@ -134,7 +136,8 @@ func (sh *Helper) TurnBlock(newTime time.Time) sdk.Context { // duration to the current block time func (sh *Helper) TurnBlockTimeDiff(diff time.Duration) sdk.Context { sh.Ctx = sh.Ctx.WithBlockTime(sh.Ctx.BlockHeader().Time.Add(diff)) - sh.k.EndBlocker(sh.Ctx) + _, err := sh.k.EndBlocker(sh.Ctx) + require.NoError(sh.t, err) return sh.Ctx } diff --git a/x/staking/testutil/validator.go b/x/staking/testutil/validator.go index 216d2fa31f44..b8c40beaba55 100644 --- a/x/staking/testutil/validator.go +++ b/x/staking/testutil/validator.go @@ -11,8 +11,9 @@ import ( ) // NewValidator is a testing helper method to create validators in tests -func NewValidator(t testing.TB, operator sdk.ValAddress, pubKey cryptotypes.PubKey) types.Validator { - v, err := types.NewValidator(operator, pubKey, types.Description{}) - require.NoError(t, err) +func NewValidator(tb testing.TB, operator sdk.ValAddress, pubKey cryptotypes.PubKey) types.Validator { + tb.Helper() + v, err := types.NewValidator(operator.String(), pubKey, types.Description{}) + require.NoError(tb, err) return v } diff --git a/x/staking/types/authz_test.go b/x/staking/types/authz_test.go index 246fbc267523..ab382d8cf5e6 100644 --- a/x/staking/types/authz_test.go +++ b/x/staking/types/authz_test.go @@ -73,7 +73,7 @@ func TestAuthzAuthorizations(t *testing.T) { []sdk.ValAddress{}, stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_DELEGATE, &coin100, - stakingtypes.NewMsgDelegate(delAddr, val1, coin100), + stakingtypes.NewMsgDelegate(delAddr.String(), val1.String(), coin100), false, true, nil, @@ -84,7 +84,7 @@ func TestAuthzAuthorizations(t *testing.T) { []sdk.ValAddress{}, stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_DELEGATE, &coin100, - stakingtypes.NewMsgDelegate(delAddr, val1, coin150), + stakingtypes.NewMsgDelegate(delAddr.String(), val1.String(), coin150), true, false, nil, @@ -95,7 +95,7 @@ func TestAuthzAuthorizations(t *testing.T) { []sdk.ValAddress{}, stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_DELEGATE, &coin100, - stakingtypes.NewMsgDelegate(delAddr, val1, coin50), + stakingtypes.NewMsgDelegate(delAddr.String(), val1.String(), coin50), false, false, &stakingtypes.StakeAuthorization{ @@ -110,7 +110,7 @@ func TestAuthzAuthorizations(t *testing.T) { []sdk.ValAddress{}, stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_DELEGATE, &coin100, - stakingtypes.NewMsgDelegate(delAddr, val3, coin100), + stakingtypes.NewMsgDelegate(delAddr.String(), val3.String(), coin100), true, false, nil, @@ -121,7 +121,7 @@ func TestAuthzAuthorizations(t *testing.T) { []sdk.ValAddress{}, stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_DELEGATE, nil, - stakingtypes.NewMsgDelegate(delAddr, val2, coin100), + stakingtypes.NewMsgDelegate(delAddr.String(), val2.String(), coin100), false, false, &stakingtypes.StakeAuthorization{ @@ -136,7 +136,7 @@ func TestAuthzAuthorizations(t *testing.T) { []sdk.ValAddress{val1}, stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_DELEGATE, nil, - stakingtypes.NewMsgDelegate(delAddr, val1, coin100), + stakingtypes.NewMsgDelegate(delAddr.String(), val1.String(), coin100), true, false, nil, @@ -147,7 +147,7 @@ func TestAuthzAuthorizations(t *testing.T) { []sdk.ValAddress{val1}, stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_DELEGATE, nil, - stakingtypes.NewMsgDelegate(delAddr, val2, coin100), + stakingtypes.NewMsgDelegate(delAddr.String(), val2.String(), coin100), false, false, &stakingtypes.StakeAuthorization{ @@ -162,7 +162,7 @@ func TestAuthzAuthorizations(t *testing.T) { []sdk.ValAddress{}, stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_UNDELEGATE, &coin100, - stakingtypes.NewMsgUndelegate(delAddr, val1, coin100), + stakingtypes.NewMsgUndelegate(delAddr.String(), val1.String(), coin100), false, true, nil, @@ -173,7 +173,7 @@ func TestAuthzAuthorizations(t *testing.T) { []sdk.ValAddress{}, stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_UNDELEGATE, &coin100, - stakingtypes.NewMsgUndelegate(delAddr, val1, coin50), + stakingtypes.NewMsgUndelegate(delAddr.String(), val1.String(), coin50), false, false, &stakingtypes.StakeAuthorization{ @@ -188,7 +188,7 @@ func TestAuthzAuthorizations(t *testing.T) { []sdk.ValAddress{}, stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_UNDELEGATE, &coin100, - stakingtypes.NewMsgUndelegate(delAddr, val3, coin100), + stakingtypes.NewMsgUndelegate(delAddr.String(), val3.String(), coin100), true, false, nil, @@ -199,7 +199,7 @@ func TestAuthzAuthorizations(t *testing.T) { []sdk.ValAddress{}, stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_UNDELEGATE, nil, - stakingtypes.NewMsgUndelegate(delAddr, val2, coin100), + stakingtypes.NewMsgUndelegate(delAddr.String(), val2.String(), coin100), false, false, &stakingtypes.StakeAuthorization{ @@ -214,7 +214,7 @@ func TestAuthzAuthorizations(t *testing.T) { []sdk.ValAddress{val1}, stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_UNDELEGATE, &coin100, - stakingtypes.NewMsgUndelegate(delAddr, val1, coin100), + stakingtypes.NewMsgUndelegate(delAddr.String(), val1.String(), coin100), true, false, nil, @@ -226,7 +226,7 @@ func TestAuthzAuthorizations(t *testing.T) { []sdk.ValAddress{}, stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_REDELEGATE, &coin100, - stakingtypes.NewMsgUndelegate(delAddr, val1, coin100), + stakingtypes.NewMsgUndelegate(delAddr.String(), val1.String(), coin100), false, true, nil, @@ -237,7 +237,7 @@ func TestAuthzAuthorizations(t *testing.T) { []sdk.ValAddress{}, stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_REDELEGATE, &coin100, - stakingtypes.NewMsgBeginRedelegate(delAddr, val1, val1, coin50), + stakingtypes.NewMsgBeginRedelegate(delAddr.String(), val1.String(), val1.String(), coin50), false, false, &stakingtypes.StakeAuthorization{ @@ -252,7 +252,7 @@ func TestAuthzAuthorizations(t *testing.T) { []sdk.ValAddress{}, stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_REDELEGATE, &coin100, - stakingtypes.NewMsgBeginRedelegate(delAddr, val3, val3, coin100), + stakingtypes.NewMsgBeginRedelegate(delAddr.String(), val3.String(), val3.String(), coin100), true, false, nil, @@ -263,7 +263,7 @@ func TestAuthzAuthorizations(t *testing.T) { []sdk.ValAddress{}, stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_REDELEGATE, nil, - stakingtypes.NewMsgBeginRedelegate(delAddr, val2, val2, coin100), + stakingtypes.NewMsgBeginRedelegate(delAddr.String(), val2.String(), val2.String(), coin100), false, false, &stakingtypes.StakeAuthorization{ @@ -278,7 +278,7 @@ func TestAuthzAuthorizations(t *testing.T) { []sdk.ValAddress{val1}, stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_REDELEGATE, &coin100, - stakingtypes.NewMsgBeginRedelegate(delAddr, val1, val1, coin100), + stakingtypes.NewMsgBeginRedelegate(delAddr.String(), val1.String(), val1.String(), coin100), true, false, nil, @@ -289,7 +289,7 @@ func TestAuthzAuthorizations(t *testing.T) { []sdk.ValAddress{}, stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION, &coin100, - stakingtypes.NewMsgCancelUnbondingDelegation(delAddr, val1, ctx.HeaderInfo().Height, coin100), + stakingtypes.NewMsgCancelUnbondingDelegation(delAddr.String(), val1.String(), ctx.HeaderInfo().Height, coin100), false, true, nil, @@ -300,7 +300,7 @@ func TestAuthzAuthorizations(t *testing.T) { []sdk.ValAddress{}, stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION, &coin100, - stakingtypes.NewMsgCancelUnbondingDelegation(delAddr, val1, ctx.HeaderInfo().Height, coin50), + stakingtypes.NewMsgCancelUnbondingDelegation(delAddr.String(), val1.String(), ctx.HeaderInfo().Height, coin50), false, false, &stakingtypes.StakeAuthorization{ @@ -317,7 +317,7 @@ func TestAuthzAuthorizations(t *testing.T) { []sdk.ValAddress{}, stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION, &coin100, - stakingtypes.NewMsgCancelUnbondingDelegation(delAddr, val3, ctx.HeaderInfo().Height, coin50), + stakingtypes.NewMsgCancelUnbondingDelegation(delAddr.String(), val3.String(), ctx.HeaderInfo().Height, coin50), true, false, nil, @@ -328,7 +328,7 @@ func TestAuthzAuthorizations(t *testing.T) { []sdk.ValAddress{}, stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION, nil, - stakingtypes.NewMsgCancelUnbondingDelegation(delAddr, val2, ctx.HeaderInfo().Height, coin100), + stakingtypes.NewMsgCancelUnbondingDelegation(delAddr.String(), val2.String(), ctx.HeaderInfo().Height, coin100), false, false, &stakingtypes.StakeAuthorization{ @@ -345,7 +345,7 @@ func TestAuthzAuthorizations(t *testing.T) { []sdk.ValAddress{val1}, stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION, &coin100, - stakingtypes.NewMsgCancelUnbondingDelegation(delAddr, val1, ctx.HeaderInfo().Height, coin100), + stakingtypes.NewMsgCancelUnbondingDelegation(delAddr.String(), val1.String(), ctx.HeaderInfo().Height, coin100), true, false, nil, diff --git a/x/staking/types/commission_test.go b/x/staking/types/commission_test.go index 17fa202fdf46..bf45ca8a9d89 100644 --- a/x/staking/types/commission_test.go +++ b/x/staking/types/commission_test.go @@ -4,10 +4,10 @@ import ( "testing" "time" - "cosmossdk.io/math" "github.com/stretchr/testify/require" - sdk "github.com/cosmos/cosmos-sdk/types" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/x/staking/types" ) @@ -17,19 +17,19 @@ func TestCommissionValidate(t *testing.T) { expectErr bool }{ // invalid commission; max rate < 0% - {types.NewCommission(math.LegacyZeroDec(), sdk.MustNewDecFromStr("-1.00"), math.LegacyZeroDec()), true}, + {types.NewCommission(math.LegacyZeroDec(), math.LegacyMustNewDecFromStr("-1.00"), math.LegacyZeroDec()), true}, // invalid commission; max rate > 100% - {types.NewCommission(math.LegacyZeroDec(), sdk.MustNewDecFromStr("2.00"), math.LegacyZeroDec()), true}, + {types.NewCommission(math.LegacyZeroDec(), math.LegacyMustNewDecFromStr("2.00"), math.LegacyZeroDec()), true}, // invalid commission; rate < 0% - {types.NewCommission(sdk.MustNewDecFromStr("-1.00"), math.LegacyZeroDec(), math.LegacyZeroDec()), true}, + {types.NewCommission(math.LegacyMustNewDecFromStr("-1.00"), math.LegacyZeroDec(), math.LegacyZeroDec()), true}, // invalid commission; rate > max rate - {types.NewCommission(sdk.MustNewDecFromStr("0.75"), sdk.MustNewDecFromStr("0.50"), math.LegacyZeroDec()), true}, + {types.NewCommission(math.LegacyMustNewDecFromStr("0.75"), math.LegacyMustNewDecFromStr("0.50"), math.LegacyZeroDec()), true}, // invalid commission; max change rate < 0% - {types.NewCommission(math.LegacyOneDec(), math.LegacyOneDec(), sdk.MustNewDecFromStr("-1.00")), true}, + {types.NewCommission(math.LegacyOneDec(), math.LegacyOneDec(), math.LegacyMustNewDecFromStr("-1.00")), true}, // invalid commission; max change rate > max rate - {types.NewCommission(math.LegacyOneDec(), sdk.MustNewDecFromStr("0.75"), sdk.MustNewDecFromStr("0.90")), true}, + {types.NewCommission(math.LegacyOneDec(), math.LegacyMustNewDecFromStr("0.75"), math.LegacyMustNewDecFromStr("0.90")), true}, // valid commission - {types.NewCommission(sdk.MustNewDecFromStr("0.20"), math.LegacyOneDec(), sdk.MustNewDecFromStr("0.10")), false}, + {types.NewCommission(math.LegacyMustNewDecFromStr("0.20"), math.LegacyOneDec(), math.LegacyMustNewDecFromStr("0.10")), false}, } for i, tc := range testCases { @@ -40,7 +40,7 @@ func TestCommissionValidate(t *testing.T) { func TestCommissionValidateNewRate(t *testing.T) { now := time.Now().UTC() - c1 := types.NewCommission(sdk.MustNewDecFromStr("0.40"), sdk.MustNewDecFromStr("0.80"), sdk.MustNewDecFromStr("0.10")) + c1 := types.NewCommission(math.LegacyMustNewDecFromStr("0.40"), math.LegacyMustNewDecFromStr("0.80"), math.LegacyMustNewDecFromStr("0.10")) c1.UpdateTime = now testCases := []struct { @@ -50,17 +50,17 @@ func TestCommissionValidateNewRate(t *testing.T) { expectErr bool }{ // invalid new commission rate; last update < 24h ago - {c1, sdk.MustNewDecFromStr("0.50"), now, true}, + {c1, math.LegacyMustNewDecFromStr("0.50"), now, true}, // invalid new commission rate; new rate < 0% - {c1, sdk.MustNewDecFromStr("-1.00"), now.Add(48 * time.Hour), true}, + {c1, math.LegacyMustNewDecFromStr("-1.00"), now.Add(48 * time.Hour), true}, // invalid new commission rate; new rate > max rate - {c1, sdk.MustNewDecFromStr("0.90"), now.Add(48 * time.Hour), true}, + {c1, math.LegacyMustNewDecFromStr("0.90"), now.Add(48 * time.Hour), true}, // invalid new commission rate; new rate > max change rate - {c1, sdk.MustNewDecFromStr("0.60"), now.Add(48 * time.Hour), true}, + {c1, math.LegacyMustNewDecFromStr("0.60"), now.Add(48 * time.Hour), true}, // valid commission - {c1, sdk.MustNewDecFromStr("0.50"), now.Add(48 * time.Hour), false}, + {c1, math.LegacyMustNewDecFromStr("0.50"), now.Add(48 * time.Hour), false}, // valid commission - {c1, sdk.MustNewDecFromStr("0.10"), now.Add(48 * time.Hour), false}, + {c1, math.LegacyMustNewDecFromStr("0.10"), now.Add(48 * time.Hour), false}, } for i, tc := range testCases { diff --git a/x/staking/types/delegation.go b/x/staking/types/delegation.go index 355ef50007b5..3284316246f8 100644 --- a/x/staking/types/delegation.go +++ b/x/staking/types/delegation.go @@ -5,7 +5,9 @@ import ( "strings" "time" + "cosmossdk.io/core/address" "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -14,10 +16,10 @@ import ( var _ DelegationI = Delegation{} // NewDelegation creates a new delegation object -func NewDelegation(delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress, shares math.LegacyDec) Delegation { +func NewDelegation(delegatorAddr, validatorAddr string, shares math.LegacyDec) Delegation { return Delegation{ - DelegatorAddress: delegatorAddr.String(), - ValidatorAddress: validatorAddr.String(), + DelegatorAddress: delegatorAddr, + ValidatorAddress: validatorAddr, Shares: shares, } } @@ -44,18 +46,12 @@ func UnmarshalDelegation(cdc codec.BinaryCodec, value []byte) (delegation Delega return delegation, err } -func (d Delegation) GetDelegatorAddr() sdk.AccAddress { - delAddr := sdk.MustAccAddressFromBech32(d.DelegatorAddress) - - return delAddr +func (d Delegation) GetDelegatorAddr() string { + return d.DelegatorAddress } -func (d Delegation) GetValidatorAddr() sdk.ValAddress { - addr, err := sdk.ValAddressFromBech32(d.ValidatorAddress) - if err != nil { - panic(err) - } - return addr +func (d Delegation) GetValidatorAddr() string { + return d.ValidatorAddress } func (d Delegation) GetShares() math.LegacyDec { return d.Shares } @@ -116,10 +112,19 @@ func UnmarshalUBDE(cdc codec.BinaryCodec, value []byte) (ubd UnbondingDelegation func NewUnbondingDelegation( delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress, creationHeight int64, minTime time.Time, balance math.Int, id uint64, + valAc, delAc address.Codec, ) UnbondingDelegation { + valAddr, err := valAc.BytesToString(validatorAddr) + if err != nil { + panic(err) + } + delAddr, err := delAc.BytesToString(delegatorAddr) + if err != nil { + panic(err) + } return UnbondingDelegation{ - DelegatorAddress: delegatorAddr.String(), - ValidatorAddress: validatorAddr.String(), + DelegatorAddress: delAddr, + ValidatorAddress: valAddr, Entries: []UnbondingDelegationEntry{ NewUnbondingDelegationEntry(creationHeight, minTime, balance, id), }, @@ -213,11 +218,25 @@ func (e RedelegationEntry) OnHold() bool { func NewRedelegation( delegatorAddr sdk.AccAddress, validatorSrcAddr, validatorDstAddr sdk.ValAddress, creationHeight int64, minTime time.Time, balance math.Int, sharesDst math.LegacyDec, id uint64, + valAc, delAc address.Codec, ) Redelegation { + valSrcAddr, err := valAc.BytesToString(validatorSrcAddr) + if err != nil { + panic(err) + } + valDstAddr, err := valAc.BytesToString(validatorDstAddr) + if err != nil { + panic(err) + } + delAddr, err := delAc.BytesToString(delegatorAddr) + if err != nil { + panic(err) + } + return Redelegation{ - DelegatorAddress: delegatorAddr.String(), - ValidatorSrcAddress: validatorSrcAddr.String(), - ValidatorDstAddress: validatorDstAddr.String(), + DelegatorAddress: delAddr, + ValidatorSrcAddress: valSrcAddr, + ValidatorDstAddress: valDstAddr, Entries: []RedelegationEntry{ NewRedelegationEntry(creationHeight, minTime, balance, sharesDst, id), }, @@ -272,7 +291,7 @@ func (d Redelegations) String() (out string) { // NewDelegationResp creates a new DelegationResponse instance func NewDelegationResp( - delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress, shares math.LegacyDec, balance sdk.Coin, + delegatorAddr, validatorAddr string, shares math.LegacyDec, balance sdk.Coin, ) DelegationResponse { return DelegationResponse{ Delegation: NewDelegation(delegatorAddr, validatorAddr, shares), @@ -308,13 +327,13 @@ func (d DelegationResponses) String() (out string) { // NewRedelegationResponse crates a new RedelegationEntryResponse instance. func NewRedelegationResponse( - delegatorAddr sdk.AccAddress, validatorSrc, validatorDst sdk.ValAddress, entries []RedelegationEntryResponse, + delegatorAddr, validatorSrc, validatorDst string, entries []RedelegationEntryResponse, ) RedelegationResponse { return RedelegationResponse{ Redelegation: Redelegation{ - DelegatorAddress: delegatorAddr.String(), - ValidatorSrcAddress: validatorSrc.String(), - ValidatorDstAddress: validatorDst.String(), + DelegatorAddress: delegatorAddr, + ValidatorSrcAddress: validatorSrc, + ValidatorDstAddress: validatorDst, }, Entries: entries, } diff --git a/x/staking/types/delegation_test.go b/x/staking/types/delegation_test.go index 6635cc179e87..3ce9d8b6c535 100644 --- a/x/staking/types/delegation_test.go +++ b/x/staking/types/delegation_test.go @@ -5,17 +5,19 @@ import ( "testing" "time" - "cosmossdk.io/math" "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/require" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/codec" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking/types" ) func TestDelegationEqual(t *testing.T) { - d1 := types.NewDelegation(sdk.AccAddress(valAddr1), valAddr2, math.LegacyNewDec(100)) + d1 := types.NewDelegation(sdk.AccAddress(valAddr1).String(), valAddr2.String(), math.LegacyNewDec(100)) d2 := d1 ok := d1.String() == d2.String() @@ -29,13 +31,13 @@ func TestDelegationEqual(t *testing.T) { } func TestDelegationString(t *testing.T) { - d := types.NewDelegation(sdk.AccAddress(valAddr1), valAddr2, math.LegacyNewDec(100)) + d := types.NewDelegation(sdk.AccAddress(valAddr1).String(), valAddr2.String(), math.LegacyNewDec(100)) require.NotEmpty(t, d.String()) } func TestUnbondingDelegationEqual(t *testing.T) { ubd1 := types.NewUnbondingDelegation(sdk.AccAddress(valAddr1), valAddr2, 0, - time.Unix(0, 0), math.NewInt(0), 1) + time.Unix(0, 0), math.NewInt(0), 1, addresscodec.NewBech32Codec("cosmosvaloper"), addresscodec.NewBech32Codec("cosmos")) ubd2 := ubd1 ok := ubd1.String() == ubd2.String() @@ -50,7 +52,7 @@ func TestUnbondingDelegationEqual(t *testing.T) { func TestUnbondingDelegationString(t *testing.T) { ubd := types.NewUnbondingDelegation(sdk.AccAddress(valAddr1), valAddr2, 0, - time.Unix(0, 0), math.NewInt(0), 1) + time.Unix(0, 0), math.NewInt(0), 1, addresscodec.NewBech32Codec("cosmosvaloper"), addresscodec.NewBech32Codec("cosmos")) require.NotEmpty(t, ubd.String()) } @@ -58,10 +60,10 @@ func TestUnbondingDelegationString(t *testing.T) { func TestRedelegationEqual(t *testing.T) { r1 := types.NewRedelegation(sdk.AccAddress(valAddr1), valAddr2, valAddr3, 0, time.Unix(0, 0), math.NewInt(0), - math.LegacyNewDec(0), 1) + math.LegacyNewDec(0), 1, addresscodec.NewBech32Codec("cosmosvaloper"), addresscodec.NewBech32Codec("cosmos")) r2 := types.NewRedelegation(sdk.AccAddress(valAddr1), valAddr2, valAddr3, 0, time.Unix(0, 0), math.NewInt(0), - math.LegacyNewDec(0), 1) + math.LegacyNewDec(0), 1, addresscodec.NewBech32Codec("cosmosvaloper"), addresscodec.NewBech32Codec("cosmos")) require.True(t, proto.Equal(&r1, &r2)) r2.Entries[0].SharesDst = math.LegacyNewDec(10) @@ -72,16 +74,16 @@ func TestRedelegationEqual(t *testing.T) { func TestRedelegationString(t *testing.T) { r := types.NewRedelegation(sdk.AccAddress(valAddr1), valAddr2, valAddr3, 0, time.Unix(0, 0), math.NewInt(0), - math.LegacyNewDec(10), 1) + math.LegacyNewDec(10), 1, addresscodec.NewBech32Codec("cosmosvaloper"), addresscodec.NewBech32Codec("cosmos")) require.NotEmpty(t, r.String()) } func TestDelegationResponses(t *testing.T) { cdc := codec.NewLegacyAmino() - dr1 := types.NewDelegationResp(sdk.AccAddress(valAddr1), valAddr2, math.LegacyNewDec(5), + dr1 := types.NewDelegationResp(sdk.AccAddress(valAddr1).String(), valAddr2.String(), math.LegacyNewDec(5), sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(5))) - dr2 := types.NewDelegationResp(sdk.AccAddress(valAddr1), valAddr3, math.LegacyNewDec(5), + dr2 := types.NewDelegationResp(sdk.AccAddress(valAddr1).String(), valAddr3.String(), math.LegacyNewDec(5), sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(5))) drs := types.DelegationResponses{dr1, dr2} @@ -112,8 +114,8 @@ func TestRedelegationResponses(t *testing.T) { types.NewRedelegationEntryResponse(0, time.Unix(0, 0), math.LegacyNewDec(5), math.NewInt(5), math.NewInt(5), 0), types.NewRedelegationEntryResponse(0, time.Unix(0, 0), math.LegacyNewDec(5), math.NewInt(5), math.NewInt(5), 0), } - rdr1 := types.NewRedelegationResponse(sdk.AccAddress(valAddr1), valAddr2, valAddr3, entries) - rdr2 := types.NewRedelegationResponse(sdk.AccAddress(valAddr2), valAddr1, valAddr3, entries) + rdr1 := types.NewRedelegationResponse(sdk.AccAddress(valAddr1).String(), valAddr2.String(), valAddr3.String(), entries) + rdr2 := types.NewRedelegationResponse(sdk.AccAddress(valAddr2).String(), valAddr1.String(), valAddr3.String(), entries) rdrs := types.RedelegationResponses{rdr1, rdr2} bz1, err := json.Marshal(rdr1) diff --git a/x/staking/types/errors.go b/x/staking/types/errors.go index ee1750c22368..00441564352a 100644 --- a/x/staking/types/errors.go +++ b/x/staking/types/errors.go @@ -3,11 +3,6 @@ package types import "cosmossdk.io/errors" // x/staking module sentinel errors -// -// TODO: Many of these errors are redundant. They should be removed and replaced -// by sdkerrors.ErrInvalidRequest. -// -// REF: https://github.com/cosmos/cosmos-sdk/issues/5450 var ( ErrEmptyValidatorAddr = errors.Register(ModuleName, 2, "empty validator address") ErrNoValidatorFound = errors.Register(ModuleName, 3, "validator does not exist") @@ -50,4 +45,7 @@ var ( ErrCommissionLTMinRate = errors.Register(ModuleName, 40, "commission cannot be less than min rate") ErrUnbondingNotFound = errors.Register(ModuleName, 41, "unbonding operation not found") ErrUnbondingOnHoldRefCountNegative = errors.Register(ModuleName, 42, "cannot un-hold unbonding operation that is not on hold") + ErrInvalidSigner = errors.Register(ModuleName, 43, "expected authority account as only signer for proposal message") + ErrBadRedelegationSrc = errors.Register(ModuleName, 44, "redelegation source validator not found") + ErrNoUnbondingType = errors.Register(ModuleName, 45, "unbonding type not found") ) diff --git a/x/staking/types/expected_keepers.go b/x/staking/types/expected_keepers.go index a7ef4ab37ce5..96f816a5acb1 100644 --- a/x/staking/types/expected_keepers.go +++ b/x/staking/types/expected_keepers.go @@ -3,18 +3,14 @@ package types import ( context "context" + cmtprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto" + "cosmossdk.io/core/address" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" ) -// DistributionKeeper expected distribution keeper (noalias) -type DistributionKeeper interface { - GetFeePoolCommunityCoins(ctx context.Context) sdk.DecCoins - GetValidatorOutstandingRewardsCoins(ctx context.Context, val sdk.ValAddress) sdk.DecCoins -} - // AccountKeeper defines the expected account keeper (noalias) type AccountKeeper interface { AddressCodec() address.Codec @@ -48,34 +44,38 @@ type BankKeeper interface { // ValidatorSet expected properties for the set of all validators (noalias) type ValidatorSet interface { // iterate through validators by operator address, execute func for each validator - IterateValidators(sdk.Context, - func(index int64, validator ValidatorI) (stop bool)) + IterateValidators(context.Context, + func(index int64, validator ValidatorI) (stop bool)) error // iterate through bonded validators by operator address, execute func for each validator - IterateBondedValidatorsByPower(sdk.Context, - func(index int64, validator ValidatorI) (stop bool)) + IterateBondedValidatorsByPower(context.Context, + func(index int64, validator ValidatorI) (stop bool)) error // iterate through the consensus validator set of the last block by operator address, execute func for each validator - IterateLastValidators(sdk.Context, - func(index int64, validator ValidatorI) (stop bool)) + IterateLastValidators(context.Context, + func(index int64, validator ValidatorI) (stop bool)) error - Validator(sdk.Context, sdk.ValAddress) ValidatorI // get a particular validator by operator address - ValidatorByConsAddr(sdk.Context, sdk.ConsAddress) ValidatorI // get a particular validator by consensus address - TotalBondedTokens(sdk.Context) math.Int // total bonded tokens within the validator set - StakingTokenSupply(sdk.Context) math.Int // total staking token supply + Validator(context.Context, sdk.ValAddress) (ValidatorI, error) // get a particular validator by operator address + ValidatorByConsAddr(context.Context, sdk.ConsAddress) (ValidatorI, error) // get a particular validator by consensus address + TotalBondedTokens(context.Context) (math.Int, error) // total bonded tokens within the validator set + StakingTokenSupply(context.Context) (math.Int, error) // total staking token supply // slash the validator and delegators of the validator, specifying offense height, offense power, and slash fraction - Slash(sdk.Context, sdk.ConsAddress, int64, int64, math.LegacyDec) math.Int - SlashWithInfractionReason(sdk.Context, sdk.ConsAddress, int64, int64, math.LegacyDec, Infraction) math.Int - Jail(sdk.Context, sdk.ConsAddress) // jail a validator - Unjail(sdk.Context, sdk.ConsAddress) // unjail a validator + Slash(context.Context, sdk.ConsAddress, int64, int64, math.LegacyDec) (math.Int, error) + SlashWithInfractionReason(context.Context, sdk.ConsAddress, int64, int64, math.LegacyDec, Infraction) (math.Int, error) + Jail(context.Context, sdk.ConsAddress) error // jail a validator + Unjail(context.Context, sdk.ConsAddress) error // unjail a validator // Delegation allows for getting a particular delegation for a given validator // and delegator outside the scope of the staking module. - Delegation(sdk.Context, sdk.AccAddress, sdk.ValAddress) DelegationI + Delegation(context.Context, sdk.AccAddress, sdk.ValAddress) (DelegationI, error) // MaxValidators returns the maximum amount of bonded validators - MaxValidators(sdk.Context) uint32 + MaxValidators(context.Context) (uint32, error) + + // GetPubKeyByConsAddr returns the consensus public key for a validator. Used in vote + // extension validation. + GetPubKeyByConsAddr(context.Context, sdk.ConsAddress) (cmtprotocrypto.PublicKey, error) } // DelegationSet expected properties for the set of all delegations for a particular (noalias) @@ -84,8 +84,8 @@ type DelegationSet interface { // iterate through all delegations from one delegator by validator-AccAddress, // execute func for each validator - IterateDelegations(ctx sdk.Context, delegator sdk.AccAddress, - fn func(index int64, delegation DelegationI) (stop bool)) + IterateDelegations(ctx context.Context, delegator sdk.AccAddress, + fn func(index int64, delegation DelegationI) (stop bool)) error } // Event Hooks @@ -96,19 +96,19 @@ type DelegationSet interface { // StakingHooks event hooks for staking validator object (noalias) type StakingHooks interface { - AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) error // Must be called when a validator is created - BeforeValidatorModified(ctx sdk.Context, valAddr sdk.ValAddress) error // Must be called when a validator's state changes - AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error // Must be called when a validator is deleted - - AfterValidatorBonded(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error // Must be called when a validator is bonded - AfterValidatorBeginUnbonding(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error // Must be called when a validator begins unbonding - - BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error // Must be called when a delegation is created - BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error // Must be called when a delegation's shares are modified - BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error // Must be called when a delegation is removed - AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error - BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction math.LegacyDec) error - AfterUnbondingInitiated(ctx sdk.Context, id uint64) error + AfterValidatorCreated(ctx context.Context, valAddr sdk.ValAddress) error // Must be called when a validator is created + BeforeValidatorModified(ctx context.Context, valAddr sdk.ValAddress) error // Must be called when a validator's state changes + AfterValidatorRemoved(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error // Must be called when a validator is deleted + + AfterValidatorBonded(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error // Must be called when a validator is bonded + AfterValidatorBeginUnbonding(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error // Must be called when a validator begins unbonding + + BeforeDelegationCreated(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error // Must be called when a delegation is created + BeforeDelegationSharesModified(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error // Must be called when a delegation's shares are modified + BeforeDelegationRemoved(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error // Must be called when a delegation is removed + AfterDelegationModified(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error + BeforeValidatorSlashed(ctx context.Context, valAddr sdk.ValAddress, fraction math.LegacyDec) error + AfterUnbondingInitiated(ctx context.Context, id uint64) error } // StakingHooksWrapper is a wrapper for modules to inject StakingHooks using depinject. diff --git a/x/staking/types/exported.go b/x/staking/types/exported.go index a1f73d409430..2cdf70629e80 100644 --- a/x/staking/types/exported.go +++ b/x/staking/types/exported.go @@ -1,18 +1,18 @@ package types import ( - "cosmossdk.io/math" cmtprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto" + "cosmossdk.io/math" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - sdk "github.com/cosmos/cosmos-sdk/types" ) // DelegationI delegation bond for a delegated proof of stake system type DelegationI interface { - GetDelegatorAddr() sdk.AccAddress // delegator sdk.AccAddress for the bond - GetValidatorAddr() sdk.ValAddress // validator operator address - GetShares() math.LegacyDec // amount of validator's shares held in this delegation + GetDelegatorAddr() string // delegator string for the bond + GetValidatorAddr() string // validator operator address + GetShares() math.LegacyDec // amount of validator's shares held in this delegation } // ValidatorI expected validator functions @@ -23,10 +23,10 @@ type ValidatorI interface { IsBonded() bool // check if has a bonded status IsUnbonded() bool // check if has status unbonded IsUnbonding() bool // check if has status unbonding - GetOperator() sdk.ValAddress // operator address to receive/return validators coins + GetOperator() string // operator address to receive/return validators coins ConsPubKey() (cryptotypes.PubKey, error) // validation consensus pubkey (cryptotypes.PubKey) TmConsPublicKey() (cmtprotocrypto.PublicKey, error) // validation consensus pubkey (CometBFT) - GetConsAddr() (sdk.ConsAddress, error) // validation consensus address + GetConsAddr() ([]byte, error) // validation consensus address GetTokens() math.Int // validation tokens GetBondedTokens() math.Int // validator bonded tokens GetConsensusPower(math.Int) int64 // validation power in CometBFT diff --git a/x/staking/types/genesis.pb.go b/x/staking/types/genesis.pb.go index fc9b8d48a237..f11448eaa9f7 100644 --- a/x/staking/types/genesis.pb.go +++ b/x/staking/types/genesis.pb.go @@ -4,9 +4,9 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" _ "github.com/cosmos/cosmos-proto" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" @@ -32,7 +32,7 @@ type GenesisState struct { Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` // last_total_power tracks the total amounts of bonded tokens recorded during // the previous end block. - LastTotalPower github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=last_total_power,json=lastTotalPower,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"last_total_power"` + LastTotalPower cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=last_total_power,json=lastTotalPower,proto3,customtype=cosmossdk.io/math.Int" json:"last_total_power"` // last_validator_powers is a special index that provides a historical list // of the last-block's bonded validators. LastValidatorPowers []LastValidatorPower `protobuf:"bytes,3,rep,name=last_validator_powers,json=lastValidatorPowers,proto3" json:"last_validator_powers"` @@ -44,7 +44,8 @@ type GenesisState struct { UnbondingDelegations []UnbondingDelegation `protobuf:"bytes,6,rep,name=unbonding_delegations,json=unbondingDelegations,proto3" json:"unbonding_delegations"` // redelegations defines the redelegations active at genesis. Redelegations []Redelegation `protobuf:"bytes,7,rep,name=redelegations,proto3" json:"redelegations"` - Exported bool `protobuf:"varint,8,opt,name=exported,proto3" json:"exported,omitempty"` + // exported defines a bool to identify whether the chain dealing with exported or initialized genesis. + Exported bool `protobuf:"varint,8,opt,name=exported,proto3" json:"exported,omitempty"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -180,39 +181,40 @@ func init() { } var fileDescriptor_9b3dec8894f2831b = []byte{ - // 503 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0x31, 0x6f, 0xd3, 0x40, - 0x1c, 0xc5, 0x6d, 0x42, 0xd2, 0xf4, 0x52, 0x10, 0x1c, 0x29, 0x32, 0x19, 0x9c, 0x10, 0x55, 0x28, - 0x2a, 0xd4, 0x56, 0xd3, 0x8d, 0xad, 0x11, 0x02, 0x21, 0x55, 0xa2, 0x72, 0x29, 0x03, 0x12, 0x8a, - 0x2e, 0xf5, 0xc9, 0x3d, 0xc5, 0xb9, 0xb3, 0x7c, 0xff, 0x94, 0xf2, 0x0d, 0x18, 0x99, 0x99, 0x3a, - 0x32, 0x32, 0xf0, 0x21, 0x3a, 0x56, 0x4c, 0x88, 0xa1, 0x42, 0xc9, 0x00, 0x1f, 0x03, 0xf9, 0xce, - 0x31, 0x87, 0x52, 0x77, 0x49, 0x7c, 0xfe, 0xbf, 0xf7, 0x7b, 0x4f, 0xf2, 0xff, 0xd0, 0xc6, 0x91, - 0x90, 0x13, 0x21, 0x7d, 0x09, 0x64, 0xcc, 0x78, 0xe4, 0x9f, 0x6c, 0x8f, 0x28, 0x90, 0x6d, 0x3f, - 0xa2, 0x9c, 0x4a, 0x26, 0xbd, 0x24, 0x15, 0x20, 0xf0, 0x7d, 0xad, 0xf2, 0x72, 0x95, 0x97, 0xab, - 0x5a, 0xcd, 0x48, 0x44, 0x42, 0x49, 0xfc, 0xec, 0x49, 0xab, 0x5b, 0x65, 0xcc, 0x85, 0x5b, 0xab, - 0x1e, 0x68, 0xd5, 0x50, 0xdb, 0xf3, 0x00, 0x3d, 0xba, 0x4b, 0x26, 0x8c, 0x0b, 0x5f, 0xfd, 0xea, - 0x57, 0xdd, 0xcf, 0x55, 0xb4, 0xf6, 0x42, 0x77, 0x3a, 0x00, 0x02, 0x14, 0xef, 0xa2, 0x5a, 0x42, - 0x52, 0x32, 0x91, 0x8e, 0xdd, 0xb1, 0x7b, 0x8d, 0xbe, 0xeb, 0x5d, 0xdd, 0xd1, 0xdb, 0x57, 0xaa, - 0xc1, 0xea, 0xf9, 0x65, 0xdb, 0xfa, 0xf2, 0xfb, 0xeb, 0xa6, 0x1d, 0xe4, 0x46, 0xfc, 0x0e, 0xdd, - 0x89, 0x89, 0x84, 0x21, 0x08, 0x20, 0xf1, 0x30, 0x11, 0xef, 0x69, 0xea, 0xdc, 0xe8, 0xd8, 0xbd, - 0xb5, 0xc1, 0x4e, 0x26, 0xfe, 0x79, 0xd9, 0x7e, 0x14, 0x31, 0x38, 0x9e, 0x8e, 0xbc, 0x23, 0x31, - 0xc9, 0x1b, 0xe6, 0x7f, 0x5b, 0x32, 0x1c, 0xfb, 0xf0, 0x21, 0xa1, 0xd2, 0x7b, 0xc9, 0x41, 0x63, - 0x6f, 0x67, 0xb0, 0xd7, 0x19, 0x6b, 0x3f, 0x43, 0x61, 0x86, 0xd6, 0x15, 0xfe, 0x84, 0xc4, 0x2c, - 0x24, 0x20, 0x52, 0x1d, 0x21, 0x9d, 0x4a, 0xa7, 0xd2, 0x6b, 0xf4, 0x37, 0xcb, 0x0a, 0xef, 0x11, - 0x09, 0x6f, 0x16, 0x1e, 0x85, 0x32, 0xcb, 0xdf, 0x8b, 0x97, 0xc6, 0x12, 0xef, 0x21, 0x54, 0xa4, - 0x48, 0xe7, 0xa6, 0xe2, 0x3f, 0x2c, 0xe3, 0x17, 0x66, 0x13, 0x6b, 0xf8, 0xf1, 0x2b, 0xd4, 0x08, - 0x69, 0x4c, 0x23, 0x02, 0x4c, 0x70, 0xe9, 0x54, 0x15, 0xae, 0x5b, 0x86, 0x7b, 0x56, 0x48, 0x4d, - 0x9e, 0x49, 0xc0, 0x63, 0xb4, 0x3e, 0xe5, 0x23, 0xc1, 0x43, 0xc6, 0xa3, 0xa1, 0x89, 0xae, 0x29, - 0xf4, 0xe3, 0x32, 0xf4, 0xe1, 0xc2, 0x74, 0x75, 0x46, 0x73, 0xba, 0x3c, 0x97, 0xf8, 0x10, 0xdd, - 0x4a, 0xa9, 0x19, 0xb2, 0xa2, 0x42, 0x36, 0xca, 0x42, 0x02, 0x43, 0x6c, 0xd2, 0xff, 0xa7, 0xe0, - 0x16, 0xaa, 0xd3, 0xd3, 0x44, 0xa4, 0x40, 0x43, 0xa7, 0xde, 0xb1, 0x7b, 0xf5, 0xa0, 0x38, 0x77, - 0x8f, 0x11, 0x5e, 0xfe, 0x68, 0xb8, 0x8f, 0x56, 0x48, 0x18, 0xa6, 0x54, 0xea, 0x15, 0x5d, 0x1d, - 0x38, 0xdf, 0xbf, 0x6d, 0x35, 0xf3, 0x16, 0xbb, 0x7a, 0x72, 0x00, 0x29, 0xe3, 0x51, 0xb0, 0x10, - 0xe2, 0x26, 0xaa, 0xfe, 0xdb, 0xc3, 0x4a, 0xa0, 0x0f, 0x4f, 0xeb, 0x1f, 0xcf, 0xda, 0xd6, 0x9f, - 0xb3, 0xb6, 0x35, 0x78, 0x7e, 0x3e, 0x73, 0xed, 0x8b, 0x99, 0x6b, 0xff, 0x9a, 0xb9, 0xf6, 0xa7, - 0xb9, 0x6b, 0x5d, 0xcc, 0x5d, 0xeb, 0xc7, 0xdc, 0xb5, 0xde, 0x3e, 0xb9, 0x76, 0x55, 0x4f, 0x8b, - 0xcb, 0xa8, 0x96, 0x76, 0x54, 0x53, 0xb7, 0x6a, 0xe7, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe5, - 0x05, 0x1a, 0xb6, 0xff, 0x03, 0x00, 0x00, + // 513 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0x31, 0x6f, 0xd3, 0x40, + 0x18, 0x86, 0x6d, 0x4a, 0xd2, 0xf4, 0x52, 0x10, 0x1c, 0x09, 0x32, 0x19, 0x9c, 0x10, 0x75, 0x88, + 0x0a, 0xb1, 0x69, 0xd8, 0xd8, 0x1a, 0x21, 0x50, 0xa5, 0x4a, 0x54, 0x2e, 0x65, 0xe8, 0x12, 0x5d, + 0xea, 0x93, 0x73, 0x8a, 0x7d, 0x67, 0xf9, 0xbe, 0x94, 0xf2, 0x0f, 0x18, 0xd9, 0x58, 0x3b, 0x32, + 0x32, 0xf4, 0x47, 0x74, 0xac, 0x3a, 0x21, 0x86, 0x0a, 0x25, 0x03, 0xfc, 0x0c, 0xe4, 0x3b, 0xc7, + 0x18, 0xa5, 0x5e, 0x92, 0x38, 0xdf, 0xf3, 0x3e, 0xef, 0x27, 0xf9, 0x0e, 0x6d, 0x9d, 0x08, 0x19, + 0x09, 0xe9, 0x4a, 0x20, 0x53, 0xc6, 0x03, 0xf7, 0x74, 0x67, 0x4c, 0x81, 0xec, 0xb8, 0x01, 0xe5, + 0x54, 0x32, 0xe9, 0xc4, 0x89, 0x00, 0x81, 0x1f, 0x6b, 0xca, 0xc9, 0x28, 0x27, 0xa3, 0x5a, 0x8d, + 0x40, 0x04, 0x42, 0x21, 0x6e, 0xfa, 0x4b, 0xd3, 0xad, 0x32, 0xe7, 0x32, 0xad, 0xa9, 0x27, 0x9a, + 0x1a, 0xe9, 0x78, 0x56, 0xa0, 0x47, 0x0f, 0x49, 0xc4, 0xb8, 0x70, 0xd5, 0xa7, 0xfe, 0xab, 0xfb, + 0xb5, 0x82, 0x36, 0xdf, 0xea, 0x9d, 0x0e, 0x81, 0x00, 0xc5, 0xbb, 0xa8, 0x1a, 0x93, 0x84, 0x44, + 0xd2, 0x32, 0x3b, 0x66, 0xaf, 0x3e, 0xb0, 0x9d, 0xdb, 0x77, 0x74, 0x0e, 0x14, 0x35, 0xdc, 0xb8, + 0xbc, 0x69, 0x1b, 0xdf, 0x7e, 0x7f, 0xdf, 0x36, 0xbd, 0x2c, 0x88, 0x8f, 0xd1, 0x83, 0x90, 0x48, + 0x18, 0x81, 0x00, 0x12, 0x8e, 0x62, 0xf1, 0x91, 0x26, 0xd6, 0x9d, 0x8e, 0xd9, 0xdb, 0x1c, 0xbe, + 0x48, 0xe1, 0x9f, 0x37, 0xed, 0xa6, 0x76, 0x4a, 0x7f, 0xea, 0x30, 0xe1, 0x46, 0x04, 0x26, 0xce, + 0x1e, 0x87, 0xeb, 0x8b, 0x3e, 0xca, 0xca, 0xf6, 0x38, 0x68, 0xe7, 0xfd, 0xd4, 0xf4, 0x3e, 0x15, + 0x1d, 0xa4, 0x1e, 0xcc, 0x50, 0x53, 0xb9, 0x4f, 0x49, 0xc8, 0x7c, 0x02, 0x22, 0xd1, 0x7e, 0x69, + 0xad, 0x75, 0xd6, 0x7a, 0xf5, 0xc1, 0x76, 0xd9, 0xb6, 0xfb, 0x44, 0xc2, 0x87, 0x65, 0x46, 0xa9, + 0x8a, 0x9b, 0x3f, 0x0a, 0x57, 0xc6, 0x12, 0xef, 0x23, 0x94, 0xb7, 0x48, 0xeb, 0xae, 0xf2, 0x3f, + 0x2d, 0xf3, 0xe7, 0xe1, 0xa2, 0xb6, 0x90, 0xc7, 0xef, 0x50, 0xdd, 0xa7, 0x21, 0x0d, 0x08, 0x30, + 0xc1, 0xa5, 0x55, 0x51, 0xba, 0x6e, 0x99, 0xee, 0x75, 0x8e, 0x16, 0x7d, 0x45, 0x03, 0x9e, 0xa2, + 0xe6, 0x8c, 0x8f, 0x05, 0xf7, 0x19, 0x0f, 0x46, 0x45, 0x75, 0x55, 0xa9, 0x9f, 0x95, 0xa9, 0x8f, + 0x96, 0xa1, 0xdb, 0x3b, 0x1a, 0xb3, 0xd5, 0xb9, 0xc4, 0x47, 0xe8, 0x5e, 0x42, 0x8b, 0x25, 0xeb, + 0xaa, 0x64, 0xab, 0xac, 0xc4, 0x2b, 0xc0, 0x45, 0xfb, 0xff, 0x16, 0xdc, 0x42, 0x35, 0x7a, 0x16, + 0x8b, 0x04, 0xa8, 0x6f, 0xd5, 0x3a, 0x66, 0xaf, 0xe6, 0xe5, 0xcf, 0xdd, 0x09, 0xc2, 0xab, 0x2f, + 0x0d, 0x0f, 0xd0, 0x3a, 0xf1, 0xfd, 0x84, 0x4a, 0x7d, 0x3e, 0x37, 0x86, 0xd6, 0xf5, 0x45, 0xbf, + 0x91, 0x6d, 0xb1, 0xab, 0x27, 0x87, 0x90, 0x30, 0x1e, 0x78, 0x4b, 0x10, 0x37, 0x50, 0xe5, 0xdf, + 0x21, 0x5c, 0xf3, 0xf4, 0xc3, 0xab, 0xda, 0xe7, 0xf3, 0xb6, 0xf1, 0xe7, 0xbc, 0x6d, 0x0c, 0xdf, + 0x5c, 0xce, 0x6d, 0xf3, 0x6a, 0x6e, 0x9b, 0xbf, 0xe6, 0xb6, 0xf9, 0x65, 0x61, 0x1b, 0x57, 0x0b, + 0xdb, 0xf8, 0xb1, 0xb0, 0x8d, 0xe3, 0xe7, 0x01, 0x83, 0xc9, 0x6c, 0xec, 0x9c, 0x88, 0x28, 0xbb, + 0x49, 0xd9, 0x57, 0x5f, 0xfa, 0x53, 0xf7, 0x2c, 0xbf, 0x89, 0xf0, 0x29, 0xa6, 0x72, 0x5c, 0x55, + 0x57, 0xea, 0xe5, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x57, 0x29, 0x7a, 0x5e, 0xfc, 0x03, 0x00, + 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/staking/types/historical_info.go b/x/staking/types/historical_info.go index bfdbf454fa6e..e6652b47dcad 100644 --- a/x/staking/types/historical_info.go +++ b/x/staking/types/historical_info.go @@ -3,12 +3,12 @@ package types import ( "sort" - "cosmossdk.io/math" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/gogoproto/proto" + "cosmossdk.io/core/address" "cosmossdk.io/errors" + "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -18,13 +18,13 @@ import ( // it will first sort valset before inclusion into historical info func NewHistoricalInfo(header cmtproto.Header, valSet Validators, powerReduction math.Int) HistoricalInfo { // Must sort in the same way that CometBFT does - sort.SliceStable(valSet, func(i, j int) bool { - return ValidatorsByVotingPower(valSet).Less(i, j, powerReduction) + sort.SliceStable(valSet.Validators, func(i, j int) bool { + return ValidatorsByVotingPower(valSet.Validators).Less(i, j, powerReduction) }) return HistoricalInfo{ Header: header, - Valset: valSet, + Valset: valSet.Validators, } } @@ -45,12 +45,12 @@ func UnmarshalHistoricalInfo(cdc codec.BinaryCodec, value []byte) (hi Historical } // ValidateBasic will ensure HistoricalInfo is not nil and sorted -func ValidateBasic(hi HistoricalInfo) error { +func ValidateBasic(hi HistoricalInfo, valAc address.Codec) error { if len(hi.Valset) == 0 { return errors.Wrap(ErrInvalidHistoricalInfo, "validator set is empty") } - if !sort.IsSorted(Validators(hi.Valset)) { + if !sort.IsSorted(Validators{Validators: hi.Valset, ValidatorCodec: valAc}) { return errors.Wrap(ErrInvalidHistoricalInfo, "validator set is not sorted by address") } diff --git a/x/staking/types/historical_info_test.go b/x/staking/types/historical_info_test.go index 90b4872733a8..064ea4d5219d 100644 --- a/x/staking/types/historical_info_test.go +++ b/x/staking/types/historical_info_test.go @@ -5,12 +5,12 @@ import ( "sort" "testing" - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/codec/legacy" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/codec" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" + "github.com/cosmos/cosmos-sdk/codec/legacy" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking/types" ) @@ -30,8 +30,10 @@ func createValidators(t *testing.T) []types.Validator { func TestHistoricalInfo(t *testing.T) { validators := createValidators(t) - hi := types.NewHistoricalInfo(header, validators, sdk.DefaultPowerReduction) - require.True(t, sort.IsSorted(types.Validators(hi.Valset)), "Validators are not sorted") + + vals := types.Validators{Validators: validators, ValidatorCodec: addresscodec.NewBech32Codec("cosmosvaloper")} + hi := types.NewHistoricalInfo(header, vals, sdk.DefaultPowerReduction) + require.True(t, sort.IsSorted(vals), "Validators are not sorted") var value []byte require.NotPanics(t, func() { @@ -45,7 +47,7 @@ func TestHistoricalInfo(t *testing.T) { for i := range hi.Valset { require.True(t, hi.Valset[i].Equal(&recv.Valset[i])) } - require.True(t, sort.IsSorted(types.Validators(hi.Valset)), "Validators are not sorted") + require.True(t, sort.IsSorted(vals), "Validators are not sorted") } func TestValidateBasic(t *testing.T) { @@ -53,11 +55,12 @@ func TestValidateBasic(t *testing.T) { hi := types.HistoricalInfo{ Header: header, } - err := types.ValidateBasic(hi) + ac := addresscodec.NewBech32Codec("cosmosvaloper") + err := types.ValidateBasic(hi, ac) require.Error(t, err, "ValidateBasic passed on nil ValSet") // Ensure validators are not sorted - for sort.IsSorted(types.Validators(validators)) { + for sort.IsSorted(types.Validators{Validators: validators, ValidatorCodec: ac}) { rand.Shuffle(len(validators), func(i, j int) { validators[i], validators[j] = validators[j], validators[i] }) @@ -66,10 +69,10 @@ func TestValidateBasic(t *testing.T) { Header: header, Valset: validators, } - err = types.ValidateBasic(hi) + err = types.ValidateBasic(hi, ac) require.Error(t, err, "ValidateBasic passed on unsorted ValSet") - hi = types.NewHistoricalInfo(header, validators, sdk.DefaultPowerReduction) - err = types.ValidateBasic(hi) + hi = types.NewHistoricalInfo(header, types.Validators{Validators: validators, ValidatorCodec: ac}, sdk.DefaultPowerReduction) + err = types.ValidateBasic(hi, ac) require.NoError(t, err, "ValidateBasic failed on valid HistoricalInfo") } diff --git a/x/staking/types/hooks.go b/x/staking/types/hooks.go index bdc1ffd7776c..8a052d9514a1 100644 --- a/x/staking/types/hooks.go +++ b/x/staking/types/hooks.go @@ -1,6 +1,8 @@ package types import ( + context "context" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" @@ -15,7 +17,7 @@ func NewMultiStakingHooks(hooks ...StakingHooks) MultiStakingHooks { return hooks } -func (h MultiStakingHooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) error { +func (h MultiStakingHooks) AfterValidatorCreated(ctx context.Context, valAddr sdk.ValAddress) error { for i := range h { if err := h[i].AfterValidatorCreated(ctx, valAddr); err != nil { return err @@ -25,7 +27,7 @@ func (h MultiStakingHooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.Va return nil } -func (h MultiStakingHooks) BeforeValidatorModified(ctx sdk.Context, valAddr sdk.ValAddress) error { +func (h MultiStakingHooks) BeforeValidatorModified(ctx context.Context, valAddr sdk.ValAddress) error { for i := range h { if err := h[i].BeforeValidatorModified(ctx, valAddr); err != nil { return err @@ -34,7 +36,7 @@ func (h MultiStakingHooks) BeforeValidatorModified(ctx sdk.Context, valAddr sdk. return nil } -func (h MultiStakingHooks) AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error { +func (h MultiStakingHooks) AfterValidatorRemoved(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error { for i := range h { if err := h[i].AfterValidatorRemoved(ctx, consAddr, valAddr); err != nil { return err @@ -43,7 +45,7 @@ func (h MultiStakingHooks) AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.C return nil } -func (h MultiStakingHooks) AfterValidatorBonded(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error { +func (h MultiStakingHooks) AfterValidatorBonded(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error { for i := range h { if err := h[i].AfterValidatorBonded(ctx, consAddr, valAddr); err != nil { return err @@ -52,7 +54,7 @@ func (h MultiStakingHooks) AfterValidatorBonded(ctx sdk.Context, consAddr sdk.Co return nil } -func (h MultiStakingHooks) AfterValidatorBeginUnbonding(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error { +func (h MultiStakingHooks) AfterValidatorBeginUnbonding(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error { for i := range h { if err := h[i].AfterValidatorBeginUnbonding(ctx, consAddr, valAddr); err != nil { return err @@ -61,7 +63,7 @@ func (h MultiStakingHooks) AfterValidatorBeginUnbonding(ctx sdk.Context, consAdd return nil } -func (h MultiStakingHooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { +func (h MultiStakingHooks) BeforeDelegationCreated(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { for i := range h { if err := h[i].BeforeDelegationCreated(ctx, delAddr, valAddr); err != nil { return err @@ -70,7 +72,7 @@ func (h MultiStakingHooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk. return nil } -func (h MultiStakingHooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { +func (h MultiStakingHooks) BeforeDelegationSharesModified(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { for i := range h { if err := h[i].BeforeDelegationSharesModified(ctx, delAddr, valAddr); err != nil { return err @@ -79,7 +81,7 @@ func (h MultiStakingHooks) BeforeDelegationSharesModified(ctx sdk.Context, delAd return nil } -func (h MultiStakingHooks) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { +func (h MultiStakingHooks) BeforeDelegationRemoved(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { for i := range h { if err := h[i].BeforeDelegationRemoved(ctx, delAddr, valAddr); err != nil { return err @@ -88,7 +90,7 @@ func (h MultiStakingHooks) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk. return nil } -func (h MultiStakingHooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { +func (h MultiStakingHooks) AfterDelegationModified(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { for i := range h { if err := h[i].AfterDelegationModified(ctx, delAddr, valAddr); err != nil { return err @@ -97,7 +99,7 @@ func (h MultiStakingHooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk. return nil } -func (h MultiStakingHooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdkmath.LegacyDec) error { +func (h MultiStakingHooks) BeforeValidatorSlashed(ctx context.Context, valAddr sdk.ValAddress, fraction sdkmath.LegacyDec) error { for i := range h { if err := h[i].BeforeValidatorSlashed(ctx, valAddr, fraction); err != nil { return err @@ -106,7 +108,7 @@ func (h MultiStakingHooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.V return nil } -func (h MultiStakingHooks) AfterUnbondingInitiated(ctx sdk.Context, id uint64) error { +func (h MultiStakingHooks) AfterUnbondingInitiated(ctx context.Context, id uint64) error { for i := range h { if err := h[i].AfterUnbondingInitiated(ctx, id); err != nil { return err diff --git a/x/staking/types/keys.go b/x/staking/types/keys.go index 4c905e1110c3..598aa332b312 100644 --- a/x/staking/types/keys.go +++ b/x/staking/types/keys.go @@ -6,6 +6,7 @@ import ( "fmt" "time" + addresscodec "cosmossdk.io/core/address" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" @@ -110,7 +111,7 @@ func AddressFromLastValidatorPowerKey(key []byte) []byte { // Power index is the key used in the power-store, and represents the relative // power ranking of the validator. // VALUE: validator operator address ([]byte) -func GetValidatorsByPowerIndexKey(validator Validator, powerReduction math.Int) []byte { +func GetValidatorsByPowerIndexKey(validator Validator, powerReduction math.Int, valAc addresscodec.Codec) []byte { // NOTE the address doesn't need to be stored because counter bytes must always be different // NOTE the larger values are of higher value @@ -121,7 +122,7 @@ func GetValidatorsByPowerIndexKey(validator Validator, powerReduction math.Int) powerBytes := consensusPowerBytes powerBytesLen := len(powerBytes) // 8 - addr, err := sdk.ValAddressFromBech32(validator.OperatorAddress) + addr, err := valAc.StringToBytes(validator.OperatorAddress) if err != nil { panic(err) } diff --git a/x/staking/types/keys_test.go b/x/staking/types/keys_test.go index ce3c55e45409..f9fa94979623 100644 --- a/x/staking/types/keys_test.go +++ b/x/staking/types/keys_test.go @@ -9,9 +9,11 @@ import ( "testing" "time" - "cosmossdk.io/math" "github.com/stretchr/testify/require" + "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -46,7 +48,7 @@ func TestGetValidatorPowerRank(t *testing.T) { {val4, "230000010000000000149c288ede7df62742fc3b7d0962045a8cef0f79f6"}, } for i, tt := range tests { - got := hex.EncodeToString(types.GetValidatorsByPowerIndexKey(tt.validator, sdk.DefaultPowerReduction)) + got := hex.EncodeToString(types.GetValidatorsByPowerIndexKey(tt.validator, sdk.DefaultPowerReduction, address.NewBech32Codec("cosmosvaloper"))) require.Equal(t, tt.wantHex, got, "Keys did not match on test case %d", i) } diff --git a/x/staking/types/msg.go b/x/staking/types/msg.go index 89012d1b5605..0119bc82adcc 100644 --- a/x/staking/types/msg.go +++ b/x/staking/types/msg.go @@ -1,6 +1,7 @@ package types import ( + "cosmossdk.io/core/address" errorsmod "cosmossdk.io/errors" "cosmossdk.io/math" @@ -24,7 +25,7 @@ var ( // NewMsgCreateValidator creates a new MsgCreateValidator instance. // Delegator address and validator address are the same. func NewMsgCreateValidator( - valAddr sdk.ValAddress, pubKey cryptotypes.PubKey, + valAddr string, pubKey cryptotypes.PubKey, selfDelegation sdk.Coin, description Description, commission CommissionRates, minSelfDelegation math.Int, ) (*MsgCreateValidator, error) { var pkAny *codectypes.Any @@ -36,7 +37,7 @@ func NewMsgCreateValidator( } return &MsgCreateValidator{ Description: description, - ValidatorAddress: valAddr.String(), + ValidatorAddress: valAddr, Pubkey: pkAny, Value: selfDelegation, Commission: commission, @@ -44,22 +45,10 @@ func NewMsgCreateValidator( }, nil } -// GetSigners implements the sdk.Msg interface. It returns the address(es) that -// must sign over msg.GetSignBytes(). -// If the validator address is not same as delegator's, then the validator must -// sign the msg as well. -func (msg MsgCreateValidator) GetSigners() []sdk.AccAddress { - valAddr, _ := sdk.ValAddressFromBech32(msg.ValidatorAddress) - - valAccAddr := sdk.AccAddress(valAddr) - - return []sdk.AccAddress{valAccAddr} -} - // Validate validates the MsgCreateValidator sdk msg. -func (msg MsgCreateValidator) Validate() error { +func (msg MsgCreateValidator) Validate(ac address.Codec) error { // note that unmarshaling from bech32 ensures both non-empty and valid - _, err := sdk.ValAddressFromBech32(msg.ValidatorAddress) + _, err := ac.StringToBytes(msg.ValidatorAddress) if err != nil { return sdkerrors.ErrInvalidAddress.Wrapf("invalid validator address: %s", err) } @@ -105,87 +94,51 @@ func (msg MsgCreateValidator) UnpackInterfaces(unpacker codectypes.AnyUnpacker) } // NewMsgEditValidator creates a new MsgEditValidator instance -func NewMsgEditValidator(valAddr sdk.ValAddress, description Description, newRate *math.LegacyDec, newMinSelfDelegation *math.Int) *MsgEditValidator { +func NewMsgEditValidator(valAddr string, description Description, newRate *math.LegacyDec, newMinSelfDelegation *math.Int) *MsgEditValidator { return &MsgEditValidator{ Description: description, CommissionRate: newRate, - ValidatorAddress: valAddr.String(), + ValidatorAddress: valAddr, MinSelfDelegation: newMinSelfDelegation, } } -// GetSigners implements the sdk.Msg interface. -func (msg MsgEditValidator) GetSigners() []sdk.AccAddress { - valAddr, _ := sdk.ValAddressFromBech32(msg.ValidatorAddress) - return []sdk.AccAddress{sdk.AccAddress(valAddr)} -} - // NewMsgDelegate creates a new MsgDelegate instance. -func NewMsgDelegate(delAddr sdk.AccAddress, valAddr sdk.ValAddress, amount sdk.Coin) *MsgDelegate { +func NewMsgDelegate(delAddr, valAddr string, amount sdk.Coin) *MsgDelegate { return &MsgDelegate{ - DelegatorAddress: delAddr.String(), - ValidatorAddress: valAddr.String(), + DelegatorAddress: delAddr, + ValidatorAddress: valAddr, Amount: amount, } } -// GetSigners implements the sdk.Msg interface. -func (msg MsgDelegate) GetSigners() []sdk.AccAddress { - delegator, _ := sdk.AccAddressFromBech32(msg.DelegatorAddress) - return []sdk.AccAddress{delegator} -} - // NewMsgBeginRedelegate creates a new MsgBeginRedelegate instance. func NewMsgBeginRedelegate( - delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress, amount sdk.Coin, + delAddr, valSrcAddr, valDstAddr string, amount sdk.Coin, ) *MsgBeginRedelegate { return &MsgBeginRedelegate{ - DelegatorAddress: delAddr.String(), - ValidatorSrcAddress: valSrcAddr.String(), - ValidatorDstAddress: valDstAddr.String(), + DelegatorAddress: delAddr, + ValidatorSrcAddress: valSrcAddr, + ValidatorDstAddress: valDstAddr, Amount: amount, } } -// GetSigners implements the sdk.Msg interface -func (msg MsgBeginRedelegate) GetSigners() []sdk.AccAddress { - delegator, _ := sdk.AccAddressFromBech32(msg.DelegatorAddress) - return []sdk.AccAddress{delegator} -} - // NewMsgUndelegate creates a new MsgUndelegate instance. -func NewMsgUndelegate(delAddr sdk.AccAddress, valAddr sdk.ValAddress, amount sdk.Coin) *MsgUndelegate { +func NewMsgUndelegate(delAddr, valAddr string, amount sdk.Coin) *MsgUndelegate { return &MsgUndelegate{ - DelegatorAddress: delAddr.String(), - ValidatorAddress: valAddr.String(), + DelegatorAddress: delAddr, + ValidatorAddress: valAddr, Amount: amount, } } -// GetSigners implements the sdk.Msg interface. -func (msg MsgUndelegate) GetSigners() []sdk.AccAddress { - delegator, _ := sdk.AccAddressFromBech32(msg.DelegatorAddress) - return []sdk.AccAddress{delegator} -} - // NewMsgCancelUnbondingDelegation creates a new MsgCancelUnbondingDelegation instance. -func NewMsgCancelUnbondingDelegation(delAddr sdk.AccAddress, valAddr sdk.ValAddress, creationHeight int64, amount sdk.Coin) *MsgCancelUnbondingDelegation { +func NewMsgCancelUnbondingDelegation(delAddr, valAddr string, creationHeight int64, amount sdk.Coin) *MsgCancelUnbondingDelegation { return &MsgCancelUnbondingDelegation{ - DelegatorAddress: delAddr.String(), - ValidatorAddress: valAddr.String(), + DelegatorAddress: delAddr, + ValidatorAddress: valAddr, Amount: amount, CreationHeight: creationHeight, } } - -// GetSigners implements the sdk.Msg interface. -func (msg MsgCancelUnbondingDelegation) GetSigners() []sdk.AccAddress { - delegator, _ := sdk.AccAddressFromBech32(msg.DelegatorAddress) - return []sdk.AccAddress{delegator} -} - -// GetSigners returns the expected signers for a MsgUpdateParams message -func (m MsgUpdateParams) GetSigners() []sdk.AccAddress { - addr, _ := sdk.AccAddressFromBech32(m.Authority) - return []sdk.AccAddress{addr} -} diff --git a/x/staking/types/msg_test.go b/x/staking/types/msg_test.go index a59a897bc42a..23f5047de186 100644 --- a/x/staking/types/msg_test.go +++ b/x/staking/types/msg_test.go @@ -3,10 +3,10 @@ package types_test import ( "testing" - "cosmossdk.io/math" - "github.com/stretchr/testify/require" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" @@ -36,7 +36,7 @@ func TestMsgDecode(t *testing.T) { // now let's try to serialize the whole message commission1 := types.NewCommissionRates(math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyZeroDec()) - msg, err := types.NewMsgCreateValidator(valAddr1, pk1, coinPos, types.Description{}, commission1, math.OneInt()) + msg, err := types.NewMsgCreateValidator(valAddr1.String(), pk1, coinPos, types.Description{}, commission1, math.OneInt()) require.NoError(t, err) msgSerialized, err := cdc.MarshalInterface(msg) require.NoError(t, err) diff --git a/x/staking/types/params_test.go b/x/staking/types/params_test.go index a5bf8454358c..2599d385d7ae 100644 --- a/x/staking/types/params_test.go +++ b/x/staking/types/params_test.go @@ -3,9 +3,10 @@ package types_test import ( "testing" - "cosmossdk.io/math" "github.com/stretchr/testify/require" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/x/staking/types" ) diff --git a/x/staking/types/query.pb.go b/x/staking/types/query.pb.go index 9509670a3425..d136f03e6b6b 100644 --- a/x/staking/types/query.pb.go +++ b/x/staking/types/query.pb.go @@ -1427,93 +1427,94 @@ func init() { } var fileDescriptor_f270127f442bbcd8 = []byte{ - // 1373 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xdb, 0x6f, 0x14, 0x65, - 0x1b, 0xdf, 0xb7, 0xf4, 0x6b, 0xbe, 0x3e, 0x04, 0x02, 0xef, 0x2e, 0xb5, 0x0c, 0xb8, 0xbb, 0x4c, - 0x08, 0xf6, 0x40, 0x77, 0x6c, 0x8b, 0x50, 0x31, 0x0a, 0x5b, 0x09, 0x8a, 0x10, 0x2c, 0x6b, 0x6c, - 0xf0, 0x94, 0x66, 0xda, 0x19, 0x66, 0x27, 0x6c, 0x67, 0x96, 0x79, 0xa7, 0x0d, 0xa4, 0x69, 0x4c, - 0xbc, 0x30, 0x5c, 0x19, 0x13, 0xef, 0x0d, 0x17, 0x5e, 0x18, 0xc5, 0xa4, 0x17, 0x98, 0xe8, 0x0d, - 0x97, 0x86, 0x0b, 0x63, 0x88, 0x06, 0xa3, 0x37, 0x68, 0x5a, 0x13, 0xbd, 0xf1, 0x3f, 0x30, 0xc6, - 0xec, 0xcc, 0x33, 0xa7, 0xce, 0x71, 0xb7, 0xdb, 0xa4, 0xdc, 0xc0, 0xee, 0x3b, 0xcf, 0xe1, 0xf7, - 0x7b, 0x0e, 0xef, 0x3c, 0xcf, 0x16, 0xf8, 0x05, 0x9d, 0x2d, 0xea, 0x4c, 0x60, 0xa6, 0x78, 0x5d, - 0xd5, 0x14, 0x61, 0x79, 0x7c, 0x5e, 0x36, 0xc5, 0x71, 0xe1, 0xc6, 0x92, 0x6c, 0xdc, 0xaa, 0x34, - 0x0d, 0xdd, 0xd4, 0xe9, 0x80, 0x2d, 0x53, 0x41, 0x99, 0x0a, 0xca, 0x70, 0x23, 0xa8, 0x3b, 0x2f, - 0x32, 0xd9, 0x56, 0x70, 0xd5, 0x9b, 0xa2, 0xa2, 0x6a, 0xa2, 0xa9, 0xea, 0x9a, 0x6d, 0x83, 0x2b, - 0x28, 0xba, 0xa2, 0x5b, 0x1f, 0x85, 0xd6, 0x27, 0x3c, 0x3d, 0xac, 0xe8, 0xba, 0xd2, 0x90, 0x05, - 0xb1, 0xa9, 0x0a, 0xa2, 0xa6, 0xe9, 0xa6, 0xa5, 0xc2, 0xf0, 0xe9, 0xd1, 0x18, 0x6c, 0x0e, 0x0e, - 0x5b, 0xea, 0xa0, 0x2d, 0x35, 0x67, 0x1b, 0x47, 0xa8, 0xf6, 0xa3, 0x43, 0x68, 0xc0, 0xc1, 0xe6, - 0x67, 0xc5, 0xed, 0x17, 0x17, 0x55, 0x4d, 0x17, 0xac, 0x7f, 0xed, 0x23, 0xfe, 0x26, 0x0c, 0x5c, - 0x69, 0x49, 0xcc, 0x8a, 0x0d, 0x55, 0x12, 0x4d, 0xdd, 0x60, 0x35, 0xf9, 0xc6, 0x92, 0xcc, 0x4c, - 0x3a, 0x00, 0x7d, 0xcc, 0x14, 0xcd, 0x25, 0x36, 0x48, 0xca, 0x64, 0xa8, 0xbf, 0x86, 0xdf, 0xe8, - 0x79, 0x00, 0x8f, 0xea, 0x60, 0x4f, 0x99, 0x0c, 0xed, 0x9e, 0x38, 0x56, 0x41, 0x10, 0xad, 0xb8, - 0x54, 0x6c, 0x97, 0x08, 0xbd, 0x32, 0x23, 0x2a, 0x32, 0xda, 0xac, 0xf9, 0x34, 0xf9, 0x35, 0x02, - 0x4f, 0x85, 0x5c, 0xb3, 0xa6, 0xae, 0x31, 0x99, 0x5e, 0x02, 0x58, 0x76, 0x4f, 0x07, 0x49, 0x79, - 0xd7, 0xd0, 0xee, 0x89, 0x23, 0x95, 0xe8, 0x9c, 0x54, 0x5c, 0xfd, 0xe9, 0xfe, 0x07, 0x8f, 0x4b, - 0xb9, 0xcf, 0xff, 0x5c, 0x1b, 0x21, 0x35, 0x9f, 0x3e, 0x7d, 0x25, 0x02, 0xf1, 0x33, 0xa9, 0x88, - 0x6d, 0x28, 0x01, 0xc8, 0x57, 0xe1, 0x40, 0x10, 0xb1, 0x13, 0xab, 0x33, 0xb0, 0xd7, 0xf5, 0x37, - 0x27, 0x4a, 0x92, 0x61, 0xc7, 0x6c, 0x7a, 0xf0, 0xc7, 0x7b, 0x63, 0x05, 0x74, 0x54, 0x95, 0x24, - 0x43, 0x66, 0xec, 0x0d, 0xd3, 0x50, 0x35, 0xa5, 0xb6, 0xc7, 0x95, 0x6f, 0x9d, 0xf3, 0xd2, 0xe6, - 0x34, 0xb8, 0xa1, 0x78, 0x0d, 0xfa, 0x5d, 0x51, 0xcb, 0x6a, 0xbb, 0x91, 0xf0, 0xd4, 0xf9, 0x2f, - 0x09, 0x94, 0x83, 0x6e, 0xce, 0xc9, 0x0d, 0x59, 0xb1, 0x2b, 0xb0, 0x5b, 0x5c, 0xba, 0x56, 0x20, - 0x7f, 0x13, 0x38, 0x92, 0x80, 0x16, 0xe3, 0xf3, 0x3e, 0x14, 0x24, 0xf7, 0x78, 0xce, 0xc0, 0x63, - 0xa7, 0x68, 0x46, 0xe2, 0x42, 0xe5, 0x99, 0x72, 0x2c, 0x4d, 0x97, 0x5b, 0x31, 0xfb, 0xe2, 0xb7, - 0x52, 0x3e, 0xfc, 0x8c, 0xd9, 0xa1, 0xcc, 0x4b, 0xe1, 0x27, 0xdd, 0xab, 0xae, 0x7b, 0x04, 0x86, - 0x83, 0x7c, 0xdf, 0xd4, 0xe6, 0x75, 0x4d, 0x52, 0x35, 0x65, 0x27, 0xa7, 0xe9, 0x31, 0x81, 0x91, - 0x2c, 0xb0, 0x31, 0x5f, 0x0a, 0xe4, 0x97, 0x9c, 0xe7, 0xa1, 0x74, 0x8d, 0xc6, 0xa5, 0x2b, 0xc2, - 0xa4, 0xbf, 0xc6, 0xa9, 0x6b, 0x72, 0x1b, 0xf2, 0xf2, 0x19, 0xc1, 0xe6, 0xf4, 0xd7, 0x85, 0x9b, - 0x04, 0x2c, 0x89, 0xcc, 0x49, 0x70, 0xe5, 0xad, 0x24, 0x84, 0xb3, 0xd8, 0xd3, 0x56, 0x16, 0x4f, - 0xff, 0xff, 0xf6, 0x9d, 0x52, 0xee, 0xaf, 0x3b, 0xa5, 0x1c, 0xbf, 0x8c, 0xd7, 0x69, 0xb8, 0x7a, - 0xe9, 0x3b, 0x90, 0x8f, 0xe8, 0x11, 0xbc, 0x4d, 0xda, 0x68, 0x91, 0x1a, 0x0d, 0x37, 0x00, 0xff, - 0x15, 0x81, 0x92, 0xe5, 0x38, 0x22, 0x47, 0x3b, 0x31, 0x4e, 0x06, 0xde, 0x81, 0x91, 0x70, 0x31, - 0x60, 0x97, 0xa1, 0xcf, 0xae, 0x28, 0x8c, 0x51, 0xa7, 0x75, 0x89, 0x56, 0xf8, 0xaf, 0x9d, 0x8b, - 0xf7, 0x9c, 0xc3, 0x2a, 0xba, 0xa3, 0xb7, 0x16, 0xa4, 0x2e, 0x75, 0xb4, 0x2f, 0x56, 0x3f, 0x3b, - 0x57, 0x70, 0x34, 0x6e, 0x8c, 0x56, 0xbd, 0x6b, 0x57, 0xb0, 0x2f, 0x74, 0xdb, 0x7b, 0xd7, 0xde, - 0x77, 0xee, 0x5a, 0x97, 0x58, 0xca, 0x5d, 0xbb, 0xd3, 0x32, 0xe3, 0xde, 0xba, 0x29, 0x04, 0x9e, - 0xd8, 0x5b, 0xf7, 0x7e, 0x0f, 0x1c, 0xb4, 0x08, 0xd6, 0x64, 0x69, 0x5b, 0x32, 0x42, 0x99, 0xb1, - 0x30, 0xd7, 0xe6, 0xa5, 0xb2, 0x8f, 0x19, 0x0b, 0xb3, 0x9b, 0xde, 0xa2, 0x54, 0x62, 0xe6, 0x66, - 0x3b, 0xbb, 0xd2, 0xec, 0x48, 0xcc, 0x9c, 0x4d, 0x78, 0x1b, 0xf7, 0x76, 0xa1, 0x42, 0x1e, 0x11, - 0xe0, 0xa2, 0x02, 0x88, 0x15, 0xa1, 0xc1, 0x80, 0x21, 0x27, 0xb4, 0xed, 0xf1, 0xb8, 0xa2, 0xf0, - 0x9b, 0x8b, 0x6a, 0xdc, 0x03, 0x86, 0xbc, 0xdd, 0x63, 0x52, 0x29, 0x58, 0xf9, 0xe1, 0xdd, 0x65, - 0x07, 0x36, 0xec, 0xb7, 0xa1, 0x57, 0xc0, 0x93, 0xb3, 0xf7, 0xdc, 0x25, 0x50, 0x8c, 0xc1, 0xbe, - 0x13, 0xdf, 0xf0, 0x8b, 0xb1, 0x05, 0xb2, 0x2d, 0x5b, 0xd5, 0x09, 0xec, 0xb3, 0x57, 0x55, 0x66, - 0xea, 0x86, 0xba, 0x20, 0x36, 0x2e, 0x68, 0xd7, 0x74, 0xdf, 0x1a, 0x5d, 0x97, 0x55, 0xa5, 0x6e, - 0x5a, 0x6e, 0x76, 0xd5, 0xf0, 0x1b, 0xff, 0x16, 0x1c, 0x8a, 0xd4, 0x42, 0x80, 0xa7, 0xa1, 0xb7, - 0xae, 0x32, 0x13, 0xb1, 0x1d, 0x8b, 0xc3, 0xb6, 0x49, 0xdb, 0xd2, 0xe1, 0x29, 0xec, 0xb3, 0x4c, - 0xcf, 0xe8, 0x7a, 0x03, 0x61, 0xf0, 0x33, 0xb0, 0xdf, 0x77, 0x86, 0x4e, 0x5e, 0x80, 0xde, 0xa6, - 0xae, 0x37, 0xd0, 0xc9, 0xe1, 0x38, 0x27, 0x2d, 0x1d, 0x3f, 0x77, 0x4b, 0x89, 0x2f, 0x00, 0xb5, - 0x2d, 0x8a, 0x86, 0xb8, 0xe8, 0x74, 0x1e, 0x7f, 0x15, 0xf2, 0x81, 0x53, 0xf4, 0x54, 0x85, 0xbe, - 0xa6, 0x75, 0x82, 0xbe, 0x8a, 0xb1, 0xbe, 0x2c, 0xa9, 0xc0, 0x0c, 0x65, 0x2b, 0x4e, 0xac, 0x0d, - 0xc0, 0xff, 0x2c, 0xd3, 0xf4, 0x53, 0x02, 0xe0, 0x35, 0x0f, 0xad, 0xc4, 0xd9, 0x8a, 0xfe, 0x61, - 0x83, 0x13, 0x32, 0xcb, 0xe3, 0x84, 0x2b, 0xdc, 0x6e, 0x01, 0xf9, 0xe0, 0xa7, 0x3f, 0x3e, 0xe9, - 0x39, 0x4a, 0x79, 0x21, 0xe6, 0x27, 0x1a, 0x5f, 0xe3, 0xdd, 0x25, 0xd0, 0xef, 0xda, 0xa1, 0x63, - 0xd9, 0xfc, 0x39, 0xf0, 0x2a, 0x59, 0xc5, 0x11, 0xdd, 0x59, 0x0f, 0xdd, 0x73, 0x74, 0x32, 0x1d, - 0x9d, 0xb0, 0x12, 0xec, 0xb3, 0x55, 0xfa, 0x2b, 0x81, 0x42, 0xd4, 0x8e, 0x4d, 0xa7, 0xb2, 0x41, - 0x09, 0x4f, 0x4c, 0xdc, 0xf3, 0x1d, 0x68, 0x22, 0x9f, 0x4b, 0x1e, 0x9f, 0x2a, 0x3d, 0xd3, 0x01, - 0x1f, 0xc1, 0xf7, 0xba, 0xa3, 0xff, 0x12, 0x78, 0x3a, 0x71, 0x31, 0xa5, 0xd5, 0x6c, 0x50, 0x13, - 0xe6, 0x43, 0x6e, 0x7a, 0x2b, 0x26, 0x90, 0xf6, 0xac, 0x47, 0xfb, 0x22, 0xbd, 0xd0, 0x09, 0x6d, - 0x6f, 0xc0, 0xf3, 0x07, 0xe0, 0x7b, 0x02, 0xe0, 0xf9, 0x4b, 0x69, 0x96, 0xd0, 0xe6, 0x96, 0xd2, - 0x2c, 0xe1, 0x11, 0x9e, 0x7f, 0xcf, 0xe3, 0x51, 0xa3, 0x33, 0x5b, 0x4c, 0x9f, 0xb0, 0x12, 0x7c, - 0xa9, 0xac, 0xd2, 0x7f, 0x08, 0xe4, 0x23, 0xe2, 0x48, 0x4f, 0x25, 0xe2, 0x8c, 0x5f, 0x4d, 0xb9, - 0xa9, 0xf6, 0x15, 0x91, 0xa9, 0xe1, 0x31, 0x55, 0xa8, 0xdc, 0x6d, 0xa6, 0x91, 0xe9, 0xa4, 0x3f, - 0x10, 0x28, 0x44, 0xed, 0x62, 0x29, 0xad, 0x9a, 0xb0, 0x76, 0xa6, 0xb4, 0x6a, 0xd2, 0xe2, 0xc7, - 0x57, 0xbd, 0x08, 0x9c, 0xa4, 0x27, 0xe2, 0x22, 0x90, 0x98, 0xcf, 0x56, 0x7f, 0x26, 0xae, 0x30, - 0x29, 0xfd, 0x99, 0x65, 0x7f, 0x4b, 0xe9, 0xcf, 0x4c, 0x1b, 0x54, 0xc6, 0xfe, 0x74, 0xe9, 0x65, - 0x4c, 0x28, 0xa3, 0xdf, 0x11, 0xd8, 0x13, 0x98, 0xd0, 0xe9, 0x78, 0x22, 0xda, 0xa8, 0x75, 0x88, - 0x9b, 0x68, 0x47, 0x05, 0x09, 0x5d, 0xf6, 0x08, 0xbd, 0x4c, 0xab, 0x9d, 0x10, 0x32, 0x02, 0xb0, - 0x1f, 0x11, 0xc8, 0x47, 0xcc, 0xb6, 0x29, 0x9d, 0x19, 0x3f, 0xc4, 0x73, 0x53, 0xed, 0x2b, 0x22, - 0xb5, 0x8b, 0x1e, 0xb5, 0xb3, 0xf4, 0xa5, 0x4e, 0xa8, 0xf9, 0x5e, 0xe6, 0x1b, 0x04, 0x68, 0xd8, - 0x19, 0x3d, 0xd9, 0x26, 0x3a, 0x87, 0xd5, 0xa9, 0xb6, 0xf5, 0x90, 0xd4, 0xbb, 0x1e, 0xa9, 0x2b, - 0xf4, 0xf5, 0xad, 0x91, 0x0a, 0xcf, 0x00, 0xdf, 0x10, 0xd8, 0x1b, 0x1c, 0x26, 0x69, 0x72, 0x51, - 0x45, 0x4e, 0xbb, 0xdc, 0x64, 0x5b, 0x3a, 0xc8, 0xec, 0x45, 0x8f, 0xd9, 0x04, 0x7d, 0x36, 0x8e, - 0x59, 0xdd, 0x55, 0x9e, 0x53, 0xb5, 0x6b, 0xba, 0xb0, 0x62, 0x0f, 0xd2, 0xab, 0xf4, 0x43, 0x02, - 0xbd, 0xad, 0x11, 0x95, 0x0e, 0x25, 0x3a, 0xf7, 0x4d, 0xc3, 0xdc, 0x70, 0x06, 0x49, 0x04, 0x37, - 0xec, 0x81, 0x2b, 0xd2, 0xc3, 0x71, 0xe0, 0x5a, 0x13, 0x31, 0xfd, 0x88, 0x40, 0x9f, 0x3d, 0xbf, - 0xd2, 0x91, 0x64, 0x07, 0xfe, 0x91, 0x99, 0x1b, 0xcd, 0x24, 0x8b, 0x70, 0x46, 0x3d, 0x38, 0x65, - 0x5a, 0x8c, 0x85, 0x63, 0x4f, 0xd1, 0xe7, 0x1f, 0xac, 0x17, 0xc9, 0xc3, 0xf5, 0x22, 0xf9, 0x7d, - 0xbd, 0x48, 0x3e, 0xde, 0x28, 0xe6, 0x1e, 0x6e, 0x14, 0x73, 0xbf, 0x6c, 0x14, 0x73, 0x6f, 0x1f, - 0x57, 0x54, 0xb3, 0xbe, 0x34, 0x5f, 0x59, 0xd0, 0x17, 0x1d, 0x1b, 0xf6, 0x7f, 0x63, 0x4c, 0xba, - 0x2e, 0xdc, 0x74, 0x0d, 0x9a, 0xb7, 0x9a, 0x32, 0x9b, 0xef, 0xb3, 0xfe, 0x56, 0x38, 0xf9, 0x5f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x04, 0xb1, 0x80, 0x02, 0x3a, 0x1d, 0x00, 0x00, + // 1389 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xdb, 0x6b, 0x1c, 0x65, + 0x1b, 0xdf, 0x37, 0xcd, 0x17, 0xbe, 0x3c, 0xa5, 0xa5, 0x7d, 0x77, 0x1b, 0xd3, 0x69, 0xba, 0xd9, + 0x0c, 0xa5, 0xe6, 0xd0, 0xec, 0x98, 0xa4, 0xb6, 0xb1, 0xa2, 0xed, 0xc6, 0x52, 0x5b, 0x5b, 0xda, + 0x74, 0xc5, 0xe0, 0x91, 0x30, 0xc9, 0x4c, 0x67, 0x87, 0x6e, 0x66, 0xb6, 0xf3, 0x4e, 0x42, 0x4b, + 0x08, 0x82, 0x17, 0xd2, 0x2b, 0x11, 0xbc, 0x97, 0x5e, 0x8a, 0x28, 0xe4, 0x22, 0x15, 0xbd, 0xd0, + 0x4b, 0xe9, 0x85, 0x48, 0xa8, 0x54, 0xf4, 0xa6, 0x4a, 0x22, 0xe8, 0x8d, 0xff, 0x81, 0x88, 0xec, + 0xcc, 0x33, 0xa7, 0xcc, 0x61, 0x67, 0x37, 0x1b, 0x48, 0x6e, 0xda, 0xdd, 0x77, 0x9e, 0xc3, 0xef, + 0xf7, 0x1c, 0xde, 0x79, 0x9e, 0x0d, 0xf0, 0xf3, 0x3a, 0x5b, 0xd0, 0x99, 0xc0, 0x4c, 0xf1, 0xb6, + 0xaa, 0x29, 0xc2, 0xd2, 0xd8, 0x9c, 0x6c, 0x8a, 0x63, 0xc2, 0x9d, 0x45, 0xd9, 0xb8, 0x57, 0xac, + 0x19, 0xba, 0xa9, 0xd3, 0x1e, 0x5b, 0xa6, 0x88, 0x32, 0x45, 0x94, 0xe1, 0x86, 0x51, 0x77, 0x4e, + 0x64, 0xb2, 0xad, 0xe0, 0xaa, 0xd7, 0x44, 0x45, 0xd5, 0x44, 0x53, 0xd5, 0x35, 0xdb, 0x06, 0x97, + 0x53, 0x74, 0x45, 0xb7, 0x3e, 0x0a, 0xf5, 0x4f, 0x78, 0xda, 0xa7, 0xe8, 0xba, 0x52, 0x95, 0x05, + 0xb1, 0xa6, 0x0a, 0xa2, 0xa6, 0xe9, 0xa6, 0xa5, 0xc2, 0xf0, 0xe9, 0x89, 0x18, 0x6c, 0x0e, 0x0e, + 0x5b, 0xea, 0xa8, 0x2d, 0x35, 0x6b, 0x1b, 0x47, 0xa8, 0xf6, 0xa3, 0x63, 0x68, 0xc0, 0xc1, 0xe6, + 0x67, 0xc5, 0x1d, 0x16, 0x17, 0x54, 0x4d, 0x17, 0xac, 0x7f, 0xed, 0x23, 0xfe, 0x2e, 0xf4, 0xdc, + 0xac, 0x4b, 0xcc, 0x88, 0x55, 0x55, 0x12, 0x4d, 0xdd, 0x60, 0x65, 0xf9, 0xce, 0xa2, 0xcc, 0x4c, + 0xda, 0x03, 0x5d, 0xcc, 0x14, 0xcd, 0x45, 0xd6, 0x4b, 0x0a, 0x64, 0xb0, 0xbb, 0x8c, 0xdf, 0xe8, + 0x25, 0x00, 0x8f, 0x6a, 0x6f, 0x47, 0x81, 0x0c, 0xee, 0x1f, 0x3f, 0x59, 0x44, 0x10, 0xf5, 0xb8, + 0x14, 0x6d, 0x97, 0x08, 0xbd, 0x38, 0x2d, 0x2a, 0x32, 0xda, 0x2c, 0xfb, 0x34, 0xf9, 0x55, 0x02, + 0xcf, 0x84, 0x5c, 0xb3, 0x9a, 0xae, 0x31, 0x99, 0x5e, 0x03, 0x58, 0x72, 0x4f, 0x7b, 0x49, 0x61, + 0xdf, 0xe0, 0xfe, 0xf1, 0x81, 0x62, 0x74, 0x4e, 0x8a, 0xae, 0xfe, 0x54, 0xf7, 0xa3, 0xa7, 0xfd, + 0x99, 0xcf, 0xfe, 0x5c, 0x1d, 0x26, 0x65, 0x9f, 0x3e, 0x7d, 0x35, 0x02, 0xf1, 0xb3, 0x0d, 0x11, + 0xdb, 0x50, 0x02, 0x90, 0x45, 0x38, 0x12, 0x44, 0xec, 0xc4, 0xea, 0x32, 0x1c, 0x74, 0xfd, 0xcd, + 0x8a, 0x92, 0x64, 0xd8, 0x31, 0x9b, 0x1a, 0x78, 0xbc, 0x36, 0x7a, 0x1c, 0x1d, 0xb9, 0x4a, 0x25, + 0x49, 0x32, 0x64, 0xc6, 0x5e, 0x37, 0x0d, 0x55, 0x53, 0xca, 0x07, 0x96, 0xfc, 0xe7, 0xbc, 0xb4, + 0x35, 0x1f, 0x6e, 0x4c, 0x5e, 0x83, 0x6e, 0x57, 0xd4, 0x32, 0xdf, 0x6c, 0x48, 0x3c, 0x75, 0x7e, + 0x8d, 0x40, 0x21, 0xe8, 0xe6, 0xa2, 0x5c, 0x95, 0x15, 0xbb, 0x14, 0xdb, 0x4e, 0xaa, 0x6d, 0x25, + 0xf3, 0x37, 0x81, 0x81, 0x04, 0xd8, 0x18, 0xa8, 0xf7, 0x21, 0x27, 0xb9, 0xc7, 0xb3, 0x06, 0x1e, + 0x3b, 0x65, 0x34, 0x1c, 0x17, 0x33, 0xcf, 0x94, 0x63, 0x69, 0xaa, 0x50, 0x0f, 0xde, 0xe7, 0xbf, + 0xf5, 0x67, 0xc3, 0xcf, 0x98, 0x1d, 0xd3, 0xac, 0x14, 0x7e, 0xd2, 0xbe, 0x7a, 0xfb, 0x96, 0xc0, + 0x50, 0x90, 0xef, 0x1b, 0xda, 0x9c, 0xae, 0x49, 0xaa, 0xa6, 0xec, 0x89, 0x7c, 0x3d, 0x25, 0x30, + 0x9c, 0x06, 0x3f, 0x26, 0x4e, 0x81, 0xec, 0xa2, 0xf3, 0x3c, 0x94, 0xb7, 0x91, 0xb8, 0xbc, 0x45, + 0x98, 0xf4, 0x57, 0x3d, 0x75, 0x4d, 0xee, 0x40, 0x82, 0xbe, 0x24, 0xd8, 0xae, 0xfe, 0x02, 0xb1, + 0xb3, 0x71, 0x1e, 0x0e, 0x62, 0x6d, 0x04, 0xb3, 0xd1, 0xfb, 0x78, 0x6d, 0x34, 0x87, 0xae, 0xb6, + 0x24, 0xc1, 0x95, 0xb7, 0x92, 0x10, 0x4e, 0x67, 0x47, 0x6b, 0xe9, 0x3c, 0xf7, 0xff, 0xfb, 0x0f, + 0xfa, 0x33, 0x7f, 0x3d, 0xe8, 0xcf, 0xf0, 0x4b, 0x78, 0xe5, 0x86, 0xeb, 0x99, 0xbe, 0x03, 0xd9, + 0x88, 0xae, 0xc1, 0x8b, 0xa6, 0x89, 0xa6, 0x29, 0xd3, 0x70, 0x4b, 0xf0, 0x5f, 0x11, 0xe8, 0xb7, + 0x1c, 0x47, 0x24, 0x6b, 0x57, 0x07, 0xcc, 0xc0, 0x7b, 0x32, 0x12, 0x37, 0x46, 0xee, 0x3a, 0x74, + 0xd9, 0x35, 0x86, 0xc1, 0x6a, 0xb5, 0x52, 0xd1, 0x0a, 0xff, 0xd0, 0xb9, 0x9c, 0x2f, 0x3a, 0xf4, + 0x22, 0x9a, 0x7d, 0xdb, 0xd1, 0x6a, 0x53, 0x8f, 0xfb, 0x62, 0xf5, 0xb3, 0x73, 0x3b, 0x47, 0xe3, + 0xc6, 0x68, 0x55, 0xda, 0x76, 0x3b, 0xfb, 0x42, 0xb7, 0xb3, 0xd7, 0xf0, 0x77, 0xce, 0x35, 0xec, + 0x12, 0x4b, 0xba, 0x86, 0x77, 0x61, 0x66, 0xdc, 0x7b, 0xb8, 0x01, 0x81, 0x3d, 0x7b, 0x0f, 0xaf, + 0x77, 0xc0, 0x51, 0x8b, 0x60, 0x59, 0x96, 0x76, 0x20, 0x23, 0x37, 0x80, 0x32, 0x63, 0x7e, 0xb6, + 0xd5, 0xdb, 0xe5, 0x10, 0x33, 0xe6, 0x03, 0x8f, 0xea, 0x06, 0x25, 0x66, 0x6e, 0x35, 0xb8, 0x2f, + 0xb5, 0x41, 0x89, 0x99, 0x33, 0x09, 0x6f, 0xec, 0xce, 0x36, 0xd4, 0xcc, 0x13, 0x02, 0x5c, 0x54, + 0x48, 0xb1, 0x46, 0x34, 0xe8, 0x31, 0xe4, 0x84, 0x46, 0x3e, 0x15, 0x57, 0x26, 0x7e, 0x73, 0x51, + 0xad, 0x7c, 0xc4, 0x90, 0x77, 0xb4, 0x99, 0xd7, 0x9c, 0x57, 0x91, 0xdb, 0x0b, 0xe1, 0xd5, 0x67, + 0x17, 0xb6, 0xf0, 0x37, 0xa1, 0x97, 0xc2, 0xde, 0x59, 0x9b, 0x1e, 0x12, 0xc8, 0xc7, 0x60, 0xdf, + 0xd5, 0x2f, 0xff, 0x85, 0xd8, 0x4a, 0xd9, 0x91, 0xa5, 0xec, 0x34, 0x36, 0xdc, 0x65, 0x95, 0x99, + 0xba, 0xa1, 0xce, 0x8b, 0xd5, 0x2b, 0xda, 0x2d, 0xdd, 0xb7, 0x8e, 0x57, 0x64, 0x55, 0xa9, 0x98, + 0x96, 0x9b, 0x7d, 0x65, 0xfc, 0xc6, 0xbf, 0x05, 0xc7, 0x22, 0xb5, 0x10, 0xe0, 0x39, 0xe8, 0xac, + 0xa8, 0xcc, 0x44, 0x6c, 0x27, 0xe3, 0xb0, 0x6d, 0xd1, 0xb6, 0x74, 0x78, 0x0a, 0x87, 0x2c, 0xd3, + 0xd3, 0xba, 0x5e, 0x45, 0x18, 0xfc, 0x34, 0x1c, 0xf6, 0x9d, 0xa1, 0x93, 0x17, 0xa1, 0xb3, 0xa6, + 0xeb, 0x55, 0x74, 0xd2, 0x17, 0xe7, 0xa4, 0xae, 0xe3, 0xe7, 0x6e, 0x29, 0xf1, 0x39, 0xa0, 0xb6, + 0x45, 0xd1, 0x10, 0x17, 0x9c, 0x16, 0xe4, 0xdf, 0x84, 0x6c, 0xe0, 0x14, 0x3d, 0x95, 0xa0, 0xab, + 0x66, 0x9d, 0xa0, 0xaf, 0x7c, 0xac, 0x2f, 0x4b, 0x2a, 0x30, 0x5e, 0xd9, 0x8a, 0xe3, 0xab, 0x3d, + 0xf0, 0x3f, 0xcb, 0x34, 0xfd, 0x94, 0x00, 0x78, 0x5d, 0x44, 0x8b, 0x71, 0xb6, 0xa2, 0x7f, 0x20, + 0xe1, 0x84, 0xd4, 0xf2, 0x38, 0x05, 0x0b, 0xf7, 0xeb, 0x40, 0x3e, 0xf8, 0xe9, 0x8f, 0x4f, 0x3a, + 0x4e, 0x50, 0x5e, 0x88, 0xf9, 0xa9, 0xc7, 0xd7, 0x81, 0x5f, 0x10, 0xe8, 0x76, 0xed, 0xd0, 0xd1, + 0x74, 0xfe, 0x1c, 0x78, 0xc5, 0xb4, 0xe2, 0x88, 0xee, 0x82, 0x87, 0xee, 0x79, 0x3a, 0xd1, 0x18, + 0x9d, 0xb0, 0x1c, 0x6c, 0xb8, 0x15, 0xfa, 0x2b, 0x81, 0x5c, 0xd4, 0x66, 0x4e, 0x27, 0xd3, 0x41, + 0x09, 0x0f, 0x53, 0xdc, 0x0b, 0x2d, 0x68, 0x22, 0x9f, 0x6b, 0x1e, 0x9f, 0x12, 0x3d, 0xdf, 0x02, + 0x1f, 0xc1, 0xf7, 0xde, 0xa3, 0xff, 0x12, 0x38, 0x9e, 0xb8, 0xc5, 0xd2, 0x52, 0x3a, 0xa8, 0x09, + 0xa3, 0x23, 0x37, 0xb5, 0x1d, 0x13, 0x48, 0x7b, 0xc6, 0xa3, 0x7d, 0x95, 0x5e, 0x69, 0x85, 0xb6, + 0x37, 0xfb, 0xf9, 0x03, 0xf0, 0x03, 0x01, 0xf0, 0xfc, 0x35, 0x68, 0x96, 0xd0, 0x76, 0xd7, 0xa0, + 0x59, 0xc2, 0xd3, 0x3d, 0xff, 0x9e, 0xc7, 0xa3, 0x4c, 0xa7, 0xb7, 0x99, 0x3e, 0x61, 0x39, 0xf8, + 0x76, 0x59, 0xa1, 0xff, 0x10, 0xc8, 0x46, 0xc4, 0x91, 0x9e, 0x4d, 0xc4, 0x19, 0xbf, 0xbe, 0x72, + 0x93, 0xcd, 0x2b, 0x22, 0x53, 0xc3, 0x63, 0xaa, 0x50, 0xb9, 0xdd, 0x4c, 0x23, 0xd3, 0x49, 0x7f, + 0x24, 0x90, 0x8b, 0x5a, 0xd3, 0x1a, 0xb4, 0x6a, 0xc2, 0x46, 0xda, 0xa0, 0x55, 0x93, 0x76, 0x42, + 0xbe, 0xe4, 0x45, 0xe0, 0x0c, 0x3d, 0x1d, 0x17, 0x81, 0xc4, 0x7c, 0xd6, 0xfb, 0x33, 0x71, 0xbb, + 0x69, 0xd0, 0x9f, 0x69, 0x56, 0xbb, 0x06, 0xfd, 0x99, 0x6a, 0xb9, 0x4a, 0xd9, 0x9f, 0x2e, 0xbd, + 0x94, 0x09, 0x65, 0xf4, 0x7b, 0x02, 0x07, 0x02, 0xa3, 0x3a, 0x1d, 0x4b, 0x44, 0x1b, 0xb5, 0x29, + 0x71, 0xe3, 0xcd, 0xa8, 0x20, 0xa1, 0xeb, 0x1e, 0xa1, 0x57, 0x68, 0xa9, 0x15, 0x42, 0x46, 0x00, + 0xf6, 0x13, 0x02, 0xd9, 0x88, 0x21, 0xb7, 0x41, 0x67, 0xc6, 0x4f, 0xf3, 0xdc, 0x64, 0xf3, 0x8a, + 0x48, 0xed, 0xaa, 0x47, 0xed, 0x02, 0x7d, 0xb9, 0x15, 0x6a, 0xbe, 0x97, 0xf9, 0x26, 0x01, 0x1a, + 0x76, 0x46, 0xcf, 0x34, 0x89, 0xce, 0x61, 0x75, 0xb6, 0x69, 0x3d, 0x24, 0xf5, 0xae, 0x47, 0xea, + 0x26, 0xbd, 0xb1, 0x3d, 0x52, 0xe1, 0x19, 0xe0, 0x6b, 0x02, 0x07, 0x83, 0xc3, 0x24, 0x4d, 0x2e, + 0xaa, 0xc8, 0x69, 0x97, 0x9b, 0x68, 0x4a, 0x07, 0x99, 0xbd, 0xe4, 0x31, 0x1b, 0xa7, 0xcf, 0xc5, + 0x31, 0xab, 0xb8, 0xca, 0xb3, 0xaa, 0x76, 0x4b, 0x17, 0x96, 0xed, 0x41, 0x7a, 0x85, 0x7e, 0x48, + 0xa0, 0xb3, 0x3e, 0xa2, 0xd2, 0xc1, 0x44, 0xe7, 0xbe, 0x69, 0x98, 0x1b, 0x4a, 0x21, 0x89, 0xe0, + 0x86, 0x3c, 0x70, 0x79, 0xda, 0x17, 0x07, 0xae, 0x3e, 0x11, 0xd3, 0x8f, 0x08, 0x74, 0xd9, 0xf3, + 0x2b, 0x1d, 0x4e, 0x76, 0xe0, 0x1f, 0x99, 0xb9, 0x91, 0x54, 0xb2, 0x08, 0x67, 0xc4, 0x83, 0x53, + 0xa0, 0xf9, 0x58, 0x38, 0xf6, 0x14, 0x7d, 0xe9, 0xd1, 0x46, 0x9e, 0xac, 0x6f, 0xe4, 0xc9, 0xef, + 0x1b, 0x79, 0xf2, 0xf1, 0x66, 0x3e, 0xb3, 0xbe, 0x99, 0xcf, 0xfc, 0xb2, 0x99, 0xcf, 0xbc, 0x7d, + 0x4a, 0x51, 0xcd, 0xca, 0xe2, 0x5c, 0x71, 0x5e, 0x5f, 0x70, 0x6c, 0xd8, 0xff, 0x8d, 0x32, 0xe9, + 0xb6, 0x70, 0xd7, 0x35, 0x68, 0xde, 0xab, 0xc9, 0x6c, 0xae, 0xcb, 0xfa, 0x9b, 0xe3, 0xc4, 0x7f, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x44, 0xdb, 0xeb, 0x04, 0x82, 0x1d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/staking/types/staking.pb.go b/x/staking/types/staking.pb.go index 9833486af700..0f8b583e7a9b 100644 --- a/x/staking/types/staking.pb.go +++ b/x/staking/types/staking.pb.go @@ -6,12 +6,12 @@ package types import ( bytes "bytes" compress_gzip "compress/gzip" + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" types3 "github.com/cometbft/cometbft/abci/types" types "github.com/cometbft/cometbft/proto/tendermint/types" _ "github.com/cosmos/cosmos-proto" types1 "github.com/cosmos/cosmos-sdk/codec/types" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types2 "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" @@ -168,11 +168,11 @@ func (m *HistoricalInfo) GetValset() []Validator { // a validator. type CommissionRates struct { // rate is the commission rate charged to delegators, as a fraction. - Rate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=rate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"rate"` + Rate cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=rate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"rate"` // max_rate defines the maximum commission rate which validator can ever charge, as a fraction. - MaxRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=max_rate,json=maxRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_rate"` + MaxRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=max_rate,json=maxRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"max_rate"` // max_change_rate defines the maximum daily increase of the validator commission, as a fraction. - MaxChangeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=max_change_rate,json=maxChangeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_change_rate"` + MaxChangeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=max_change_rate,json=maxChangeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"max_change_rate"` } func (m *CommissionRates) Reset() { *m = CommissionRates{} } @@ -356,9 +356,9 @@ type Validator struct { // status is the validator status (bonded/unbonding/unbonded). Status BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status,omitempty"` // tokens define the delegated tokens (incl. self-delegation). - Tokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens"` + Tokens cosmossdk_io_math.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=cosmossdk.io/math.Int" json:"tokens"` // delegator_shares defines total shares issued to a validator's delegators. - DelegatorShares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=delegator_shares,json=delegatorShares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"delegator_shares"` + DelegatorShares cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=delegator_shares,json=delegatorShares,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"delegator_shares"` // description defines the description terms for the validator. Description Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description"` // unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. @@ -370,7 +370,7 @@ type Validator struct { // min_self_delegation is the validator's self declared minimum self delegation. // // Since: cosmos-sdk 0.46 - MinSelfDelegation github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_self_delegation"` + MinSelfDelegation cosmossdk_io_math.Int `protobuf:"bytes,11,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=cosmossdk.io/math.Int" json:"min_self_delegation"` // strictly positive if this validator's unbonding has been stopped by external modules UnbondingOnHoldRefCount int64 `protobuf:"varint,12,opt,name=unbonding_on_hold_ref_count,json=unbondingOnHoldRefCount,proto3" json:"unbonding_on_hold_ref_count,omitempty"` // list of unbonding ids, each uniquely identifing an unbonding of this validator @@ -633,12 +633,12 @@ func (m *DVVTriplets) GetTriplets() []DVVTriplet { // owned by one delegator, and is associated with the voting power of one // validator. type Delegation struct { - // delegator_address is the bech32-encoded address of the delegator. + // delegator_address is the encoded address of the delegator. DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` - // validator_address is the bech32-encoded address of the validator. + // validator_address is the encoded address of the validator. ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` // shares define the delegation shares received. - Shares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=shares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares"` + Shares cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=shares,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"shares"` } func (m *Delegation) Reset() { *m = Delegation{} } @@ -677,9 +677,9 @@ var xxx_messageInfo_Delegation proto.InternalMessageInfo // UnbondingDelegation stores all of a single delegator's unbonding bonds // for a single validator in an time-ordered list. type UnbondingDelegation struct { - // delegator_address is the bech32-encoded address of the delegator. + // delegator_address is the encoded address of the delegator. DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` - // validator_address is the bech32-encoded address of the validator. + // validator_address is the encoded address of the validator. ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` // entries are the unbonding delegation entries. Entries []UnbondingDelegationEntry `protobuf:"bytes,3,rep,name=entries,proto3" json:"entries"` @@ -725,9 +725,9 @@ type UnbondingDelegationEntry struct { // completion_time is the unix time for unbonding completion. CompletionTime time.Time `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time"` // initial_balance defines the tokens initially scheduled to receive at completion. - InitialBalance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=initial_balance,json=initialBalance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"initial_balance"` + InitialBalance cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=initial_balance,json=initialBalance,proto3,customtype=cosmossdk.io/math.Int" json:"initial_balance"` // balance defines the tokens to receive at completion. - Balance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=balance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"balance"` + Balance cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=balance,proto3,customtype=cosmossdk.io/math.Int" json:"balance"` // Incrementing id that uniquely identifies this entry UnbondingId uint64 `protobuf:"varint,5,opt,name=unbonding_id,json=unbondingId,proto3" json:"unbonding_id,omitempty"` // Strictly positive if this entry's unbonding has been stopped by external modules @@ -802,9 +802,9 @@ type RedelegationEntry struct { // completion_time defines the unix time for redelegation completion. CompletionTime time.Time `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time"` // initial_balance defines the initial balance when redelegation started. - InitialBalance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=initial_balance,json=initialBalance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"initial_balance"` + InitialBalance cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=initial_balance,json=initialBalance,proto3,customtype=cosmossdk.io/math.Int" json:"initial_balance"` // shares_dst is the amount of destination-validator shares created by redelegation. - SharesDst github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=shares_dst,json=sharesDst,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares_dst"` + SharesDst cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=shares_dst,json=sharesDst,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"shares_dst"` // Incrementing id that uniquely identifies this entry UnbondingId uint64 `protobuf:"varint,5,opt,name=unbonding_id,json=unbondingId,proto3" json:"unbonding_id,omitempty"` // Strictly positive if this entry's unbonding has been stopped by external modules @@ -931,7 +931,7 @@ type Params struct { // bond_denom defines the bondable coin denomination. BondDenom string `protobuf:"bytes,5,opt,name=bond_denom,json=bondDenom,proto3" json:"bond_denom,omitempty"` // min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators - MinCommissionRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=min_commission_rate,json=minCommissionRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_commission_rate" yaml:"min_commission_rate"` + MinCommissionRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=min_commission_rate,json=minCommissionRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_commission_rate" yaml:"min_commission_rate"` } func (m *Params) Reset() { *m = Params{} } @@ -1060,8 +1060,8 @@ func (m *DelegationResponse) GetBalance() types2.Coin { // contains a balance in addition to shares which is more suitable for client // responses. type RedelegationEntryResponse struct { - RedelegationEntry RedelegationEntry `protobuf:"bytes,1,opt,name=redelegation_entry,json=redelegationEntry,proto3" json:"redelegation_entry"` - Balance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=balance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"balance"` + RedelegationEntry RedelegationEntry `protobuf:"bytes,1,opt,name=redelegation_entry,json=redelegationEntry,proto3" json:"redelegation_entry"` + Balance cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=balance,proto3,customtype=cosmossdk.io/math.Int" json:"balance"` } func (m *RedelegationEntryResponse) Reset() { *m = RedelegationEntryResponse{} } @@ -1162,8 +1162,8 @@ func (m *RedelegationResponse) GetEntries() []RedelegationEntryResponse { // Pool is used for tracking bonded and not-bonded token supply of the bond // denomination. type Pool struct { - NotBondedTokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=not_bonded_tokens,json=notBondedTokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"not_bonded_tokens"` - BondedTokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=bonded_tokens,json=bondedTokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"bonded_tokens"` + NotBondedTokens cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=not_bonded_tokens,json=notBondedTokens,proto3,customtype=cosmossdk.io/math.Int" json:"not_bonded_tokens"` + BondedTokens cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=bonded_tokens,json=bondedTokens,proto3,customtype=cosmossdk.io/math.Int" json:"bonded_tokens"` } func (m *Pool) Reset() { *m = Pool{} } @@ -1276,125 +1276,126 @@ func init() { } var fileDescriptor_64c30c6cf92913c9 = []byte{ - // 1883 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x3d, 0x6c, 0x23, 0xc7, - 0x15, 0xd6, 0x92, 0x32, 0x25, 0x3d, 0x4a, 0x22, 0x35, 0x27, 0xdf, 0xf1, 0x78, 0x89, 0x48, 0xd3, - 0x17, 0x5b, 0x3e, 0xf8, 0xa8, 0x9c, 0x02, 0xa4, 0x50, 0x8c, 0x04, 0xa2, 0xa8, 0xf3, 0xd1, 0xb1, - 0x25, 0x61, 0x29, 0x29, 0x71, 0x7e, 0xb0, 0x18, 0xee, 0x8e, 0xa8, 0x89, 0xb8, 0xb3, 0xc4, 0xce, - 0xf0, 0x2c, 0xb6, 0x41, 0x0a, 0x43, 0x45, 0x62, 0x20, 0x4d, 0x9a, 0x03, 0x0e, 0x48, 0x11, 0xa7, - 0x73, 0x61, 0xc4, 0x45, 0x90, 0x22, 0x9d, 0x93, 0x34, 0x07, 0x57, 0x41, 0x0a, 0x25, 0xb8, 0x2b, - 0x6c, 0xa4, 0x0a, 0xd2, 0x25, 0x55, 0x30, 0xb3, 0xb3, 0x3f, 0x14, 0xc5, 0x93, 0x74, 0x50, 0x0c, - 0x03, 0x6e, 0xc8, 0x9d, 0x99, 0xf7, 0xbe, 0x99, 0xf7, 0xbd, 0x9f, 0xf9, 0x81, 0x9b, 0xb6, 0xc7, - 0x5d, 0x8f, 0x2f, 0x71, 0x81, 0x0f, 0x28, 0x6b, 0x2f, 0xdd, 0xbf, 0xd3, 0x22, 0x02, 0xdf, 0x09, - 0xdb, 0xd5, 0xae, 0xef, 0x09, 0x0f, 0x5d, 0x0d, 0xa4, 0xaa, 0x61, 0xaf, 0x96, 0x2a, 0xce, 0xb7, - 0xbd, 0xb6, 0xa7, 0x44, 0x96, 0xe4, 0x57, 0x20, 0x5d, 0xbc, 0xde, 0xf6, 0xbc, 0x76, 0x87, 0x2c, - 0xa9, 0x56, 0xab, 0xb7, 0xb7, 0x84, 0x59, 0x5f, 0x0f, 0x2d, 0x9c, 0x1c, 0x72, 0x7a, 0x3e, 0x16, - 0xd4, 0x63, 0x7a, 0xbc, 0x74, 0x72, 0x5c, 0x50, 0x97, 0x70, 0x81, 0xdd, 0x6e, 0x88, 0x1d, 0xac, - 0xc4, 0x0a, 0x26, 0xd5, 0xcb, 0xd2, 0xd8, 0xda, 0x94, 0x16, 0xe6, 0x24, 0xb2, 0xc3, 0xf6, 0x68, - 0x88, 0x3d, 0x87, 0x5d, 0xca, 0xbc, 0x25, 0xf5, 0xab, 0xbb, 0xbe, 0x22, 0x08, 0x73, 0x88, 0xef, - 0x52, 0x26, 0x96, 0x44, 0xbf, 0x4b, 0x78, 0xf0, 0xab, 0x47, 0x6f, 0x24, 0x46, 0x71, 0xcb, 0xa6, - 0xc9, 0xc1, 0xca, 0x2f, 0x0d, 0x98, 0xbd, 0x47, 0xb9, 0xf0, 0x7c, 0x6a, 0xe3, 0x4e, 0x83, 0xed, - 0x79, 0xe8, 0x5b, 0x90, 0xd9, 0x27, 0xd8, 0x21, 0x7e, 0xc1, 0x28, 0x1b, 0x8b, 0xd9, 0xe5, 0x42, - 0x35, 0x06, 0xa8, 0x06, 0xba, 0xf7, 0xd4, 0x78, 0x6d, 0xea, 0xe3, 0xe3, 0xd2, 0xd8, 0xfb, 0x9f, - 0x7e, 0x70, 0xcb, 0x30, 0xb5, 0x0a, 0xaa, 0x43, 0xe6, 0x3e, 0xee, 0x70, 0x22, 0x0a, 0xa9, 0x72, - 0x7a, 0x31, 0xbb, 0xfc, 0x42, 0xf5, 0x74, 0xce, 0xab, 0xbb, 0xb8, 0x43, 0x1d, 0x2c, 0xbc, 0x41, - 0x94, 0x40, 0xb7, 0xf2, 0x51, 0x0a, 0x72, 0x6b, 0x9e, 0xeb, 0x52, 0xce, 0xa9, 0xc7, 0x4c, 0x2c, - 0x08, 0x47, 0x3b, 0x30, 0xee, 0x63, 0x41, 0xd4, 0xa2, 0xa6, 0x6a, 0xab, 0x52, 0xe9, 0x6f, 0xc7, - 0xa5, 0x97, 0xda, 0x54, 0xec, 0xf7, 0x5a, 0x55, 0xdb, 0x73, 0x35, 0x8d, 0xfa, 0xef, 0x36, 0x77, - 0x0e, 0xb4, 0xa5, 0x75, 0x62, 0x7f, 0xf2, 0xe1, 0x6d, 0xd0, 0x0b, 0xa9, 0x13, 0x3b, 0x98, 0x4c, - 0xc1, 0xa1, 0x1f, 0xc1, 0xa4, 0x8b, 0x0f, 0x2d, 0x05, 0x9d, 0xba, 0x2c, 0xe8, 0x09, 0x17, 0x1f, - 0xca, 0x55, 0x23, 0x0a, 0x39, 0x89, 0x6e, 0xef, 0x63, 0xd6, 0x26, 0xc1, 0x24, 0xe9, 0xcb, 0x9a, - 0x64, 0xc6, 0xc5, 0x87, 0x6b, 0x0a, 0x58, 0x4e, 0xb5, 0x32, 0xfe, 0xd9, 0xc3, 0x92, 0x51, 0xf9, - 0xa3, 0x01, 0x10, 0x33, 0x87, 0x30, 0xe4, 0xed, 0xa8, 0xa5, 0xe6, 0xe7, 0xda, 0xab, 0x2f, 0x8f, - 0x72, 0xcc, 0x09, 0xde, 0x6b, 0x33, 0x72, 0xa5, 0x8f, 0x8e, 0x4b, 0x46, 0x30, 0x6b, 0xce, 0x3e, - 0xe1, 0x97, 0x37, 0x20, 0xdb, 0xeb, 0x3a, 0x58, 0x10, 0x4b, 0x06, 0xb9, 0xe2, 0x30, 0xbb, 0x5c, - 0xac, 0x06, 0x19, 0x50, 0x0d, 0x33, 0xa0, 0xba, 0x1d, 0x66, 0x40, 0x00, 0xf8, 0xde, 0xdf, 0x43, - 0x40, 0x08, 0xb4, 0xe5, 0xb8, 0xb6, 0xe1, 0x7d, 0x03, 0xb2, 0x75, 0xc2, 0x6d, 0x9f, 0x76, 0x65, - 0x4e, 0xa1, 0x02, 0x4c, 0xb8, 0x1e, 0xa3, 0x07, 0x3a, 0x22, 0xa7, 0xcc, 0xb0, 0x89, 0x8a, 0x30, - 0x49, 0x1d, 0xc2, 0x04, 0x15, 0xfd, 0xc0, 0x79, 0x66, 0xd4, 0x96, 0x5a, 0xef, 0x90, 0x16, 0xa7, - 0x21, 0xe5, 0x66, 0xd8, 0x44, 0xaf, 0x40, 0x9e, 0x13, 0xbb, 0xe7, 0x53, 0xd1, 0xb7, 0x6c, 0x8f, - 0x09, 0x6c, 0x8b, 0xc2, 0xb8, 0x12, 0xc9, 0x85, 0xfd, 0x6b, 0x41, 0xb7, 0x04, 0x71, 0x88, 0xc0, - 0xb4, 0xc3, 0x0b, 0xcf, 0x05, 0x20, 0xba, 0xa9, 0x97, 0xfa, 0xd1, 0x04, 0x4c, 0x45, 0x91, 0x8c, - 0xd6, 0x20, 0xef, 0x75, 0x89, 0x2f, 0xbf, 0x2d, 0xec, 0x38, 0x3e, 0xe1, 0x5c, 0x87, 0x6b, 0xe1, - 0x93, 0x0f, 0x6f, 0xcf, 0x6b, 0xc2, 0x57, 0x83, 0x91, 0xa6, 0xf0, 0x29, 0x6b, 0x9b, 0xb9, 0x50, - 0x43, 0x77, 0xa3, 0xb7, 0xa5, 0xcb, 0x18, 0x27, 0x8c, 0xf7, 0xb8, 0xd5, 0xed, 0xb5, 0x0e, 0x48, - 0x5f, 0x93, 0x3a, 0x3f, 0x44, 0xea, 0x2a, 0xeb, 0xd7, 0x0a, 0x7f, 0x8e, 0xa1, 0x6d, 0xbf, 0xdf, - 0x15, 0x5e, 0x75, 0xab, 0xd7, 0xfa, 0x2e, 0xe9, 0x4b, 0x57, 0x69, 0x9c, 0x2d, 0x05, 0x83, 0xae, - 0x42, 0xe6, 0x27, 0x98, 0x76, 0x88, 0xa3, 0x18, 0x99, 0x34, 0x75, 0x0b, 0xad, 0x40, 0x86, 0x0b, - 0x2c, 0x7a, 0x5c, 0xd1, 0x30, 0xbb, 0x5c, 0x19, 0x15, 0x1b, 0x35, 0x8f, 0x39, 0x4d, 0x25, 0x69, - 0x6a, 0x0d, 0xb4, 0x0d, 0x19, 0xe1, 0x1d, 0x10, 0xa6, 0x09, 0xaa, 0xbd, 0x76, 0x81, 0xc0, 0x6e, - 0x30, 0x91, 0x08, 0xec, 0x06, 0x13, 0xa6, 0xc6, 0x42, 0x6d, 0xc8, 0x3b, 0xa4, 0x43, 0xda, 0x8a, - 0x4a, 0xbe, 0x8f, 0x7d, 0xc2, 0x0b, 0x99, 0x0b, 0xe3, 0x0f, 0x25, 0x8e, 0x99, 0x8b, 0x50, 0x9b, - 0x0a, 0x14, 0x6d, 0x41, 0xd6, 0x89, 0x43, 0xad, 0x30, 0xa1, 0x88, 0x7e, 0x71, 0x94, 0xfd, 0x89, - 0xa8, 0x4c, 0x96, 0xad, 0x24, 0x84, 0x8c, 0xae, 0x1e, 0x6b, 0x79, 0xcc, 0xa1, 0xac, 0x6d, 0xed, - 0x13, 0xda, 0xde, 0x17, 0x85, 0xc9, 0xb2, 0xb1, 0x98, 0x36, 0x73, 0x51, 0xff, 0x3d, 0xd5, 0x8d, - 0xb6, 0x60, 0x36, 0x16, 0x55, 0xd9, 0x33, 0x75, 0xd1, 0xec, 0x99, 0x89, 0x00, 0xa4, 0x08, 0x7a, - 0x0b, 0x20, 0xce, 0xcf, 0x02, 0x28, 0xb4, 0xca, 0xd9, 0x99, 0x9e, 0x34, 0x26, 0x01, 0x80, 0x3a, - 0x70, 0xc5, 0xa5, 0xcc, 0xe2, 0xa4, 0xb3, 0x67, 0x69, 0xe6, 0x24, 0x6e, 0xf6, 0x12, 0x3c, 0x3d, - 0xe7, 0x52, 0xd6, 0x24, 0x9d, 0xbd, 0x7a, 0x04, 0x8b, 0x5e, 0x83, 0x1b, 0x31, 0x1d, 0x1e, 0xb3, - 0xf6, 0xbd, 0x8e, 0x63, 0xf9, 0x64, 0xcf, 0xb2, 0xbd, 0x1e, 0x13, 0x85, 0x69, 0x45, 0xe2, 0xb5, - 0x48, 0x64, 0x93, 0xdd, 0xf3, 0x3a, 0x8e, 0x49, 0xf6, 0xd6, 0xe4, 0x30, 0x7a, 0x11, 0x62, 0x2e, - 0x2c, 0xea, 0xf0, 0xc2, 0x4c, 0x39, 0xbd, 0x38, 0x6e, 0x4e, 0x47, 0x9d, 0x0d, 0x87, 0xaf, 0x4c, - 0xbe, 0xfb, 0xb0, 0x34, 0xf6, 0xd9, 0xc3, 0xd2, 0x58, 0xe5, 0x2e, 0x4c, 0xef, 0xe2, 0x8e, 0x4e, - 0x3a, 0xc2, 0xd1, 0x37, 0x61, 0x0a, 0x87, 0x8d, 0x82, 0x51, 0x4e, 0x3f, 0x35, 0x69, 0x63, 0xd1, - 0xca, 0x43, 0x03, 0x32, 0xf5, 0xdd, 0x2d, 0x4c, 0x7d, 0xb4, 0x0e, 0x73, 0x71, 0xd0, 0x9e, 0x37, - 0xff, 0xe3, 0x38, 0x0f, 0x0b, 0xc0, 0x3a, 0xcc, 0xdd, 0x0f, 0x4b, 0x4a, 0x04, 0x93, 0x3a, 0x0b, - 0x26, 0x52, 0xd1, 0xfd, 0x09, 0x53, 0xdf, 0x80, 0x89, 0x60, 0x85, 0x1c, 0x7d, 0x07, 0x9e, 0xeb, - 0xca, 0x0f, 0x65, 0x61, 0x76, 0x79, 0x61, 0x64, 0xa0, 0x2b, 0xf9, 0x64, 0x58, 0x04, 0x7a, 0x95, - 0xff, 0x18, 0x00, 0xf5, 0xdd, 0xdd, 0x6d, 0x9f, 0x76, 0x3b, 0x44, 0x5c, 0x96, 0xc9, 0x6f, 0xc2, - 0xf3, 0xb1, 0xc9, 0xdc, 0xb7, 0xcf, 0x6d, 0xf6, 0x95, 0x48, 0xad, 0xe9, 0xdb, 0xa7, 0xa2, 0x39, - 0x5c, 0x44, 0x68, 0xe9, 0x73, 0xa3, 0xd5, 0xb9, 0x18, 0xe6, 0xf1, 0xfb, 0x90, 0x8d, 0x4d, 0xe7, - 0xa8, 0x01, 0x93, 0x42, 0x7f, 0x6b, 0x3a, 0x2b, 0xa3, 0xe9, 0x0c, 0xd5, 0x92, 0x94, 0x46, 0xea, - 0x95, 0xff, 0x4a, 0x56, 0xe3, 0x44, 0xf8, 0x42, 0x05, 0x92, 0xac, 0xf0, 0xba, 0x02, 0xa7, 0x2f, - 0xa1, 0x02, 0x6b, 0xac, 0x04, 0xad, 0x3f, 0x4b, 0xc1, 0x95, 0x9d, 0x30, 0x49, 0xbf, 0xb0, 0x2c, - 0xec, 0xc0, 0x04, 0x61, 0xc2, 0xa7, 0x8a, 0x06, 0xe9, 0xec, 0xaf, 0x8f, 0x72, 0xf6, 0x29, 0xb6, - 0xac, 0x33, 0xe1, 0xf7, 0x93, 0xae, 0x0f, 0xb1, 0x12, 0x34, 0xfc, 0x21, 0x0d, 0x85, 0x51, 0xaa, - 0xe8, 0x65, 0xc8, 0xd9, 0x3e, 0x51, 0x1d, 0xe1, 0x9e, 0x62, 0xa8, 0x72, 0x38, 0x1b, 0x76, 0xeb, - 0x2d, 0xc5, 0x04, 0x79, 0x40, 0x93, 0x51, 0x25, 0x45, 0x9f, 0xed, 0x44, 0x36, 0x1b, 0x23, 0xa8, - 0x4d, 0x85, 0x40, 0x8e, 0x32, 0x2a, 0x28, 0xee, 0x58, 0x2d, 0xdc, 0xc1, 0xcc, 0x26, 0xcf, 0x10, - 0x09, 0xc3, 0x3b, 0xc0, 0xac, 0x06, 0xad, 0x05, 0x98, 0x68, 0x17, 0x26, 0x42, 0xf8, 0xf1, 0x4b, - 0x80, 0x0f, 0xc1, 0xd0, 0x0b, 0x30, 0x9d, 0xdc, 0x18, 0xd4, 0x39, 0x65, 0xdc, 0xcc, 0x26, 0xf6, - 0x85, 0xb3, 0x76, 0x9e, 0xcc, 0x53, 0x77, 0x1e, 0x7d, 0x14, 0xfc, 0x7d, 0x1a, 0xe6, 0x4c, 0xe2, - 0x7c, 0x09, 0x1d, 0xf7, 0x43, 0x80, 0x20, 0xa9, 0x65, 0xb1, 0x7d, 0x06, 0xdf, 0x0d, 0x17, 0x89, - 0xa9, 0x00, 0xaf, 0xce, 0xc5, 0xe7, 0xe5, 0xbd, 0xbf, 0xa4, 0x60, 0x3a, 0xe9, 0xbd, 0x2f, 0xc1, - 0xce, 0x86, 0x36, 0xe2, 0x92, 0x36, 0xae, 0x4a, 0xda, 0x2b, 0xa3, 0x4a, 0xda, 0x50, 0x5c, 0x9f, - 0x51, 0xcb, 0x7e, 0x93, 0x86, 0xcc, 0x16, 0xf6, 0xb1, 0xcb, 0xd1, 0xe6, 0xd0, 0x19, 0x37, 0xb8, - 0x7f, 0x5e, 0x1f, 0x0a, 0xeb, 0xba, 0x7e, 0x43, 0x09, 0xa2, 0xfa, 0x57, 0xa3, 0x8e, 0xb8, 0x5f, - 0x83, 0x59, 0x79, 0xa5, 0x8e, 0x0c, 0x0a, 0xa8, 0x9c, 0x51, 0xd7, 0xe1, 0xe8, 0x2a, 0xc6, 0x51, - 0x09, 0xb2, 0x52, 0x2c, 0xae, 0xd9, 0x52, 0x06, 0x5c, 0x7c, 0xb8, 0x1e, 0xf4, 0xa0, 0xdb, 0x80, - 0xf6, 0xa3, 0x87, 0x0f, 0x2b, 0x26, 0x42, 0xca, 0xcd, 0xc5, 0x23, 0xa1, 0xf8, 0x57, 0x01, 0xe4, - 0x2a, 0x2c, 0x87, 0x30, 0xcf, 0xd5, 0x97, 0xc1, 0x29, 0xd9, 0x53, 0x97, 0x1d, 0xe8, 0x17, 0x46, - 0x70, 0x54, 0x3e, 0x71, 0xdb, 0xd6, 0x97, 0x16, 0xeb, 0x62, 0xd9, 0xf0, 0xef, 0xe3, 0x52, 0xb1, - 0x8f, 0xdd, 0xce, 0x4a, 0xe5, 0x14, 0xc8, 0xca, 0x69, 0x6f, 0x01, 0xf2, 0x34, 0x3d, 0x78, 0x71, - 0x5f, 0xb9, 0x29, 0xe3, 0xfa, 0xe8, 0xd3, 0x0f, 0x6e, 0xdd, 0x48, 0x4c, 0x71, 0x18, 0xbd, 0x90, - 0x05, 0xee, 0xa9, 0xfc, 0xd6, 0x00, 0x14, 0x6f, 0x36, 0x26, 0xe1, 0x5d, 0x79, 0x67, 0x94, 0xf7, - 0x88, 0xc4, 0x79, 0xdf, 0x78, 0xfa, 0x3d, 0x22, 0xd6, 0x1f, 0xb8, 0x47, 0x24, 0x92, 0xe9, 0xdb, - 0x71, 0x69, 0x4f, 0x69, 0xef, 0x6b, 0xac, 0x16, 0xe6, 0x24, 0x71, 0x21, 0xa1, 0x03, 0x10, 0xa1, - 0x92, 0xca, 0xd1, 0xb1, 0xca, 0xb1, 0x01, 0xd7, 0x87, 0x22, 0x31, 0x5a, 0xb2, 0x0d, 0xc8, 0x4f, - 0x0c, 0x2a, 0x8f, 0xf6, 0xf5, 0xd2, 0x9f, 0x2d, 0xb0, 0xe7, 0xfc, 0xa1, 0x72, 0xfe, 0x7f, 0xda, - 0xa3, 0x74, 0x11, 0xfa, 0x93, 0x01, 0xf3, 0xc9, 0x15, 0x45, 0xb6, 0x35, 0x61, 0x3a, 0xb9, 0x16, - 0x6d, 0xd5, 0xcd, 0xf3, 0x58, 0x95, 0x34, 0x68, 0x00, 0x44, 0xda, 0x12, 0x46, 0x7d, 0xf0, 0x56, - 0x77, 0xe7, 0xdc, 0x2c, 0x85, 0x0b, 0x3b, 0xb5, 0x0c, 0x04, 0xce, 0xfa, 0x79, 0x0a, 0xc6, 0xb7, - 0x3c, 0xaf, 0x83, 0x7e, 0x6a, 0xc0, 0x1c, 0xf3, 0x84, 0x25, 0x73, 0x85, 0x38, 0x96, 0x7e, 0x2c, - 0x08, 0x2a, 0xe9, 0xee, 0xc5, 0xd8, 0xfb, 0xe7, 0x71, 0x69, 0x18, 0x6a, 0x90, 0x52, 0xfd, 0x48, - 0xc5, 0x3c, 0x51, 0x53, 0x42, 0xdb, 0xc1, 0x7b, 0xc2, 0x3b, 0x30, 0x33, 0x38, 0x7f, 0x50, 0x7e, - 0xcd, 0x0b, 0xcf, 0x3f, 0x73, 0xe6, 0xdc, 0xd3, 0xad, 0xc4, 0xc4, 0x2b, 0x93, 0xd2, 0xb1, 0xff, - 0x92, 0xce, 0x7d, 0x1b, 0xf2, 0x51, 0x79, 0xda, 0x51, 0x4f, 0x5e, 0xf2, 0x6c, 0x3a, 0x11, 0xbc, - 0x7e, 0x85, 0x37, 0x88, 0x72, 0xf2, 0xad, 0x15, 0xb7, 0x6c, 0x5a, 0x3d, 0xa1, 0x33, 0xc0, 0xb8, - 0xd6, 0xbd, 0xf5, 0x3b, 0x03, 0x20, 0x7e, 0x9a, 0x41, 0xaf, 0xc2, 0xb5, 0xda, 0xe6, 0x46, 0xdd, - 0x6a, 0x6e, 0xaf, 0x6e, 0xef, 0x34, 0xad, 0x9d, 0x8d, 0xe6, 0xd6, 0xfa, 0x5a, 0xe3, 0x6e, 0x63, - 0xbd, 0x9e, 0x1f, 0x2b, 0xe6, 0x8e, 0x1e, 0x94, 0xb3, 0x3b, 0x8c, 0x77, 0x89, 0x4d, 0xf7, 0x28, - 0x71, 0xd0, 0x4b, 0x30, 0x3f, 0x28, 0x2d, 0x5b, 0xeb, 0xf5, 0xbc, 0x51, 0x9c, 0x3e, 0x7a, 0x50, - 0x9e, 0x0c, 0x8e, 0xa4, 0xc4, 0x41, 0x8b, 0xf0, 0xfc, 0xb0, 0x5c, 0x63, 0xe3, 0xf5, 0x7c, 0xaa, - 0x38, 0x73, 0xf4, 0xa0, 0x3c, 0x15, 0x9d, 0x5d, 0x51, 0x05, 0x50, 0x52, 0x52, 0xe3, 0xa5, 0x8b, - 0x70, 0xf4, 0xa0, 0x9c, 0x09, 0xdc, 0x52, 0x1c, 0x7f, 0xf7, 0xd7, 0x0b, 0x63, 0xb7, 0x7e, 0x0c, - 0xd0, 0x60, 0x7b, 0x3e, 0xb6, 0x55, 0x40, 0x16, 0xe1, 0x6a, 0x63, 0xe3, 0xae, 0xb9, 0xba, 0xb6, - 0xdd, 0xd8, 0xdc, 0x18, 0x5c, 0xf6, 0x89, 0xb1, 0xfa, 0xe6, 0x4e, 0xed, 0xcd, 0x75, 0xab, 0xd9, - 0x78, 0x7d, 0x23, 0x6f, 0xa0, 0x6b, 0x70, 0x65, 0x60, 0xec, 0x7b, 0x1b, 0xdb, 0x8d, 0xb7, 0xd6, - 0xf3, 0xa9, 0xda, 0xdd, 0x8f, 0x1f, 0x2f, 0x18, 0x8f, 0x1e, 0x2f, 0x18, 0xff, 0x78, 0xbc, 0x60, - 0xbc, 0xf7, 0x64, 0x61, 0xec, 0xd1, 0x93, 0x85, 0xb1, 0xbf, 0x3e, 0x59, 0x18, 0xfb, 0xc1, 0xab, - 0x4f, 0x75, 0x78, 0x5c, 0x25, 0x95, 0xeb, 0x5b, 0x19, 0xb5, 0x47, 0x7d, 0xe3, 0x7f, 0x01, 0x00, - 0x00, 0xff, 0xff, 0x93, 0xd7, 0xc2, 0x0d, 0x66, 0x18, 0x00, 0x00, + // 1901 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x4d, 0x6c, 0x63, 0x47, + 0x1d, 0xcf, 0x8b, 0x53, 0x27, 0xf9, 0x3b, 0x89, 0x9d, 0xd9, 0x2f, 0xaf, 0x97, 0xc6, 0x5e, 0x77, + 0xa1, 0xe9, 0xd2, 0xd8, 0x6c, 0x90, 0x7a, 0x08, 0x08, 0x14, 0xc7, 0xde, 0xae, 0x4b, 0x9b, 0x04, + 0x3b, 0x09, 0x94, 0xaf, 0xa7, 0xf1, 0x7b, 0x13, 0x67, 0x88, 0x3d, 0xcf, 0xbc, 0x19, 0x2f, 0xf1, + 0x9d, 0x43, 0x15, 0x84, 0x54, 0x09, 0x09, 0x21, 0xc1, 0x8a, 0x95, 0xb8, 0x94, 0x5b, 0x0f, 0x2b, + 0xee, 0xdc, 0x0a, 0x12, 0xd2, 0x6a, 0x4f, 0x08, 0x89, 0x80, 0x76, 0x0f, 0xad, 0xe0, 0x82, 0x38, + 0x71, 0x44, 0xf3, 0xf1, 0x3e, 0x1c, 0x27, 0x9b, 0xcd, 0xb6, 0x42, 0x15, 0x5c, 0x9e, 0xde, 0xcc, + 0xfc, 0xff, 0xbf, 0x99, 0xff, 0xef, 0xff, 0x31, 0x1f, 0x70, 0xc3, 0xf1, 0x78, 0xd7, 0xe3, 0x65, + 0x2e, 0xf0, 0x3e, 0x65, 0xed, 0xf2, 0xdd, 0x5b, 0x2d, 0x22, 0xf0, 0xad, 0xa0, 0x5d, 0xea, 0xf9, + 0x9e, 0xf0, 0xd0, 0x65, 0x2d, 0x55, 0x0a, 0x7a, 0x8d, 0x54, 0xee, 0x62, 0xdb, 0x6b, 0x7b, 0x4a, + 0xa4, 0x2c, 0xff, 0xb4, 0x74, 0xee, 0x6a, 0xdb, 0xf3, 0xda, 0x1d, 0x52, 0x56, 0xad, 0x56, 0x7f, + 0xb7, 0x8c, 0xd9, 0xc0, 0x0c, 0x2d, 0x1c, 0x1f, 0x72, 0xfb, 0x3e, 0x16, 0xd4, 0x63, 0x66, 0x3c, + 0x7f, 0x7c, 0x5c, 0xd0, 0x2e, 0xe1, 0x02, 0x77, 0x7b, 0x01, 0xb6, 0x5e, 0x89, 0xad, 0x27, 0x35, + 0xcb, 0x32, 0xd8, 0xc6, 0x94, 0x16, 0xe6, 0x24, 0xb4, 0xc3, 0xf1, 0x68, 0x80, 0x3d, 0x8f, 0xbb, + 0x94, 0x79, 0x65, 0xf5, 0x35, 0x5d, 0x9f, 0x11, 0x84, 0xb9, 0xc4, 0xef, 0x52, 0x26, 0xca, 0x62, + 0xd0, 0x23, 0x5c, 0x7f, 0xcd, 0xe8, 0xb5, 0xd8, 0x28, 0x6e, 0x39, 0x34, 0x3e, 0x58, 0xfc, 0xa9, + 0x05, 0x73, 0x77, 0x28, 0x17, 0x9e, 0x4f, 0x1d, 0xdc, 0xa9, 0xb3, 0x5d, 0x0f, 0x7d, 0x09, 0x92, + 0x7b, 0x04, 0xbb, 0xc4, 0xcf, 0x5a, 0x05, 0x6b, 0x31, 0xb5, 0x9c, 0x2d, 0x45, 0x00, 0x25, 0xad, + 0x7b, 0x47, 0x8d, 0x57, 0xa6, 0x3f, 0x38, 0xca, 0x8f, 0xbd, 0xf7, 0xe1, 0xfb, 0x37, 0xad, 0x86, + 0x51, 0x41, 0x55, 0x48, 0xde, 0xc5, 0x1d, 0x4e, 0x44, 0x76, 0xbc, 0x90, 0x58, 0x4c, 0x2d, 0x5f, + 0x2f, 0x9d, 0xcc, 0x79, 0x69, 0x07, 0x77, 0xa8, 0x8b, 0x85, 0x37, 0x8c, 0xa2, 0x75, 0x8b, 0x3f, + 0x1b, 0x87, 0xf4, 0x9a, 0xd7, 0xed, 0x52, 0xce, 0xa9, 0xc7, 0x1a, 0x58, 0x10, 0x8e, 0xde, 0x80, + 0x09, 0x1f, 0x0b, 0xa2, 0x16, 0x35, 0x5d, 0x79, 0x4d, 0x2a, 0xfd, 0xf9, 0x28, 0x7f, 0x4d, 0xc3, + 0x73, 0x77, 0xbf, 0x44, 0xbd, 0x72, 0x17, 0x8b, 0xbd, 0xd2, 0x9b, 0xa4, 0x8d, 0x9d, 0x41, 0x95, + 0x38, 0x8f, 0x1e, 0x2c, 0x81, 0x99, 0xbd, 0x4a, 0x1c, 0x3d, 0x83, 0xc2, 0x40, 0x5f, 0x87, 0xa9, + 0x2e, 0x3e, 0xb0, 0x15, 0xde, 0xf8, 0xc7, 0xc2, 0x9b, 0xec, 0xe2, 0x03, 0xb9, 0x3e, 0xf4, 0x3d, + 0x48, 0x4b, 0x48, 0x67, 0x0f, 0xb3, 0x36, 0xd1, 0xc8, 0x89, 0x8f, 0x85, 0x3c, 0xdb, 0xc5, 0x07, + 0x6b, 0x0a, 0x4d, 0xe2, 0xaf, 0x4c, 0x7c, 0x74, 0x3f, 0x6f, 0x15, 0x7f, 0x67, 0x01, 0x44, 0xc4, + 0x20, 0x0c, 0x19, 0x27, 0x6c, 0xa9, 0x49, 0xb9, 0x71, 0xda, 0xcb, 0xa7, 0xf1, 0x7e, 0x8c, 0xd6, + 0xca, 0xac, 0x5c, 0xde, 0xc3, 0xa3, 0xbc, 0xa5, 0x67, 0x4d, 0x3b, 0x23, 0xb4, 0xa7, 0xfa, 0x3d, + 0x17, 0x0b, 0x62, 0xcb, 0x18, 0x56, 0x6c, 0xa5, 0x96, 0x73, 0x25, 0x1d, 0xe0, 0xa5, 0x20, 0xc0, + 0x4b, 0x5b, 0x41, 0x80, 0x6b, 0xc0, 0x77, 0xff, 0x1a, 0x00, 0x82, 0xd6, 0x96, 0xe3, 0xc6, 0x86, + 0xf7, 0x2c, 0x48, 0x55, 0x09, 0x77, 0x7c, 0xda, 0x93, 0x29, 0x83, 0xb2, 0x30, 0xd9, 0xf5, 0x18, + 0xdd, 0x37, 0x01, 0x37, 0xdd, 0x08, 0x9a, 0x28, 0x07, 0x53, 0xd4, 0x25, 0x4c, 0x50, 0x31, 0xd0, + 0x6e, 0x6a, 0x84, 0x6d, 0xa9, 0xf5, 0x43, 0xd2, 0xe2, 0x34, 0xe0, 0xb9, 0x11, 0x34, 0xd1, 0x2b, + 0x90, 0xe1, 0xc4, 0xe9, 0xfb, 0x54, 0x0c, 0x6c, 0xc7, 0x63, 0x02, 0x3b, 0x22, 0x3b, 0xa1, 0x44, + 0xd2, 0x41, 0xff, 0x9a, 0xee, 0x96, 0x20, 0x2e, 0x11, 0x98, 0x76, 0x78, 0xf6, 0x05, 0x0d, 0x62, + 0x9a, 0x66, 0xa9, 0x87, 0x93, 0x30, 0x1d, 0x06, 0x2a, 0x5a, 0x83, 0x8c, 0xd7, 0x23, 0xbe, 0xfc, + 0xb7, 0xb1, 0xeb, 0xfa, 0x84, 0x73, 0x13, 0x8d, 0xd9, 0x47, 0x0f, 0x96, 0x2e, 0x1a, 0xc2, 0x57, + 0xf5, 0x48, 0x53, 0xf8, 0x94, 0xb5, 0x1b, 0xe9, 0x40, 0xc3, 0x74, 0xa3, 0xb7, 0xa5, 0xcb, 0x18, + 0x27, 0x8c, 0xf7, 0xb9, 0xdd, 0xeb, 0xb7, 0xf6, 0xc9, 0xc0, 0x90, 0x7a, 0x71, 0x84, 0xd4, 0x55, + 0x36, 0xa8, 0x64, 0xff, 0x10, 0x41, 0x3b, 0xfe, 0xa0, 0x27, 0xbc, 0xd2, 0x66, 0xbf, 0xf5, 0x35, + 0x32, 0x90, 0xae, 0x32, 0x38, 0x9b, 0x0a, 0x06, 0x5d, 0x86, 0xe4, 0xf7, 0x31, 0xed, 0x10, 0x57, + 0x31, 0x32, 0xd5, 0x30, 0x2d, 0xb4, 0x02, 0x49, 0x2e, 0xb0, 0xe8, 0x73, 0x45, 0xc3, 0xdc, 0x72, + 0xf1, 0xb4, 0xd8, 0xa8, 0x78, 0xcc, 0x6d, 0x2a, 0xc9, 0x86, 0xd1, 0x40, 0x6b, 0x90, 0x14, 0xde, + 0x3e, 0x61, 0x86, 0xa0, 0xca, 0xe7, 0x4d, 0x34, 0x5f, 0x1a, 0x8d, 0xe6, 0x3a, 0x13, 0xb1, 0x38, + 0xae, 0x33, 0xd1, 0x30, 0xaa, 0xe8, 0x3b, 0x90, 0x71, 0x49, 0x87, 0xb4, 0x15, 0x73, 0x7c, 0x0f, + 0xfb, 0x84, 0x67, 0x93, 0x0a, 0xee, 0xd6, 0xb9, 0x93, 0xa3, 0x91, 0x0e, 0xa1, 0x9a, 0x0a, 0x09, + 0x6d, 0x42, 0xca, 0x8d, 0xc2, 0x29, 0x3b, 0xa9, 0xc8, 0x7c, 0xe9, 0x34, 0x1b, 0x63, 0x91, 0x17, + 0xaf, 0x3c, 0x71, 0x08, 0x19, 0x41, 0x7d, 0xd6, 0xf2, 0x98, 0x4b, 0x59, 0xdb, 0xde, 0x23, 0xb4, + 0xbd, 0x27, 0xb2, 0x53, 0x05, 0x6b, 0x31, 0xd1, 0x48, 0x87, 0xfd, 0x77, 0x54, 0x37, 0xda, 0x84, + 0xb9, 0x48, 0x54, 0x65, 0xc8, 0xf4, 0x79, 0x33, 0x64, 0x36, 0x04, 0x90, 0x22, 0xe8, 0x2d, 0x80, + 0x28, 0x07, 0xb3, 0xa0, 0xd0, 0x8a, 0x67, 0x67, 0x73, 0xdc, 0x98, 0x18, 0x00, 0xfa, 0x36, 0x5c, + 0xe8, 0x52, 0x66, 0x73, 0xd2, 0xd9, 0xb5, 0x0d, 0x73, 0x12, 0x37, 0x75, 0x7e, 0x6f, 0xce, 0x77, + 0x29, 0x6b, 0x92, 0xce, 0x6e, 0x35, 0x44, 0x41, 0x5f, 0x86, 0x6b, 0x91, 0xf5, 0x1e, 0xb3, 0xf7, + 0xbc, 0x8e, 0x6b, 0xfb, 0x64, 0xd7, 0x76, 0xbc, 0x3e, 0x13, 0xd9, 0x19, 0xc5, 0xd9, 0x95, 0x50, + 0x64, 0x83, 0xdd, 0xf1, 0x3a, 0x6e, 0x83, 0xec, 0xae, 0xc9, 0x61, 0xf4, 0x12, 0x44, 0xa6, 0xdb, + 0xd4, 0xe5, 0xd9, 0xd9, 0x42, 0x62, 0x71, 0xa2, 0x31, 0x13, 0x76, 0xd6, 0x5d, 0xbe, 0x32, 0xf5, + 0xce, 0xfd, 0xfc, 0xd8, 0x47, 0xf7, 0xf3, 0x63, 0xc5, 0xdb, 0x30, 0xb3, 0x83, 0x3b, 0x26, 0x8f, + 0x08, 0x47, 0xaf, 0xc1, 0x34, 0x0e, 0x1a, 0x59, 0xab, 0x90, 0x78, 0x6a, 0x1e, 0x46, 0xa2, 0xc5, + 0xdf, 0x58, 0x90, 0xac, 0xee, 0x6c, 0x62, 0xea, 0xa3, 0x1a, 0xcc, 0x47, 0x81, 0xf9, 0xac, 0x29, + 0x1d, 0xc5, 0x72, 0x90, 0xd3, 0xeb, 0x30, 0x7f, 0x37, 0xa8, 0x12, 0x21, 0x8c, 0xde, 0x57, 0xae, + 0x3f, 0x7a, 0xb0, 0xf4, 0xa2, 0x81, 0x09, 0x2b, 0xc9, 0x31, 0xbc, 0xbb, 0xc7, 0xfa, 0x63, 0x36, + 0xbf, 0x01, 0x93, 0x7a, 0xa9, 0x1c, 0x7d, 0x15, 0x5e, 0xe8, 0xc9, 0x1f, 0x65, 0x6a, 0x6a, 0x79, + 0xe1, 0xd4, 0x00, 0x57, 0xf2, 0xf1, 0x70, 0xd0, 0x7a, 0xc5, 0x1f, 0x8f, 0x03, 0x54, 0x77, 0x76, + 0xb6, 0x7c, 0xda, 0xeb, 0x10, 0xf1, 0x49, 0xd9, 0xbe, 0x0d, 0x97, 0x22, 0xdb, 0xb9, 0xef, 0x9c, + 0xdf, 0xfe, 0x0b, 0xa1, 0x7e, 0xd3, 0x77, 0x4e, 0x84, 0x75, 0xb9, 0x08, 0x61, 0x13, 0xe7, 0x87, + 0xad, 0x72, 0x31, 0xca, 0xec, 0x37, 0x21, 0x15, 0x91, 0xc1, 0x51, 0x1d, 0xa6, 0x84, 0xf9, 0x37, + 0x04, 0x17, 0x4f, 0x27, 0x38, 0x50, 0x8b, 0x93, 0x1c, 0xaa, 0x17, 0xff, 0x6d, 0x01, 0xc4, 0x72, + 0xe4, 0xd3, 0x19, 0x63, 0xa8, 0x0e, 0x49, 0x53, 0x89, 0x13, 0xcf, 0x5b, 0x89, 0x0d, 0x40, 0x8c, + 0xd4, 0x9f, 0x8c, 0xc3, 0x85, 0xed, 0x20, 0x7b, 0x3f, 0xfd, 0x1c, 0x6c, 0xc3, 0x24, 0x61, 0xc2, + 0xa7, 0x8a, 0x04, 0xe9, 0xf3, 0x2f, 0x9c, 0xe6, 0xf3, 0x13, 0x8c, 0xaa, 0x31, 0xe1, 0x0f, 0xe2, + 0x11, 0x10, 0x60, 0xc5, 0xf8, 0xf8, 0x45, 0x02, 0xb2, 0xa7, 0xa9, 0xa2, 0x97, 0x21, 0xed, 0xf8, + 0x44, 0x75, 0x04, 0x9b, 0x8c, 0xa5, 0x0a, 0xe6, 0x5c, 0xd0, 0x6d, 0xf6, 0x98, 0x06, 0xc8, 0x53, + 0x99, 0x0c, 0x2e, 0x29, 0xfa, 0x7c, 0xc7, 0xb0, 0xb9, 0x08, 0x41, 0xed, 0x32, 0x5b, 0x90, 0xa6, + 0x8c, 0x0a, 0x8a, 0x3b, 0x76, 0x0b, 0x77, 0x30, 0x73, 0x82, 0xe3, 0xea, 0xb9, 0xb6, 0x84, 0x39, + 0x83, 0x51, 0xd1, 0x10, 0xa8, 0x06, 0x93, 0x01, 0xda, 0xc4, 0xf9, 0xd1, 0x02, 0x5d, 0x74, 0x1d, + 0x66, 0xe2, 0x1b, 0x83, 0x3a, 0x7a, 0x4c, 0x34, 0x52, 0xb1, 0x7d, 0xe1, 0xac, 0x9d, 0x27, 0xf9, + 0xd4, 0x9d, 0xc7, 0x9c, 0xee, 0x7e, 0x95, 0x80, 0xf9, 0x06, 0x71, 0xff, 0xf7, 0xdd, 0xb2, 0x09, + 0xa0, 0x53, 0x55, 0x56, 0x52, 0xe3, 0x99, 0xe7, 0xc8, 0xf7, 0x69, 0x0d, 0x52, 0xe5, 0xe2, 0xbf, + 0xe5, 0xa1, 0xbf, 0x8c, 0xc3, 0x4c, 0xdc, 0x43, 0xff, 0x97, 0x9b, 0x16, 0x5a, 0x8f, 0xca, 0xd4, + 0x84, 0x2a, 0x53, 0xaf, 0x9c, 0x56, 0xa6, 0x46, 0xa2, 0xf9, 0x8c, 0xfa, 0xf4, 0xcb, 0x04, 0x24, + 0x37, 0xb1, 0x8f, 0xbb, 0x1c, 0x6d, 0x8c, 0x1c, 0x64, 0xf5, 0x45, 0xf2, 0xea, 0x48, 0x30, 0x57, + 0xcd, 0x5b, 0x87, 0x8e, 0xe5, 0x9f, 0x9f, 0x76, 0x8e, 0xfd, 0x2c, 0xcc, 0xc9, 0x0b, 0x71, 0x68, + 0x90, 0x26, 0x77, 0x56, 0xdd, 0x6b, 0x43, 0xeb, 0x39, 0xca, 0x43, 0x4a, 0x8a, 0x45, 0x75, 0x58, + 0xca, 0x40, 0x17, 0x1f, 0xd4, 0x74, 0x0f, 0x5a, 0x02, 0xb4, 0x17, 0x3e, 0x50, 0xd8, 0x11, 0x11, + 0x52, 0x6e, 0x3e, 0x1a, 0x09, 0xc4, 0x5f, 0x04, 0x90, 0xab, 0xb0, 0x5d, 0xc2, 0xbc, 0xae, 0xb9, + 0xd5, 0x4d, 0xcb, 0x9e, 0xaa, 0xec, 0x40, 0x3f, 0xb2, 0xf4, 0x79, 0xf8, 0xd8, 0xb5, 0xd9, 0x5c, + 0x47, 0xb6, 0x9e, 0x21, 0x29, 0xfe, 0x75, 0x94, 0xcf, 0x0d, 0x70, 0xb7, 0xb3, 0x52, 0x3c, 0x01, + 0xa7, 0x78, 0xd2, 0x4d, 0x5e, 0x1e, 0x9c, 0x87, 0xaf, 0xdd, 0x2b, 0x37, 0x64, 0x78, 0x1f, 0x7e, + 0xf8, 0xfe, 0x4d, 0x33, 0xd3, 0x12, 0x77, 0xf7, 0xcb, 0x07, 0xe1, 0xf3, 0x95, 0xf6, 0x89, 0x3c, + 0xa9, 0xa2, 0x68, 0xd7, 0x68, 0x10, 0xde, 0x93, 0x37, 0x3e, 0x79, 0x43, 0x88, 0x9d, 0xe4, 0xad, + 0xa7, 0xdf, 0x10, 0x22, 0xfd, 0xa1, 0x1b, 0x42, 0x2c, 0xa7, 0xbe, 0x12, 0x15, 0xed, 0x71, 0xe3, + 0x72, 0x83, 0xd5, 0xc2, 0x9c, 0xc4, 0xae, 0x1a, 0x74, 0x08, 0x22, 0x50, 0x52, 0xa9, 0x3a, 0x56, + 0xfc, 0xa3, 0x05, 0x57, 0x47, 0xc2, 0x2f, 0x5c, 0xb2, 0x03, 0xc8, 0x8f, 0x0d, 0x2a, 0x37, 0x0e, + 0xcc, 0xd2, 0x9f, 0x2f, 0x9a, 0xe7, 0xfd, 0x91, 0xca, 0xfd, 0xc9, 0xec, 0x3e, 0xa6, 0xf4, 0xfc, + 0xde, 0x82, 0x8b, 0xf1, 0x05, 0x84, 0xa6, 0x34, 0x61, 0x26, 0x3e, 0xb5, 0x31, 0xe2, 0xc6, 0xb3, + 0x18, 0x11, 0x5f, 0xff, 0x10, 0x08, 0xda, 0x89, 0x52, 0x5c, 0xbf, 0x9b, 0xdd, 0x7a, 0x66, 0x52, + 0x82, 0x85, 0x9d, 0x98, 0xea, 0xda, 0x37, 0xff, 0xb0, 0x60, 0x62, 0xd3, 0xf3, 0x3a, 0xe8, 0x07, + 0x30, 0xcf, 0x3c, 0x61, 0xcb, 0x74, 0x20, 0xae, 0x6d, 0x2e, 0xf6, 0xba, 0x7c, 0xd6, 0x9e, 0xca, + 0xd5, 0xdf, 0x8f, 0xf2, 0xa3, 0x9a, 0xc3, 0x04, 0x9a, 0xf7, 0x23, 0xe6, 0x89, 0x8a, 0x12, 0xda, + 0xd2, 0x77, 0xff, 0x5d, 0x98, 0x1d, 0x9e, 0x4e, 0x97, 0xd8, 0xd5, 0xb3, 0xa6, 0x9b, 0x3d, 0x73, + 0xaa, 0x99, 0x56, 0x6c, 0x9e, 0x95, 0x29, 0xe9, 0xb5, 0x7f, 0x4a, 0xcf, 0xbd, 0x0d, 0x99, 0xb0, + 0xbe, 0x6c, 0xab, 0xc7, 0x27, 0x2e, 0x43, 0x43, 0xbf, 0x43, 0x05, 0xa7, 0xfb, 0x42, 0xfc, 0x51, + 0x13, 0xb7, 0x1c, 0x5a, 0x3a, 0xa6, 0x33, 0x44, 0xa7, 0xd1, 0xbd, 0xf9, 0x5b, 0x0b, 0x20, 0x7a, + 0x24, 0x41, 0xaf, 0xc2, 0x95, 0xca, 0xc6, 0x7a, 0xd5, 0x6e, 0x6e, 0xad, 0x6e, 0x6d, 0x37, 0xed, + 0xed, 0xf5, 0xe6, 0x66, 0x6d, 0xad, 0x7e, 0xbb, 0x5e, 0xab, 0x66, 0xc6, 0x72, 0xe9, 0xc3, 0x7b, + 0x85, 0xd4, 0x36, 0xe3, 0x3d, 0xe2, 0xd0, 0x5d, 0x4a, 0x5c, 0xf4, 0x39, 0xb8, 0x38, 0x2c, 0x2d, + 0x5b, 0xb5, 0x6a, 0xc6, 0xca, 0xcd, 0x1c, 0xde, 0x2b, 0x4c, 0xe9, 0x73, 0x22, 0x71, 0xd1, 0x22, + 0x5c, 0x1a, 0x95, 0xab, 0xaf, 0xbf, 0x9e, 0x19, 0xcf, 0xcd, 0x1e, 0xde, 0x2b, 0x4c, 0x87, 0x07, + 0x4a, 0x54, 0x04, 0x14, 0x97, 0x34, 0x78, 0x89, 0x1c, 0x1c, 0xde, 0x2b, 0x24, 0xb5, 0x17, 0x72, + 0x13, 0xef, 0xfc, 0x7a, 0x61, 0xec, 0xe6, 0x77, 0x01, 0xea, 0x6c, 0xd7, 0xc7, 0x8e, 0x8a, 0xb6, + 0x1c, 0x5c, 0xae, 0xaf, 0xdf, 0x6e, 0xac, 0xae, 0x6d, 0xd5, 0x37, 0xd6, 0x87, 0x97, 0x7d, 0x6c, + 0xac, 0xba, 0xb1, 0x5d, 0x79, 0xb3, 0x66, 0x37, 0xeb, 0xaf, 0xaf, 0x67, 0x2c, 0x74, 0x05, 0x2e, + 0x0c, 0x8d, 0x7d, 0x63, 0x7d, 0xab, 0xfe, 0x56, 0x2d, 0x33, 0x5e, 0xb9, 0xfd, 0xc1, 0xe3, 0x05, + 0xeb, 0xe1, 0xe3, 0x05, 0xeb, 0x6f, 0x8f, 0x17, 0xac, 0x77, 0x9f, 0x2c, 0x8c, 0x3d, 0x7c, 0xb2, + 0x30, 0xf6, 0xa7, 0x27, 0x0b, 0x63, 0xdf, 0x7a, 0xb5, 0x4d, 0xc5, 0x5e, 0xbf, 0x55, 0x72, 0xbc, + 0xae, 0x79, 0xe6, 0x2e, 0x9f, 0x58, 0xf1, 0xd4, 0xbb, 0x72, 0x2b, 0xa9, 0x36, 0x99, 0x2f, 0xfe, + 0x27, 0x00, 0x00, 0xff, 0xff, 0x7a, 0x6b, 0x77, 0xd8, 0xcf, 0x17, 0x00, 0x00, } func (this *Pool) Description() (desc *github_com_cosmos_gogoproto_protoc_gen_gogo_descriptor.FileDescriptorSet) { @@ -1403,706 +1404,707 @@ func (this *Pool) Description() (desc *github_com_cosmos_gogoproto_protoc_gen_go func StakingDescription() (desc *github_com_cosmos_gogoproto_protoc_gen_gogo_descriptor.FileDescriptorSet) { d := &github_com_cosmos_gogoproto_protoc_gen_gogo_descriptor.FileDescriptorSet{} var gzipped = []byte{ - // 11178 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x69, 0x90, 0x1c, 0x47, - 0x76, 0x1f, 0x3e, 0x7d, 0x4c, 0x1f, 0xaf, 0xaf, 0x9a, 0x9c, 0x01, 0x30, 0x68, 0x90, 0x33, 0xc3, - 0xe2, 0x92, 0x00, 0x41, 0x72, 0x40, 0x82, 0x04, 0x48, 0x0e, 0x96, 0xcb, 0x7f, 0x77, 0x4f, 0x63, - 0xd0, 0xe0, 0x5c, 0xac, 0xee, 0x01, 0x0f, 0x1d, 0xa5, 0x9a, 0xea, 0x9c, 0x9e, 0x22, 0xba, 0xab, - 0x7a, 0xab, 0xaa, 0x81, 0x19, 0xc6, 0x3f, 0x1c, 0x2b, 0xad, 0x64, 0xaf, 0x60, 0x59, 0x5a, 0x1d, - 0x61, 0xad, 0xa4, 0x85, 0xcc, 0x95, 0x2c, 0xed, 0x4a, 0xbe, 0x74, 0xac, 0xb5, 0x92, 0x15, 0x92, - 0x25, 0x87, 0x0f, 0x49, 0x76, 0x38, 0xd6, 0xfa, 0x60, 0x2b, 0x1c, 0x61, 0x5a, 0xe2, 0x2a, 0xa4, - 0xf5, 0x6a, 0x65, 0x5d, 0x94, 0x6d, 0x79, 0xc3, 0x0a, 0x47, 0x5e, 0x75, 0xf4, 0x31, 0xdd, 0x03, - 0x91, 0xd4, 0xda, 0xf2, 0x17, 0xa0, 0x2b, 0xf3, 0xbd, 0x5f, 0x65, 0xbe, 0x7c, 0xf9, 0xf2, 0xbd, - 0x97, 0x59, 0x39, 0xf0, 0x5b, 0x65, 0x58, 0x6a, 0x59, 0x56, 0xab, 0x8d, 0x2f, 0x74, 0x6d, 0xcb, - 0xb5, 0x76, 0x7b, 0x7b, 0x17, 0x9a, 0xd8, 0xd1, 0x6d, 0xa3, 0xeb, 0x5a, 0xf6, 0x32, 0x2d, 0x43, - 0x05, 0x46, 0xb1, 0x2c, 0x28, 0xe4, 0x0d, 0x98, 0xb9, 0x6a, 0xb4, 0xf1, 0xaa, 0x47, 0x58, 0xc7, - 0x2e, 0x7a, 0x16, 0xe2, 0x7b, 0x46, 0x1b, 0xcf, 0x47, 0x96, 0x62, 0xe7, 0x32, 0x17, 0x3f, 0xb0, - 0xdc, 0xc7, 0xb4, 0x1c, 0xe6, 0xd8, 0x26, 0xc5, 0x0a, 0xe5, 0x90, 0xff, 0x3c, 0x0e, 0xb3, 0x43, - 0x6a, 0x11, 0x82, 0xb8, 0xa9, 0x75, 0x08, 0x62, 0xe4, 0x5c, 0x5a, 0xa1, 0xbf, 0xd1, 0x3c, 0x24, - 0xbb, 0x9a, 0x7e, 0x53, 0x6b, 0xe1, 0xf9, 0x28, 0x2d, 0x16, 0x8f, 0x68, 0x01, 0xa0, 0x89, 0xbb, - 0xd8, 0x6c, 0x62, 0x53, 0x3f, 0x9c, 0x8f, 0x2d, 0xc5, 0xce, 0xa5, 0x95, 0x40, 0x09, 0x7a, 0x14, - 0x66, 0xba, 0xbd, 0xdd, 0xb6, 0xa1, 0xab, 0x01, 0x32, 0x58, 0x8a, 0x9d, 0x9b, 0x56, 0x24, 0x56, - 0xb1, 0xea, 0x13, 0x9f, 0x85, 0xc2, 0x6d, 0xac, 0xdd, 0x0c, 0x92, 0x66, 0x28, 0x69, 0x9e, 0x14, - 0x07, 0x08, 0x2b, 0x90, 0xed, 0x60, 0xc7, 0xd1, 0x5a, 0x58, 0x75, 0x0f, 0xbb, 0x78, 0x3e, 0x4e, - 0x7b, 0xbf, 0x34, 0xd0, 0xfb, 0xfe, 0x9e, 0x67, 0x38, 0x57, 0xe3, 0xb0, 0x8b, 0x51, 0x09, 0xd2, - 0xd8, 0xec, 0x75, 0x18, 0xc2, 0xf4, 0x08, 0xf9, 0x55, 0xcd, 0x5e, 0xa7, 0x1f, 0x25, 0x45, 0xd8, - 0x38, 0x44, 0xd2, 0xc1, 0xf6, 0x2d, 0x43, 0xc7, 0xf3, 0x09, 0x0a, 0x70, 0x76, 0x00, 0xa0, 0xce, - 0xea, 0xfb, 0x31, 0x04, 0x1f, 0xaa, 0x40, 0x1a, 0x1f, 0xb8, 0xd8, 0x74, 0x0c, 0xcb, 0x9c, 0x4f, - 0x52, 0x90, 0x87, 0x86, 0x8c, 0x22, 0x6e, 0x37, 0xfb, 0x21, 0x7c, 0x3e, 0x74, 0x19, 0x92, 0x56, - 0xd7, 0x35, 0x2c, 0xd3, 0x99, 0x4f, 0x2d, 0x45, 0xce, 0x65, 0x2e, 0xde, 0x37, 0x54, 0x11, 0xb6, - 0x18, 0x8d, 0x22, 0x88, 0x51, 0x0d, 0x24, 0xc7, 0xea, 0xd9, 0x3a, 0x56, 0x75, 0xab, 0x89, 0x55, - 0xc3, 0xdc, 0xb3, 0xe6, 0xd3, 0x14, 0x60, 0x71, 0xb0, 0x23, 0x94, 0xb0, 0x62, 0x35, 0x71, 0xcd, - 0xdc, 0xb3, 0x94, 0xbc, 0x13, 0x7a, 0x46, 0x27, 0x21, 0xe1, 0x1c, 0x9a, 0xae, 0x76, 0x30, 0x9f, - 0xa5, 0x1a, 0xc2, 0x9f, 0x88, 0xea, 0xe0, 0xa6, 0x41, 0x5e, 0x37, 0x9f, 0x63, 0xaa, 0xc3, 0x1f, - 0xe5, 0x9f, 0x4b, 0x40, 0x61, 0x12, 0xe5, 0xbb, 0x02, 0xd3, 0x7b, 0xa4, 0xff, 0xf3, 0xd1, 0xe3, - 0x48, 0x87, 0xf1, 0x84, 0xc5, 0x9b, 0xb8, 0x47, 0xf1, 0x96, 0x20, 0x63, 0x62, 0xc7, 0xc5, 0x4d, - 0xa6, 0x2b, 0xb1, 0x09, 0xb5, 0x0d, 0x18, 0xd3, 0xa0, 0xb2, 0xc5, 0xef, 0x49, 0xd9, 0x5e, 0x81, - 0x82, 0xd7, 0x24, 0xd5, 0xd6, 0xcc, 0x96, 0xd0, 0xda, 0x0b, 0xe3, 0x5a, 0xb2, 0x5c, 0x15, 0x7c, - 0x0a, 0x61, 0x53, 0xf2, 0x38, 0xf4, 0x8c, 0x56, 0x01, 0x2c, 0x13, 0x5b, 0x7b, 0x6a, 0x13, 0xeb, - 0xed, 0xf9, 0xd4, 0x08, 0x29, 0x6d, 0x11, 0x92, 0x01, 0x29, 0x59, 0xac, 0x54, 0x6f, 0xa3, 0xe7, - 0x7c, 0x25, 0x4c, 0x8e, 0xd0, 0xa1, 0x0d, 0x36, 0xfd, 0x06, 0xf4, 0x70, 0x07, 0xf2, 0x36, 0x26, - 0x33, 0x02, 0x37, 0x79, 0xcf, 0xd2, 0xb4, 0x11, 0xcb, 0x63, 0x7b, 0xa6, 0x70, 0x36, 0xd6, 0xb1, - 0x9c, 0x1d, 0x7c, 0x44, 0x0f, 0x82, 0x57, 0xa0, 0x52, 0xb5, 0x02, 0x6a, 0x9f, 0xb2, 0xa2, 0x70, - 0x53, 0xeb, 0xe0, 0xe2, 0x1b, 0x90, 0x0f, 0x8b, 0x07, 0xcd, 0xc1, 0xb4, 0xe3, 0x6a, 0xb6, 0x4b, - 0xb5, 0x70, 0x5a, 0x61, 0x0f, 0x48, 0x82, 0x18, 0x36, 0x9b, 0xd4, 0xfe, 0x4d, 0x2b, 0xe4, 0x27, - 0xfa, 0xff, 0xfc, 0x0e, 0xc7, 0x68, 0x87, 0x1f, 0x1e, 0x1c, 0xd1, 0x10, 0x72, 0x7f, 0xbf, 0x8b, - 0xcf, 0x40, 0x2e, 0xd4, 0x81, 0x49, 0x5f, 0x2d, 0xff, 0xff, 0x70, 0x62, 0x28, 0x34, 0x7a, 0x05, - 0xe6, 0x7a, 0xa6, 0x61, 0xba, 0xd8, 0xee, 0xda, 0x98, 0x68, 0x2c, 0x7b, 0xd5, 0xfc, 0xef, 0x26, - 0x47, 0xe8, 0xdc, 0x4e, 0x90, 0x9a, 0xa1, 0x28, 0xb3, 0xbd, 0xc1, 0xc2, 0xf3, 0xe9, 0xd4, 0x17, - 0x93, 0xd2, 0x47, 0x3e, 0xf2, 0x91, 0x8f, 0x44, 0xe5, 0x5f, 0x4e, 0xc0, 0xdc, 0xb0, 0x39, 0x33, - 0x74, 0xfa, 0x9e, 0x84, 0x84, 0xd9, 0xeb, 0xec, 0x62, 0x9b, 0x0a, 0x69, 0x5a, 0xe1, 0x4f, 0xa8, - 0x04, 0xd3, 0x6d, 0x6d, 0x17, 0xb7, 0xe7, 0xe3, 0x4b, 0x91, 0x73, 0xf9, 0x8b, 0x8f, 0x4e, 0x34, - 0x2b, 0x97, 0xd7, 0x09, 0x8b, 0xc2, 0x38, 0xd1, 0x87, 0x20, 0xce, 0x8d, 0x37, 0x41, 0x38, 0x3f, - 0x19, 0x02, 0x99, 0x4b, 0x0a, 0xe5, 0x43, 0x67, 0x20, 0x4d, 0xfe, 0x67, 0xba, 0x91, 0xa0, 0x6d, - 0x4e, 0x91, 0x02, 0xa2, 0x17, 0xa8, 0x08, 0x29, 0x3a, 0x4d, 0x9a, 0x58, 0x2c, 0x7a, 0xde, 0x33, - 0x51, 0xac, 0x26, 0xde, 0xd3, 0x7a, 0x6d, 0x57, 0xbd, 0xa5, 0xb5, 0x7b, 0x98, 0x2a, 0x7c, 0x5a, - 0xc9, 0xf2, 0xc2, 0x1b, 0xa4, 0x0c, 0x2d, 0x42, 0x86, 0xcd, 0x2a, 0xc3, 0x6c, 0xe2, 0x03, 0x6a, - 0x57, 0xa7, 0x15, 0x36, 0xd1, 0x6a, 0xa4, 0x84, 0xbc, 0xfe, 0x75, 0xc7, 0x32, 0x85, 0x6a, 0xd2, - 0x57, 0x90, 0x02, 0xfa, 0xfa, 0x67, 0xfa, 0x4d, 0xfa, 0xfd, 0xc3, 0xbb, 0x37, 0x30, 0x97, 0xce, - 0x42, 0x81, 0x52, 0x3c, 0xc5, 0x87, 0x5e, 0x6b, 0xcf, 0xcf, 0x2c, 0x45, 0xce, 0xa5, 0x94, 0x3c, - 0x2b, 0xde, 0xe2, 0xa5, 0xf2, 0xcf, 0x44, 0x21, 0x4e, 0x0d, 0x4b, 0x01, 0x32, 0x8d, 0x57, 0xb7, - 0xab, 0xea, 0xea, 0xd6, 0x4e, 0x79, 0xbd, 0x2a, 0x45, 0x50, 0x1e, 0x80, 0x16, 0x5c, 0x5d, 0xdf, - 0x2a, 0x35, 0xa4, 0xa8, 0xf7, 0x5c, 0xdb, 0x6c, 0x5c, 0x7e, 0x5a, 0x8a, 0x79, 0x0c, 0x3b, 0xac, - 0x20, 0x1e, 0x24, 0x78, 0xea, 0xa2, 0x34, 0x8d, 0x24, 0xc8, 0x32, 0x80, 0xda, 0x2b, 0xd5, 0xd5, - 0xcb, 0x4f, 0x4b, 0x89, 0x70, 0xc9, 0x53, 0x17, 0xa5, 0x24, 0xca, 0x41, 0x9a, 0x96, 0x94, 0xb7, - 0xb6, 0xd6, 0xa5, 0x94, 0x87, 0x59, 0x6f, 0x28, 0xb5, 0xcd, 0x35, 0x29, 0xed, 0x61, 0xae, 0x29, - 0x5b, 0x3b, 0xdb, 0x12, 0x78, 0x08, 0x1b, 0xd5, 0x7a, 0xbd, 0xb4, 0x56, 0x95, 0x32, 0x1e, 0x45, - 0xf9, 0xd5, 0x46, 0xb5, 0x2e, 0x65, 0x43, 0xcd, 0x7a, 0xea, 0xa2, 0x94, 0xf3, 0x5e, 0x51, 0xdd, - 0xdc, 0xd9, 0x90, 0xf2, 0x68, 0x06, 0x72, 0xec, 0x15, 0xa2, 0x11, 0x85, 0xbe, 0xa2, 0xcb, 0x4f, - 0x4b, 0x92, 0xdf, 0x10, 0x86, 0x32, 0x13, 0x2a, 0xb8, 0xfc, 0xb4, 0x84, 0xe4, 0x0a, 0x4c, 0x53, - 0x35, 0x44, 0x08, 0xf2, 0xeb, 0xa5, 0x72, 0x75, 0x5d, 0xdd, 0xda, 0x6e, 0xd4, 0xb6, 0x36, 0x4b, - 0xeb, 0x52, 0xc4, 0x2f, 0x53, 0xaa, 0x2f, 0xed, 0xd4, 0x94, 0xea, 0xaa, 0x14, 0x0d, 0x96, 0x6d, - 0x57, 0x4b, 0x8d, 0xea, 0xaa, 0x14, 0x93, 0x75, 0x98, 0x1b, 0x66, 0x50, 0x87, 0x4e, 0xa1, 0x80, - 0x2e, 0x44, 0x47, 0xe8, 0x02, 0xc5, 0xea, 0xd7, 0x05, 0xf9, 0x0b, 0x51, 0x98, 0x1d, 0xb2, 0xa8, - 0x0c, 0x7d, 0xc9, 0x0b, 0x30, 0xcd, 0x74, 0x99, 0x2d, 0xb3, 0x8f, 0x0c, 0x5d, 0x9d, 0xa8, 0x66, - 0x0f, 0x2c, 0xb5, 0x94, 0x2f, 0xe8, 0x84, 0xc4, 0x46, 0x38, 0x21, 0x04, 0x62, 0x40, 0x61, 0xbf, - 0x6e, 0xc0, 0xf8, 0xb3, 0xf5, 0xf1, 0xf2, 0x24, 0xeb, 0x23, 0x2d, 0x3b, 0xde, 0x22, 0x30, 0x3d, - 0x64, 0x11, 0xb8, 0x02, 0x33, 0x03, 0x40, 0x13, 0x1b, 0xe3, 0x8f, 0x46, 0x60, 0x7e, 0x94, 0x70, - 0xc6, 0x98, 0xc4, 0x68, 0xc8, 0x24, 0x5e, 0xe9, 0x97, 0xe0, 0x03, 0xa3, 0x07, 0x61, 0x60, 0xac, - 0x3f, 0x1d, 0x81, 0x93, 0xc3, 0x9d, 0xcd, 0xa1, 0x6d, 0xf8, 0x10, 0x24, 0x3a, 0xd8, 0xdd, 0xb7, - 0x84, 0x5b, 0xf5, 0xf0, 0x90, 0xc5, 0x9a, 0x54, 0xf7, 0x0f, 0x36, 0xe7, 0x0a, 0xae, 0xf6, 0xb1, - 0x51, 0x1e, 0x23, 0x6b, 0xcd, 0x40, 0x4b, 0xbf, 0x35, 0x0a, 0x27, 0x86, 0x82, 0x0f, 0x6d, 0xe8, - 0xfd, 0x00, 0x86, 0xd9, 0xed, 0xb9, 0xcc, 0x75, 0x62, 0x96, 0x38, 0x4d, 0x4b, 0xa8, 0xf1, 0x22, - 0x56, 0xb6, 0xe7, 0x7a, 0xf5, 0x31, 0x5a, 0x0f, 0xac, 0x88, 0x12, 0x3c, 0xeb, 0x37, 0x34, 0x4e, - 0x1b, 0xba, 0x30, 0xa2, 0xa7, 0x03, 0x8a, 0xf9, 0x04, 0x48, 0x7a, 0xdb, 0xc0, 0xa6, 0xab, 0x3a, - 0xae, 0x8d, 0xb5, 0x8e, 0x61, 0xb6, 0xe8, 0x52, 0x93, 0x5a, 0x99, 0xde, 0xd3, 0xda, 0x0e, 0x56, - 0x0a, 0xac, 0xba, 0x2e, 0x6a, 0x09, 0x07, 0x55, 0x20, 0x3b, 0xc0, 0x91, 0x08, 0x71, 0xb0, 0x6a, - 0x8f, 0x43, 0xfe, 0xce, 0x34, 0x64, 0x02, 0xae, 0x39, 0x7a, 0x00, 0xb2, 0xaf, 0x6b, 0xb7, 0x34, - 0x55, 0x84, 0x5b, 0x4c, 0x12, 0x19, 0x52, 0xb6, 0xcd, 0x43, 0xae, 0x27, 0x60, 0x8e, 0x92, 0x58, - 0x3d, 0x17, 0xdb, 0xaa, 0xde, 0xd6, 0x1c, 0x87, 0x0a, 0x2d, 0x45, 0x49, 0x11, 0xa9, 0xdb, 0x22, - 0x55, 0x15, 0x51, 0x83, 0x2e, 0xc1, 0x2c, 0xe5, 0xe8, 0xf4, 0xda, 0xae, 0xd1, 0x6d, 0x63, 0x95, - 0x04, 0x80, 0x0e, 0x5d, 0x72, 0xbc, 0x96, 0xcd, 0x10, 0x8a, 0x0d, 0x4e, 0x40, 0x5a, 0xe4, 0xa0, - 0x55, 0xb8, 0x9f, 0xb2, 0xb5, 0xb0, 0x89, 0x6d, 0xcd, 0xc5, 0x2a, 0xfe, 0x70, 0x4f, 0x6b, 0x3b, - 0xaa, 0x66, 0x36, 0xd5, 0x7d, 0xcd, 0xd9, 0x9f, 0x9f, 0x23, 0x00, 0xe5, 0xe8, 0x7c, 0x44, 0x39, - 0x4d, 0x08, 0xd7, 0x38, 0x5d, 0x95, 0x92, 0x95, 0xcc, 0xe6, 0x35, 0xcd, 0xd9, 0x47, 0x2b, 0x70, - 0x92, 0xa2, 0x38, 0xae, 0x6d, 0x98, 0x2d, 0x55, 0xdf, 0xc7, 0xfa, 0x4d, 0xb5, 0xe7, 0xee, 0x3d, - 0x3b, 0x7f, 0x26, 0xf8, 0x7e, 0xda, 0xc2, 0x3a, 0xa5, 0xa9, 0x10, 0x92, 0x1d, 0x77, 0xef, 0x59, - 0x54, 0x87, 0x2c, 0x19, 0x8c, 0x8e, 0xf1, 0x06, 0x56, 0xf7, 0x2c, 0x9b, 0xae, 0xa1, 0xf9, 0x21, - 0xa6, 0x29, 0x20, 0xc1, 0xe5, 0x2d, 0xce, 0xb0, 0x61, 0x35, 0xf1, 0xca, 0x74, 0x7d, 0xbb, 0x5a, - 0x5d, 0x55, 0x32, 0x02, 0xe5, 0xaa, 0x65, 0x13, 0x85, 0x6a, 0x59, 0x9e, 0x80, 0x33, 0x4c, 0xa1, - 0x5a, 0x96, 0x10, 0xef, 0x25, 0x98, 0xd5, 0x75, 0xd6, 0x67, 0x43, 0x57, 0x79, 0x98, 0xe6, 0xcc, - 0x4b, 0x21, 0x61, 0xe9, 0xfa, 0x1a, 0x23, 0xe0, 0x3a, 0xee, 0xa0, 0xe7, 0xe0, 0x84, 0x2f, 0xac, - 0x20, 0xe3, 0xcc, 0x40, 0x2f, 0xfb, 0x59, 0x2f, 0xc1, 0x6c, 0xf7, 0x70, 0x90, 0x11, 0x85, 0xde, - 0xd8, 0x3d, 0xec, 0x67, 0x7b, 0x06, 0xe6, 0xba, 0xfb, 0xdd, 0x41, 0xbe, 0xf3, 0x41, 0x3e, 0xd4, - 0xdd, 0xef, 0xf6, 0x33, 0x3e, 0x44, 0x63, 0x76, 0x1b, 0xeb, 0x9a, 0x8b, 0x9b, 0xf3, 0xa7, 0x82, - 0xe4, 0x81, 0x0a, 0xb4, 0x0c, 0x92, 0xae, 0xab, 0xd8, 0xd4, 0x76, 0xdb, 0x58, 0xd5, 0x6c, 0x6c, - 0x6a, 0xce, 0xfc, 0x22, 0x25, 0x8e, 0xbb, 0x76, 0x0f, 0x2b, 0x79, 0x5d, 0xaf, 0xd2, 0xca, 0x12, - 0xad, 0x43, 0xe7, 0x61, 0xc6, 0xda, 0x7d, 0x5d, 0x67, 0x1a, 0xa9, 0x76, 0x6d, 0xbc, 0x67, 0x1c, - 0xcc, 0x7f, 0x80, 0x8a, 0xb7, 0x40, 0x2a, 0xa8, 0x3e, 0x6e, 0xd3, 0x62, 0xf4, 0x08, 0x48, 0xba, - 0xb3, 0xaf, 0xd9, 0x5d, 0x6a, 0x92, 0x9d, 0xae, 0xa6, 0xe3, 0xf9, 0x87, 0x18, 0x29, 0x2b, 0xdf, - 0x14, 0xc5, 0x64, 0x46, 0x38, 0xb7, 0x8d, 0x3d, 0x57, 0x20, 0x9e, 0x65, 0x33, 0x82, 0x96, 0x71, - 0xb4, 0x73, 0x20, 0x11, 0x49, 0x84, 0x5e, 0x7c, 0x8e, 0x92, 0xe5, 0xbb, 0xfb, 0xdd, 0xe0, 0x7b, - 0x1f, 0x84, 0x1c, 0xa1, 0xf4, 0x5f, 0xfa, 0x08, 0x73, 0xdc, 0xba, 0xfb, 0x81, 0x37, 0x3e, 0x0d, - 0x27, 0x09, 0x51, 0x07, 0xbb, 0x5a, 0x53, 0x73, 0xb5, 0x00, 0xf5, 0x63, 0x94, 0x9a, 0x88, 0x7d, - 0x83, 0x57, 0x86, 0xda, 0x69, 0xf7, 0x76, 0x0f, 0x3d, 0xc5, 0x7a, 0x9c, 0xb5, 0x93, 0x94, 0x09, - 0xd5, 0x7a, 0xcf, 0x9c, 0x73, 0x79, 0x05, 0xb2, 0x41, 0xbd, 0x47, 0x69, 0x60, 0x9a, 0x2f, 0x45, - 0x88, 0x13, 0x54, 0xd9, 0x5a, 0x25, 0xee, 0xcb, 0x6b, 0x55, 0x29, 0x4a, 0xdc, 0xa8, 0xf5, 0x5a, - 0xa3, 0xaa, 0x2a, 0x3b, 0x9b, 0x8d, 0xda, 0x46, 0x55, 0x8a, 0x05, 0x1c, 0xfb, 0xeb, 0xf1, 0xd4, - 0xc3, 0xd2, 0x59, 0xf9, 0xe7, 0x63, 0x90, 0x0f, 0x47, 0x6a, 0xe8, 0x83, 0x70, 0x4a, 0x24, 0x5c, - 0x1c, 0xec, 0xaa, 0xb7, 0x0d, 0x9b, 0x4e, 0xc8, 0x8e, 0xc6, 0x16, 0x47, 0x4f, 0x7f, 0xe6, 0x38, - 0x55, 0x1d, 0xbb, 0x2f, 0x1b, 0x36, 0x99, 0x6e, 0x1d, 0xcd, 0x45, 0xeb, 0xb0, 0x68, 0x5a, 0xaa, - 0xe3, 0x6a, 0x66, 0x53, 0xb3, 0x9b, 0xaa, 0x9f, 0xea, 0x52, 0x35, 0x5d, 0xc7, 0x8e, 0x63, 0xb1, - 0x85, 0xd0, 0x43, 0xb9, 0xcf, 0xb4, 0xea, 0x9c, 0xd8, 0x5f, 0x21, 0x4a, 0x9c, 0xb4, 0x4f, 0x7d, - 0x63, 0xa3, 0xd4, 0xf7, 0x0c, 0xa4, 0x3b, 0x5a, 0x57, 0xc5, 0xa6, 0x6b, 0x1f, 0x52, 0xff, 0x3c, - 0xa5, 0xa4, 0x3a, 0x5a, 0xb7, 0x4a, 0x9e, 0xd1, 0x0d, 0x78, 0xd8, 0x27, 0x55, 0xdb, 0xb8, 0xa5, - 0xe9, 0x87, 0x2a, 0x75, 0xc6, 0x69, 0xda, 0x40, 0xd5, 0x2d, 0x73, 0xaf, 0x6d, 0xe8, 0xae, 0x43, - 0xed, 0x03, 0xb3, 0x71, 0xb2, 0xcf, 0xb1, 0x4e, 0x19, 0xae, 0x3b, 0x96, 0x49, 0x7d, 0xf0, 0x8a, - 0xa0, 0x7e, 0x5f, 0xc2, 0xaf, 0xeb, 0xf1, 0x54, 0x5c, 0x9a, 0xbe, 0x1e, 0x4f, 0x4d, 0x4b, 0x89, - 0xeb, 0xf1, 0x54, 0x42, 0x4a, 0x5e, 0x8f, 0xa7, 0x52, 0x52, 0xfa, 0x7a, 0x3c, 0x95, 0x96, 0x40, - 0xfe, 0x5c, 0x0a, 0xb2, 0xc1, 0xc8, 0x80, 0x04, 0x5a, 0x3a, 0x5d, 0x1b, 0x23, 0xd4, 0x7a, 0x3e, - 0x78, 0x64, 0x1c, 0xb1, 0x5c, 0x21, 0x8b, 0xe6, 0x4a, 0x82, 0xb9, 0xe1, 0x0a, 0xe3, 0x24, 0x0e, - 0x0b, 0x51, 0x6b, 0xcc, 0xdc, 0x9e, 0x94, 0xc2, 0x9f, 0xd0, 0x1a, 0x24, 0x5e, 0x77, 0x28, 0x76, - 0x82, 0x62, 0x7f, 0xe0, 0x68, 0xec, 0xeb, 0x75, 0x0a, 0x9e, 0xbe, 0x5e, 0x57, 0x37, 0xb7, 0x94, - 0x8d, 0xd2, 0xba, 0xc2, 0xd9, 0xd1, 0x69, 0x88, 0xb7, 0xb5, 0x37, 0x0e, 0xc3, 0xcb, 0x2b, 0x2d, - 0x42, 0xcb, 0x50, 0xe8, 0x99, 0xb7, 0xb0, 0x6d, 0xec, 0x19, 0x64, 0xa8, 0x08, 0x55, 0x21, 0x48, - 0x95, 0xf7, 0x6b, 0xd7, 0x09, 0xfd, 0x84, 0xea, 0x71, 0x1a, 0xe2, 0xb7, 0xb1, 0x76, 0x33, 0xbc, - 0x08, 0xd2, 0x22, 0x74, 0x0e, 0xb2, 0x4d, 0xbc, 0xdb, 0x6b, 0xa9, 0x36, 0x6e, 0x6a, 0xba, 0x1b, - 0x36, 0xfd, 0x19, 0x5a, 0xa5, 0xd0, 0x1a, 0xf4, 0x22, 0xa4, 0xc9, 0x18, 0x99, 0x74, 0x8c, 0x67, - 0xa8, 0x08, 0x1e, 0x3f, 0x5a, 0x04, 0x7c, 0x88, 0x05, 0x93, 0xe2, 0xf3, 0xa3, 0xab, 0x90, 0x70, - 0x35, 0xbb, 0x85, 0x5d, 0x6a, 0xf9, 0xf3, 0x43, 0x92, 0x1f, 0x43, 0x90, 0x1a, 0x94, 0x83, 0xc6, - 0xb4, 0x9c, 0xfb, 0x3d, 0xb4, 0x32, 0x17, 0x60, 0x9a, 0xaa, 0x07, 0x02, 0xe0, 0x0a, 0x22, 0x4d, - 0xa1, 0x14, 0xc4, 0x2b, 0x5b, 0x0a, 0xb1, 0x34, 0x12, 0x64, 0x59, 0xa9, 0xba, 0x5d, 0xab, 0x56, - 0xaa, 0x52, 0x54, 0xbe, 0x04, 0x09, 0x36, 0xe6, 0xc4, 0x0a, 0x79, 0xa3, 0x2e, 0x4d, 0xf1, 0x47, - 0x8e, 0x11, 0x11, 0xb5, 0x3b, 0x1b, 0xe5, 0xaa, 0x22, 0x45, 0xe5, 0x1d, 0x28, 0xf4, 0xc9, 0x09, - 0x9d, 0x80, 0x19, 0xa5, 0xda, 0xa8, 0x6e, 0x92, 0x38, 0x4b, 0xdd, 0xd9, 0x7c, 0x71, 0x73, 0xeb, - 0xe5, 0x4d, 0x69, 0x2a, 0x5c, 0x2c, 0x4c, 0x5a, 0x04, 0xcd, 0x81, 0xe4, 0x17, 0xd7, 0xb7, 0x76, - 0x14, 0xda, 0x9a, 0x6f, 0x8b, 0x82, 0xd4, 0x2f, 0x35, 0x74, 0x0a, 0x66, 0x1b, 0x25, 0x65, 0xad, - 0xda, 0x50, 0x59, 0xec, 0xe8, 0x41, 0xcf, 0x81, 0x14, 0xac, 0xb8, 0x5a, 0xa3, 0xa1, 0xf1, 0x22, - 0x9c, 0x09, 0x96, 0x56, 0x5f, 0x69, 0x54, 0x37, 0xeb, 0xf4, 0xe5, 0xa5, 0xcd, 0x35, 0x62, 0x5f, - 0xfb, 0xf0, 0x44, 0xb4, 0x1a, 0x23, 0x4d, 0x0d, 0xe3, 0x55, 0xd7, 0x57, 0xa5, 0x78, 0x7f, 0xf1, - 0xd6, 0x66, 0x75, 0xeb, 0xaa, 0x34, 0xdd, 0xff, 0x76, 0x1a, 0xc1, 0x26, 0x50, 0x11, 0x4e, 0xf6, - 0x97, 0xaa, 0xd5, 0xcd, 0x86, 0xf2, 0xaa, 0x94, 0xec, 0x7f, 0x71, 0xbd, 0xaa, 0xdc, 0xa8, 0x55, - 0xaa, 0x52, 0x0a, 0x9d, 0x04, 0x14, 0x6e, 0x51, 0xe3, 0xda, 0xd6, 0xaa, 0x94, 0x1e, 0xb0, 0x28, - 0xb2, 0x03, 0xd9, 0x60, 0x18, 0xf9, 0xfe, 0xe4, 0x92, 0x3e, 0x11, 0x85, 0x4c, 0x20, 0x2c, 0x24, - 0xfe, 0xbc, 0xd6, 0x6e, 0x5b, 0xb7, 0x55, 0xad, 0x6d, 0x68, 0x0e, 0xb7, 0x37, 0x40, 0x8b, 0x4a, - 0xa4, 0x64, 0xd2, 0xf9, 0x3d, 0xb9, 0x85, 0x4f, 0x7c, 0x35, 0x5a, 0xf8, 0x69, 0x29, 0x21, 0xff, - 0x60, 0x04, 0xa4, 0xfe, 0x78, 0xaf, 0xaf, 0xfb, 0x91, 0x51, 0xdd, 0x7f, 0x5f, 0xc6, 0xee, 0x93, - 0x11, 0xc8, 0x87, 0x83, 0xbc, 0xbe, 0xe6, 0x3d, 0xf0, 0x97, 0xda, 0xbc, 0xdf, 0x8c, 0x42, 0x2e, - 0x14, 0xda, 0x4d, 0xda, 0xba, 0x0f, 0xc3, 0x8c, 0xd1, 0xc4, 0x9d, 0xae, 0xe5, 0x62, 0x53, 0x3f, - 0x54, 0xdb, 0xf8, 0x16, 0x6e, 0xcf, 0xcb, 0xd4, 0x28, 0x5f, 0x38, 0x3a, 0x78, 0x5c, 0xae, 0xf9, - 0x7c, 0xeb, 0x84, 0x6d, 0x65, 0xb6, 0xb6, 0x5a, 0xdd, 0xd8, 0xde, 0x6a, 0x54, 0x37, 0x2b, 0xaf, - 0x0a, 0xeb, 0xa2, 0x48, 0x46, 0x1f, 0xd9, 0x7b, 0x68, 0xb4, 0xb7, 0x41, 0xea, 0x6f, 0x14, 0xb1, - 0x15, 0x43, 0x9a, 0x25, 0x4d, 0xa1, 0x59, 0x28, 0x6c, 0x6e, 0xa9, 0xf5, 0xda, 0x6a, 0x55, 0xad, - 0x5e, 0xbd, 0x5a, 0xad, 0x34, 0xea, 0x2c, 0x1d, 0xe8, 0x51, 0x37, 0xa4, 0x68, 0x50, 0xc4, 0xdf, - 0x1f, 0x83, 0xd9, 0x21, 0x2d, 0x41, 0x25, 0x1e, 0xc8, 0xb3, 0xdc, 0xc2, 0xe3, 0x93, 0xb4, 0x7e, - 0x99, 0xb8, 0xd2, 0xdb, 0x9a, 0xed, 0xf2, 0xb8, 0xff, 0x11, 0x20, 0x52, 0x32, 0x5d, 0xb2, 0xb2, - 0xdb, 0x3c, 0xcd, 0xca, 0xa2, 0xfb, 0x82, 0x5f, 0xce, 0x32, 0xad, 0x8f, 0x01, 0xea, 0x5a, 0x8e, - 0xe1, 0x1a, 0xb7, 0xb0, 0x6a, 0x98, 0x22, 0x27, 0x4b, 0xa2, 0xfd, 0xb8, 0x22, 0x89, 0x9a, 0x9a, - 0xe9, 0x7a, 0xd4, 0x26, 0x6e, 0x69, 0x7d, 0xd4, 0xc4, 0xf3, 0x88, 0x29, 0x92, 0xa8, 0xf1, 0xa8, - 0x1f, 0x80, 0x6c, 0xd3, 0xea, 0x91, 0x10, 0x88, 0xd1, 0x11, 0x6b, 0x11, 0x51, 0x32, 0xac, 0xcc, - 0x23, 0xe1, 0xc1, 0xad, 0x9f, 0x0c, 0xce, 0x2a, 0x19, 0x56, 0xc6, 0x48, 0xce, 0x42, 0x41, 0x6b, - 0xb5, 0x6c, 0x02, 0x2e, 0x80, 0x58, 0xb8, 0x9e, 0xf7, 0x8a, 0x29, 0x61, 0xf1, 0x3a, 0xa4, 0x84, - 0x1c, 0x88, 0x07, 0x4b, 0x24, 0xa1, 0x76, 0x59, 0x0e, 0x2a, 0x7a, 0x2e, 0xad, 0xa4, 0x4c, 0x51, - 0xf9, 0x00, 0x64, 0x0d, 0x47, 0xf5, 0xf7, 0xb6, 0xa2, 0x4b, 0xd1, 0x73, 0x29, 0x25, 0x63, 0x38, - 0xde, 0xbe, 0x80, 0xfc, 0xe9, 0x28, 0xe4, 0xc3, 0xbb, 0x76, 0x68, 0x15, 0x52, 0x6d, 0x4b, 0xd7, - 0xa8, 0x6a, 0xb1, 0x2d, 0xe3, 0x73, 0x63, 0x36, 0xfa, 0x96, 0xd7, 0x39, 0xbd, 0xe2, 0x71, 0x16, - 0xff, 0x6d, 0x04, 0x52, 0xa2, 0x18, 0x9d, 0x84, 0x78, 0x57, 0x73, 0xf7, 0x29, 0xdc, 0x74, 0x39, - 0x2a, 0x45, 0x14, 0xfa, 0x4c, 0xca, 0x9d, 0xae, 0x66, 0x52, 0x15, 0xe0, 0xe5, 0xe4, 0x99, 0x8c, - 0x6b, 0x1b, 0x6b, 0x4d, 0x9a, 0x0b, 0xb0, 0x3a, 0x1d, 0x6c, 0xba, 0x8e, 0x18, 0x57, 0x5e, 0x5e, - 0xe1, 0xc5, 0xe8, 0x51, 0x98, 0x71, 0x6d, 0xcd, 0x68, 0x87, 0x68, 0xe3, 0x94, 0x56, 0x12, 0x15, - 0x1e, 0xf1, 0x0a, 0x9c, 0x16, 0xb8, 0x4d, 0xec, 0x6a, 0xfa, 0x3e, 0x6e, 0xfa, 0x4c, 0x09, 0x9a, - 0xf3, 0x3b, 0xc5, 0x09, 0x56, 0x79, 0xbd, 0xe0, 0x95, 0x3f, 0x1f, 0x85, 0x19, 0x91, 0xbd, 0x68, - 0x7a, 0xc2, 0xda, 0x00, 0xd0, 0x4c, 0xd3, 0x72, 0x83, 0xe2, 0x1a, 0x54, 0xe5, 0x01, 0xbe, 0xe5, - 0x92, 0xc7, 0xa4, 0x04, 0x00, 0x8a, 0xbf, 0x17, 0x01, 0xf0, 0xab, 0x46, 0xca, 0x6d, 0x11, 0x32, - 0x7c, 0x4f, 0x96, 0x6e, 0xec, 0xb3, 0x84, 0x17, 0xb0, 0xa2, 0xab, 0x46, 0x9b, 0xa6, 0x25, 0x77, - 0x71, 0xcb, 0x30, 0xf9, 0x7e, 0x0a, 0x7b, 0x10, 0x69, 0xc9, 0xb8, 0xbf, 0x3d, 0xa5, 0x40, 0xca, - 0xc1, 0x1d, 0xcd, 0x74, 0x0d, 0x9d, 0xef, 0x90, 0x5c, 0x3e, 0x56, 0xe3, 0x97, 0xeb, 0x9c, 0x5b, - 0xf1, 0x70, 0xe4, 0x73, 0x90, 0x12, 0xa5, 0xc4, 0xf1, 0xdb, 0xdc, 0xda, 0xac, 0x4a, 0x53, 0x28, - 0x09, 0xb1, 0x7a, 0xb5, 0x21, 0x45, 0x48, 0xd8, 0x59, 0x5a, 0xaf, 0x95, 0xea, 0x52, 0xb4, 0xfc, - 0xd7, 0x60, 0x56, 0xb7, 0x3a, 0xfd, 0x2f, 0x2c, 0x4b, 0x7d, 0x29, 0x3f, 0xe7, 0x5a, 0xe4, 0xb5, - 0xc7, 0x39, 0x51, 0xcb, 0x6a, 0x6b, 0x66, 0x6b, 0xd9, 0xb2, 0x5b, 0xfe, 0xb1, 0x08, 0x12, 0x1d, - 0x38, 0x81, 0xc3, 0x11, 0xdd, 0xdd, 0xff, 0x11, 0x89, 0xfc, 0x50, 0x34, 0xb6, 0xb6, 0x5d, 0xfe, - 0xf1, 0x68, 0x71, 0x8d, 0x31, 0x6e, 0x8b, 0xee, 0x28, 0x78, 0xaf, 0x8d, 0x75, 0xd2, 0x78, 0xf8, - 0xfd, 0x47, 0x61, 0xae, 0x65, 0xb5, 0x2c, 0x8a, 0x74, 0x81, 0xfc, 0xe2, 0xe7, 0x2a, 0xd2, 0x5e, - 0x69, 0x71, 0xec, 0x21, 0x8c, 0x95, 0x4d, 0x98, 0xe5, 0xc4, 0x2a, 0xdd, 0xbe, 0x65, 0xc9, 0x05, - 0x74, 0x64, 0x66, 0x7b, 0xfe, 0x27, 0x7f, 0x9b, 0x7a, 0x25, 0xca, 0x0c, 0x67, 0x25, 0x75, 0x2c, - 0xff, 0xb0, 0xa2, 0xc0, 0x89, 0x10, 0x1e, 0xb3, 0x11, 0xd8, 0x1e, 0x83, 0xf8, 0x2f, 0x38, 0xe2, - 0x6c, 0x00, 0xb1, 0xce, 0x59, 0x57, 0x2a, 0x90, 0x3b, 0x0e, 0xd6, 0xbf, 0xe4, 0x58, 0x59, 0x1c, - 0x04, 0x59, 0x83, 0x02, 0x05, 0xd1, 0x7b, 0x8e, 0x6b, 0x75, 0xa8, 0x01, 0x3e, 0x1a, 0xe6, 0x5f, - 0xfd, 0x36, 0x9b, 0xb4, 0x79, 0xc2, 0x56, 0xf1, 0xb8, 0x56, 0x56, 0x80, 0xee, 0x58, 0x37, 0xb1, - 0xde, 0x1e, 0x83, 0xf0, 0x2b, 0xbc, 0x21, 0x1e, 0xfd, 0xca, 0x0d, 0x98, 0x23, 0xbf, 0xa9, 0x7d, - 0x0c, 0xb6, 0x64, 0x7c, 0x1a, 0x7c, 0xfe, 0xdf, 0x7d, 0x94, 0xd9, 0x85, 0x59, 0x0f, 0x20, 0xd0, - 0xa6, 0xc0, 0x28, 0xb6, 0xb0, 0xeb, 0x62, 0xdb, 0x51, 0xb5, 0xf6, 0xb0, 0xe6, 0x05, 0xf2, 0x88, - 0xf3, 0xdf, 0xf7, 0xe5, 0xf0, 0x28, 0xae, 0x31, 0xce, 0x52, 0xbb, 0xbd, 0xb2, 0x03, 0xa7, 0x86, - 0x68, 0xc5, 0x04, 0x98, 0xdf, 0xcf, 0x31, 0xe7, 0x06, 0x34, 0x83, 0xc0, 0x6e, 0x83, 0x28, 0xf7, - 0xc6, 0x72, 0x02, 0xcc, 0x1f, 0xe0, 0x98, 0x88, 0xf3, 0x8a, 0x21, 0x25, 0x88, 0xd7, 0x61, 0xe6, - 0x16, 0xb6, 0x77, 0x2d, 0x87, 0xe7, 0x6e, 0x27, 0x80, 0xfb, 0x24, 0x87, 0x2b, 0x70, 0x46, 0x9a, - 0xcc, 0x25, 0x58, 0xcf, 0x41, 0x6a, 0x4f, 0xd3, 0xf1, 0x04, 0x10, 0x77, 0x39, 0x44, 0x92, 0xd0, - 0x13, 0xd6, 0x12, 0x64, 0x5b, 0x16, 0x5f, 0x22, 0xc7, 0xb3, 0xff, 0x20, 0x67, 0xcf, 0x08, 0x1e, - 0x0e, 0xd1, 0xb5, 0xba, 0xbd, 0x36, 0x59, 0x3f, 0xc7, 0x43, 0xfc, 0x1d, 0x01, 0x21, 0x78, 0x38, - 0xc4, 0x31, 0xc4, 0xfa, 0xa6, 0x80, 0x70, 0x02, 0xf2, 0x7c, 0x01, 0x32, 0x96, 0xd9, 0x3e, 0xb4, - 0xcc, 0x49, 0x1a, 0xf1, 0x29, 0x8e, 0x00, 0x9c, 0x85, 0x00, 0x5c, 0x81, 0xf4, 0xa4, 0x03, 0xf1, - 0x23, 0x5f, 0x16, 0xd3, 0x43, 0x8c, 0xc0, 0x1a, 0x14, 0x84, 0x81, 0x32, 0x2c, 0x73, 0x02, 0x88, - 0x1f, 0xe5, 0x10, 0xf9, 0x00, 0x1b, 0xef, 0x86, 0x8b, 0x1d, 0xb7, 0x85, 0x27, 0x01, 0xf9, 0xb4, - 0xe8, 0x06, 0x67, 0xe1, 0xa2, 0xdc, 0xc5, 0xa6, 0xbe, 0x3f, 0x19, 0xc2, 0x67, 0x84, 0x28, 0x05, - 0x0f, 0x81, 0xa8, 0x40, 0xae, 0xa3, 0xd9, 0xce, 0xbe, 0xd6, 0x9e, 0x68, 0x38, 0x7e, 0x8c, 0x63, - 0x64, 0x3d, 0x26, 0x2e, 0x91, 0x9e, 0x79, 0x1c, 0x98, 0x1f, 0x17, 0x12, 0x09, 0xb0, 0xf1, 0xa9, - 0xe7, 0xb8, 0x34, 0xd1, 0x7d, 0x1c, 0xb4, 0xbf, 0x27, 0xa6, 0x1e, 0xe3, 0xdd, 0x08, 0x22, 0x5e, - 0x81, 0xb4, 0x63, 0xbc, 0x31, 0x11, 0xcc, 0xdf, 0x17, 0x23, 0x4d, 0x19, 0x08, 0xf3, 0xab, 0x70, - 0x7a, 0xe8, 0x32, 0x31, 0x01, 0xd8, 0x3f, 0xe0, 0x60, 0x27, 0x87, 0x2c, 0x15, 0xdc, 0x24, 0x1c, - 0x17, 0xf2, 0x1f, 0x0a, 0x93, 0x80, 0xfb, 0xb0, 0xb6, 0x49, 0xd0, 0xe2, 0x68, 0x7b, 0xc7, 0x93, - 0xda, 0x3f, 0x12, 0x52, 0x63, 0xbc, 0x21, 0xa9, 0x35, 0xe0, 0x24, 0x47, 0x3c, 0xde, 0xb8, 0xfe, - 0x84, 0x30, 0xac, 0x8c, 0x7b, 0x27, 0x3c, 0xba, 0x5f, 0x03, 0x45, 0x4f, 0x9c, 0xc2, 0x3b, 0x76, - 0xd4, 0x8e, 0xd6, 0x9d, 0x00, 0xf9, 0x27, 0x39, 0xb2, 0xb0, 0xf8, 0x9e, 0x7b, 0xed, 0x6c, 0x68, - 0x5d, 0x02, 0xfe, 0x0a, 0xcc, 0x0b, 0xf0, 0x9e, 0x69, 0x63, 0xdd, 0x6a, 0x99, 0xc6, 0x1b, 0xb8, - 0x39, 0x01, 0xf4, 0x4f, 0xf5, 0x0d, 0xd5, 0x4e, 0x80, 0x9d, 0x20, 0xd7, 0x40, 0xf2, 0x7c, 0x15, - 0xd5, 0xe8, 0x74, 0x2d, 0xdb, 0x1d, 0x83, 0xf8, 0xd3, 0x62, 0xa4, 0x3c, 0xbe, 0x1a, 0x65, 0x5b, - 0xa9, 0x02, 0x3b, 0xfd, 0x31, 0xa9, 0x4a, 0x7e, 0x96, 0x03, 0xe5, 0x7c, 0x2e, 0x6e, 0x38, 0x74, - 0xab, 0xd3, 0xd5, 0xec, 0x49, 0xec, 0xdf, 0x3f, 0x16, 0x86, 0x83, 0xb3, 0x70, 0xc3, 0x41, 0x3c, - 0x3a, 0xb2, 0xda, 0x4f, 0x80, 0xf0, 0x33, 0xc2, 0x70, 0x08, 0x1e, 0x0e, 0x21, 0x1c, 0x86, 0x09, - 0x20, 0x3e, 0x27, 0x20, 0x04, 0x0f, 0x81, 0x78, 0xc9, 0x5f, 0x68, 0x6d, 0xdc, 0x32, 0x1c, 0xd7, - 0x66, 0x2e, 0xf9, 0xd1, 0x50, 0x3f, 0xfb, 0xe5, 0xb0, 0x13, 0xa6, 0x04, 0x58, 0x89, 0x25, 0xe2, - 0x5b, 0x1f, 0x34, 0x64, 0x1b, 0xdf, 0xb0, 0x9f, 0x13, 0x96, 0x28, 0xc0, 0x46, 0xda, 0x16, 0xf0, - 0x10, 0x89, 0xd8, 0x75, 0x12, 0xa8, 0x4c, 0x00, 0xf7, 0x4f, 0xfa, 0x1a, 0x57, 0x17, 0xbc, 0x04, - 0x33, 0xe0, 0xff, 0xf4, 0xcc, 0x9b, 0xf8, 0x70, 0x22, 0xed, 0xfc, 0xf9, 0x3e, 0xff, 0x67, 0x87, - 0x71, 0x32, 0x1b, 0x52, 0xe8, 0xf3, 0xa7, 0xd0, 0xb8, 0xb3, 0x7e, 0xf3, 0xdf, 0xf8, 0x0e, 0xef, - 0x6f, 0xd8, 0x9d, 0x5a, 0x59, 0x27, 0x4a, 0x1e, 0x76, 0x7a, 0xc6, 0x83, 0x7d, 0xf4, 0x1d, 0x4f, - 0xcf, 0x43, 0x3e, 0xcf, 0xca, 0x55, 0xc8, 0x85, 0x1c, 0x9e, 0xf1, 0x50, 0xdf, 0xcc, 0xa1, 0xb2, - 0x41, 0x7f, 0x67, 0xe5, 0x12, 0xc4, 0x89, 0xf3, 0x32, 0x9e, 0xfd, 0x5b, 0x38, 0x3b, 0x25, 0x5f, - 0x79, 0x1e, 0x52, 0xc2, 0x69, 0x19, 0xcf, 0xfa, 0xd7, 0x39, 0xab, 0xc7, 0x42, 0xd8, 0x85, 0xc3, - 0x32, 0x9e, 0xfd, 0x6f, 0x08, 0x76, 0xc1, 0x42, 0xd8, 0x27, 0x17, 0xe1, 0x2f, 0xfd, 0xcd, 0x38, - 0x5f, 0x74, 0x84, 0xec, 0xae, 0x40, 0x92, 0x7b, 0x2a, 0xe3, 0xb9, 0xbf, 0x95, 0xbf, 0x5c, 0x70, - 0xac, 0x3c, 0x03, 0xd3, 0x13, 0x0a, 0xfc, 0x6f, 0x71, 0x56, 0x46, 0xbf, 0x52, 0x81, 0x4c, 0xc0, - 0x3b, 0x19, 0xcf, 0xfe, 0xed, 0x9c, 0x3d, 0xc8, 0x45, 0x9a, 0xce, 0xbd, 0x93, 0xf1, 0x00, 0xdf, - 0x21, 0x9a, 0xce, 0x39, 0x88, 0xd8, 0x84, 0x63, 0x32, 0x9e, 0xfb, 0xe3, 0x42, 0xea, 0x82, 0x65, - 0xe5, 0x05, 0x48, 0x7b, 0x8b, 0xcd, 0x78, 0xfe, 0xef, 0xe4, 0xfc, 0x3e, 0x0f, 0x91, 0x40, 0x60, - 0xb1, 0x1b, 0x0f, 0xf1, 0x5d, 0x42, 0x02, 0x01, 0x2e, 0x32, 0x8d, 0xfa, 0x1d, 0x98, 0xf1, 0x48, - 0xdf, 0x2d, 0xa6, 0x51, 0x9f, 0xff, 0x42, 0x46, 0x93, 0xda, 0xfc, 0xf1, 0x10, 0xdf, 0x23, 0x46, - 0x93, 0xd2, 0x93, 0x66, 0xf4, 0x7b, 0x04, 0xe3, 0x31, 0xbe, 0x57, 0x34, 0xa3, 0xcf, 0x21, 0x58, - 0xd9, 0x06, 0x34, 0xe8, 0x0d, 0x8c, 0xc7, 0xfb, 0x04, 0xc7, 0x9b, 0x19, 0x70, 0x06, 0x56, 0x5e, - 0x86, 0x93, 0xc3, 0x3d, 0x81, 0xf1, 0xa8, 0xdf, 0xf7, 0x4e, 0x5f, 0xec, 0x16, 0x74, 0x04, 0x56, - 0x1a, 0xfe, 0x92, 0x12, 0xf4, 0x02, 0xc6, 0xc3, 0x7e, 0xff, 0x3b, 0x61, 0xc3, 0x1d, 0x74, 0x02, - 0x56, 0x4a, 0x00, 0xfe, 0x02, 0x3c, 0x1e, 0xeb, 0x93, 0x1c, 0x2b, 0xc0, 0x44, 0xa6, 0x06, 0x5f, - 0x7f, 0xc7, 0xf3, 0xdf, 0x15, 0x53, 0x83, 0x73, 0x90, 0xa9, 0x21, 0x96, 0xde, 0xf1, 0xdc, 0x3f, - 0x28, 0xa6, 0x86, 0x60, 0x21, 0x9a, 0x1d, 0x58, 0xdd, 0xc6, 0x23, 0x7c, 0x4a, 0x68, 0x76, 0x80, - 0x6b, 0x65, 0x13, 0x66, 0x06, 0x16, 0xc4, 0xf1, 0x50, 0x3f, 0xc4, 0xa1, 0xa4, 0xfe, 0xf5, 0x30, - 0xb8, 0x78, 0xf1, 0xc5, 0x70, 0x3c, 0xda, 0x0f, 0xf7, 0x2d, 0x5e, 0x7c, 0x2d, 0x5c, 0xb9, 0x02, - 0x29, 0xb3, 0xd7, 0x6e, 0x93, 0xc9, 0x83, 0x8e, 0x3e, 0x9f, 0x3b, 0xff, 0x5f, 0xbe, 0xc2, 0xa5, - 0x23, 0x18, 0x56, 0x2e, 0xc1, 0x34, 0xee, 0xec, 0xe2, 0xe6, 0x38, 0xce, 0x2f, 0x7d, 0x45, 0x18, - 0x4c, 0x42, 0xbd, 0xf2, 0x02, 0x00, 0x4b, 0x8d, 0xd0, 0x8d, 0xf3, 0x31, 0xbc, 0xbf, 0xf7, 0x15, - 0x7e, 0x20, 0xce, 0x67, 0xf1, 0x01, 0xd8, 0xf1, 0xba, 0xa3, 0x01, 0xbe, 0x1c, 0x06, 0xa0, 0x23, - 0xf2, 0x1c, 0x24, 0x5f, 0x77, 0x2c, 0xd3, 0xd5, 0x5a, 0xe3, 0xb8, 0x7f, 0x9f, 0x73, 0x0b, 0x7a, - 0x22, 0xb0, 0x8e, 0x65, 0x63, 0x57, 0x6b, 0x39, 0xe3, 0x78, 0xff, 0x2b, 0xe7, 0xf5, 0x18, 0x08, - 0xb3, 0xae, 0x39, 0xee, 0x24, 0xfd, 0xfe, 0x03, 0xc1, 0x2c, 0x18, 0x48, 0xa3, 0xc9, 0xef, 0x9b, - 0xf8, 0x70, 0x1c, 0xef, 0x1f, 0x8a, 0x46, 0x73, 0xfa, 0x95, 0xe7, 0x21, 0x4d, 0x7e, 0xb2, 0x53, - 0xae, 0x63, 0x98, 0xff, 0x88, 0x33, 0xfb, 0x1c, 0xe4, 0xcd, 0x8e, 0xdb, 0x74, 0x8d, 0xf1, 0xc2, - 0xfe, 0x63, 0x3e, 0xd2, 0x82, 0x7e, 0xa5, 0x04, 0x19, 0xc7, 0x6d, 0x36, 0x7b, 0xdc, 0x3f, 0x1d, - 0xc3, 0xfe, 0x27, 0x5f, 0xf1, 0x52, 0x16, 0x1e, 0x0f, 0x19, 0xed, 0xdb, 0x37, 0xdd, 0xae, 0x45, - 0xf7, 0x5b, 0xc6, 0x21, 0xbc, 0xc3, 0x11, 0x02, 0x2c, 0x2b, 0x15, 0xc8, 0x92, 0xbe, 0xd8, 0xb8, - 0x8b, 0xe9, 0xe6, 0xd8, 0x18, 0x88, 0x3f, 0xe5, 0x02, 0x08, 0x31, 0x95, 0xbf, 0xe1, 0x57, 0xde, - 0x5e, 0x88, 0x7c, 0xfe, 0xed, 0x85, 0xc8, 0x6f, 0xbe, 0xbd, 0x10, 0xf9, 0xf8, 0x17, 0x16, 0xa6, - 0x3e, 0xff, 0x85, 0x85, 0xa9, 0xdf, 0xf8, 0xc2, 0xc2, 0xd4, 0xf0, 0x2c, 0x31, 0xac, 0x59, 0x6b, - 0x16, 0xcb, 0x0f, 0xbf, 0xf6, 0x50, 0xcb, 0x70, 0xf7, 0x7b, 0xbb, 0xcb, 0xba, 0xd5, 0xb9, 0xa0, - 0x5b, 0x4e, 0xc7, 0x72, 0x2e, 0x84, 0xf3, 0xba, 0xf4, 0x17, 0xfc, 0xaf, 0x08, 0x89, 0x99, 0xc3, - 0xe9, 0x5c, 0xcd, 0x3c, 0x1c, 0xf5, 0x31, 0xdd, 0x65, 0x88, 0x95, 0xcc, 0x43, 0x74, 0x9a, 0x19, - 0x38, 0xb5, 0x67, 0xb7, 0xf9, 0x51, 0xcb, 0x24, 0x79, 0xde, 0xb1, 0xdb, 0x68, 0xce, 0x3f, 0x0f, - 0x1d, 0x39, 0x97, 0xe5, 0x87, 0x9c, 0xcb, 0xdf, 0x1e, 0x39, 0x5e, 0x4f, 0x52, 0x25, 0xf3, 0x90, - 0x76, 0x64, 0x3b, 0xf2, 0xda, 0x63, 0x63, 0xf3, 0xdc, 0x37, 0x4d, 0xeb, 0xb6, 0x49, 0x9a, 0xdd, - 0xdd, 0x15, 0x39, 0xee, 0x85, 0xfe, 0x1c, 0xf7, 0xcb, 0xb8, 0xdd, 0x7e, 0x91, 0xd0, 0x35, 0x08, - 0xcb, 0x6e, 0x82, 0x9d, 0xea, 0x87, 0xef, 0x8e, 0xc2, 0xc2, 0x40, 0x3a, 0x9b, 0x2b, 0xc1, 0x28, - 0x21, 0xac, 0x40, 0x6a, 0x55, 0xe8, 0xd6, 0x3c, 0x24, 0x1d, 0xac, 0x5b, 0x66, 0xd3, 0xa1, 0x82, - 0x88, 0x29, 0xe2, 0x91, 0x08, 0xc2, 0xd4, 0x4c, 0xcb, 0xe1, 0x87, 0x95, 0xd9, 0x43, 0xf9, 0x07, - 0x8e, 0x29, 0x88, 0x9c, 0x78, 0x93, 0x90, 0xc6, 0x93, 0x13, 0x4a, 0x43, 0x74, 0x22, 0x94, 0xf9, - 0x9f, 0x54, 0x2a, 0xdf, 0x1b, 0x85, 0xc5, 0x7e, 0xa9, 0x90, 0x99, 0xe5, 0xb8, 0x5a, 0xa7, 0x3b, - 0x4a, 0x2c, 0x57, 0x20, 0xdd, 0x10, 0x34, 0xc7, 0x96, 0xcb, 0xdd, 0x63, 0xca, 0x25, 0xef, 0xbd, - 0x4a, 0x08, 0xe6, 0xe2, 0x84, 0x82, 0xf1, 0xfa, 0x71, 0x4f, 0x92, 0xf9, 0xb3, 0x04, 0x9c, 0x66, - 0xd3, 0x49, 0x65, 0x53, 0x89, 0x3d, 0x70, 0x99, 0x64, 0x83, 0x55, 0xe3, 0xf7, 0x49, 0xe4, 0x17, - 0x61, 0xb6, 0x46, 0xac, 0x05, 0x89, 0x82, 0xfc, 0x1d, 0x9e, 0xa1, 0xe7, 0xb9, 0x97, 0x42, 0x0e, - 0x3f, 0xdf, 0xdf, 0x0a, 0x16, 0xc9, 0xdf, 0x18, 0x01, 0xa9, 0xae, 0x6b, 0x6d, 0xcd, 0xfe, 0x8b, - 0x42, 0xa1, 0x67, 0x00, 0xd8, 0x71, 0x0f, 0xef, 0xc3, 0xbd, 0xfc, 0xc5, 0xf9, 0xe5, 0x60, 0xe7, - 0x96, 0xd9, 0x9b, 0xe8, 0x09, 0xaa, 0x34, 0xa5, 0x25, 0x3f, 0xcf, 0xbf, 0x02, 0xe0, 0x57, 0xa0, - 0x33, 0x70, 0xaa, 0x5e, 0x29, 0xad, 0x97, 0x14, 0x71, 0x48, 0xa8, 0xbe, 0x5d, 0xad, 0xd4, 0xae, - 0xd6, 0xaa, 0xab, 0xd2, 0x14, 0x3a, 0x09, 0x28, 0x58, 0xe9, 0x1d, 0x6a, 0x3a, 0x01, 0x33, 0xc1, - 0x72, 0xf6, 0x95, 0x4a, 0x94, 0x78, 0x8a, 0x46, 0xa7, 0xdb, 0xc6, 0x74, 0xe7, 0x51, 0x35, 0x84, - 0xd4, 0xc6, 0x3b, 0x21, 0xbf, 0xfa, 0xef, 0xd9, 0x97, 0x0b, 0xb3, 0x3e, 0xbb, 0x27, 0xf3, 0x95, - 0x75, 0x98, 0xd1, 0x74, 0x1d, 0x77, 0x43, 0x90, 0x63, 0x4c, 0x35, 0x01, 0xa4, 0x7b, 0xa9, 0x9c, - 0xd3, 0x47, 0x7b, 0x06, 0x12, 0x0e, 0xed, 0xfd, 0x38, 0x88, 0x5f, 0xe3, 0x10, 0x9c, 0x7c, 0xc5, - 0x84, 0x19, 0xe2, 0xf9, 0x69, 0x36, 0x0e, 0x34, 0xe3, 0xe8, 0x3c, 0xc3, 0x2f, 0xfc, 0xf4, 0x13, - 0x74, 0x67, 0xf5, 0x81, 0xf0, 0xb0, 0x0c, 0x51, 0x27, 0x45, 0xe2, 0xd8, 0x7e, 0x43, 0x31, 0xe4, - 0xc5, 0xfb, 0x78, 0x83, 0x8f, 0x7e, 0xd9, 0x2f, 0xf2, 0x97, 0x2d, 0x0c, 0xd3, 0x81, 0xc0, 0x9b, - 0x72, 0x1c, 0x95, 0x55, 0x94, 0xab, 0xa3, 0xe6, 0xf4, 0x6b, 0x8f, 0x0e, 0xae, 0x4e, 0xec, 0xbf, - 0xc7, 0x29, 0xf2, 0x95, 0xe0, 0x6b, 0xbc, 0xb9, 0xf7, 0x03, 0x71, 0x98, 0xd1, 0x3a, 0x86, 0x69, - 0x5d, 0xa0, 0xff, 0xf2, 0x39, 0x37, 0x4d, 0x1f, 0x26, 0xd8, 0x94, 0xbc, 0xcc, 0xa6, 0xc2, 0x78, - 0x8d, 0xf9, 0xa3, 0x6f, 0xfb, 0xd1, 0x69, 0x7f, 0xba, 0xac, 0x6c, 0x80, 0x24, 0x0e, 0xf1, 0x62, - 0x53, 0xb7, 0x9a, 0x13, 0x65, 0x29, 0xfe, 0x58, 0x60, 0x88, 0xfc, 0x56, 0x95, 0xb3, 0xae, 0x7c, - 0x10, 0x52, 0x1e, 0xcc, 0x38, 0xcf, 0x44, 0x80, 0x78, 0x1c, 0xc4, 0x2f, 0x61, 0x33, 0x73, 0x12, - 0x2f, 0xf4, 0x1d, 0xc1, 0xcf, 0x66, 0xe8, 0x26, 0xe9, 0xcd, 0x1a, 0xe4, 0x9b, 0x96, 0xe9, 0xaa, - 0x56, 0xc7, 0x70, 0x71, 0xa7, 0xeb, 0x8e, 0xf5, 0xeb, 0xfe, 0x94, 0x81, 0xa4, 0x94, 0x1c, 0xe1, - 0xdb, 0x12, 0x6c, 0xa4, 0x25, 0xec, 0x3b, 0xbd, 0x49, 0x5a, 0xf2, 0xdf, 0xbc, 0x96, 0x50, 0x1e, - 0xd2, 0x92, 0x7b, 0xd2, 0x0e, 0xa7, 0x79, 0x93, 0x1b, 0x73, 0xf7, 0x80, 0x69, 0x81, 0xa7, 0x1d, - 0x7f, 0x10, 0x83, 0x05, 0x4e, 0xbc, 0xab, 0x39, 0xf8, 0xc2, 0xad, 0x27, 0x77, 0xb1, 0xab, 0x3d, - 0x79, 0x41, 0xb7, 0x0c, 0xb1, 0x92, 0xcf, 0x72, 0x63, 0x4d, 0xea, 0x97, 0x79, 0x7d, 0x71, 0xe8, - 0x76, 0x77, 0x71, 0xb4, 0x91, 0x2f, 0x0e, 0xea, 0xa0, 0xfc, 0x1a, 0xc4, 0x2b, 0x96, 0x61, 0x92, - 0xb5, 0xad, 0x89, 0x4d, 0xab, 0xc3, 0xcd, 0x2d, 0x7b, 0x40, 0x97, 0x21, 0xa1, 0x75, 0xac, 0x9e, - 0xe9, 0x32, 0x53, 0x5b, 0x5e, 0xf8, 0x95, 0xb7, 0x16, 0xa7, 0xfe, 0xe3, 0x5b, 0x8b, 0xb1, 0x9a, - 0xe9, 0xfe, 0xfa, 0x67, 0x1f, 0x07, 0x8e, 0x5e, 0x33, 0xdd, 0xcf, 0xfc, 0xee, 0x4f, 0x9c, 0x8f, - 0x28, 0x9c, 0x7a, 0x25, 0xfe, 0xc5, 0x37, 0x17, 0x23, 0xf2, 0x2b, 0x90, 0x5c, 0xc5, 0xfa, 0x11, - 0xf0, 0x4f, 0xf6, 0xc1, 0x9f, 0x16, 0xf0, 0xab, 0x58, 0x0f, 0xc0, 0xaf, 0x62, 0xbd, 0x0f, 0xf9, - 0x19, 0x48, 0xd5, 0x4c, 0x97, 0x7d, 0x42, 0xf4, 0x28, 0xc4, 0x0c, 0x93, 0x9d, 0x4a, 0x0f, 0x20, - 0x0c, 0x34, 0x50, 0x21, 0x54, 0x84, 0x71, 0x15, 0xeb, 0x1e, 0x63, 0x13, 0xeb, 0xfd, 0x8c, 0x83, - 0xaf, 0x26, 0x54, 0xe5, 0xd5, 0xdf, 0xf8, 0xad, 0x85, 0xa9, 0x8f, 0xbc, 0xbd, 0x30, 0x35, 0x72, - 0xe8, 0xe5, 0xf1, 0x43, 0xef, 0x8d, 0xf8, 0x8f, 0xc6, 0xe1, 0x7e, 0xfa, 0x65, 0xa9, 0xdd, 0x31, - 0x4c, 0xf7, 0x82, 0x6e, 0x1f, 0x76, 0x5d, 0x8b, 0x18, 0x00, 0x6b, 0x8f, 0x0f, 0xf8, 0x8c, 0x5f, - 0xbd, 0xcc, 0xaa, 0x87, 0x0f, 0xb7, 0xbc, 0x07, 0xd3, 0xdb, 0x84, 0x8f, 0x88, 0xd8, 0xb5, 0x5c, - 0xad, 0xcd, 0xbd, 0x16, 0xf6, 0x40, 0x4a, 0xd9, 0xd7, 0xa8, 0x51, 0x56, 0x6a, 0x88, 0x0f, 0x51, - 0xdb, 0x58, 0xdb, 0x63, 0x1f, 0xf5, 0xc4, 0xa8, 0xbb, 0x9b, 0x22, 0x05, 0xf4, 0xfb, 0x9d, 0x39, - 0x98, 0xd6, 0x7a, 0xec, 0xe0, 0x4d, 0x8c, 0xf8, 0xc1, 0xf4, 0x41, 0x7e, 0x11, 0x92, 0x7c, 0xff, - 0x1d, 0x49, 0x10, 0xbb, 0x89, 0x0f, 0xe9, 0x7b, 0xb2, 0x0a, 0xf9, 0x89, 0x96, 0x61, 0x9a, 0x36, - 0x9e, 0x7f, 0xad, 0x38, 0xbf, 0x3c, 0xd0, 0xfa, 0x65, 0xda, 0x48, 0x85, 0x91, 0xc9, 0xd7, 0x21, - 0xb5, 0x6a, 0x11, 0x2d, 0x0c, 0xa3, 0xa5, 0x19, 0x1a, 0x6d, 0x73, 0xb7, 0xc7, 0xb5, 0x42, 0x61, - 0x0f, 0xe8, 0x24, 0x24, 0xd8, 0x47, 0x5e, 0xfc, 0xf0, 0x10, 0x7f, 0x92, 0x2b, 0x90, 0xa4, 0xd8, - 0x5b, 0x5d, 0xe2, 0x32, 0x78, 0xe7, 0xde, 0xd3, 0xfc, 0x93, 0x5f, 0x0e, 0x1f, 0xf5, 0x1b, 0x8b, - 0x20, 0xde, 0xd4, 0x5c, 0x8d, 0xf7, 0x9b, 0xfe, 0x96, 0x3f, 0x04, 0x29, 0x0e, 0xe2, 0xa0, 0x8b, - 0x10, 0xb3, 0xba, 0x0e, 0x3f, 0xfe, 0x53, 0x1c, 0xd5, 0x95, 0xad, 0x6e, 0x39, 0x4e, 0x74, 0x46, - 0x21, 0xc4, 0xe5, 0xcd, 0x91, 0x6a, 0xf1, 0x74, 0x48, 0x2d, 0x3a, 0xd8, 0xdd, 0xdd, 0x73, 0xfd, - 0x1f, 0x6c, 0x38, 0x07, 0x54, 0xc1, 0x53, 0x94, 0xbb, 0x51, 0x58, 0x08, 0xd4, 0xde, 0xc2, 0xb6, - 0x63, 0x58, 0x26, 0xd3, 0x26, 0xae, 0x29, 0x28, 0xd0, 0x40, 0x5e, 0x3f, 0x42, 0x55, 0x9e, 0x87, - 0x58, 0xa9, 0xdb, 0x45, 0x45, 0x48, 0xd1, 0x67, 0xdd, 0x62, 0xba, 0x12, 0x57, 0xbc, 0x67, 0x52, - 0xe7, 0x58, 0x7b, 0xee, 0x6d, 0xcd, 0xf6, 0xbe, 0x81, 0x16, 0xcf, 0xf2, 0x73, 0x90, 0xae, 0x58, - 0xa6, 0x83, 0x4d, 0xa7, 0x47, 0x7d, 0xe1, 0xdd, 0xb6, 0xa5, 0xdf, 0xe4, 0x08, 0xec, 0x81, 0x08, - 0x5b, 0xeb, 0x76, 0x29, 0x67, 0x5c, 0x21, 0x3f, 0xd9, 0x7c, 0x2d, 0x6f, 0x8d, 0x14, 0xcf, 0xa5, - 0xe3, 0x89, 0x87, 0x77, 0xd0, 0x77, 0x6a, 0x23, 0x70, 0xdf, 0xe0, 0x44, 0xba, 0x89, 0x0f, 0x9d, - 0xe3, 0xce, 0xa3, 0x57, 0x20, 0xbd, 0x4d, 0xaf, 0x27, 0x79, 0x11, 0x1f, 0xa2, 0x22, 0x24, 0x71, - 0xf3, 0xe2, 0xa5, 0x4b, 0x4f, 0x3e, 0xc7, 0xb4, 0xfc, 0xda, 0x94, 0x22, 0x0a, 0xd0, 0x02, 0xa4, - 0x1d, 0xac, 0x77, 0x2f, 0x5e, 0xba, 0x7c, 0xf3, 0x49, 0xa6, 0x56, 0xd7, 0xa6, 0x14, 0xbf, 0x68, - 0x25, 0x45, 0x7a, 0xfc, 0xc5, 0x4f, 0x2d, 0x46, 0xca, 0xd3, 0x10, 0x73, 0x7a, 0x9d, 0xf7, 0x4c, - 0x37, 0xfe, 0x30, 0x01, 0x4b, 0x81, 0x5a, 0xb6, 0xb8, 0xdc, 0xd2, 0xda, 0x46, 0x53, 0xf3, 0x2f, - 0x95, 0x91, 0x02, 0xfd, 0xa7, 0x14, 0x23, 0x56, 0x8d, 0x23, 0xa5, 0x28, 0xff, 0x54, 0x04, 0xb2, - 0x37, 0x04, 0x72, 0x1d, 0xbb, 0xe8, 0x0a, 0x80, 0xf7, 0x26, 0x31, 0x55, 0xce, 0x2c, 0xf7, 0xbf, - 0x6b, 0xd9, 0xe3, 0x51, 0x02, 0xe4, 0xe8, 0x19, 0xaa, 0x80, 0x5d, 0xcb, 0xe1, 0xdf, 0xc3, 0x8e, - 0x61, 0xf5, 0x88, 0xd1, 0x63, 0x80, 0xa8, 0x55, 0x53, 0x6f, 0x59, 0xae, 0x61, 0xb6, 0xd4, 0xae, - 0x75, 0x9b, 0xdf, 0x32, 0x10, 0x53, 0x24, 0x5a, 0x73, 0x83, 0x56, 0x6c, 0x93, 0x72, 0xd2, 0xe8, - 0xb4, 0x87, 0x42, 0xc2, 0x3a, 0xad, 0xd9, 0xb4, 0xb1, 0xe3, 0x70, 0xc3, 0x25, 0x1e, 0xd1, 0x15, - 0x48, 0x76, 0x7b, 0xbb, 0xaa, 0xb0, 0x12, 0x99, 0x8b, 0xf7, 0x0d, 0x9b, 0xf3, 0x42, 0x37, 0xf8, - 0xac, 0x4f, 0x74, 0x7b, 0xbb, 0x44, 0x53, 0x1e, 0x80, 0xec, 0x90, 0xc6, 0x64, 0x6e, 0xf9, 0xed, - 0xa0, 0x37, 0xe2, 0xf0, 0x1e, 0xa8, 0x5d, 0xdb, 0xb0, 0x6c, 0xc3, 0x3d, 0xa4, 0xc7, 0xf6, 0x62, - 0x8a, 0x24, 0x2a, 0xb6, 0x79, 0xb9, 0x7c, 0x13, 0x0a, 0x75, 0xea, 0xee, 0xfb, 0x2d, 0xbf, 0xe4, - 0xb7, 0x2f, 0x32, 0xbe, 0x7d, 0x23, 0x5b, 0x16, 0x1d, 0x68, 0xd9, 0xf9, 0xff, 0x10, 0x81, 0x4c, - 0x99, 0x4c, 0xdc, 0xda, 0xea, 0xd5, 0xb6, 0xd6, 0x42, 0x4f, 0xc2, 0x89, 0xf2, 0xfa, 0x56, 0xe5, - 0x45, 0xb5, 0xb6, 0xaa, 0x5e, 0x5d, 0x2f, 0xad, 0xf9, 0xe7, 0x84, 0x8b, 0x27, 0xef, 0xdc, 0x5d, - 0x42, 0x01, 0xda, 0x1d, 0x93, 0xc6, 0xa4, 0xe8, 0x02, 0xcc, 0x85, 0x59, 0x4a, 0xe5, 0x7a, 0x75, - 0xb3, 0x21, 0x45, 0x8a, 0x27, 0xee, 0xdc, 0x5d, 0x9a, 0x09, 0x70, 0x94, 0x76, 0x1d, 0x6c, 0xba, - 0x83, 0x0c, 0x95, 0xad, 0x8d, 0x8d, 0x5a, 0x43, 0x8a, 0x0e, 0x30, 0x54, 0xac, 0x4e, 0xc7, 0x70, - 0xd1, 0x23, 0x30, 0x13, 0x66, 0xd8, 0xac, 0xad, 0x4b, 0xb1, 0x22, 0xba, 0x73, 0x77, 0x29, 0x1f, - 0xa0, 0xde, 0x34, 0xda, 0xc5, 0xd4, 0xc7, 0x7e, 0x78, 0x61, 0xea, 0x33, 0x7f, 0x77, 0x21, 0x52, - 0xde, 0x18, 0x39, 0xe7, 0x9e, 0x3a, 0xde, 0x9c, 0x0b, 0xaf, 0xdb, 0x5f, 0xb9, 0x2f, 0x64, 0x6e, - 0xb8, 0x3f, 0x17, 0x30, 0xc6, 0x93, 0x4e, 0xb7, 0x71, 0x39, 0x8a, 0xe2, 0xd1, 0xee, 0x41, 0x71, - 0xcc, 0xa2, 0x50, 0x1c, 0x6b, 0x18, 0xe4, 0xe7, 0x20, 0xb7, 0xad, 0xd9, 0x6e, 0x1d, 0xbb, 0xd7, - 0xb0, 0xd6, 0xc4, 0x76, 0xd8, 0x7f, 0xc8, 0x09, 0xff, 0x01, 0x41, 0x9c, 0x3a, 0x09, 0x6c, 0xfd, - 0xa4, 0xbf, 0xe5, 0x7d, 0x88, 0xd3, 0x13, 0xc9, 0x9e, 0x6f, 0xc1, 0x39, 0x98, 0x6f, 0x41, 0x56, - 0x86, 0x43, 0x17, 0x3b, 0x22, 0x8d, 0x46, 0x1f, 0xd0, 0xd3, 0xc2, 0x43, 0x88, 0x1d, 0xed, 0x21, - 0xf0, 0xe9, 0xc5, 0xfd, 0x84, 0x36, 0x24, 0xf9, 0x10, 0x7b, 0x0d, 0x89, 0xf8, 0x0d, 0x41, 0x1b, - 0x50, 0xe8, 0x6a, 0xb6, 0x4b, 0xbf, 0x50, 0xdc, 0xa7, 0xbd, 0xe0, 0x33, 0x78, 0x71, 0xd0, 0x9e, - 0x84, 0x3a, 0xcb, 0xdf, 0x92, 0xeb, 0x06, 0x0b, 0xe5, 0xdf, 0x89, 0x43, 0x82, 0x0b, 0xe3, 0x79, - 0x48, 0x72, 0xb1, 0xf2, 0x39, 0x77, 0xff, 0xf2, 0xe0, 0x32, 0xbb, 0xec, 0x2d, 0x87, 0x1c, 0x4f, - 0xf0, 0xa0, 0x87, 0x21, 0xa5, 0xef, 0x6b, 0x86, 0xa9, 0x1a, 0x4d, 0xee, 0xda, 0x66, 0xde, 0x7e, - 0x6b, 0x31, 0x59, 0x21, 0x65, 0xb5, 0x55, 0x25, 0x49, 0x2b, 0x6b, 0x4d, 0xe2, 0xd3, 0xec, 0x63, - 0xa3, 0xb5, 0xef, 0x72, 0xbb, 0xc1, 0x9f, 0xd0, 0xb3, 0x10, 0x27, 0x0a, 0xc1, 0xbf, 0x5f, 0x2f, - 0x0e, 0x44, 0x28, 0x5e, 0x0a, 0xa9, 0x9c, 0x22, 0x2f, 0xfe, 0xf8, 0x7f, 0x5e, 0x8c, 0x28, 0x94, - 0x03, 0x55, 0x20, 0xd7, 0xd6, 0x1c, 0x57, 0xa5, 0xeb, 0x31, 0x79, 0xfd, 0x34, 0x85, 0x38, 0x3d, - 0x28, 0x10, 0x2e, 0x58, 0xde, 0xf4, 0x0c, 0xe1, 0x62, 0x45, 0x4d, 0x74, 0x0e, 0x24, 0x0a, 0xa2, - 0xd3, 0x19, 0xc8, 0xbc, 0xc4, 0x04, 0x95, 0x7b, 0x9e, 0x94, 0xb3, 0x89, 0x49, 0x7d, 0xc5, 0x33, - 0x90, 0xa6, 0x5f, 0xcc, 0x52, 0x12, 0x76, 0x0c, 0x3e, 0x45, 0x0a, 0x68, 0xe5, 0x59, 0x28, 0xf8, - 0x56, 0x9f, 0x91, 0xa4, 0x18, 0x8a, 0x5f, 0x4c, 0x09, 0x9f, 0x80, 0x39, 0x13, 0x1f, 0xd0, 0x83, - 0xf9, 0x21, 0xea, 0x34, 0xa5, 0x46, 0xa4, 0xee, 0x46, 0x98, 0xe3, 0x21, 0xc8, 0xeb, 0x42, 0xf8, - 0x8c, 0x16, 0x28, 0x6d, 0xce, 0x2b, 0xa5, 0x64, 0xa7, 0x21, 0xa5, 0x75, 0xbb, 0x8c, 0x20, 0xc3, - 0xad, 0x7e, 0xb7, 0x4b, 0xab, 0xce, 0xc3, 0x0c, 0xed, 0xa3, 0x8d, 0x9d, 0x5e, 0xdb, 0xe5, 0x20, - 0x59, 0x4a, 0x53, 0x20, 0x15, 0x0a, 0x2b, 0xa7, 0xb4, 0x0f, 0x42, 0x0e, 0xdf, 0x32, 0x9a, 0xd8, - 0xd4, 0x31, 0xa3, 0xcb, 0x51, 0xba, 0xac, 0x28, 0xa4, 0x44, 0x8f, 0x80, 0x67, 0xcd, 0x55, 0xb1, - 0xd2, 0xe4, 0x19, 0x9e, 0x28, 0x2f, 0xb1, 0x62, 0x79, 0x1e, 0xe2, 0xab, 0x9a, 0xab, 0x11, 0x77, - 0xc9, 0x3d, 0x60, 0xcb, 0x67, 0x56, 0x21, 0x3f, 0xe5, 0xcf, 0xc5, 0x20, 0x7e, 0xc3, 0x72, 0x31, - 0x7a, 0x2a, 0xe0, 0xca, 0xe6, 0x87, 0xe9, 0x73, 0xdd, 0x68, 0x99, 0xb8, 0xb9, 0xe1, 0xb4, 0x02, - 0xd7, 0xdb, 0xf8, 0xea, 0x14, 0x0d, 0xa9, 0xd3, 0x1c, 0x4c, 0xdb, 0x56, 0xcf, 0x6c, 0x8a, 0x03, - 0xe4, 0xf4, 0x01, 0x55, 0x21, 0xe5, 0x69, 0x49, 0x7c, 0x9c, 0x96, 0x14, 0x88, 0x96, 0x10, 0x1d, - 0xe6, 0x05, 0x4a, 0x72, 0x97, 0x2b, 0x4b, 0x19, 0xd2, 0x9e, 0xf1, 0xe2, 0xda, 0x36, 0x99, 0xc2, - 0xfa, 0x6c, 0x64, 0x89, 0xf4, 0xc6, 0xde, 0x13, 0x1e, 0xd3, 0x38, 0xc9, 0xab, 0xe0, 0xd2, 0x0b, - 0xa9, 0x15, 0xbf, 0x6a, 0x27, 0x49, 0xfb, 0xe5, 0xab, 0x15, 0xbb, 0x6e, 0xe7, 0x3e, 0x48, 0x3b, - 0x46, 0xcb, 0xd4, 0xdc, 0x9e, 0x8d, 0xb9, 0xe6, 0xf9, 0x05, 0xa4, 0xd6, 0xff, 0x98, 0x82, 0x69, - 0x5a, 0xe0, 0x06, 0xb0, 0x0b, 0x30, 0xeb, 0xdf, 0xbd, 0xe5, 0xa3, 0x30, 0x2d, 0x43, 0x5e, 0x55, - 0x5d, 0xd4, 0xc8, 0xbf, 0x14, 0x81, 0x04, 0x5f, 0xb1, 0xfc, 0x61, 0x88, 0x0c, 0x1f, 0x86, 0xe8, - 0xa8, 0x61, 0x88, 0xdd, 0xfb, 0x30, 0x94, 0x00, 0xbc, 0x66, 0x3a, 0xfc, 0x42, 0x95, 0x21, 0x6e, - 0x15, 0x6b, 0x62, 0xdd, 0x68, 0xf1, 0x79, 0x1f, 0x60, 0x92, 0xff, 0x53, 0x84, 0x78, 0xf8, 0xbc, - 0x1e, 0x95, 0x20, 0x27, 0xda, 0xa5, 0xee, 0xb5, 0xb5, 0x16, 0x57, 0xc5, 0xfb, 0x47, 0x36, 0x8e, - 0xac, 0xc2, 0x4a, 0x86, 0xb7, 0x87, 0xfa, 0x13, 0x43, 0x87, 0x35, 0x3a, 0x62, 0x58, 0x43, 0x7a, - 0x14, 0xbb, 0x37, 0x3d, 0x0a, 0x8d, 0x78, 0xbc, 0x6f, 0xc4, 0xe5, 0xdf, 0x8a, 0xf0, 0x9b, 0xbf, - 0x9a, 0xec, 0x4b, 0x90, 0xbf, 0xac, 0xa1, 0x7a, 0x8d, 0xeb, 0x56, 0x13, 0x37, 0xd5, 0x81, 0x31, - 0x7b, 0x70, 0x10, 0x31, 0xdc, 0x66, 0x7f, 0xec, 0x90, 0x40, 0xa9, 0xfb, 0x63, 0xf8, 0xd9, 0x28, - 0xcc, 0x0c, 0xd0, 0xff, 0xdf, 0x37, 0x96, 0xe1, 0xd9, 0x3b, 0x3d, 0xe1, 0xec, 0x4d, 0x8c, 0x9c, - 0xbd, 0x3f, 0x1d, 0xa5, 0x09, 0x80, 0xae, 0xe5, 0x68, 0xed, 0xf7, 0xc3, 0xf6, 0x9e, 0x81, 0x74, - 0xd7, 0x6a, 0xab, 0xac, 0x86, 0x7d, 0xc2, 0x93, 0xea, 0x5a, 0x6d, 0x65, 0x40, 0xcd, 0xa6, 0xdf, - 0x25, 0xc3, 0x9c, 0x78, 0x17, 0x06, 0x21, 0xd9, 0x3f, 0xa1, 0x6c, 0xc8, 0x32, 0x51, 0x70, 0xaf, - 0xe9, 0x09, 0x22, 0x03, 0xea, 0x86, 0x45, 0x06, 0xbd, 0x3c, 0xd6, 0x6c, 0x46, 0xa9, 0x70, 0x3a, - 0xc2, 0xc1, 0x9c, 0x8c, 0x61, 0x99, 0xa3, 0xa0, 0xc5, 0x52, 0x38, 0x9d, 0xfc, 0xb7, 0x23, 0x00, - 0xeb, 0x44, 0xb2, 0xb4, 0xbf, 0xc4, 0xdf, 0x71, 0x68, 0x13, 0xd4, 0xd0, 0x9b, 0x17, 0x46, 0x0d, - 0x1a, 0x7f, 0x7f, 0xd6, 0x09, 0xb6, 0xbb, 0x02, 0x39, 0x5f, 0xb7, 0x1d, 0x2c, 0x1a, 0xb3, 0x70, - 0x44, 0x54, 0x5a, 0xc7, 0xae, 0x92, 0xbd, 0x15, 0x78, 0x92, 0xff, 0x59, 0x04, 0xd2, 0xb4, 0x4d, - 0x1b, 0xd8, 0xd5, 0x42, 0x63, 0x18, 0xb9, 0xf7, 0x31, 0xbc, 0x1f, 0x80, 0xc1, 0x38, 0xc6, 0x1b, - 0x98, 0x6b, 0x56, 0x9a, 0x96, 0xd4, 0x8d, 0x37, 0x30, 0xba, 0xec, 0x09, 0x3c, 0x76, 0xb4, 0xc0, - 0x45, 0xd4, 0xca, 0xc5, 0x7e, 0x0a, 0x92, 0xf4, 0x6e, 0xca, 0x03, 0x87, 0x07, 0xa2, 0x09, 0xb3, - 0xd7, 0x69, 0x1c, 0x38, 0xf2, 0xeb, 0x90, 0x6c, 0x1c, 0xb0, 0x7c, 0xe2, 0x19, 0x48, 0xdb, 0x96, - 0xc5, 0xbd, 0x3f, 0xe6, 0x75, 0xa7, 0x48, 0x01, 0x75, 0x76, 0x44, 0x0e, 0x2d, 0xea, 0xe7, 0xd0, - 0xfc, 0x24, 0x60, 0x6c, 0xa2, 0x24, 0x20, 0x89, 0x3e, 0x73, 0xa1, 0x99, 0x84, 0x1e, 0x83, 0x53, - 0xf5, 0xda, 0xda, 0x66, 0x75, 0x55, 0xdd, 0xa8, 0xaf, 0xf5, 0x7d, 0x9e, 0x5f, 0x2c, 0xdc, 0xb9, - 0xbb, 0x94, 0xe1, 0x61, 0xe7, 0x28, 0xea, 0x6d, 0xa5, 0x7a, 0x63, 0xab, 0x51, 0x95, 0x22, 0x8c, - 0x7a, 0xdb, 0xc6, 0xb7, 0x2c, 0x97, 0x5d, 0xfe, 0xfa, 0x04, 0x9c, 0x1e, 0x42, 0xed, 0x05, 0x9f, - 0x33, 0x77, 0xee, 0x2e, 0xe5, 0xb6, 0x6d, 0xcc, 0xb4, 0x8c, 0x72, 0x2c, 0xc3, 0xfc, 0x20, 0xc7, - 0xd6, 0xf6, 0x56, 0xbd, 0xb4, 0x2e, 0x2d, 0x15, 0xa5, 0x3b, 0x77, 0x97, 0xb2, 0xc2, 0x64, 0x10, - 0xfa, 0xf7, 0x3e, 0xfa, 0xfc, 0xd6, 0x54, 0x28, 0x6b, 0xcc, 0xe2, 0xba, 0xae, 0x66, 0x6b, 0x9d, - 0xe3, 0x86, 0x9f, 0x63, 0x0e, 0x0e, 0xc8, 0x3f, 0x15, 0x85, 0x82, 0x17, 0xdc, 0x6c, 0xd3, 0x37, - 0xa0, 0xa7, 0x82, 0x19, 0xbf, 0xcc, 0xc8, 0xb5, 0x83, 0x51, 0x8b, 0x84, 0xe0, 0x07, 0x21, 0x25, - 0x9c, 0x64, 0x3e, 0xa9, 0x96, 0x86, 0xac, 0x6f, 0x9c, 0x82, 0xb3, 0x7a, 0x1c, 0xe8, 0x05, 0x48, - 0x7b, 0x53, 0xcc, 0xbb, 0x20, 0x6d, 0xf4, 0x9c, 0xe4, 0xfc, 0x3e, 0x0f, 0x7a, 0xce, 0x0f, 0xe3, - 0xe2, 0xa3, 0x02, 0xc3, 0x1b, 0x8c, 0x80, 0x33, 0x7b, 0x21, 0xdc, 0x13, 0x10, 0xd7, 0x76, 0x75, - 0x83, 0x1b, 0xe0, 0xfb, 0x06, 0xf9, 0x4a, 0xe5, 0x4a, 0x8d, 0x33, 0x51, 0x4a, 0xb9, 0xc6, 0x93, - 0x29, 0x5c, 0x5e, 0xf4, 0x3a, 0x9a, 0x03, 0x95, 0xc5, 0xc2, 0xcc, 0xbb, 0x48, 0x75, 0xb4, 0x83, - 0x32, 0x0d, 0x87, 0x4f, 0x41, 0x92, 0x54, 0xb6, 0xf8, 0x85, 0x07, 0x31, 0x25, 0xd1, 0xd1, 0x0e, - 0xd6, 0x34, 0xe7, 0x7a, 0x3c, 0x15, 0x93, 0xe2, 0xf2, 0x8f, 0x11, 0x4f, 0x25, 0x24, 0x15, 0xf4, - 0x28, 0x20, 0xc2, 0xa1, 0xb5, 0xb0, 0x4a, 0xa6, 0x2e, 0x15, 0xaf, 0xc0, 0x2d, 0x74, 0xb4, 0x83, - 0x52, 0x0b, 0x6f, 0xf6, 0x3a, 0xb4, 0x01, 0x0e, 0xda, 0x00, 0x49, 0x10, 0x8b, 0x91, 0xe5, 0xe2, - 0x3f, 0x3d, 0x78, 0xc1, 0x2a, 0x27, 0x60, 0x0b, 0xc0, 0x27, 0xc8, 0x02, 0x90, 0x67, 0x78, 0xde, - 0x51, 0x91, 0x50, 0x57, 0x62, 0xe1, 0xae, 0xc8, 0x2f, 0x40, 0xa1, 0x6f, 0x04, 0x90, 0x0c, 0x39, - 0x9e, 0xb1, 0xa2, 0xdb, 0xf0, 0x2c, 0xc2, 0x49, 0x2b, 0x19, 0x96, 0x99, 0xa2, 0xc7, 0x12, 0x56, - 0x52, 0x3f, 0xfb, 0xe6, 0x62, 0x84, 0x6e, 0xe6, 0x3c, 0x0a, 0xb9, 0xd0, 0x18, 0x88, 0x2c, 0x72, - 0xc4, 0xcf, 0x22, 0xfb, 0xc4, 0xaf, 0x41, 0x96, 0x18, 0x20, 0xdc, 0xe4, 0xb4, 0x0f, 0x43, 0x81, - 0x19, 0xc8, 0x7e, 0x59, 0x33, 0x87, 0x67, 0x43, 0x08, 0x5c, 0x16, 0x1e, 0x50, 0x58, 0xec, 0x19, - 0x41, 0xb5, 0xa6, 0x39, 0xf2, 0x16, 0x80, 0x3f, 0xa8, 0xa8, 0x04, 0xf7, 0x13, 0xe3, 0x11, 0x3c, - 0x36, 0xca, 0xaf, 0xc6, 0x0a, 0x79, 0x8c, 0x45, 0x42, 0xe4, 0x1f, 0x0d, 0x65, 0x17, 0x64, 0x5d, - 0xa3, 0x14, 0xe5, 0x97, 0x3e, 0xf3, 0xf6, 0x42, 0xe4, 0xbd, 0xb1, 0x05, 0xdf, 0xf5, 0x32, 0x9c, - 0x09, 0x54, 0x12, 0x05, 0x0c, 0x25, 0xa2, 0x0a, 0x01, 0x7d, 0x25, 0x95, 0xe3, 0x12, 0x4a, 0x47, - 0xe6, 0x7f, 0x8b, 0x47, 0x9b, 0x9d, 0xf1, 0xd9, 0xa6, 0xf1, 0xf9, 0xae, 0xe1, 0x49, 0xf9, 0x7f, - 0x9a, 0x86, 0xa4, 0x82, 0x3f, 0xdc, 0xc3, 0x8e, 0x8b, 0x2e, 0x42, 0x1c, 0xeb, 0xfb, 0xd6, 0xb0, - 0x1c, 0x28, 0xe9, 0xe0, 0x32, 0xa7, 0xab, 0xea, 0xfb, 0xd6, 0xb5, 0x29, 0x85, 0xd2, 0xa2, 0x4b, - 0x30, 0xbd, 0xd7, 0xee, 0xf1, 0xf4, 0x55, 0x9f, 0xcd, 0x0a, 0x32, 0x5d, 0x25, 0x44, 0xd7, 0xa6, - 0x14, 0x46, 0x4d, 0x5e, 0x45, 0x6f, 0xc6, 0x8e, 0x1d, 0xfd, 0xaa, 0x9a, 0xb9, 0x47, 0x5f, 0x45, - 0x68, 0x51, 0x19, 0xc0, 0x30, 0x0d, 0x57, 0xa5, 0xa9, 0x1d, 0x6e, 0x35, 0x1e, 0x18, 0xcd, 0x69, - 0xb8, 0x34, 0x19, 0x74, 0x6d, 0x4a, 0x49, 0x1b, 0xe2, 0x81, 0x34, 0xf7, 0xc3, 0x3d, 0x6c, 0x1f, - 0x72, 0x6f, 0x6d, 0x64, 0x73, 0x5f, 0x22, 0x44, 0xa4, 0xb9, 0x94, 0x9a, 0x18, 0x59, 0x76, 0xc9, - 0x9e, 0x7b, 0xc0, 0xaf, 0x8e, 0x5d, 0x1c, 0xc5, 0x49, 0x6f, 0xda, 0x6b, 0x1c, 0x5c, 0x9b, 0x52, - 0x92, 0x3a, 0xfb, 0x89, 0x9e, 0xf5, 0x5c, 0xb0, 0xcc, 0xa0, 0xd7, 0x13, 0xe2, 0x65, 0x69, 0x9f, - 0x29, 0xe1, 0x8a, 0xa1, 0x4d, 0xc8, 0xb7, 0x0d, 0xc7, 0x55, 0x1d, 0x53, 0xeb, 0x3a, 0xfb, 0x96, - 0xeb, 0xd0, 0xfc, 0x49, 0xe6, 0xe2, 0x43, 0xa3, 0x10, 0xd6, 0x0d, 0xc7, 0xad, 0x0b, 0xe2, 0x6b, - 0x53, 0x4a, 0xae, 0x1d, 0x2c, 0x20, 0x78, 0xd6, 0xde, 0x1e, 0xb6, 0x3d, 0x40, 0x9a, 0x67, 0x39, - 0x02, 0x6f, 0x8b, 0x50, 0x0b, 0x7e, 0x82, 0x67, 0x05, 0x0b, 0xd0, 0xd7, 0xc0, 0x6c, 0xdb, 0xd2, - 0x9a, 0x1e, 0x9c, 0xaa, 0xef, 0xf7, 0xcc, 0x9b, 0x34, 0x29, 0x93, 0xb9, 0xf8, 0xc8, 0xc8, 0x46, - 0x5a, 0x5a, 0x53, 0x40, 0x54, 0x08, 0xc3, 0xb5, 0x29, 0x65, 0xa6, 0xdd, 0x5f, 0x88, 0xbe, 0x1e, - 0xe6, 0xb4, 0x6e, 0xb7, 0x7d, 0xd8, 0x8f, 0x5e, 0xa0, 0xe8, 0xe7, 0x47, 0xa1, 0x97, 0x08, 0x4f, - 0x3f, 0x3c, 0xd2, 0x06, 0x4a, 0x51, 0x03, 0xa4, 0xae, 0x8d, 0xe9, 0x97, 0x57, 0x5d, 0xee, 0x65, - 0xd0, 0x7b, 0xa9, 0x32, 0x17, 0xcf, 0x8e, 0xc2, 0xde, 0x66, 0xf4, 0xc2, 0x29, 0xb9, 0x36, 0xa5, - 0x14, 0xba, 0xe1, 0x22, 0x86, 0x6a, 0xe9, 0x98, 0x5e, 0x9b, 0xc7, 0x51, 0x67, 0xc6, 0xa1, 0x52, - 0xfa, 0x30, 0x6a, 0xa8, 0x08, 0x55, 0x21, 0xc3, 0x42, 0x51, 0x95, 0x18, 0x43, 0x7a, 0x9b, 0x55, - 0xe6, 0xa2, 0x3c, 0x72, 0x86, 0x52, 0xd2, 0x1b, 0x96, 0x8b, 0xaf, 0x4d, 0x29, 0x80, 0xbd, 0x27, - 0xa4, 0xc1, 0x09, 0x7a, 0xb1, 0xd7, 0xa1, 0x1a, 0x36, 0xbc, 0xf3, 0xb3, 0x14, 0xf0, 0xd1, 0x51, - 0x80, 0x37, 0x28, 0xd3, 0x8d, 0xa0, 0x1d, 0xbe, 0x36, 0xa5, 0xcc, 0xde, 0x1a, 0x2c, 0x26, 0x2a, - 0xb6, 0x67, 0x98, 0x5a, 0xdb, 0x78, 0x03, 0xb3, 0x25, 0x94, 0x5e, 0x69, 0x79, 0x84, 0x8a, 0x5d, - 0xe5, 0xd4, 0x74, 0x61, 0x25, 0x2a, 0xb6, 0x17, 0x2c, 0x28, 0x27, 0xf9, 0x99, 0x51, 0xef, 0x8a, - 0xb6, 0xa4, 0x94, 0x62, 0xd7, 0xb2, 0x5d, 0x8f, 0xa7, 0x40, 0xca, 0xc8, 0x67, 0x21, 0x13, 0x30, - 0x4c, 0x68, 0x1e, 0x92, 0xfc, 0x54, 0x8d, 0x38, 0x7d, 0xca, 0x1f, 0xe5, 0x3c, 0x64, 0x83, 0xc6, - 0x48, 0xfe, 0x78, 0xc4, 0xe3, 0xa4, 0x77, 0x53, 0xcc, 0x87, 0x33, 0xd2, 0x69, 0xdf, 0x53, 0x79, - 0x50, 0x2c, 0x6d, 0xa2, 0x9e, 0x6d, 0xbf, 0x66, 0x69, 0x21, 0x5f, 0x59, 0xd1, 0x22, 0x64, 0xba, - 0x17, 0xbb, 0x1e, 0x49, 0x8c, 0x92, 0x40, 0xf7, 0x62, 0x57, 0x10, 0x3c, 0x00, 0x59, 0xd2, 0x6f, - 0x35, 0xe8, 0x2f, 0xa5, 0x95, 0x0c, 0x29, 0xe3, 0x24, 0xf2, 0xbf, 0x89, 0x82, 0xd4, 0x6f, 0xc0, - 0xbc, 0x54, 0x75, 0xe4, 0xd8, 0xa9, 0xea, 0xd3, 0xfd, 0x49, 0x72, 0x3f, 0x2f, 0xbe, 0x0e, 0x92, - 0x9f, 0xde, 0x65, 0x4b, 0xcd, 0x68, 0xff, 0xaf, 0xcf, 0x51, 0x55, 0x0a, 0x7a, 0x9f, 0xe7, 0x7a, - 0x35, 0xb4, 0x59, 0x29, 0xfe, 0x74, 0x44, 0xff, 0x80, 0x7b, 0x4e, 0xcc, 0x4e, 0xb7, 0xa9, 0xb9, - 0x58, 0xe4, 0xc7, 0x02, 0xfb, 0x96, 0x0f, 0x43, 0x41, 0xeb, 0x76, 0x55, 0xc7, 0xd5, 0x5c, 0xcc, - 0x7d, 0x0d, 0x96, 0x79, 0xc8, 0x69, 0xdd, 0x6e, 0x9d, 0x94, 0x32, 0x5f, 0xe3, 0x21, 0xc8, 0x13, - 0x9b, 0x6e, 0x68, 0x6d, 0xe1, 0x2a, 0x24, 0x98, 0x4b, 0xc2, 0x4b, 0x99, 0x77, 0x20, 0x37, 0xbd, - 0x11, 0xa7, 0xf6, 0xdc, 0x8b, 0xa9, 0x22, 0x81, 0x98, 0x0a, 0xf1, 0x3b, 0x43, 0x98, 0x7c, 0xc4, - 0x3d, 0x2b, 0xc3, 0x37, 0x0d, 0xe6, 0x68, 0xfc, 0x75, 0x8b, 0x25, 0x4b, 0x52, 0x0a, 0x7b, 0x90, - 0x15, 0xc8, 0x87, 0x6d, 0x3f, 0xca, 0x43, 0xd4, 0x3d, 0xe0, 0x6f, 0x89, 0xba, 0x07, 0xc4, 0xd3, - 0xf5, 0x6e, 0xda, 0xcd, 0x0f, 0x59, 0xed, 0x38, 0x9f, 0x9f, 0xeb, 0x90, 0x0b, 0x90, 0x0b, 0xad, - 0x09, 0xf2, 0x49, 0x98, 0x1b, 0x66, 0xe2, 0xe5, 0x7d, 0xaf, 0x3c, 0x64, 0xaa, 0xd1, 0x25, 0x48, - 0x79, 0x36, 0x7e, 0x48, 0x74, 0x4c, 0x5f, 0x2b, 0x88, 0x15, 0x8f, 0x34, 0x94, 0xce, 0x8f, 0x86, - 0xd2, 0xf9, 0xf2, 0x37, 0xc0, 0xfc, 0x28, 0xfb, 0xdd, 0x97, 0xe4, 0x8b, 0x7b, 0x02, 0x3b, 0x09, - 0x09, 0x7e, 0xa5, 0x65, 0x94, 0x6e, 0x60, 0xf1, 0x27, 0x22, 0x48, 0x66, 0xcb, 0x63, 0x6c, 0x5f, - 0x8b, 0x3e, 0xc8, 0x2a, 0x9c, 0x1e, 0x69, 0xc3, 0x47, 0x6f, 0x85, 0x31, 0x20, 0xbe, 0x15, 0xa6, - 0x8b, 0xe6, 0x38, 0xb4, 0xaf, 0xe2, 0x20, 0x0b, 0x7b, 0x92, 0x3f, 0x11, 0x83, 0x93, 0xc3, 0x2d, - 0x39, 0x5a, 0x82, 0x2c, 0xf1, 0x5b, 0xdd, 0xb0, 0x8b, 0x0b, 0x1d, 0xed, 0xa0, 0xc1, 0xfd, 0x5b, - 0xbe, 0x95, 0x10, 0xf5, 0xb6, 0x12, 0xd0, 0x0e, 0xcc, 0xb4, 0x2d, 0x5d, 0x6b, 0xab, 0x81, 0xad, - 0x1c, 0x3e, 0x89, 0x1e, 0x1c, 0x10, 0x76, 0x38, 0x65, 0x48, 0x0c, 0x0e, 0xd7, 0xff, 0x02, 0xc5, - 0x58, 0xf7, 0x76, 0x7d, 0xd0, 0x2a, 0x64, 0x3a, 0x86, 0xb3, 0x8b, 0xf7, 0xb5, 0x5b, 0x86, 0x65, - 0xf3, 0xd9, 0x34, 0xa8, 0x34, 0x1b, 0x3e, 0x8d, 0xd8, 0x61, 0x0a, 0xb0, 0x05, 0x86, 0x64, 0x7a, - 0xe8, 0xc6, 0x57, 0xe2, 0xd8, 0xd6, 0x64, 0xd4, 0x1e, 0x52, 0x72, 0xe4, 0x1e, 0xd2, 0xb0, 0x0d, - 0x9b, 0xd4, 0xf0, 0x0d, 0x9b, 0x8f, 0x05, 0x87, 0x26, 0xbc, 0xf6, 0x0d, 0xec, 0xe1, 0xa0, 0x3a, - 0xcc, 0x71, 0xfe, 0x66, 0x48, 0xf6, 0x43, 0x8e, 0x3a, 0xb0, 0xf9, 0xd5, 0x2f, 0x73, 0x24, 0xd8, - 0x47, 0x8b, 0x3d, 0x76, 0x6f, 0x62, 0x17, 0x9b, 0xa8, 0xf1, 0xc0, 0x26, 0xea, 0xff, 0x61, 0x43, - 0xf1, 0x02, 0xcc, 0x0c, 0xf8, 0x11, 0x43, 0x37, 0x87, 0x47, 0x24, 0x64, 0xe5, 0x4f, 0x46, 0xa0, - 0x38, 0xda, 0x71, 0x18, 0x0a, 0x75, 0xac, 0xdc, 0xf7, 0x28, 0xf3, 0xfc, 0x10, 0xe4, 0xfb, 0xdc, - 0x1a, 0x36, 0x0a, 0xb9, 0x50, 0x00, 0x29, 0x7f, 0x73, 0xcc, 0xb3, 0x99, 0x21, 0xdf, 0x63, 0x88, - 0xa2, 0xbd, 0x04, 0xb3, 0x4d, 0xac, 0x1b, 0xcd, 0x7b, 0xd5, 0xb3, 0x19, 0xce, 0xfd, 0xff, 0xd4, - 0x6c, 0x50, 0xcd, 0xbe, 0x07, 0x20, 0xa5, 0x60, 0xa7, 0x4b, 0x5c, 0x09, 0x54, 0x86, 0x34, 0x3e, - 0xd0, 0x71, 0xd7, 0xf5, 0xcf, 0x03, 0x0c, 0xf3, 0x6e, 0x19, 0x75, 0x55, 0x50, 0x92, 0xd8, 0xce, - 0x63, 0x43, 0x4f, 0xf1, 0xf0, 0x75, 0x74, 0x24, 0xca, 0xd9, 0x83, 0xf1, 0xeb, 0x65, 0x11, 0xbf, - 0xc6, 0x46, 0x86, 0x66, 0x8c, 0xab, 0x2f, 0x80, 0x7d, 0x8a, 0x07, 0xb0, 0xf1, 0x31, 0x2f, 0x0b, - 0x45, 0xb0, 0x95, 0x50, 0x04, 0x9b, 0x18, 0xd3, 0xcd, 0x11, 0x21, 0xec, 0x65, 0x11, 0xc2, 0x26, - 0xc7, 0xb4, 0xb8, 0x2f, 0x86, 0x7d, 0x3e, 0x10, 0xc3, 0xa6, 0x07, 0x13, 0x85, 0x21, 0xd6, 0x21, - 0x41, 0xec, 0x73, 0x5e, 0x10, 0x9b, 0x1d, 0x19, 0x00, 0x73, 0xe6, 0xfe, 0x28, 0x76, 0x6b, 0x20, - 0x8a, 0xcd, 0xf1, 0xbf, 0xed, 0x33, 0x0a, 0x62, 0x4c, 0x18, 0xbb, 0x35, 0x10, 0xc6, 0xe6, 0xc7, - 0x00, 0x8e, 0x89, 0x63, 0xbf, 0x76, 0x78, 0x1c, 0x3b, 0x3a, 0xd2, 0xe4, 0xcd, 0x9c, 0x2c, 0x90, - 0x55, 0x47, 0x04, 0xb2, 0xd2, 0xc8, 0xa0, 0x8b, 0xc1, 0x4f, 0x1c, 0xc9, 0xee, 0x0c, 0x89, 0x64, - 0x59, 0xcc, 0x79, 0x6e, 0x24, 0xf8, 0x04, 0xa1, 0xec, 0xce, 0x90, 0x50, 0x16, 0x8d, 0x85, 0x1d, - 0x1b, 0xcb, 0x5e, 0x0d, 0xc7, 0xb2, 0xb3, 0x23, 0x1c, 0x26, 0x7f, 0xb6, 0x8f, 0x08, 0x66, 0x77, - 0x47, 0x05, 0xb3, 0x2c, 0xe0, 0x7c, 0x6c, 0x24, 0xe2, 0x31, 0xa2, 0xd9, 0xad, 0x81, 0x68, 0xf6, - 0xc4, 0x18, 0x4d, 0x9b, 0x3c, 0x9c, 0x65, 0x77, 0x8d, 0xb3, 0x5b, 0xc6, 0x41, 0xca, 0x5c, 0x8f, - 0xa7, 0x32, 0x52, 0x56, 0x7e, 0x84, 0xac, 0xbe, 0x7d, 0x76, 0x8e, 0xb8, 0xb9, 0xd8, 0xb6, 0x2d, - 0x5b, 0x1c, 0xee, 0xa7, 0x0f, 0xf2, 0x39, 0x12, 0xde, 0xf8, 0x36, 0xed, 0x88, 0xd0, 0x97, 0x86, - 0x13, 0x01, 0x3b, 0x26, 0xff, 0x6c, 0xc4, 0xe7, 0xa5, 0xc1, 0x6f, 0x30, 0x34, 0x4a, 0xf3, 0xd0, - 0x28, 0x10, 0x10, 0x47, 0xc3, 0x01, 0xf1, 0x22, 0x64, 0x48, 0x98, 0xd0, 0x17, 0xeb, 0x6a, 0x5d, - 0x2f, 0xd6, 0x15, 0x67, 0x7f, 0x58, 0xd8, 0xcc, 0x97, 0x25, 0xb6, 0x11, 0x56, 0xf0, 0xce, 0x41, - 0xb1, 0x28, 0x0d, 0x3d, 0x0e, 0xb3, 0x01, 0x5a, 0x2f, 0xfc, 0x60, 0x81, 0x9f, 0xe4, 0x51, 0x97, - 0x78, 0x1c, 0xf2, 0xcf, 0x23, 0xbe, 0x84, 0xfc, 0x20, 0x79, 0x58, 0x3c, 0x1b, 0x79, 0x97, 0xe2, - 0xd9, 0xe8, 0x3d, 0xc7, 0xb3, 0xc1, 0x70, 0x2a, 0x16, 0x0e, 0xa7, 0xfe, 0x7b, 0xc4, 0x1f, 0x13, - 0x2f, 0x3a, 0xd5, 0xad, 0x26, 0xe6, 0x01, 0x0e, 0xfd, 0x4d, 0x5c, 0x92, 0xb6, 0xd5, 0xe2, 0x61, - 0x0c, 0xf9, 0x49, 0xa8, 0xbc, 0x85, 0x27, 0xcd, 0xd7, 0x15, 0x2f, 0x36, 0x9a, 0x0e, 0x7e, 0x82, - 0xc0, 0xcf, 0xe5, 0x27, 0xfc, 0x73, 0xf9, 0xde, 0xf7, 0xb7, 0xc9, 0xc0, 0xf7, 0xb7, 0xe8, 0x59, - 0x48, 0xd3, 0x3c, 0xb5, 0x6a, 0x75, 0xc5, 0x1f, 0xc6, 0x3a, 0x33, 0xfa, 0x4c, 0xbe, 0x43, 0x4f, - 0x0b, 0xb3, 0x73, 0xfc, 0xbe, 0xc7, 0x91, 0x0e, 0x79, 0x1c, 0xf7, 0x41, 0x9a, 0xb4, 0x9e, 0xfd, - 0x81, 0x07, 0xe0, 0x1f, 0x6f, 0x8b, 0x02, 0xf9, 0xc7, 0xa3, 0x50, 0xe8, 0x5b, 0x68, 0x86, 0xf6, - 0x7d, 0xd8, 0x0e, 0xe8, 0x64, 0xf2, 0x58, 0x00, 0x68, 0x69, 0x8e, 0x7a, 0x5b, 0x33, 0x5d, 0xdc, - 0xe4, 0x42, 0x09, 0x94, 0xa0, 0x22, 0xa4, 0xc8, 0x53, 0xcf, 0xc1, 0x4d, 0x9e, 0x38, 0xf0, 0x9e, - 0xd1, 0x35, 0x48, 0xe0, 0x5b, 0xf4, 0x82, 0x53, 0x76, 0x4d, 0xf0, 0xc9, 0xc1, 0x48, 0x8e, 0x54, - 0x97, 0xe7, 0xc9, 0x60, 0x7f, 0xe9, 0xad, 0x45, 0x89, 0x51, 0x3f, 0xe6, 0x7d, 0x33, 0xa5, 0x70, - 0xfe, 0xb0, 0x14, 0x52, 0x7d, 0x52, 0xa0, 0x29, 0xac, 0xac, 0x88, 0x4c, 0x89, 0x4c, 0xd9, 0xf1, - 0x64, 0x25, 0xd7, 0xc1, 0x9d, 0xae, 0x65, 0xb5, 0x55, 0x36, 0xc7, 0x4b, 0x90, 0x0f, 0xaf, 0xab, - 0xec, 0x8f, 0x2f, 0xb9, 0x9a, 0x61, 0xaa, 0x21, 0x27, 0x38, 0xcb, 0x0a, 0xd9, 0x9c, 0xba, 0x1e, - 0x4f, 0x45, 0xa4, 0xe8, 0xf5, 0x78, 0x2a, 0x2a, 0xc5, 0xe4, 0x6d, 0x38, 0x31, 0x74, 0x5d, 0x45, - 0xcf, 0x40, 0xda, 0x5f, 0x92, 0xd9, 0x09, 0xf3, 0x23, 0x92, 0x04, 0x3e, 0xad, 0xfc, 0x8b, 0x11, - 0x1f, 0x32, 0x9c, 0x76, 0xa8, 0x42, 0x82, 0x1d, 0xf7, 0xe3, 0x47, 0x3b, 0x1e, 0x9f, 0x6c, 0x45, - 0x5e, 0x66, 0x67, 0x01, 0x15, 0xce, 0x2c, 0x7f, 0x3d, 0x24, 0x58, 0x09, 0xca, 0x40, 0xd2, 0xbf, - 0x4a, 0x19, 0x20, 0x51, 0xaa, 0x54, 0xaa, 0xdb, 0xe2, 0x5e, 0xd4, 0xf2, 0x96, 0xd2, 0x90, 0xa2, - 0xa4, 0x58, 0xa9, 0x5e, 0xaf, 0x56, 0x1a, 0x52, 0x0c, 0xcd, 0x40, 0x8e, 0xfd, 0x56, 0xaf, 0x6e, - 0x29, 0x1b, 0xa5, 0x86, 0x14, 0x0f, 0x14, 0xd5, 0xab, 0x9b, 0xab, 0x55, 0x45, 0x9a, 0x96, 0x9f, - 0x84, 0xd3, 0x23, 0xd7, 0x70, 0x3f, 0xa7, 0x10, 0x09, 0xe4, 0x14, 0xe4, 0x4f, 0x44, 0x49, 0x50, - 0x33, 0x6a, 0x61, 0x46, 0xd7, 0xfb, 0x3a, 0x7e, 0xf1, 0x18, 0xab, 0x7a, 0x5f, 0xef, 0x49, 0x1c, - 0x63, 0xe3, 0x3d, 0xec, 0xea, 0xfb, 0xcc, 0x51, 0x60, 0x16, 0x28, 0xa7, 0xe4, 0x78, 0x29, 0x65, - 0x72, 0x18, 0xd9, 0xeb, 0x58, 0x77, 0x55, 0xa6, 0x44, 0x0e, 0xff, 0x5b, 0xb1, 0x39, 0x56, 0x5a, - 0x67, 0x85, 0xf2, 0x37, 0x1c, 0x4b, 0x96, 0x69, 0x98, 0x56, 0xaa, 0x0d, 0xe5, 0x55, 0x29, 0x86, - 0x10, 0xe4, 0xe9, 0x4f, 0xb5, 0xbe, 0x59, 0xda, 0xae, 0x5f, 0xdb, 0x22, 0xb2, 0x9c, 0x85, 0x82, - 0x90, 0xa5, 0x28, 0x9c, 0x96, 0x1f, 0x85, 0x53, 0x23, 0xbc, 0x8a, 0x21, 0xe7, 0x2f, 0x3f, 0x15, - 0x09, 0x52, 0x87, 0x3d, 0x83, 0x2d, 0x48, 0x38, 0xae, 0xe6, 0xf6, 0x1c, 0x2e, 0xc4, 0x67, 0x26, - 0x75, 0x33, 0x96, 0xc5, 0x8f, 0x3a, 0x65, 0x57, 0x38, 0x8c, 0x7c, 0x09, 0xf2, 0xe1, 0x9a, 0xd1, - 0x32, 0xf0, 0x95, 0x28, 0x2a, 0x5f, 0x01, 0x34, 0xe8, 0x7d, 0x0c, 0x09, 0x2f, 0x23, 0xc3, 0xc2, - 0xcb, 0x1f, 0x89, 0xc0, 0x99, 0x23, 0x3c, 0x0d, 0xf4, 0x52, 0x5f, 0x27, 0x9f, 0x3b, 0x8e, 0x9f, - 0xb2, 0xcc, 0xca, 0xfa, 0xba, 0xf9, 0x14, 0x64, 0x83, 0xe5, 0x93, 0x75, 0xf2, 0x4b, 0x51, 0x7f, - 0x12, 0x87, 0xe3, 0x60, 0xdf, 0x04, 0x46, 0xfe, 0x82, 0x26, 0xf0, 0x83, 0x00, 0xee, 0x81, 0x38, - 0x00, 0xcc, 0xd7, 0xd1, 0xfb, 0x87, 0xa4, 0xc6, 0xb0, 0xde, 0x38, 0xe0, 0x93, 0x20, 0xed, 0xf2, - 0x5f, 0x0e, 0xaa, 0x07, 0x93, 0x02, 0x3d, 0xba, 0xc6, 0x3a, 0xde, 0x5f, 0x8a, 0x9d, 0x6c, 0x31, - 0xf6, 0x93, 0x07, 0xac, 0xd8, 0x41, 0xaf, 0xc2, 0xa9, 0x3e, 0x47, 0xc1, 0x83, 0x8e, 0x4f, 0xea, - 0x2f, 0x9c, 0x08, 0xfb, 0x0b, 0x02, 0x3a, 0xb8, 0xda, 0x4f, 0x87, 0x57, 0xfb, 0x57, 0x01, 0xfc, - 0xe4, 0x80, 0x7f, 0x62, 0x2d, 0x12, 0x3c, 0xb1, 0x76, 0x09, 0xa6, 0x89, 0x26, 0x09, 0x39, 0x0d, - 0x9a, 0x62, 0xa2, 0x09, 0x81, 0xe4, 0x02, 0xa3, 0x96, 0x0d, 0x40, 0x83, 0xb9, 0xc5, 0x11, 0xaf, - 0x78, 0x3e, 0xfc, 0x8a, 0x07, 0x46, 0x66, 0x29, 0x87, 0xbf, 0xea, 0x0d, 0x98, 0xa6, 0x23, 0x3f, - 0xf4, 0x33, 0xc0, 0xaf, 0x03, 0xd0, 0x5c, 0xd7, 0x36, 0x76, 0x7b, 0xfe, 0x0b, 0x16, 0x87, 0x6b, - 0x4e, 0x49, 0xd0, 0x95, 0xef, 0xe3, 0x2a, 0x34, 0xe7, 0xb3, 0x06, 0xd4, 0x28, 0x00, 0x28, 0x6f, - 0x42, 0x3e, 0xcc, 0x3b, 0xfc, 0xb3, 0x46, 0xff, 0x7e, 0x91, 0xb4, 0xf0, 0x6f, 0x3c, 0xef, 0x88, - 0xdf, 0xf9, 0x43, 0x1f, 0xe4, 0x3f, 0x8f, 0x40, 0x36, 0xa8, 0x78, 0xef, 0xb2, 0x0b, 0x72, 0xff, - 0x10, 0x17, 0x24, 0xdd, 0xd2, 0x9c, 0x97, 0x99, 0x07, 0x72, 0x7a, 0xc0, 0x03, 0x49, 0xb6, 0x34, - 0x67, 0xe7, 0x7d, 0x74, 0x40, 0xe4, 0x6f, 0x89, 0x40, 0xca, 0xeb, 0xfc, 0x11, 0xa7, 0x74, 0xfd, - 0x8f, 0x5b, 0xbd, 0xac, 0x3b, 0xdb, 0xdf, 0x88, 0x79, 0xfb, 0x1b, 0x57, 0xbc, 0xc5, 0x6f, 0x54, - 0x3a, 0x24, 0x28, 0x69, 0x71, 0x52, 0x8e, 0xaf, 0xf5, 0x57, 0x26, 0xfb, 0x86, 0x6c, 0x0e, 0xa6, - 0x83, 0xdf, 0x7f, 0xb1, 0x07, 0xb9, 0x19, 0x38, 0x1a, 0xc3, 0xa6, 0x61, 0xf0, 0x63, 0xb3, 0xc8, - 0xb1, 0x3f, 0x36, 0xf3, 0xde, 0x12, 0x0d, 0xbe, 0xe5, 0xbb, 0x23, 0x90, 0x12, 0x33, 0x02, 0x7d, - 0x28, 0x78, 0x64, 0x4a, 0xec, 0xc9, 0x8d, 0xb4, 0x46, 0x1c, 0x3f, 0x70, 0x62, 0x6a, 0xe0, 0xa4, - 0x70, 0xec, 0xb8, 0x27, 0x85, 0xb9, 0x5f, 0xf7, 0x27, 0x11, 0x90, 0xfa, 0xe7, 0xeb, 0x5f, 0xb8, - 0x75, 0x83, 0x8b, 0x5c, 0x6c, 0xc8, 0x22, 0x37, 0xea, 0xf8, 0x6f, 0x7c, 0xd4, 0xf1, 0xdf, 0xc1, - 0x5e, 0x4f, 0xdf, 0x63, 0xaf, 0x3f, 0x1a, 0x85, 0x4c, 0x20, 0x39, 0x8a, 0x9e, 0x0e, 0x1d, 0x25, - 0x5e, 0x3a, 0x2a, 0x91, 0x1a, 0x38, 0x4b, 0x1c, 0x12, 0x53, 0xf4, 0xf8, 0x62, 0x7a, 0xf7, 0x3f, - 0x2b, 0x1a, 0xfe, 0xe5, 0xe5, 0xf4, 0x88, 0x2f, 0x2f, 0xbf, 0x29, 0x02, 0x29, 0xcf, 0xe9, 0x3e, - 0xee, 0xee, 0xdb, 0x49, 0x48, 0x70, 0xbf, 0x92, 0x6d, 0xbf, 0xf1, 0xa7, 0xa1, 0x49, 0xe5, 0x22, - 0xa4, 0xc4, 0x1f, 0xed, 0xe3, 0x6b, 0x9a, 0xf7, 0x7c, 0xfe, 0x39, 0xc8, 0x04, 0x76, 0x2e, 0x89, - 0x61, 0xdc, 0xac, 0xbe, 0x2c, 0x4d, 0x15, 0x93, 0x77, 0xee, 0x2e, 0xc5, 0x36, 0xf1, 0x6d, 0x32, - 0x9b, 0x95, 0x6a, 0xe5, 0x5a, 0xb5, 0xf2, 0xa2, 0x14, 0x29, 0x66, 0xee, 0xdc, 0x5d, 0x4a, 0x2a, - 0x98, 0xe6, 0x13, 0xcf, 0xbf, 0x08, 0x85, 0xbe, 0x81, 0x09, 0x3b, 0x2d, 0x08, 0xf2, 0xab, 0x3b, - 0xdb, 0xeb, 0xb5, 0x4a, 0xa9, 0x51, 0x55, 0xd9, 0x81, 0x53, 0x74, 0x0a, 0x66, 0xd7, 0x6b, 0x6b, - 0xd7, 0x1a, 0x6a, 0x65, 0xbd, 0x56, 0xdd, 0x6c, 0xa8, 0xa5, 0x46, 0xa3, 0x54, 0x79, 0x51, 0x8a, - 0x5e, 0xbc, 0x9b, 0x81, 0x78, 0xa9, 0x5c, 0xa9, 0xa1, 0x0a, 0xc4, 0x69, 0x22, 0xe4, 0xc8, 0xa3, - 0x4b, 0xc5, 0xa3, 0x33, 0xc3, 0xe8, 0x2a, 0x4c, 0xd3, 0x1c, 0x09, 0x3a, 0xfa, 0x2c, 0x53, 0x71, - 0x4c, 0xaa, 0x98, 0x34, 0x86, 0xce, 0xc8, 0x23, 0x0f, 0x37, 0x15, 0x8f, 0xce, 0x1c, 0xa3, 0x75, - 0x48, 0x8a, 0x10, 0x79, 0xdc, 0x89, 0xa3, 0xe2, 0xd8, 0x74, 0x2e, 0xe9, 0x1a, 0x4b, 0x35, 0x1c, - 0x7d, 0xee, 0xa9, 0x38, 0x26, 0xa7, 0x8c, 0x6a, 0xde, 0x87, 0x38, 0x63, 0x8e, 0x32, 0x15, 0xc7, - 0x65, 0x89, 0x91, 0x02, 0x69, 0x3f, 0x89, 0x33, 0xfe, 0x34, 0x57, 0x71, 0x82, 0x74, 0x39, 0xfa, - 0x7a, 0xc8, 0x85, 0x03, 0xdd, 0xc9, 0x8e, 0x4b, 0x15, 0x27, 0xcc, 0x47, 0x13, 0xfc, 0x70, 0xd4, - 0x3b, 0xd9, 0xf1, 0xa9, 0xe2, 0x84, 0xe9, 0x69, 0xf4, 0x3a, 0xcc, 0x0c, 0x46, 0xa5, 0x93, 0x9f, - 0xa6, 0x2a, 0x1e, 0x23, 0x61, 0x8d, 0x3a, 0x80, 0x86, 0x44, 0xb3, 0xc7, 0x38, 0x5c, 0x55, 0x3c, - 0x4e, 0xfe, 0x1a, 0x35, 0xa1, 0xd0, 0x1f, 0x22, 0x4e, 0x7a, 0xd8, 0xaa, 0x38, 0x71, 0x2e, 0x9b, - 0xbd, 0x25, 0x1c, 0x5a, 0x4e, 0x7a, 0xf8, 0xaa, 0x38, 0x71, 0x6a, 0x1b, 0xed, 0x00, 0x04, 0xa2, - 0xc3, 0x09, 0x0e, 0x63, 0x15, 0x27, 0x49, 0x72, 0xa3, 0x2e, 0xcc, 0x0e, 0x0b, 0x1b, 0x8f, 0x73, - 0x36, 0xab, 0x78, 0xac, 0xdc, 0x37, 0xd1, 0xe7, 0x70, 0x00, 0x38, 0xd9, 0x59, 0xad, 0xe2, 0x84, - 0x49, 0xf0, 0x72, 0x69, 0xe4, 0x01, 0xdd, 0xb3, 0x47, 0x1e, 0xd0, 0xf5, 0x8f, 0xdc, 0x7a, 0x87, - 0x72, 0x7f, 0xe7, 0x09, 0xf8, 0x00, 0xbf, 0xfa, 0xc5, 0x71, 0xb5, 0x9b, 0x86, 0xd9, 0xf2, 0xee, - 0xf2, 0xe1, 0xcf, 0xfc, 0x74, 0xee, 0x49, 0x7e, 0xbd, 0x8c, 0x28, 0x1d, 0x73, 0xa3, 0xcf, 0xc8, - 0x6b, 0x0e, 0xc7, 0x1d, 0xe4, 0x1f, 0x7f, 0xee, 0xf6, 0x88, 0xdb, 0x82, 0xc6, 0xdc, 0x49, 0x34, - 0xe4, 0x36, 0xa1, 0xe2, 0x91, 0x1f, 0xc7, 0x17, 0x8f, 0x3a, 0xb0, 0x4c, 0xbc, 0xd8, 0xfc, 0x35, - 0xc3, 0x71, 0x2d, 0xdb, 0xd0, 0xb5, 0x36, 0x5d, 0x5e, 0xae, 0x4c, 0xfa, 0x39, 0x51, 0x39, 0x4d, - 0xdc, 0x15, 0x7e, 0x05, 0x11, 0xff, 0xc4, 0x65, 0x15, 0x12, 0xb7, 0xb4, 0x36, 0xfb, 0x98, 0x27, - 0x78, 0xdb, 0x58, 0xbf, 0xcc, 0x03, 0x7e, 0x54, 0x10, 0x85, 0xf1, 0xca, 0x9f, 0xa3, 0x1f, 0x42, - 0x74, 0x3a, 0x86, 0x43, 0x74, 0x51, 0xa1, 0x81, 0xf4, 0x0e, 0xc4, 0x6d, 0xcd, 0xe5, 0xe1, 0x65, - 0xb9, 0xc4, 0x2f, 0x0e, 0x7a, 0x78, 0xfc, 0xf5, 0x3f, 0xcb, 0x03, 0x77, 0x0b, 0xb1, 0x97, 0x51, - 0x38, 0xf4, 0xb5, 0x90, 0xea, 0x68, 0x07, 0x2a, 0x85, 0x8e, 0xbe, 0x5b, 0xd0, 0xc9, 0x8e, 0x76, - 0x40, 0x5a, 0x8d, 0x0c, 0x28, 0x10, 0x74, 0x7d, 0x5f, 0x33, 0x5b, 0x98, 0xbd, 0x24, 0xf6, 0x6e, - 0xbd, 0x24, 0xd7, 0xd1, 0x0e, 0x2a, 0x14, 0x98, 0xbc, 0x8a, 0x5f, 0xd1, 0xf4, 0xcb, 0x11, 0x9e, - 0x54, 0xa0, 0x92, 0x43, 0x1a, 0x48, 0xba, 0xf7, 0x44, 0xdf, 0x2f, 0x76, 0x40, 0xce, 0x8e, 0x1a, - 0x98, 0x3e, 0xb9, 0x97, 0x73, 0xa4, 0xa5, 0x9f, 0x7f, 0x6b, 0x31, 0xc2, 0xde, 0x5a, 0xd0, 0xfb, - 0xc6, 0xe5, 0x3a, 0x64, 0x58, 0xae, 0x44, 0xa5, 0x4e, 0x6e, 0x74, 0xac, 0x93, 0x9b, 0x13, 0x4e, - 0x2e, 0x03, 0x04, 0xc6, 0x4d, 0xea, 0x79, 0x1f, 0x3e, 0x13, 0x81, 0xcc, 0x6a, 0xe0, 0x72, 0xc1, - 0x79, 0x48, 0x76, 0x2c, 0xd3, 0xb8, 0x89, 0x6d, 0x6f, 0x0b, 0x8b, 0x3d, 0x12, 0x47, 0x94, 0xfd, - 0x8d, 0x3a, 0xf7, 0x50, 0xdc, 0x9b, 0x23, 0x9e, 0x09, 0xd7, 0x6d, 0xbc, 0xeb, 0x18, 0x42, 0xe4, - 0x8a, 0x78, 0x44, 0x8f, 0x80, 0xe4, 0x60, 0xbd, 0x67, 0x1b, 0xee, 0xa1, 0xaa, 0x5b, 0xa6, 0xab, - 0xe9, 0x2e, 0x0f, 0xd3, 0x0b, 0xa2, 0xbc, 0xc2, 0x8a, 0x09, 0x48, 0x13, 0xbb, 0x9a, 0xd1, 0x66, - 0x67, 0x0e, 0xd3, 0x8a, 0x78, 0xe4, 0x4d, 0xfd, 0x5c, 0x32, 0x18, 0xa8, 0x56, 0x40, 0xb2, 0xba, - 0xd8, 0x0e, 0x9d, 0x57, 0x61, 0xea, 0x3a, 0xff, 0xeb, 0x9f, 0x7d, 0x7c, 0x8e, 0x0b, 0x9c, 0x9f, - 0x75, 0x60, 0x77, 0xe9, 0x2b, 0x05, 0xc1, 0x21, 0x0e, 0xb2, 0xbc, 0x1a, 0xda, 0xb4, 0xea, 0xed, - 0xfa, 0x17, 0xa4, 0xcc, 0x0d, 0x08, 0xb5, 0x64, 0x1e, 0x96, 0xe7, 0x7f, 0xcd, 0x87, 0xf6, 0x03, - 0xd9, 0x17, 0xf1, 0x61, 0x70, 0x07, 0x8b, 0xc2, 0x10, 0x1f, 0xff, 0x75, 0xcd, 0x68, 0x8b, 0x3f, - 0xe7, 0xa9, 0xf0, 0x27, 0xb4, 0xe2, 0x65, 0x1f, 0xe3, 0x34, 0x60, 0x92, 0x47, 0xe9, 0x46, 0xd9, - 0x32, 0x9b, 0xe1, 0x34, 0x23, 0x6a, 0x40, 0xc2, 0xb5, 0x6e, 0x62, 0x93, 0x0b, 0xa8, 0xfc, 0xc1, - 0x63, 0x28, 0xf6, 0xe0, 0x6d, 0x61, 0x1c, 0x0b, 0xb5, 0x40, 0x6a, 0xe2, 0x36, 0x6e, 0xb1, 0x4f, - 0x03, 0xf7, 0x35, 0x1b, 0xb3, 0x0f, 0xd3, 0x8f, 0x87, 0x3f, 0x78, 0xa9, 0x58, 0xc1, 0x43, 0xad, - 0x53, 0x50, 0xb4, 0x1d, 0xbe, 0xda, 0x32, 0xc9, 0xf7, 0x9d, 0x47, 0xf4, 0x3f, 0xa0, 0x95, 0x41, - 0xb3, 0x15, 0xba, 0x0a, 0xf3, 0x11, 0x90, 0x7a, 0xe6, 0xae, 0x65, 0xd2, 0xbf, 0x90, 0xc7, 0x43, - 0xb0, 0x14, 0xdb, 0xe4, 0xf4, 0xca, 0xf9, 0x26, 0xe7, 0x36, 0xe4, 0x7d, 0x52, 0x3a, 0x7b, 0xd2, - 0xc7, 0x9d, 0x3d, 0x39, 0x0f, 0x80, 0x90, 0xa0, 0x0d, 0x00, 0x7f, 0x7e, 0xd2, 0x5d, 0xb6, 0xcc, - 0xe8, 0xd1, 0xf4, 0x67, 0x7a, 0xb0, 0x33, 0x01, 0x00, 0xd4, 0x86, 0xd9, 0x8e, 0x61, 0xaa, 0x0e, - 0x6e, 0xef, 0xa9, 0x5c, 0x72, 0x04, 0x37, 0xf3, 0x2e, 0x8c, 0xf4, 0x4c, 0xc7, 0x30, 0xeb, 0xb8, - 0xbd, 0xb7, 0xea, 0xc1, 0xa2, 0x0f, 0xc2, 0x19, 0x5f, 0x1c, 0x96, 0xa9, 0xee, 0x5b, 0xed, 0xa6, - 0x6a, 0xe3, 0x3d, 0x55, 0xa7, 0x97, 0xd5, 0x65, 0xa9, 0x10, 0x4f, 0x79, 0x24, 0x5b, 0xe6, 0x35, - 0xab, 0xdd, 0x54, 0xf0, 0x5e, 0x85, 0x54, 0xa3, 0x07, 0xc1, 0x97, 0x85, 0x6a, 0x34, 0x9d, 0xf9, - 0xdc, 0x52, 0xec, 0x5c, 0x5c, 0xc9, 0x7a, 0x85, 0xb5, 0xa6, 0xb3, 0x92, 0xfa, 0xd8, 0x9b, 0x8b, - 0x53, 0x5f, 0x7c, 0x73, 0x71, 0x4a, 0xbe, 0x4a, 0xaf, 0x56, 0xe2, 0x93, 0x0e, 0x3b, 0xe8, 0x32, - 0xa4, 0x35, 0xf1, 0xc0, 0x3e, 0x9c, 0x3a, 0x62, 0xd2, 0xfa, 0xa4, 0xf2, 0x9b, 0x11, 0x48, 0xac, - 0xde, 0xd8, 0xd6, 0x0c, 0x1b, 0x55, 0x61, 0xc6, 0x57, 0xda, 0x49, 0xe7, 0xbf, 0xaf, 0xe7, 0xc2, - 0x00, 0x54, 0x47, 0x1d, 0x7b, 0x3b, 0x12, 0xa6, 0xff, 0x40, 0x5c, 0xa0, 0xab, 0xd7, 0x21, 0xc9, - 0x5a, 0xe8, 0xa0, 0x17, 0x60, 0xba, 0x4b, 0x7e, 0xf0, 0x24, 0xfe, 0xc2, 0x48, 0x45, 0xa7, 0xf4, - 0x41, 0xb5, 0x60, 0x7c, 0xf2, 0x9f, 0x45, 0x00, 0x56, 0x6f, 0xdc, 0x68, 0xd8, 0x46, 0xb7, 0x8d, - 0xdd, 0x77, 0xab, 0xcb, 0xeb, 0x70, 0x22, 0xf0, 0x25, 0xb0, 0xad, 0x4f, 0xdc, 0xed, 0x59, 0xff, - 0x5b, 0x60, 0x5b, 0x1f, 0x8a, 0xd6, 0x74, 0x5c, 0x0f, 0x2d, 0x36, 0x31, 0xda, 0xaa, 0xe3, 0x0e, - 0xca, 0xf1, 0x15, 0xc8, 0xf8, 0x5d, 0x77, 0x50, 0x0d, 0x52, 0x2e, 0xff, 0xcd, 0xc5, 0x29, 0x8f, - 0x16, 0xa7, 0x60, 0x0b, 0x8a, 0xd4, 0x63, 0x97, 0xff, 0x27, 0x91, 0xaa, 0x3f, 0x11, 0xbe, 0xaa, - 0x14, 0x89, 0x58, 0x78, 0x6e, 0x81, 0x63, 0xef, 0x82, 0x05, 0xe6, 0x58, 0x01, 0xb1, 0x7e, 0x73, - 0x14, 0x66, 0x77, 0xc4, 0x24, 0xfd, 0xaa, 0x95, 0xc2, 0x0e, 0x24, 0xb1, 0xe9, 0xda, 0x86, 0xb7, - 0xdb, 0xf4, 0xc4, 0xa8, 0xc1, 0x1e, 0xd2, 0x97, 0xaa, 0xe9, 0xda, 0x87, 0xc1, 0xa1, 0x17, 0x58, - 0x01, 0x31, 0xfc, 0x42, 0x0c, 0xe6, 0x47, 0xb1, 0xa2, 0xb3, 0x50, 0xd0, 0x6d, 0x4c, 0x0b, 0xc2, - 0xdf, 0x41, 0xe6, 0x45, 0x31, 0x5f, 0x52, 0x14, 0x20, 0x0e, 0x1a, 0xd1, 0x2a, 0x42, 0x7a, 0x6f, - 0x1e, 0x59, 0xde, 0x47, 0xa0, 0x8b, 0x0a, 0x86, 0x82, 0xf8, 0xb0, 0x62, 0x57, 0x6b, 0x6b, 0xa6, - 0x8e, 0xef, 0x41, 0x13, 0x06, 0x57, 0x00, 0xf1, 0xb5, 0x46, 0x99, 0x61, 0xa2, 0x1b, 0x90, 0x14, - 0xf0, 0xf1, 0x77, 0x01, 0x5e, 0x80, 0xa1, 0x07, 0x20, 0x1b, 0x5c, 0x18, 0xa8, 0x9f, 0x12, 0x57, - 0x32, 0x81, 0x75, 0x61, 0xdc, 0xca, 0x93, 0x38, 0x72, 0xe5, 0xe1, 0xae, 0xe0, 0xcf, 0xc7, 0x60, - 0x46, 0xc1, 0xcd, 0xbf, 0x82, 0x03, 0xf7, 0x35, 0x00, 0x6c, 0x52, 0x13, 0x63, 0x7b, 0x0f, 0x63, - 0x37, 0x68, 0x24, 0xd2, 0x0c, 0x6f, 0xd5, 0x71, 0xdf, 0xaf, 0xd1, 0xfb, 0xd7, 0x51, 0xc8, 0x06, - 0x47, 0xef, 0xaf, 0xc0, 0xca, 0x86, 0x36, 0x7d, 0x93, 0xc6, 0xbe, 0x27, 0x79, 0x64, 0x94, 0x49, - 0x1b, 0xd0, 0xeb, 0x31, 0xb6, 0xec, 0xd3, 0x31, 0x48, 0xf0, 0x53, 0x73, 0x5b, 0x03, 0x3e, 0x6e, - 0x64, 0xdc, 0x17, 0xf1, 0x39, 0xf1, 0x45, 0xfc, 0x50, 0x17, 0xf7, 0x21, 0xc8, 0x93, 0x90, 0x3a, - 0x74, 0x14, 0x2f, 0x72, 0x2e, 0x47, 0xc3, 0x61, 0xff, 0xe0, 0x39, 0x5a, 0x84, 0x0c, 0x21, 0xf3, - 0x6d, 0x36, 0xa1, 0x81, 0x8e, 0x76, 0x50, 0x65, 0x25, 0xe8, 0x71, 0x40, 0xfb, 0x5e, 0xe2, 0x43, - 0xf5, 0x05, 0x41, 0xe8, 0x66, 0xfc, 0x1a, 0x41, 0x7e, 0x3f, 0x00, 0x69, 0x85, 0xca, 0xee, 0x53, - 0xe6, 0x77, 0x53, 0x93, 0x92, 0x55, 0x7a, 0xa7, 0xf2, 0x77, 0x44, 0x98, 0xab, 0xdc, 0x17, 0x6d, - 0xf3, 0xa0, 0x45, 0x3d, 0xde, 0x6c, 0xf8, 0xe3, 0xb7, 0x16, 0x8b, 0x87, 0x5a, 0xa7, 0xbd, 0x22, - 0x0f, 0x81, 0x94, 0x87, 0xe5, 0x02, 0x88, 0x37, 0x1d, 0x0e, 0xdc, 0x57, 0x3e, 0x40, 0xf4, 0xfa, - 0xce, 0xef, 0xfe, 0xc4, 0xf9, 0x33, 0x81, 0x57, 0x1c, 0x78, 0x19, 0x32, 0x36, 0x3c, 0xf2, 0x8f, - 0x45, 0x00, 0xf9, 0x8b, 0x8d, 0x77, 0xf4, 0x7e, 0x03, 0x20, 0xe0, 0xef, 0x47, 0x8e, 0x8e, 0x23, - 0x7c, 0xfe, 0x50, 0x1c, 0x11, 0x98, 0x4c, 0x1f, 0xf2, 0x4d, 0xbb, 0xb8, 0x0f, 0x61, 0xc8, 0xcd, - 0xda, 0xcb, 0x15, 0xcb, 0x08, 0x41, 0x08, 0x26, 0x3a, 0x47, 0xa7, 0xe4, 0xb7, 0x22, 0x70, 0x7a, - 0x40, 0x13, 0xbd, 0x26, 0xeb, 0x80, 0xec, 0x40, 0x25, 0x1d, 0x51, 0xb1, 0xdb, 0x7b, 0x6f, 0x8a, - 0x3d, 0x63, 0x0f, 0x98, 0xf3, 0xf7, 0x68, 0x8d, 0xe2, 0x46, 0xe8, 0x57, 0x23, 0x30, 0x17, 0x6c, - 0x91, 0xd7, 0xb7, 0x3a, 0x64, 0x83, 0x6d, 0xe1, 0xbd, 0xfa, 0xc0, 0x24, 0xbd, 0x0a, 0x76, 0x28, - 0x04, 0x42, 0xfa, 0x22, 0xb4, 0x9e, 0xe5, 0xea, 0x9e, 0x9c, 0x58, 0x4a, 0xa2, 0x61, 0x43, 0xcd, - 0x00, 0x1b, 0xac, 0x6f, 0x8f, 0x42, 0x7c, 0xdb, 0xb2, 0xda, 0xe8, 0x9b, 0x22, 0x30, 0x63, 0x5a, - 0xae, 0x4a, 0xe6, 0x0a, 0x6e, 0xaa, 0x3c, 0x59, 0xc0, 0x2c, 0xe9, 0x8d, 0xe3, 0x49, 0xef, 0x4b, - 0x6f, 0x2d, 0x0e, 0x42, 0x0d, 0xbb, 0x10, 0xbd, 0x60, 0x5a, 0x6e, 0x99, 0x12, 0x35, 0x58, 0x3e, - 0xe1, 0x36, 0xe4, 0xc2, 0xef, 0x67, 0xe6, 0x57, 0x39, 0xf6, 0xfb, 0x73, 0x63, 0xdf, 0x9d, 0xdd, - 0x0d, 0xbc, 0x98, 0x5d, 0x4b, 0xfc, 0x87, 0x64, 0x70, 0x5f, 0x05, 0xe9, 0x46, 0xff, 0xb9, 0xa3, - 0x2a, 0x24, 0xc5, 0x39, 0xa3, 0xc8, 0x84, 0x47, 0x98, 0x82, 0x12, 0xe7, 0xbc, 0xe7, 0x7f, 0x26, - 0x02, 0xe0, 0xa7, 0x66, 0xd0, 0x63, 0x70, 0xaa, 0xbc, 0xb5, 0xb9, 0xaa, 0xd6, 0x1b, 0xa5, 0xc6, - 0x4e, 0x3d, 0xfc, 0x57, 0x34, 0xc4, 0x7d, 0x3e, 0x4e, 0x17, 0xeb, 0xc6, 0x9e, 0x81, 0x9b, 0xe8, - 0x61, 0x98, 0x0b, 0x53, 0x93, 0xa7, 0xea, 0xaa, 0x14, 0x29, 0x66, 0xef, 0xdc, 0x5d, 0x4a, 0x31, - 0x97, 0x14, 0x37, 0xd1, 0x39, 0x38, 0x31, 0x48, 0x57, 0xdb, 0x5c, 0x93, 0xa2, 0xc5, 0xdc, 0x9d, - 0xbb, 0x4b, 0x69, 0xcf, 0x77, 0x45, 0x32, 0xa0, 0x20, 0x25, 0xc7, 0x8b, 0x15, 0xe1, 0xce, 0xdd, - 0xa5, 0x04, 0x1b, 0x96, 0x62, 0xfc, 0x63, 0x3f, 0xbc, 0x30, 0x75, 0xfe, 0xeb, 0x00, 0x6a, 0xe6, - 0x9e, 0xad, 0xd1, 0x3f, 0x25, 0x8f, 0x8a, 0x70, 0xb2, 0xb6, 0x79, 0x55, 0x29, 0x55, 0x1a, 0xb5, - 0xad, 0xcd, 0xbe, 0x3f, 0xfe, 0x11, 0xae, 0x5b, 0xdd, 0xda, 0x29, 0xaf, 0x57, 0xd5, 0x7a, 0x6d, - 0x6d, 0x93, 0xed, 0x01, 0x87, 0xea, 0x5e, 0xde, 0x6c, 0xd4, 0x36, 0xaa, 0x52, 0xb4, 0x7c, 0x75, - 0xe4, 0x1e, 0xc3, 0x63, 0x47, 0x0e, 0xb8, 0x6f, 0x25, 0x43, 0x1b, 0x0d, 0xff, 0x3b, 0x00, 0x00, - 0xff, 0xff, 0xd6, 0xf2, 0x1e, 0x47, 0x50, 0xa0, 0x00, 0x00, + // 11200 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x69, 0x90, 0x1c, 0xd7, + 0x79, 0xd8, 0xce, 0x3d, 0xf3, 0xcd, 0xd5, 0xfb, 0x76, 0x01, 0x2c, 0x06, 0xe4, 0xee, 0xa2, 0x29, + 0x12, 0x20, 0x48, 0x2e, 0x48, 0x90, 0x00, 0xc9, 0x85, 0x28, 0x66, 0x66, 0x76, 0xb0, 0x18, 0x70, + 0x2f, 0xf6, 0xcc, 0x42, 0x24, 0x6d, 0xab, 0xdd, 0xdb, 0xf3, 0x76, 0xb7, 0x89, 0x99, 0xee, 0x51, + 0x77, 0x0f, 0xb0, 0xcb, 0x4a, 0xa5, 0xe4, 0xc8, 0x4e, 0x64, 0xf8, 0x88, 0x1c, 0xbb, 0x6c, 0xd9, + 0x12, 0x6c, 0xc9, 0x8e, 0x6d, 0xd9, 0xb9, 0x7c, 0x28, 0x3e, 0xe2, 0x8a, 0x63, 0xe7, 0xb4, 0x5d, + 0x39, 0x14, 0xff, 0x48, 0x9c, 0x54, 0x99, 0xb1, 0x29, 0x57, 0xac, 0xc8, 0x72, 0xe2, 0x83, 0x4e, + 0x9c, 0x52, 0x25, 0x95, 0x7a, 0x57, 0x1f, 0x73, 0xec, 0xcc, 0x42, 0xa4, 0xac, 0xd8, 0xf9, 0x03, + 0x4c, 0x7f, 0xef, 0xfb, 0xbe, 0xf7, 0xde, 0xf7, 0xbe, 0xf7, 0xbd, 0xef, 0xfb, 0xde, 0xb1, 0xf0, + 0xdb, 0x15, 0x58, 0xdc, 0xb3, 0xac, 0xbd, 0x36, 0xbe, 0xd8, 0xb5, 0x2d, 0xd7, 0xda, 0xe9, 0xed, + 0x5e, 0x6c, 0x61, 0x47, 0xb7, 0x8d, 0xae, 0x6b, 0xd9, 0x4b, 0x14, 0x86, 0x8a, 0x0c, 0x63, 0x49, + 0x60, 0xc8, 0xeb, 0x30, 0x7d, 0xcd, 0x68, 0xe3, 0x15, 0x0f, 0xb1, 0x81, 0x5d, 0xf4, 0x1c, 0xc4, + 0x77, 0x8d, 0x36, 0x9e, 0x8b, 0x2c, 0xc6, 0xce, 0x67, 0x2f, 0xbd, 0x67, 0xa9, 0x8f, 0x68, 0x29, + 0x4c, 0xb1, 0x45, 0xc0, 0x0a, 0xa5, 0x90, 0xff, 0x4f, 0x1c, 0x66, 0x86, 0x94, 0x22, 0x04, 0x71, + 0x53, 0xeb, 0x10, 0x8e, 0x91, 0xf3, 0x19, 0x85, 0xfe, 0x46, 0x73, 0x90, 0xea, 0x6a, 0xfa, 0x2d, + 0x6d, 0x0f, 0xcf, 0x45, 0x29, 0x58, 0x7c, 0xa2, 0x79, 0x80, 0x16, 0xee, 0x62, 0xb3, 0x85, 0x4d, + 0xfd, 0x70, 0x2e, 0xb6, 0x18, 0x3b, 0x9f, 0x51, 0x02, 0x10, 0xf4, 0x18, 0x4c, 0x77, 0x7b, 0x3b, + 0x6d, 0x43, 0x57, 0x03, 0x68, 0xb0, 0x18, 0x3b, 0x9f, 0x50, 0x24, 0x56, 0xb0, 0xe2, 0x23, 0x9f, + 0x83, 0xe2, 0x1d, 0xac, 0xdd, 0x0a, 0xa2, 0x66, 0x29, 0x6a, 0x81, 0x80, 0x03, 0x88, 0x55, 0xc8, + 0x75, 0xb0, 0xe3, 0x68, 0x7b, 0x58, 0x75, 0x0f, 0xbb, 0x78, 0x2e, 0x4e, 0x7b, 0xbf, 0x38, 0xd0, + 0xfb, 0xfe, 0x9e, 0x67, 0x39, 0x55, 0xf3, 0xb0, 0x8b, 0x51, 0x19, 0x32, 0xd8, 0xec, 0x75, 0x18, + 0x87, 0xc4, 0x08, 0xf9, 0xd5, 0xcc, 0x5e, 0xa7, 0x9f, 0x4b, 0x9a, 0x90, 0x71, 0x16, 0x29, 0x07, + 0xdb, 0xb7, 0x0d, 0x1d, 0xcf, 0x25, 0x29, 0x83, 0x73, 0x03, 0x0c, 0x1a, 0xac, 0xbc, 0x9f, 0x87, + 0xa0, 0x43, 0x55, 0xc8, 0xe0, 0x03, 0x17, 0x9b, 0x8e, 0x61, 0x99, 0x73, 0x29, 0xca, 0xe4, 0xe1, + 0x21, 0xa3, 0x88, 0xdb, 0xad, 0x7e, 0x16, 0x3e, 0x1d, 0xba, 0x02, 0x29, 0xab, 0xeb, 0x1a, 0x96, + 0xe9, 0xcc, 0xa5, 0x17, 0x23, 0xe7, 0xb3, 0x97, 0x1e, 0x18, 0xaa, 0x08, 0x9b, 0x0c, 0x47, 0x11, + 0xc8, 0xa8, 0x0e, 0x92, 0x63, 0xf5, 0x6c, 0x1d, 0xab, 0xba, 0xd5, 0xc2, 0xaa, 0x61, 0xee, 0x5a, + 0x73, 0x19, 0xca, 0x60, 0x61, 0xb0, 0x23, 0x14, 0xb1, 0x6a, 0xb5, 0x70, 0xdd, 0xdc, 0xb5, 0x94, + 0x82, 0x13, 0xfa, 0x46, 0x27, 0x21, 0xe9, 0x1c, 0x9a, 0xae, 0x76, 0x30, 0x97, 0xa3, 0x1a, 0xc2, + 0xbf, 0x88, 0xea, 0xe0, 0x96, 0x41, 0xaa, 0x9b, 0xcb, 0x33, 0xd5, 0xe1, 0x9f, 0xf2, 0xcf, 0x27, + 0xa1, 0x38, 0x89, 0xf2, 0x5d, 0x85, 0xc4, 0x2e, 0xe9, 0xff, 0x5c, 0xf4, 0x38, 0xd2, 0x61, 0x34, + 0x61, 0xf1, 0x26, 0xef, 0x53, 0xbc, 0x65, 0xc8, 0x9a, 0xd8, 0x71, 0x71, 0x8b, 0xe9, 0x4a, 0x6c, + 0x42, 0x6d, 0x03, 0x46, 0x34, 0xa8, 0x6c, 0xf1, 0xfb, 0x52, 0xb6, 0x57, 0xa0, 0xe8, 0x35, 0x49, + 0xb5, 0x35, 0x73, 0x4f, 0x68, 0xed, 0xc5, 0x71, 0x2d, 0x59, 0xaa, 0x09, 0x3a, 0x85, 0x90, 0x29, + 0x05, 0x1c, 0xfa, 0x46, 0x2b, 0x00, 0x96, 0x89, 0xad, 0x5d, 0xb5, 0x85, 0xf5, 0xf6, 0x5c, 0x7a, + 0x84, 0x94, 0x36, 0x09, 0xca, 0x80, 0x94, 0x2c, 0x06, 0xd5, 0xdb, 0xe8, 0x79, 0x5f, 0x09, 0x53, + 0x23, 0x74, 0x68, 0x9d, 0x4d, 0xbf, 0x01, 0x3d, 0xdc, 0x86, 0x82, 0x8d, 0xc9, 0x8c, 0xc0, 0x2d, + 0xde, 0xb3, 0x0c, 0x6d, 0xc4, 0xd2, 0xd8, 0x9e, 0x29, 0x9c, 0x8c, 0x75, 0x2c, 0x6f, 0x07, 0x3f, + 0xd1, 0x43, 0xe0, 0x01, 0x54, 0xaa, 0x56, 0x40, 0xed, 0x53, 0x4e, 0x00, 0x37, 0xb4, 0x0e, 0x2e, + 0xbd, 0x01, 0x85, 0xb0, 0x78, 0xd0, 0x2c, 0x24, 0x1c, 0x57, 0xb3, 0x5d, 0xaa, 0x85, 0x09, 0x85, + 0x7d, 0x20, 0x09, 0x62, 0xd8, 0x6c, 0x51, 0xfb, 0x97, 0x50, 0xc8, 0x4f, 0xf4, 0x97, 0xfc, 0x0e, + 0xc7, 0x68, 0x87, 0x1f, 0x19, 0x1c, 0xd1, 0x10, 0xe7, 0xfe, 0x7e, 0x97, 0x9e, 0x85, 0x7c, 0xa8, + 0x03, 0x93, 0x56, 0x2d, 0xff, 0x65, 0x38, 0x31, 0x94, 0x35, 0x7a, 0x05, 0x66, 0x7b, 0xa6, 0x61, + 0xba, 0xd8, 0xee, 0xda, 0x98, 0x68, 0x2c, 0xab, 0x6a, 0xee, 0x77, 0x53, 0x23, 0x74, 0x6e, 0x3b, + 0x88, 0xcd, 0xb8, 0x28, 0x33, 0xbd, 0x41, 0xe0, 0x85, 0x4c, 0xfa, 0xf3, 0x29, 0xe9, 0x43, 0x1f, + 0xfa, 0xd0, 0x87, 0xa2, 0xf2, 0x2f, 0x27, 0x61, 0x76, 0xd8, 0x9c, 0x19, 0x3a, 0x7d, 0x4f, 0x42, + 0xd2, 0xec, 0x75, 0x76, 0xb0, 0x4d, 0x85, 0x94, 0x50, 0xf8, 0x17, 0x2a, 0x43, 0xa2, 0xad, 0xed, + 0xe0, 0xf6, 0x5c, 0x7c, 0x31, 0x72, 0xbe, 0x70, 0xe9, 0xb1, 0x89, 0x66, 0xe5, 0xd2, 0x1a, 0x21, + 0x51, 0x18, 0x25, 0x7a, 0x1f, 0xc4, 0xb9, 0xf1, 0x26, 0x1c, 0x2e, 0x4c, 0xc6, 0x81, 0xcc, 0x25, + 0x85, 0xd2, 0xa1, 0x33, 0x90, 0x21, 0xff, 0x33, 0xdd, 0x48, 0xd2, 0x36, 0xa7, 0x09, 0x80, 0xe8, + 0x05, 0x2a, 0x41, 0x9a, 0x4e, 0x93, 0x16, 0x16, 0x8b, 0x9e, 0xf7, 0x4d, 0x14, 0xab, 0x85, 0x77, + 0xb5, 0x5e, 0xdb, 0x55, 0x6f, 0x6b, 0xed, 0x1e, 0xa6, 0x0a, 0x9f, 0x51, 0x72, 0x1c, 0x78, 0x93, + 0xc0, 0xd0, 0x02, 0x64, 0xd9, 0xac, 0x32, 0xcc, 0x16, 0x3e, 0xa0, 0x76, 0x35, 0xa1, 0xb0, 0x89, + 0x56, 0x27, 0x10, 0x52, 0xfd, 0xeb, 0x8e, 0x65, 0x0a, 0xd5, 0xa4, 0x55, 0x10, 0x00, 0xad, 0xfe, + 0xd9, 0x7e, 0x93, 0xfe, 0xe0, 0xf0, 0xee, 0x0d, 0xcc, 0xa5, 0x73, 0x50, 0xa4, 0x18, 0x4f, 0xf3, + 0xa1, 0xd7, 0xda, 0x73, 0xd3, 0x8b, 0x91, 0xf3, 0x69, 0xa5, 0xc0, 0xc0, 0x9b, 0x1c, 0x2a, 0xff, + 0x4c, 0x14, 0xe2, 0xd4, 0xb0, 0x14, 0x21, 0xdb, 0x7c, 0x75, 0xab, 0xa6, 0xae, 0x6c, 0x6e, 0x57, + 0xd6, 0x6a, 0x52, 0x04, 0x15, 0x00, 0x28, 0xe0, 0xda, 0xda, 0x66, 0xb9, 0x29, 0x45, 0xbd, 0xef, + 0xfa, 0x46, 0xf3, 0xca, 0x33, 0x52, 0xcc, 0x23, 0xd8, 0x66, 0x80, 0x78, 0x10, 0xe1, 0xe9, 0x4b, + 0x52, 0x02, 0x49, 0x90, 0x63, 0x0c, 0xea, 0xaf, 0xd4, 0x56, 0xae, 0x3c, 0x23, 0x25, 0xc3, 0x90, + 0xa7, 0x2f, 0x49, 0x29, 0x94, 0x87, 0x0c, 0x85, 0x54, 0x36, 0x37, 0xd7, 0xa4, 0xb4, 0xc7, 0xb3, + 0xd1, 0x54, 0xea, 0x1b, 0xab, 0x52, 0xc6, 0xe3, 0xb9, 0xaa, 0x6c, 0x6e, 0x6f, 0x49, 0xe0, 0x71, + 0x58, 0xaf, 0x35, 0x1a, 0xe5, 0xd5, 0x9a, 0x94, 0xf5, 0x30, 0x2a, 0xaf, 0x36, 0x6b, 0x0d, 0x29, + 0x17, 0x6a, 0xd6, 0xd3, 0x97, 0xa4, 0xbc, 0x57, 0x45, 0x6d, 0x63, 0x7b, 0x5d, 0x2a, 0xa0, 0x69, + 0xc8, 0xb3, 0x2a, 0x44, 0x23, 0x8a, 0x7d, 0xa0, 0x2b, 0xcf, 0x48, 0x92, 0xdf, 0x10, 0xc6, 0x65, + 0x3a, 0x04, 0xb8, 0xf2, 0x8c, 0x84, 0xe4, 0x2a, 0x24, 0xa8, 0x1a, 0x22, 0x04, 0x85, 0xb5, 0x72, + 0xa5, 0xb6, 0xa6, 0x6e, 0x6e, 0x35, 0xeb, 0x9b, 0x1b, 0xe5, 0x35, 0x29, 0xe2, 0xc3, 0x94, 0xda, + 0xcb, 0xdb, 0x75, 0xa5, 0xb6, 0x22, 0x45, 0x83, 0xb0, 0xad, 0x5a, 0xb9, 0x59, 0x5b, 0x91, 0x62, + 0xb2, 0x0e, 0xb3, 0xc3, 0x0c, 0xea, 0xd0, 0x29, 0x14, 0xd0, 0x85, 0xe8, 0x08, 0x5d, 0xa0, 0xbc, + 0xfa, 0x75, 0x41, 0xfe, 0x5c, 0x14, 0x66, 0x86, 0x2c, 0x2a, 0x43, 0x2b, 0x79, 0x11, 0x12, 0x4c, + 0x97, 0xd9, 0x32, 0xfb, 0xe8, 0xd0, 0xd5, 0x89, 0x6a, 0xf6, 0xc0, 0x52, 0x4b, 0xe9, 0x82, 0x4e, + 0x48, 0x6c, 0x84, 0x13, 0x42, 0x58, 0x0c, 0x28, 0xec, 0xd7, 0x0d, 0x18, 0x7f, 0xb6, 0x3e, 0x5e, + 0x99, 0x64, 0x7d, 0xa4, 0xb0, 0xe3, 0x2d, 0x02, 0x89, 0x21, 0x8b, 0xc0, 0x55, 0x98, 0x1e, 0x60, + 0x34, 0xb1, 0x31, 0xfe, 0x70, 0x04, 0xe6, 0x46, 0x09, 0x67, 0x8c, 0x49, 0x8c, 0x86, 0x4c, 0xe2, + 0xd5, 0x7e, 0x09, 0x9e, 0x1d, 0x3d, 0x08, 0x03, 0x63, 0xfd, 0xa3, 0x11, 0x38, 0x39, 0xdc, 0xd9, + 0x1c, 0xda, 0x86, 0xf7, 0x41, 0xb2, 0x83, 0xdd, 0x7d, 0x4b, 0xb8, 0x55, 0x8f, 0x0c, 0x59, 0xac, + 0x49, 0x71, 0xff, 0x60, 0x73, 0xaa, 0xe0, 0x6a, 0x1f, 0x1b, 0xe5, 0x31, 0xb2, 0xd6, 0x0c, 0xb4, + 0xf4, 0x9b, 0xa3, 0x70, 0x62, 0x28, 0xf3, 0xa1, 0x0d, 0x7d, 0x10, 0xc0, 0x30, 0xbb, 0x3d, 0x97, + 0xb9, 0x4e, 0xcc, 0x12, 0x67, 0x28, 0x84, 0x1a, 0x2f, 0x62, 0x65, 0x7b, 0xae, 0x57, 0x1e, 0xa3, + 0xe5, 0xc0, 0x40, 0x14, 0xe1, 0x39, 0xbf, 0xa1, 0x71, 0xda, 0xd0, 0xf9, 0x11, 0x3d, 0x1d, 0x50, + 0xcc, 0x27, 0x41, 0xd2, 0xdb, 0x06, 0x36, 0x5d, 0xd5, 0x71, 0x6d, 0xac, 0x75, 0x0c, 0x73, 0x8f, + 0x2e, 0x35, 0xe9, 0xe5, 0xc4, 0xae, 0xd6, 0x76, 0xb0, 0x52, 0x64, 0xc5, 0x0d, 0x51, 0x4a, 0x28, + 0xa8, 0x02, 0xd9, 0x01, 0x8a, 0x64, 0x88, 0x82, 0x15, 0x7b, 0x14, 0xf2, 0x77, 0x64, 0x20, 0x1b, + 0x70, 0xcd, 0xd1, 0x59, 0xc8, 0xbd, 0xae, 0xdd, 0xd6, 0x54, 0x11, 0x6e, 0x31, 0x49, 0x64, 0x09, + 0x6c, 0x8b, 0x87, 0x5c, 0x4f, 0xc2, 0x2c, 0x45, 0xb1, 0x7a, 0x2e, 0xb6, 0x55, 0xbd, 0xad, 0x39, + 0x0e, 0x15, 0x5a, 0x9a, 0xa2, 0x22, 0x52, 0xb6, 0x49, 0x8a, 0xaa, 0xa2, 0x04, 0x5d, 0x86, 0x19, + 0x4a, 0xd1, 0xe9, 0xb5, 0x5d, 0xa3, 0xdb, 0xc6, 0x2a, 0x09, 0x00, 0x1d, 0xba, 0xe4, 0x78, 0x2d, + 0x9b, 0x26, 0x18, 0xeb, 0x1c, 0x81, 0xb4, 0xc8, 0x41, 0x2b, 0xf0, 0x20, 0x25, 0xdb, 0xc3, 0x26, + 0xb6, 0x35, 0x17, 0xab, 0xf8, 0x83, 0x3d, 0xad, 0xed, 0xa8, 0x9a, 0xd9, 0x52, 0xf7, 0x35, 0x67, + 0x7f, 0x6e, 0x96, 0x30, 0xa8, 0x44, 0xe7, 0x22, 0xca, 0x69, 0x82, 0xb8, 0xca, 0xf1, 0x6a, 0x14, + 0xad, 0x6c, 0xb6, 0xae, 0x6b, 0xce, 0x3e, 0x5a, 0x86, 0x93, 0x94, 0x8b, 0xe3, 0xda, 0x86, 0xb9, + 0xa7, 0xea, 0xfb, 0x58, 0xbf, 0xa5, 0xf6, 0xdc, 0xdd, 0xe7, 0xe6, 0xce, 0x04, 0xeb, 0xa7, 0x2d, + 0x6c, 0x50, 0x9c, 0x2a, 0x41, 0xd9, 0x76, 0x77, 0x9f, 0x43, 0x0d, 0xc8, 0x91, 0xc1, 0xe8, 0x18, + 0x6f, 0x60, 0x75, 0xd7, 0xb2, 0xe9, 0x1a, 0x5a, 0x18, 0x62, 0x9a, 0x02, 0x12, 0x5c, 0xda, 0xe4, + 0x04, 0xeb, 0x56, 0x0b, 0x2f, 0x27, 0x1a, 0x5b, 0xb5, 0xda, 0x8a, 0x92, 0x15, 0x5c, 0xae, 0x59, + 0x36, 0x51, 0xa8, 0x3d, 0xcb, 0x13, 0x70, 0x96, 0x29, 0xd4, 0x9e, 0x25, 0xc4, 0x7b, 0x19, 0x66, + 0x74, 0x9d, 0xf5, 0xd9, 0xd0, 0x55, 0x1e, 0xa6, 0x39, 0x73, 0x52, 0x48, 0x58, 0xba, 0xbe, 0xca, + 0x10, 0xb8, 0x8e, 0x3b, 0xe8, 0x79, 0x38, 0xe1, 0x0b, 0x2b, 0x48, 0x38, 0x3d, 0xd0, 0xcb, 0x7e, + 0xd2, 0xcb, 0x30, 0xd3, 0x3d, 0x1c, 0x24, 0x44, 0xa1, 0x1a, 0xbb, 0x87, 0xfd, 0x64, 0xcf, 0xc2, + 0x6c, 0x77, 0xbf, 0x3b, 0x48, 0x77, 0x21, 0x48, 0x87, 0xba, 0xfb, 0xdd, 0x7e, 0xc2, 0x87, 0x69, + 0xcc, 0x6e, 0x63, 0x5d, 0x73, 0x71, 0x6b, 0xee, 0x54, 0x10, 0x3d, 0x50, 0x80, 0x96, 0x40, 0xd2, + 0x75, 0x15, 0x9b, 0xda, 0x4e, 0x1b, 0xab, 0x9a, 0x8d, 0x4d, 0xcd, 0x99, 0x5b, 0xa0, 0xc8, 0x71, + 0xd7, 0xee, 0x61, 0xa5, 0xa0, 0xeb, 0x35, 0x5a, 0x58, 0xa6, 0x65, 0xe8, 0x02, 0x4c, 0x5b, 0x3b, + 0xaf, 0xeb, 0x4c, 0x23, 0xd5, 0xae, 0x8d, 0x77, 0x8d, 0x83, 0xb9, 0xf7, 0x50, 0xf1, 0x16, 0x49, + 0x01, 0xd5, 0xc7, 0x2d, 0x0a, 0x46, 0x8f, 0x82, 0xa4, 0x3b, 0xfb, 0x9a, 0xdd, 0xa5, 0x26, 0xd9, + 0xe9, 0x6a, 0x3a, 0x9e, 0x7b, 0x98, 0xa1, 0x32, 0xf8, 0x86, 0x00, 0x93, 0x19, 0xe1, 0xdc, 0x31, + 0x76, 0x5d, 0xc1, 0xf1, 0x1c, 0x9b, 0x11, 0x14, 0xc6, 0xb9, 0x9d, 0x07, 0x89, 0x48, 0x22, 0x54, + 0xf1, 0x79, 0x8a, 0x56, 0xe8, 0xee, 0x77, 0x83, 0xf5, 0x3e, 0x04, 0x79, 0x82, 0xe9, 0x57, 0xfa, + 0x28, 0x73, 0xdc, 0xba, 0xfb, 0x81, 0x1a, 0x9f, 0x81, 0x93, 0x04, 0xa9, 0x83, 0x5d, 0xad, 0xa5, + 0xb9, 0x5a, 0x00, 0xfb, 0x71, 0x8a, 0x4d, 0xc4, 0xbe, 0xce, 0x0b, 0x43, 0xed, 0xb4, 0x7b, 0x3b, + 0x87, 0x9e, 0x62, 0x3d, 0xc1, 0xda, 0x49, 0x60, 0x42, 0xb5, 0xde, 0x35, 0xe7, 0x5c, 0x5e, 0x86, + 0x5c, 0x50, 0xef, 0x51, 0x06, 0x98, 0xe6, 0x4b, 0x11, 0xe2, 0x04, 0x55, 0x37, 0x57, 0x88, 0xfb, + 0xf2, 0x5a, 0x4d, 0x8a, 0x12, 0x37, 0x6a, 0xad, 0xde, 0xac, 0xa9, 0xca, 0xf6, 0x46, 0xb3, 0xbe, + 0x5e, 0x93, 0x62, 0x01, 0xc7, 0xfe, 0x46, 0x3c, 0xfd, 0x88, 0x74, 0x4e, 0xfe, 0x85, 0x18, 0x14, + 0xc2, 0x91, 0x1a, 0x7a, 0x2f, 0x9c, 0x12, 0x09, 0x17, 0x07, 0xbb, 0xea, 0x1d, 0xc3, 0xa6, 0x13, + 0xb2, 0xa3, 0xb1, 0xc5, 0xd1, 0xd3, 0x9f, 0x59, 0x8e, 0xd5, 0xc0, 0xee, 0xfb, 0x0d, 0x9b, 0x4c, + 0xb7, 0x8e, 0xe6, 0xa2, 0x35, 0x58, 0x30, 0x2d, 0xd5, 0x71, 0x35, 0xb3, 0xa5, 0xd9, 0x2d, 0xd5, + 0x4f, 0x75, 0xa9, 0x9a, 0xae, 0x63, 0xc7, 0xb1, 0xd8, 0x42, 0xe8, 0x71, 0x79, 0xc0, 0xb4, 0x1a, + 0x1c, 0xd9, 0x5f, 0x21, 0xca, 0x1c, 0xb5, 0x4f, 0x7d, 0x63, 0xa3, 0xd4, 0xf7, 0x0c, 0x64, 0x3a, + 0x5a, 0x57, 0xc5, 0xa6, 0x6b, 0x1f, 0x52, 0xff, 0x3c, 0xad, 0xa4, 0x3b, 0x5a, 0xb7, 0x46, 0xbe, + 0xd1, 0x4d, 0x78, 0xc4, 0x47, 0x55, 0xdb, 0x78, 0x4f, 0xd3, 0x0f, 0x55, 0xea, 0x8c, 0xd3, 0xb4, + 0x81, 0xaa, 0x5b, 0xe6, 0x6e, 0xdb, 0xd0, 0x5d, 0x87, 0xda, 0x07, 0x66, 0xe3, 0x64, 0x9f, 0x62, + 0x8d, 0x12, 0xdc, 0x70, 0x2c, 0x93, 0xfa, 0xe0, 0x55, 0x81, 0xfd, 0x15, 0x09, 0xbf, 0x6e, 0xc4, + 0xd3, 0x71, 0x29, 0x71, 0x23, 0x9e, 0x4e, 0x48, 0xc9, 0x1b, 0xf1, 0x74, 0x52, 0x4a, 0xdd, 0x88, + 0xa7, 0xd3, 0x52, 0xe6, 0x46, 0x3c, 0x9d, 0x91, 0x40, 0xfe, 0xd9, 0x34, 0xe4, 0x82, 0x91, 0x01, + 0x09, 0xb4, 0x74, 0xba, 0x36, 0x46, 0xa8, 0xf5, 0x7c, 0xe8, 0xc8, 0x38, 0x62, 0xa9, 0x4a, 0x16, + 0xcd, 0xe5, 0x24, 0x73, 0xc3, 0x15, 0x46, 0x49, 0x1c, 0x16, 0xa2, 0xd6, 0x98, 0xb9, 0x3d, 0x69, + 0x85, 0x7f, 0xa1, 0x55, 0x48, 0xbe, 0xee, 0x50, 0xde, 0x49, 0xca, 0xfb, 0x3d, 0x47, 0xf3, 0xbe, + 0xd1, 0xa0, 0xcc, 0x33, 0x37, 0x1a, 0xea, 0xc6, 0xa6, 0xb2, 0x5e, 0x5e, 0x53, 0x38, 0x39, 0x3a, + 0x0d, 0xf1, 0xb6, 0xf6, 0xc6, 0x61, 0x78, 0x79, 0xa5, 0x20, 0xb4, 0x04, 0xc5, 0x9e, 0x79, 0x1b, + 0xdb, 0xc6, 0xae, 0x41, 0x86, 0x8a, 0x60, 0x15, 0x83, 0x58, 0x05, 0xbf, 0x74, 0x8d, 0xe0, 0x4f, + 0xa8, 0x1e, 0xa7, 0x21, 0x7e, 0x07, 0x6b, 0xb7, 0xc2, 0x8b, 0x20, 0x05, 0xa1, 0xf3, 0x90, 0x6b, + 0xe1, 0x9d, 0xde, 0x9e, 0x6a, 0xe3, 0x96, 0xa6, 0xbb, 0x61, 0xd3, 0x9f, 0xa5, 0x45, 0x0a, 0x2d, + 0x41, 0x2f, 0x41, 0x86, 0x8c, 0x91, 0x49, 0xc7, 0x78, 0x9a, 0x8a, 0xe0, 0x89, 0xa3, 0x45, 0xc0, + 0x87, 0x58, 0x10, 0x29, 0x3e, 0x3d, 0xba, 0x06, 0x49, 0x57, 0xb3, 0xf7, 0xb0, 0x4b, 0x2d, 0x7f, + 0x61, 0x48, 0xf2, 0x63, 0x08, 0xa7, 0x26, 0xa5, 0xa0, 0x31, 0x2d, 0xa7, 0x7e, 0x17, 0xad, 0xcc, + 0x45, 0x48, 0x50, 0xf5, 0x40, 0x00, 0x5c, 0x41, 0xa4, 0x29, 0x94, 0x86, 0x78, 0x75, 0x53, 0x21, + 0x96, 0x46, 0x82, 0x1c, 0x83, 0xaa, 0x5b, 0xf5, 0x5a, 0xb5, 0x26, 0x45, 0xe5, 0xcb, 0x90, 0x64, + 0x63, 0x4e, 0xac, 0x90, 0x37, 0xea, 0xd2, 0x14, 0xff, 0xe4, 0x3c, 0x22, 0xa2, 0x74, 0x7b, 0xbd, + 0x52, 0x53, 0xa4, 0xa8, 0xbc, 0x0d, 0xc5, 0x3e, 0x39, 0xa1, 0x13, 0x30, 0xad, 0xd4, 0x9a, 0xb5, + 0x0d, 0x12, 0x67, 0xa9, 0xdb, 0x1b, 0x2f, 0x6d, 0x6c, 0xbe, 0x7f, 0x43, 0x9a, 0x0a, 0x83, 0x85, + 0x49, 0x8b, 0xa0, 0x59, 0x90, 0x7c, 0x70, 0x63, 0x73, 0x5b, 0xa1, 0xad, 0xf9, 0xd6, 0x28, 0x48, + 0xfd, 0x52, 0x43, 0xa7, 0x60, 0xa6, 0x59, 0x56, 0x56, 0x6b, 0x4d, 0x95, 0xc5, 0x8e, 0x1e, 0xeb, + 0x59, 0x90, 0x82, 0x05, 0xd7, 0xea, 0x34, 0x34, 0x5e, 0x80, 0x33, 0x41, 0x68, 0xed, 0x95, 0x66, + 0x6d, 0xa3, 0x41, 0x2b, 0x2f, 0x6f, 0xac, 0x12, 0xfb, 0xda, 0xc7, 0x4f, 0x44, 0xab, 0x31, 0xd2, + 0xd4, 0x30, 0xbf, 0xda, 0xda, 0x8a, 0x14, 0xef, 0x07, 0x6f, 0x6e, 0xd4, 0x36, 0xaf, 0x49, 0x89, + 0xfe, 0xda, 0x69, 0x04, 0x9b, 0x44, 0x25, 0x38, 0xd9, 0x0f, 0x55, 0x6b, 0x1b, 0x4d, 0xe5, 0x55, + 0x29, 0xd5, 0x5f, 0x71, 0xa3, 0xa6, 0xdc, 0xac, 0x57, 0x6b, 0x52, 0x1a, 0x9d, 0x04, 0x14, 0x6e, + 0x51, 0xf3, 0xfa, 0xe6, 0x8a, 0x94, 0x19, 0xb0, 0x28, 0xb2, 0x03, 0xb9, 0x60, 0x18, 0xf9, 0x95, + 0xc9, 0x25, 0x7d, 0x2c, 0x0a, 0xd9, 0x40, 0x58, 0x48, 0xfc, 0x79, 0xad, 0xdd, 0xb6, 0xee, 0xa8, + 0x5a, 0xdb, 0xd0, 0x1c, 0x6e, 0x6f, 0x80, 0x82, 0xca, 0x04, 0x32, 0xe9, 0xfc, 0x9e, 0xdc, 0xc2, + 0x27, 0xbf, 0x1a, 0x2d, 0x7c, 0x42, 0x4a, 0xca, 0xdf, 0x1f, 0x01, 0xa9, 0x3f, 0xde, 0xeb, 0xeb, + 0x7e, 0x64, 0x54, 0xf7, 0xbf, 0x22, 0x63, 0xf7, 0x89, 0x08, 0x14, 0xc2, 0x41, 0x5e, 0x5f, 0xf3, + 0xce, 0xfe, 0x99, 0x36, 0xef, 0xb7, 0xa2, 0x90, 0x0f, 0x85, 0x76, 0x93, 0xb6, 0xee, 0x83, 0x30, + 0x6d, 0xb4, 0x70, 0xa7, 0x6b, 0xb9, 0xd8, 0xd4, 0x0f, 0xd5, 0x36, 0xbe, 0x8d, 0xdb, 0x73, 0x32, + 0x35, 0xca, 0x17, 0x8f, 0x0e, 0x1e, 0x97, 0xea, 0x3e, 0xdd, 0x1a, 0x21, 0x5b, 0x9e, 0xa9, 0xaf, + 0xd4, 0xd6, 0xb7, 0x36, 0x9b, 0xb5, 0x8d, 0xea, 0xab, 0xc2, 0xba, 0x28, 0x92, 0xd1, 0x87, 0xf6, + 0x2e, 0x1a, 0xed, 0x2d, 0x90, 0xfa, 0x1b, 0x45, 0x6c, 0xc5, 0x90, 0x66, 0x49, 0x53, 0x68, 0x06, + 0x8a, 0x1b, 0x9b, 0x6a, 0xa3, 0xbe, 0x52, 0x53, 0x6b, 0xd7, 0xae, 0xd5, 0xaa, 0xcd, 0x06, 0x4b, + 0x07, 0x7a, 0xd8, 0x4d, 0x29, 0x1a, 0x14, 0xf1, 0xf7, 0xc5, 0x60, 0x66, 0x48, 0x4b, 0x50, 0x99, + 0x07, 0xf2, 0x2c, 0xb7, 0xf0, 0xc4, 0x24, 0xad, 0x5f, 0x22, 0xae, 0xf4, 0x96, 0x66, 0xbb, 0x3c, + 0xee, 0x7f, 0x14, 0x88, 0x94, 0x4c, 0x97, 0xac, 0xec, 0x36, 0x4f, 0xb3, 0xb2, 0xe8, 0xbe, 0xe8, + 0xc3, 0x59, 0xa6, 0xf5, 0x71, 0x40, 0x5d, 0xcb, 0x31, 0x5c, 0xe3, 0x36, 0x56, 0x0d, 0x53, 0xe4, + 0x64, 0x49, 0xb4, 0x1f, 0x57, 0x24, 0x51, 0x52, 0x37, 0x5d, 0x0f, 0xdb, 0xc4, 0x7b, 0x5a, 0x1f, + 0x36, 0xf1, 0x3c, 0x62, 0x8a, 0x24, 0x4a, 0x3c, 0xec, 0xb3, 0x90, 0x6b, 0x59, 0x3d, 0x12, 0x02, + 0x31, 0x3c, 0x62, 0x2d, 0x22, 0x4a, 0x96, 0xc1, 0x3c, 0x14, 0x1e, 0xdc, 0xfa, 0xc9, 0xe0, 0x9c, + 0x92, 0x65, 0x30, 0x86, 0x72, 0x0e, 0x8a, 0xda, 0xde, 0x9e, 0x4d, 0x98, 0x0b, 0x46, 0x2c, 0x5c, + 0x2f, 0x78, 0x60, 0x8a, 0x58, 0xba, 0x01, 0x69, 0x21, 0x07, 0xe2, 0xc1, 0x12, 0x49, 0xa8, 0x5d, + 0x96, 0x83, 0x8a, 0x9e, 0xcf, 0x28, 0x69, 0x53, 0x14, 0x9e, 0x85, 0x9c, 0xe1, 0xa8, 0xfe, 0xde, + 0x56, 0x74, 0x31, 0x7a, 0x3e, 0xad, 0x64, 0x0d, 0xc7, 0xdb, 0x17, 0x90, 0x7f, 0x34, 0x0a, 0x85, + 0xf0, 0xae, 0x1d, 0x5a, 0x81, 0x74, 0xdb, 0xd2, 0x35, 0xaa, 0x5a, 0x6c, 0xcb, 0xf8, 0xfc, 0x98, + 0x8d, 0xbe, 0xa5, 0x35, 0x8e, 0xaf, 0x78, 0x94, 0xa5, 0x7f, 0x13, 0x81, 0xb4, 0x00, 0xa3, 0x93, + 0x10, 0xef, 0x6a, 0xee, 0x3e, 0x65, 0x97, 0xa8, 0x44, 0xa5, 0x88, 0x42, 0xbf, 0x09, 0xdc, 0xe9, + 0x6a, 0x26, 0x55, 0x01, 0x0e, 0x27, 0xdf, 0x64, 0x5c, 0xdb, 0x58, 0x6b, 0xd1, 0x5c, 0x80, 0xd5, + 0xe9, 0x60, 0xd3, 0x75, 0xc4, 0xb8, 0x72, 0x78, 0x95, 0x83, 0xd1, 0x63, 0x30, 0xed, 0xda, 0x9a, + 0xd1, 0x0e, 0xe1, 0xc6, 0x29, 0xae, 0x24, 0x0a, 0x3c, 0xe4, 0x65, 0x38, 0x2d, 0xf8, 0xb6, 0xb0, + 0xab, 0xe9, 0xfb, 0xb8, 0xe5, 0x13, 0x25, 0x69, 0xce, 0xef, 0x14, 0x47, 0x58, 0xe1, 0xe5, 0x82, + 0x56, 0xfe, 0x6c, 0x14, 0xa6, 0x45, 0xf6, 0xa2, 0xe5, 0x09, 0x6b, 0x1d, 0x40, 0x33, 0x4d, 0xcb, + 0x0d, 0x8a, 0x6b, 0x50, 0x95, 0x07, 0xe8, 0x96, 0xca, 0x1e, 0x91, 0x12, 0x60, 0x50, 0xfa, 0xbd, + 0x08, 0x80, 0x5f, 0x34, 0x52, 0x6e, 0x0b, 0x90, 0xe5, 0x7b, 0xb2, 0x74, 0x63, 0x9f, 0x25, 0xbc, + 0x80, 0x81, 0xae, 0x19, 0x6d, 0x9a, 0x96, 0xdc, 0xc1, 0x7b, 0x86, 0xc9, 0xf7, 0x53, 0xd8, 0x87, + 0x48, 0x4b, 0xc6, 0xfd, 0xed, 0x29, 0x05, 0xd2, 0x0e, 0xee, 0x68, 0xa6, 0x6b, 0xe8, 0x7c, 0x87, + 0xe4, 0xca, 0xb1, 0x1a, 0xbf, 0xd4, 0xe0, 0xd4, 0x8a, 0xc7, 0x47, 0x3e, 0x0f, 0x69, 0x01, 0x25, + 0x8e, 0xdf, 0xc6, 0xe6, 0x46, 0x4d, 0x9a, 0x42, 0x29, 0x88, 0x35, 0x6a, 0x4d, 0x29, 0x42, 0xc2, + 0xce, 0xf2, 0x5a, 0xbd, 0xdc, 0x90, 0xa2, 0x95, 0xbf, 0x02, 0x33, 0xba, 0xd5, 0xe9, 0xaf, 0xb0, + 0x22, 0xf5, 0xa5, 0xfc, 0x9c, 0xeb, 0x91, 0xd7, 0x9e, 0xe0, 0x48, 0x7b, 0x56, 0x5b, 0x33, 0xf7, + 0x96, 0x2c, 0x7b, 0xcf, 0x3f, 0x16, 0x41, 0xa2, 0x03, 0x27, 0x70, 0x38, 0xa2, 0xbb, 0xf3, 0xa7, + 0x91, 0xc8, 0x0f, 0x46, 0x63, 0xab, 0x5b, 0x95, 0x1f, 0x8f, 0x96, 0x56, 0x19, 0xe1, 0x96, 0xe8, + 0x8e, 0x82, 0x77, 0xdb, 0x58, 0x27, 0x8d, 0x87, 0xdf, 0x7f, 0x0c, 0x66, 0xf7, 0xac, 0x3d, 0x8b, + 0x72, 0xba, 0x48, 0x7e, 0xf1, 0x73, 0x15, 0x19, 0x0f, 0x5a, 0x1a, 0x7b, 0x08, 0x63, 0x79, 0x03, + 0x66, 0x38, 0xb2, 0x4a, 0xb7, 0x6f, 0x59, 0x72, 0x01, 0x1d, 0x99, 0xd9, 0x9e, 0xfb, 0xc9, 0xdf, + 0xa1, 0x5e, 0x89, 0x32, 0xcd, 0x49, 0x49, 0x19, 0xcb, 0x3f, 0x2c, 0x2b, 0x70, 0x22, 0xc4, 0x8f, + 0xd9, 0x08, 0x6c, 0x8f, 0xe1, 0xf8, 0xcf, 0x39, 0xc7, 0x99, 0x00, 0xc7, 0x06, 0x27, 0x5d, 0xae, + 0x42, 0xfe, 0x38, 0xbc, 0xfe, 0x05, 0xe7, 0x95, 0xc3, 0x41, 0x26, 0xab, 0x50, 0xa4, 0x4c, 0xf4, + 0x9e, 0xe3, 0x5a, 0x1d, 0x6a, 0x80, 0x8f, 0x66, 0xf3, 0x2f, 0x7f, 0x87, 0x4d, 0xda, 0x02, 0x21, + 0xab, 0x7a, 0x54, 0xcb, 0xcb, 0x40, 0x77, 0xac, 0x5b, 0x58, 0x6f, 0x8f, 0xe1, 0xf0, 0x2b, 0xbc, + 0x21, 0x1e, 0xfe, 0xf2, 0x4d, 0x98, 0x25, 0xbf, 0xa9, 0x7d, 0x0c, 0xb6, 0x64, 0x7c, 0x1a, 0x7c, + 0xee, 0xdf, 0x7d, 0x98, 0xd9, 0x85, 0x19, 0x8f, 0x41, 0xa0, 0x4d, 0x81, 0x51, 0xdc, 0xc3, 0xae, + 0x8b, 0x6d, 0x47, 0xd5, 0xda, 0xc3, 0x9a, 0x17, 0xc8, 0x23, 0xce, 0x7d, 0xef, 0x17, 0xc3, 0xa3, + 0xb8, 0xca, 0x28, 0xcb, 0xed, 0xf6, 0xf2, 0x36, 0x9c, 0x1a, 0xa2, 0x15, 0x13, 0xf0, 0xfc, 0x3e, + 0xce, 0x73, 0x76, 0x40, 0x33, 0x08, 0xdb, 0x2d, 0x10, 0x70, 0x6f, 0x2c, 0x27, 0xe0, 0xf9, 0x71, + 0xce, 0x13, 0x71, 0x5a, 0x31, 0xa4, 0x84, 0xe3, 0x0d, 0x98, 0xbe, 0x8d, 0xed, 0x1d, 0xcb, 0xe1, + 0xb9, 0xdb, 0x09, 0xd8, 0x7d, 0x82, 0xb3, 0x2b, 0x72, 0x42, 0x9a, 0xcc, 0x25, 0xbc, 0x9e, 0x87, + 0xf4, 0xae, 0xa6, 0xe3, 0x09, 0x58, 0xdc, 0xe3, 0x2c, 0x52, 0x04, 0x9f, 0x90, 0x96, 0x21, 0xb7, + 0x67, 0xf1, 0x25, 0x72, 0x3c, 0xf9, 0xf7, 0x73, 0xf2, 0xac, 0xa0, 0xe1, 0x2c, 0xba, 0x56, 0xb7, + 0xd7, 0x26, 0xeb, 0xe7, 0x78, 0x16, 0x3f, 0x20, 0x58, 0x08, 0x1a, 0xce, 0xe2, 0x18, 0x62, 0xfd, + 0xa4, 0x60, 0xe1, 0x04, 0xe4, 0xf9, 0x22, 0x64, 0x2d, 0xb3, 0x7d, 0x68, 0x99, 0x93, 0x34, 0xe2, + 0x53, 0x9c, 0x03, 0x70, 0x12, 0xc2, 0xe0, 0x2a, 0x64, 0x26, 0x1d, 0x88, 0x1f, 0xfe, 0xa2, 0x98, + 0x1e, 0x62, 0x04, 0x56, 0xa1, 0x28, 0x0c, 0x94, 0x61, 0x99, 0x13, 0xb0, 0xf8, 0x11, 0xce, 0xa2, + 0x10, 0x20, 0xe3, 0xdd, 0x70, 0xb1, 0xe3, 0xee, 0xe1, 0x49, 0x98, 0xfc, 0xa8, 0xe8, 0x06, 0x27, + 0xe1, 0xa2, 0xdc, 0xc1, 0xa6, 0xbe, 0x3f, 0x19, 0x87, 0x4f, 0x0b, 0x51, 0x0a, 0x1a, 0xc2, 0xa2, + 0x0a, 0xf9, 0x8e, 0x66, 0x3b, 0xfb, 0x5a, 0x7b, 0xa2, 0xe1, 0xf8, 0x31, 0xce, 0x23, 0xe7, 0x11, + 0x71, 0x89, 0xf4, 0xcc, 0xe3, 0xb0, 0xf9, 0x71, 0x21, 0x91, 0x00, 0x19, 0x9f, 0x7a, 0x8e, 0x4b, + 0x13, 0xdd, 0xc7, 0xe1, 0xf6, 0xb7, 0xc5, 0xd4, 0x63, 0xb4, 0xeb, 0x41, 0x8e, 0x57, 0x21, 0xe3, + 0x18, 0x6f, 0x4c, 0xc4, 0xe6, 0xef, 0x88, 0x91, 0xa6, 0x04, 0x84, 0xf8, 0x55, 0x38, 0x3d, 0x74, + 0x99, 0x98, 0x80, 0xd9, 0xdf, 0xe5, 0xcc, 0x4e, 0x0e, 0x59, 0x2a, 0xb8, 0x49, 0x38, 0x2e, 0xcb, + 0xbf, 0x27, 0x4c, 0x02, 0xee, 0xe3, 0xb5, 0x45, 0x82, 0x16, 0x47, 0xdb, 0x3d, 0x9e, 0xd4, 0xfe, + 0xbe, 0x90, 0x1a, 0xa3, 0x0d, 0x49, 0xad, 0x09, 0x27, 0x39, 0xc7, 0xe3, 0x8d, 0xeb, 0x4f, 0x08, + 0xc3, 0xca, 0xa8, 0xb7, 0xc3, 0xa3, 0xfb, 0x35, 0x50, 0xf2, 0xc4, 0x29, 0xbc, 0x63, 0x47, 0xed, + 0x68, 0xdd, 0x09, 0x38, 0xff, 0x24, 0xe7, 0x2c, 0x2c, 0xbe, 0xe7, 0x5e, 0x3b, 0xeb, 0x5a, 0x97, + 0x30, 0x7f, 0x05, 0xe6, 0x04, 0xf3, 0x9e, 0x69, 0x63, 0xdd, 0xda, 0x33, 0x8d, 0x37, 0x70, 0x6b, + 0x02, 0xd6, 0x3f, 0xd5, 0x37, 0x54, 0xdb, 0x01, 0x72, 0xc2, 0xb9, 0x0e, 0x92, 0xe7, 0xab, 0xa8, + 0x46, 0xa7, 0x6b, 0xd9, 0xee, 0x18, 0x8e, 0x3f, 0x2d, 0x46, 0xca, 0xa3, 0xab, 0x53, 0xb2, 0xe5, + 0x1a, 0xb0, 0xd3, 0x1f, 0x93, 0xaa, 0xe4, 0x67, 0x38, 0xa3, 0xbc, 0x4f, 0xc5, 0x0d, 0x87, 0x6e, + 0x75, 0xba, 0x9a, 0x3d, 0x89, 0xfd, 0xfb, 0x07, 0xc2, 0x70, 0x70, 0x12, 0x6e, 0x38, 0x88, 0x47, + 0x47, 0x56, 0xfb, 0x09, 0x38, 0xfc, 0x8c, 0x30, 0x1c, 0x82, 0x86, 0xb3, 0x10, 0x0e, 0xc3, 0x04, + 0x2c, 0x7e, 0x56, 0xb0, 0x10, 0x34, 0x84, 0xc5, 0xcb, 0xfe, 0x42, 0x6b, 0xe3, 0x3d, 0xc3, 0x71, + 0x6d, 0xe6, 0x92, 0x1f, 0xcd, 0xea, 0xe7, 0xbe, 0x18, 0x76, 0xc2, 0x94, 0x00, 0x29, 0xb1, 0x44, + 0x7c, 0xeb, 0x83, 0x86, 0x6c, 0xe3, 0x1b, 0xf6, 0xf3, 0xc2, 0x12, 0x05, 0xc8, 0x48, 0xdb, 0x02, + 0x1e, 0x22, 0x11, 0xbb, 0x4e, 0x02, 0x95, 0x09, 0xd8, 0xfd, 0xc3, 0xbe, 0xc6, 0x35, 0x04, 0x2d, + 0xe1, 0x19, 0xf0, 0x7f, 0x7a, 0xe6, 0x2d, 0x7c, 0x38, 0x91, 0x76, 0xfe, 0x42, 0x9f, 0xff, 0xb3, + 0xcd, 0x28, 0x99, 0x0d, 0x29, 0xf6, 0xf9, 0x53, 0x68, 0xdc, 0x59, 0xbf, 0xb9, 0x6f, 0x78, 0x9b, + 0xf7, 0x37, 0xec, 0x4e, 0x2d, 0xaf, 0x11, 0x25, 0x0f, 0x3b, 0x3d, 0xe3, 0x99, 0x7d, 0xf8, 0x6d, + 0x4f, 0xcf, 0x43, 0x3e, 0xcf, 0xf2, 0x35, 0xc8, 0x87, 0x1c, 0x9e, 0xf1, 0xac, 0xbe, 0x91, 0xb3, + 0xca, 0x05, 0xfd, 0x9d, 0xe5, 0xcb, 0x10, 0x27, 0xce, 0xcb, 0x78, 0xf2, 0x6f, 0xe2, 0xe4, 0x14, + 0x7d, 0xf9, 0x05, 0x48, 0x0b, 0xa7, 0x65, 0x3c, 0xe9, 0x5f, 0xe3, 0xa4, 0x1e, 0x09, 0x21, 0x17, + 0x0e, 0xcb, 0x78, 0xf2, 0xbf, 0x2e, 0xc8, 0x05, 0x09, 0x21, 0x9f, 0x5c, 0x84, 0xbf, 0xf4, 0x2d, + 0x71, 0xbe, 0xe8, 0x08, 0xd9, 0x5d, 0x85, 0x14, 0xf7, 0x54, 0xc6, 0x53, 0x7f, 0x33, 0xaf, 0x5c, + 0x50, 0x2c, 0x3f, 0x0b, 0x89, 0x09, 0x05, 0xfe, 0x6d, 0x9c, 0x94, 0xe1, 0x2f, 0x57, 0x21, 0x1b, + 0xf0, 0x4e, 0xc6, 0x93, 0x7f, 0x3b, 0x27, 0x0f, 0x52, 0x91, 0xa6, 0x73, 0xef, 0x64, 0x3c, 0x83, + 0xbf, 0x21, 0x9a, 0xce, 0x29, 0x88, 0xd8, 0x84, 0x63, 0x32, 0x9e, 0xfa, 0xa3, 0x42, 0xea, 0x82, + 0x64, 0xf9, 0x45, 0xc8, 0x78, 0x8b, 0xcd, 0x78, 0xfa, 0xef, 0xe0, 0xf4, 0x3e, 0x0d, 0x91, 0x40, + 0x60, 0xb1, 0x1b, 0xcf, 0xe2, 0x6f, 0x0a, 0x09, 0x04, 0xa8, 0xc8, 0x34, 0xea, 0x77, 0x60, 0xc6, + 0x73, 0xfa, 0x4e, 0x31, 0x8d, 0xfa, 0xfc, 0x17, 0x32, 0x9a, 0xd4, 0xe6, 0x8f, 0x67, 0xf1, 0x5d, + 0x62, 0x34, 0x29, 0x3e, 0x69, 0x46, 0xbf, 0x47, 0x30, 0x9e, 0xc7, 0xf7, 0x88, 0x66, 0xf4, 0x39, + 0x04, 0xcb, 0x5b, 0x80, 0x06, 0xbd, 0x81, 0xf1, 0xfc, 0x3e, 0xc6, 0xf9, 0x4d, 0x0f, 0x38, 0x03, + 0xcb, 0xef, 0x87, 0x93, 0xc3, 0x3d, 0x81, 0xf1, 0x5c, 0xbf, 0xf7, 0xed, 0xbe, 0xd8, 0x2d, 0xe8, + 0x08, 0x2c, 0x37, 0xfd, 0x25, 0x25, 0xe8, 0x05, 0x8c, 0x67, 0xfb, 0x7d, 0x6f, 0x87, 0x0d, 0x77, + 0xd0, 0x09, 0x58, 0x2e, 0x03, 0xf8, 0x0b, 0xf0, 0x78, 0x5e, 0x9f, 0xe0, 0xbc, 0x02, 0x44, 0x64, + 0x6a, 0xf0, 0xf5, 0x77, 0x3c, 0xfd, 0x3d, 0x31, 0x35, 0x38, 0x05, 0x99, 0x1a, 0x62, 0xe9, 0x1d, + 0x4f, 0xfd, 0xfd, 0x62, 0x6a, 0x08, 0x12, 0xa2, 0xd9, 0x81, 0xd5, 0x6d, 0x3c, 0x87, 0x4f, 0x09, + 0xcd, 0x0e, 0x50, 0x2d, 0x6f, 0xc0, 0xf4, 0xc0, 0x82, 0x38, 0x9e, 0xd5, 0x0f, 0x72, 0x56, 0x52, + 0xff, 0x7a, 0x18, 0x5c, 0xbc, 0xf8, 0x62, 0x38, 0x9e, 0xdb, 0x0f, 0xf5, 0x2d, 0x5e, 0x7c, 0x2d, + 0x5c, 0xbe, 0x0a, 0x69, 0xb3, 0xd7, 0x6e, 0x93, 0xc9, 0x83, 0x8e, 0x3e, 0x9f, 0x3b, 0xf7, 0x5f, + 0xbf, 0xc4, 0xa5, 0x23, 0x08, 0x96, 0x2f, 0x43, 0x02, 0x77, 0x76, 0x70, 0x6b, 0x1c, 0xe5, 0x17, + 0xbe, 0x24, 0x0c, 0x26, 0xc1, 0x5e, 0x7e, 0x11, 0x80, 0xa5, 0x46, 0xe8, 0xc6, 0xf9, 0x18, 0xda, + 0xdf, 0xfb, 0x12, 0x3f, 0x10, 0xe7, 0x93, 0xf8, 0x0c, 0xd8, 0xf1, 0xba, 0xa3, 0x19, 0x7c, 0x31, + 0xcc, 0x80, 0x8e, 0xc8, 0xf3, 0x90, 0x7a, 0xdd, 0xb1, 0x4c, 0x57, 0xdb, 0x1b, 0x47, 0xfd, 0xfb, + 0x9c, 0x5a, 0xe0, 0x13, 0x81, 0x75, 0x2c, 0x1b, 0xbb, 0xda, 0x9e, 0x33, 0x8e, 0xf6, 0xbf, 0x71, + 0x5a, 0x8f, 0x80, 0x10, 0xeb, 0x9a, 0xe3, 0x4e, 0xd2, 0xef, 0xff, 0x2e, 0x88, 0x05, 0x01, 0x69, + 0x34, 0xf9, 0x7d, 0x0b, 0x1f, 0x8e, 0xa3, 0xfd, 0x03, 0xd1, 0x68, 0x8e, 0xbf, 0xfc, 0x02, 0x64, + 0xc8, 0x4f, 0x76, 0xca, 0x75, 0x0c, 0xf1, 0x1f, 0x72, 0x62, 0x9f, 0x82, 0xd4, 0xec, 0xb8, 0x2d, + 0xd7, 0x18, 0x2f, 0xec, 0x3f, 0xe2, 0x23, 0x2d, 0xf0, 0x97, 0xcb, 0x90, 0x75, 0xdc, 0x56, 0xab, + 0xc7, 0xfd, 0xd3, 0x31, 0xe4, 0x7f, 0xfc, 0x25, 0x2f, 0x65, 0xe1, 0xd1, 0x90, 0xd1, 0xbe, 0x73, + 0xcb, 0xed, 0x5a, 0x74, 0xbf, 0x65, 0x1c, 0x87, 0xb7, 0x39, 0x87, 0x00, 0xc9, 0x72, 0x15, 0x72, + 0xa4, 0x2f, 0x36, 0xee, 0x62, 0xba, 0x39, 0x36, 0x86, 0xc5, 0x9f, 0x70, 0x01, 0x84, 0x88, 0x2a, + 0x5f, 0xff, 0x2b, 0x6f, 0xcd, 0x47, 0x3e, 0xfb, 0xd6, 0x7c, 0xe4, 0xb7, 0xde, 0x9a, 0x8f, 0x7c, + 0xf4, 0x73, 0xf3, 0x53, 0x9f, 0xfd, 0xdc, 0xfc, 0xd4, 0x6f, 0x7c, 0x6e, 0x7e, 0x6a, 0x78, 0x96, + 0x18, 0x56, 0xad, 0x55, 0x8b, 0xe5, 0x87, 0x5f, 0x7b, 0x78, 0xcf, 0x70, 0xf7, 0x7b, 0x3b, 0x4b, + 0xba, 0xd5, 0xb9, 0xa8, 0x5b, 0x4e, 0xc7, 0x72, 0x2e, 0x86, 0xf3, 0xba, 0xf4, 0x17, 0xfc, 0xef, + 0x08, 0x89, 0x99, 0xc3, 0xe9, 0x5c, 0xcd, 0x3c, 0x1c, 0x75, 0x99, 0xee, 0x0a, 0xc4, 0xca, 0xe6, + 0x21, 0x3a, 0xcd, 0x0c, 0x9c, 0xda, 0xb3, 0xdb, 0xfc, 0xa8, 0x65, 0x8a, 0x7c, 0x6f, 0xdb, 0x6d, + 0x34, 0xeb, 0x9f, 0x87, 0x8e, 0x9c, 0xcf, 0xf1, 0x43, 0xce, 0x95, 0x6f, 0x8f, 0x1c, 0xaf, 0x27, + 0xe9, 0xb2, 0x79, 0x48, 0x3b, 0xb2, 0x15, 0x79, 0xed, 0xf1, 0xb1, 0x79, 0xee, 0x5b, 0xa6, 0x75, + 0xc7, 0x24, 0xcd, 0xee, 0xee, 0x88, 0x1c, 0xf7, 0x7c, 0x7f, 0x8e, 0xfb, 0xfd, 0xb8, 0xdd, 0x7e, + 0x89, 0xe0, 0x35, 0x09, 0xc9, 0x4e, 0x92, 0x9d, 0xea, 0x87, 0xef, 0x8c, 0xc2, 0xfc, 0x40, 0x3a, + 0x9b, 0x2b, 0xc1, 0x28, 0x21, 0x2c, 0x43, 0x7a, 0x45, 0xe8, 0xd6, 0x1c, 0xa4, 0x1c, 0xac, 0x5b, + 0x66, 0xcb, 0xa1, 0x82, 0x88, 0x29, 0xe2, 0x93, 0x08, 0xc2, 0xd4, 0x4c, 0xcb, 0xe1, 0x87, 0x95, + 0xd9, 0x47, 0xe5, 0xe3, 0xc7, 0x14, 0x44, 0x5e, 0xd4, 0x24, 0xa4, 0xf1, 0xd4, 0x84, 0xd2, 0x10, + 0x9d, 0x08, 0x65, 0xfe, 0x27, 0x95, 0xca, 0xf7, 0x44, 0x61, 0xa1, 0x5f, 0x2a, 0x64, 0x66, 0x39, + 0xae, 0xd6, 0xe9, 0x8e, 0x12, 0xcb, 0x55, 0xc8, 0x34, 0x05, 0xce, 0xb1, 0xe5, 0x72, 0xef, 0x98, + 0x72, 0x29, 0x78, 0x55, 0x09, 0xc1, 0x5c, 0x9a, 0x50, 0x30, 0x5e, 0x3f, 0xee, 0x4b, 0x32, 0xff, + 0x2b, 0x09, 0xa7, 0xd9, 0x74, 0x52, 0xd9, 0x54, 0x62, 0x1f, 0x5c, 0x26, 0xb9, 0x60, 0xd1, 0xf8, + 0x7d, 0x12, 0xf9, 0x25, 0x98, 0xa9, 0x13, 0x6b, 0x41, 0xa2, 0x20, 0x7f, 0x87, 0x67, 0xe8, 0x79, + 0xee, 0xc5, 0x90, 0xc3, 0xcf, 0xf7, 0xb7, 0x82, 0x20, 0xf9, 0x1b, 0x22, 0x20, 0x35, 0x74, 0xad, + 0xad, 0xd9, 0x5f, 0x2e, 0x2b, 0xf4, 0x2c, 0x00, 0x3b, 0xee, 0xe1, 0x5d, 0xdc, 0x2b, 0x5c, 0x9a, + 0x5b, 0x0a, 0x76, 0x6e, 0x89, 0xd5, 0x44, 0x4f, 0x50, 0x65, 0x28, 0x2e, 0xf9, 0x79, 0xe1, 0x15, + 0x00, 0xbf, 0x00, 0x9d, 0x81, 0x53, 0x8d, 0x6a, 0x79, 0xad, 0xac, 0x88, 0x43, 0x42, 0x8d, 0xad, + 0x5a, 0xb5, 0x7e, 0xad, 0x5e, 0x5b, 0x91, 0xa6, 0xd0, 0x49, 0x40, 0xc1, 0x42, 0xef, 0x50, 0xd3, + 0x09, 0x98, 0x0e, 0xc2, 0xd9, 0x2d, 0x95, 0x28, 0xf1, 0x14, 0x8d, 0x4e, 0xb7, 0x8d, 0xe9, 0xce, + 0xa3, 0x6a, 0x08, 0xa9, 0x8d, 0x77, 0x42, 0x7e, 0xf5, 0xdf, 0xb3, 0x9b, 0x0b, 0x33, 0x3e, 0xb9, + 0x27, 0xf3, 0xe5, 0x35, 0x98, 0xd6, 0x74, 0x1d, 0x77, 0x43, 0x2c, 0xc7, 0x98, 0x6a, 0xc2, 0x90, + 0xee, 0xa5, 0x72, 0x4a, 0x9f, 0xdb, 0xb3, 0x90, 0x74, 0x68, 0xef, 0xc7, 0xb1, 0xf8, 0x35, 0xce, + 0x82, 0xa3, 0x2f, 0x9b, 0x30, 0x4d, 0x3c, 0x3f, 0xcd, 0xc6, 0x81, 0x66, 0x1c, 0x9d, 0x67, 0xf8, + 0x47, 0x3f, 0xfd, 0x24, 0xdd, 0x59, 0x3d, 0x1b, 0x1e, 0x96, 0x21, 0xea, 0xa4, 0x48, 0x9c, 0xb7, + 0xdf, 0x50, 0x0c, 0x05, 0x51, 0x1f, 0x6f, 0xf0, 0xd1, 0x95, 0xfd, 0x22, 0xaf, 0x6c, 0x7e, 0x98, + 0x0e, 0x04, 0x6a, 0xca, 0x73, 0xae, 0xac, 0xa0, 0x52, 0x1b, 0x35, 0xa7, 0x5f, 0x7b, 0x6c, 0x70, + 0x75, 0x62, 0xff, 0x3d, 0x41, 0x39, 0x5f, 0x0d, 0x56, 0xe3, 0xcd, 0xbd, 0x8f, 0xc7, 0x61, 0x5a, + 0xeb, 0x18, 0xa6, 0x75, 0x91, 0xfe, 0xcb, 0xe7, 0x5c, 0x82, 0x7e, 0x4c, 0xb0, 0x29, 0x79, 0x85, + 0x4d, 0x85, 0xf1, 0x1a, 0xf3, 0x87, 0xdf, 0xfa, 0x23, 0x09, 0x7f, 0xba, 0x2c, 0xaf, 0x83, 0x24, + 0x0e, 0xf1, 0x62, 0x53, 0xb7, 0x5a, 0x13, 0x65, 0x29, 0xfe, 0x48, 0xf0, 0x10, 0xf9, 0xad, 0x1a, + 0x27, 0x5d, 0x7e, 0x2f, 0xa4, 0x3d, 0x36, 0xe3, 0x3c, 0x13, 0xc1, 0xc4, 0xa3, 0x20, 0x7e, 0x09, + 0x9b, 0x99, 0x93, 0x78, 0xa1, 0x6f, 0x0b, 0x7a, 0x36, 0x43, 0x37, 0x48, 0x6f, 0x56, 0xa1, 0xd0, + 0xb2, 0x4c, 0x57, 0xb5, 0x3a, 0x86, 0x8b, 0x3b, 0x5d, 0x77, 0xac, 0x5f, 0xf7, 0x27, 0x8c, 0x49, + 0x5a, 0xc9, 0x13, 0xba, 0x4d, 0x41, 0x46, 0x5a, 0xc2, 0xee, 0xe9, 0x4d, 0xd2, 0x92, 0xff, 0xe1, + 0xb5, 0x84, 0xd2, 0x90, 0x96, 0xdc, 0x97, 0x76, 0x38, 0xad, 0x5b, 0xdc, 0x98, 0xbb, 0x07, 0x4c, + 0x0b, 0x3c, 0xed, 0xf8, 0xa7, 0x71, 0x98, 0xe7, 0xc8, 0x3b, 0x9a, 0x83, 0x2f, 0xde, 0x7e, 0x6a, + 0x07, 0xbb, 0xda, 0x53, 0x17, 0x75, 0xcb, 0x10, 0x2b, 0xf9, 0x0c, 0x37, 0xd6, 0xa4, 0x7c, 0x89, + 0x97, 0x97, 0x86, 0x6e, 0x77, 0x97, 0x46, 0x1b, 0xf9, 0xd2, 0xa0, 0x0e, 0xca, 0x6d, 0x88, 0x57, + 0x2d, 0xc3, 0x24, 0x6b, 0x5b, 0x0b, 0x9b, 0x56, 0x87, 0x9b, 0x5b, 0xf6, 0x81, 0xae, 0x43, 0x52, + 0xeb, 0x58, 0x3d, 0xd3, 0x65, 0xa6, 0xb6, 0xf2, 0xe4, 0xaf, 0xbc, 0xb9, 0x30, 0xf5, 0x9f, 0xde, + 0x5c, 0x38, 0xc1, 0xd8, 0x3a, 0xad, 0x5b, 0x4b, 0x86, 0x75, 0xb1, 0xa3, 0xb9, 0xfb, 0x64, 0xfa, + 0xfe, 0xfa, 0x67, 0x9e, 0x00, 0x5e, 0x5f, 0xdd, 0x74, 0x3f, 0xfd, 0xbb, 0x3f, 0x71, 0x21, 0xa2, + 0x70, 0xfa, 0xe5, 0xf8, 0xe7, 0x3f, 0xb9, 0x10, 0x91, 0xbb, 0x90, 0x5a, 0xc1, 0xfa, 0x11, 0x15, + 0xd6, 0xfb, 0x2a, 0x7c, 0x8a, 0x57, 0x78, 0x66, 0xb0, 0x42, 0x76, 0x60, 0x6f, 0x05, 0xeb, 0x81, + 0x6a, 0x57, 0xb0, 0xde, 0x57, 0x63, 0x1d, 0xd2, 0x75, 0xd3, 0x65, 0x97, 0x8d, 0x5e, 0x80, 0x98, + 0x61, 0xb2, 0xf3, 0xeb, 0x99, 0xca, 0x63, 0xc7, 0xe8, 0x8a, 0x42, 0xe8, 0xe4, 0x4d, 0x48, 0xaf, + 0x60, 0x9d, 0xb1, 0xaa, 0x42, 0xac, 0x85, 0x75, 0xce, 0xea, 0x3e, 0x1a, 0x49, 0xa8, 0x2b, 0x2b, + 0xbf, 0xf1, 0xdb, 0xf3, 0x53, 0x1f, 0x7a, 0x6b, 0x7e, 0x6a, 0xa4, 0x3a, 0xc9, 0xe3, 0xd5, 0xc9, + 0xd3, 0xa2, 0x1f, 0x89, 0xc3, 0x83, 0xf4, 0xb6, 0xaa, 0xdd, 0x31, 0x4c, 0xf7, 0xa2, 0x6e, 0x1f, + 0x76, 0x5d, 0x8b, 0x18, 0x15, 0x6b, 0x97, 0x2b, 0xd1, 0xb4, 0x5f, 0xbc, 0xc4, 0x8a, 0x87, 0xab, + 0x90, 0xbc, 0x0b, 0x89, 0x2d, 0x42, 0x47, 0x06, 0xc9, 0xb5, 0x5c, 0xad, 0xcd, 0x3d, 0x21, 0xf6, + 0x41, 0xa0, 0xec, 0x86, 0x6b, 0x94, 0x41, 0x0d, 0x71, 0xb9, 0xb5, 0x8d, 0xb5, 0x5d, 0x76, 0x51, + 0x28, 0x46, 0x5d, 0xe8, 0x34, 0x01, 0xd0, 0x3b, 0x41, 0xb3, 0x90, 0xd0, 0x7a, 0xec, 0x30, 0x4f, + 0x8c, 0xf8, 0xd6, 0xf4, 0x43, 0x7e, 0x09, 0x52, 0x7c, 0x4f, 0x1f, 0x49, 0x10, 0xbb, 0x85, 0x0f, + 0x69, 0x3d, 0x39, 0x85, 0xfc, 0x44, 0x4b, 0x90, 0xa0, 0x8d, 0xe7, 0x37, 0x20, 0xe7, 0x96, 0x06, + 0x5a, 0xbf, 0x44, 0x1b, 0xa9, 0x30, 0x34, 0xf9, 0x06, 0xa4, 0x57, 0x2c, 0xa2, 0xd9, 0x61, 0x6e, + 0x19, 0xc6, 0x8d, 0xb6, 0xb9, 0xdb, 0xe3, 0x7a, 0xa5, 0xb0, 0x0f, 0x74, 0x12, 0x92, 0xec, 0xe2, + 0x18, 0x3f, 0x90, 0xc4, 0xbf, 0xe4, 0x2a, 0xa4, 0x28, 0xef, 0xcd, 0x2e, 0x71, 0x43, 0xbc, 0xb3, + 0xf4, 0x19, 0x7e, 0x8d, 0x98, 0xb3, 0x8f, 0xfa, 0x8d, 0x45, 0x10, 0x6f, 0x69, 0xae, 0xc6, 0xfb, + 0x4d, 0x7f, 0xcb, 0xef, 0x83, 0x34, 0x67, 0xe2, 0xa0, 0x4b, 0x10, 0xb3, 0xba, 0x0e, 0x3f, 0x52, + 0x54, 0x1a, 0xd5, 0x95, 0xcd, 0x6e, 0x25, 0x4e, 0x74, 0x49, 0x21, 0xc8, 0x95, 0x8d, 0x91, 0x6a, + 0xf1, 0x4c, 0x48, 0x2d, 0x3a, 0xd8, 0xdd, 0xd9, 0x75, 0xfd, 0x1f, 0x6c, 0x38, 0x07, 0x54, 0xc1, + 0x53, 0x94, 0x7b, 0x51, 0x98, 0x0f, 0x94, 0xde, 0xc6, 0xb6, 0x63, 0x58, 0x26, 0xd3, 0x26, 0xae, + 0x29, 0x28, 0xd0, 0x40, 0x5e, 0x3e, 0x42, 0x55, 0x5e, 0x80, 0x58, 0xb9, 0xdb, 0x45, 0x25, 0x48, + 0xd3, 0x6f, 0xdd, 0x62, 0xba, 0x12, 0x57, 0xbc, 0x6f, 0x52, 0xe6, 0x58, 0xbb, 0xee, 0x1d, 0xcd, + 0xf6, 0xee, 0x55, 0x8b, 0x6f, 0xf9, 0x79, 0xc8, 0x54, 0x2d, 0xd3, 0xc1, 0xa6, 0xd3, 0xa3, 0xfe, + 0xf5, 0x4e, 0xdb, 0xd2, 0x6f, 0x71, 0x0e, 0xec, 0x83, 0x08, 0x5b, 0xeb, 0x76, 0x29, 0x65, 0x5c, + 0x21, 0x3f, 0xd9, 0xcc, 0xae, 0x6c, 0x8e, 0x14, 0xcf, 0xe5, 0xe3, 0x89, 0x87, 0x77, 0xd0, 0x77, + 0x94, 0x23, 0xf0, 0xc0, 0xe0, 0x44, 0xba, 0x85, 0x0f, 0x9d, 0xe3, 0xce, 0xa3, 0x57, 0x20, 0xb3, + 0x45, 0x9f, 0x3c, 0x79, 0x09, 0x1f, 0xa2, 0x12, 0xa4, 0x70, 0xeb, 0xd2, 0xe5, 0xcb, 0x4f, 0x3d, + 0xcf, 0xb4, 0xfc, 0xfa, 0x94, 0x22, 0x00, 0x68, 0x1e, 0x32, 0x0e, 0xd6, 0xbb, 0x97, 0x2e, 0x5f, + 0xb9, 0xf5, 0x14, 0x53, 0xab, 0xeb, 0x53, 0x8a, 0x0f, 0x5a, 0x4e, 0x93, 0x1e, 0x7f, 0xfe, 0x53, + 0x0b, 0x91, 0x4a, 0x02, 0x62, 0x4e, 0xaf, 0xf3, 0xae, 0xe9, 0xc6, 0x1f, 0x24, 0x61, 0x31, 0x50, + 0xca, 0x16, 0xac, 0xdb, 0x5a, 0xdb, 0x68, 0x69, 0xfe, 0x43, 0x35, 0x52, 0xa0, 0xff, 0x14, 0x63, + 0xc4, 0x4a, 0x74, 0xa4, 0x14, 0xe5, 0x9f, 0x8a, 0x40, 0xee, 0xa6, 0xe0, 0xdc, 0xc0, 0x2e, 0xba, + 0x0a, 0xe0, 0xd5, 0x24, 0xa6, 0xca, 0x99, 0xa5, 0xfe, 0xba, 0x96, 0x3c, 0x1a, 0x25, 0x80, 0x8e, + 0x9e, 0xa5, 0x0a, 0xd8, 0xb5, 0x1c, 0x7e, 0xc7, 0x76, 0x0c, 0xa9, 0x87, 0x8c, 0x1e, 0x07, 0x44, + 0xad, 0x9a, 0x7a, 0xdb, 0x72, 0x0d, 0x73, 0x4f, 0xed, 0x5a, 0x77, 0xf8, 0xcb, 0x05, 0x31, 0x45, + 0xa2, 0x25, 0x37, 0x69, 0xc1, 0x16, 0x81, 0x93, 0x46, 0x67, 0x3c, 0x2e, 0x24, 0x54, 0xd4, 0x5a, + 0x2d, 0x1b, 0x3b, 0x0e, 0x37, 0x5c, 0xe2, 0x13, 0x5d, 0x85, 0x54, 0xb7, 0xb7, 0xa3, 0x0a, 0x2b, + 0x91, 0xbd, 0xf4, 0xc0, 0xb0, 0x39, 0x2f, 0x74, 0x83, 0xcf, 0xfa, 0x64, 0xb7, 0xb7, 0x43, 0x34, + 0xe5, 0x2c, 0xe4, 0x86, 0x34, 0x26, 0x7b, 0xdb, 0x6f, 0x07, 0x7d, 0x65, 0x87, 0xf7, 0x40, 0xed, + 0xda, 0x86, 0x65, 0x1b, 0xee, 0x21, 0x3d, 0x0a, 0x18, 0x53, 0x24, 0x51, 0xb0, 0xc5, 0xe1, 0xf2, + 0x2d, 0x28, 0x36, 0x68, 0x08, 0xe1, 0xb7, 0xfc, 0xb2, 0xdf, 0xbe, 0xc8, 0xf8, 0xf6, 0x8d, 0x6c, + 0x59, 0x74, 0xa0, 0x65, 0x17, 0xfe, 0x43, 0x04, 0xb2, 0x15, 0x32, 0x71, 0xeb, 0x2b, 0xd7, 0xda, + 0xda, 0x1e, 0x7a, 0x0a, 0x4e, 0x54, 0xd6, 0x36, 0xab, 0x2f, 0xa9, 0xf5, 0x15, 0xf5, 0xda, 0x5a, + 0x79, 0xd5, 0x3f, 0x7b, 0x5c, 0x3a, 0x79, 0xf7, 0xde, 0x22, 0x0a, 0xe0, 0x6e, 0x9b, 0x34, 0xce, + 0x45, 0x17, 0x61, 0x36, 0x4c, 0x52, 0xae, 0x34, 0x6a, 0x1b, 0x4d, 0x29, 0x52, 0x3a, 0x71, 0xf7, + 0xde, 0xe2, 0x74, 0x80, 0xa2, 0xbc, 0xe3, 0x60, 0xd3, 0x1d, 0x24, 0xa8, 0x6e, 0xae, 0xaf, 0xd7, + 0x9b, 0x52, 0x74, 0x80, 0xa0, 0x6a, 0x75, 0x3a, 0x86, 0x8b, 0x1e, 0x85, 0xe9, 0x30, 0xc1, 0x46, + 0x7d, 0x4d, 0x8a, 0x95, 0xd0, 0xdd, 0x7b, 0x8b, 0x85, 0x00, 0xf6, 0x86, 0xd1, 0x2e, 0xa5, 0x3f, + 0xf2, 0x43, 0xf3, 0x53, 0x9f, 0xfe, 0x5b, 0xf3, 0x91, 0xca, 0xfa, 0xc8, 0x39, 0xf7, 0xf4, 0xf1, + 0xe6, 0x5c, 0x78, 0xdd, 0xfe, 0xd2, 0x03, 0x21, 0x73, 0xc3, 0x7d, 0xc4, 0x80, 0x31, 0x9e, 0x74, + 0xba, 0x8d, 0xcb, 0x7b, 0x94, 0x8e, 0x76, 0x0f, 0x4a, 0x63, 0x16, 0x85, 0xd2, 0x58, 0xc3, 0x20, + 0x3f, 0x0f, 0xf9, 0x2d, 0xcd, 0x76, 0x1b, 0xd8, 0xbd, 0x8e, 0xb5, 0x16, 0xb6, 0xc3, 0xfe, 0x43, + 0x5e, 0xf8, 0x0f, 0x08, 0xe2, 0xd4, 0x49, 0x60, 0xeb, 0x27, 0xfd, 0x2d, 0xef, 0x43, 0x9c, 0x9e, + 0x72, 0xf6, 0x7c, 0x0b, 0x4e, 0xc1, 0x7c, 0x0b, 0xb2, 0x32, 0x1c, 0xba, 0xd8, 0x11, 0xa9, 0x39, + 0xfa, 0x81, 0x9e, 0x11, 0x1e, 0x42, 0xec, 0x68, 0x0f, 0x81, 0x4f, 0x2f, 0xee, 0x27, 0xb4, 0x21, + 0xc5, 0x87, 0xd8, 0x6b, 0x48, 0xc4, 0x6f, 0x08, 0x5a, 0x87, 0x62, 0x57, 0xb3, 0x5d, 0x7a, 0xeb, + 0x71, 0x9f, 0xf6, 0x82, 0xcf, 0xe0, 0x85, 0x41, 0x7b, 0x12, 0xea, 0x2c, 0xaf, 0x25, 0xdf, 0x0d, + 0x02, 0xe5, 0xff, 0x12, 0x87, 0x24, 0x17, 0xc6, 0x0b, 0x90, 0xe2, 0x62, 0xe5, 0x73, 0xee, 0xc1, + 0xa5, 0xc1, 0x65, 0x76, 0xc9, 0x5b, 0x0e, 0x39, 0x3f, 0x41, 0x83, 0x1e, 0x81, 0xb4, 0xbe, 0xaf, + 0x19, 0xa6, 0x6a, 0xb4, 0xb8, 0x73, 0x9c, 0x7d, 0xeb, 0xcd, 0x85, 0x54, 0x95, 0xc0, 0xea, 0x2b, + 0x4a, 0x8a, 0x16, 0xd6, 0x5b, 0xc4, 0xa7, 0xd9, 0xc7, 0xc6, 0xde, 0xbe, 0xcb, 0xed, 0x06, 0xff, + 0x42, 0xcf, 0x41, 0x9c, 0x28, 0x04, 0xbf, 0x13, 0x5f, 0x1a, 0x88, 0x7a, 0xbc, 0xb4, 0x54, 0x25, + 0x4d, 0x2a, 0xfe, 0xe8, 0x7f, 0x5e, 0x88, 0x28, 0x94, 0x02, 0x55, 0x21, 0xdf, 0xd6, 0x1c, 0x57, + 0xa5, 0xeb, 0x31, 0xa9, 0x3e, 0x41, 0x59, 0x9c, 0x1e, 0x14, 0x08, 0x17, 0x2c, 0x6f, 0x7a, 0x96, + 0x50, 0x31, 0x50, 0x0b, 0x9d, 0x07, 0x89, 0x32, 0xd1, 0xe9, 0x0c, 0x64, 0x5e, 0x62, 0x92, 0xca, + 0xbd, 0x40, 0xe0, 0x6c, 0x62, 0x52, 0x5f, 0xf1, 0x0c, 0x64, 0xe8, 0x2d, 0x5c, 0x8a, 0xc2, 0x8e, + 0xd6, 0xa7, 0x09, 0x80, 0x16, 0x9e, 0x83, 0xa2, 0x6f, 0xf5, 0x19, 0x4a, 0x9a, 0x71, 0xf1, 0xc1, + 0x14, 0xf1, 0x49, 0x98, 0x35, 0xf1, 0x01, 0x3d, 0xec, 0x1f, 0xc2, 0xce, 0x50, 0x6c, 0x44, 0xca, + 0x6e, 0x86, 0x29, 0x1e, 0x86, 0x82, 0x2e, 0x84, 0xcf, 0x70, 0x81, 0xe2, 0xe6, 0x3d, 0x28, 0x45, + 0x3b, 0x0d, 0x69, 0xad, 0xdb, 0x65, 0x08, 0x59, 0x6e, 0xf5, 0xbb, 0x5d, 0x5a, 0x74, 0x01, 0xa6, + 0x69, 0x1f, 0x6d, 0xec, 0xf4, 0xda, 0x2e, 0x67, 0x92, 0xa3, 0x38, 0x45, 0x52, 0xa0, 0x30, 0x38, + 0xc5, 0x7d, 0x08, 0xf2, 0xf8, 0xb6, 0xd1, 0xc2, 0xa6, 0x8e, 0x19, 0x5e, 0x9e, 0xe2, 0xe5, 0x04, + 0x90, 0x22, 0x3d, 0x0a, 0x9e, 0x35, 0x57, 0xc5, 0x4a, 0x53, 0x60, 0xfc, 0x04, 0xbc, 0xcc, 0xc0, + 0xf2, 0x1c, 0xc4, 0x57, 0x34, 0x57, 0x23, 0xee, 0x92, 0x7b, 0xc0, 0x96, 0xcf, 0x9c, 0x42, 0x7e, + 0xca, 0x3f, 0x1b, 0x83, 0xf8, 0x4d, 0xcb, 0xc5, 0xe8, 0xe9, 0x80, 0x2b, 0x5b, 0x18, 0xa6, 0xcf, + 0x0d, 0x63, 0xcf, 0xc4, 0xad, 0x75, 0x67, 0x2f, 0xf0, 0x64, 0x8e, 0xaf, 0x4e, 0xd1, 0x90, 0x3a, + 0xcd, 0x42, 0xc2, 0xb6, 0x7a, 0x66, 0x4b, 0x1c, 0x4a, 0xa7, 0x1f, 0xa8, 0x06, 0x69, 0x4f, 0x4b, + 0xe2, 0xe3, 0xb4, 0xa4, 0x48, 0xb4, 0x84, 0xe8, 0x30, 0x07, 0x28, 0xa9, 0x1d, 0xae, 0x2c, 0x15, + 0xc8, 0x78, 0xc6, 0x8b, 0x6b, 0xdb, 0x64, 0x0a, 0xeb, 0x93, 0x91, 0x25, 0xd2, 0x1b, 0x7b, 0x4f, + 0x78, 0x4c, 0xe3, 0x24, 0xaf, 0x80, 0x4b, 0x2f, 0xa4, 0x56, 0xfc, 0xf9, 0x9e, 0x14, 0xed, 0x97, + 0xaf, 0x56, 0xec, 0x09, 0x9f, 0x07, 0x20, 0xe3, 0x18, 0x7b, 0xa6, 0xe6, 0xf6, 0x6c, 0xcc, 0x35, + 0xcf, 0x07, 0x90, 0x52, 0xff, 0x82, 0x06, 0xd3, 0xb4, 0xc0, 0xab, 0x62, 0x17, 0x61, 0xc6, 0x7f, + 0xcf, 0xcb, 0xe7, 0xc2, 0xb4, 0x0c, 0x79, 0x45, 0x0d, 0x51, 0x22, 0xff, 0x52, 0x04, 0x92, 0x7c, + 0xc5, 0xf2, 0x87, 0x21, 0x32, 0x7c, 0x18, 0xa2, 0xa3, 0x86, 0x21, 0x76, 0xff, 0xc3, 0x50, 0x06, + 0xf0, 0x9a, 0xe9, 0xf0, 0x47, 0x5a, 0x86, 0xb8, 0x55, 0xac, 0x89, 0x0d, 0x63, 0x8f, 0xcf, 0xfb, + 0x00, 0x91, 0xfc, 0x9b, 0x11, 0xe2, 0xe1, 0xf3, 0x72, 0x54, 0x86, 0xbc, 0x68, 0x97, 0xba, 0xdb, + 0xd6, 0xf6, 0xb8, 0x2a, 0x3e, 0x38, 0xb2, 0x71, 0x64, 0x15, 0x56, 0xb2, 0xbc, 0x3d, 0xd4, 0x9f, + 0x18, 0x3a, 0xac, 0xd1, 0x11, 0xc3, 0x1a, 0xd2, 0xa3, 0xd8, 0xfd, 0xe9, 0x51, 0x68, 0xc4, 0xe3, + 0x7d, 0x23, 0x2e, 0xff, 0x76, 0x84, 0xbf, 0x26, 0xd6, 0x62, 0xb7, 0x4b, 0xfe, 0xac, 0x86, 0xea, + 0x35, 0xae, 0x5b, 0x2d, 0xdc, 0x52, 0x07, 0xc6, 0xec, 0xa1, 0x41, 0x8e, 0xe1, 0x36, 0xfb, 0x63, + 0x87, 0x04, 0x97, 0x86, 0x3f, 0x86, 0x9f, 0x89, 0xc2, 0xf4, 0x00, 0xfe, 0x9f, 0xbf, 0xb1, 0x0c, + 0xcf, 0xde, 0xc4, 0x84, 0xb3, 0x37, 0x39, 0x72, 0xf6, 0xfe, 0x74, 0x94, 0x26, 0x00, 0xba, 0x96, + 0xa3, 0xb5, 0xbf, 0x12, 0xb6, 0xf7, 0x0c, 0x64, 0xba, 0x56, 0x5b, 0x65, 0x25, 0xec, 0x5a, 0x50, + 0xba, 0x6b, 0xb5, 0x95, 0x01, 0x35, 0x4b, 0xbc, 0x43, 0x86, 0x39, 0xf9, 0x0e, 0x0c, 0x42, 0xaa, + 0x7f, 0x42, 0xd9, 0x90, 0x63, 0xa2, 0xe0, 0x5e, 0xd3, 0x93, 0x44, 0x06, 0xd4, 0x0d, 0x8b, 0x0c, + 0x7a, 0x79, 0xac, 0xd9, 0x0c, 0x53, 0xe1, 0x78, 0x84, 0x82, 0x39, 0x19, 0xc3, 0x32, 0x47, 0x41, + 0x8b, 0xa5, 0x70, 0x3c, 0xf9, 0xbb, 0x23, 0x00, 0x6b, 0x44, 0xb2, 0xb4, 0xbf, 0xc4, 0xdf, 0x71, + 0x68, 0x13, 0xd4, 0x50, 0xcd, 0xf3, 0xa3, 0x06, 0x8d, 0xd7, 0x9f, 0x73, 0x82, 0xed, 0xae, 0x42, + 0xde, 0xd7, 0x6d, 0x07, 0x8b, 0xc6, 0xcc, 0x1f, 0x11, 0x95, 0x36, 0xb0, 0xab, 0xe4, 0x6e, 0x07, + 0xbe, 0xe4, 0x7f, 0x12, 0x81, 0x0c, 0x6d, 0xd3, 0x3a, 0x76, 0xb5, 0xd0, 0x18, 0x46, 0xee, 0x7f, + 0x0c, 0x1f, 0x04, 0x60, 0x6c, 0x1c, 0xe3, 0x0d, 0xcc, 0x35, 0x2b, 0x43, 0x21, 0x0d, 0xe3, 0x0d, + 0x8c, 0xae, 0x78, 0x02, 0x8f, 0x1d, 0x2d, 0x70, 0x11, 0xb5, 0x72, 0xb1, 0x9f, 0x82, 0x14, 0x7d, + 0xef, 0xf2, 0xc0, 0xe1, 0x81, 0x68, 0xd2, 0xec, 0x75, 0x9a, 0x07, 0x8e, 0xfc, 0x3a, 0xa4, 0x9a, + 0x07, 0x2c, 0x9f, 0x78, 0x06, 0x32, 0xb6, 0x65, 0x71, 0xef, 0x8f, 0x79, 0xdd, 0x69, 0x02, 0xa0, + 0xce, 0x8e, 0xc8, 0xa1, 0x45, 0xfd, 0x1c, 0x9a, 0x9f, 0x04, 0x8c, 0x4d, 0x94, 0x04, 0x24, 0xd1, + 0x67, 0x3e, 0x34, 0x93, 0xd0, 0xe3, 0x70, 0xaa, 0x51, 0x5f, 0xdd, 0xa8, 0xad, 0xa8, 0xeb, 0x8d, + 0xd5, 0xbe, 0x2b, 0xff, 0xa5, 0xe2, 0xdd, 0x7b, 0x8b, 0x59, 0x1e, 0x76, 0x8e, 0xc2, 0xde, 0x52, + 0x6a, 0x37, 0x37, 0x9b, 0x35, 0x29, 0xc2, 0xb0, 0xb7, 0x6c, 0x7c, 0xdb, 0x72, 0xd9, 0x83, 0xb2, + 0x4f, 0xc2, 0xe9, 0x21, 0xd8, 0x5e, 0xf0, 0x39, 0x7d, 0xf7, 0xde, 0x62, 0x7e, 0xcb, 0xc6, 0x4c, + 0xcb, 0x28, 0xc5, 0x12, 0xcc, 0x0d, 0x52, 0x6c, 0x6e, 0x6d, 0x36, 0xca, 0x6b, 0xd2, 0x62, 0x49, + 0xba, 0x7b, 0x6f, 0x31, 0x27, 0x4c, 0x06, 0xc1, 0x7f, 0xf7, 0xa3, 0xcf, 0x6f, 0x4e, 0x87, 0xb2, + 0xc6, 0x2c, 0xae, 0xeb, 0x6a, 0xb6, 0xd6, 0x39, 0x6e, 0xf8, 0x39, 0xe6, 0x30, 0x82, 0xfc, 0x53, + 0x51, 0x28, 0x7a, 0xc1, 0xcd, 0x16, 0xad, 0x01, 0x3d, 0x1d, 0xcc, 0xf8, 0x65, 0x47, 0xae, 0x1d, + 0x0c, 0x5b, 0x24, 0x04, 0xdf, 0x0b, 0x69, 0xe1, 0x24, 0xf3, 0x49, 0xb5, 0x38, 0x64, 0x7d, 0xe3, + 0x18, 0x9c, 0xd4, 0xa3, 0x40, 0x2f, 0x42, 0xc6, 0x9b, 0x62, 0xde, 0xa3, 0x6b, 0xa3, 0xe7, 0x24, + 0xa7, 0xf7, 0x69, 0xd0, 0xf3, 0x7e, 0x18, 0x17, 0x1f, 0x15, 0x18, 0xde, 0x64, 0x08, 0x9c, 0xd8, + 0x0b, 0xe1, 0x9e, 0x84, 0xb8, 0xb6, 0xa3, 0x1b, 0xdc, 0x00, 0x3f, 0x30, 0x48, 0x57, 0xae, 0x54, + 0xeb, 0x9c, 0x88, 0x62, 0xca, 0x75, 0x9e, 0x4c, 0xe1, 0xf2, 0xa2, 0x4f, 0xdc, 0x1c, 0xa8, 0x2c, + 0x16, 0x66, 0xde, 0x45, 0xba, 0xa3, 0x1d, 0x54, 0x68, 0x38, 0x7c, 0x0a, 0x52, 0xa4, 0x70, 0x8f, + 0x3f, 0xa2, 0x10, 0x53, 0x92, 0x1d, 0xed, 0x60, 0x55, 0x73, 0x6e, 0xc4, 0xd3, 0x31, 0x29, 0x2e, + 0xff, 0x18, 0xf1, 0x54, 0x42, 0x52, 0x41, 0x8f, 0x01, 0x22, 0x14, 0xda, 0x1e, 0x56, 0xc9, 0xd4, + 0xa5, 0xe2, 0x15, 0x7c, 0x8b, 0x1d, 0xed, 0xa0, 0xbc, 0x87, 0x37, 0x7a, 0x1d, 0xda, 0x00, 0x07, + 0xad, 0x83, 0x24, 0x90, 0xc5, 0xc8, 0x72, 0xf1, 0x9f, 0x1e, 0x7c, 0xb4, 0x95, 0x23, 0xb0, 0x05, + 0xe0, 0x63, 0x64, 0x01, 0x28, 0x30, 0x7e, 0xde, 0xf1, 0x93, 0x50, 0x57, 0x62, 0xe1, 0xae, 0xc8, + 0x2f, 0x42, 0xb1, 0x6f, 0x04, 0x90, 0x0c, 0x79, 0x9e, 0xb1, 0xa2, 0x5b, 0xfb, 0x2c, 0xc2, 0xc9, + 0x28, 0x59, 0x96, 0x99, 0xa2, 0x47, 0x1d, 0x96, 0xd3, 0x3f, 0xf7, 0xc9, 0x85, 0x08, 0xdd, 0xf6, + 0x79, 0x0c, 0xf2, 0xa1, 0x31, 0x10, 0x59, 0xe4, 0x88, 0x9f, 0x45, 0xf6, 0x91, 0x5f, 0x83, 0x1c, + 0x31, 0x40, 0xb8, 0xc5, 0x71, 0x1f, 0x81, 0x22, 0x33, 0x90, 0xfd, 0xb2, 0x66, 0x0e, 0xcf, 0xba, + 0x10, 0xb8, 0x2c, 0x3c, 0xa0, 0xb0, 0xd8, 0xb3, 0x02, 0x6b, 0x55, 0x73, 0xe4, 0x4d, 0x00, 0x7f, + 0x50, 0x51, 0x19, 0x1e, 0x24, 0xc6, 0x23, 0x78, 0x14, 0x95, 0x3f, 0xb7, 0x15, 0xf2, 0x18, 0x4b, + 0x04, 0xc9, 0x3f, 0x6e, 0xca, 0x1e, 0xdd, 0xba, 0x4e, 0x31, 0x2a, 0x2f, 0x7f, 0xfa, 0xad, 0xf9, + 0xc8, 0xbb, 0x63, 0x0b, 0xfe, 0xe3, 0xab, 0x70, 0x26, 0x50, 0x48, 0x14, 0x30, 0x94, 0x88, 0x2a, + 0x06, 0xf4, 0x95, 0x14, 0x8e, 0x4b, 0x28, 0x1d, 0x99, 0xff, 0x2d, 0x1d, 0x6d, 0x76, 0xc6, 0x67, + 0x9b, 0xc6, 0xe7, 0xbb, 0x86, 0x27, 0xe5, 0xff, 0x71, 0x06, 0x52, 0x0a, 0xfe, 0x60, 0x0f, 0x3b, + 0x2e, 0xba, 0x04, 0x71, 0xac, 0xef, 0x5b, 0xc3, 0x72, 0xa0, 0xa4, 0x83, 0x4b, 0x1c, 0xaf, 0xa6, + 0xef, 0x5b, 0xd7, 0xa7, 0x14, 0x8a, 0x8b, 0x2e, 0x43, 0x62, 0xb7, 0xdd, 0xe3, 0xe9, 0xab, 0x3e, + 0x9b, 0x15, 0x24, 0xba, 0x46, 0x90, 0xae, 0x4f, 0x29, 0x0c, 0x9b, 0x54, 0x45, 0x5f, 0xdb, 0x8e, + 0x1d, 0x5d, 0x55, 0xdd, 0xdc, 0xa5, 0x55, 0x11, 0x5c, 0x54, 0x01, 0x30, 0x4c, 0xc3, 0x55, 0x69, + 0x6a, 0x87, 0x5b, 0x8d, 0xb3, 0xa3, 0x29, 0x0d, 0x97, 0x26, 0x83, 0xae, 0x4f, 0x29, 0x19, 0x43, + 0x7c, 0x90, 0xe6, 0x7e, 0xb0, 0x87, 0xed, 0x43, 0xee, 0xad, 0x8d, 0x6c, 0xee, 0xcb, 0x04, 0x89, + 0x34, 0x97, 0x62, 0x13, 0x23, 0xcb, 0x1e, 0xee, 0x73, 0x0f, 0xf8, 0x73, 0xb4, 0x0b, 0xa3, 0x28, + 0xe9, 0xeb, 0x7d, 0xcd, 0x83, 0xeb, 0x53, 0x4a, 0x4a, 0x67, 0x3f, 0xd1, 0x73, 0x9e, 0x0b, 0x96, + 0x1d, 0xf4, 0x7a, 0x42, 0xb4, 0x2c, 0xed, 0x33, 0x25, 0x5c, 0x31, 0xb4, 0x01, 0x85, 0xb6, 0xe1, + 0xb8, 0xaa, 0x63, 0x6a, 0x5d, 0x67, 0xdf, 0x72, 0x1d, 0x9a, 0x3f, 0xc9, 0x5e, 0x7a, 0x78, 0x14, + 0x87, 0x35, 0xc3, 0x71, 0x1b, 0x02, 0xf9, 0xfa, 0x94, 0x92, 0x6f, 0x07, 0x01, 0x84, 0x9f, 0xb5, + 0xbb, 0x8b, 0x6d, 0x8f, 0x21, 0xcd, 0xb3, 0x1c, 0xc1, 0x6f, 0x93, 0x60, 0x0b, 0x7a, 0xc2, 0xcf, + 0x0a, 0x02, 0xd0, 0xd7, 0xc0, 0x4c, 0xdb, 0xd2, 0x5a, 0x1e, 0x3b, 0x55, 0xdf, 0xef, 0x99, 0xb7, + 0x68, 0x52, 0x26, 0x7b, 0xe9, 0xd1, 0x91, 0x8d, 0xb4, 0xb4, 0x96, 0x60, 0x51, 0x25, 0x04, 0xd7, + 0xa7, 0x94, 0xe9, 0x76, 0x3f, 0x10, 0x7d, 0x00, 0x66, 0xb5, 0x6e, 0xb7, 0x7d, 0xd8, 0xcf, 0xbd, + 0x48, 0xb9, 0x5f, 0x18, 0xc5, 0xbd, 0x4c, 0x68, 0xfa, 0xd9, 0x23, 0x6d, 0x00, 0x8a, 0x9a, 0x20, + 0x75, 0x6d, 0x4c, 0x6f, 0x73, 0x75, 0xb9, 0x97, 0x41, 0xdf, 0xba, 0xca, 0x5e, 0x3a, 0x37, 0x8a, + 0xf7, 0x16, 0xc3, 0x17, 0x4e, 0xc9, 0xf5, 0x29, 0xa5, 0xd8, 0x0d, 0x83, 0x18, 0x57, 0x4b, 0xc7, + 0xf4, 0x29, 0x3e, 0xce, 0x75, 0x7a, 0x1c, 0x57, 0x8a, 0x1f, 0xe6, 0x1a, 0x02, 0xa1, 0x1a, 0x64, + 0x59, 0x28, 0xaa, 0x12, 0x63, 0x48, 0x5f, 0xc8, 0xca, 0x5e, 0x92, 0x47, 0xce, 0x50, 0x8a, 0x7a, + 0xd3, 0x72, 0xf1, 0xf5, 0x29, 0x05, 0xb0, 0xf7, 0x85, 0x34, 0x38, 0x41, 0x1f, 0x0b, 0x3b, 0x54, + 0xc3, 0x86, 0x77, 0x6e, 0x86, 0x32, 0x7c, 0x6c, 0x14, 0xc3, 0x9b, 0x94, 0xe8, 0x66, 0xd0, 0x0e, + 0x5f, 0x9f, 0x52, 0x66, 0x6e, 0x0f, 0x82, 0x89, 0x8a, 0xed, 0x1a, 0xa6, 0xd6, 0x36, 0xde, 0xc0, + 0x6c, 0x09, 0xa5, 0xcf, 0x64, 0x1e, 0xa1, 0x62, 0xd7, 0x38, 0x36, 0x5d, 0x58, 0x89, 0x8a, 0xed, + 0x06, 0x01, 0x95, 0x14, 0x3f, 0x87, 0xea, 0x3d, 0xfb, 0x96, 0x92, 0xd2, 0xec, 0xa9, 0xb7, 0x1b, + 0xf1, 0x34, 0x48, 0x59, 0xf9, 0x1c, 0x64, 0x03, 0x86, 0x09, 0xcd, 0x41, 0x8a, 0x9f, 0xd4, 0x11, + 0x27, 0x5a, 0xf9, 0xa7, 0x5c, 0x80, 0x5c, 0xd0, 0x18, 0xc9, 0x1f, 0x8d, 0x78, 0x94, 0xf4, 0xbd, + 0x8b, 0xb9, 0x70, 0x46, 0x3a, 0xe3, 0x7b, 0x2a, 0x0f, 0x89, 0xa5, 0x4d, 0x94, 0xb3, 0xed, 0xd7, + 0x1c, 0x05, 0xf2, 0x95, 0x15, 0x2d, 0x40, 0xb6, 0x7b, 0xa9, 0xeb, 0xa1, 0xc4, 0x28, 0x0a, 0x74, + 0x2f, 0x75, 0x05, 0xc2, 0x59, 0xc8, 0x91, 0x7e, 0xab, 0x41, 0x7f, 0x29, 0xa3, 0x64, 0x09, 0x8c, + 0xa3, 0xc8, 0xff, 0x2a, 0x0a, 0x52, 0xbf, 0x01, 0xf3, 0x52, 0xd5, 0x91, 0x63, 0xa7, 0xaa, 0x4f, + 0xf7, 0x27, 0xc9, 0xfd, 0xbc, 0xf8, 0x1a, 0x48, 0x7e, 0x7a, 0x97, 0x2d, 0x35, 0xa3, 0xfd, 0xbf, + 0x3e, 0x47, 0x55, 0x29, 0xea, 0x7d, 0x9e, 0xeb, 0xb5, 0xd0, 0x66, 0xa5, 0xf8, 0x73, 0x14, 0xfd, + 0x03, 0xee, 0x39, 0x31, 0xdb, 0xdd, 0x96, 0xe6, 0x62, 0x91, 0x1f, 0x0b, 0xec, 0x5b, 0x3e, 0x02, + 0x45, 0xad, 0xdb, 0x55, 0x1d, 0x57, 0x73, 0x31, 0xf7, 0x35, 0x58, 0xe6, 0x21, 0xaf, 0x75, 0xbb, + 0x0d, 0x02, 0x65, 0xbe, 0xc6, 0xc3, 0x50, 0x20, 0x36, 0xdd, 0xd0, 0xda, 0xc2, 0x55, 0x48, 0x32, + 0x97, 0x84, 0x43, 0x99, 0x77, 0x20, 0xb7, 0xbc, 0x11, 0xa7, 0xf6, 0xdc, 0x8b, 0xa9, 0x22, 0x81, + 0x98, 0x0a, 0xf1, 0x77, 0x48, 0x98, 0x7c, 0xc4, 0xdb, 0x2d, 0xc3, 0x37, 0x0d, 0x66, 0x69, 0xfc, + 0x75, 0x9b, 0x25, 0x4b, 0xd2, 0x0a, 0xfb, 0x90, 0x15, 0x28, 0x84, 0x6d, 0x3f, 0x2a, 0x40, 0xd4, + 0x3d, 0xe0, 0xb5, 0x44, 0xdd, 0x03, 0xe2, 0xe9, 0x7a, 0xaf, 0xf7, 0x16, 0x86, 0xac, 0x76, 0x9c, + 0xce, 0xcf, 0x75, 0xc8, 0x45, 0xc8, 0x87, 0xd6, 0x04, 0xf9, 0x24, 0xcc, 0x0e, 0x33, 0xf1, 0xf2, + 0xbe, 0x07, 0x0f, 0x99, 0x6a, 0x74, 0x19, 0xd2, 0x9e, 0x8d, 0x1f, 0x12, 0x1d, 0xd3, 0x6a, 0x05, + 0xb2, 0xe2, 0xa1, 0x86, 0xd2, 0xf9, 0xd1, 0x50, 0x3a, 0x5f, 0xfe, 0x7a, 0x98, 0x1b, 0x65, 0xbf, + 0xfb, 0x92, 0x7c, 0x71, 0x4f, 0x60, 0x27, 0x21, 0xc9, 0x9f, 0xc9, 0x8c, 0xd2, 0x0d, 0x2c, 0xfe, + 0x45, 0x04, 0xc9, 0x6c, 0x79, 0x8c, 0xed, 0x6b, 0xd1, 0x0f, 0x59, 0x85, 0xd3, 0x23, 0x6d, 0xf8, + 0xe8, 0xad, 0x30, 0xc6, 0x88, 0x6f, 0x85, 0xe9, 0xa2, 0x39, 0x0e, 0xed, 0xab, 0x38, 0xc8, 0xc2, + 0xbe, 0xe4, 0x8f, 0xc5, 0xe0, 0xe4, 0x70, 0x4b, 0x8e, 0x16, 0x21, 0x47, 0xfc, 0x56, 0x37, 0xec, + 0xe2, 0x42, 0x47, 0x3b, 0x68, 0x72, 0xff, 0x96, 0x6f, 0x25, 0x44, 0xbd, 0xad, 0x04, 0xb4, 0x0d, + 0xd3, 0x6d, 0x4b, 0xd7, 0xda, 0x6a, 0x60, 0x2b, 0x87, 0x4f, 0xa2, 0x87, 0x06, 0x84, 0x1d, 0x4e, + 0x19, 0x12, 0x83, 0xc3, 0xf5, 0xbf, 0x48, 0x79, 0xac, 0x79, 0xbb, 0x3e, 0x68, 0x05, 0xb2, 0x1d, + 0xc3, 0xd9, 0xc1, 0xfb, 0xda, 0x6d, 0xc3, 0xb2, 0xf9, 0x6c, 0x1a, 0x54, 0x9a, 0x75, 0x1f, 0x47, + 0xec, 0x30, 0x05, 0xc8, 0x02, 0x43, 0x92, 0x18, 0xba, 0xf1, 0x95, 0x3c, 0xb6, 0x35, 0x19, 0xb5, + 0x87, 0x94, 0x1a, 0xb9, 0x87, 0x34, 0x6c, 0xc3, 0x26, 0x3d, 0x7c, 0xc3, 0xe6, 0x23, 0xc1, 0xa1, + 0x09, 0xaf, 0x7d, 0x03, 0x7b, 0x38, 0xa8, 0x01, 0xb3, 0x9c, 0xbe, 0x15, 0x92, 0xfd, 0x90, 0xa3, + 0x0e, 0x6c, 0x7e, 0xf5, 0xcb, 0x1c, 0x09, 0xf2, 0xd1, 0x62, 0x8f, 0xdd, 0x9f, 0xd8, 0xc5, 0x26, + 0x6a, 0x3c, 0xb0, 0x89, 0xfa, 0xff, 0xd8, 0x50, 0x7c, 0x38, 0x06, 0xd3, 0x03, 0x8e, 0xc4, 0xd0, + 0xdd, 0xe1, 0x51, 0x19, 0x59, 0xd1, 0xb1, 0xd8, 0xb1, 0x3b, 0xc6, 0xc7, 0x3a, 0x3e, 0x7e, 0xac, + 0x13, 0xef, 0xe0, 0x58, 0x27, 0xef, 0x6f, 0xac, 0xdf, 0xd5, 0x51, 0xf8, 0x44, 0x04, 0x4a, 0xa3, + 0xbd, 0xaf, 0xa1, 0xc3, 0x71, 0xac, 0x0d, 0x84, 0x51, 0x6b, 0xdc, 0xc3, 0x50, 0xe8, 0xf3, 0x0d, + 0x99, 0x2a, 0xe7, 0x43, 0x51, 0xb8, 0xfc, 0x8d, 0x31, 0x6f, 0xe1, 0x09, 0x39, 0x70, 0x43, 0x66, + 0xeb, 0xcb, 0x30, 0xd3, 0xc2, 0xba, 0xd1, 0xba, 0xdf, 0xc9, 0x3a, 0xcd, 0xa9, 0xff, 0xff, 0x5c, + 0x1d, 0xd4, 0x92, 0xef, 0x02, 0x48, 0x2b, 0xd8, 0xe9, 0x12, 0x7f, 0x0c, 0x55, 0x20, 0x83, 0x0f, + 0x74, 0xdc, 0x75, 0xfd, 0x43, 0x15, 0xc3, 0x42, 0x04, 0x86, 0x5d, 0x13, 0x98, 0x24, 0x40, 0xf6, + 0xc8, 0xd0, 0xd3, 0x3c, 0x07, 0x30, 0x3a, 0x9c, 0xe7, 0xe4, 0xc1, 0x24, 0xc0, 0x15, 0x91, 0x04, + 0x88, 0x8d, 0x8c, 0x6f, 0x19, 0x55, 0x5f, 0x16, 0xe0, 0x69, 0x9e, 0x05, 0x88, 0x8f, 0xa9, 0x2c, + 0x94, 0x06, 0xa8, 0x86, 0xd2, 0x00, 0xc9, 0x31, 0xdd, 0x1c, 0x91, 0x07, 0xb8, 0x22, 0xf2, 0x00, + 0xa9, 0x31, 0x2d, 0xee, 0x4b, 0x04, 0xbc, 0x10, 0x48, 0x04, 0x64, 0x06, 0xb3, 0xad, 0x21, 0xd2, + 0x21, 0x99, 0x80, 0xe7, 0xbd, 0x4c, 0x40, 0x6e, 0x64, 0x16, 0x81, 0x13, 0xf7, 0xa7, 0x02, 0x36, + 0x07, 0x52, 0x01, 0x79, 0xfe, 0x47, 0x97, 0x46, 0xb1, 0x18, 0x93, 0x0b, 0xd8, 0x1c, 0xc8, 0x05, + 0x14, 0xc6, 0x30, 0x1c, 0x93, 0x0c, 0xf8, 0xda, 0xe1, 0xc9, 0x80, 0xd1, 0xe1, 0x3a, 0x6f, 0xe6, + 0x64, 0xd9, 0x00, 0x75, 0x44, 0x36, 0x40, 0x1a, 0x19, 0xb9, 0x32, 0xf6, 0x13, 0xa7, 0x03, 0xb6, + 0x87, 0xa4, 0x03, 0x58, 0xe0, 0x7e, 0x7e, 0x24, 0xf3, 0x09, 0xf2, 0x01, 0xdb, 0x43, 0xf2, 0x01, + 0x68, 0x2c, 0xdb, 0xb1, 0x09, 0x81, 0x6b, 0xe1, 0x84, 0xc0, 0xcc, 0x08, 0xaf, 0xd3, 0x9f, 0xed, + 0x23, 0x32, 0x02, 0x3b, 0xa3, 0x32, 0x02, 0x2c, 0x6a, 0x7f, 0x7c, 0x24, 0xc7, 0x63, 0xa4, 0x04, + 0x36, 0x07, 0x52, 0x02, 0x27, 0xc6, 0x68, 0xda, 0xe4, 0x39, 0x01, 0xf6, 0x08, 0x3c, 0x7b, 0xfe, + 0x1d, 0xa4, 0xec, 0x8d, 0x78, 0x3a, 0x2b, 0xe5, 0xe4, 0x47, 0x89, 0x07, 0xd3, 0x67, 0xe7, 0x48, + 0xac, 0x80, 0x6d, 0xdb, 0xb2, 0xc5, 0x1d, 0x0b, 0xfa, 0x21, 0x9f, 0x27, 0x31, 0xa2, 0x6f, 0xd3, + 0x8e, 0xc8, 0x1f, 0xd0, 0x98, 0x2c, 0x60, 0xc7, 0xe4, 0x9f, 0x8b, 0xf8, 0xb4, 0x34, 0x83, 0x10, + 0x8c, 0x2f, 0x33, 0x3c, 0xbe, 0x0c, 0x64, 0x15, 0xa2, 0xe1, 0xac, 0xc2, 0x02, 0x64, 0x49, 0xac, + 0xd5, 0x97, 0x30, 0xd0, 0xba, 0x5e, 0xc2, 0x40, 0x1c, 0xa0, 0x62, 0xb9, 0x07, 0xbe, 0x2c, 0xb1, + 0xdd, 0xc4, 0xa2, 0x77, 0x98, 0x8c, 0x85, 0xba, 0xe8, 0x09, 0x98, 0x09, 0xe0, 0x7a, 0x31, 0x1c, + 0x8b, 0x9e, 0x25, 0x0f, 0xbb, 0xcc, 0x83, 0xb9, 0x7f, 0x16, 0xf1, 0x25, 0xe4, 0x67, 0x1a, 0x86, + 0x25, 0x05, 0x22, 0xef, 0x50, 0x52, 0x20, 0x7a, 0xdf, 0x49, 0x81, 0x60, 0x4c, 0x1a, 0x0b, 0xc7, + 0xa4, 0xff, 0x33, 0xe2, 0x8f, 0x89, 0x17, 0xe2, 0xeb, 0x56, 0x0b, 0xf3, 0x28, 0x91, 0xfe, 0x26, + 0x2e, 0x49, 0xdb, 0xda, 0xe3, 0xb1, 0x20, 0xf9, 0x49, 0xb0, 0xbc, 0x85, 0x27, 0xc3, 0xd7, 0x15, + 0x2f, 0xc0, 0x4c, 0x04, 0xef, 0x71, 0xf0, 0xcb, 0x0d, 0x49, 0xff, 0x72, 0x83, 0x77, 0x31, 0x3a, + 0x15, 0xb8, 0x18, 0x8d, 0x9e, 0x83, 0x0c, 0x4d, 0xf6, 0xab, 0x56, 0x57, 0xfc, 0xc5, 0xb2, 0x33, + 0xa3, 0x2f, 0x36, 0x38, 0xf4, 0xc8, 0x35, 0xbb, 0x0c, 0xe1, 0x7b, 0x1c, 0x99, 0x90, 0xc7, 0xf1, + 0x00, 0x64, 0x48, 0xeb, 0xd9, 0x5f, 0xde, 0x00, 0x7e, 0xab, 0x5e, 0x00, 0xe4, 0x1f, 0x8f, 0x42, + 0xb1, 0x6f, 0xa1, 0x19, 0xda, 0xf7, 0x61, 0xdb, 0xc8, 0x93, 0xc9, 0x63, 0x1e, 0x60, 0x4f, 0x73, + 0xd4, 0x3b, 0x9a, 0xe9, 0xe2, 0x16, 0x17, 0x4a, 0x00, 0x82, 0x4a, 0x90, 0x26, 0x5f, 0x3d, 0x07, + 0xb7, 0x78, 0xf6, 0xc5, 0xfb, 0x46, 0xd7, 0x21, 0x89, 0x6f, 0xd3, 0x97, 0x67, 0xd9, 0xfb, 0xcd, + 0x27, 0x07, 0xc3, 0x61, 0x52, 0x5c, 0x99, 0x23, 0x83, 0xfd, 0x85, 0x37, 0x17, 0x24, 0x86, 0xfd, + 0xb8, 0x77, 0x99, 0x4d, 0xe1, 0xf4, 0x61, 0x29, 0xa4, 0xfb, 0xa4, 0x40, 0xf3, 0x80, 0x39, 0x11, + 0xde, 0x13, 0x99, 0xb2, 0x33, 0xde, 0x4a, 0xbe, 0x83, 0x3b, 0x5d, 0xcb, 0x6a, 0xab, 0x6c, 0x8e, + 0x97, 0xa1, 0x10, 0x5e, 0x57, 0xd9, 0x5f, 0xc5, 0x72, 0x35, 0xc3, 0x54, 0x43, 0x4e, 0x70, 0x8e, + 0x01, 0xd9, 0x9c, 0xba, 0x11, 0x4f, 0x47, 0xa4, 0xe8, 0x8d, 0x78, 0x3a, 0x2a, 0xc5, 0xe4, 0x2d, + 0x38, 0x31, 0x74, 0x5d, 0x45, 0xcf, 0x42, 0xc6, 0x5f, 0x92, 0xd9, 0x31, 0xfd, 0x23, 0x32, 0x2d, + 0x3e, 0xae, 0xfc, 0x8b, 0x11, 0x9f, 0x65, 0x38, 0x77, 0x53, 0x83, 0x24, 0x3b, 0x33, 0xc9, 0xcf, + 0xc7, 0x3c, 0x31, 0xd9, 0x8a, 0xbc, 0xc4, 0x0e, 0x54, 0x2a, 0x9c, 0x58, 0xfe, 0x00, 0x24, 0x19, + 0x04, 0x65, 0x21, 0xe5, 0xbf, 0x71, 0x0d, 0x90, 0x2c, 0x57, 0xab, 0xb5, 0x2d, 0xf1, 0x60, 0x6d, + 0x65, 0x53, 0x69, 0x4a, 0x51, 0x02, 0x56, 0x6a, 0x37, 0x6a, 0xd5, 0xa6, 0x14, 0x43, 0xd3, 0x90, + 0x67, 0xbf, 0xd5, 0x6b, 0x9b, 0xca, 0x7a, 0xb9, 0x29, 0xc5, 0x03, 0xa0, 0x46, 0x6d, 0x63, 0xa5, + 0xa6, 0x48, 0x09, 0xf9, 0x29, 0x38, 0x3d, 0x72, 0x0d, 0xf7, 0x13, 0x33, 0x91, 0x40, 0x62, 0x46, + 0xfe, 0x58, 0x94, 0x04, 0x35, 0xa3, 0x16, 0x66, 0x74, 0xa3, 0xaf, 0xe3, 0x97, 0x8e, 0xb1, 0xaa, + 0xf7, 0xf5, 0x9e, 0xc4, 0x31, 0x36, 0xde, 0xc5, 0xae, 0xbe, 0xcf, 0x1c, 0x05, 0x66, 0x81, 0xf2, + 0x4a, 0x9e, 0x43, 0x29, 0x91, 0xc3, 0xd0, 0x5e, 0xc7, 0xba, 0xab, 0x32, 0x25, 0x72, 0xf8, 0x1f, + 0xf1, 0xcd, 0x33, 0x68, 0x83, 0x01, 0xe5, 0xaf, 0x3f, 0x96, 0x2c, 0x33, 0x90, 0x50, 0x6a, 0x4d, + 0xe5, 0x55, 0x29, 0x86, 0x10, 0x14, 0xe8, 0x4f, 0xb5, 0xb1, 0x51, 0xde, 0x6a, 0x5c, 0xdf, 0x24, + 0xb2, 0x9c, 0x81, 0xa2, 0x90, 0xa5, 0x00, 0x26, 0xe4, 0xc7, 0xe0, 0xd4, 0x08, 0xaf, 0x62, 0xc8, + 0x21, 0xd6, 0x4f, 0x45, 0x82, 0xd8, 0x61, 0xcf, 0x60, 0x13, 0x92, 0x8e, 0xab, 0xb9, 0x3d, 0x87, + 0x0b, 0xf1, 0xd9, 0x49, 0xdd, 0x8c, 0x25, 0xf1, 0xa3, 0x41, 0xc9, 0x15, 0xce, 0x46, 0xbe, 0x0c, + 0x85, 0x70, 0xc9, 0x68, 0x19, 0xf8, 0x4a, 0x14, 0x95, 0xaf, 0x02, 0x1a, 0xf4, 0x3e, 0x86, 0x84, + 0x97, 0x91, 0x61, 0xe1, 0xe5, 0x0f, 0x47, 0xe0, 0xcc, 0x11, 0x9e, 0x06, 0x7a, 0xb9, 0xaf, 0x93, + 0xcf, 0x1f, 0xc7, 0x4f, 0x59, 0x62, 0xb0, 0xbe, 0x6e, 0x3e, 0x0d, 0xb9, 0x20, 0x7c, 0xb2, 0x4e, + 0x7e, 0x21, 0xea, 0x4f, 0xe2, 0x70, 0x1c, 0xec, 0x9b, 0xc0, 0xc8, 0x97, 0x69, 0x02, 0xdf, 0x0b, + 0xe0, 0x1e, 0x88, 0x53, 0xd4, 0x7c, 0x1d, 0x7d, 0x70, 0x48, 0x7e, 0x11, 0xeb, 0xcd, 0x03, 0x3e, + 0x09, 0x32, 0x2e, 0xff, 0xe5, 0xa0, 0x46, 0x30, 0x29, 0xd0, 0xa3, 0x6b, 0xac, 0xe3, 0xfd, 0x09, + 0xdf, 0xc9, 0x16, 0x63, 0x3f, 0x79, 0xc0, 0xc0, 0x0e, 0x7a, 0x15, 0x4e, 0xf5, 0x39, 0x0a, 0x1e, + 0xeb, 0xf8, 0xa4, 0xfe, 0xc2, 0x89, 0xb0, 0xbf, 0x20, 0x58, 0x07, 0x57, 0xfb, 0x44, 0x78, 0xb5, + 0x7f, 0x15, 0xc0, 0x4f, 0x0e, 0xf8, 0xc7, 0xfe, 0x22, 0xc1, 0x63, 0x7f, 0x97, 0x21, 0x41, 0x34, + 0x49, 0xc8, 0x69, 0xd0, 0x14, 0x13, 0x4d, 0x08, 0x24, 0x17, 0x18, 0xb6, 0x6c, 0x00, 0x1a, 0x4c, + 0xd0, 0x8e, 0xa8, 0xe2, 0x85, 0x70, 0x15, 0x67, 0x47, 0xa6, 0x7a, 0x87, 0x57, 0xf5, 0x06, 0x24, + 0xe8, 0xc8, 0x0f, 0xbd, 0x4b, 0xf9, 0x75, 0x00, 0x9a, 0xeb, 0xda, 0xc6, 0x4e, 0xcf, 0xaf, 0x60, + 0x61, 0xb8, 0xe6, 0x94, 0x05, 0x5e, 0xe5, 0x01, 0xae, 0x42, 0xb3, 0x3e, 0x69, 0x40, 0x8d, 0x02, + 0x0c, 0xe5, 0x0d, 0x28, 0x84, 0x69, 0x87, 0xdf, 0x0d, 0xf5, 0x1f, 0x7e, 0xc9, 0x08, 0xff, 0xc6, + 0xf3, 0x8e, 0xf8, 0x63, 0x4c, 0xf4, 0x43, 0xfe, 0x50, 0x14, 0x72, 0x41, 0xc5, 0xfb, 0x8b, 0xe7, + 0x82, 0xc8, 0xdf, 0x14, 0x81, 0xb4, 0xd7, 0xfd, 0x23, 0x0e, 0x3b, 0xfb, 0x77, 0x84, 0xbd, 0xcd, + 0x0b, 0xb6, 0x4d, 0x14, 0xf3, 0xb6, 0x89, 0xae, 0x7a, 0xcb, 0xdf, 0xa8, 0x84, 0x48, 0x50, 0xd6, + 0xe2, 0xc0, 0x21, 0x5f, 0xed, 0xaf, 0x4e, 0x76, 0x15, 0x6f, 0x16, 0x12, 0xc1, 0x6b, 0x74, 0xec, + 0x43, 0x6e, 0x05, 0x4e, 0x18, 0xb1, 0x89, 0x18, 0xbc, 0xb3, 0x17, 0x39, 0xf6, 0x9d, 0x3d, 0xaf, + 0x96, 0x68, 0xb0, 0x96, 0xef, 0x8c, 0x40, 0x5a, 0xcc, 0x09, 0xf4, 0xbe, 0xe0, 0xc9, 0x33, 0xb1, + 0xb5, 0x39, 0xd2, 0x1e, 0x71, 0xfe, 0x81, 0x83, 0x67, 0x03, 0x07, 0xae, 0x63, 0xc7, 0x3d, 0x70, + 0xcd, 0x3d, 0xbb, 0x3f, 0x8e, 0x80, 0xd4, 0x3f, 0x63, 0xbf, 0xec, 0xd6, 0x0d, 0x2e, 0x73, 0xb1, + 0x21, 0xcb, 0xdc, 0xa8, 0x53, 0xd4, 0xf1, 0x51, 0xa7, 0xa8, 0x07, 0x7b, 0x9d, 0xb8, 0xcf, 0x5e, + 0x7f, 0x38, 0x0a, 0xd9, 0x40, 0x7a, 0x14, 0x3d, 0x13, 0x3a, 0x91, 0xbd, 0x78, 0x54, 0x2a, 0x35, + 0x70, 0x24, 0x3b, 0x24, 0xa6, 0xe8, 0xf1, 0xc5, 0xf4, 0xce, 0xdf, 0xce, 0x1a, 0x7e, 0x81, 0x35, + 0x31, 0xe2, 0x02, 0xeb, 0x5f, 0x8d, 0x40, 0xda, 0x73, 0xbb, 0x8f, 0xbb, 0x89, 0x79, 0x12, 0x92, + 0xdc, 0xb3, 0x64, 0xbb, 0x98, 0xfc, 0x6b, 0x68, 0x5a, 0xb9, 0x04, 0x69, 0xf1, 0xf7, 0x14, 0xf9, + 0xaa, 0xe6, 0x7d, 0x5f, 0x78, 0x1e, 0xb2, 0x81, 0x0d, 0x60, 0x62, 0x1a, 0x37, 0x6a, 0xef, 0x97, + 0xa6, 0x4a, 0xa9, 0xbb, 0xf7, 0x16, 0x63, 0x1b, 0xf8, 0x0e, 0x99, 0xcd, 0x4a, 0xad, 0x7a, 0xbd, + 0x56, 0x7d, 0x49, 0x8a, 0x94, 0xb2, 0x77, 0xef, 0x2d, 0xa6, 0x14, 0x4c, 0x33, 0x8a, 0x17, 0x5e, + 0x82, 0x62, 0xdf, 0xc0, 0x84, 0xdd, 0x16, 0x04, 0x85, 0x95, 0xed, 0xad, 0xb5, 0x7a, 0xb5, 0xdc, + 0xac, 0xa9, 0xec, 0xdc, 0x2e, 0x3a, 0x05, 0x33, 0x6b, 0xf5, 0xd5, 0xeb, 0x4d, 0xb5, 0xba, 0x56, + 0xaf, 0x6d, 0x34, 0xd5, 0x72, 0xb3, 0x59, 0xae, 0xbe, 0x24, 0x45, 0x2f, 0xdd, 0xcb, 0x42, 0xbc, + 0x5c, 0xa9, 0xd6, 0x51, 0x15, 0xe2, 0x34, 0x15, 0x72, 0xe4, 0x09, 0xb0, 0xd2, 0xd1, 0xb9, 0x61, + 0x74, 0x0d, 0x12, 0x34, 0x4b, 0x82, 0x8e, 0x3e, 0x12, 0x56, 0x1a, 0x93, 0x2c, 0x26, 0x8d, 0xa1, + 0x33, 0xf2, 0xc8, 0x33, 0x62, 0xa5, 0xa3, 0x73, 0xc7, 0x68, 0x0d, 0x52, 0x22, 0x48, 0x1e, 0x77, + 0x70, 0xab, 0x34, 0x36, 0xa1, 0x4b, 0xba, 0xc6, 0x92, 0x0d, 0x47, 0x1f, 0x1f, 0x2b, 0x8d, 0xc9, + 0x2a, 0xa3, 0xba, 0x77, 0x9f, 0x69, 0xcc, 0x89, 0xb0, 0xd2, 0xb8, 0x3c, 0x31, 0x52, 0x20, 0xe3, + 0xa7, 0x71, 0xc6, 0x1f, 0x8a, 0x2b, 0x4d, 0x90, 0x30, 0x47, 0x1f, 0x80, 0x7c, 0x38, 0xd4, 0x9d, + 0xec, 0xd4, 0x59, 0x69, 0xc2, 0x8c, 0x34, 0xe1, 0x1f, 0x8e, 0x7b, 0x27, 0x3b, 0x85, 0x56, 0x9a, + 0x30, 0x41, 0x8d, 0x5e, 0x87, 0xe9, 0xc1, 0xb8, 0x74, 0xf2, 0x43, 0x69, 0xa5, 0x63, 0xa4, 0xac, + 0x51, 0x07, 0xd0, 0x90, 0x78, 0xf6, 0x18, 0x67, 0xd4, 0x4a, 0xc7, 0xc9, 0x60, 0xa3, 0x16, 0x14, + 0xfb, 0x83, 0xc4, 0x49, 0xcf, 0xac, 0x95, 0x26, 0xce, 0x66, 0xb3, 0x5a, 0xc2, 0xc1, 0xe5, 0xa4, + 0x67, 0xd8, 0x4a, 0x13, 0x27, 0xb7, 0xd1, 0x36, 0x40, 0x20, 0x3e, 0x9c, 0xe0, 0x4c, 0x5b, 0x69, + 0x92, 0x34, 0x37, 0xea, 0xc2, 0xcc, 0xb0, 0xc0, 0xf1, 0x38, 0x47, 0xdc, 0x4a, 0xc7, 0xca, 0x7e, + 0x13, 0x7d, 0x0e, 0x87, 0x80, 0x93, 0x1d, 0x79, 0x2b, 0x4d, 0x98, 0x06, 0xaf, 0x94, 0x47, 0x9e, + 0x73, 0x3e, 0x77, 0xe4, 0x39, 0x67, 0xff, 0xe4, 0xb2, 0x77, 0xb6, 0xf9, 0xdf, 0x5e, 0x84, 0xf7, + 0xf0, 0x17, 0x74, 0x1c, 0x57, 0xbb, 0x65, 0x98, 0x7b, 0xde, 0x33, 0x4b, 0xfc, 0x9b, 0x1f, 0x72, + 0x3e, 0xc9, 0x5f, 0xe9, 0x11, 0xd0, 0x31, 0x8f, 0x2d, 0x8d, 0x7c, 0x81, 0x72, 0xdc, 0x7d, 0x88, + 0xf1, 0xc7, 0x97, 0x8f, 0x78, 0xc8, 0x69, 0xcc, 0x73, 0x51, 0x43, 0x1e, 0x7a, 0x2a, 0x1d, 0xf9, + 0xc6, 0x40, 0xe9, 0xa8, 0x73, 0xdf, 0xc4, 0x8b, 0x2d, 0x5c, 0x37, 0x1c, 0xd7, 0xb2, 0x0d, 0x5d, + 0x6b, 0xd3, 0xe5, 0xe5, 0xea, 0xa4, 0xb7, 0xb2, 0x2a, 0x19, 0xe2, 0xae, 0xf0, 0xb7, 0xa0, 0xf8, + 0x4d, 0xa1, 0x15, 0x48, 0xde, 0xd6, 0xda, 0xec, 0x4e, 0x54, 0xf0, 0x21, 0xb8, 0x7e, 0x99, 0x07, + 0xfc, 0xa8, 0x20, 0x17, 0x46, 0x2b, 0x7f, 0x37, 0xbd, 0x4f, 0xd2, 0xe9, 0x18, 0x0e, 0xd1, 0x45, + 0x85, 0x86, 0xd2, 0x37, 0x20, 0x6e, 0x6b, 0x2e, 0x0f, 0x30, 0x2b, 0x57, 0x8e, 0xfd, 0x2e, 0x13, + 0xab, 0x81, 0xf2, 0x40, 0x2f, 0x43, 0xba, 0xa3, 0x1d, 0xa8, 0x94, 0x5f, 0xf4, 0xcb, 0xe2, 0x97, + 0xea, 0x68, 0x07, 0xa4, 0x7d, 0xe8, 0x03, 0x50, 0x24, 0x2c, 0xf5, 0x7d, 0xcd, 0xdc, 0xc3, 0x8c, + 0x73, 0xec, 0xcb, 0xe2, 0x9c, 0xef, 0x68, 0x07, 0x55, 0xca, 0x8d, 0xf0, 0xe7, 0x4f, 0x5e, 0xfd, + 0x72, 0x84, 0x67, 0x0d, 0xa8, 0x60, 0x90, 0x06, 0x92, 0xee, 0x7d, 0xd1, 0x4a, 0xc5, 0x16, 0xc7, + 0xb9, 0x51, 0x72, 0xef, 0x13, 0x6b, 0x25, 0x4f, 0x9a, 0xf7, 0xd9, 0x37, 0x17, 0x22, 0xac, 0xd6, + 0xa2, 0x3e, 0x20, 0xf6, 0x2c, 0x4b, 0x86, 0xa8, 0xd4, 0x87, 0x8d, 0x8e, 0xf5, 0x61, 0xf3, 0xc2, + 0x87, 0x65, 0x0c, 0x81, 0x51, 0x93, 0x72, 0xde, 0x87, 0x4f, 0x47, 0x20, 0xbb, 0x12, 0x78, 0xd6, + 0x71, 0x0e, 0x52, 0x1d, 0xcb, 0x34, 0x6e, 0x61, 0xdb, 0xdb, 0xa3, 0x62, 0x9f, 0xc4, 0xcf, 0x64, + 0x7f, 0x1d, 0xd0, 0x3d, 0x14, 0xaf, 0x0b, 0x89, 0x6f, 0x42, 0x75, 0x07, 0xef, 0x38, 0x86, 0x90, + 0xb3, 0x22, 0x3e, 0xd1, 0xa3, 0x20, 0x39, 0x58, 0xef, 0xd9, 0x86, 0x7b, 0xa8, 0xea, 0x96, 0xe9, + 0x6a, 0xba, 0xcb, 0xe3, 0xf0, 0xa2, 0x80, 0x57, 0x19, 0x98, 0x30, 0x69, 0x61, 0x57, 0x33, 0xda, + 0xec, 0x64, 0x66, 0x46, 0x11, 0x9f, 0xbc, 0xa9, 0x77, 0x53, 0xc1, 0x38, 0xb4, 0x0a, 0x92, 0xd5, + 0xc5, 0x76, 0xe8, 0x40, 0x0a, 0xd3, 0xc6, 0xb9, 0x5f, 0xff, 0xcc, 0x13, 0xb3, 0x5c, 0xe0, 0xfc, + 0x30, 0x03, 0xfb, 0x2b, 0x06, 0x4a, 0x51, 0x50, 0x88, 0x93, 0x2a, 0xaf, 0x86, 0x76, 0xa5, 0x7a, + 0x3b, 0xfe, 0x33, 0x32, 0xb3, 0x03, 0x42, 0x2d, 0x9b, 0x87, 0x95, 0xb9, 0x5f, 0xf3, 0x59, 0xfb, + 0x71, 0xea, 0x4b, 0xf8, 0x30, 0xb8, 0x45, 0x45, 0xd9, 0x10, 0x17, 0xfe, 0x75, 0xcd, 0x68, 0x8b, + 0x3f, 0xa4, 0xaa, 0xf0, 0x2f, 0xb4, 0xec, 0xa5, 0x17, 0xe3, 0x34, 0x1e, 0x92, 0x47, 0xe9, 0x46, + 0xc5, 0x32, 0x5b, 0xe1, 0x3c, 0x22, 0xaa, 0x42, 0xd2, 0xb5, 0x6e, 0x61, 0x93, 0x0b, 0xe8, 0x78, + 0x4f, 0xab, 0x71, 0x52, 0xf4, 0xb5, 0x20, 0xb5, 0x70, 0x1b, 0xef, 0xb1, 0xfb, 0x92, 0xfb, 0x9a, + 0x8d, 0xd9, 0x6d, 0xfd, 0xfb, 0x7a, 0x5e, 0xad, 0xe8, 0xb1, 0x6a, 0x50, 0x4e, 0x68, 0x2b, 0xfc, + 0x70, 0x68, 0x8a, 0x6f, 0x1e, 0x8f, 0xe8, 0x63, 0x40, 0xf3, 0x82, 0x96, 0x27, 0xf4, 0xd0, 0xe8, + 0xa3, 0x20, 0xf5, 0xcc, 0x1d, 0xcb, 0xa4, 0x7f, 0x7f, 0x90, 0x47, 0x51, 0x69, 0xb6, 0x53, 0xe9, + 0xc1, 0xf9, 0x4e, 0xe5, 0x16, 0x14, 0x7c, 0x54, 0x3a, 0x43, 0x32, 0xc7, 0x9d, 0x21, 0x79, 0x8f, + 0x01, 0x41, 0x41, 0xeb, 0x00, 0xfe, 0x1c, 0xa4, 0x5b, 0x65, 0xd9, 0xd1, 0x23, 0xe6, 0xcf, 0xe6, + 0x60, 0x67, 0x02, 0x0c, 0xd0, 0xd7, 0xc0, 0x4c, 0xc7, 0x30, 0x55, 0x07, 0xb7, 0x77, 0x55, 0x2e, + 0x39, 0xc2, 0x37, 0x7b, 0xfc, 0xd1, 0x9c, 0xee, 0x18, 0x66, 0x03, 0xb7, 0x77, 0x57, 0x3c, 0x2e, + 0xe8, 0xbd, 0x70, 0xc6, 0xef, 0xbd, 0x65, 0xaa, 0xfb, 0x56, 0xbb, 0xa5, 0xda, 0x78, 0x57, 0xd5, + 0xe9, 0x3b, 0x7f, 0x39, 0x2a, 0xb3, 0x53, 0x1e, 0xca, 0xa6, 0x79, 0xdd, 0x6a, 0xb7, 0x14, 0xbc, + 0x5b, 0x25, 0xc5, 0xe8, 0x21, 0xf0, 0xbb, 0xae, 0x1a, 0x2d, 0x67, 0x2e, 0xbf, 0x18, 0x3b, 0x1f, + 0x57, 0x72, 0x1e, 0xb0, 0xde, 0x72, 0x96, 0xd3, 0x1f, 0xf9, 0xe4, 0xc2, 0xd4, 0xe7, 0x3f, 0xb9, + 0x30, 0x25, 0x5f, 0xa3, 0x6f, 0x4a, 0xf1, 0x79, 0x84, 0x1d, 0x74, 0x05, 0x32, 0x9a, 0xf8, 0x60, + 0x37, 0xc6, 0x8e, 0x98, 0x87, 0x3e, 0xaa, 0xfc, 0x63, 0x11, 0x48, 0xae, 0xdc, 0xdc, 0xd2, 0x0c, + 0x1b, 0xd5, 0x60, 0xda, 0x57, 0xcc, 0x49, 0xa7, 0xb4, 0xaf, 0xcb, 0x62, 0x4e, 0x6f, 0x8c, 0x3a, + 0xaa, 0x96, 0xa9, 0x9c, 0xfd, 0xf5, 0xcf, 0x3c, 0xf1, 0x20, 0x67, 0x73, 0xb3, 0xef, 0xd4, 0x9a, + 0xe0, 0xd7, 0x7f, 0x9a, 0x2d, 0xd0, 0xe7, 0x1b, 0x90, 0x62, 0x4d, 0x75, 0xd0, 0x8b, 0x90, 0xe8, + 0x92, 0x1f, 0x3c, 0x03, 0x3f, 0x3f, 0x52, 0xc1, 0x29, 0x7e, 0x50, 0x1d, 0x18, 0x9d, 0xfc, 0x2d, + 0x51, 0x80, 0x95, 0x9b, 0x37, 0x9b, 0xb6, 0xd1, 0x6d, 0x63, 0xf7, 0x9d, 0xea, 0xfb, 0x36, 0x9c, + 0x08, 0xdc, 0x85, 0xb6, 0xf5, 0xe3, 0xf7, 0x7f, 0xc6, 0xbf, 0x16, 0x6d, 0xeb, 0x43, 0xd9, 0xb6, + 0x1c, 0xd7, 0x63, 0x1b, 0x3b, 0x3e, 0xdb, 0x15, 0xc7, 0x1d, 0x94, 0xec, 0x2b, 0x90, 0xf5, 0x85, + 0xe1, 0xa0, 0x3a, 0xa4, 0x5d, 0xfe, 0x9b, 0x0b, 0x58, 0x1e, 0x2d, 0x60, 0x41, 0x16, 0x14, 0xb2, + 0x47, 0x2e, 0xff, 0x69, 0x04, 0x20, 0x30, 0x47, 0xbe, 0x3a, 0x75, 0x8c, 0x84, 0xeb, 0xdc, 0x12, + 0xc7, 0xee, 0xfb, 0x35, 0x4e, 0xc6, 0x20, 0x20, 0xd4, 0x6f, 0x8b, 0xc2, 0xcc, 0xb6, 0x98, 0xbd, + 0x5f, 0xfd, 0x32, 0xd8, 0x86, 0x14, 0x36, 0x5d, 0xdb, 0xf0, 0xf6, 0x90, 0x9e, 0x1c, 0x35, 0xe6, + 0x43, 0x3a, 0x55, 0x33, 0x5d, 0xfb, 0x30, 0xa8, 0x01, 0x82, 0x57, 0x40, 0x1e, 0x1f, 0x8f, 0xc1, + 0xdc, 0x28, 0x52, 0x74, 0x0e, 0x8a, 0xba, 0x8d, 0x29, 0x20, 0x7c, 0x45, 0xb4, 0x20, 0xc0, 0x7c, + 0x8d, 0x51, 0x80, 0x78, 0x65, 0x44, 0xb9, 0x08, 0xea, 0xfd, 0xb9, 0x61, 0x05, 0x9f, 0x03, 0x5d, + 0x65, 0x9a, 0x50, 0x14, 0x77, 0x4e, 0x76, 0xb4, 0xb6, 0x66, 0xea, 0xc2, 0x5d, 0x3d, 0xd6, 0x92, + 0x20, 0xee, 0xad, 0x54, 0x18, 0x0b, 0x54, 0x83, 0x94, 0xe0, 0x16, 0x3f, 0x3e, 0x37, 0x41, 0x8b, + 0xce, 0x42, 0x2e, 0xb8, 0x30, 0x50, 0xd7, 0x23, 0xae, 0x64, 0x03, 0xeb, 0xc2, 0xb8, 0x95, 0x27, + 0x79, 0xe4, 0xca, 0xc3, 0xbd, 0xbb, 0x1f, 0xa0, 0x47, 0xc3, 0x5b, 0x7f, 0xfe, 0x87, 0x65, 0x0b, + 0x80, 0x4d, 0x55, 0x62, 0x49, 0xf9, 0xc8, 0xdc, 0xc7, 0x7c, 0xcf, 0x30, 0x26, 0x2b, 0x8e, 0xfb, + 0x95, 0x1a, 0xa1, 0xdf, 0x8c, 0x42, 0x2e, 0x38, 0x42, 0x7f, 0x21, 0x17, 0x2d, 0xb4, 0xe1, 0x9b, + 0x29, 0x76, 0x7d, 0xe6, 0xd1, 0x51, 0x66, 0x6a, 0x40, 0x9b, 0xc7, 0xd8, 0xa7, 0x4f, 0xc4, 0x20, + 0xc9, 0xcf, 0xb7, 0x6d, 0x0e, 0x38, 0xb2, 0x91, 0x71, 0x0f, 0x00, 0xe4, 0xc5, 0x03, 0x00, 0x43, + 0xfd, 0xd8, 0x87, 0xa1, 0x40, 0x02, 0xe2, 0xd0, 0xa1, 0xb9, 0xc8, 0xf9, 0x3c, 0x8d, 0x6b, 0xfd, + 0x23, 0xe2, 0x68, 0x01, 0xb2, 0x04, 0xcd, 0xb7, 0xc3, 0x04, 0x07, 0x3a, 0xda, 0x41, 0x8d, 0x41, + 0xd0, 0x13, 0x80, 0xf6, 0xbd, 0x04, 0x85, 0xea, 0x0b, 0x82, 0xe0, 0x4d, 0xfb, 0x25, 0x02, 0xfd, + 0x41, 0x00, 0xd2, 0x0a, 0x95, 0x3d, 0x40, 0xcd, 0x9f, 0xf7, 0x26, 0x90, 0x15, 0xfa, 0x08, 0xf5, + 0x37, 0x46, 0x98, 0x3f, 0xdc, 0x17, 0x36, 0xf3, 0x70, 0xa4, 0x39, 0xc1, 0xa4, 0xf8, 0xa3, 0x37, + 0x17, 0x4a, 0x87, 0x5a, 0xa7, 0xbd, 0x2c, 0x0f, 0xe1, 0x23, 0x0f, 0x8b, 0xe4, 0x89, 0xe3, 0x1c, + 0x0e, 0xbb, 0x97, 0xdf, 0x43, 0xd4, 0xfb, 0xee, 0xef, 0xfe, 0xc4, 0x85, 0x33, 0x81, 0x37, 0x9f, + 0x0f, 0xbc, 0xf4, 0x15, 0x1b, 0x13, 0xe2, 0xa9, 0x22, 0x7f, 0xd5, 0xf0, 0x4e, 0xc6, 0xaf, 0x03, + 0x04, 0x3c, 0xf9, 0xc8, 0xd1, 0x11, 0x82, 0x4f, 0x1f, 0x8a, 0x10, 0x02, 0x73, 0xea, 0x7d, 0xbe, + 0xd1, 0x16, 0x6f, 0x3e, 0x0c, 0x79, 0x91, 0x7c, 0xa9, 0x6a, 0x19, 0x21, 0x16, 0x82, 0x88, 0x4e, + 0xd5, 0x29, 0xf9, 0x5f, 0x47, 0xe0, 0xf4, 0x80, 0xfa, 0x79, 0x4d, 0xd6, 0x01, 0xd9, 0x81, 0x42, + 0x3a, 0x8c, 0x62, 0x2b, 0xf6, 0xfe, 0xb4, 0x79, 0xda, 0x1e, 0xb0, 0xdc, 0xef, 0xcc, 0xea, 0xc3, + 0x4d, 0xcf, 0xaf, 0x46, 0x60, 0x36, 0xd8, 0x00, 0xaf, 0x2b, 0x0d, 0xc8, 0x05, 0xab, 0xe6, 0x9d, + 0x78, 0xcf, 0x24, 0x9d, 0x08, 0xb6, 0x3f, 0xc4, 0x04, 0xdd, 0xf4, 0xa7, 0x38, 0xcb, 0x9b, 0x3d, + 0x35, 0xb1, 0x50, 0x44, 0xc3, 0x86, 0x4e, 0x75, 0x36, 0x36, 0xbf, 0x17, 0x81, 0xf8, 0x96, 0x65, + 0xb5, 0xd1, 0x07, 0x61, 0xda, 0xb4, 0x5c, 0x95, 0x4c, 0x07, 0xdc, 0x52, 0x79, 0x60, 0xcf, 0xcc, + 0x67, 0xed, 0x48, 0x59, 0x7d, 0xe1, 0xcd, 0x85, 0x41, 0xca, 0x61, 0x6f, 0xc2, 0x17, 0x4d, 0xcb, + 0xad, 0x50, 0xa4, 0x26, 0x8b, 0xfd, 0x77, 0x21, 0x1f, 0xae, 0x8e, 0x99, 0xd8, 0xf2, 0xb8, 0xea, + 0xf2, 0x63, 0xab, 0xca, 0xed, 0x04, 0xea, 0x61, 0xcf, 0x28, 0xff, 0x01, 0x19, 0xb9, 0x57, 0x41, + 0xba, 0xd9, 0x7f, 0xc4, 0xa7, 0x06, 0x29, 0x71, 0xa4, 0x27, 0x32, 0xe1, 0x69, 0xa1, 0xa0, 0x38, + 0x39, 0xed, 0x85, 0x9f, 0x89, 0x00, 0xf8, 0x49, 0x12, 0xf4, 0x38, 0x9c, 0xaa, 0x6c, 0x6e, 0xac, + 0xa8, 0x8d, 0x66, 0xb9, 0xb9, 0xdd, 0x08, 0xff, 0x25, 0x11, 0xf1, 0xfe, 0x90, 0xd3, 0xc5, 0xba, + 0xb1, 0x6b, 0xe0, 0x16, 0x7a, 0x04, 0x66, 0xc3, 0xd8, 0xe4, 0xab, 0xb6, 0x22, 0x45, 0x4a, 0xb9, + 0xbb, 0xf7, 0x16, 0xd3, 0xcc, 0x4f, 0xc4, 0x2d, 0x74, 0x1e, 0x4e, 0x0c, 0xe2, 0xd5, 0x37, 0x56, + 0xa5, 0x68, 0x29, 0x7f, 0xf7, 0xde, 0x62, 0xc6, 0x73, 0x28, 0x91, 0x0c, 0x28, 0x88, 0xc9, 0xf9, + 0xc5, 0x4a, 0x70, 0xf7, 0xde, 0x62, 0x92, 0x8d, 0x42, 0x29, 0xfe, 0x91, 0x1f, 0x9a, 0x9f, 0xba, + 0xf0, 0x75, 0x00, 0x75, 0x73, 0xd7, 0xd6, 0xe8, 0x9f, 0xd3, 0x47, 0x25, 0x38, 0x59, 0xdf, 0xb8, + 0xa6, 0x94, 0xab, 0xcd, 0xfa, 0xe6, 0x46, 0xdf, 0x1f, 0x40, 0x09, 0x97, 0xad, 0x6c, 0x6e, 0x57, + 0xd6, 0x6a, 0x6a, 0xa3, 0xbe, 0xba, 0xc1, 0x36, 0x5b, 0x43, 0x65, 0xef, 0xdf, 0x68, 0xd6, 0xd7, + 0x6b, 0x52, 0xb4, 0x72, 0x6d, 0x64, 0x32, 0xff, 0xf1, 0x23, 0x5f, 0xb9, 0xf7, 0x2d, 0x5e, 0x28, + 0xa3, 0xff, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x39, 0x56, 0x48, 0x57, 0x54, 0xa1, 0x00, 0x00, } r := bytes.NewReader(gzipped) gzipr, err := compress_gzip.NewReader(r) diff --git a/x/staking/types/tx.pb.go b/x/staking/types/tx.pb.go index bfbf16fc1b52..8e02e3e5b0fe 100644 --- a/x/staking/types/tx.pb.go +++ b/x/staking/types/tx.pb.go @@ -5,10 +5,10 @@ package types import ( context "context" + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" @@ -40,9 +40,9 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // MsgCreateValidator defines a SDK message for creating a new validator. type MsgCreateValidator struct { - Description Description `protobuf:"bytes,1,opt,name=description,proto3" json:"description"` - Commission CommissionRates `protobuf:"bytes,2,opt,name=commission,proto3" json:"commission"` - MinSelfDelegation github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_self_delegation"` + Description Description `protobuf:"bytes,1,opt,name=description,proto3" json:"description"` + Commission CommissionRates `protobuf:"bytes,2,opt,name=commission,proto3" json:"commission"` + MinSelfDelegation cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=cosmossdk.io/math.Int" json:"min_self_delegation"` // Deprecated: Use of Delegator Address in MsgCreateValidator is deprecated. // The validator address bytes and delegator address bytes refer to the same account while creating validator (defer // only in bech32 notation). @@ -130,8 +130,8 @@ type MsgEditValidator struct { // it's not mandatory to update. If not updated, the deserialized rate will be // zero with no way to distinguish if an update was intended. // REF: #2373 - CommissionRate *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=commission_rate,json=commissionRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"commission_rate,omitempty"` - MinSelfDelegation *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_self_delegation,omitempty"` + CommissionRate *cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=commission_rate,json=commissionRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"commission_rate,omitempty"` + MinSelfDelegation *cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=cosmossdk.io/math.Int" json:"min_self_delegation,omitempty"` } func (m *MsgEditValidator) Reset() { *m = MsgEditValidator{} } @@ -669,78 +669,79 @@ func init() { func init() { proto.RegisterFile("cosmos/staking/v1beta1/tx.proto", fileDescriptor_0926ef28816b35ab) } var fileDescriptor_0926ef28816b35ab = []byte{ - // 1128 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xf6, 0xda, 0x8d, 0x21, 0x13, 0xf2, 0xb5, 0x49, 0x5a, 0x7b, 0x69, 0xed, 0xb2, 0x0d, 0x4d, - 0x14, 0xf0, 0x9a, 0x06, 0xc4, 0x87, 0xa9, 0x50, 0xe3, 0xba, 0x85, 0x82, 0x8c, 0xa2, 0x0d, 0xe1, - 0x80, 0x90, 0xac, 0xf1, 0xee, 0x64, 0xbd, 0x8a, 0x77, 0x67, 0xb3, 0x33, 0x8e, 0xea, 0x1b, 0xe2, - 0x04, 0x08, 0x89, 0xfe, 0x81, 0x4a, 0xe5, 0x06, 0xb7, 0x1c, 0xf2, 0x07, 0x38, 0x20, 0x55, 0x9c, - 0xaa, 0x9c, 0x10, 0x87, 0x82, 0x92, 0x43, 0xfa, 0x33, 0xd0, 0xee, 0xce, 0x7e, 0xfa, 0x33, 0x81, - 0x5e, 0x7a, 0x89, 0x9d, 0x99, 0xe7, 0x7d, 0xde, 0x8f, 0xe7, 0x7d, 0x67, 0xc6, 0xa0, 0xa8, 0x60, - 0x62, 0x60, 0x52, 0x26, 0x14, 0xee, 0xea, 0xa6, 0x56, 0xde, 0xbf, 0xd1, 0x44, 0x14, 0xde, 0x28, - 0xd3, 0xfb, 0x92, 0x65, 0x63, 0x8a, 0xf9, 0x8b, 0x1e, 0x40, 0x62, 0x00, 0x89, 0x01, 0x84, 0xbc, - 0x86, 0xb1, 0xd6, 0x46, 0x65, 0x17, 0xd5, 0xec, 0xec, 0x94, 0xa1, 0xd9, 0xf5, 0x4c, 0x84, 0x62, - 0x72, 0x8b, 0xea, 0x06, 0x22, 0x14, 0x1a, 0x16, 0x03, 0x2c, 0x6a, 0x58, 0xc3, 0xee, 0xd7, 0xb2, - 0xf3, 0x8d, 0xad, 0xe6, 0x3d, 0x4f, 0x0d, 0x6f, 0x83, 0xb9, 0xf5, 0xb6, 0x0a, 0x2c, 0xca, 0x26, - 0x24, 0x28, 0x08, 0x51, 0xc1, 0xba, 0xc9, 0xf6, 0x97, 0x07, 0x64, 0xe1, 0x07, 0xed, 0xa1, 0x2e, - 0x31, 0x94, 0x41, 0x1c, 0x84, 0xf3, 0xc1, 0x36, 0xe6, 0xa1, 0xa1, 0x9b, 0xb8, 0xec, 0xfe, 0xf5, - 0x96, 0xc4, 0x1f, 0x27, 0x00, 0x5f, 0x27, 0xda, 0x6d, 0x1b, 0x41, 0x8a, 0xbe, 0x84, 0x6d, 0x5d, - 0x85, 0x14, 0xdb, 0xfc, 0x26, 0x98, 0x52, 0x11, 0x51, 0x6c, 0xdd, 0xa2, 0x3a, 0x36, 0x73, 0xdc, - 0x55, 0x6e, 0x75, 0x6a, 0xfd, 0x9a, 0xd4, 0xbf, 0x46, 0x52, 0x2d, 0x84, 0x56, 0x27, 0x1f, 0x3f, - 0x2d, 0xa6, 0x7e, 0x39, 0x3d, 0x58, 0xe3, 0xe4, 0x28, 0x05, 0x2f, 0x03, 0xa0, 0x60, 0xc3, 0xd0, - 0x09, 0x71, 0x08, 0xd3, 0x2e, 0xe1, 0xca, 0x20, 0xc2, 0xdb, 0x01, 0x52, 0x86, 0x14, 0x91, 0x28, - 0x69, 0x84, 0x85, 0xdf, 0x03, 0x0b, 0x86, 0x6e, 0x36, 0x08, 0x6a, 0xef, 0x34, 0x54, 0xd4, 0x46, - 0x1a, 0x74, 0xa3, 0xcd, 0x5c, 0xe5, 0x56, 0x27, 0xab, 0x1b, 0x8e, 0xcd, 0x5f, 0x4f, 0x8b, 0xd7, - 0x35, 0x9d, 0xb6, 0x3a, 0x4d, 0x49, 0xc1, 0x06, 0x2b, 0x36, 0xfb, 0x28, 0x11, 0x75, 0xb7, 0x4c, - 0xbb, 0x16, 0x22, 0xd2, 0x3d, 0x93, 0x1e, 0x1d, 0x96, 0x00, 0x8b, 0xe6, 0x9e, 0x49, 0x3d, 0x5f, - 0xf3, 0x86, 0x6e, 0x6e, 0xa1, 0xf6, 0x4e, 0x2d, 0xe0, 0xe6, 0x3f, 0x06, 0xf3, 0xcc, 0x13, 0xb6, - 0x1b, 0x50, 0x55, 0x6d, 0x44, 0x48, 0xee, 0x82, 0xeb, 0x50, 0x38, 0x3a, 0x2c, 0x2d, 0x32, 0x8a, - 0x0d, 0x6f, 0x67, 0x8b, 0xda, 0xba, 0xa9, 0xe5, 0x38, 0x79, 0x2e, 0x30, 0x62, 0x3b, 0xfc, 0xe7, - 0x60, 0x7e, 0xdf, 0x2f, 0x77, 0x40, 0x34, 0xe1, 0x12, 0xbd, 0x76, 0x74, 0x58, 0xba, 0xc2, 0x88, - 0x02, 0x49, 0x62, 0x8c, 0xf2, 0xdc, 0x7e, 0x62, 0x9d, 0xbf, 0x0b, 0xb2, 0x56, 0xa7, 0xb9, 0x8b, - 0xba, 0xb9, 0xac, 0x5b, 0xdb, 0x45, 0xc9, 0xeb, 0x4e, 0xc9, 0xef, 0x4e, 0x69, 0xc3, 0xec, 0x56, - 0x73, 0x7f, 0x84, 0x31, 0x2a, 0x76, 0xd7, 0xa2, 0x58, 0xda, 0xec, 0x34, 0x3f, 0x43, 0x5d, 0x99, - 0x59, 0xf3, 0x15, 0x30, 0xb1, 0x0f, 0xdb, 0x1d, 0x94, 0x7b, 0xc9, 0xa5, 0xc9, 0xfb, 0x12, 0x39, - 0x2d, 0x19, 0xd1, 0x47, 0x8f, 0x29, 0xed, 0x99, 0x54, 0x6e, 0x7d, 0xf7, 0xa8, 0x98, 0x7a, 0xf6, - 0xa8, 0x98, 0xfa, 0xf6, 0xf4, 0x60, 0xad, 0x37, 0xbd, 0x1f, 0x4e, 0x0f, 0xd6, 0xae, 0x44, 0x6a, - 0xdf, 0xdb, 0x77, 0xe2, 0x65, 0x20, 0xf4, 0xae, 0xca, 0x88, 0x58, 0xd8, 0x24, 0x48, 0xfc, 0x2d, - 0x03, 0xe6, 0xea, 0x44, 0xbb, 0xa3, 0xea, 0xf4, 0x79, 0xb6, 0x6a, 0x5f, 0x69, 0xd2, 0xe7, 0x97, - 0x06, 0x82, 0xd9, 0xb0, 0x69, 0x1b, 0x36, 0xa4, 0x88, 0xb5, 0xe8, 0xfb, 0x63, 0xb6, 0x67, 0x0d, - 0x29, 0x91, 0xf6, 0xac, 0x21, 0x45, 0x9e, 0x51, 0x62, 0x13, 0xc2, 0xb7, 0xfa, 0x4f, 0xc2, 0x85, - 0x33, 0xb9, 0xe9, 0x99, 0x82, 0x3e, 0x03, 0x50, 0xf9, 0x68, 0xb4, 0xc6, 0xaf, 0xc6, 0x35, 0x8e, - 0xc9, 0x25, 0x0a, 0x20, 0x97, 0x5c, 0x0b, 0xf4, 0x7d, 0x98, 0x06, 0x53, 0x75, 0xa2, 0x31, 0x6f, - 0x88, 0xbf, 0xd3, 0x6f, 0xd8, 0x38, 0x37, 0xa7, 0xdc, 0xa0, 0x61, 0x1b, 0x77, 0xd4, 0xfe, 0x83, - 0x9e, 0x37, 0x41, 0x16, 0x1a, 0xb8, 0x63, 0x52, 0x57, 0xc6, 0x71, 0x67, 0x84, 0xd9, 0x54, 0x3e, - 0x88, 0x15, 0xb0, 0x27, 0x3f, 0xa7, 0x80, 0x17, 0xe3, 0x05, 0xf4, 0xeb, 0x21, 0x2e, 0x81, 0x85, - 0xc8, 0xbf, 0x41, 0xd9, 0xbe, 0xcf, 0xb8, 0x67, 0x78, 0x15, 0x69, 0xba, 0x29, 0x23, 0xf5, 0x7f, - 0xae, 0xde, 0x36, 0x58, 0x0a, 0xab, 0x47, 0x6c, 0xe5, 0xec, 0x15, 0x5c, 0x08, 0xec, 0xb7, 0x6c, - 0xa5, 0x2f, 0xad, 0x4a, 0x68, 0x40, 0x9b, 0x39, 0x3b, 0x6d, 0x8d, 0xd0, 0x5e, 0x6d, 0x2e, 0x9c, - 0x43, 0x9b, 0x5b, 0xa3, 0xb5, 0x49, 0x1c, 0x60, 0x89, 0xa2, 0x8b, 0x96, 0x7b, 0x80, 0x25, 0x56, - 0x7d, 0xa5, 0x78, 0xd9, 0x3d, 0x09, 0xac, 0x36, 0x72, 0x46, 0xa9, 0xe1, 0x3c, 0x17, 0xd8, 0x79, - 0x25, 0xf4, 0x9c, 0xd6, 0x5f, 0xf8, 0x6f, 0x89, 0xea, 0xb4, 0x13, 0xe7, 0x83, 0xbf, 0x8b, 0x9c, - 0x17, 0xeb, 0x4c, 0xc8, 0xe0, 0x60, 0xc4, 0x9f, 0xd3, 0x60, 0xba, 0x4e, 0xb4, 0x6d, 0x53, 0x7d, - 0xa1, 0xc7, 0xe6, 0xc3, 0xd1, 0xd2, 0xe4, 0xe2, 0xd2, 0x84, 0x15, 0x11, 0x7f, 0xe5, 0xc0, 0x52, - 0x6c, 0xe5, 0x79, 0x2a, 0x12, 0x49, 0x34, 0x7d, 0xf6, 0x44, 0xc5, 0x67, 0x69, 0x70, 0xd9, 0xb9, - 0x03, 0xa1, 0xa9, 0xa0, 0xf6, 0xb6, 0xd9, 0xc4, 0xa6, 0xaa, 0x9b, 0x5a, 0xe4, 0x09, 0xf2, 0x22, - 0xca, 0xcb, 0xaf, 0x80, 0x59, 0xc5, 0xb9, 0xf5, 0x1d, 0x15, 0x5a, 0x48, 0xd7, 0x5a, 0xde, 0x00, - 0x67, 0xe4, 0x19, 0x7f, 0xf9, 0x13, 0x77, 0xb5, 0xf2, 0xe9, 0xe8, 0x3e, 0x58, 0x49, 0xbc, 0x31, - 0x06, 0x55, 0x52, 0xbc, 0x0e, 0x96, 0x87, 0xed, 0x07, 0x07, 0xec, 0xef, 0x1c, 0x98, 0x75, 0xda, - 0xc7, 0x52, 0x21, 0x45, 0x9b, 0xd0, 0x86, 0x06, 0xe1, 0xdf, 0x05, 0x93, 0xb0, 0x43, 0x5b, 0xd8, - 0xd6, 0x69, 0x77, 0x64, 0xf5, 0x43, 0x28, 0xbf, 0x01, 0xb2, 0x96, 0xcb, 0xc0, 0x9a, 0xa3, 0x30, - 0xe8, 0xa5, 0xe2, 0xf9, 0x89, 0xd5, 0xca, 0x33, 0xac, 0xbc, 0xe7, 0xa4, 0x1e, 0x52, 0x3a, 0x29, - 0x2f, 0x47, 0x52, 0xbe, 0x1f, 0xfc, 0x3c, 0x48, 0xc4, 0x2c, 0xe6, 0xc1, 0xa5, 0xc4, 0x92, 0x9f, - 0xe2, 0xfa, 0xc3, 0x2c, 0xc8, 0xd4, 0x89, 0xc6, 0xef, 0x81, 0xd9, 0xe4, 0x6f, 0x81, 0xb5, 0x41, - 0x11, 0xf6, 0xbe, 0xd4, 0x84, 0xf5, 0xf1, 0xb1, 0xc1, 0x08, 0xee, 0x82, 0xe9, 0xf8, 0x8b, 0x6e, - 0x75, 0x08, 0x49, 0x0c, 0x29, 0xbc, 0x35, 0x2e, 0x32, 0x70, 0xf6, 0x35, 0x78, 0x39, 0x78, 0x5e, - 0x5c, 0x1b, 0x62, 0xed, 0x83, 0x84, 0x37, 0xc6, 0x00, 0x05, 0xec, 0x7b, 0x60, 0x36, 0x79, 0x0b, - 0x0f, 0xab, 0x5e, 0x02, 0x3b, 0xb4, 0x7a, 0x83, 0xae, 0x94, 0x26, 0x00, 0x91, 0xa3, 0xff, 0xf5, - 0x21, 0x0c, 0x21, 0x4c, 0x28, 0x8d, 0x05, 0x0b, 0x7c, 0xfc, 0xc4, 0x81, 0xfc, 0xe0, 0xf3, 0xe8, - 0x9d, 0x61, 0x9a, 0x0f, 0xb2, 0x12, 0x6e, 0x9e, 0xc7, 0x2a, 0x88, 0xa8, 0x05, 0x5e, 0x89, 0x4d, - 0xe3, 0xca, 0xb0, 0x84, 0x22, 0x40, 0xa1, 0x3c, 0x26, 0xd0, 0xf7, 0x24, 0x4c, 0x7c, 0xe3, 0xcc, - 0x5e, 0xf5, 0xee, 0xe3, 0xe3, 0x02, 0xf7, 0xe4, 0xb8, 0xc0, 0xfd, 0x73, 0x5c, 0xe0, 0x1e, 0x9c, - 0x14, 0x52, 0x4f, 0x4e, 0x0a, 0xa9, 0x3f, 0x4f, 0x0a, 0xa9, 0xaf, 0xde, 0x1c, 0xfa, 0xb2, 0x0e, - 0x87, 0xd1, 0x7d, 0x63, 0x37, 0xb3, 0xee, 0x75, 0xf2, 0xf6, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, - 0x4a, 0x8f, 0x88, 0xf2, 0x90, 0x10, 0x00, 0x00, + // 1142 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0x4f, 0x6f, 0xdc, 0x44, + 0x14, 0x5f, 0xef, 0x36, 0x0b, 0x99, 0x90, 0x7f, 0x4e, 0xd2, 0x6e, 0xdc, 0xb2, 0x5b, 0xdc, 0x40, + 0xa2, 0xc0, 0xda, 0x6d, 0x40, 0x20, 0x96, 0x0a, 0x35, 0xdb, 0xb4, 0x50, 0x60, 0x51, 0xe4, 0x90, + 0x22, 0x21, 0xa4, 0x65, 0xd6, 0x9e, 0x78, 0xad, 0x5d, 0x7b, 0x5c, 0xcf, 0x6c, 0xd4, 0xbd, 0x21, + 0x4e, 0xc0, 0x85, 0x7e, 0x81, 0x4a, 0xe5, 0x80, 0x04, 0xb7, 0x1c, 0xf2, 0x15, 0x90, 0x2a, 0x4e, + 0x55, 0x4e, 0xa8, 0x87, 0x80, 0x92, 0x43, 0xfa, 0x1d, 0xb8, 0x20, 0xdb, 0x63, 0xaf, 0xed, 0xfd, + 0x9b, 0x40, 0x2f, 0xbd, 0x24, 0xce, 0xcc, 0xef, 0xfd, 0xe6, 0xbd, 0xf7, 0x7b, 0x6f, 0xe6, 0x05, + 0x14, 0x54, 0x4c, 0x4c, 0x4c, 0x64, 0x42, 0x61, 0xc3, 0xb0, 0x74, 0x79, 0xf7, 0x5a, 0x0d, 0x51, + 0x78, 0x4d, 0xa6, 0xf7, 0x25, 0xdb, 0xc1, 0x14, 0xf3, 0xe7, 0x7d, 0x80, 0xc4, 0x00, 0x12, 0x03, + 0x08, 0x8b, 0x3a, 0xc6, 0x7a, 0x13, 0xc9, 0x1e, 0xaa, 0xd6, 0xda, 0x91, 0xa1, 0xd5, 0xf6, 0x4d, + 0x84, 0x42, 0x72, 0x8b, 0x1a, 0x26, 0x22, 0x14, 0x9a, 0x36, 0x03, 0xcc, 0xeb, 0x58, 0xc7, 0xde, + 0xa7, 0xec, 0x7e, 0xb1, 0xd5, 0x45, 0xff, 0xa4, 0xaa, 0xbf, 0xc1, 0x8e, 0xf5, 0xb7, 0xf2, 0xcc, + 0xcb, 0x1a, 0x24, 0x28, 0x74, 0x51, 0xc5, 0x86, 0xc5, 0xf6, 0x97, 0xfa, 0x44, 0x11, 0x38, 0xed, + 0xa3, 0x2e, 0x30, 0x94, 0x49, 0x5c, 0x84, 0xfb, 0x8b, 0x6d, 0xcc, 0x42, 0xd3, 0xb0, 0xb0, 0xec, + 0xfd, 0xf4, 0x97, 0xc4, 0x7f, 0xce, 0x01, 0xbe, 0x42, 0xf4, 0x9b, 0x0e, 0x82, 0x14, 0xdd, 0x85, + 0x4d, 0x43, 0x83, 0x14, 0x3b, 0xfc, 0x26, 0x98, 0xd0, 0x10, 0x51, 0x1d, 0xc3, 0xa6, 0x06, 0xb6, + 0x72, 0xdc, 0x65, 0x6e, 0x65, 0x62, 0xed, 0x8a, 0xd4, 0x3b, 0x47, 0xd2, 0x46, 0x07, 0x5a, 0x1e, + 0x7f, 0x7c, 0x58, 0x48, 0xfd, 0x7a, 0xb2, 0xb7, 0xca, 0x29, 0x51, 0x0a, 0x5e, 0x01, 0x40, 0xc5, + 0xa6, 0x69, 0x10, 0xe2, 0x12, 0xa6, 0x3d, 0xc2, 0xe5, 0x7e, 0x84, 0x37, 0x43, 0xa4, 0x02, 0x29, + 0x22, 0x51, 0xd2, 0x08, 0x0b, 0xff, 0x0d, 0x98, 0x33, 0x0d, 0xab, 0x4a, 0x50, 0x73, 0xa7, 0xaa, + 0xa1, 0x26, 0xd2, 0xa1, 0xe7, 0x6d, 0xe6, 0x32, 0xb7, 0x32, 0x5e, 0xbe, 0xea, 0xda, 0x3c, 0x3d, + 0x2c, 0x2c, 0xf8, 0x67, 0x10, 0xad, 0x21, 0x19, 0x58, 0x36, 0x21, 0xad, 0x4b, 0x77, 0x2c, 0x7a, + 0xb0, 0x5f, 0x04, 0xec, 0xf0, 0x3b, 0x16, 0xf5, 0xa9, 0x67, 0x4d, 0xc3, 0xda, 0x42, 0xcd, 0x9d, + 0x8d, 0x90, 0x8a, 0xff, 0x08, 0xcc, 0x32, 0x62, 0xec, 0x54, 0xa1, 0xa6, 0x39, 0x88, 0x90, 0xdc, + 0x39, 0x8f, 0x5f, 0x38, 0xd8, 0x2f, 0xce, 0x33, 0x8a, 0x75, 0x7f, 0x67, 0x8b, 0x3a, 0x86, 0xa5, + 0xe7, 0x38, 0x65, 0x26, 0x34, 0x62, 0x3b, 0xfc, 0xe7, 0x60, 0x76, 0x37, 0xc8, 0x6e, 0x48, 0x34, + 0xe6, 0x11, 0xbd, 0x76, 0xb0, 0x5f, 0x7c, 0x95, 0x11, 0x85, 0x0a, 0xc4, 0x18, 0x95, 0x99, 0xdd, + 0xc4, 0x3a, 0x7f, 0x1b, 0x64, 0xed, 0x56, 0xad, 0x81, 0xda, 0xb9, 0xac, 0x97, 0xca, 0x79, 0xc9, + 0x2f, 0x46, 0x29, 0x28, 0x46, 0x69, 0xdd, 0x6a, 0x97, 0x73, 0x7f, 0x74, 0x7c, 0x54, 0x9d, 0xb6, + 0x4d, 0xb1, 0xb4, 0xd9, 0xaa, 0x7d, 0x8a, 0xda, 0x0a, 0xb3, 0xe6, 0x4b, 0x60, 0x6c, 0x17, 0x36, + 0x5b, 0x28, 0xf7, 0x92, 0x47, 0xb3, 0x18, 0x28, 0xe2, 0x56, 0x60, 0x44, 0x0e, 0x23, 0x26, 0xac, + 0x6f, 0x52, 0xba, 0xf1, 0xfd, 0xa3, 0x42, 0xea, 0xd9, 0xa3, 0x42, 0xea, 0xbb, 0x93, 0xbd, 0xd5, + 0xee, 0xf0, 0x7e, 0x3c, 0xd9, 0x5b, 0x65, 0x71, 0x15, 0x89, 0xd6, 0x90, 0xbb, 0xcb, 0x4c, 0xbc, + 0x04, 0x84, 0xee, 0x55, 0x05, 0x11, 0x1b, 0x5b, 0x04, 0x89, 0xbf, 0x64, 0xc0, 0x4c, 0x85, 0xe8, + 0xb7, 0x34, 0x83, 0x3e, 0xcf, 0xca, 0xec, 0x29, 0x4d, 0xfa, 0xec, 0xd2, 0xdc, 0x05, 0xd3, 0x9d, + 0x1a, 0xad, 0x3a, 0x90, 0x22, 0x56, 0x91, 0xc5, 0xa7, 0x87, 0x85, 0x8b, 0xdd, 0xd5, 0xf8, 0x19, + 0xd2, 0xa1, 0xda, 0xde, 0x40, 0x6a, 0xa4, 0x26, 0x37, 0x90, 0xaa, 0x4c, 0xa9, 0xb1, 0x2e, 0xe0, + 0xbf, 0xec, 0x5d, 0xed, 0x7e, 0x35, 0x2e, 0x8f, 0x58, 0xe9, 0x3d, 0x8a, 0xbc, 0xf4, 0xe1, 0x70, + 0x1d, 0x2f, 0xc6, 0x75, 0x8c, 0x49, 0x22, 0x0a, 0x20, 0x97, 0x5c, 0x0b, 0x35, 0x7c, 0x98, 0x06, + 0x13, 0x15, 0xa2, 0xb3, 0xd3, 0x10, 0x7f, 0xab, 0x57, 0x43, 0x71, 0x5e, 0x08, 0xb9, 0x7e, 0x0d, + 0x35, 0x6a, 0x3b, 0xfd, 0x07, 0xcd, 0xae, 0x83, 0x2c, 0x34, 0x71, 0xcb, 0xa2, 0x9e, 0x54, 0xa3, + 0xf6, 0x01, 0xb3, 0x29, 0xbd, 0x1f, 0x4b, 0x60, 0x57, 0x7c, 0x6e, 0x02, 0xcf, 0xc7, 0x13, 0x18, + 0xe4, 0x43, 0x5c, 0x00, 0x73, 0x91, 0x3f, 0xc3, 0xb4, 0xfd, 0x90, 0xf1, 0xae, 0xe5, 0x32, 0xd2, + 0x0d, 0x4b, 0x41, 0xda, 0xff, 0x9c, 0xbd, 0x6d, 0xb0, 0xd0, 0xc9, 0x1e, 0x71, 0xd4, 0xd3, 0x67, + 0x70, 0x2e, 0xb4, 0xdf, 0x72, 0xd4, 0x9e, 0xb4, 0x1a, 0xa1, 0x21, 0x6d, 0xe6, 0xf4, 0xb4, 0x1b, + 0x84, 0x76, 0x6b, 0x73, 0xee, 0x0c, 0xda, 0xdc, 0x18, 0xae, 0x4d, 0xe2, 0x92, 0x4a, 0x24, 0x5d, + 0xb4, 0xbd, 0x4b, 0x2a, 0xb1, 0x1a, 0x28, 0xc5, 0x2b, 0x5e, 0xb7, 0xdb, 0x4d, 0xe4, 0xb6, 0x52, + 0xd5, 0x9d, 0x00, 0xd8, 0x9d, 0x24, 0x74, 0xdd, 0xc8, 0x5f, 0x04, 0xe3, 0x41, 0x79, 0xd2, 0xf5, + 0xf3, 0xc1, 0x5f, 0x05, 0xce, 0xf7, 0x75, 0xaa, 0xc3, 0xe0, 0x62, 0xc4, 0x9f, 0xd3, 0x60, 0xb2, + 0x42, 0xf4, 0x6d, 0x4b, 0x7b, 0xa1, 0xdb, 0xe6, 0x83, 0xe1, 0xd2, 0xe4, 0xe2, 0xd2, 0x74, 0x32, + 0x22, 0xfe, 0xc6, 0x81, 0x85, 0xd8, 0xca, 0xf3, 0x54, 0x24, 0x12, 0x68, 0xfa, 0xf4, 0x81, 0x8a, + 0xcf, 0xd2, 0xe0, 0x92, 0xfb, 0xce, 0x41, 0x4b, 0x45, 0xcd, 0x6d, 0xab, 0x86, 0x2d, 0xcd, 0xb0, + 0xf4, 0xc8, 0x98, 0xf1, 0x22, 0xca, 0xcb, 0x2f, 0x83, 0x69, 0xd5, 0x7d, 0xd9, 0x5d, 0x15, 0xea, + 0xc8, 0xd0, 0xeb, 0x7e, 0x03, 0x67, 0x94, 0xa9, 0x60, 0xf9, 0x63, 0x6f, 0xb5, 0xf4, 0xc9, 0xf0, + 0x3a, 0x58, 0x4e, 0xcc, 0x11, 0xfd, 0x32, 0x29, 0xbe, 0x01, 0x96, 0x06, 0xed, 0x87, 0x17, 0xec, + 0xef, 0x1c, 0x98, 0x76, 0xcb, 0xc7, 0xd6, 0x20, 0x45, 0x9b, 0xd0, 0x81, 0x26, 0xe1, 0xdf, 0x05, + 0xe3, 0xb0, 0x45, 0xeb, 0xd8, 0x31, 0x68, 0x7b, 0x68, 0xf6, 0x3b, 0x50, 0x7e, 0x1d, 0x64, 0x6d, + 0x8f, 0x81, 0x15, 0x47, 0xbe, 0xdf, 0x34, 0xe2, 0x9f, 0x13, 0xcb, 0x95, 0x6f, 0x58, 0x7a, 0xcf, + 0x0d, 0xbd, 0x43, 0xe9, 0x86, 0xbc, 0x14, 0x09, 0xf9, 0x7e, 0x38, 0xf1, 0x27, 0x7c, 0x16, 0x17, + 0xc1, 0x85, 0xc4, 0x52, 0x10, 0xe2, 0xda, 0xc3, 0x2c, 0xc8, 0x54, 0x88, 0xce, 0xdf, 0x03, 0xd3, + 0xc9, 0xf1, 0x7e, 0xb5, 0x9f, 0x87, 0xdd, 0xd3, 0x98, 0xb0, 0x36, 0x3a, 0x36, 0x6c, 0xc1, 0x06, + 0x98, 0x8c, 0x4f, 0x6d, 0x2b, 0x03, 0x48, 0x62, 0x48, 0xe1, 0xea, 0xa8, 0xc8, 0xf0, 0xb0, 0xaf, + 0xc1, 0xcb, 0xe1, 0x78, 0x71, 0x65, 0x80, 0x75, 0x00, 0x12, 0xde, 0x1c, 0x01, 0x14, 0xb2, 0xdf, + 0x03, 0xd3, 0xc9, 0x57, 0x78, 0x50, 0xf6, 0x12, 0xd8, 0x81, 0xd9, 0xeb, 0xf7, 0xa4, 0xd4, 0x00, + 0x88, 0x5c, 0xfd, 0xaf, 0x0f, 0x60, 0xe8, 0xc0, 0x84, 0xe2, 0x48, 0xb0, 0xf0, 0x8c, 0x9f, 0x38, + 0xb0, 0xd8, 0xff, 0x3e, 0x7a, 0x67, 0x90, 0xe6, 0xfd, 0xac, 0x84, 0xeb, 0x67, 0xb1, 0x0a, 0x3d, + 0xaa, 0x83, 0x57, 0x62, 0xdd, 0xb8, 0x3c, 0x28, 0xa0, 0x08, 0x50, 0x90, 0x47, 0x04, 0x06, 0x27, + 0x09, 0x63, 0xdf, 0xba, 0xbd, 0x57, 0xbe, 0xfd, 0xf8, 0x28, 0xcf, 0x3d, 0x39, 0xca, 0x73, 0x7f, + 0x1f, 0xe5, 0xb9, 0x07, 0xc7, 0xf9, 0xd4, 0x93, 0xe3, 0x7c, 0xea, 0xcf, 0xe3, 0x7c, 0xea, 0xab, + 0xb7, 0x74, 0x83, 0xd6, 0x5b, 0x35, 0x49, 0xc5, 0x26, 0xfb, 0xff, 0x5c, 0xee, 0xd9, 0x8c, 0xb4, + 0x6d, 0x23, 0x52, 0xcb, 0x7a, 0xcf, 0xc9, 0xdb, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xd6, 0x91, + 0x57, 0x78, 0x63, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2342,7 +2343,7 @@ func (m *MsgEditValidator) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Dec + var v cosmossdk_io_math.LegacyDec m.CommissionRate = &v if err := m.CommissionRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2378,7 +2379,7 @@ func (m *MsgEditValidator) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.MinSelfDelegation = &v if err := m.MinSelfDelegation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/staking/types/validator.go b/x/staking/types/validator.go index 15aabd7d847c..c2db50f5cf82 100644 --- a/x/staking/types/validator.go +++ b/x/staking/types/validator.go @@ -7,11 +7,13 @@ import ( "strings" "time" - "cosmossdk.io/errors" - "cosmossdk.io/math" abci "github.com/cometbft/cometbft/abci/types" cmtprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto" + "cosmossdk.io/core/address" + "cosmossdk.io/errors" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" @@ -39,14 +41,14 @@ var ( var _ ValidatorI = Validator{} // NewValidator constructs a new Validator -func NewValidator(operator sdk.ValAddress, pubKey cryptotypes.PubKey, description Description) (Validator, error) { +func NewValidator(operator string, pubKey cryptotypes.PubKey, description Description) (Validator, error) { pkAny, err := codectypes.NewAnyWithValue(pubKey) if err != nil { return Validator{}, err } return Validator{ - OperatorAddress: operator.String(), + OperatorAddress: operator, ConsensusPubkey: pkAny, Jailed: false, Status: Unbonded, @@ -62,10 +64,13 @@ func NewValidator(operator sdk.ValAddress, pubKey cryptotypes.PubKey, descriptio } // Validators is a collection of Validator -type Validators []Validator +type Validators struct { + Validators []Validator + ValidatorCodec address.Codec +} func (v Validators) String() (out string) { - for _, val := range v { + for _, val := range v.Validators { out += val.String() + "\n" } @@ -74,7 +79,7 @@ func (v Validators) String() (out string) { // ToSDKValidators - convenience function convert []Validator to []sdk.ValidatorI func (v Validators) ToSDKValidators() (validators []ValidatorI) { - for _, val := range v { + for _, val := range v.Validators { validators = append(validators, val) } @@ -88,17 +93,26 @@ func (v Validators) Sort() { // Implements sort interface func (v Validators) Len() int { - return len(v) + return len(v.Validators) } // Implements sort interface func (v Validators) Less(i, j int) bool { - return bytes.Compare(v[i].GetOperator().Bytes(), v[j].GetOperator().Bytes()) == -1 + vi, err := v.ValidatorCodec.StringToBytes(v.Validators[i].GetOperator()) + if err != nil { + panic(err) + } + vj, err := v.ValidatorCodec.StringToBytes(v.Validators[j].GetOperator()) + if err != nil { + panic(err) + } + + return bytes.Compare(vi, vj) == -1 } // Implements sort interface func (v Validators) Swap(i, j int) { - v[i], v[j] = v[j], v[i] + v.Validators[i], v.Validators[j] = v.Validators[j], v.Validators[i] } // ValidatorsByVotingPower implements sort.Interface for []Validator based on @@ -128,8 +142,8 @@ func (valz ValidatorsByVotingPower) Swap(i, j int) { // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (v Validators) UnpackInterfaces(c codectypes.AnyUnpacker) error { - for i := range v { - if err := v[i].UnpackInterfaces(c); err != nil { + for i := range v.Validators { + if err := v.Validators[i].UnpackInterfaces(c); err != nil { return err } } @@ -445,15 +459,8 @@ func (v *Validator) Equal(v2 *Validator) bool { func (v Validator) IsJailed() bool { return v.Jailed } func (v Validator) GetMoniker() string { return v.Description.Moniker } func (v Validator) GetStatus() BondStatus { return v.Status } -func (v Validator) GetOperator() sdk.ValAddress { - if v.OperatorAddress == "" { - return nil - } - addr, err := sdk.ValAddressFromBech32(v.OperatorAddress) - if err != nil { - panic(err) - } - return addr +func (v Validator) GetOperator() string { + return v.OperatorAddress } // ConsPubKey returns the validator PubKey as a cryptotypes.PubKey. @@ -487,13 +494,13 @@ func (v Validator) CmtConsPublicKey() (cmtprotocrypto.PublicKey, error) { } // GetConsAddr extracts Consensus key address -func (v Validator) GetConsAddr() (sdk.ConsAddress, error) { +func (v Validator) GetConsAddr() ([]byte, error) { pk, ok := v.ConsensusPubkey.GetCachedValue().(cryptotypes.PubKey) if !ok { return nil, errors.Wrapf(sdkerrors.ErrInvalidType, "expecting cryptotypes.PubKey, got %T", pk) } - return sdk.ConsAddress(pk.Address()), nil + return pk.Address().Bytes(), nil } func (v Validator) GetTokens() math.Int { return v.Tokens } diff --git a/x/staking/types/validator_test.go b/x/staking/types/validator_test.go index 441cd99ab1f0..ea0bc0e9427b 100644 --- a/x/staking/types/validator_test.go +++ b/x/staking/types/validator_test.go @@ -5,11 +5,13 @@ import ( "sort" "testing" - "cosmossdk.io/math" cmttypes "github.com/cometbft/cometbft/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/codec/legacy" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" @@ -255,7 +257,7 @@ func TestValidatorsSortDeterminism(t *testing.T) { } // Save sorted copy - sort.Sort(types.Validators(vals)) + sort.Sort(types.Validators{Validators: vals, ValidatorCodec: address.NewBech32Codec("cosmosvaloper")}) copy(sortedVals, vals) // Randomly shuffle validators, sort, and check it is equal to original sort @@ -264,7 +266,7 @@ func TestValidatorsSortDeterminism(t *testing.T) { vals[i], vals[j] = vals[j], vals[i] }) - types.Validators(vals).Sort() + types.Validators{Validators: vals, ValidatorCodec: address.NewBech32Codec("cosmosvaloper")}.Sort() require.Equal(t, sortedVals, vals, "Validator sort returned different slices") } } @@ -285,7 +287,7 @@ func TestValidatorsSortCometBFT(t *testing.T) { vals[i].Tokens = math.NewInt(1000000) } - valz := types.Validators(vals) + valz := types.Validators{Validators: vals, ValidatorCodec: address.NewBech32Codec("cosmosvaloper")} // create expected CometBFT validators by converting to CometBFT then sorting expectedVals, err := testutil.ToCmtValidators(valz, sdk.DefaultPowerReduction) @@ -293,8 +295,8 @@ func TestValidatorsSortCometBFT(t *testing.T) { sort.Sort(cmttypes.ValidatorsByVotingPower(expectedVals)) // sort in SDK and then convert to CometBFT - sort.SliceStable(valz, func(i, j int) bool { - return types.ValidatorsByVotingPower(valz).Less(i, j, sdk.DefaultPowerReduction) + sort.SliceStable(valz.Validators, func(i, j int) bool { + return types.ValidatorsByVotingPower(valz.Validators).Less(i, j, sdk.DefaultPowerReduction) }) actualVals, err := testutil.ToCmtValidators(valz, sdk.DefaultPowerReduction) require.NoError(t, err) @@ -303,15 +305,15 @@ func TestValidatorsSortCometBFT(t *testing.T) { } func TestValidatorToCmt(t *testing.T) { - vals := make(types.Validators, 10) + vals := types.Validators{} expected := make([]*cmttypes.Validator, 10) - for i := range vals { + for i := 0; i < 10; i++ { pk := ed25519.GenPrivKey().PubKey() val := newValidator(t, sdk.ValAddress(pk.Address()), pk) val.Status = types.Bonded val.Tokens = math.NewInt(rand.Int63()) - vals[i] = val + vals.Validators = append(vals.Validators, val) cmtPk, err := cryptocodec.ToCmtPubKeyInterface(pk) require.NoError(t, err) expected[i] = cmttypes.NewValidator(cmtPk, val.ConsensusPower(sdk.DefaultPowerReduction)) @@ -344,7 +346,8 @@ func mkValidator(tokens int64, shares math.LegacyDec) types.Validator { // Creates a new validators and asserts the error check. func newValidator(t *testing.T, operator sdk.ValAddress, pubKey cryptotypes.PubKey) types.Validator { - v, err := types.NewValidator(operator, pubKey, types.Description{}) + t.Helper() + v, err := types.NewValidator(operator.String(), pubKey, types.Description{}) require.NoError(t, err) return v } diff --git a/x/tx/CHANGELOG.md b/x/tx/CHANGELOG.md index 742122009eb3..e156b67370fd 100644 --- a/x/tx/CHANGELOG.md +++ b/x/tx/CHANGELOG.md @@ -25,83 +25,66 @@ Types of changes (Stanzas): "Bug Fixes" for any bug fixes. "API Breaking" for breaking exported APIs used by developers building on SDK. Ref: https://keepachangelog.com/en/1.0.0/ + +Since v0.13.0, x/tx follows Cosmos SDK semver: https://github.com/cosmos/cosmos-sdk/blob/main/RELEASES.md --> # Changelog ## [Unreleased] -## v0.8.0 - -### Improvements +### Bug Fixes -* [#16340](https://github.com/cosmos/cosmos-sdk/pull/16340): add `DefineCustomGetSigners` API function. +* [#21782](https://github.com/cosmos/cosmos-sdk/pull/21782) Fix JSON attribute sort order on messages with oneof fields. -## v0.7.0 +## [v0.13.5](https://github.com/cosmos/cosmos-sdk/releases/tag/x/tx/v0.13.5) - 2024-09-18 -### API Breaking +### Improvements -* [#16044](https://github.com/cosmos/cosmos-sdk/pull/16044): rename aminojson.NewAminoJSON -> aminojson.NewEncoder. -* [#16047](https://github.com/cosmos/cosmos-sdk/pull/16047): aminojson.NewEncoder now takes EncoderOptions as an argument. -* [#16254](https://github.com/cosmos/cosmos-sdk/pull/16254): aminojson.Encoder.Marshal now sorts all fields like encoding/json.Marshal does, hence no more need for sdk.\*SortJSON. +* [#21712](https://github.com/cosmos/cosmos-sdk/pull/21712) Add `AminoNameAsTypeURL` option to Amino JSON encoder. -## v0.6.2 +## [v0.13.4](https://github.com/cosmos/cosmos-sdk/releases/tag/x/tx/v0.13.4) - 2024-08-02 ### Improvements -* [#15873](https://github.com/cosmos/cosmos-sdk/pull/15873): add `Validate` method and only check for errors when `Validate` is explicitly called. +* [#21073](https://github.com/cosmos/cosmos-sdk/pull/21073) In Context use sync.Map `getSignersFuncs` map from concurrent writes, we also call Validate when creating the Context. -## v0.6.1 +## [v0.13.3](https://github.com/cosmos/cosmos-sdk/releases/tag/x/tx/v0.13.3) - 2024-04-22 ### Improvements -* [#15871](https://github.com/cosmos/cosmos-sdk/pull/15871) - * `HandlerMap` now has a `DefaultMode()` getter method - * Textual types use `signing.ProtoFileResolver` instead of `protoregistry.Files` +* [#20049](https://github.com/cosmos/cosmos-sdk/pull/20049) Sort JSON attributes for `inline_json` encoder. -## v0.6.0 +## [v0.13.2](https://github.com/cosmos/cosmos-sdk/releases/tag/x/tx/v0.13.2) - 2024-04-12 -### API Breaking +### Features -* [#15709](https://github.com/cosmos/cosmos-sdk/pull/15709): - * `GetSignersContext` has been renamed to `signing.Context` - * `GetSigners` now returns `[][]byte` instead of `[]string` - * `GetSignersOptions` has been renamed to `signing.Options` and requires `address.Codec`s for account and validator addresses - * `GetSignersOptions.ProtoFiles` has been renamed to `signing.Options.FileResolver` +* [#19786](https://github.com/cosmos/cosmos-sdk/pull/19786)/[#19919](https://github.com/cosmos/cosmos-sdk/pull/19919) Add "inline_json" option to Amino JSON encoder. + +### Improvements + +* [#19845](https://github.com/cosmos/cosmos-sdk/pull/19845) Use hybrid resolver instead of only protov2 registry ### Bug Fixes -* [#15849](https://github.com/cosmos/cosmos-sdk/pull/15849) Fix int64 usage for 32 bit platforms. +* [#19955](https://github.com/cosmos/cosmos-sdk/pull/19955) Don't shadow Amino marshalling error messages -## v0.5.1 +## [v0.13.1](https://github.com/cosmos/cosmos-sdk/releases/tag/x/tx/v0.13.1) - 2024-03-05 ### Features -* [#15414](https://github.com/cosmos/cosmos-sdk/pull/15414) Add basic transaction decoding support. - -## v0.5.0 +* [#19618](https://github.com/cosmos/cosmos-sdk/pull/19618) Add enum as string option to encoder. -### API Breaking +### Improvements -* [#15581](https://github.com/cosmos/cosmos-sdk/pull/15581) `GetSignersOptions` and `directaux.SignModeHandlerOptions` now -require a `signing.ProtoFileResolver` interface instead of `protodesc.Resolver`. -* [#15742](https://github.com/cosmos/cosmos-sdk/pull/15742) The `direct_aux` package has been renamed to `directaux` in line with Go conventions. No other types were changed during the package rename. -* [#15748](https://github.com/cosmos/cosmos-sdk/pull/15748) Rename signing.SignerData.ChainId to .ChainID, in line with Go conventions. +* [#18857](https://github.com/cosmos/cosmos-sdk/pull/18857) Moved `FormatCoins` from `core/coins` to this package under `signing/textual`. ### Bug Fixes -* (signing/textual) [#15730](https://github.com/cosmos/cosmos-sdk/pull/15730) make IntValueRenderer.Parse: gracefully handle "" + fuzz - -## v0.4.0 - -### API Breaking +* [#19265](https://github.com/cosmos/cosmos-sdk/pull/19265) Reject denoms that contain a comma. -* [#13793](https://github.com/cosmos/cosmos-sdk/pull/13793) `direct_aux.NewSignModeHandler` constructor function now returns an additional error argument. -* [#15278](https://github.com/cosmos/cosmos-sdk/pull/15278) Move `x/tx/{textual,aminojson}` into `x/tx/signing`. -* [#15302](https://github.com/cosmos/cosmos-sdk/pull/15302) `textual.NewSignModeHandler` now takes an options struct instead of a simple coin querier argument. It also returns an error. +## [v0.13.0](https://github.com/cosmos/cosmos-sdk/releases/tag/x/tx/v0.13.0) - 2023-12-19 ### Improvements -* [#15302](https://github.com/cosmos/cosmos-sdk/pull/15302) Add support for a custom registry (e.g. gogo's MergedRegistry) to be plugged into SIGN_MODE_TEXTUAL. -* [#15557](https://github.com/cosmos/cosmos-sdk/pull/15557) Implement unknown field filtering. -* [#15515](https://github.com/cosmos/cosmos-sdk/pull/15515) Implement SIGN_MODE_LEGACY_AMINO_JSON handler. +* [#18740](https://github.com/cosmos/cosmos-sdk/pull/18740) Support nested messages when fetching signers up to a default depth of 32. diff --git a/x/tx/decode/adr027.go b/x/tx/decode/adr027.go index 0588acbaa9fd..f6d46c223be7 100644 --- a/x/tx/decode/adr027.go +++ b/x/tx/decode/adr027.go @@ -24,6 +24,14 @@ func rejectNonADR027TxRaw(txBytes []byte) error { if m < 0 { return fmt.Errorf("invalid length; %w", protowire.ParseError(m)) } + + // Paranoia from possible varint decoding which can trivially + // be wrong due to the precarious nature of the format being tricked: + // https://cyber.orijtech.com/advisory/varint-decode-limitless + if m > len(txBytes) { + return fmt.Errorf("invalid length from decoding (%d) > len(txBytes) (%d)", m, len(txBytes)) + } + // TxRaw only has bytes fields. if wireType != protowire.BytesType { return fmt.Errorf("expected %d wire type, got %d", protowire.BytesType, wireType) diff --git a/x/tx/decode/decode.go b/x/tx/decode/decode.go index d046a396d01e..4dafe9549af4 100644 --- a/x/tx/decode/decode.go +++ b/x/tx/decode/decode.go @@ -1,13 +1,13 @@ package decode import ( - "fmt" + "errors" - v1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" - "cosmossdk.io/errors" "github.com/cosmos/cosmos-proto/anyutil" "google.golang.org/protobuf/proto" + v1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" + errorsmod "cosmossdk.io/errors" "cosmossdk.io/x/tx/signing" ) @@ -33,7 +33,7 @@ type Options struct { // NewDecoder creates a new Decoder for decoding transactions. func NewDecoder(options Options) (*Decoder, error) { if options.SigningContext == nil { - return nil, fmt.Errorf("signing context is required") + return nil, errors.New("signing context is required") } return &Decoder{ @@ -46,7 +46,7 @@ func (d *Decoder) Decode(txBytes []byte) (*DecodedTx, error) { // Make sure txBytes follow ADR-027. err := rejectNonADR027TxRaw(txBytes) if err != nil { - return nil, errors.Wrap(ErrTxDecode, err.Error()) + return nil, errorsmod.Wrap(ErrTxDecode, err.Error()) } var raw v1beta1.TxRaw @@ -55,7 +55,7 @@ func (d *Decoder) Decode(txBytes []byte) (*DecodedTx, error) { fileResolver := d.signingCtx.FileResolver() err = RejectUnknownFieldsStrict(txBytes, raw.ProtoReflect().Descriptor(), fileResolver) if err != nil { - return nil, errors.Wrap(ErrTxDecode, err.Error()) + return nil, errorsmod.Wrap(ErrTxDecode, err.Error()) } err = proto.Unmarshal(txBytes, &raw) @@ -68,12 +68,12 @@ func (d *Decoder) Decode(txBytes []byte) (*DecodedTx, error) { // allow non-critical unknown fields in TxBody txBodyHasUnknownNonCriticals, err := RejectUnknownFields(raw.BodyBytes, body.ProtoReflect().Descriptor(), true, fileResolver) if err != nil { - return nil, errors.Wrap(ErrTxDecode, err.Error()) + return nil, errorsmod.Wrap(ErrTxDecode, err.Error()) } err = proto.Unmarshal(raw.BodyBytes, &body) if err != nil { - return nil, errors.Wrap(ErrTxDecode, err.Error()) + return nil, errorsmod.Wrap(ErrTxDecode, err.Error()) } var authInfo v1beta1.AuthInfo @@ -81,12 +81,12 @@ func (d *Decoder) Decode(txBytes []byte) (*DecodedTx, error) { // reject all unknown proto fields in AuthInfo err = RejectUnknownFieldsStrict(raw.AuthInfoBytes, authInfo.ProtoReflect().Descriptor(), fileResolver) if err != nil { - return nil, errors.Wrap(ErrTxDecode, err.Error()) + return nil, errorsmod.Wrap(ErrTxDecode, err.Error()) } err = proto.Unmarshal(raw.AuthInfoBytes, &authInfo) if err != nil { - return nil, errors.Wrap(ErrTxDecode, err.Error()) + return nil, errorsmod.Wrap(ErrTxDecode, err.Error()) } theTx := &v1beta1.Tx{ @@ -97,17 +97,25 @@ func (d *Decoder) Decode(txBytes []byte) (*DecodedTx, error) { var signers [][]byte var msgs []proto.Message + seenSigners := map[string]struct{}{} for _, anyMsg := range body.Messages { msg, signerErr := anyutil.Unpack(anyMsg, fileResolver, d.signingCtx.TypeResolver()) if signerErr != nil { - return nil, errors.Wrap(ErrTxDecode, signerErr.Error()) + return nil, errorsmod.Wrap(ErrTxDecode, signerErr.Error()) } msgs = append(msgs, msg) ss, signerErr := d.signingCtx.GetSigners(msg) if signerErr != nil { - return nil, errors.Wrap(ErrTxDecode, signerErr.Error()) + return nil, errorsmod.Wrap(ErrTxDecode, signerErr.Error()) + } + for _, s := range ss { + _, seen := seenSigners[string(s)] + if seen { + continue + } + signers = append(signers, s) + seenSigners[string(s)] = struct{}{} } - signers = append(signers, ss...) } return &DecodedTx{ diff --git a/x/tx/decode/decode_test.go b/x/tx/decode/decode_test.go index ac21431a50c0..a54702cbe9df 100644 --- a/x/tx/decode/decode_test.go +++ b/x/tx/decode/decode_test.go @@ -3,22 +3,22 @@ package decode_test import ( "encoding/hex" "fmt" + "strings" "testing" + "github.com/cosmos/cosmos-proto/anyutil" + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" + bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" "cosmossdk.io/api/cosmos/crypto/secp256k1" signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" - "cosmossdk.io/x/tx/decode" "cosmossdk.io/x/tx/internal/testpb" "cosmossdk.io/x/tx/signing" - - "github.com/cosmos/cosmos-proto/anyutil" - "github.com/stretchr/testify/require" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/types/known/anypb" ) func TestDecode(t *testing.T) { @@ -86,10 +86,6 @@ func TestDecode(t *testing.T) { Payer: "payer", Granter: "", }, - Tip: &txv1beta1.Tip{ - Amount: []*basev1beta1.Coin{{Amount: "100", Denom: "denom"}}, - Tipper: "tipper", - }, }, Signatures: nil, } @@ -119,3 +115,31 @@ func (d dummyAddressCodec) StringToBytes(text string) ([]byte, error) { func (d dummyAddressCodec) BytesToString(bz []byte) (string, error) { return hex.EncodeToString(bz), nil } + +func TestDecodeTxBodyPanic(t *testing.T) { + crashVector := []byte{ + 0x0a, 0x0a, 0x09, 0xe7, 0xbf, 0xba, 0xe6, 0x82, 0x9a, 0xe6, 0xaa, 0x30, + } + + cdc := new(dummyAddressCodec) + signingCtx, err := signing.NewContext(signing.Options{ + AddressCodec: cdc, + ValidatorAddressCodec: cdc, + }) + if err != nil { + t.Fatal(err) + } + dec, err := decode.NewDecoder(decode.Options{ + SigningContext: signingCtx, + }) + if err != nil { + t.Fatal(err) + } + _, err = dec.Decode(crashVector) + if err == nil { + t.Fatal("expected a non-nil error") + } + if g, w := err.Error(), "could not consume length prefix"; !strings.Contains(g, w) { + t.Fatalf("error mismatch\n%s\nodes not contain\n\t%q", g, w) + } +} diff --git a/x/tx/decode/fuzz_test.go b/x/tx/decode/fuzz_test.go new file mode 100644 index 000000000000..38262a20070f --- /dev/null +++ b/x/tx/decode/fuzz_test.go @@ -0,0 +1,140 @@ +package decode + +import ( + "encoding/hex" + "testing" + + "github.com/cosmos/cosmos-proto/anyutil" + fuzz "github.com/google/gofuzz" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" + + bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" + basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + "cosmossdk.io/api/cosmos/crypto/secp256k1" + signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" + txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" + "cosmossdk.io/x/tx/signing" +) + +var ( + accSeq = uint64(2) + + signerInfo = []*txv1beta1.SignerInfo{ + { + PublicKey: pkAny, + ModeInfo: &txv1beta1.ModeInfo{ + Sum: &txv1beta1.ModeInfo_Single_{ + Single: &txv1beta1.ModeInfo_Single{ + Mode: signingv1beta1.SignMode_SIGN_MODE_DIRECT, + }, + }, + }, + Sequence: accSeq, + }, + } + + anyMsg, _ = anyutil.New(&bankv1beta1.MsgSend{}) + + pkAny, _ = anyutil.New(&secp256k1.PubKey{Key: []byte("foo")}) +) + +func generateAndAddSeedsFromTx(f *testing.F) { + f.Helper() + // 1. Add some seeds. + tx := &txv1beta1.Tx{ + Body: &txv1beta1.TxBody{ + Messages: []*anypb.Any{anyMsg}, + Memo: "memo", + TimeoutHeight: 0, + }, + AuthInfo: &txv1beta1.AuthInfo{ + SignerInfos: signerInfo, + Fee: &txv1beta1.Fee{ + Amount: []*basev1beta1.Coin{{Amount: "100", Denom: "denom"}}, + GasLimit: 100, + Payer: "payer", + Granter: "", + }, + }, + Signatures: nil, + } + f.Add(mustMarshal(f, tx)) + fz := fuzz.New() + // 1.1. Mutate tx as much and add those as seeds. + for i := 0; i < 1e4; i++ { + func() { + defer func() { + _ = recover() // Catch any panics and continue + }() + fz.Fuzz(tx) + f.Add(mustMarshal(f, tx)) + }() + } +} + +func FuzzInternal_rejectNonADR027TxRaw(f *testing.F) { + if testing.Short() { + f.Skip("Skipping in -short mode") + } + + // 1. Add some seeds. + generateAndAddSeedsFromTx(f) + + // 2. Now run the fuzzer. + f.Fuzz(func(t *testing.T, in []byte) { + // Just ensure it doesn't crash. + _ = rejectNonADR027TxRaw(in) + }) +} + +func FuzzDecode(f *testing.F) { + if testing.Short() { + f.Skip("Skipping in -short mode") + } + + // 1. Add some seeds. + generateAndAddSeedsFromTx(f) + + // 2. Now fuzz it. + cdc := new(asHexCodec) + signingCtx, err := signing.NewContext(signing.Options{ + AddressCodec: cdc, + ValidatorAddressCodec: cdc, + }) + if err != nil { + return + } + dec, err := NewDecoder(Options{ + SigningContext: signingCtx, + }) + if err != nil { + return + } + + f.Fuzz(func(t *testing.T, in []byte) { + txr, err := dec.Decode(in) + if err == nil && txr == nil { + t.Fatal("inconsistency: err==nil yet tx==nil") + } + }) +} + +func mustMarshal(f *testing.F, m proto.Message) []byte { + f.Helper() + blob, err := proto.Marshal(m) + if err != nil { + f.Fatal(err) + } + return blob +} + +type asHexCodec int + +func (d asHexCodec) StringToBytes(text string) ([]byte, error) { + return hex.DecodeString(text) +} + +func (d asHexCodec) BytesToString(bz []byte) (string, error) { + return hex.EncodeToString(bz), nil +} diff --git a/x/tx/decode/unknown.go b/x/tx/decode/unknown.go index ed6c56400b9a..fed2c1be8ff8 100644 --- a/x/tx/decode/unknown.go +++ b/x/tx/decode/unknown.go @@ -85,6 +85,15 @@ func RejectUnknownFields(bz []byte, desc protoreflect.MessageDescriptor, allowUn // consume length prefix of nested message _, o := protowire.ConsumeVarint(fieldBytes) + if o < 0 { + err = fmt.Errorf("could not consume length prefix fieldBytes for nested message: %v: %w", + fieldMessage, protowire.ParseError(o)) + return hasUnknownNonCriticals, err + } else if o > len(fieldBytes) { + err = fmt.Errorf("length prefix > len(fieldBytes) for nested message: %v", fieldMessage) + return hasUnknownNonCriticals, err + } + fieldBytes = fieldBytes[o:] var err error diff --git a/x/tx/go.mod b/x/tx/go.mod index 10f960298fc2..2392a97d5e5d 100644 --- a/x/tx/go.mod +++ b/x/tx/go.mod @@ -1,33 +1,39 @@ module cosmossdk.io/x/tx -go 1.20 +go 1.21 require ( - cosmossdk.io/api v0.4.2 - cosmossdk.io/core v0.8.0 - cosmossdk.io/errors v1.0.0-beta.7 - cosmossdk.io/math v1.0.1 - github.com/cosmos/cosmos-proto v1.0.0-beta.3 - github.com/google/go-cmp v0.5.9 - github.com/iancoleman/strcase v0.2.0 + cosmossdk.io/api v0.7.4 + cosmossdk.io/core v0.11.0 + cosmossdk.io/errors v1.0.1 + cosmossdk.io/math v1.3.0 + github.com/cosmos/cosmos-proto v1.0.0-beta.5 + github.com/cosmos/gogoproto v1.7.0 + github.com/google/go-cmp v0.6.0 + github.com/google/gofuzz v1.2.0 + github.com/iancoleman/strcase v0.3.0 github.com/pkg/errors v0.9.1 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 github.com/tendermint/go-amino v0.16.0 - google.golang.org/protobuf v1.30.0 - gotest.tools/v3 v3.4.0 - pgregory.net/rapid v0.6.2 + google.golang.org/protobuf v1.33.0 + gotest.tools/v3 v3.5.1 + pgregory.net/rapid v1.1.0 ) require ( - github.com/cosmos/gogoproto v1.4.10 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect - google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect - google.golang.org/grpc v1.55.0 // indirect + golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +// NOTE: we do not want to replace to the development version of cosmossdk.io/api yet +// Until https://github.com/cosmos/cosmos-sdk/issues/19228 is resolved +// We are tagging x/tx v0.14+ from main and v0.13 from release/v0.50.x and must keep using released versions of x/tx dependencies diff --git a/x/tx/go.sum b/x/tx/go.sum index 6463adde4168..03dd8b623630 100644 --- a/x/tx/go.sum +++ b/x/tx/go.sum @@ -1,92 +1,74 @@ -cosmossdk.io/api v0.4.2 h1:lQBMl4xINnMnBOR/tQLtjlDnR4exr4e6/SfHR8PILE0= -cosmossdk.io/api v0.4.2/go.mod h1:qrVgOp7DIeAXa+Tt5dDjOC47bZCDrwx8ZHxrmy7STNE= -cosmossdk.io/core v0.8.0 h1:LcJnu52E1a8f8E317VfQ1xK/RZe+IuhMNQAjnDLh25M= -cosmossdk.io/core v0.8.0/go.mod h1:LF6VLOv2DdCiaHxYVmr0MZcZpaSM9ZgvyrQSYTeg6D0= -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.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= -github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= -github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= +cosmossdk.io/api v0.7.4 h1:sPo8wKwCty1lht8kgL3J7YL1voJywP3YWuA5JKkBz30= +cosmossdk.io/api v0.7.4/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= +cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= +cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= +cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= +cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= 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/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf h1:+RRA9JqSOZFfKrOeqr2z77+8R2RKyh8PG66dcu1V0ck= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/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= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= 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-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/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-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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/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.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -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= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= -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.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= -pgregory.net/rapid v0.6.2 h1:ErW5sL+UKtfBfUTsWHDCoeB+eZKLKMxrSd1VJY6W4bw= -pgregory.net/rapid v0.6.2/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/x/tx/internal/testpb/signers.proto b/x/tx/internal/testpb/signers.proto index 3104bf5d19fe..63eb38cba43b 100644 --- a/x/tx/internal/testpb/signers.proto +++ b/x/tx/internal/testpb/signers.proto @@ -55,6 +55,41 @@ message RepeatedNestedRepeatedSigner { } } +message DeeplyNestedSigner { + option (cosmos.msg.v1.signer) = "inner_one"; + InnerOne inner_one = 1; + + message InnerOne { + option (cosmos.msg.v1.signer) = "inner_two"; + InnerTwo inner_two = 1; + + message InnerTwo { + option (cosmos.msg.v1.signer) = "signer"; + string signer = 1; + } + } +} + +message DeeplyNestedRepeatedSigner { + option (cosmos.msg.v1.signer) = "inner"; + repeated Inner inner = 1; + + message Inner { + option (cosmos.msg.v1.signer) = "inner"; + repeated Inner inner = 1; + + message Inner { + option (cosmos.msg.v1.signer) = "inner"; + repeated Bottom inner = 1; + + message Bottom { + option (cosmos.msg.v1.signer) = "signer"; + repeated string signer = 1; + } + } + } +} + message BadSigner { option (cosmos.msg.v1.signer) = "signer"; bytes signer = 1; diff --git a/x/tx/internal/testpb/signers.pulsar.go b/x/tx/internal/testpb/signers.pulsar.go index 51c8cf163e39..f6e3a3d081c1 100644 --- a/x/tx/internal/testpb/signers.pulsar.go +++ b/x/tx/internal/testpb/signers.pulsar.go @@ -1369,7 +1369,7 @@ func (x *NestedSigner_Inner) ProtoReflect() protoreflect.Message { } func (x *NestedSigner_Inner) slowProtoReflect() protoreflect.Message { - mi := &file_signers_proto_msgTypes[9] + mi := &file_signers_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2283,7 +2283,7 @@ func (x *RepeatedNestedSigner_Inner) ProtoReflect() protoreflect.Message { } func (x *RepeatedNestedSigner_Inner) slowProtoReflect() protoreflect.Message { - mi := &file_signers_proto_msgTypes[10] + mi := &file_signers_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3184,7 +3184,7 @@ func (x *NestedRepeatedSigner_Inner) ProtoReflect() protoreflect.Message { } func (x *NestedRepeatedSigner_Inner) slowProtoReflect() protoreflect.Message { - mi := &file_signers_proto_msgTypes[11] + mi := &file_signers_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4158,7 +4158,7 @@ func (x *RepeatedNestedRepeatedSigner_Inner) ProtoReflect() protoreflect.Message } func (x *RepeatedNestedRepeatedSigner_Inner) slowProtoReflect() protoreflect.Message { - mi := &file_signers_proto_msgTypes[12] + mi := &file_signers_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4573,25 +4573,25 @@ func (x *fastReflection_RepeatedNestedRepeatedSigner_Inner) ProtoMethods() *prot } var ( - md_BadSigner protoreflect.MessageDescriptor - fd_BadSigner_signer protoreflect.FieldDescriptor + md_DeeplyNestedSigner protoreflect.MessageDescriptor + fd_DeeplyNestedSigner_inner_one protoreflect.FieldDescriptor ) func init() { file_signers_proto_init() - md_BadSigner = File_signers_proto.Messages().ByName("BadSigner") - fd_BadSigner_signer = md_BadSigner.Fields().ByName("signer") + md_DeeplyNestedSigner = File_signers_proto.Messages().ByName("DeeplyNestedSigner") + fd_DeeplyNestedSigner_inner_one = md_DeeplyNestedSigner.Fields().ByName("inner_one") } -var _ protoreflect.Message = (*fastReflection_BadSigner)(nil) +var _ protoreflect.Message = (*fastReflection_DeeplyNestedSigner)(nil) -type fastReflection_BadSigner BadSigner +type fastReflection_DeeplyNestedSigner DeeplyNestedSigner -func (x *BadSigner) ProtoReflect() protoreflect.Message { - return (*fastReflection_BadSigner)(x) +func (x *DeeplyNestedSigner) ProtoReflect() protoreflect.Message { + return (*fastReflection_DeeplyNestedSigner)(x) } -func (x *BadSigner) slowProtoReflect() protoreflect.Message { +func (x *DeeplyNestedSigner) slowProtoReflect() protoreflect.Message { mi := &file_signers_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4603,43 +4603,43 @@ func (x *BadSigner) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_BadSigner_messageType fastReflection_BadSigner_messageType -var _ protoreflect.MessageType = fastReflection_BadSigner_messageType{} +var _fastReflection_DeeplyNestedSigner_messageType fastReflection_DeeplyNestedSigner_messageType +var _ protoreflect.MessageType = fastReflection_DeeplyNestedSigner_messageType{} -type fastReflection_BadSigner_messageType struct{} +type fastReflection_DeeplyNestedSigner_messageType struct{} -func (x fastReflection_BadSigner_messageType) Zero() protoreflect.Message { - return (*fastReflection_BadSigner)(nil) +func (x fastReflection_DeeplyNestedSigner_messageType) Zero() protoreflect.Message { + return (*fastReflection_DeeplyNestedSigner)(nil) } -func (x fastReflection_BadSigner_messageType) New() protoreflect.Message { - return new(fastReflection_BadSigner) +func (x fastReflection_DeeplyNestedSigner_messageType) New() protoreflect.Message { + return new(fastReflection_DeeplyNestedSigner) } -func (x fastReflection_BadSigner_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_BadSigner +func (x fastReflection_DeeplyNestedSigner_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_DeeplyNestedSigner } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_BadSigner) Descriptor() protoreflect.MessageDescriptor { - return md_BadSigner +func (x *fastReflection_DeeplyNestedSigner) Descriptor() protoreflect.MessageDescriptor { + return md_DeeplyNestedSigner } // 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_BadSigner) Type() protoreflect.MessageType { - return _fastReflection_BadSigner_messageType +func (x *fastReflection_DeeplyNestedSigner) Type() protoreflect.MessageType { + return _fastReflection_DeeplyNestedSigner_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_BadSigner) New() protoreflect.Message { - return new(fastReflection_BadSigner) +func (x *fastReflection_DeeplyNestedSigner) New() protoreflect.Message { + return new(fastReflection_DeeplyNestedSigner) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_BadSigner) Interface() protoreflect.ProtoMessage { - return (*BadSigner)(x) +func (x *fastReflection_DeeplyNestedSigner) Interface() protoreflect.ProtoMessage { + return (*DeeplyNestedSigner)(x) } // Range iterates over every populated field in an undefined order, @@ -4647,10 +4647,10 @@ func (x *fastReflection_BadSigner) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_BadSigner) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Signer) != 0 { - value := protoreflect.ValueOfBytes(x.Signer) - if !f(fd_BadSigner_signer, value) { +func (x *fastReflection_DeeplyNestedSigner) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.InnerOne != nil { + value := protoreflect.ValueOfMessage(x.InnerOne.ProtoReflect()) + if !f(fd_DeeplyNestedSigner_inner_one, value) { return } } @@ -4667,15 +4667,15 @@ func (x *fastReflection_BadSigner) Range(f func(protoreflect.FieldDescriptor, pr // 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_BadSigner) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_DeeplyNestedSigner) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "BadSigner.signer": - return len(x.Signer) != 0 + case "DeeplyNestedSigner.inner_one": + return x.InnerOne != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: BadSigner")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedSigner")) } - panic(fmt.Errorf("message BadSigner does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message DeeplyNestedSigner does not contain field %s", fd.FullName())) } } @@ -4685,15 +4685,15 @@ func (x *fastReflection_BadSigner) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BadSigner) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_DeeplyNestedSigner) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "BadSigner.signer": - x.Signer = nil + case "DeeplyNestedSigner.inner_one": + x.InnerOne = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: BadSigner")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedSigner")) } - panic(fmt.Errorf("message BadSigner does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message DeeplyNestedSigner does not contain field %s", fd.FullName())) } } @@ -4703,16 +4703,16 @@ func (x *fastReflection_BadSigner) Clear(fd protoreflect.FieldDescriptor) { // 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_BadSigner) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_DeeplyNestedSigner) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "BadSigner.signer": - value := x.Signer - return protoreflect.ValueOfBytes(value) + case "DeeplyNestedSigner.inner_one": + value := x.InnerOne + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: BadSigner")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedSigner")) } - panic(fmt.Errorf("message BadSigner does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message DeeplyNestedSigner does not contain field %s", descriptor.FullName())) } } @@ -4726,15 +4726,15 @@ func (x *fastReflection_BadSigner) Get(descriptor protoreflect.FieldDescriptor) // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BadSigner) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_DeeplyNestedSigner) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "BadSigner.signer": - x.Signer = value.Bytes() + case "DeeplyNestedSigner.inner_one": + x.InnerOne = value.Message().Interface().(*DeeplyNestedSigner_InnerOne) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: BadSigner")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedSigner")) } - panic(fmt.Errorf("message BadSigner does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message DeeplyNestedSigner does not contain field %s", fd.FullName())) } } @@ -4748,40 +4748,44 @@ func (x *fastReflection_BadSigner) Set(fd protoreflect.FieldDescriptor, value pr // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BadSigner) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_DeeplyNestedSigner) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "BadSigner.signer": - panic(fmt.Errorf("field signer of message BadSigner is not mutable")) + case "DeeplyNestedSigner.inner_one": + if x.InnerOne == nil { + x.InnerOne = new(DeeplyNestedSigner_InnerOne) + } + return protoreflect.ValueOfMessage(x.InnerOne.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: BadSigner")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedSigner")) } - panic(fmt.Errorf("message BadSigner does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message DeeplyNestedSigner 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_BadSigner) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_DeeplyNestedSigner) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "BadSigner.signer": - return protoreflect.ValueOfBytes(nil) + case "DeeplyNestedSigner.inner_one": + m := new(DeeplyNestedSigner_InnerOne) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: BadSigner")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedSigner")) } - panic(fmt.Errorf("message BadSigner does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message DeeplyNestedSigner 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_BadSigner) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_DeeplyNestedSigner) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in BadSigner", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in DeeplyNestedSigner", d.FullName())) } panic("unreachable") } @@ -4789,7 +4793,7 @@ func (x *fastReflection_BadSigner) WhichOneof(d protoreflect.OneofDescriptor) pr // 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_BadSigner) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_DeeplyNestedSigner) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -4800,7 +4804,7 @@ func (x *fastReflection_BadSigner) 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_BadSigner) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_DeeplyNestedSigner) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -4812,7 +4816,7 @@ func (x *fastReflection_BadSigner) SetUnknown(fields protoreflect.RawFields) { // 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_BadSigner) IsValid() bool { +func (x *fastReflection_DeeplyNestedSigner) IsValid() bool { return x != nil } @@ -4822,9 +4826,9 @@ func (x *fastReflection_BadSigner) 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_BadSigner) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_DeeplyNestedSigner) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*BadSigner) + x := input.Message.Interface().(*DeeplyNestedSigner) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4836,8 +4840,8 @@ func (x *fastReflection_BadSigner) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Signer) - if l > 0 { + if x.InnerOne != nil { + l = options.Size(x.InnerOne) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { @@ -4850,7 +4854,7 @@ func (x *fastReflection_BadSigner) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*BadSigner) + x := input.Message.Interface().(*DeeplyNestedSigner) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4869,10 +4873,17 @@ func (x *fastReflection_BadSigner) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Signer) > 0 { - i -= len(x.Signer) - copy(dAtA[i:], x.Signer) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + if x.InnerOne != nil { + encoded, err := options.Marshal(x.InnerOne) + 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 } @@ -4887,7 +4898,7 @@ func (x *fastReflection_BadSigner) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*BadSigner) + x := input.Message.Interface().(*DeeplyNestedSigner) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4919,17 +4930,17 @@ func (x *fastReflection_BadSigner) 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: BadSigner: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DeeplyNestedSigner: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BadSigner: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DeeplyNestedSigner: 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 Signer", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InnerOne", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -4939,24 +4950,26 @@ func (x *fastReflection_BadSigner) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + byteLen + 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.Signer = append(x.Signer[:0], dAtA[iNdEx:postIndex]...) - if x.Signer == nil { - x.Signer = []byte{} + if x.InnerOne == nil { + x.InnerOne = &DeeplyNestedSigner_InnerOne{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.InnerOne); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: @@ -4995,26 +5008,26 @@ func (x *fastReflection_BadSigner) ProtoMethods() *protoiface.Methods { } var ( - md_NoSignerOption protoreflect.MessageDescriptor - fd_NoSignerOption_signer protoreflect.FieldDescriptor + md_DeeplyNestedSigner_InnerOne protoreflect.MessageDescriptor + fd_DeeplyNestedSigner_InnerOne_inner_two protoreflect.FieldDescriptor ) func init() { file_signers_proto_init() - md_NoSignerOption = File_signers_proto.Messages().ByName("NoSignerOption") - fd_NoSignerOption_signer = md_NoSignerOption.Fields().ByName("signer") + md_DeeplyNestedSigner_InnerOne = File_signers_proto.Messages().ByName("DeeplyNestedSigner").Messages().ByName("InnerOne") + fd_DeeplyNestedSigner_InnerOne_inner_two = md_DeeplyNestedSigner_InnerOne.Fields().ByName("inner_two") } -var _ protoreflect.Message = (*fastReflection_NoSignerOption)(nil) +var _ protoreflect.Message = (*fastReflection_DeeplyNestedSigner_InnerOne)(nil) -type fastReflection_NoSignerOption NoSignerOption +type fastReflection_DeeplyNestedSigner_InnerOne DeeplyNestedSigner_InnerOne -func (x *NoSignerOption) ProtoReflect() protoreflect.Message { - return (*fastReflection_NoSignerOption)(x) +func (x *DeeplyNestedSigner_InnerOne) ProtoReflect() protoreflect.Message { + return (*fastReflection_DeeplyNestedSigner_InnerOne)(x) } -func (x *NoSignerOption) slowProtoReflect() protoreflect.Message { - mi := &file_signers_proto_msgTypes[7] +func (x *DeeplyNestedSigner_InnerOne) slowProtoReflect() protoreflect.Message { + mi := &file_signers_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5025,43 +5038,43 @@ func (x *NoSignerOption) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_NoSignerOption_messageType fastReflection_NoSignerOption_messageType -var _ protoreflect.MessageType = fastReflection_NoSignerOption_messageType{} +var _fastReflection_DeeplyNestedSigner_InnerOne_messageType fastReflection_DeeplyNestedSigner_InnerOne_messageType +var _ protoreflect.MessageType = fastReflection_DeeplyNestedSigner_InnerOne_messageType{} -type fastReflection_NoSignerOption_messageType struct{} +type fastReflection_DeeplyNestedSigner_InnerOne_messageType struct{} -func (x fastReflection_NoSignerOption_messageType) Zero() protoreflect.Message { - return (*fastReflection_NoSignerOption)(nil) +func (x fastReflection_DeeplyNestedSigner_InnerOne_messageType) Zero() protoreflect.Message { + return (*fastReflection_DeeplyNestedSigner_InnerOne)(nil) } -func (x fastReflection_NoSignerOption_messageType) New() protoreflect.Message { - return new(fastReflection_NoSignerOption) +func (x fastReflection_DeeplyNestedSigner_InnerOne_messageType) New() protoreflect.Message { + return new(fastReflection_DeeplyNestedSigner_InnerOne) } -func (x fastReflection_NoSignerOption_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_NoSignerOption +func (x fastReflection_DeeplyNestedSigner_InnerOne_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_DeeplyNestedSigner_InnerOne } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_NoSignerOption) Descriptor() protoreflect.MessageDescriptor { - return md_NoSignerOption +func (x *fastReflection_DeeplyNestedSigner_InnerOne) Descriptor() protoreflect.MessageDescriptor { + return md_DeeplyNestedSigner_InnerOne } // 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_NoSignerOption) Type() protoreflect.MessageType { - return _fastReflection_NoSignerOption_messageType +func (x *fastReflection_DeeplyNestedSigner_InnerOne) Type() protoreflect.MessageType { + return _fastReflection_DeeplyNestedSigner_InnerOne_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_NoSignerOption) New() protoreflect.Message { - return new(fastReflection_NoSignerOption) +func (x *fastReflection_DeeplyNestedSigner_InnerOne) New() protoreflect.Message { + return new(fastReflection_DeeplyNestedSigner_InnerOne) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_NoSignerOption) Interface() protoreflect.ProtoMessage { - return (*NoSignerOption)(x) +func (x *fastReflection_DeeplyNestedSigner_InnerOne) Interface() protoreflect.ProtoMessage { + return (*DeeplyNestedSigner_InnerOne)(x) } // Range iterates over every populated field in an undefined order, @@ -5069,10 +5082,10 @@ func (x *fastReflection_NoSignerOption) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_NoSignerOption) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Signer) != 0 { - value := protoreflect.ValueOfBytes(x.Signer) - if !f(fd_NoSignerOption_signer, value) { +func (x *fastReflection_DeeplyNestedSigner_InnerOne) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.InnerTwo != nil { + value := protoreflect.ValueOfMessage(x.InnerTwo.ProtoReflect()) + if !f(fd_DeeplyNestedSigner_InnerOne_inner_two, value) { return } } @@ -5089,15 +5102,15 @@ func (x *fastReflection_NoSignerOption) Range(f func(protoreflect.FieldDescripto // 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_NoSignerOption) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_DeeplyNestedSigner_InnerOne) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "NoSignerOption.signer": - return len(x.Signer) != 0 + case "DeeplyNestedSigner.InnerOne.inner_two": + return x.InnerTwo != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: NoSignerOption")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedSigner.InnerOne")) } - panic(fmt.Errorf("message NoSignerOption does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message DeeplyNestedSigner.InnerOne does not contain field %s", fd.FullName())) } } @@ -5107,15 +5120,15 @@ func (x *fastReflection_NoSignerOption) Has(fd protoreflect.FieldDescriptor) boo // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_NoSignerOption) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_DeeplyNestedSigner_InnerOne) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "NoSignerOption.signer": - x.Signer = nil + case "DeeplyNestedSigner.InnerOne.inner_two": + x.InnerTwo = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: NoSignerOption")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedSigner.InnerOne")) } - panic(fmt.Errorf("message NoSignerOption does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message DeeplyNestedSigner.InnerOne does not contain field %s", fd.FullName())) } } @@ -5125,16 +5138,16 @@ func (x *fastReflection_NoSignerOption) Clear(fd protoreflect.FieldDescriptor) { // 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_NoSignerOption) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_DeeplyNestedSigner_InnerOne) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "NoSignerOption.signer": - value := x.Signer - return protoreflect.ValueOfBytes(value) + case "DeeplyNestedSigner.InnerOne.inner_two": + value := x.InnerTwo + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: NoSignerOption")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedSigner.InnerOne")) } - panic(fmt.Errorf("message NoSignerOption does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message DeeplyNestedSigner.InnerOne does not contain field %s", descriptor.FullName())) } } @@ -5148,15 +5161,15 @@ func (x *fastReflection_NoSignerOption) Get(descriptor protoreflect.FieldDescrip // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_NoSignerOption) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_DeeplyNestedSigner_InnerOne) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "NoSignerOption.signer": - x.Signer = value.Bytes() + case "DeeplyNestedSigner.InnerOne.inner_two": + x.InnerTwo = value.Message().Interface().(*DeeplyNestedSigner_InnerOne_InnerTwo) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: NoSignerOption")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedSigner.InnerOne")) } - panic(fmt.Errorf("message NoSignerOption does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message DeeplyNestedSigner.InnerOne does not contain field %s", fd.FullName())) } } @@ -5170,40 +5183,44 @@ func (x *fastReflection_NoSignerOption) Set(fd protoreflect.FieldDescriptor, val // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_NoSignerOption) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_DeeplyNestedSigner_InnerOne) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "NoSignerOption.signer": - panic(fmt.Errorf("field signer of message NoSignerOption is not mutable")) + case "DeeplyNestedSigner.InnerOne.inner_two": + if x.InnerTwo == nil { + x.InnerTwo = new(DeeplyNestedSigner_InnerOne_InnerTwo) + } + return protoreflect.ValueOfMessage(x.InnerTwo.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: NoSignerOption")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedSigner.InnerOne")) } - panic(fmt.Errorf("message NoSignerOption does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message DeeplyNestedSigner.InnerOne 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_NoSignerOption) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_DeeplyNestedSigner_InnerOne) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "NoSignerOption.signer": - return protoreflect.ValueOfBytes(nil) + case "DeeplyNestedSigner.InnerOne.inner_two": + m := new(DeeplyNestedSigner_InnerOne_InnerTwo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: NoSignerOption")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedSigner.InnerOne")) } - panic(fmt.Errorf("message NoSignerOption does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message DeeplyNestedSigner.InnerOne 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_NoSignerOption) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_DeeplyNestedSigner_InnerOne) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in NoSignerOption", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in DeeplyNestedSigner.InnerOne", d.FullName())) } panic("unreachable") } @@ -5211,7 +5228,7 @@ func (x *fastReflection_NoSignerOption) WhichOneof(d protoreflect.OneofDescripto // 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_NoSignerOption) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_DeeplyNestedSigner_InnerOne) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -5222,7 +5239,7 @@ func (x *fastReflection_NoSignerOption) 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_NoSignerOption) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_DeeplyNestedSigner_InnerOne) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -5234,7 +5251,7 @@ func (x *fastReflection_NoSignerOption) SetUnknown(fields protoreflect.RawFields // 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_NoSignerOption) IsValid() bool { +func (x *fastReflection_DeeplyNestedSigner_InnerOne) IsValid() bool { return x != nil } @@ -5244,9 +5261,9 @@ func (x *fastReflection_NoSignerOption) 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_NoSignerOption) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_DeeplyNestedSigner_InnerOne) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*NoSignerOption) + x := input.Message.Interface().(*DeeplyNestedSigner_InnerOne) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5258,8 +5275,8 @@ func (x *fastReflection_NoSignerOption) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Signer) - if l > 0 { + if x.InnerTwo != nil { + l = options.Size(x.InnerTwo) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { @@ -5272,7 +5289,7 @@ func (x *fastReflection_NoSignerOption) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*NoSignerOption) + x := input.Message.Interface().(*DeeplyNestedSigner_InnerOne) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5291,10 +5308,17 @@ func (x *fastReflection_NoSignerOption) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Signer) > 0 { - i -= len(x.Signer) - copy(dAtA[i:], x.Signer) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + if x.InnerTwo != nil { + encoded, err := options.Marshal(x.InnerTwo) + 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 } @@ -5309,7 +5333,7 @@ func (x *fastReflection_NoSignerOption) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*NoSignerOption) + x := input.Message.Interface().(*DeeplyNestedSigner_InnerOne) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5341,17 +5365,17 @@ func (x *fastReflection_NoSignerOption) 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: NoSignerOption: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DeeplyNestedSigner_InnerOne: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: NoSignerOption: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DeeplyNestedSigner_InnerOne: 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 Signer", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InnerTwo", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -5361,24 +5385,26 @@ func (x *fastReflection_NoSignerOption) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + byteLen + 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.Signer = append(x.Signer[:0], dAtA[iNdEx:postIndex]...) - if x.Signer == nil { - x.Signer = []byte{} + if x.InnerTwo == nil { + x.InnerTwo = &DeeplyNestedSigner_InnerOne_InnerTwo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.InnerTwo); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: @@ -5417,26 +5443,26 @@ func (x *fastReflection_NoSignerOption) ProtoMethods() *protoiface.Methods { } var ( - md_ValidatorSigner protoreflect.MessageDescriptor - fd_ValidatorSigner_signer protoreflect.FieldDescriptor + md_DeeplyNestedSigner_InnerOne_InnerTwo protoreflect.MessageDescriptor + fd_DeeplyNestedSigner_InnerOne_InnerTwo_signer protoreflect.FieldDescriptor ) func init() { file_signers_proto_init() - md_ValidatorSigner = File_signers_proto.Messages().ByName("ValidatorSigner") - fd_ValidatorSigner_signer = md_ValidatorSigner.Fields().ByName("signer") + md_DeeplyNestedSigner_InnerOne_InnerTwo = File_signers_proto.Messages().ByName("DeeplyNestedSigner").Messages().ByName("InnerOne").Messages().ByName("InnerTwo") + fd_DeeplyNestedSigner_InnerOne_InnerTwo_signer = md_DeeplyNestedSigner_InnerOne_InnerTwo.Fields().ByName("signer") } -var _ protoreflect.Message = (*fastReflection_ValidatorSigner)(nil) +var _ protoreflect.Message = (*fastReflection_DeeplyNestedSigner_InnerOne_InnerTwo)(nil) -type fastReflection_ValidatorSigner ValidatorSigner +type fastReflection_DeeplyNestedSigner_InnerOne_InnerTwo DeeplyNestedSigner_InnerOne_InnerTwo -func (x *ValidatorSigner) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValidatorSigner)(x) +func (x *DeeplyNestedSigner_InnerOne_InnerTwo) ProtoReflect() protoreflect.Message { + return (*fastReflection_DeeplyNestedSigner_InnerOne_InnerTwo)(x) } -func (x *ValidatorSigner) slowProtoReflect() protoreflect.Message { - mi := &file_signers_proto_msgTypes[8] +func (x *DeeplyNestedSigner_InnerOne_InnerTwo) slowProtoReflect() protoreflect.Message { + mi := &file_signers_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5447,43 +5473,43 @@ func (x *ValidatorSigner) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_ValidatorSigner_messageType fastReflection_ValidatorSigner_messageType -var _ protoreflect.MessageType = fastReflection_ValidatorSigner_messageType{} +var _fastReflection_DeeplyNestedSigner_InnerOne_InnerTwo_messageType fastReflection_DeeplyNestedSigner_InnerOne_InnerTwo_messageType +var _ protoreflect.MessageType = fastReflection_DeeplyNestedSigner_InnerOne_InnerTwo_messageType{} -type fastReflection_ValidatorSigner_messageType struct{} +type fastReflection_DeeplyNestedSigner_InnerOne_InnerTwo_messageType struct{} -func (x fastReflection_ValidatorSigner_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValidatorSigner)(nil) +func (x fastReflection_DeeplyNestedSigner_InnerOne_InnerTwo_messageType) Zero() protoreflect.Message { + return (*fastReflection_DeeplyNestedSigner_InnerOne_InnerTwo)(nil) } -func (x fastReflection_ValidatorSigner_messageType) New() protoreflect.Message { - return new(fastReflection_ValidatorSigner) +func (x fastReflection_DeeplyNestedSigner_InnerOne_InnerTwo_messageType) New() protoreflect.Message { + return new(fastReflection_DeeplyNestedSigner_InnerOne_InnerTwo) } -func (x fastReflection_ValidatorSigner_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorSigner +func (x fastReflection_DeeplyNestedSigner_InnerOne_InnerTwo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_DeeplyNestedSigner_InnerOne_InnerTwo } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_ValidatorSigner) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorSigner +func (x *fastReflection_DeeplyNestedSigner_InnerOne_InnerTwo) Descriptor() protoreflect.MessageDescriptor { + return md_DeeplyNestedSigner_InnerOne_InnerTwo } // 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_ValidatorSigner) Type() protoreflect.MessageType { - return _fastReflection_ValidatorSigner_messageType +func (x *fastReflection_DeeplyNestedSigner_InnerOne_InnerTwo) Type() protoreflect.MessageType { + return _fastReflection_DeeplyNestedSigner_InnerOne_InnerTwo_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_ValidatorSigner) New() protoreflect.Message { - return new(fastReflection_ValidatorSigner) +func (x *fastReflection_DeeplyNestedSigner_InnerOne_InnerTwo) New() protoreflect.Message { + return new(fastReflection_DeeplyNestedSigner_InnerOne_InnerTwo) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_ValidatorSigner) Interface() protoreflect.ProtoMessage { - return (*ValidatorSigner)(x) +func (x *fastReflection_DeeplyNestedSigner_InnerOne_InnerTwo) Interface() protoreflect.ProtoMessage { + return (*DeeplyNestedSigner_InnerOne_InnerTwo)(x) } // Range iterates over every populated field in an undefined order, @@ -5491,10 +5517,10 @@ func (x *fastReflection_ValidatorSigner) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_ValidatorSigner) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_DeeplyNestedSigner_InnerOne_InnerTwo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Signer != "" { value := protoreflect.ValueOfString(x.Signer) - if !f(fd_ValidatorSigner_signer, value) { + if !f(fd_DeeplyNestedSigner_InnerOne_InnerTwo_signer, value) { return } } @@ -5511,15 +5537,15 @@ func (x *fastReflection_ValidatorSigner) Range(f func(protoreflect.FieldDescript // 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_ValidatorSigner) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_DeeplyNestedSigner_InnerOne_InnerTwo) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "ValidatorSigner.signer": + case "DeeplyNestedSigner.InnerOne.InnerTwo.signer": return x.Signer != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: ValidatorSigner")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedSigner.InnerOne.InnerTwo")) } - panic(fmt.Errorf("message ValidatorSigner does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message DeeplyNestedSigner.InnerOne.InnerTwo does not contain field %s", fd.FullName())) } } @@ -5529,15 +5555,15 @@ func (x *fastReflection_ValidatorSigner) Has(fd protoreflect.FieldDescriptor) bo // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ValidatorSigner) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_DeeplyNestedSigner_InnerOne_InnerTwo) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "ValidatorSigner.signer": + case "DeeplyNestedSigner.InnerOne.InnerTwo.signer": x.Signer = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: ValidatorSigner")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedSigner.InnerOne.InnerTwo")) } - panic(fmt.Errorf("message ValidatorSigner does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message DeeplyNestedSigner.InnerOne.InnerTwo does not contain field %s", fd.FullName())) } } @@ -5547,16 +5573,3242 @@ func (x *fastReflection_ValidatorSigner) Clear(fd protoreflect.FieldDescriptor) // 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_ValidatorSigner) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_DeeplyNestedSigner_InnerOne_InnerTwo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "ValidatorSigner.signer": + case "DeeplyNestedSigner.InnerOne.InnerTwo.signer": value := x.Signer return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: ValidatorSigner")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedSigner.InnerOne.InnerTwo")) } - panic(fmt.Errorf("message ValidatorSigner does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message DeeplyNestedSigner.InnerOne.InnerTwo 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_DeeplyNestedSigner_InnerOne_InnerTwo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "DeeplyNestedSigner.InnerOne.InnerTwo.signer": + x.Signer = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedSigner.InnerOne.InnerTwo")) + } + panic(fmt.Errorf("message DeeplyNestedSigner.InnerOne.InnerTwo 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_DeeplyNestedSigner_InnerOne_InnerTwo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "DeeplyNestedSigner.InnerOne.InnerTwo.signer": + panic(fmt.Errorf("field signer of message DeeplyNestedSigner.InnerOne.InnerTwo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedSigner.InnerOne.InnerTwo")) + } + panic(fmt.Errorf("message DeeplyNestedSigner.InnerOne.InnerTwo 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_DeeplyNestedSigner_InnerOne_InnerTwo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "DeeplyNestedSigner.InnerOne.InnerTwo.signer": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedSigner.InnerOne.InnerTwo")) + } + panic(fmt.Errorf("message DeeplyNestedSigner.InnerOne.InnerTwo 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_DeeplyNestedSigner_InnerOne_InnerTwo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in DeeplyNestedSigner.InnerOne.InnerTwo", 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_DeeplyNestedSigner_InnerOne_InnerTwo) 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_DeeplyNestedSigner_InnerOne_InnerTwo) 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_DeeplyNestedSigner_InnerOne_InnerTwo) 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_DeeplyNestedSigner_InnerOne_InnerTwo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*DeeplyNestedSigner_InnerOne_InnerTwo) + 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.Signer) + 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().(*DeeplyNestedSigner_InnerOne_InnerTwo) + 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.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + 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().(*DeeplyNestedSigner_InnerOne_InnerTwo) + 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: DeeplyNestedSigner_InnerOne_InnerTwo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DeeplyNestedSigner_InnerOne_InnerTwo: 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 Signer", 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.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_DeeplyNestedRepeatedSigner_1_list)(nil) + +type _DeeplyNestedRepeatedSigner_1_list struct { + list *[]*DeeplyNestedRepeatedSigner_Inner +} + +func (x *_DeeplyNestedRepeatedSigner_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_DeeplyNestedRepeatedSigner_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_DeeplyNestedRepeatedSigner_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*DeeplyNestedRepeatedSigner_Inner) + (*x.list)[i] = concreteValue +} + +func (x *_DeeplyNestedRepeatedSigner_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*DeeplyNestedRepeatedSigner_Inner) + *x.list = append(*x.list, concreteValue) +} + +func (x *_DeeplyNestedRepeatedSigner_1_list) AppendMutable() protoreflect.Value { + v := new(DeeplyNestedRepeatedSigner_Inner) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_DeeplyNestedRepeatedSigner_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_DeeplyNestedRepeatedSigner_1_list) NewElement() protoreflect.Value { + v := new(DeeplyNestedRepeatedSigner_Inner) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_DeeplyNestedRepeatedSigner_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_DeeplyNestedRepeatedSigner protoreflect.MessageDescriptor + fd_DeeplyNestedRepeatedSigner_inner protoreflect.FieldDescriptor +) + +func init() { + file_signers_proto_init() + md_DeeplyNestedRepeatedSigner = File_signers_proto.Messages().ByName("DeeplyNestedRepeatedSigner") + fd_DeeplyNestedRepeatedSigner_inner = md_DeeplyNestedRepeatedSigner.Fields().ByName("inner") +} + +var _ protoreflect.Message = (*fastReflection_DeeplyNestedRepeatedSigner)(nil) + +type fastReflection_DeeplyNestedRepeatedSigner DeeplyNestedRepeatedSigner + +func (x *DeeplyNestedRepeatedSigner) ProtoReflect() protoreflect.Message { + return (*fastReflection_DeeplyNestedRepeatedSigner)(x) +} + +func (x *DeeplyNestedRepeatedSigner) slowProtoReflect() protoreflect.Message { + mi := &file_signers_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_DeeplyNestedRepeatedSigner_messageType fastReflection_DeeplyNestedRepeatedSigner_messageType +var _ protoreflect.MessageType = fastReflection_DeeplyNestedRepeatedSigner_messageType{} + +type fastReflection_DeeplyNestedRepeatedSigner_messageType struct{} + +func (x fastReflection_DeeplyNestedRepeatedSigner_messageType) Zero() protoreflect.Message { + return (*fastReflection_DeeplyNestedRepeatedSigner)(nil) +} +func (x fastReflection_DeeplyNestedRepeatedSigner_messageType) New() protoreflect.Message { + return new(fastReflection_DeeplyNestedRepeatedSigner) +} +func (x fastReflection_DeeplyNestedRepeatedSigner_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_DeeplyNestedRepeatedSigner +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_DeeplyNestedRepeatedSigner) Descriptor() protoreflect.MessageDescriptor { + return md_DeeplyNestedRepeatedSigner +} + +// 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_DeeplyNestedRepeatedSigner) Type() protoreflect.MessageType { + return _fastReflection_DeeplyNestedRepeatedSigner_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_DeeplyNestedRepeatedSigner) New() protoreflect.Message { + return new(fastReflection_DeeplyNestedRepeatedSigner) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_DeeplyNestedRepeatedSigner) Interface() protoreflect.ProtoMessage { + return (*DeeplyNestedRepeatedSigner)(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_DeeplyNestedRepeatedSigner) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Inner) != 0 { + value := protoreflect.ValueOfList(&_DeeplyNestedRepeatedSigner_1_list{list: &x.Inner}) + if !f(fd_DeeplyNestedRepeatedSigner_inner, 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_DeeplyNestedRepeatedSigner) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "DeeplyNestedRepeatedSigner.inner": + return len(x.Inner) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedRepeatedSigner")) + } + panic(fmt.Errorf("message DeeplyNestedRepeatedSigner 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_DeeplyNestedRepeatedSigner) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "DeeplyNestedRepeatedSigner.inner": + x.Inner = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedRepeatedSigner")) + } + panic(fmt.Errorf("message DeeplyNestedRepeatedSigner 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_DeeplyNestedRepeatedSigner) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "DeeplyNestedRepeatedSigner.inner": + if len(x.Inner) == 0 { + return protoreflect.ValueOfList(&_DeeplyNestedRepeatedSigner_1_list{}) + } + listValue := &_DeeplyNestedRepeatedSigner_1_list{list: &x.Inner} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedRepeatedSigner")) + } + panic(fmt.Errorf("message DeeplyNestedRepeatedSigner 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_DeeplyNestedRepeatedSigner) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "DeeplyNestedRepeatedSigner.inner": + lv := value.List() + clv := lv.(*_DeeplyNestedRepeatedSigner_1_list) + x.Inner = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedRepeatedSigner")) + } + panic(fmt.Errorf("message DeeplyNestedRepeatedSigner 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_DeeplyNestedRepeatedSigner) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "DeeplyNestedRepeatedSigner.inner": + if x.Inner == nil { + x.Inner = []*DeeplyNestedRepeatedSigner_Inner{} + } + value := &_DeeplyNestedRepeatedSigner_1_list{list: &x.Inner} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedRepeatedSigner")) + } + panic(fmt.Errorf("message DeeplyNestedRepeatedSigner 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_DeeplyNestedRepeatedSigner) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "DeeplyNestedRepeatedSigner.inner": + list := []*DeeplyNestedRepeatedSigner_Inner{} + return protoreflect.ValueOfList(&_DeeplyNestedRepeatedSigner_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedRepeatedSigner")) + } + panic(fmt.Errorf("message DeeplyNestedRepeatedSigner 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_DeeplyNestedRepeatedSigner) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in DeeplyNestedRepeatedSigner", 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_DeeplyNestedRepeatedSigner) 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_DeeplyNestedRepeatedSigner) 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_DeeplyNestedRepeatedSigner) 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_DeeplyNestedRepeatedSigner) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*DeeplyNestedRepeatedSigner) + 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.Inner) > 0 { + for _, e := range x.Inner { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*DeeplyNestedRepeatedSigner) + 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.Inner) > 0 { + for iNdEx := len(x.Inner) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Inner[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().(*DeeplyNestedRepeatedSigner) + 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: DeeplyNestedRepeatedSigner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DeeplyNestedRepeatedSigner: 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 Inner", 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.Inner = append(x.Inner, &DeeplyNestedRepeatedSigner_Inner{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Inner[len(x.Inner)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_DeeplyNestedRepeatedSigner_Inner_1_list)(nil) + +type _DeeplyNestedRepeatedSigner_Inner_1_list struct { + list *[]*DeeplyNestedRepeatedSigner_Inner_Inner +} + +func (x *_DeeplyNestedRepeatedSigner_Inner_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_DeeplyNestedRepeatedSigner_Inner_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_DeeplyNestedRepeatedSigner_Inner_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*DeeplyNestedRepeatedSigner_Inner_Inner) + (*x.list)[i] = concreteValue +} + +func (x *_DeeplyNestedRepeatedSigner_Inner_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*DeeplyNestedRepeatedSigner_Inner_Inner) + *x.list = append(*x.list, concreteValue) +} + +func (x *_DeeplyNestedRepeatedSigner_Inner_1_list) AppendMutable() protoreflect.Value { + v := new(DeeplyNestedRepeatedSigner_Inner_Inner) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_DeeplyNestedRepeatedSigner_Inner_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_DeeplyNestedRepeatedSigner_Inner_1_list) NewElement() protoreflect.Value { + v := new(DeeplyNestedRepeatedSigner_Inner_Inner) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_DeeplyNestedRepeatedSigner_Inner_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_DeeplyNestedRepeatedSigner_Inner protoreflect.MessageDescriptor + fd_DeeplyNestedRepeatedSigner_Inner_inner protoreflect.FieldDescriptor +) + +func init() { + file_signers_proto_init() + md_DeeplyNestedRepeatedSigner_Inner = File_signers_proto.Messages().ByName("DeeplyNestedRepeatedSigner").Messages().ByName("Inner") + fd_DeeplyNestedRepeatedSigner_Inner_inner = md_DeeplyNestedRepeatedSigner_Inner.Fields().ByName("inner") +} + +var _ protoreflect.Message = (*fastReflection_DeeplyNestedRepeatedSigner_Inner)(nil) + +type fastReflection_DeeplyNestedRepeatedSigner_Inner DeeplyNestedRepeatedSigner_Inner + +func (x *DeeplyNestedRepeatedSigner_Inner) ProtoReflect() protoreflect.Message { + return (*fastReflection_DeeplyNestedRepeatedSigner_Inner)(x) +} + +func (x *DeeplyNestedRepeatedSigner_Inner) slowProtoReflect() protoreflect.Message { + mi := &file_signers_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_DeeplyNestedRepeatedSigner_Inner_messageType fastReflection_DeeplyNestedRepeatedSigner_Inner_messageType +var _ protoreflect.MessageType = fastReflection_DeeplyNestedRepeatedSigner_Inner_messageType{} + +type fastReflection_DeeplyNestedRepeatedSigner_Inner_messageType struct{} + +func (x fastReflection_DeeplyNestedRepeatedSigner_Inner_messageType) Zero() protoreflect.Message { + return (*fastReflection_DeeplyNestedRepeatedSigner_Inner)(nil) +} +func (x fastReflection_DeeplyNestedRepeatedSigner_Inner_messageType) New() protoreflect.Message { + return new(fastReflection_DeeplyNestedRepeatedSigner_Inner) +} +func (x fastReflection_DeeplyNestedRepeatedSigner_Inner_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_DeeplyNestedRepeatedSigner_Inner +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_DeeplyNestedRepeatedSigner_Inner) Descriptor() protoreflect.MessageDescriptor { + return md_DeeplyNestedRepeatedSigner_Inner +} + +// 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_DeeplyNestedRepeatedSigner_Inner) Type() protoreflect.MessageType { + return _fastReflection_DeeplyNestedRepeatedSigner_Inner_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_DeeplyNestedRepeatedSigner_Inner) New() protoreflect.Message { + return new(fastReflection_DeeplyNestedRepeatedSigner_Inner) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_DeeplyNestedRepeatedSigner_Inner) Interface() protoreflect.ProtoMessage { + return (*DeeplyNestedRepeatedSigner_Inner)(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_DeeplyNestedRepeatedSigner_Inner) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Inner) != 0 { + value := protoreflect.ValueOfList(&_DeeplyNestedRepeatedSigner_Inner_1_list{list: &x.Inner}) + if !f(fd_DeeplyNestedRepeatedSigner_Inner_inner, 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_DeeplyNestedRepeatedSigner_Inner) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "DeeplyNestedRepeatedSigner.Inner.inner": + return len(x.Inner) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedRepeatedSigner.Inner")) + } + panic(fmt.Errorf("message DeeplyNestedRepeatedSigner.Inner 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_DeeplyNestedRepeatedSigner_Inner) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "DeeplyNestedRepeatedSigner.Inner.inner": + x.Inner = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedRepeatedSigner.Inner")) + } + panic(fmt.Errorf("message DeeplyNestedRepeatedSigner.Inner 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_DeeplyNestedRepeatedSigner_Inner) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "DeeplyNestedRepeatedSigner.Inner.inner": + if len(x.Inner) == 0 { + return protoreflect.ValueOfList(&_DeeplyNestedRepeatedSigner_Inner_1_list{}) + } + listValue := &_DeeplyNestedRepeatedSigner_Inner_1_list{list: &x.Inner} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedRepeatedSigner.Inner")) + } + panic(fmt.Errorf("message DeeplyNestedRepeatedSigner.Inner 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_DeeplyNestedRepeatedSigner_Inner) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "DeeplyNestedRepeatedSigner.Inner.inner": + lv := value.List() + clv := lv.(*_DeeplyNestedRepeatedSigner_Inner_1_list) + x.Inner = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedRepeatedSigner.Inner")) + } + panic(fmt.Errorf("message DeeplyNestedRepeatedSigner.Inner 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_DeeplyNestedRepeatedSigner_Inner) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "DeeplyNestedRepeatedSigner.Inner.inner": + if x.Inner == nil { + x.Inner = []*DeeplyNestedRepeatedSigner_Inner_Inner{} + } + value := &_DeeplyNestedRepeatedSigner_Inner_1_list{list: &x.Inner} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedRepeatedSigner.Inner")) + } + panic(fmt.Errorf("message DeeplyNestedRepeatedSigner.Inner 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_DeeplyNestedRepeatedSigner_Inner) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "DeeplyNestedRepeatedSigner.Inner.inner": + list := []*DeeplyNestedRepeatedSigner_Inner_Inner{} + return protoreflect.ValueOfList(&_DeeplyNestedRepeatedSigner_Inner_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedRepeatedSigner.Inner")) + } + panic(fmt.Errorf("message DeeplyNestedRepeatedSigner.Inner 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_DeeplyNestedRepeatedSigner_Inner) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in DeeplyNestedRepeatedSigner.Inner", 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_DeeplyNestedRepeatedSigner_Inner) 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_DeeplyNestedRepeatedSigner_Inner) 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_DeeplyNestedRepeatedSigner_Inner) 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_DeeplyNestedRepeatedSigner_Inner) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*DeeplyNestedRepeatedSigner_Inner) + 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.Inner) > 0 { + for _, e := range x.Inner { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*DeeplyNestedRepeatedSigner_Inner) + 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.Inner) > 0 { + for iNdEx := len(x.Inner) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Inner[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().(*DeeplyNestedRepeatedSigner_Inner) + 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: DeeplyNestedRepeatedSigner_Inner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DeeplyNestedRepeatedSigner_Inner: 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 Inner", 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.Inner = append(x.Inner, &DeeplyNestedRepeatedSigner_Inner_Inner{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Inner[len(x.Inner)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_DeeplyNestedRepeatedSigner_Inner_Inner_1_list)(nil) + +type _DeeplyNestedRepeatedSigner_Inner_Inner_1_list struct { + list *[]*DeeplyNestedRepeatedSigner_Inner_Inner_Bottom +} + +func (x *_DeeplyNestedRepeatedSigner_Inner_Inner_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_DeeplyNestedRepeatedSigner_Inner_Inner_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_DeeplyNestedRepeatedSigner_Inner_Inner_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) + (*x.list)[i] = concreteValue +} + +func (x *_DeeplyNestedRepeatedSigner_Inner_Inner_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) + *x.list = append(*x.list, concreteValue) +} + +func (x *_DeeplyNestedRepeatedSigner_Inner_Inner_1_list) AppendMutable() protoreflect.Value { + v := new(DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_DeeplyNestedRepeatedSigner_Inner_Inner_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_DeeplyNestedRepeatedSigner_Inner_Inner_1_list) NewElement() protoreflect.Value { + v := new(DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_DeeplyNestedRepeatedSigner_Inner_Inner_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_DeeplyNestedRepeatedSigner_Inner_Inner protoreflect.MessageDescriptor + fd_DeeplyNestedRepeatedSigner_Inner_Inner_inner protoreflect.FieldDescriptor +) + +func init() { + file_signers_proto_init() + md_DeeplyNestedRepeatedSigner_Inner_Inner = File_signers_proto.Messages().ByName("DeeplyNestedRepeatedSigner").Messages().ByName("Inner").Messages().ByName("Inner") + fd_DeeplyNestedRepeatedSigner_Inner_Inner_inner = md_DeeplyNestedRepeatedSigner_Inner_Inner.Fields().ByName("inner") +} + +var _ protoreflect.Message = (*fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner)(nil) + +type fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner DeeplyNestedRepeatedSigner_Inner_Inner + +func (x *DeeplyNestedRepeatedSigner_Inner_Inner) ProtoReflect() protoreflect.Message { + return (*fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner)(x) +} + +func (x *DeeplyNestedRepeatedSigner_Inner_Inner) slowProtoReflect() protoreflect.Message { + mi := &file_signers_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner_messageType fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner_messageType +var _ protoreflect.MessageType = fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner_messageType{} + +type fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner_messageType struct{} + +func (x fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner_messageType) Zero() protoreflect.Message { + return (*fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner)(nil) +} +func (x fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner_messageType) New() protoreflect.Message { + return new(fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner) +} +func (x fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_DeeplyNestedRepeatedSigner_Inner_Inner +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner) Descriptor() protoreflect.MessageDescriptor { + return md_DeeplyNestedRepeatedSigner_Inner_Inner +} + +// 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_DeeplyNestedRepeatedSigner_Inner_Inner) Type() protoreflect.MessageType { + return _fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner) New() protoreflect.Message { + return new(fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner) Interface() protoreflect.ProtoMessage { + return (*DeeplyNestedRepeatedSigner_Inner_Inner)(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_DeeplyNestedRepeatedSigner_Inner_Inner) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Inner) != 0 { + value := protoreflect.ValueOfList(&_DeeplyNestedRepeatedSigner_Inner_Inner_1_list{list: &x.Inner}) + if !f(fd_DeeplyNestedRepeatedSigner_Inner_Inner_inner, 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_DeeplyNestedRepeatedSigner_Inner_Inner) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "DeeplyNestedRepeatedSigner.Inner.Inner.inner": + return len(x.Inner) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedRepeatedSigner.Inner.Inner")) + } + panic(fmt.Errorf("message DeeplyNestedRepeatedSigner.Inner.Inner 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_DeeplyNestedRepeatedSigner_Inner_Inner) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "DeeplyNestedRepeatedSigner.Inner.Inner.inner": + x.Inner = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedRepeatedSigner.Inner.Inner")) + } + panic(fmt.Errorf("message DeeplyNestedRepeatedSigner.Inner.Inner 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_DeeplyNestedRepeatedSigner_Inner_Inner) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "DeeplyNestedRepeatedSigner.Inner.Inner.inner": + if len(x.Inner) == 0 { + return protoreflect.ValueOfList(&_DeeplyNestedRepeatedSigner_Inner_Inner_1_list{}) + } + listValue := &_DeeplyNestedRepeatedSigner_Inner_Inner_1_list{list: &x.Inner} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedRepeatedSigner.Inner.Inner")) + } + panic(fmt.Errorf("message DeeplyNestedRepeatedSigner.Inner.Inner 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_DeeplyNestedRepeatedSigner_Inner_Inner) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "DeeplyNestedRepeatedSigner.Inner.Inner.inner": + lv := value.List() + clv := lv.(*_DeeplyNestedRepeatedSigner_Inner_Inner_1_list) + x.Inner = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedRepeatedSigner.Inner.Inner")) + } + panic(fmt.Errorf("message DeeplyNestedRepeatedSigner.Inner.Inner 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_DeeplyNestedRepeatedSigner_Inner_Inner) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "DeeplyNestedRepeatedSigner.Inner.Inner.inner": + if x.Inner == nil { + x.Inner = []*DeeplyNestedRepeatedSigner_Inner_Inner_Bottom{} + } + value := &_DeeplyNestedRepeatedSigner_Inner_Inner_1_list{list: &x.Inner} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedRepeatedSigner.Inner.Inner")) + } + panic(fmt.Errorf("message DeeplyNestedRepeatedSigner.Inner.Inner 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_DeeplyNestedRepeatedSigner_Inner_Inner) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "DeeplyNestedRepeatedSigner.Inner.Inner.inner": + list := []*DeeplyNestedRepeatedSigner_Inner_Inner_Bottom{} + return protoreflect.ValueOfList(&_DeeplyNestedRepeatedSigner_Inner_Inner_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedRepeatedSigner.Inner.Inner")) + } + panic(fmt.Errorf("message DeeplyNestedRepeatedSigner.Inner.Inner 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_DeeplyNestedRepeatedSigner_Inner_Inner) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in DeeplyNestedRepeatedSigner.Inner.Inner", 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_DeeplyNestedRepeatedSigner_Inner_Inner) 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_DeeplyNestedRepeatedSigner_Inner_Inner) 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_DeeplyNestedRepeatedSigner_Inner_Inner) 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_DeeplyNestedRepeatedSigner_Inner_Inner) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*DeeplyNestedRepeatedSigner_Inner_Inner) + 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.Inner) > 0 { + for _, e := range x.Inner { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*DeeplyNestedRepeatedSigner_Inner_Inner) + 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.Inner) > 0 { + for iNdEx := len(x.Inner) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Inner[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().(*DeeplyNestedRepeatedSigner_Inner_Inner) + 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: DeeplyNestedRepeatedSigner_Inner_Inner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DeeplyNestedRepeatedSigner_Inner_Inner: 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 Inner", 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.Inner = append(x.Inner, &DeeplyNestedRepeatedSigner_Inner_Inner_Bottom{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Inner[len(x.Inner)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_1_list)(nil) + +type _DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_1_list struct { + list *[]string +} + +func (x *_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_1_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message DeeplyNestedRepeatedSigner_Inner_Inner_Bottom at list field Signer as it is not of Message kind")) +} + +func (x *_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_1_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_1_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom protoreflect.MessageDescriptor + fd_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_signer protoreflect.FieldDescriptor +) + +func init() { + file_signers_proto_init() + md_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom = File_signers_proto.Messages().ByName("DeeplyNestedRepeatedSigner").Messages().ByName("Inner").Messages().ByName("Inner").Messages().ByName("Bottom") + fd_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_signer = md_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom.Fields().ByName("signer") +} + +var _ protoreflect.Message = (*fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom)(nil) + +type fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom DeeplyNestedRepeatedSigner_Inner_Inner_Bottom + +func (x *DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) ProtoReflect() protoreflect.Message { + return (*fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom)(x) +} + +func (x *DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) slowProtoReflect() protoreflect.Message { + mi := &file_signers_proto_msgTypes[19] + 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_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_messageType fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_messageType +var _ protoreflect.MessageType = fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_messageType{} + +type fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_messageType struct{} + +func (x fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_messageType) Zero() protoreflect.Message { + return (*fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom)(nil) +} +func (x fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_messageType) New() protoreflect.Message { + return new(fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) +} +func (x fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) Descriptor() protoreflect.MessageDescriptor { + return md_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom +} + +// 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_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) Type() protoreflect.MessageType { + return _fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) New() protoreflect.Message { + return new(fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) Interface() protoreflect.ProtoMessage { + return (*DeeplyNestedRepeatedSigner_Inner_Inner_Bottom)(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_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Signer) != 0 { + value := protoreflect.ValueOfList(&_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_1_list{list: &x.Signer}) + if !f(fd_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_signer, 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_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "DeeplyNestedRepeatedSigner.Inner.Inner.Bottom.signer": + return len(x.Signer) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedRepeatedSigner.Inner.Inner.Bottom")) + } + panic(fmt.Errorf("message DeeplyNestedRepeatedSigner.Inner.Inner.Bottom 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_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "DeeplyNestedRepeatedSigner.Inner.Inner.Bottom.signer": + x.Signer = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedRepeatedSigner.Inner.Inner.Bottom")) + } + panic(fmt.Errorf("message DeeplyNestedRepeatedSigner.Inner.Inner.Bottom 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_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "DeeplyNestedRepeatedSigner.Inner.Inner.Bottom.signer": + if len(x.Signer) == 0 { + return protoreflect.ValueOfList(&_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_1_list{}) + } + listValue := &_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_1_list{list: &x.Signer} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedRepeatedSigner.Inner.Inner.Bottom")) + } + panic(fmt.Errorf("message DeeplyNestedRepeatedSigner.Inner.Inner.Bottom 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_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "DeeplyNestedRepeatedSigner.Inner.Inner.Bottom.signer": + lv := value.List() + clv := lv.(*_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_1_list) + x.Signer = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedRepeatedSigner.Inner.Inner.Bottom")) + } + panic(fmt.Errorf("message DeeplyNestedRepeatedSigner.Inner.Inner.Bottom 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_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "DeeplyNestedRepeatedSigner.Inner.Inner.Bottom.signer": + if x.Signer == nil { + x.Signer = []string{} + } + value := &_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_1_list{list: &x.Signer} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedRepeatedSigner.Inner.Inner.Bottom")) + } + panic(fmt.Errorf("message DeeplyNestedRepeatedSigner.Inner.Inner.Bottom 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_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "DeeplyNestedRepeatedSigner.Inner.Inner.Bottom.signer": + list := []string{} + return protoreflect.ValueOfList(&_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: DeeplyNestedRepeatedSigner.Inner.Inner.Bottom")) + } + panic(fmt.Errorf("message DeeplyNestedRepeatedSigner.Inner.Inner.Bottom 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_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in DeeplyNestedRepeatedSigner.Inner.Inner.Bottom", 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_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) 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_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) 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_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) 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_DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) + 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.Signer) > 0 { + for _, s := range x.Signer { + l = len(s) + 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().(*DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) + 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.Signer) > 0 { + for iNdEx := len(x.Signer) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Signer[iNdEx]) + copy(dAtA[i:], x.Signer[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer[iNdEx]))) + 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().(*DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) + 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: DeeplyNestedRepeatedSigner_Inner_Inner_Bottom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DeeplyNestedRepeatedSigner_Inner_Inner_Bottom: 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 Signer", 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.Signer = append(x.Signer, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_BadSigner protoreflect.MessageDescriptor + fd_BadSigner_signer protoreflect.FieldDescriptor +) + +func init() { + file_signers_proto_init() + md_BadSigner = File_signers_proto.Messages().ByName("BadSigner") + fd_BadSigner_signer = md_BadSigner.Fields().ByName("signer") +} + +var _ protoreflect.Message = (*fastReflection_BadSigner)(nil) + +type fastReflection_BadSigner BadSigner + +func (x *BadSigner) ProtoReflect() protoreflect.Message { + return (*fastReflection_BadSigner)(x) +} + +func (x *BadSigner) slowProtoReflect() protoreflect.Message { + mi := &file_signers_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_BadSigner_messageType fastReflection_BadSigner_messageType +var _ protoreflect.MessageType = fastReflection_BadSigner_messageType{} + +type fastReflection_BadSigner_messageType struct{} + +func (x fastReflection_BadSigner_messageType) Zero() protoreflect.Message { + return (*fastReflection_BadSigner)(nil) +} +func (x fastReflection_BadSigner_messageType) New() protoreflect.Message { + return new(fastReflection_BadSigner) +} +func (x fastReflection_BadSigner_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_BadSigner +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_BadSigner) Descriptor() protoreflect.MessageDescriptor { + return md_BadSigner +} + +// 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_BadSigner) Type() protoreflect.MessageType { + return _fastReflection_BadSigner_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_BadSigner) New() protoreflect.Message { + return new(fastReflection_BadSigner) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_BadSigner) Interface() protoreflect.ProtoMessage { + return (*BadSigner)(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_BadSigner) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Signer) != 0 { + value := protoreflect.ValueOfBytes(x.Signer) + if !f(fd_BadSigner_signer, 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_BadSigner) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "BadSigner.signer": + return len(x.Signer) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: BadSigner")) + } + panic(fmt.Errorf("message BadSigner 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_BadSigner) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "BadSigner.signer": + x.Signer = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: BadSigner")) + } + panic(fmt.Errorf("message BadSigner 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_BadSigner) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "BadSigner.signer": + value := x.Signer + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: BadSigner")) + } + panic(fmt.Errorf("message BadSigner 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_BadSigner) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "BadSigner.signer": + x.Signer = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: BadSigner")) + } + panic(fmt.Errorf("message BadSigner 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_BadSigner) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "BadSigner.signer": + panic(fmt.Errorf("field signer of message BadSigner is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: BadSigner")) + } + panic(fmt.Errorf("message BadSigner 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_BadSigner) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "BadSigner.signer": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: BadSigner")) + } + panic(fmt.Errorf("message BadSigner 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_BadSigner) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in BadSigner", 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_BadSigner) 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_BadSigner) 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_BadSigner) 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_BadSigner) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*BadSigner) + 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.Signer) + 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().(*BadSigner) + 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.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + 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().(*BadSigner) + 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: BadSigner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BadSigner: 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 Signer", 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.Signer = append(x.Signer[:0], dAtA[iNdEx:postIndex]...) + if x.Signer == nil { + x.Signer = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_NoSignerOption protoreflect.MessageDescriptor + fd_NoSignerOption_signer protoreflect.FieldDescriptor +) + +func init() { + file_signers_proto_init() + md_NoSignerOption = File_signers_proto.Messages().ByName("NoSignerOption") + fd_NoSignerOption_signer = md_NoSignerOption.Fields().ByName("signer") +} + +var _ protoreflect.Message = (*fastReflection_NoSignerOption)(nil) + +type fastReflection_NoSignerOption NoSignerOption + +func (x *NoSignerOption) ProtoReflect() protoreflect.Message { + return (*fastReflection_NoSignerOption)(x) +} + +func (x *NoSignerOption) slowProtoReflect() protoreflect.Message { + mi := &file_signers_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_NoSignerOption_messageType fastReflection_NoSignerOption_messageType +var _ protoreflect.MessageType = fastReflection_NoSignerOption_messageType{} + +type fastReflection_NoSignerOption_messageType struct{} + +func (x fastReflection_NoSignerOption_messageType) Zero() protoreflect.Message { + return (*fastReflection_NoSignerOption)(nil) +} +func (x fastReflection_NoSignerOption_messageType) New() protoreflect.Message { + return new(fastReflection_NoSignerOption) +} +func (x fastReflection_NoSignerOption_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_NoSignerOption +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_NoSignerOption) Descriptor() protoreflect.MessageDescriptor { + return md_NoSignerOption +} + +// 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_NoSignerOption) Type() protoreflect.MessageType { + return _fastReflection_NoSignerOption_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_NoSignerOption) New() protoreflect.Message { + return new(fastReflection_NoSignerOption) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_NoSignerOption) Interface() protoreflect.ProtoMessage { + return (*NoSignerOption)(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_NoSignerOption) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Signer) != 0 { + value := protoreflect.ValueOfBytes(x.Signer) + if !f(fd_NoSignerOption_signer, 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_NoSignerOption) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "NoSignerOption.signer": + return len(x.Signer) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: NoSignerOption")) + } + panic(fmt.Errorf("message NoSignerOption 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_NoSignerOption) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "NoSignerOption.signer": + x.Signer = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: NoSignerOption")) + } + panic(fmt.Errorf("message NoSignerOption 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_NoSignerOption) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "NoSignerOption.signer": + value := x.Signer + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: NoSignerOption")) + } + panic(fmt.Errorf("message NoSignerOption 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_NoSignerOption) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "NoSignerOption.signer": + x.Signer = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: NoSignerOption")) + } + panic(fmt.Errorf("message NoSignerOption 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_NoSignerOption) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "NoSignerOption.signer": + panic(fmt.Errorf("field signer of message NoSignerOption is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: NoSignerOption")) + } + panic(fmt.Errorf("message NoSignerOption 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_NoSignerOption) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "NoSignerOption.signer": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: NoSignerOption")) + } + panic(fmt.Errorf("message NoSignerOption 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_NoSignerOption) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in NoSignerOption", 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_NoSignerOption) 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_NoSignerOption) 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_NoSignerOption) 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_NoSignerOption) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*NoSignerOption) + 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.Signer) + 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().(*NoSignerOption) + 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.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + 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().(*NoSignerOption) + 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: NoSignerOption: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: NoSignerOption: 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 Signer", 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.Signer = append(x.Signer[:0], dAtA[iNdEx:postIndex]...) + if x.Signer == nil { + x.Signer = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_ValidatorSigner protoreflect.MessageDescriptor + fd_ValidatorSigner_signer protoreflect.FieldDescriptor +) + +func init() { + file_signers_proto_init() + md_ValidatorSigner = File_signers_proto.Messages().ByName("ValidatorSigner") + fd_ValidatorSigner_signer = md_ValidatorSigner.Fields().ByName("signer") +} + +var _ protoreflect.Message = (*fastReflection_ValidatorSigner)(nil) + +type fastReflection_ValidatorSigner ValidatorSigner + +func (x *ValidatorSigner) ProtoReflect() protoreflect.Message { + return (*fastReflection_ValidatorSigner)(x) +} + +func (x *ValidatorSigner) slowProtoReflect() protoreflect.Message { + mi := &file_signers_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ValidatorSigner_messageType fastReflection_ValidatorSigner_messageType +var _ protoreflect.MessageType = fastReflection_ValidatorSigner_messageType{} + +type fastReflection_ValidatorSigner_messageType struct{} + +func (x fastReflection_ValidatorSigner_messageType) Zero() protoreflect.Message { + return (*fastReflection_ValidatorSigner)(nil) +} +func (x fastReflection_ValidatorSigner_messageType) New() protoreflect.Message { + return new(fastReflection_ValidatorSigner) +} +func (x fastReflection_ValidatorSigner_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorSigner +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ValidatorSigner) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorSigner +} + +// 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_ValidatorSigner) Type() protoreflect.MessageType { + return _fastReflection_ValidatorSigner_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ValidatorSigner) New() protoreflect.Message { + return new(fastReflection_ValidatorSigner) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ValidatorSigner) Interface() protoreflect.ProtoMessage { + return (*ValidatorSigner)(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_ValidatorSigner) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_ValidatorSigner_signer, 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_ValidatorSigner) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ValidatorSigner.signer": + return x.Signer != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ValidatorSigner")) + } + panic(fmt.Errorf("message ValidatorSigner 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_ValidatorSigner) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ValidatorSigner.signer": + x.Signer = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ValidatorSigner")) + } + panic(fmt.Errorf("message ValidatorSigner 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_ValidatorSigner) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ValidatorSigner.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ValidatorSigner")) + } + panic(fmt.Errorf("message ValidatorSigner does not contain field %s", descriptor.FullName())) } } @@ -5982,77 +9234,147 @@ func (*RepeatedNestedSigner) Descriptor() ([]byte, []int) { return file_signers_proto_rawDescGZIP(), []int{3} } -func (x *RepeatedNestedSigner) GetInner() []*RepeatedNestedSigner_Inner { +func (x *RepeatedNestedSigner) GetInner() []*RepeatedNestedSigner_Inner { + if x != nil { + return x.Inner + } + return nil +} + +type NestedRepeatedSigner struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Inner *NestedRepeatedSigner_Inner `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` +} + +func (x *NestedRepeatedSigner) Reset() { + *x = NestedRepeatedSigner{} + if protoimpl.UnsafeEnabled { + mi := &file_signers_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NestedRepeatedSigner) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NestedRepeatedSigner) ProtoMessage() {} + +// Deprecated: Use NestedRepeatedSigner.ProtoReflect.Descriptor instead. +func (*NestedRepeatedSigner) Descriptor() ([]byte, []int) { + return file_signers_proto_rawDescGZIP(), []int{4} +} + +func (x *NestedRepeatedSigner) GetInner() *NestedRepeatedSigner_Inner { + if x != nil { + return x.Inner + } + return nil +} + +type RepeatedNestedRepeatedSigner struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Inner []*RepeatedNestedRepeatedSigner_Inner `protobuf:"bytes,1,rep,name=inner,proto3" json:"inner,omitempty"` +} + +func (x *RepeatedNestedRepeatedSigner) Reset() { + *x = RepeatedNestedRepeatedSigner{} + if protoimpl.UnsafeEnabled { + mi := &file_signers_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RepeatedNestedRepeatedSigner) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RepeatedNestedRepeatedSigner) ProtoMessage() {} + +// Deprecated: Use RepeatedNestedRepeatedSigner.ProtoReflect.Descriptor instead. +func (*RepeatedNestedRepeatedSigner) Descriptor() ([]byte, []int) { + return file_signers_proto_rawDescGZIP(), []int{5} +} + +func (x *RepeatedNestedRepeatedSigner) GetInner() []*RepeatedNestedRepeatedSigner_Inner { if x != nil { return x.Inner } return nil } -type NestedRepeatedSigner struct { +type DeeplyNestedSigner struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Inner *NestedRepeatedSigner_Inner `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` + InnerOne *DeeplyNestedSigner_InnerOne `protobuf:"bytes,1,opt,name=inner_one,json=innerOne,proto3" json:"inner_one,omitempty"` } -func (x *NestedRepeatedSigner) Reset() { - *x = NestedRepeatedSigner{} +func (x *DeeplyNestedSigner) Reset() { + *x = DeeplyNestedSigner{} if protoimpl.UnsafeEnabled { - mi := &file_signers_proto_msgTypes[4] + mi := &file_signers_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *NestedRepeatedSigner) String() string { +func (x *DeeplyNestedSigner) String() string { return protoimpl.X.MessageStringOf(x) } -func (*NestedRepeatedSigner) ProtoMessage() {} +func (*DeeplyNestedSigner) ProtoMessage() {} -// Deprecated: Use NestedRepeatedSigner.ProtoReflect.Descriptor instead. -func (*NestedRepeatedSigner) Descriptor() ([]byte, []int) { - return file_signers_proto_rawDescGZIP(), []int{4} +// Deprecated: Use DeeplyNestedSigner.ProtoReflect.Descriptor instead. +func (*DeeplyNestedSigner) Descriptor() ([]byte, []int) { + return file_signers_proto_rawDescGZIP(), []int{6} } -func (x *NestedRepeatedSigner) GetInner() *NestedRepeatedSigner_Inner { +func (x *DeeplyNestedSigner) GetInnerOne() *DeeplyNestedSigner_InnerOne { if x != nil { - return x.Inner + return x.InnerOne } return nil } -type RepeatedNestedRepeatedSigner struct { +type DeeplyNestedRepeatedSigner struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Inner []*RepeatedNestedRepeatedSigner_Inner `protobuf:"bytes,1,rep,name=inner,proto3" json:"inner,omitempty"` + Inner []*DeeplyNestedRepeatedSigner_Inner `protobuf:"bytes,1,rep,name=inner,proto3" json:"inner,omitempty"` } -func (x *RepeatedNestedRepeatedSigner) Reset() { - *x = RepeatedNestedRepeatedSigner{} +func (x *DeeplyNestedRepeatedSigner) Reset() { + *x = DeeplyNestedRepeatedSigner{} if protoimpl.UnsafeEnabled { - mi := &file_signers_proto_msgTypes[5] + mi := &file_signers_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *RepeatedNestedRepeatedSigner) String() string { +func (x *DeeplyNestedRepeatedSigner) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RepeatedNestedRepeatedSigner) ProtoMessage() {} +func (*DeeplyNestedRepeatedSigner) ProtoMessage() {} -// Deprecated: Use RepeatedNestedRepeatedSigner.ProtoReflect.Descriptor instead. -func (*RepeatedNestedRepeatedSigner) Descriptor() ([]byte, []int) { - return file_signers_proto_rawDescGZIP(), []int{5} +// Deprecated: Use DeeplyNestedRepeatedSigner.ProtoReflect.Descriptor instead. +func (*DeeplyNestedRepeatedSigner) Descriptor() ([]byte, []int) { + return file_signers_proto_rawDescGZIP(), []int{7} } -func (x *RepeatedNestedRepeatedSigner) GetInner() []*RepeatedNestedRepeatedSigner_Inner { +func (x *DeeplyNestedRepeatedSigner) GetInner() []*DeeplyNestedRepeatedSigner_Inner { if x != nil { return x.Inner } @@ -6070,7 +9392,7 @@ type BadSigner struct { func (x *BadSigner) Reset() { *x = BadSigner{} if protoimpl.UnsafeEnabled { - mi := &file_signers_proto_msgTypes[6] + mi := &file_signers_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6084,7 +9406,7 @@ func (*BadSigner) ProtoMessage() {} // Deprecated: Use BadSigner.ProtoReflect.Descriptor instead. func (*BadSigner) Descriptor() ([]byte, []int) { - return file_signers_proto_rawDescGZIP(), []int{6} + return file_signers_proto_rawDescGZIP(), []int{8} } func (x *BadSigner) GetSigner() []byte { @@ -6105,7 +9427,7 @@ type NoSignerOption struct { func (x *NoSignerOption) Reset() { *x = NoSignerOption{} if protoimpl.UnsafeEnabled { - mi := &file_signers_proto_msgTypes[7] + mi := &file_signers_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6119,7 +9441,7 @@ func (*NoSignerOption) ProtoMessage() {} // Deprecated: Use NoSignerOption.ProtoReflect.Descriptor instead. func (*NoSignerOption) Descriptor() ([]byte, []int) { - return file_signers_proto_rawDescGZIP(), []int{7} + return file_signers_proto_rawDescGZIP(), []int{9} } func (x *NoSignerOption) GetSigner() []byte { @@ -6140,7 +9462,7 @@ type ValidatorSigner struct { func (x *ValidatorSigner) Reset() { *x = ValidatorSigner{} if protoimpl.UnsafeEnabled { - mi := &file_signers_proto_msgTypes[8] + mi := &file_signers_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6154,7 +9476,7 @@ func (*ValidatorSigner) ProtoMessage() {} // Deprecated: Use ValidatorSigner.ProtoReflect.Descriptor instead. func (*ValidatorSigner) Descriptor() ([]byte, []int) { - return file_signers_proto_rawDescGZIP(), []int{8} + return file_signers_proto_rawDescGZIP(), []int{10} } func (x *ValidatorSigner) GetSigner() string { @@ -6175,7 +9497,7 @@ type NestedSigner_Inner struct { func (x *NestedSigner_Inner) Reset() { *x = NestedSigner_Inner{} if protoimpl.UnsafeEnabled { - mi := &file_signers_proto_msgTypes[9] + mi := &file_signers_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6210,7 +9532,7 @@ type RepeatedNestedSigner_Inner struct { func (x *RepeatedNestedSigner_Inner) Reset() { *x = RepeatedNestedSigner_Inner{} if protoimpl.UnsafeEnabled { - mi := &file_signers_proto_msgTypes[10] + mi := &file_signers_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6245,7 +9567,7 @@ type NestedRepeatedSigner_Inner struct { func (x *NestedRepeatedSigner_Inner) Reset() { *x = NestedRepeatedSigner_Inner{} if protoimpl.UnsafeEnabled { - mi := &file_signers_proto_msgTypes[11] + mi := &file_signers_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6280,7 +9602,7 @@ type RepeatedNestedRepeatedSigner_Inner struct { func (x *RepeatedNestedRepeatedSigner_Inner) Reset() { *x = RepeatedNestedRepeatedSigner_Inner{} if protoimpl.UnsafeEnabled { - mi := &file_signers_proto_msgTypes[12] + mi := &file_signers_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6304,6 +9626,181 @@ func (x *RepeatedNestedRepeatedSigner_Inner) GetSigner() []string { return nil } +type DeeplyNestedSigner_InnerOne struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InnerTwo *DeeplyNestedSigner_InnerOne_InnerTwo `protobuf:"bytes,1,opt,name=inner_two,json=innerTwo,proto3" json:"inner_two,omitempty"` +} + +func (x *DeeplyNestedSigner_InnerOne) Reset() { + *x = DeeplyNestedSigner_InnerOne{} + if protoimpl.UnsafeEnabled { + mi := &file_signers_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeeplyNestedSigner_InnerOne) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeeplyNestedSigner_InnerOne) ProtoMessage() {} + +// Deprecated: Use DeeplyNestedSigner_InnerOne.ProtoReflect.Descriptor instead. +func (*DeeplyNestedSigner_InnerOne) Descriptor() ([]byte, []int) { + return file_signers_proto_rawDescGZIP(), []int{6, 0} +} + +func (x *DeeplyNestedSigner_InnerOne) GetInnerTwo() *DeeplyNestedSigner_InnerOne_InnerTwo { + if x != nil { + return x.InnerTwo + } + return nil +} + +type DeeplyNestedSigner_InnerOne_InnerTwo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` +} + +func (x *DeeplyNestedSigner_InnerOne_InnerTwo) Reset() { + *x = DeeplyNestedSigner_InnerOne_InnerTwo{} + if protoimpl.UnsafeEnabled { + mi := &file_signers_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeeplyNestedSigner_InnerOne_InnerTwo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeeplyNestedSigner_InnerOne_InnerTwo) ProtoMessage() {} + +// Deprecated: Use DeeplyNestedSigner_InnerOne_InnerTwo.ProtoReflect.Descriptor instead. +func (*DeeplyNestedSigner_InnerOne_InnerTwo) Descriptor() ([]byte, []int) { + return file_signers_proto_rawDescGZIP(), []int{6, 0, 0} +} + +func (x *DeeplyNestedSigner_InnerOne_InnerTwo) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +type DeeplyNestedRepeatedSigner_Inner struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Inner []*DeeplyNestedRepeatedSigner_Inner_Inner `protobuf:"bytes,1,rep,name=inner,proto3" json:"inner,omitempty"` +} + +func (x *DeeplyNestedRepeatedSigner_Inner) Reset() { + *x = DeeplyNestedRepeatedSigner_Inner{} + if protoimpl.UnsafeEnabled { + mi := &file_signers_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeeplyNestedRepeatedSigner_Inner) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeeplyNestedRepeatedSigner_Inner) ProtoMessage() {} + +// Deprecated: Use DeeplyNestedRepeatedSigner_Inner.ProtoReflect.Descriptor instead. +func (*DeeplyNestedRepeatedSigner_Inner) Descriptor() ([]byte, []int) { + return file_signers_proto_rawDescGZIP(), []int{7, 0} +} + +func (x *DeeplyNestedRepeatedSigner_Inner) GetInner() []*DeeplyNestedRepeatedSigner_Inner_Inner { + if x != nil { + return x.Inner + } + return nil +} + +type DeeplyNestedRepeatedSigner_Inner_Inner struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Inner []*DeeplyNestedRepeatedSigner_Inner_Inner_Bottom `protobuf:"bytes,1,rep,name=inner,proto3" json:"inner,omitempty"` +} + +func (x *DeeplyNestedRepeatedSigner_Inner_Inner) Reset() { + *x = DeeplyNestedRepeatedSigner_Inner_Inner{} + if protoimpl.UnsafeEnabled { + mi := &file_signers_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeeplyNestedRepeatedSigner_Inner_Inner) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeeplyNestedRepeatedSigner_Inner_Inner) ProtoMessage() {} + +// Deprecated: Use DeeplyNestedRepeatedSigner_Inner_Inner.ProtoReflect.Descriptor instead. +func (*DeeplyNestedRepeatedSigner_Inner_Inner) Descriptor() ([]byte, []int) { + return file_signers_proto_rawDescGZIP(), []int{7, 0, 0} +} + +func (x *DeeplyNestedRepeatedSigner_Inner_Inner) GetInner() []*DeeplyNestedRepeatedSigner_Inner_Inner_Bottom { + if x != nil { + return x.Inner + } + return nil +} + +type DeeplyNestedRepeatedSigner_Inner_Inner_Bottom struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Signer []string `protobuf:"bytes,1,rep,name=signer,proto3" json:"signer,omitempty"` +} + +func (x *DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) Reset() { + *x = DeeplyNestedRepeatedSigner_Inner_Inner_Bottom{} + if protoimpl.UnsafeEnabled { + mi := &file_signers_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) ProtoMessage() {} + +// Deprecated: Use DeeplyNestedRepeatedSigner_Inner_Inner_Bottom.ProtoReflect.Descriptor instead. +func (*DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) Descriptor() ([]byte, []int) { + return file_signers_proto_rawDescGZIP(), []int{7, 0, 0, 0} +} + +func (x *DeeplyNestedRepeatedSigner_Inner_Inner_Bottom) GetSigner() []string { + if x != nil { + return x.Signer + } + return nil +} + var File_signers_proto protoreflect.FileDescriptor var file_signers_proto_rawDesc = []byte{ @@ -6351,28 +9848,63 @@ var file_signers_proto_rawDesc = []byte{ 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, - 0x05, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x22, 0x30, 0x0a, 0x09, 0x42, 0x61, 0x64, 0x53, 0x69, 0x67, - 0x6e, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, - 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0x28, 0x0a, 0x0e, 0x4e, 0x6f, 0x53, 0x69, - 0x67, 0x6e, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, - 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, - 0x65, 0x72, 0x22, 0x59, 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, - 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, - 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x32, 0x4d, 0x0a, - 0x10, 0x54, 0x65, 0x73, 0x74, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, - 0x72, 0x12, 0x32, 0x0a, 0x10, 0x54, 0x65, 0x73, 0x74, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x53, - 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x0d, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x53, 0x69, - 0x67, 0x6e, 0x65, 0x72, 0x1a, 0x0d, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x53, 0x69, 0x67, - 0x6e, 0x65, 0x72, 0x22, 0x00, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x3b, 0x42, 0x0c, - 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x29, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x78, 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, + 0x05, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x22, 0xf1, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x65, 0x70, 0x6c, + 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x39, 0x0a, + 0x09, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x5f, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x44, 0x65, 0x65, 0x70, 0x6c, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x53, + 0x69, 0x67, 0x6e, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x4f, 0x6e, 0x65, 0x52, 0x08, + 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x4f, 0x6e, 0x65, 0x1a, 0x8f, 0x01, 0x0a, 0x08, 0x49, 0x6e, 0x6e, + 0x65, 0x72, 0x4f, 0x6e, 0x65, 0x12, 0x42, 0x0a, 0x09, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x5f, 0x74, + 0x77, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x44, 0x65, 0x65, 0x70, 0x6c, + 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x2e, 0x49, 0x6e, + 0x6e, 0x65, 0x72, 0x4f, 0x6e, 0x65, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x54, 0x77, 0x6f, 0x52, + 0x08, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x54, 0x77, 0x6f, 0x1a, 0x2f, 0x0a, 0x08, 0x49, 0x6e, 0x6e, + 0x65, 0x72, 0x54, 0x77, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x3a, 0x0b, 0x82, + 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, + 0x09, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x5f, 0x74, 0x77, 0x6f, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, + 0x09, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x5f, 0x6f, 0x6e, 0x65, 0x22, 0xc1, 0x02, 0x0a, 0x1a, 0x44, + 0x65, 0x65, 0x70, 0x6c, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x05, 0x69, 0x6e, 0x6e, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x44, 0x65, 0x65, 0x70, 0x6c, + 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, + 0x69, 0x67, 0x6e, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x05, 0x69, 0x6e, 0x6e, + 0x65, 0x72, 0x1a, 0xdd, 0x01, 0x0a, 0x05, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x05, + 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x44, 0x65, + 0x65, 0x70, 0x6c, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x49, + 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x05, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x1a, 0x88, 0x01, 0x0a, 0x05, + 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x05, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x44, 0x65, 0x65, 0x70, 0x6c, 0x79, 0x4e, 0x65, 0x73, + 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x65, + 0x72, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x42, 0x6f, + 0x74, 0x74, 0x6f, 0x6d, 0x52, 0x05, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x1a, 0x2d, 0x0a, 0x06, 0x42, + 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x3a, 0x0b, 0x82, + 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, + 0x05, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x69, 0x6e, 0x6e, + 0x65, 0x72, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x22, 0x30, + 0x0a, 0x09, 0x42, 0x61, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x69, 0x67, + 0x6e, 0x65, 0x72, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x22, 0x28, 0x0a, 0x0e, 0x4e, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0x59, 0x0a, 0x0f, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x39, 0x0a, + 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, + 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x72, 0x32, 0x4d, 0x0a, 0x10, 0x54, 0x65, 0x73, 0x74, 0x53, 0x69, 0x6d, + 0x70, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x10, 0x54, 0x65, 0x73, + 0x74, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x0d, 0x2e, + 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x1a, 0x0d, 0x2e, 0x53, + 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0x00, 0x1a, 0x05, 0x80, + 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x3b, 0x42, 0x0c, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x29, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, + 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x78, 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 ( @@ -6387,34 +9919,46 @@ func file_signers_proto_rawDescGZIP() []byte { return file_signers_proto_rawDescData } -var file_signers_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_signers_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_signers_proto_goTypes = []interface{}{ - (*SimpleSigner)(nil), // 0: SimpleSigner - (*RepeatedSigner)(nil), // 1: RepeatedSigner - (*NestedSigner)(nil), // 2: NestedSigner - (*RepeatedNestedSigner)(nil), // 3: RepeatedNestedSigner - (*NestedRepeatedSigner)(nil), // 4: NestedRepeatedSigner - (*RepeatedNestedRepeatedSigner)(nil), // 5: RepeatedNestedRepeatedSigner - (*BadSigner)(nil), // 6: BadSigner - (*NoSignerOption)(nil), // 7: NoSignerOption - (*ValidatorSigner)(nil), // 8: ValidatorSigner - (*NestedSigner_Inner)(nil), // 9: NestedSigner.Inner - (*RepeatedNestedSigner_Inner)(nil), // 10: RepeatedNestedSigner.Inner - (*NestedRepeatedSigner_Inner)(nil), // 11: NestedRepeatedSigner.Inner - (*RepeatedNestedRepeatedSigner_Inner)(nil), // 12: RepeatedNestedRepeatedSigner.Inner + (*SimpleSigner)(nil), // 0: SimpleSigner + (*RepeatedSigner)(nil), // 1: RepeatedSigner + (*NestedSigner)(nil), // 2: NestedSigner + (*RepeatedNestedSigner)(nil), // 3: RepeatedNestedSigner + (*NestedRepeatedSigner)(nil), // 4: NestedRepeatedSigner + (*RepeatedNestedRepeatedSigner)(nil), // 5: RepeatedNestedRepeatedSigner + (*DeeplyNestedSigner)(nil), // 6: DeeplyNestedSigner + (*DeeplyNestedRepeatedSigner)(nil), // 7: DeeplyNestedRepeatedSigner + (*BadSigner)(nil), // 8: BadSigner + (*NoSignerOption)(nil), // 9: NoSignerOption + (*ValidatorSigner)(nil), // 10: ValidatorSigner + (*NestedSigner_Inner)(nil), // 11: NestedSigner.Inner + (*RepeatedNestedSigner_Inner)(nil), // 12: RepeatedNestedSigner.Inner + (*NestedRepeatedSigner_Inner)(nil), // 13: NestedRepeatedSigner.Inner + (*RepeatedNestedRepeatedSigner_Inner)(nil), // 14: RepeatedNestedRepeatedSigner.Inner + (*DeeplyNestedSigner_InnerOne)(nil), // 15: DeeplyNestedSigner.InnerOne + (*DeeplyNestedSigner_InnerOne_InnerTwo)(nil), // 16: DeeplyNestedSigner.InnerOne.InnerTwo + (*DeeplyNestedRepeatedSigner_Inner)(nil), // 17: DeeplyNestedRepeatedSigner.Inner + (*DeeplyNestedRepeatedSigner_Inner_Inner)(nil), // 18: DeeplyNestedRepeatedSigner.Inner.Inner + (*DeeplyNestedRepeatedSigner_Inner_Inner_Bottom)(nil), // 19: DeeplyNestedRepeatedSigner.Inner.Inner.Bottom } var file_signers_proto_depIdxs = []int32{ - 9, // 0: NestedSigner.inner:type_name -> NestedSigner.Inner - 10, // 1: RepeatedNestedSigner.inner:type_name -> RepeatedNestedSigner.Inner - 11, // 2: NestedRepeatedSigner.inner:type_name -> NestedRepeatedSigner.Inner - 12, // 3: RepeatedNestedRepeatedSigner.inner:type_name -> RepeatedNestedRepeatedSigner.Inner - 0, // 4: TestSimpleSigner.TestSimpleSigner:input_type -> SimpleSigner - 0, // 5: TestSimpleSigner.TestSimpleSigner:output_type -> SimpleSigner - 5, // [5:6] is the sub-list for method output_type - 4, // [4:5] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 11, // 0: NestedSigner.inner:type_name -> NestedSigner.Inner + 12, // 1: RepeatedNestedSigner.inner:type_name -> RepeatedNestedSigner.Inner + 13, // 2: NestedRepeatedSigner.inner:type_name -> NestedRepeatedSigner.Inner + 14, // 3: RepeatedNestedRepeatedSigner.inner:type_name -> RepeatedNestedRepeatedSigner.Inner + 15, // 4: DeeplyNestedSigner.inner_one:type_name -> DeeplyNestedSigner.InnerOne + 17, // 5: DeeplyNestedRepeatedSigner.inner:type_name -> DeeplyNestedRepeatedSigner.Inner + 16, // 6: DeeplyNestedSigner.InnerOne.inner_two:type_name -> DeeplyNestedSigner.InnerOne.InnerTwo + 18, // 7: DeeplyNestedRepeatedSigner.Inner.inner:type_name -> DeeplyNestedRepeatedSigner.Inner.Inner + 19, // 8: DeeplyNestedRepeatedSigner.Inner.Inner.inner:type_name -> DeeplyNestedRepeatedSigner.Inner.Inner.Bottom + 0, // 9: TestSimpleSigner.TestSimpleSigner:input_type -> SimpleSigner + 0, // 10: TestSimpleSigner.TestSimpleSigner:output_type -> SimpleSigner + 10, // [10:11] is the sub-list for method output_type + 9, // [9:10] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_signers_proto_init() } @@ -6496,7 +10040,7 @@ func file_signers_proto_init() { } } file_signers_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BadSigner); i { + switch v := v.(*DeeplyNestedSigner); i { case 0: return &v.state case 1: @@ -6508,7 +10052,7 @@ func file_signers_proto_init() { } } file_signers_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NoSignerOption); i { + switch v := v.(*DeeplyNestedRepeatedSigner); i { case 0: return &v.state case 1: @@ -6520,7 +10064,7 @@ func file_signers_proto_init() { } } file_signers_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorSigner); i { + switch v := v.(*BadSigner); i { case 0: return &v.state case 1: @@ -6532,7 +10076,7 @@ func file_signers_proto_init() { } } file_signers_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NestedSigner_Inner); i { + switch v := v.(*NoSignerOption); i { case 0: return &v.state case 1: @@ -6544,7 +10088,7 @@ func file_signers_proto_init() { } } file_signers_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RepeatedNestedSigner_Inner); i { + switch v := v.(*ValidatorSigner); i { case 0: return &v.state case 1: @@ -6556,7 +10100,7 @@ func file_signers_proto_init() { } } file_signers_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NestedRepeatedSigner_Inner); i { + switch v := v.(*NestedSigner_Inner); i { case 0: return &v.state case 1: @@ -6568,6 +10112,30 @@ func file_signers_proto_init() { } } file_signers_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RepeatedNestedSigner_Inner); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signers_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NestedRepeatedSigner_Inner); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signers_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RepeatedNestedRepeatedSigner_Inner); i { case 0: return &v.state @@ -6579,6 +10147,66 @@ func file_signers_proto_init() { return nil } } + file_signers_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeeplyNestedSigner_InnerOne); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signers_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeeplyNestedSigner_InnerOne_InnerTwo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signers_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeeplyNestedRepeatedSigner_Inner); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signers_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeeplyNestedRepeatedSigner_Inner_Inner); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signers_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeeplyNestedRepeatedSigner_Inner_Inner_Bottom); 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{ @@ -6586,7 +10214,7 @@ func file_signers_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_signers_proto_rawDesc, NumEnums: 0, - NumMessages: 13, + NumMessages: 20, NumExtensions: 0, NumServices: 1, }, diff --git a/x/tx/signing/aminojson/aminojson.go b/x/tx/signing/aminojson/aminojson.go index 6fc6e97e49b6..abcb25d5e818 100644 --- a/x/tx/signing/aminojson/aminojson.go +++ b/x/tx/signing/aminojson/aminojson.go @@ -2,9 +2,10 @@ package aminojson import ( "context" - "encoding/json" + "errors" "fmt" + gogoproto "github.com/cosmos/gogoproto/proto" "google.golang.org/protobuf/reflect/protoregistry" signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" @@ -23,7 +24,7 @@ type SignModeHandler struct { // SignModeHandlerOptions are the options for the SignModeHandler. type SignModeHandlerOptions struct { FileResolver signing.ProtoFileResolver - TypeResolver protoregistry.MessageTypeResolver + TypeResolver signing.TypeResolver Encoder *Encoder } @@ -31,7 +32,7 @@ type SignModeHandlerOptions struct { func NewSignModeHandler(options SignModeHandlerOptions) *SignModeHandler { h := &SignModeHandler{} if options.FileResolver == nil { - h.fileResolver = protoregistry.GlobalFiles + h.fileResolver = gogoproto.HybridResolver } else { h.fileResolver = options.FileResolver } @@ -44,6 +45,7 @@ func NewSignModeHandler(options SignModeHandlerOptions) *SignModeHandler { h.encoder = NewEncoder(EncoderOptions{ FileResolver: options.FileResolver, TypeResolver: options.TypeResolver, + EnumAsString: false, // ensure enum as string is disabled }) } else { h.encoder = *options.Encoder @@ -73,31 +75,19 @@ func (h SignModeHandler) GetSignBytes(_ context.Context, signerData signing.Sign return nil, fmt.Errorf("got empty address in %s handler: invalid request", h.Mode()) } - tip := txData.AuthInfo.Tip - if tip != nil && tip.Tipper == "" { - return nil, fmt.Errorf("tipper cannot be empty") - } - isTipper := tip != nil && tip.Tipper == signerData.Address - // We set a convention that if the tipper signs with LEGACY_AMINO_JSON, then // they sign over empty fees and 0 gas. var fee *aminojsonpb.AminoSignFee - if isTipper { - fee = &aminojsonpb.AminoSignFee{ - Amount: nil, - Gas: 0, - } - } else { - f := txData.AuthInfo.Fee - if f == nil { - return nil, fmt.Errorf("fee cannot be nil when tipper is not signer") - } - fee = &aminojsonpb.AminoSignFee{ - Amount: f.Amount, - Gas: f.GasLimit, - Payer: f.Payer, - Granter: f.Granter, - } + + f := txData.AuthInfo.Fee + if f == nil { + return nil, errors.New("fee cannot be nil when tipper is not signer") + } + fee = &aminojsonpb.AminoSignFee{ + Amount: f.Amount, + Gas: f.GasLimit, + Payer: f.Payer, + Granter: f.Granter, } signDoc := &aminojsonpb.AminoSignDoc{ @@ -108,30 +98,9 @@ func (h SignModeHandler) GetSignBytes(_ context.Context, signerData signing.Sign Memo: body.Memo, Msgs: txData.Body.Messages, Fee: fee, - Tip: tip, - } - - bz, err := h.encoder.Marshal(signDoc) - if err != nil { - return nil, err } - // TODO: remove this sort once https://github.com/cosmos/cosmos-sdk/issues/2350#issuecomment-1542715157 lands - // the encoder should be rendering fields in lexical order - return sortJSON(bz) -} -// sortJSON sorts the JSON keys of the given JSON encoded byte slice. -func sortJSON(toSortJSON []byte) ([]byte, error) { - var c interface{} - err := json.Unmarshal(toSortJSON, &c) - if err != nil { - return nil, err - } - js, err := json.Marshal(c) - if err != nil { - return nil, err - } - return js, nil + return h.encoder.Marshal(signDoc) } var _ signing.SignModeHandler = (*SignModeHandler)(nil) diff --git a/x/tx/signing/aminojson/aminojson_test.go b/x/tx/signing/aminojson/aminojson_test.go index f354bda01360..0d137906561d 100644 --- a/x/tx/signing/aminojson/aminojson_test.go +++ b/x/tx/signing/aminojson/aminojson_test.go @@ -21,7 +21,6 @@ func TestAminoJsonSignMode(t *testing.T) { handlerOptions := testutil.HandlerArgumentOptions{ ChainID: "test-chain", Memo: "sometestmemo", - Tip: &txv1beta1.Tip{Tipper: "tipper", Amount: []*basev1beta1.Coin{{Denom: "Tip-token", Amount: "10"}}}, Msg: &bankv1beta1.MsgSend{ FromAddress: "foo", ToAddress: "bar", @@ -52,37 +51,14 @@ func TestAminoJsonSignMode(t *testing.T) { }, error: "got empty address in SIGN_MODE_LEGACY_AMINO_JSON handler: invalid request", }, - { - name: "nil tip", - malleate: func(opts testutil.HandlerArgumentOptions) testutil.HandlerArgumentOptions { - opts.Tip = nil - return opts - }, - }, - { - name: "empty tipper", - malleate: func(opts testutil.HandlerArgumentOptions) testutil.HandlerArgumentOptions { - opts.Tip.Tipper = "" - return opts - }, - error: "tipper cannot be empty", - }, { name: "nil fee", malleate: func(opts testutil.HandlerArgumentOptions) testutil.HandlerArgumentOptions { - opts.Tip.Tipper = "tipper" opts.Fee = nil return opts }, error: "fee cannot be nil", }, - { - name: "tipper is signer", - malleate: func(opts testutil.HandlerArgumentOptions) testutil.HandlerArgumentOptions { - opts.Tip.Tipper = opts.SignerAddress - return opts - }, - }, } for _, tc := range testCases { diff --git a/x/tx/signing/aminojson/any.go b/x/tx/signing/aminojson/any.go index 6b4963d16cae..c7e304a46977 100644 --- a/x/tx/signing/aminojson/any.go +++ b/x/tx/signing/aminojson/any.go @@ -4,20 +4,19 @@ import ( "fmt" "io" - "google.golang.org/protobuf/types/dynamicpb" - "google.golang.org/protobuf/types/known/anypb" - "github.com/pkg/errors" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/types/dynamicpb" + "google.golang.org/protobuf/types/known/anypb" ) -func (enc Encoder) marshalAny(message protoreflect.Message, writer io.Writer) error { +func marshalAny(enc *Encoder, message protoreflect.Message, writer io.Writer) error { // when a message contains a nested any field, and the top-level message has been unmarshalled into a dyanmicpb, // the nested any field will also be a dynamicpb. In this case, we must use the dynamicpb API. _, ok := message.Interface().(*dynamicpb.Message) if ok { - return enc.marshalDynamic(message, writer) + return marshalDynamic(enc, message, writer) } anyMsg, ok := message.Interface().(*anypb.Any) @@ -51,13 +50,7 @@ func (enc Encoder) marshalAny(message protoreflect.Message, writer io.Writer) er protoMessage = valueMsg.ProtoReflect() } - _, named := getMessageAminoName(protoMessage.Descriptor().Options()) - if !named { - return fmt.Errorf("message %s is packed into an any field, so requires an amino.name annotation", - anyMsg.TypeUrl) - } - - return enc.beginMarshal(protoMessage, writer) + return enc.beginMarshal(protoMessage, writer, true) } const ( @@ -65,7 +58,7 @@ const ( anyValueFieldName = "value" ) -func (enc Encoder) marshalDynamic(message protoreflect.Message, writer io.Writer) error { +func marshalDynamic(enc *Encoder, message protoreflect.Message, writer io.Writer) error { msgName := message.Get(message.Descriptor().Fields().ByName(anyTypeURLFieldName)).String()[1:] msgBytes := message.Get(message.Descriptor().Fields().ByName(anyValueFieldName)).Bytes() @@ -74,17 +67,11 @@ func (enc Encoder) marshalDynamic(message protoreflect.Message, writer io.Writer return errors.Wrapf(err, "can't resolve type URL %s", msgName) } - _, named := getMessageAminoName(desc.Options()) - if !named { - return fmt.Errorf("message %s is packed into an any field, so requires an amino.name annotation", - msgName) - } - valueMsg := dynamicpb.NewMessageType(desc.(protoreflect.MessageDescriptor)).New().Interface() err = proto.Unmarshal(msgBytes, valueMsg) if err != nil { return err } - return enc.beginMarshal(valueMsg.ProtoReflect(), writer) + return enc.beginMarshal(valueMsg.ProtoReflect(), writer, true) } diff --git a/x/tx/signing/aminojson/bench_test.go b/x/tx/signing/aminojson/bench_test.go index 9ccc11ddcf68..49f9302d4b7b 100644 --- a/x/tx/signing/aminojson/bench_test.go +++ b/x/tx/signing/aminojson/bench_test.go @@ -40,6 +40,7 @@ func BenchmarkAminoJSONDefaultSort(b *testing.B) { } func benchmarkAminoJSON(b *testing.B, addNaiveSort bool) { + b.Helper() enc := aminojson.NewEncoder(aminojson.EncoderOptions{DoNotSortFields: addNaiveSort}) b.ReportAllocs() b.ResetTimer() @@ -54,6 +55,7 @@ func benchmarkAminoJSON(b *testing.B, addNaiveSort bool) { } func runAminoJSON(b *testing.B, enc aminojson.Encoder, addNaiveSort bool) []byte { + b.Helper() bz, err := enc.Marshal(msg) if err != nil { b.Fatal(err) diff --git a/x/tx/signing/aminojson/encoder.go b/x/tx/signing/aminojson/encoder.go index acb899edbd61..c1e37ec0723c 100644 --- a/x/tx/signing/aminojson/encoder.go +++ b/x/tx/signing/aminojson/encoder.go @@ -5,6 +5,7 @@ import ( "encoding/json" "fmt" "io" + "sort" "github.com/pkg/errors" "google.golang.org/protobuf/reflect/protoreflect" @@ -72,15 +73,37 @@ func nullSliceAsEmptyEncoder(enc *Encoder, v protoreflect.Value, w io.Writer) er switch list := v.Interface().(type) { case protoreflect.List: if list.Len() == 0 { - _, err := w.Write([]byte("[]")) + _, err := io.WriteString(w, "[]") return err } - return enc.marshalList(list, w) + return enc.marshalList(list, nil /* no field descriptor available here */, w) default: return fmt.Errorf("unsupported type %T", list) } } +// cosmosInlineJSON takes bytes and inlines them into a JSON document. +// +// This requires the bytes contain valid JSON since otherwise the resulting document would be invalid. +// Invalid JSON will result in an error. +// +// This replicates the behavior of JSON messages embedded in protobuf bytes +// required for CosmWasm, e.g.: +// https://github.com/CosmWasm/wasmd/blob/08567ff20e372e4f4204a91ca64a371538742bed/x/wasm/types/tx.go#L20-L22 +func cosmosInlineJSON(_ *Encoder, v protoreflect.Value, w io.Writer) error { + switch bz := v.Interface().(type) { + case []byte: + json, err := sortedJSONStringify(bz) + if err != nil { + return errors.Wrap(err, "could not normalize JSON") + } + _, err = w.Write(json) + return err + default: + return fmt.Errorf("unsupported type %T", bz) + } +} + // keyFieldEncoder replicates the behavior at described at: // https://github.com/cosmos/cosmos-sdk/blob/b49f948b36bc991db5be431607b475633aed697e/proto/cosmos/crypto/secp256k1/keys.proto#L16 // The message is treated if it were bytes directly without the key field specified. @@ -129,6 +152,7 @@ func moduleAccountEncoder(_ *Encoder, msg protoreflect.Message, w io.Writer) err pretty.Sequence = 0 } + // we do not want to use the json encoder here because it adds a newline bz, err := json.Marshal(pretty) if err != nil { return err @@ -146,13 +170,13 @@ func thresholdStringEncoder(enc *Encoder, msg protoreflect.Message, w io.Writer) if !ok { return errors.New("thresholdStringEncoder: msg not a multisig.LegacyAminoPubKey") } - _, err := w.Write([]byte(fmt.Sprintf(`{"threshold":"%d","pubkeys":`, pk.Threshold))) + _, err := fmt.Fprintf(w, `{"threshold":"%d","pubkeys":`, pk.Threshold) if err != nil { return err } if len(pk.PublicKeys) == 0 { - _, err = w.Write([]byte(`[]}`)) + _, err = io.WriteString(w, `[]}`) return err } @@ -160,10 +184,49 @@ func thresholdStringEncoder(enc *Encoder, msg protoreflect.Message, w io.Writer) pubkeysField := fields.ByName("public_keys") pubkeys := msg.Get(pubkeysField).List() - err = enc.marshalList(pubkeys, w) + err = enc.marshalList(pubkeys, pubkeysField, w) if err != nil { return err } - _, err = w.Write([]byte(`}`)) + _, err = io.WriteString(w, `}`) return err } + +// sortedObject returns a new object that mirrors the structure of the original +// but with all maps having their keys sorted. +func sortedObject(obj interface{}) interface{} { + switch v := obj.(type) { + case map[string]interface{}: + sortedKeys := make([]string, 0, len(v)) + for key := range v { + sortedKeys = append(sortedKeys, key) + } + sort.Strings(sortedKeys) + result := make(map[string]interface{}) + for _, key := range sortedKeys { + result[key] = sortedObject(v[key]) + } + return result + case []interface{}: + for i, val := range v { + v[i] = sortedObject(val) + } + return v + default: + return obj + } +} + +// sortedJSONStringify returns a JSON with objects sorted by key. +func sortedJSONStringify(jsonBytes []byte) ([]byte, error) { + var obj interface{} + if err := json.Unmarshal(jsonBytes, &obj); err != nil { + return nil, errors.New("invalid JSON bytes") + } + sorted := sortedObject(obj) + jsonData, err := json.Marshal(sorted) + if err != nil { + return nil, err + } + return jsonData, nil +} diff --git a/x/tx/signing/aminojson/encoder_test.go b/x/tx/signing/aminojson/encoder_test.go new file mode 100644 index 000000000000..42f47638d1df --- /dev/null +++ b/x/tx/signing/aminojson/encoder_test.go @@ -0,0 +1,174 @@ +package aminojson + +import ( + "bytes" + "testing" + + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/reflect/protoreflect" + "gotest.tools/v3/assert" +) + +func TestCosmosInlineJSON(t *testing.T) { + cases := map[string]struct { + value protoreflect.Value + wantErr bool + wantOutput string + }{ + "supported type - valid JSON object": { + value: protoreflect.ValueOfBytes([]byte(`{"test":"value"}`)), + wantErr: false, + wantOutput: `{"test":"value"}`, + }, + "supported type - valid JSON array": { + // spaces are normalized away + value: protoreflect.ValueOfBytes([]byte(`[1,2,3]`)), + wantErr: false, + wantOutput: `[1,2,3]`, + }, + "supported type - valid JSON is normalized": { + value: protoreflect.ValueOfBytes([]byte(`[1, 2, 3]`)), + wantErr: false, + wantOutput: `[1,2,3]`, + }, + "supported type - valid JSON array (empty)": { + value: protoreflect.ValueOfBytes([]byte(`[]`)), + wantErr: false, + wantOutput: `[]`, + }, + "supported type - valid JSON number": { + value: protoreflect.ValueOfBytes([]byte(`43.72`)), + wantErr: false, + wantOutput: `43.72`, + }, + "supported type - valid JSON boolean": { + value: protoreflect.ValueOfBytes([]byte(`true`)), + wantErr: false, + wantOutput: `true`, + }, + "supported type - valid JSON null": { + value: protoreflect.ValueOfBytes([]byte(`null`)), + wantErr: false, + wantOutput: `null`, + }, + "supported type - valid JSON string": { + value: protoreflect.ValueOfBytes([]byte(`"hey yo"`)), + wantErr: false, + wantOutput: `"hey yo"`, + }, + "supported type - invalid JSON": { + value: protoreflect.ValueOfBytes([]byte(`foo`)), + wantErr: true, + }, + "supported type - invalid JSON (empty)": { + value: protoreflect.ValueOfBytes([]byte(``)), + wantErr: true, + }, + "supported type - invalid JSON (nil bytes)": { + value: protoreflect.ValueOfBytes(nil), + wantErr: true, + }, + "unsupported type - bool": { + value: protoreflect.ValueOfBool(true), + wantErr: true, + }, + "unsupported type - int64": { + value: protoreflect.ValueOfInt64(1), + wantErr: true, + }, + } + + for name, tc := range cases { + t.Run(name, func(t *testing.T) { + var buf bytes.Buffer + err := cosmosInlineJSON(nil, tc.value, &buf) + + if tc.wantErr { + require.Error(t, err) + return + } + require.NoError(t, err) + assert.Equal(t, tc.wantOutput, buf.String()) + }) + } +} + +func TestSortedJSONStringify(t *testing.T) { + tests := map[string]struct { + input []byte + wantOutput string + }{ + "leaves true unchanged": { + input: []byte(`true`), + wantOutput: "true", + }, + "leaves false unchanged": { + input: []byte(`false`), + wantOutput: "false", + }, + "leaves string unchanged": { + input: []byte(`"aabbccdd"`), + wantOutput: `"aabbccdd"`, + }, + "leaves number unchanged": { + input: []byte(`75`), + wantOutput: "75", + }, + "leaves nil unchanged": { + input: []byte(`null`), + wantOutput: "null", + }, + "leaves simple array unchanged": { + input: []byte(`[5, 6, 7, 1]`), + wantOutput: "[5,6,7,1]", + }, + "leaves complex array unchanged": { + input: []byte(`[5, ["a", "b"], true, null, 1]`), + wantOutput: `[5,["a","b"],true,null,1]`, + }, + "sorts empty object": { + input: []byte(`{}`), + wantOutput: `{}`, + }, + "sorts single key object": { + input: []byte(`{"a": 3}`), + wantOutput: `{"a":3}`, + }, + "sorts multiple keys object": { + input: []byte(`{"a": 3, "b": 2, "c": 1}`), + wantOutput: `{"a":3,"b":2,"c":1}`, + }, + "sorts unsorted object": { + input: []byte(`{"b": 2, "a": 3, "c": 1}`), + wantOutput: `{"a":3,"b":2,"c":1}`, + }, + "sorts unsorted complex object": { + input: []byte(`{"aaa": true, "aa": true, "a": true}`), + wantOutput: `{"a":true,"aa":true,"aaa":true}`, + }, + "sorts nested objects": { + input: []byte(`{"x": {"y": {"z": null}}}`), + wantOutput: `{"x":{"y":{"z":null}}}`, + }, + "sorts deeply nested unsorted objects": { + input: []byte(`{"b": {"z": true, "x": true, "y": true}, "a": true, "c": true}`), + wantOutput: `{"a":true,"b":{"x":true,"y":true,"z":true},"c":true}`, + }, + "sorts objects in array sorted": { + input: []byte(`[1, 2, {"x": {"y": {"z": null}}}, 4]`), + wantOutput: `[1,2,{"x":{"y":{"z":null}}},4]`, + }, + "sorts objects in array unsorted": { + input: []byte(`[1, 2, {"b": {"z": true, "x": true, "y": true}, "a": true, "c": true}, 4]`), + wantOutput: `[1,2,{"a":true,"b":{"x":true,"y":true,"z":true},"c":true},4]`, + }, + } + + for name, tc := range tests { + t.Run(name, func(t *testing.T) { + got, err := sortedJSONStringify(tc.input) + require.NoError(t, err) + assert.Equal(t, tc.wantOutput, string(got)) + }) + } +} diff --git a/x/tx/signing/aminojson/fuzz_test.go b/x/tx/signing/aminojson/fuzz_test.go new file mode 100644 index 000000000000..e5cbe7ccf3f1 --- /dev/null +++ b/x/tx/signing/aminojson/fuzz_test.go @@ -0,0 +1,75 @@ +package aminojson + +import ( + "context" + "encoding/json" + "testing" + + fuzz "github.com/google/gofuzz" + + bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" + basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" + "cosmossdk.io/x/tx/signing/testutil" +) + +func FuzzSignModeGetSignBytes(f *testing.F) { + if testing.Short() { + f.Skip("not running in -short mode") + } + + // 1. Create seeds. + fee := &txv1beta1.Fee{ + Amount: []*basev1beta1.Coin{{Denom: "uatom", Amount: "1000"}}, + } + seed := &testutil.HandlerArgumentOptions{ + ChainID: "test-chain", + Memo: "sometestmemo", + + Msg: &bankv1beta1.MsgSend{ + FromAddress: "foo", + ToAddress: "bar", + Amount: []*basev1beta1.Coin{{Denom: "demon", Amount: "100"}}, + }, + AccNum: 1, + AccSeq: 2, + SignerAddress: "signerAddress", + Fee: fee, + } + + gf := fuzz.New() + for i := 0; i < 1e4; i++ { + blob, err := json.Marshal(seed) + if err != nil { + f.Fatal(err) + } + f.Add(blob) + + // 1.5. Mutate the seed for the next iteration. + // gofuzz cannot handle mutating "&bankv1beta1.MsgSend", + // hence why we are mutating fields individually. + gf.Fuzz(&seed.ChainID) + gf.Fuzz(&seed.Memo) + gf.Fuzz(&seed.AccNum) + gf.Fuzz(&seed.AccSeq) + gf.Fuzz(seed.Fee) + gf.Fuzz(&seed.SignerAddress) + } + + ctx := context.Background() + handler := NewSignModeHandler(SignModeHandlerOptions{}) + + // 2. Now run the fuzzers. + f.Fuzz(func(t *testing.T, in []byte) { + opts := new(testutil.HandlerArgumentOptions) + if err := json.Unmarshal(in, opts); err != nil { + return + } + + signerData, txData, err := testutil.MakeHandlerArguments(*opts) + if err != nil { + return + } + _, _ = handler.GetSignBytes(ctx, signerData, txData) + }) +} diff --git a/x/tx/signing/aminojson/internal/Makefile b/x/tx/signing/aminojson/internal/Makefile index 465057e261b1..6eb4420b60d2 100644 --- a/x/tx/signing/aminojson/internal/Makefile +++ b/x/tx/signing/aminojson/internal/Makefile @@ -1,4 +1,3 @@ codegen: @echo "Generating proto files" - @buf mod update @buf generate \ No newline at end of file diff --git a/x/tx/signing/aminojson/internal/aminojsonpb/aminojson.proto b/x/tx/signing/aminojson/internal/aminojsonpb/aminojson.proto index 42566486be21..8ab6373b864f 100644 --- a/x/tx/signing/aminojson/internal/aminojsonpb/aminojson.proto +++ b/x/tx/signing/aminojson/internal/aminojsonpb/aminojson.proto @@ -1,31 +1,28 @@ syntax = "proto3"; -import "cosmos_proto/cosmos.proto"; import "amino/amino.proto"; import "cosmos/base/v1beta1/coin.proto"; import "google/protobuf/any.proto"; -import "cosmos/tx/v1beta1/tx.proto"; // AminoSignFee is the legacy amino json sign mode compatible version of txv1beta1.Fee, and differs from that message // by the name of the Gas field (GasLimit in txv1beta.Fee). // Note: this is only used for signing, see x/tx/signing/aminojson.go for more details. message AminoSignFee { - repeated cosmos.base.v1beta1.Coin amount = 1 [(amino.dont_omitempty) = true, (amino.encoding) = "legacy_coins"]; - uint64 gas = 2 [(amino.dont_omitempty) = true]; - string payer = 3; - string granter = 4; + repeated cosmos.base.v1beta1.Coin amount = 1 [(amino.dont_omitempty) = true, (amino.encoding) = "legacy_coins"]; + uint64 gas = 2 [(amino.dont_omitempty) = true]; + string payer = 3; + string granter = 4; } // AminoSignDoc is a message container used to generate the SIGN_MODE_LEGACY_AMINO_JSON sign bytes with proto3 API. // Note: This is only used for generated JSON in signing, see x/tx/signing/aminojson.go for more details. // We allow omitempty based on what is already defined in the legacy StdSignDoc. message AminoSignDoc { - uint64 account_number = 1 [(amino.dont_omitempty) = true]; - uint64 sequence = 2 [(amino.dont_omitempty) = true]; - uint64 timeout_height = 3; - string chain_id = 4 [(amino.dont_omitempty) = true]; - string memo = 5 [(amino.dont_omitempty) = true]; - AminoSignFee fee = 6 [(amino.dont_omitempty) = true]; + uint64 account_number = 1 [(amino.dont_omitempty) = true]; + uint64 sequence = 2 [(amino.dont_omitempty) = true]; + uint64 timeout_height = 3; + string chain_id = 4 [(amino.dont_omitempty) = true]; + string memo = 5 [(amino.dont_omitempty) = true]; + AminoSignFee fee = 6 [(amino.dont_omitempty) = true]; repeated google.protobuf.Any msgs = 7 [(amino.dont_omitempty) = true]; - cosmos.tx.v1beta1.Tip tip = 8; -} \ No newline at end of file +} diff --git a/x/tx/signing/aminojson/internal/aminojsonpb/aminojson.pulsar.go b/x/tx/signing/aminojson/internal/aminojsonpb/aminojson.pulsar.go index d1f7f2540d35..e8ad14368fd9 100644 --- a/x/tx/signing/aminojson/internal/aminojsonpb/aminojson.pulsar.go +++ b/x/tx/signing/aminojson/internal/aminojsonpb/aminojson.pulsar.go @@ -4,9 +4,7 @@ package aminojsonpb import ( _ "cosmossdk.io/api/amino" v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" - v1beta11 "cosmossdk.io/api/cosmos/tx/v1beta1" 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" @@ -747,7 +745,6 @@ var ( fd_AminoSignDoc_memo protoreflect.FieldDescriptor fd_AminoSignDoc_fee protoreflect.FieldDescriptor fd_AminoSignDoc_msgs protoreflect.FieldDescriptor - fd_AminoSignDoc_tip protoreflect.FieldDescriptor ) func init() { @@ -760,7 +757,6 @@ func init() { fd_AminoSignDoc_memo = md_AminoSignDoc.Fields().ByName("memo") fd_AminoSignDoc_fee = md_AminoSignDoc.Fields().ByName("fee") fd_AminoSignDoc_msgs = md_AminoSignDoc.Fields().ByName("msgs") - fd_AminoSignDoc_tip = md_AminoSignDoc.Fields().ByName("tip") } var _ protoreflect.Message = (*fastReflection_AminoSignDoc)(nil) @@ -870,12 +866,6 @@ func (x *fastReflection_AminoSignDoc) Range(f func(protoreflect.FieldDescriptor, return } } - if x.Tip != nil { - value := protoreflect.ValueOfMessage(x.Tip.ProtoReflect()) - if !f(fd_AminoSignDoc_tip, value) { - return - } - } } // Has reports whether a field is populated. @@ -905,8 +895,6 @@ func (x *fastReflection_AminoSignDoc) Has(fd protoreflect.FieldDescriptor) bool return x.Fee != nil case "AminoSignDoc.msgs": return len(x.Msgs) != 0 - case "AminoSignDoc.tip": - return x.Tip != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: AminoSignDoc")) @@ -937,8 +925,6 @@ func (x *fastReflection_AminoSignDoc) Clear(fd protoreflect.FieldDescriptor) { x.Fee = nil case "AminoSignDoc.msgs": x.Msgs = nil - case "AminoSignDoc.tip": - x.Tip = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: AminoSignDoc")) @@ -979,9 +965,6 @@ func (x *fastReflection_AminoSignDoc) Get(descriptor protoreflect.FieldDescripto } listValue := &_AminoSignDoc_7_list{list: &x.Msgs} return protoreflect.ValueOfList(listValue) - case "AminoSignDoc.tip": - value := x.Tip - return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: AminoSignDoc")) @@ -1018,8 +1001,6 @@ func (x *fastReflection_AminoSignDoc) Set(fd protoreflect.FieldDescriptor, value lv := value.List() clv := lv.(*_AminoSignDoc_7_list) x.Msgs = *clv.list - case "AminoSignDoc.tip": - x.Tip = value.Message().Interface().(*v1beta11.Tip) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: AminoSignDoc")) @@ -1051,11 +1032,6 @@ func (x *fastReflection_AminoSignDoc) Mutable(fd protoreflect.FieldDescriptor) p } value := &_AminoSignDoc_7_list{list: &x.Msgs} return protoreflect.ValueOfList(value) - case "AminoSignDoc.tip": - if x.Tip == nil { - x.Tip = new(v1beta11.Tip) - } - return protoreflect.ValueOfMessage(x.Tip.ProtoReflect()) case "AminoSignDoc.account_number": panic(fmt.Errorf("field account_number of message AminoSignDoc is not mutable")) case "AminoSignDoc.sequence": @@ -1095,9 +1071,6 @@ func (x *fastReflection_AminoSignDoc) NewField(fd protoreflect.FieldDescriptor) case "AminoSignDoc.msgs": list := []*anypb.Any{} return protoreflect.ValueOfList(&_AminoSignDoc_7_list{list: &list}) - case "AminoSignDoc.tip": - m := new(v1beta11.Tip) - return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: AminoSignDoc")) @@ -1194,10 +1167,6 @@ func (x *fastReflection_AminoSignDoc) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } - if x.Tip != nil { - l = options.Size(x.Tip) - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1227,20 +1196,6 @@ func (x *fastReflection_AminoSignDoc) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Tip != nil { - encoded, err := options.Marshal(x.Tip) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } if len(x.Msgs) > 0 { for iNdEx := len(x.Msgs) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Msgs[iNdEx]) @@ -1540,42 +1495,6 @@ func (x *fastReflection_AminoSignDoc) ProtoMethods() *protoiface.Methods { 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 Tip", 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.Tip == nil { - x.Tip = &v1beta11.Tip{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Tip); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1701,7 +1620,6 @@ type AminoSignDoc struct { Memo string `protobuf:"bytes,5,opt,name=memo,proto3" json:"memo,omitempty"` Fee *AminoSignFee `protobuf:"bytes,6,opt,name=fee,proto3" json:"fee,omitempty"` Msgs []*anypb.Any `protobuf:"bytes,7,rep,name=msgs,proto3" json:"msgs,omitempty"` - Tip *v1beta11.Tip `protobuf:"bytes,8,opt,name=tip,proto3" json:"tip,omitempty"` } func (x *AminoSignDoc) Reset() { @@ -1773,63 +1691,50 @@ func (x *AminoSignDoc) GetMsgs() []*anypb.Any { return nil } -func (x *AminoSignDoc) GetTip() *v1beta11.Tip { - if x != nil { - return x.Tip - } - return nil -} - var File_aminojsonpb_aminojson_proto protoreflect.FileDescriptor var file_aminojsonpb_aminojson_proto_rawDesc = []byte{ 0x0a, 0x1b, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x6a, 0x73, 0x6f, 0x6e, 0x70, 0x62, 0x2f, 0x61, 0x6d, - 0x69, 0x6e, 0x6f, 0x6a, 0x73, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, - 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, - 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xa2, 0x01, 0x0a, 0x0c, 0x41, 0x6d, 0x69, 0x6e, 0x6f, 0x53, 0x69, 0x67, 0x6e, - 0x46, 0x65, 0x65, 0x12, 0x49, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x16, - 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, - 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, - 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x05, 0xa8, 0xe7, 0xb0, - 0x2a, 0x01, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x79, 0x65, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x79, 0x65, 0x72, 0x12, 0x18, 0x0a, - 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x22, 0xc6, 0x02, 0x0a, 0x0c, 0x41, 0x6d, 0x69, 0x6e, - 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x44, 0x6f, 0x63, 0x12, 0x2c, 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, - 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, - 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x12, 0x20, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x49, 0x64, 0x12, 0x19, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x26, 0x0a, - 0x03, 0x66, 0x65, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x41, 0x6d, 0x69, - 0x6e, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x46, 0x65, 0x65, 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, - 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x18, 0x07, 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, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, - 0x52, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x12, 0x28, 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x70, 0x52, 0x03, 0x74, 0x69, 0x70, - 0x42, 0x4b, 0x42, 0x0e, 0x41, 0x6d, 0x69, 0x6e, 0x6f, 0x6a, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, - 0x69, 0x6f, 0x2f, 0x78, 0x2f, 0x74, 0x78, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x6a, 0x73, 0x6f, - 0x6e, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, - 0x62, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x6a, 0x73, 0x6f, 0x6e, 0x70, 0x62, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6e, 0x6f, 0x6a, 0x73, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, + 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x01, 0x0a, 0x0c, + 0x41, 0x6d, 0x69, 0x6e, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x46, 0x65, 0x65, 0x12, 0x49, 0x0a, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x16, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, + 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x03, 0x67, 0x61, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x79, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x70, 0x61, 0x79, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, + 0x22, 0x9c, 0x02, 0x0a, 0x0c, 0x41, 0x6d, 0x69, 0x6e, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x44, 0x6f, + 0x63, 0x12, 0x2c, 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x21, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, + 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x74, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x20, 0x0a, 0x08, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x05, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x04, 0x6d, + 0x65, 0x6d, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x26, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x41, 0x6d, 0x69, 0x6e, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x46, + 0x65, 0x65, 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x2f, + 0x0a, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x18, 0x07, 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, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x42, + 0x4b, 0x42, 0x0e, 0x41, 0x6d, 0x69, 0x6e, 0x6f, 0x6a, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, + 0x6f, 0x2f, 0x78, 0x2f, 0x74, 0x78, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x6a, 0x73, 0x6f, 0x6e, + 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, + 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x6a, 0x73, 0x6f, 0x6e, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1850,18 +1755,16 @@ var file_aminojsonpb_aminojson_proto_goTypes = []interface{}{ (*AminoSignDoc)(nil), // 1: AminoSignDoc (*v1beta1.Coin)(nil), // 2: cosmos.base.v1beta1.Coin (*anypb.Any)(nil), // 3: google.protobuf.Any - (*v1beta11.Tip)(nil), // 4: cosmos.tx.v1beta1.Tip } var file_aminojsonpb_aminojson_proto_depIdxs = []int32{ 2, // 0: AminoSignFee.amount:type_name -> cosmos.base.v1beta1.Coin 0, // 1: AminoSignDoc.fee:type_name -> AminoSignFee 3, // 2: AminoSignDoc.msgs:type_name -> google.protobuf.Any - 4, // 3: AminoSignDoc.tip:type_name -> cosmos.tx.v1beta1.Tip - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] 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_aminojsonpb_aminojson_proto_init() } diff --git a/x/tx/signing/aminojson/internal/buf.lock b/x/tx/signing/aminojson/internal/buf.lock index 89f0d1904488..77b19169b1f7 100644 --- a/x/tx/signing/aminojson/internal/buf.lock +++ b/x/tx/signing/aminojson/internal/buf.lock @@ -9,8 +9,8 @@ deps: - remote: buf.build owner: cosmos repository: cosmos-sdk - commit: 9d547dbea90f47afbe1898388fcebffb - digest: shake256:63237398fb2043153c81bbe91ce52a832bca02d4307334b62fcc9914ce6f12fea59388eb5102949255054973f7022f581e02f97ed1f69a6585d2d00fb1da5833 + commit: 1356e87e6d1d4076b8bfb735737a0b63 + digest: shake256:574a0e72da9b55e30257557503bd4203513e5ca06dd8bc19fb8bf375fc8525a6bab4d9995e1554db7e9c649bc3778578e0cb96182176206f0653f2a17c073c46 - remote: buf.build owner: cosmos repository: gogo-proto diff --git a/x/tx/signing/aminojson/internal/testpb/test.proto b/x/tx/signing/aminojson/internal/testpb/test.proto index 0b1b3644c843..0bbb999426e6 100644 --- a/x/tx/signing/aminojson/internal/testpb/test.proto +++ b/x/tx/signing/aminojson/internal/testpb/test.proto @@ -20,6 +20,10 @@ message WithAList { repeated string list = 2; } +message WithAJson { + bytes field1 = 1 [(amino.encoding) = "inline_json"]; +} + message ABitOfEverything { option (amino.name) = "ABitOfEverything"; @@ -62,6 +66,11 @@ message ABitOfEverything { // google.protobuf.Duration duration = 24; } +message Duration { + google.protobuf.Duration duration = 1; + google.protobuf.Timestamp timestamp = 2; +} + message NestedMessage { option (amino.name) = "NestedMessage"; diff --git a/x/tx/signing/aminojson/internal/testpb/test.pulsar.go b/x/tx/signing/aminojson/internal/testpb/test.pulsar.go index ae8a54ee2571..0adf0b573d60 100644 --- a/x/tx/signing/aminojson/internal/testpb/test.pulsar.go +++ b/x/tx/signing/aminojson/internal/testpb/test.pulsar.go @@ -10,11 +10,11 @@ import ( protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" _ "google.golang.org/protobuf/types/known/anypb" - _ "google.golang.org/protobuf/types/known/durationpb" + durationpb "google.golang.org/protobuf/types/known/durationpb" _ "google.golang.org/protobuf/types/known/emptypb" _ "google.golang.org/protobuf/types/known/fieldmaskpb" _ "google.golang.org/protobuf/types/known/structpb" - _ "google.golang.org/protobuf/types/known/timestamppb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" _ "google.golang.org/protobuf/types/known/wrapperspb" io "io" reflect "reflect" @@ -1286,102 +1286,26 @@ func (x *fastReflection_WithAList) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.List = (*_ABitOfEverything_6_list)(nil) - -type _ABitOfEverything_6_list struct { - list *[]int32 -} - -func (x *_ABitOfEverything_6_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ABitOfEverything_6_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfInt32((*x.list)[i]) -} - -func (x *_ABitOfEverything_6_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Int() - concreteValue := (int32)(valueUnwrapped) - (*x.list)[i] = concreteValue -} - -func (x *_ABitOfEverything_6_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Int() - concreteValue := (int32)(valueUnwrapped) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ABitOfEverything_6_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message ABitOfEverything at list field Repeated as it is not of Message kind")) -} - -func (x *_ABitOfEverything_6_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_ABitOfEverything_6_list) NewElement() protoreflect.Value { - v := int32(0) - return protoreflect.ValueOfInt32(v) -} - -func (x *_ABitOfEverything_6_list) IsValid() bool { - return x.list != nil -} - var ( - md_ABitOfEverything protoreflect.MessageDescriptor - fd_ABitOfEverything_message protoreflect.FieldDescriptor - fd_ABitOfEverything_enum protoreflect.FieldDescriptor - fd_ABitOfEverything_repeated protoreflect.FieldDescriptor - fd_ABitOfEverything_str protoreflect.FieldDescriptor - fd_ABitOfEverything_bool protoreflect.FieldDescriptor - fd_ABitOfEverything_bytes protoreflect.FieldDescriptor - fd_ABitOfEverything_i32 protoreflect.FieldDescriptor - fd_ABitOfEverything_f32 protoreflect.FieldDescriptor - fd_ABitOfEverything_u32 protoreflect.FieldDescriptor - fd_ABitOfEverything_si32 protoreflect.FieldDescriptor - fd_ABitOfEverything_sf32 protoreflect.FieldDescriptor - fd_ABitOfEverything_i64 protoreflect.FieldDescriptor - fd_ABitOfEverything_f64 protoreflect.FieldDescriptor - fd_ABitOfEverything_u64 protoreflect.FieldDescriptor - fd_ABitOfEverything_si64 protoreflect.FieldDescriptor - fd_ABitOfEverything_sf64 protoreflect.FieldDescriptor + md_WithAJson protoreflect.MessageDescriptor + fd_WithAJson_field1 protoreflect.FieldDescriptor ) func init() { file_testpb_test_proto_init() - md_ABitOfEverything = File_testpb_test_proto.Messages().ByName("ABitOfEverything") - fd_ABitOfEverything_message = md_ABitOfEverything.Fields().ByName("message") - fd_ABitOfEverything_enum = md_ABitOfEverything.Fields().ByName("enum") - fd_ABitOfEverything_repeated = md_ABitOfEverything.Fields().ByName("repeated") - fd_ABitOfEverything_str = md_ABitOfEverything.Fields().ByName("str") - fd_ABitOfEverything_bool = md_ABitOfEverything.Fields().ByName("bool") - fd_ABitOfEverything_bytes = md_ABitOfEverything.Fields().ByName("bytes") - fd_ABitOfEverything_i32 = md_ABitOfEverything.Fields().ByName("i32") - fd_ABitOfEverything_f32 = md_ABitOfEverything.Fields().ByName("f32") - fd_ABitOfEverything_u32 = md_ABitOfEverything.Fields().ByName("u32") - fd_ABitOfEverything_si32 = md_ABitOfEverything.Fields().ByName("si32") - fd_ABitOfEverything_sf32 = md_ABitOfEverything.Fields().ByName("sf32") - fd_ABitOfEverything_i64 = md_ABitOfEverything.Fields().ByName("i64") - fd_ABitOfEverything_f64 = md_ABitOfEverything.Fields().ByName("f64") - fd_ABitOfEverything_u64 = md_ABitOfEverything.Fields().ByName("u64") - fd_ABitOfEverything_si64 = md_ABitOfEverything.Fields().ByName("si64") - fd_ABitOfEverything_sf64 = md_ABitOfEverything.Fields().ByName("sf64") + md_WithAJson = File_testpb_test_proto.Messages().ByName("WithAJson") + fd_WithAJson_field1 = md_WithAJson.Fields().ByName("field1") } -var _ protoreflect.Message = (*fastReflection_ABitOfEverything)(nil) +var _ protoreflect.Message = (*fastReflection_WithAJson)(nil) -type fastReflection_ABitOfEverything ABitOfEverything +type fastReflection_WithAJson WithAJson -func (x *ABitOfEverything) ProtoReflect() protoreflect.Message { - return (*fastReflection_ABitOfEverything)(x) +func (x *WithAJson) ProtoReflect() protoreflect.Message { + return (*fastReflection_WithAJson)(x) } -func (x *ABitOfEverything) slowProtoReflect() protoreflect.Message { +func (x *WithAJson) slowProtoReflect() protoreflect.Message { mi := &file_testpb_test_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1393,43 +1317,43 @@ func (x *ABitOfEverything) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_ABitOfEverything_messageType fastReflection_ABitOfEverything_messageType -var _ protoreflect.MessageType = fastReflection_ABitOfEverything_messageType{} +var _fastReflection_WithAJson_messageType fastReflection_WithAJson_messageType +var _ protoreflect.MessageType = fastReflection_WithAJson_messageType{} -type fastReflection_ABitOfEverything_messageType struct{} +type fastReflection_WithAJson_messageType struct{} -func (x fastReflection_ABitOfEverything_messageType) Zero() protoreflect.Message { - return (*fastReflection_ABitOfEverything)(nil) +func (x fastReflection_WithAJson_messageType) Zero() protoreflect.Message { + return (*fastReflection_WithAJson)(nil) } -func (x fastReflection_ABitOfEverything_messageType) New() protoreflect.Message { - return new(fastReflection_ABitOfEverything) +func (x fastReflection_WithAJson_messageType) New() protoreflect.Message { + return new(fastReflection_WithAJson) } -func (x fastReflection_ABitOfEverything_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ABitOfEverything +func (x fastReflection_WithAJson_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_WithAJson } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_ABitOfEverything) Descriptor() protoreflect.MessageDescriptor { - return md_ABitOfEverything +func (x *fastReflection_WithAJson) Descriptor() protoreflect.MessageDescriptor { + return md_WithAJson } // 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_ABitOfEverything) Type() protoreflect.MessageType { - return _fastReflection_ABitOfEverything_messageType +func (x *fastReflection_WithAJson) Type() protoreflect.MessageType { + return _fastReflection_WithAJson_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_ABitOfEverything) New() protoreflect.Message { - return new(fastReflection_ABitOfEverything) +func (x *fastReflection_WithAJson) New() protoreflect.Message { + return new(fastReflection_WithAJson) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_ABitOfEverything) Interface() protoreflect.ProtoMessage { - return (*ABitOfEverything)(x) +func (x *fastReflection_WithAJson) Interface() protoreflect.ProtoMessage { + return (*WithAJson)(x) } // Range iterates over every populated field in an undefined order, @@ -1437,100 +1361,10 @@ func (x *fastReflection_ABitOfEverything) Interface() protoreflect.ProtoMessage // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_ABitOfEverything) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Message != nil { - value := protoreflect.ValueOfMessage(x.Message.ProtoReflect()) - if !f(fd_ABitOfEverything_message, value) { - return - } - } - if x.Enum != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Enum)) - if !f(fd_ABitOfEverything_enum, value) { - return - } - } - if len(x.Repeated) != 0 { - value := protoreflect.ValueOfList(&_ABitOfEverything_6_list{list: &x.Repeated}) - if !f(fd_ABitOfEverything_repeated, value) { - return - } - } - if x.Str != "" { - value := protoreflect.ValueOfString(x.Str) - if !f(fd_ABitOfEverything_str, value) { - return - } - } - if x.Bool != false { - value := protoreflect.ValueOfBool(x.Bool) - if !f(fd_ABitOfEverything_bool, value) { - return - } - } - if len(x.Bytes) != 0 { - value := protoreflect.ValueOfBytes(x.Bytes) - if !f(fd_ABitOfEverything_bytes, value) { - return - } - } - if x.I32 != int32(0) { - value := protoreflect.ValueOfInt32(x.I32) - if !f(fd_ABitOfEverything_i32, value) { - return - } - } - if x.F32 != uint32(0) { - value := protoreflect.ValueOfUint32(x.F32) - if !f(fd_ABitOfEverything_f32, value) { - return - } - } - if x.U32 != uint32(0) { - value := protoreflect.ValueOfUint32(x.U32) - if !f(fd_ABitOfEverything_u32, value) { - return - } - } - if x.Si32 != int32(0) { - value := protoreflect.ValueOfInt32(x.Si32) - if !f(fd_ABitOfEverything_si32, value) { - return - } - } - if x.Sf32 != int32(0) { - value := protoreflect.ValueOfInt32(x.Sf32) - if !f(fd_ABitOfEverything_sf32, value) { - return - } - } - if x.I64 != int64(0) { - value := protoreflect.ValueOfInt64(x.I64) - if !f(fd_ABitOfEverything_i64, value) { - return - } - } - if x.F64 != uint64(0) { - value := protoreflect.ValueOfUint64(x.F64) - if !f(fd_ABitOfEverything_f64, value) { - return - } - } - if x.U64 != uint64(0) { - value := protoreflect.ValueOfUint64(x.U64) - if !f(fd_ABitOfEverything_u64, value) { - return - } - } - if x.Si64 != int64(0) { - value := protoreflect.ValueOfInt64(x.Si64) - if !f(fd_ABitOfEverything_si64, value) { - return - } - } - if x.Sf64 != int64(0) { - value := protoreflect.ValueOfInt64(x.Sf64) - if !f(fd_ABitOfEverything_sf64, value) { +func (x *fastReflection_WithAJson) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Field1) != 0 { + value := protoreflect.ValueOfBytes(x.Field1) + if !f(fd_WithAJson_field1, value) { return } } @@ -1547,45 +1381,15 @@ func (x *fastReflection_ABitOfEverything) Range(f func(protoreflect.FieldDescrip // 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_ABitOfEverything) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_WithAJson) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "testpb.ABitOfEverything.message": - return x.Message != nil - case "testpb.ABitOfEverything.enum": - return x.Enum != 0 - case "testpb.ABitOfEverything.repeated": - return len(x.Repeated) != 0 - case "testpb.ABitOfEverything.str": - return x.Str != "" - case "testpb.ABitOfEverything.bool": - return x.Bool != false - case "testpb.ABitOfEverything.bytes": - return len(x.Bytes) != 0 - case "testpb.ABitOfEverything.i32": - return x.I32 != int32(0) - case "testpb.ABitOfEverything.f32": - return x.F32 != uint32(0) - case "testpb.ABitOfEverything.u32": - return x.U32 != uint32(0) - case "testpb.ABitOfEverything.si32": - return x.Si32 != int32(0) - case "testpb.ABitOfEverything.sf32": - return x.Sf32 != int32(0) - case "testpb.ABitOfEverything.i64": - return x.I64 != int64(0) - case "testpb.ABitOfEverything.f64": - return x.F64 != uint64(0) - case "testpb.ABitOfEverything.u64": - return x.U64 != uint64(0) - case "testpb.ABitOfEverything.si64": - return x.Si64 != int64(0) - case "testpb.ABitOfEverything.sf64": - return x.Sf64 != int64(0) + case "testpb.WithAJson.field1": + return len(x.Field1) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.ABitOfEverything")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.WithAJson")) } - panic(fmt.Errorf("message testpb.ABitOfEverything does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.WithAJson does not contain field %s", fd.FullName())) } } @@ -1595,45 +1399,15 @@ func (x *fastReflection_ABitOfEverything) Has(fd protoreflect.FieldDescriptor) b // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ABitOfEverything) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_WithAJson) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "testpb.ABitOfEverything.message": - x.Message = nil - case "testpb.ABitOfEverything.enum": - x.Enum = 0 - case "testpb.ABitOfEverything.repeated": - x.Repeated = nil - case "testpb.ABitOfEverything.str": - x.Str = "" - case "testpb.ABitOfEverything.bool": - x.Bool = false - case "testpb.ABitOfEverything.bytes": - x.Bytes = nil - case "testpb.ABitOfEverything.i32": - x.I32 = int32(0) - case "testpb.ABitOfEverything.f32": - x.F32 = uint32(0) - case "testpb.ABitOfEverything.u32": - x.U32 = uint32(0) - case "testpb.ABitOfEverything.si32": - x.Si32 = int32(0) - case "testpb.ABitOfEverything.sf32": - x.Sf32 = int32(0) - case "testpb.ABitOfEverything.i64": - x.I64 = int64(0) - case "testpb.ABitOfEverything.f64": - x.F64 = uint64(0) - case "testpb.ABitOfEverything.u64": - x.U64 = uint64(0) - case "testpb.ABitOfEverything.si64": - x.Si64 = int64(0) - case "testpb.ABitOfEverything.sf64": - x.Sf64 = int64(0) + case "testpb.WithAJson.field1": + x.Field1 = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.ABitOfEverything")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.WithAJson")) } - panic(fmt.Errorf("message testpb.ABitOfEverything does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.WithAJson does not contain field %s", fd.FullName())) } } @@ -1643,64 +1417,16 @@ func (x *fastReflection_ABitOfEverything) Clear(fd protoreflect.FieldDescriptor) // 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_ABitOfEverything) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_WithAJson) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "testpb.ABitOfEverything.message": - value := x.Message - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testpb.ABitOfEverything.enum": - value := x.Enum - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "testpb.ABitOfEverything.repeated": - if len(x.Repeated) == 0 { - return protoreflect.ValueOfList(&_ABitOfEverything_6_list{}) - } - listValue := &_ABitOfEverything_6_list{list: &x.Repeated} - return protoreflect.ValueOfList(listValue) - case "testpb.ABitOfEverything.str": - value := x.Str - return protoreflect.ValueOfString(value) - case "testpb.ABitOfEverything.bool": - value := x.Bool - return protoreflect.ValueOfBool(value) - case "testpb.ABitOfEverything.bytes": - value := x.Bytes + case "testpb.WithAJson.field1": + value := x.Field1 return protoreflect.ValueOfBytes(value) - case "testpb.ABitOfEverything.i32": - value := x.I32 - return protoreflect.ValueOfInt32(value) - case "testpb.ABitOfEverything.f32": - value := x.F32 - return protoreflect.ValueOfUint32(value) - case "testpb.ABitOfEverything.u32": - value := x.U32 - return protoreflect.ValueOfUint32(value) - case "testpb.ABitOfEverything.si32": - value := x.Si32 - return protoreflect.ValueOfInt32(value) - case "testpb.ABitOfEverything.sf32": - value := x.Sf32 - return protoreflect.ValueOfInt32(value) - case "testpb.ABitOfEverything.i64": - value := x.I64 - return protoreflect.ValueOfInt64(value) - case "testpb.ABitOfEverything.f64": - value := x.F64 - return protoreflect.ValueOfUint64(value) - case "testpb.ABitOfEverything.u64": - value := x.U64 - return protoreflect.ValueOfUint64(value) - case "testpb.ABitOfEverything.si64": - value := x.Si64 - return protoreflect.ValueOfInt64(value) - case "testpb.ABitOfEverything.sf64": - value := x.Sf64 - return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.ABitOfEverything")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.WithAJson")) } - panic(fmt.Errorf("message testpb.ABitOfEverything does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message testpb.WithAJson does not contain field %s", descriptor.FullName())) } } @@ -1714,47 +1440,15 @@ func (x *fastReflection_ABitOfEverything) Get(descriptor protoreflect.FieldDescr // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ABitOfEverything) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_WithAJson) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "testpb.ABitOfEverything.message": - x.Message = value.Message().Interface().(*NestedMessage) - case "testpb.ABitOfEverything.enum": - x.Enum = (AnEnum)(value.Enum()) - case "testpb.ABitOfEverything.repeated": - lv := value.List() - clv := lv.(*_ABitOfEverything_6_list) - x.Repeated = *clv.list - case "testpb.ABitOfEverything.str": - x.Str = value.Interface().(string) - case "testpb.ABitOfEverything.bool": - x.Bool = value.Bool() - case "testpb.ABitOfEverything.bytes": - x.Bytes = value.Bytes() - case "testpb.ABitOfEverything.i32": - x.I32 = int32(value.Int()) - case "testpb.ABitOfEverything.f32": - x.F32 = uint32(value.Uint()) - case "testpb.ABitOfEverything.u32": - x.U32 = uint32(value.Uint()) - case "testpb.ABitOfEverything.si32": - x.Si32 = int32(value.Int()) - case "testpb.ABitOfEverything.sf32": - x.Sf32 = int32(value.Int()) - case "testpb.ABitOfEverything.i64": - x.I64 = value.Int() - case "testpb.ABitOfEverything.f64": - x.F64 = value.Uint() - case "testpb.ABitOfEverything.u64": - x.U64 = value.Uint() - case "testpb.ABitOfEverything.si64": - x.Si64 = value.Int() - case "testpb.ABitOfEverything.sf64": - x.Sf64 = value.Int() + case "testpb.WithAJson.field1": + x.Field1 = value.Bytes() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.ABitOfEverything")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.WithAJson")) } - panic(fmt.Errorf("message testpb.ABitOfEverything does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.WithAJson does not contain field %s", fd.FullName())) } } @@ -1768,109 +1462,40 @@ func (x *fastReflection_ABitOfEverything) Set(fd protoreflect.FieldDescriptor, v // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ABitOfEverything) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_WithAJson) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "testpb.ABitOfEverything.message": - if x.Message == nil { - x.Message = new(NestedMessage) - } - return protoreflect.ValueOfMessage(x.Message.ProtoReflect()) - case "testpb.ABitOfEverything.repeated": - if x.Repeated == nil { - x.Repeated = []int32{} - } - value := &_ABitOfEverything_6_list{list: &x.Repeated} - return protoreflect.ValueOfList(value) - case "testpb.ABitOfEverything.enum": - panic(fmt.Errorf("field enum of message testpb.ABitOfEverything is not mutable")) - case "testpb.ABitOfEverything.str": - panic(fmt.Errorf("field str of message testpb.ABitOfEverything is not mutable")) - case "testpb.ABitOfEverything.bool": - panic(fmt.Errorf("field bool of message testpb.ABitOfEverything is not mutable")) - case "testpb.ABitOfEverything.bytes": - panic(fmt.Errorf("field bytes of message testpb.ABitOfEverything is not mutable")) - case "testpb.ABitOfEverything.i32": - panic(fmt.Errorf("field i32 of message testpb.ABitOfEverything is not mutable")) - case "testpb.ABitOfEverything.f32": - panic(fmt.Errorf("field f32 of message testpb.ABitOfEverything is not mutable")) - case "testpb.ABitOfEverything.u32": - panic(fmt.Errorf("field u32 of message testpb.ABitOfEverything is not mutable")) - case "testpb.ABitOfEverything.si32": - panic(fmt.Errorf("field si32 of message testpb.ABitOfEverything is not mutable")) - case "testpb.ABitOfEverything.sf32": - panic(fmt.Errorf("field sf32 of message testpb.ABitOfEverything is not mutable")) - case "testpb.ABitOfEverything.i64": - panic(fmt.Errorf("field i64 of message testpb.ABitOfEverything is not mutable")) - case "testpb.ABitOfEverything.f64": - panic(fmt.Errorf("field f64 of message testpb.ABitOfEverything is not mutable")) - case "testpb.ABitOfEverything.u64": - panic(fmt.Errorf("field u64 of message testpb.ABitOfEverything is not mutable")) - case "testpb.ABitOfEverything.si64": - panic(fmt.Errorf("field si64 of message testpb.ABitOfEverything is not mutable")) - case "testpb.ABitOfEverything.sf64": - panic(fmt.Errorf("field sf64 of message testpb.ABitOfEverything is not mutable")) + case "testpb.WithAJson.field1": + panic(fmt.Errorf("field field1 of message testpb.WithAJson is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.ABitOfEverything")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.WithAJson")) } - panic(fmt.Errorf("message testpb.ABitOfEverything does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.WithAJson 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_ABitOfEverything) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_WithAJson) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "testpb.ABitOfEverything.message": - m := new(NestedMessage) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testpb.ABitOfEverything.enum": - return protoreflect.ValueOfEnum(0) - case "testpb.ABitOfEverything.repeated": - list := []int32{} - return protoreflect.ValueOfList(&_ABitOfEverything_6_list{list: &list}) - case "testpb.ABitOfEverything.str": - return protoreflect.ValueOfString("") - case "testpb.ABitOfEverything.bool": - return protoreflect.ValueOfBool(false) - case "testpb.ABitOfEverything.bytes": + case "testpb.WithAJson.field1": return protoreflect.ValueOfBytes(nil) - case "testpb.ABitOfEverything.i32": - return protoreflect.ValueOfInt32(int32(0)) - case "testpb.ABitOfEverything.f32": - return protoreflect.ValueOfUint32(uint32(0)) - case "testpb.ABitOfEverything.u32": - return protoreflect.ValueOfUint32(uint32(0)) - case "testpb.ABitOfEverything.si32": - return protoreflect.ValueOfInt32(int32(0)) - case "testpb.ABitOfEverything.sf32": - return protoreflect.ValueOfInt32(int32(0)) - case "testpb.ABitOfEverything.i64": - return protoreflect.ValueOfInt64(int64(0)) - case "testpb.ABitOfEverything.f64": - return protoreflect.ValueOfUint64(uint64(0)) - case "testpb.ABitOfEverything.u64": - return protoreflect.ValueOfUint64(uint64(0)) - case "testpb.ABitOfEverything.si64": - return protoreflect.ValueOfInt64(int64(0)) - case "testpb.ABitOfEverything.sf64": - return protoreflect.ValueOfInt64(int64(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.ABitOfEverything")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.WithAJson")) } - panic(fmt.Errorf("message testpb.ABitOfEverything does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.WithAJson 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_ABitOfEverything) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_WithAJson) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in testpb.ABitOfEverything", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in testpb.WithAJson", d.FullName())) } panic("unreachable") } @@ -1878,7 +1503,7 @@ func (x *fastReflection_ABitOfEverything) WhichOneof(d protoreflect.OneofDescrip // 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_ABitOfEverything) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_WithAJson) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1889,7 +1514,7 @@ func (x *fastReflection_ABitOfEverything) 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_ABitOfEverything) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_WithAJson) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1901,7 +1526,7 @@ func (x *fastReflection_ABitOfEverything) SetUnknown(fields protoreflect.RawFiel // 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_ABitOfEverything) IsValid() bool { +func (x *fastReflection_WithAJson) IsValid() bool { return x != nil } @@ -1911,9 +1536,9 @@ func (x *fastReflection_ABitOfEverything) 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_ABitOfEverything) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_WithAJson) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ABitOfEverything) + x := input.Message.Interface().(*WithAJson) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1925,61 +1550,10 @@ func (x *fastReflection_ABitOfEverything) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.Message != nil { - l = options.Size(x.Message) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Enum != 0 { - n += 1 + runtime.Sov(uint64(x.Enum)) - } - if len(x.Repeated) > 0 { - l = 0 - for _, e := range x.Repeated { - l += runtime.Sov(uint64(e)) - } - n += 1 + runtime.Sov(uint64(l)) + l - } - l = len(x.Str) + l = len(x.Field1) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.Bool { - n += 2 - } - l = len(x.Bytes) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.I32 != 0 { - n += 1 + runtime.Sov(uint64(x.I32)) - } - if x.F32 != 0 { - n += 5 - } - if x.U32 != 0 { - n += 1 + runtime.Sov(uint64(x.U32)) - } - if x.Si32 != 0 { - n += 1 + runtime.Soz(uint64(x.Si32)) - } - if x.Sf32 != 0 { - n += 5 - } - if x.I64 != 0 { - n += 1 + runtime.Sov(uint64(x.I64)) - } - if x.F64 != 0 { - n += 10 - } - if x.U64 != 0 { - n += 2 + runtime.Sov(uint64(x.U64)) - } - if x.Si64 != 0 { - n += 2 + runtime.Soz(uint64(x.Si64)) - } - if x.Sf64 != 0 { - n += 10 - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1990,7 +1564,7 @@ func (x *fastReflection_ABitOfEverything) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ABitOfEverything) + x := input.Message.Interface().(*WithAJson) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2009,136 +1583,17 @@ func (x *fastReflection_ABitOfEverything) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Sf64 != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(x.Sf64)) - i-- - dAtA[i] = 0x1 + if len(x.Field1) > 0 { + i -= len(x.Field1) + copy(dAtA[i:], x.Field1) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Field1))) i-- - dAtA[i] = 0x99 + dAtA[i] = 0xa } - if x.Si64 != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64((uint64(x.Si64)<<1)^uint64((x.Si64>>63)))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x90 - } - if x.U64 != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.U64)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x88 - } - if x.F64 != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(x.F64)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x81 - } - if x.I64 != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.I64)) - i-- - dAtA[i] = 0x78 - } - if x.Sf32 != 0 { - i -= 4 - binary.LittleEndian.PutUint32(dAtA[i:], uint32(x.Sf32)) - i-- - dAtA[i] = 0x75 - } - if x.Si32 != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64((uint32(x.Si32)<<1)^uint32((x.Si32>>31)))) - i-- - dAtA[i] = 0x68 - } - if x.U32 != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.U32)) - i-- - dAtA[i] = 0x60 - } - if x.F32 != 0 { - i -= 4 - binary.LittleEndian.PutUint32(dAtA[i:], uint32(x.F32)) - i-- - dAtA[i] = 0x5d - } - if x.I32 != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.I32)) - i-- - dAtA[i] = 0x50 - } - if len(x.Bytes) > 0 { - i -= len(x.Bytes) - copy(dAtA[i:], x.Bytes) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bytes))) - i-- - dAtA[i] = 0x4a - } - if x.Bool { - i-- - if x.Bool { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if len(x.Str) > 0 { - i -= len(x.Str) - copy(dAtA[i:], x.Str) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Str))) - i-- - dAtA[i] = 0x3a - } - if len(x.Repeated) > 0 { - var pksize2 int - for _, num := range x.Repeated { - pksize2 += runtime.Sov(uint64(num)) - } - i -= pksize2 - j1 := i - for _, num1 := range x.Repeated { - num := uint64(num1) - for num >= 1<<7 { - dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA[j1] = uint8(num) - j1++ - } - i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) - i-- - dAtA[i] = 0x32 - } - if x.Enum != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Enum)) - i-- - dAtA[i] = 0x10 - } - if x.Message != nil { - encoded, err := options.Marshal(x.Message) - 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 + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2146,7 +1601,7 @@ func (x *fastReflection_ABitOfEverything) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ABitOfEverything) + x := input.Message.Interface().(*WithAJson) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2178,17 +1633,17 @@ func (x *fastReflection_ABitOfEverything) 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: ABitOfEverything: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: WithAJson: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ABitOfEverything: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: WithAJson: 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 Message", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2198,180 +1653,1781 @@ func (x *fastReflection_ABitOfEverything) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + msglen + 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 } - if x.Message == nil { - x.Message = &NestedMessage{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Message); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + x.Field1 = append(x.Field1[:0], dAtA[iNdEx:postIndex]...) + if x.Field1 == nil { + x.Field1 = []byte{} } iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Enum", wireType) - } - x.Enum = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Enum |= AnEnum(b&0x7F) << shift - if b < 0x80 { - break - } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } - case 6: - if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Repeated = append(x.Repeated, v) - } else if wireType == 2 { - var packedLen 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++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + packedLen - 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 - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(x.Repeated) == 0 { - x.Repeated = make([]int32, 0, elementCount) - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Repeated = append(x.Repeated, v) - } - } else { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Repeated", wireType) + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Str", wireType) + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - 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 - } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + 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 = (*_ABitOfEverything_6_list)(nil) + +type _ABitOfEverything_6_list struct { + list *[]int32 +} + +func (x *_ABitOfEverything_6_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ABitOfEverything_6_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfInt32((*x.list)[i]) +} + +func (x *_ABitOfEverything_6_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Int() + concreteValue := (int32)(valueUnwrapped) + (*x.list)[i] = concreteValue +} + +func (x *_ABitOfEverything_6_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Int() + concreteValue := (int32)(valueUnwrapped) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ABitOfEverything_6_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message ABitOfEverything at list field Repeated as it is not of Message kind")) +} + +func (x *_ABitOfEverything_6_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_ABitOfEverything_6_list) NewElement() protoreflect.Value { + v := int32(0) + return protoreflect.ValueOfInt32(v) +} + +func (x *_ABitOfEverything_6_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ABitOfEverything protoreflect.MessageDescriptor + fd_ABitOfEverything_message protoreflect.FieldDescriptor + fd_ABitOfEverything_enum protoreflect.FieldDescriptor + fd_ABitOfEverything_repeated protoreflect.FieldDescriptor + fd_ABitOfEverything_str protoreflect.FieldDescriptor + fd_ABitOfEverything_bool protoreflect.FieldDescriptor + fd_ABitOfEverything_bytes protoreflect.FieldDescriptor + fd_ABitOfEverything_i32 protoreflect.FieldDescriptor + fd_ABitOfEverything_f32 protoreflect.FieldDescriptor + fd_ABitOfEverything_u32 protoreflect.FieldDescriptor + fd_ABitOfEverything_si32 protoreflect.FieldDescriptor + fd_ABitOfEverything_sf32 protoreflect.FieldDescriptor + fd_ABitOfEverything_i64 protoreflect.FieldDescriptor + fd_ABitOfEverything_f64 protoreflect.FieldDescriptor + fd_ABitOfEverything_u64 protoreflect.FieldDescriptor + fd_ABitOfEverything_si64 protoreflect.FieldDescriptor + fd_ABitOfEverything_sf64 protoreflect.FieldDescriptor +) + +func init() { + file_testpb_test_proto_init() + md_ABitOfEverything = File_testpb_test_proto.Messages().ByName("ABitOfEverything") + fd_ABitOfEverything_message = md_ABitOfEverything.Fields().ByName("message") + fd_ABitOfEverything_enum = md_ABitOfEverything.Fields().ByName("enum") + fd_ABitOfEverything_repeated = md_ABitOfEverything.Fields().ByName("repeated") + fd_ABitOfEverything_str = md_ABitOfEverything.Fields().ByName("str") + fd_ABitOfEverything_bool = md_ABitOfEverything.Fields().ByName("bool") + fd_ABitOfEverything_bytes = md_ABitOfEverything.Fields().ByName("bytes") + fd_ABitOfEverything_i32 = md_ABitOfEverything.Fields().ByName("i32") + fd_ABitOfEverything_f32 = md_ABitOfEverything.Fields().ByName("f32") + fd_ABitOfEverything_u32 = md_ABitOfEverything.Fields().ByName("u32") + fd_ABitOfEverything_si32 = md_ABitOfEverything.Fields().ByName("si32") + fd_ABitOfEverything_sf32 = md_ABitOfEverything.Fields().ByName("sf32") + fd_ABitOfEverything_i64 = md_ABitOfEverything.Fields().ByName("i64") + fd_ABitOfEverything_f64 = md_ABitOfEverything.Fields().ByName("f64") + fd_ABitOfEverything_u64 = md_ABitOfEverything.Fields().ByName("u64") + fd_ABitOfEverything_si64 = md_ABitOfEverything.Fields().ByName("si64") + fd_ABitOfEverything_sf64 = md_ABitOfEverything.Fields().ByName("sf64") +} + +var _ protoreflect.Message = (*fastReflection_ABitOfEverything)(nil) + +type fastReflection_ABitOfEverything ABitOfEverything + +func (x *ABitOfEverything) ProtoReflect() protoreflect.Message { + return (*fastReflection_ABitOfEverything)(x) +} + +func (x *ABitOfEverything) slowProtoReflect() protoreflect.Message { + mi := &file_testpb_test_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ABitOfEverything_messageType fastReflection_ABitOfEverything_messageType +var _ protoreflect.MessageType = fastReflection_ABitOfEverything_messageType{} + +type fastReflection_ABitOfEverything_messageType struct{} + +func (x fastReflection_ABitOfEverything_messageType) Zero() protoreflect.Message { + return (*fastReflection_ABitOfEverything)(nil) +} +func (x fastReflection_ABitOfEverything_messageType) New() protoreflect.Message { + return new(fastReflection_ABitOfEverything) +} +func (x fastReflection_ABitOfEverything_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ABitOfEverything +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ABitOfEverything) Descriptor() protoreflect.MessageDescriptor { + return md_ABitOfEverything +} + +// 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_ABitOfEverything) Type() protoreflect.MessageType { + return _fastReflection_ABitOfEverything_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ABitOfEverything) New() protoreflect.Message { + return new(fastReflection_ABitOfEverything) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ABitOfEverything) Interface() protoreflect.ProtoMessage { + return (*ABitOfEverything)(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_ABitOfEverything) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Message != nil { + value := protoreflect.ValueOfMessage(x.Message.ProtoReflect()) + if !f(fd_ABitOfEverything_message, value) { + return + } + } + if x.Enum != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Enum)) + if !f(fd_ABitOfEverything_enum, value) { + return + } + } + if len(x.Repeated) != 0 { + value := protoreflect.ValueOfList(&_ABitOfEverything_6_list{list: &x.Repeated}) + if !f(fd_ABitOfEverything_repeated, value) { + return + } + } + if x.Str != "" { + value := protoreflect.ValueOfString(x.Str) + if !f(fd_ABitOfEverything_str, value) { + return + } + } + if x.Bool != false { + value := protoreflect.ValueOfBool(x.Bool) + if !f(fd_ABitOfEverything_bool, value) { + return + } + } + if len(x.Bytes) != 0 { + value := protoreflect.ValueOfBytes(x.Bytes) + if !f(fd_ABitOfEverything_bytes, value) { + return + } + } + if x.I32 != int32(0) { + value := protoreflect.ValueOfInt32(x.I32) + if !f(fd_ABitOfEverything_i32, value) { + return + } + } + if x.F32 != uint32(0) { + value := protoreflect.ValueOfUint32(x.F32) + if !f(fd_ABitOfEverything_f32, value) { + return + } + } + if x.U32 != uint32(0) { + value := protoreflect.ValueOfUint32(x.U32) + if !f(fd_ABitOfEverything_u32, value) { + return + } + } + if x.Si32 != int32(0) { + value := protoreflect.ValueOfInt32(x.Si32) + if !f(fd_ABitOfEverything_si32, value) { + return + } + } + if x.Sf32 != int32(0) { + value := protoreflect.ValueOfInt32(x.Sf32) + if !f(fd_ABitOfEverything_sf32, value) { + return + } + } + if x.I64 != int64(0) { + value := protoreflect.ValueOfInt64(x.I64) + if !f(fd_ABitOfEverything_i64, value) { + return + } + } + if x.F64 != uint64(0) { + value := protoreflect.ValueOfUint64(x.F64) + if !f(fd_ABitOfEverything_f64, value) { + return + } + } + if x.U64 != uint64(0) { + value := protoreflect.ValueOfUint64(x.U64) + if !f(fd_ABitOfEverything_u64, value) { + return + } + } + if x.Si64 != int64(0) { + value := protoreflect.ValueOfInt64(x.Si64) + if !f(fd_ABitOfEverything_si64, value) { + return + } + } + if x.Sf64 != int64(0) { + value := protoreflect.ValueOfInt64(x.Sf64) + if !f(fd_ABitOfEverything_sf64, 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_ABitOfEverything) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "testpb.ABitOfEverything.message": + return x.Message != nil + case "testpb.ABitOfEverything.enum": + return x.Enum != 0 + case "testpb.ABitOfEverything.repeated": + return len(x.Repeated) != 0 + case "testpb.ABitOfEverything.str": + return x.Str != "" + case "testpb.ABitOfEverything.bool": + return x.Bool != false + case "testpb.ABitOfEverything.bytes": + return len(x.Bytes) != 0 + case "testpb.ABitOfEverything.i32": + return x.I32 != int32(0) + case "testpb.ABitOfEverything.f32": + return x.F32 != uint32(0) + case "testpb.ABitOfEverything.u32": + return x.U32 != uint32(0) + case "testpb.ABitOfEverything.si32": + return x.Si32 != int32(0) + case "testpb.ABitOfEverything.sf32": + return x.Sf32 != int32(0) + case "testpb.ABitOfEverything.i64": + return x.I64 != int64(0) + case "testpb.ABitOfEverything.f64": + return x.F64 != uint64(0) + case "testpb.ABitOfEverything.u64": + return x.U64 != uint64(0) + case "testpb.ABitOfEverything.si64": + return x.Si64 != int64(0) + case "testpb.ABitOfEverything.sf64": + return x.Sf64 != int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.ABitOfEverything")) + } + panic(fmt.Errorf("message testpb.ABitOfEverything 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_ABitOfEverything) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "testpb.ABitOfEverything.message": + x.Message = nil + case "testpb.ABitOfEverything.enum": + x.Enum = 0 + case "testpb.ABitOfEverything.repeated": + x.Repeated = nil + case "testpb.ABitOfEverything.str": + x.Str = "" + case "testpb.ABitOfEverything.bool": + x.Bool = false + case "testpb.ABitOfEverything.bytes": + x.Bytes = nil + case "testpb.ABitOfEverything.i32": + x.I32 = int32(0) + case "testpb.ABitOfEverything.f32": + x.F32 = uint32(0) + case "testpb.ABitOfEverything.u32": + x.U32 = uint32(0) + case "testpb.ABitOfEverything.si32": + x.Si32 = int32(0) + case "testpb.ABitOfEverything.sf32": + x.Sf32 = int32(0) + case "testpb.ABitOfEverything.i64": + x.I64 = int64(0) + case "testpb.ABitOfEverything.f64": + x.F64 = uint64(0) + case "testpb.ABitOfEverything.u64": + x.U64 = uint64(0) + case "testpb.ABitOfEverything.si64": + x.Si64 = int64(0) + case "testpb.ABitOfEverything.sf64": + x.Sf64 = int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.ABitOfEverything")) + } + panic(fmt.Errorf("message testpb.ABitOfEverything 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_ABitOfEverything) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "testpb.ABitOfEverything.message": + value := x.Message + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "testpb.ABitOfEverything.enum": + value := x.Enum + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "testpb.ABitOfEverything.repeated": + if len(x.Repeated) == 0 { + return protoreflect.ValueOfList(&_ABitOfEverything_6_list{}) + } + listValue := &_ABitOfEverything_6_list{list: &x.Repeated} + return protoreflect.ValueOfList(listValue) + case "testpb.ABitOfEverything.str": + value := x.Str + return protoreflect.ValueOfString(value) + case "testpb.ABitOfEverything.bool": + value := x.Bool + return protoreflect.ValueOfBool(value) + case "testpb.ABitOfEverything.bytes": + value := x.Bytes + return protoreflect.ValueOfBytes(value) + case "testpb.ABitOfEverything.i32": + value := x.I32 + return protoreflect.ValueOfInt32(value) + case "testpb.ABitOfEverything.f32": + value := x.F32 + return protoreflect.ValueOfUint32(value) + case "testpb.ABitOfEverything.u32": + value := x.U32 + return protoreflect.ValueOfUint32(value) + case "testpb.ABitOfEverything.si32": + value := x.Si32 + return protoreflect.ValueOfInt32(value) + case "testpb.ABitOfEverything.sf32": + value := x.Sf32 + return protoreflect.ValueOfInt32(value) + case "testpb.ABitOfEverything.i64": + value := x.I64 + return protoreflect.ValueOfInt64(value) + case "testpb.ABitOfEverything.f64": + value := x.F64 + return protoreflect.ValueOfUint64(value) + case "testpb.ABitOfEverything.u64": + value := x.U64 + return protoreflect.ValueOfUint64(value) + case "testpb.ABitOfEverything.si64": + value := x.Si64 + return protoreflect.ValueOfInt64(value) + case "testpb.ABitOfEverything.sf64": + value := x.Sf64 + return protoreflect.ValueOfInt64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.ABitOfEverything")) + } + panic(fmt.Errorf("message testpb.ABitOfEverything 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_ABitOfEverything) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "testpb.ABitOfEverything.message": + x.Message = value.Message().Interface().(*NestedMessage) + case "testpb.ABitOfEverything.enum": + x.Enum = (AnEnum)(value.Enum()) + case "testpb.ABitOfEverything.repeated": + lv := value.List() + clv := lv.(*_ABitOfEverything_6_list) + x.Repeated = *clv.list + case "testpb.ABitOfEverything.str": + x.Str = value.Interface().(string) + case "testpb.ABitOfEverything.bool": + x.Bool = value.Bool() + case "testpb.ABitOfEverything.bytes": + x.Bytes = value.Bytes() + case "testpb.ABitOfEverything.i32": + x.I32 = int32(value.Int()) + case "testpb.ABitOfEverything.f32": + x.F32 = uint32(value.Uint()) + case "testpb.ABitOfEverything.u32": + x.U32 = uint32(value.Uint()) + case "testpb.ABitOfEverything.si32": + x.Si32 = int32(value.Int()) + case "testpb.ABitOfEverything.sf32": + x.Sf32 = int32(value.Int()) + case "testpb.ABitOfEverything.i64": + x.I64 = value.Int() + case "testpb.ABitOfEverything.f64": + x.F64 = value.Uint() + case "testpb.ABitOfEverything.u64": + x.U64 = value.Uint() + case "testpb.ABitOfEverything.si64": + x.Si64 = value.Int() + case "testpb.ABitOfEverything.sf64": + x.Sf64 = value.Int() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.ABitOfEverything")) + } + panic(fmt.Errorf("message testpb.ABitOfEverything 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_ABitOfEverything) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "testpb.ABitOfEverything.message": + if x.Message == nil { + x.Message = new(NestedMessage) + } + return protoreflect.ValueOfMessage(x.Message.ProtoReflect()) + case "testpb.ABitOfEverything.repeated": + if x.Repeated == nil { + x.Repeated = []int32{} + } + value := &_ABitOfEverything_6_list{list: &x.Repeated} + return protoreflect.ValueOfList(value) + case "testpb.ABitOfEverything.enum": + panic(fmt.Errorf("field enum of message testpb.ABitOfEverything is not mutable")) + case "testpb.ABitOfEverything.str": + panic(fmt.Errorf("field str of message testpb.ABitOfEverything is not mutable")) + case "testpb.ABitOfEverything.bool": + panic(fmt.Errorf("field bool of message testpb.ABitOfEverything is not mutable")) + case "testpb.ABitOfEverything.bytes": + panic(fmt.Errorf("field bytes of message testpb.ABitOfEverything is not mutable")) + case "testpb.ABitOfEverything.i32": + panic(fmt.Errorf("field i32 of message testpb.ABitOfEverything is not mutable")) + case "testpb.ABitOfEverything.f32": + panic(fmt.Errorf("field f32 of message testpb.ABitOfEverything is not mutable")) + case "testpb.ABitOfEverything.u32": + panic(fmt.Errorf("field u32 of message testpb.ABitOfEverything is not mutable")) + case "testpb.ABitOfEverything.si32": + panic(fmt.Errorf("field si32 of message testpb.ABitOfEverything is not mutable")) + case "testpb.ABitOfEverything.sf32": + panic(fmt.Errorf("field sf32 of message testpb.ABitOfEverything is not mutable")) + case "testpb.ABitOfEverything.i64": + panic(fmt.Errorf("field i64 of message testpb.ABitOfEverything is not mutable")) + case "testpb.ABitOfEverything.f64": + panic(fmt.Errorf("field f64 of message testpb.ABitOfEverything is not mutable")) + case "testpb.ABitOfEverything.u64": + panic(fmt.Errorf("field u64 of message testpb.ABitOfEverything is not mutable")) + case "testpb.ABitOfEverything.si64": + panic(fmt.Errorf("field si64 of message testpb.ABitOfEverything is not mutable")) + case "testpb.ABitOfEverything.sf64": + panic(fmt.Errorf("field sf64 of message testpb.ABitOfEverything is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.ABitOfEverything")) + } + panic(fmt.Errorf("message testpb.ABitOfEverything 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_ABitOfEverything) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "testpb.ABitOfEverything.message": + m := new(NestedMessage) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "testpb.ABitOfEverything.enum": + return protoreflect.ValueOfEnum(0) + case "testpb.ABitOfEverything.repeated": + list := []int32{} + return protoreflect.ValueOfList(&_ABitOfEverything_6_list{list: &list}) + case "testpb.ABitOfEverything.str": + return protoreflect.ValueOfString("") + case "testpb.ABitOfEverything.bool": + return protoreflect.ValueOfBool(false) + case "testpb.ABitOfEverything.bytes": + return protoreflect.ValueOfBytes(nil) + case "testpb.ABitOfEverything.i32": + return protoreflect.ValueOfInt32(int32(0)) + case "testpb.ABitOfEverything.f32": + return protoreflect.ValueOfUint32(uint32(0)) + case "testpb.ABitOfEverything.u32": + return protoreflect.ValueOfUint32(uint32(0)) + case "testpb.ABitOfEverything.si32": + return protoreflect.ValueOfInt32(int32(0)) + case "testpb.ABitOfEverything.sf32": + return protoreflect.ValueOfInt32(int32(0)) + case "testpb.ABitOfEverything.i64": + return protoreflect.ValueOfInt64(int64(0)) + case "testpb.ABitOfEverything.f64": + return protoreflect.ValueOfUint64(uint64(0)) + case "testpb.ABitOfEverything.u64": + return protoreflect.ValueOfUint64(uint64(0)) + case "testpb.ABitOfEverything.si64": + return protoreflect.ValueOfInt64(int64(0)) + case "testpb.ABitOfEverything.sf64": + return protoreflect.ValueOfInt64(int64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.ABitOfEverything")) + } + panic(fmt.Errorf("message testpb.ABitOfEverything 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_ABitOfEverything) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in testpb.ABitOfEverything", 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_ABitOfEverything) 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_ABitOfEverything) 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_ABitOfEverything) 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_ABitOfEverything) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ABitOfEverything) + 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.Message != nil { + l = options.Size(x.Message) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Enum != 0 { + n += 1 + runtime.Sov(uint64(x.Enum)) + } + if len(x.Repeated) > 0 { + l = 0 + for _, e := range x.Repeated { + l += runtime.Sov(uint64(e)) + } + n += 1 + runtime.Sov(uint64(l)) + l + } + l = len(x.Str) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Bool { + n += 2 + } + l = len(x.Bytes) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.I32 != 0 { + n += 1 + runtime.Sov(uint64(x.I32)) + } + if x.F32 != 0 { + n += 5 + } + if x.U32 != 0 { + n += 1 + runtime.Sov(uint64(x.U32)) + } + if x.Si32 != 0 { + n += 1 + runtime.Soz(uint64(x.Si32)) + } + if x.Sf32 != 0 { + n += 5 + } + if x.I64 != 0 { + n += 1 + runtime.Sov(uint64(x.I64)) + } + if x.F64 != 0 { + n += 10 + } + if x.U64 != 0 { + n += 2 + runtime.Sov(uint64(x.U64)) + } + if x.Si64 != 0 { + n += 2 + runtime.Soz(uint64(x.Si64)) + } + if x.Sf64 != 0 { + n += 10 + } + 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().(*ABitOfEverything) + 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.Sf64 != 0 { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(x.Sf64)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x99 + } + if x.Si64 != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64((uint64(x.Si64)<<1)^uint64((x.Si64>>63)))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x90 + } + if x.U64 != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.U64)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x88 + } + if x.F64 != 0 { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(x.F64)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x81 + } + if x.I64 != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.I64)) + i-- + dAtA[i] = 0x78 + } + if x.Sf32 != 0 { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(x.Sf32)) + i-- + dAtA[i] = 0x75 + } + if x.Si32 != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64((uint32(x.Si32)<<1)^uint32((x.Si32>>31)))) + i-- + dAtA[i] = 0x68 + } + if x.U32 != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.U32)) + i-- + dAtA[i] = 0x60 + } + if x.F32 != 0 { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(x.F32)) + i-- + dAtA[i] = 0x5d + } + if x.I32 != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.I32)) + i-- + dAtA[i] = 0x50 + } + if len(x.Bytes) > 0 { + i -= len(x.Bytes) + copy(dAtA[i:], x.Bytes) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bytes))) + i-- + dAtA[i] = 0x4a + } + if x.Bool { + i-- + if x.Bool { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if len(x.Str) > 0 { + i -= len(x.Str) + copy(dAtA[i:], x.Str) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Str))) + i-- + dAtA[i] = 0x3a + } + if len(x.Repeated) > 0 { + var pksize2 int + for _, num := range x.Repeated { + pksize2 += runtime.Sov(uint64(num)) + } + i -= pksize2 + j1 := i + for _, num1 := range x.Repeated { + num := uint64(num1) + for num >= 1<<7 { + dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA[j1] = uint8(num) + j1++ + } + i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) + i-- + dAtA[i] = 0x32 + } + if x.Enum != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Enum)) + i-- + dAtA[i] = 0x10 + } + if x.Message != nil { + encoded, err := options.Marshal(x.Message) + 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().(*ABitOfEverything) + 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: ABitOfEverything: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ABitOfEverything: 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 Message", 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.Message == nil { + x.Message = &NestedMessage{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Message); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Enum", wireType) + } + x.Enum = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Enum |= AnEnum(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Repeated = append(x.Repeated, v) + } else if wireType == 2 { + var packedLen 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++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + packedLen + 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 + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(x.Repeated) == 0 { + x.Repeated = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Repeated = append(x.Repeated, v) + } + } else { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Repeated", wireType) + } + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Str", 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.Str = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Bool", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Bool = bool(v != 0) + case 9: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Bytes", 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.Bytes = append(x.Bytes[:0], dAtA[iNdEx:postIndex]...) + if x.Bytes == nil { + x.Bytes = []byte{} } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + iNdEx = postIndex + case 10: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field I32", wireType) + } + x.I32 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.I32 |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 5 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field F32", wireType) + } + x.F32 = 0 + if (iNdEx + 4) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.F32 = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + case 12: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field U32", wireType) + } + x.U32 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.U32 |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 13: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Si32", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + x.Si32 = v + case 14: + if wireType != 5 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sf32", wireType) + } + x.Sf32 = 0 + if (iNdEx + 4) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Sf32 = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + case 15: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field I64", wireType) + } + x.I64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.I64 |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 16: + if wireType != 1 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field F64", wireType) + } + x.F64 = 0 + if (iNdEx + 8) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.F64 = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 17: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field U64", wireType) + } + x.U64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.U64 |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 18: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Si64", wireType) + } + var v 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++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + x.Si64 = int64(v) + case 19: + if wireType != 1 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sf64", wireType) + } + x.Sf64 = 0 + if (iNdEx + 8) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Sf64 = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + 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 postIndex > l { + 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_Duration protoreflect.MessageDescriptor + fd_Duration_duration protoreflect.FieldDescriptor + fd_Duration_timestamp protoreflect.FieldDescriptor +) + +func init() { + file_testpb_test_proto_init() + md_Duration = File_testpb_test_proto.Messages().ByName("Duration") + fd_Duration_duration = md_Duration.Fields().ByName("duration") + fd_Duration_timestamp = md_Duration.Fields().ByName("timestamp") +} + +var _ protoreflect.Message = (*fastReflection_Duration)(nil) + +type fastReflection_Duration Duration + +func (x *Duration) ProtoReflect() protoreflect.Message { + return (*fastReflection_Duration)(x) +} + +func (x *Duration) slowProtoReflect() protoreflect.Message { + mi := &file_testpb_test_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Duration_messageType fastReflection_Duration_messageType +var _ protoreflect.MessageType = fastReflection_Duration_messageType{} + +type fastReflection_Duration_messageType struct{} + +func (x fastReflection_Duration_messageType) Zero() protoreflect.Message { + return (*fastReflection_Duration)(nil) +} +func (x fastReflection_Duration_messageType) New() protoreflect.Message { + return new(fastReflection_Duration) +} +func (x fastReflection_Duration_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Duration +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Duration) Descriptor() protoreflect.MessageDescriptor { + return md_Duration +} + +// 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_Duration) Type() protoreflect.MessageType { + return _fastReflection_Duration_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Duration) New() protoreflect.Message { + return new(fastReflection_Duration) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Duration) Interface() protoreflect.ProtoMessage { + return (*Duration)(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_Duration) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Duration != nil { + value := protoreflect.ValueOfMessage(x.Duration.ProtoReflect()) + if !f(fd_Duration_duration, value) { + return + } + } + if x.Timestamp != nil { + value := protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) + if !f(fd_Duration_timestamp, 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_Duration) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "testpb.Duration.duration": + return x.Duration != nil + case "testpb.Duration.timestamp": + return x.Timestamp != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.Duration")) + } + panic(fmt.Errorf("message testpb.Duration 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_Duration) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "testpb.Duration.duration": + x.Duration = nil + case "testpb.Duration.timestamp": + x.Timestamp = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.Duration")) + } + panic(fmt.Errorf("message testpb.Duration 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_Duration) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "testpb.Duration.duration": + value := x.Duration + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "testpb.Duration.timestamp": + value := x.Timestamp + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.Duration")) + } + panic(fmt.Errorf("message testpb.Duration 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_Duration) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "testpb.Duration.duration": + x.Duration = value.Message().Interface().(*durationpb.Duration) + case "testpb.Duration.timestamp": + x.Timestamp = value.Message().Interface().(*timestamppb.Timestamp) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.Duration")) + } + panic(fmt.Errorf("message testpb.Duration 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_Duration) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "testpb.Duration.duration": + if x.Duration == nil { + x.Duration = new(durationpb.Duration) + } + return protoreflect.ValueOfMessage(x.Duration.ProtoReflect()) + case "testpb.Duration.timestamp": + if x.Timestamp == nil { + x.Timestamp = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.Duration")) + } + panic(fmt.Errorf("message testpb.Duration 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_Duration) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "testpb.Duration.duration": + m := new(durationpb.Duration) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "testpb.Duration.timestamp": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.Duration")) + } + panic(fmt.Errorf("message testpb.Duration 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_Duration) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in testpb.Duration", 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_Duration) 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_Duration) 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_Duration) 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_Duration) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Duration) + 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.Duration != nil { + l = options.Size(x.Duration) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Timestamp != nil { + l = options.Size(x.Timestamp) + 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().(*Duration) + 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.Timestamp != nil { + encoded, err := options.Marshal(x.Timestamp) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if x.Duration != nil { + encoded, err := options.Marshal(x.Duration) + 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().(*Duration) + 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 } - x.Str = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Bool", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Bool = bool(v != 0) - case 9: + 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: Duration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Duration: 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 Bytes", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2381,79 +3437,33 @@ func (x *fastReflection_ABitOfEverything) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + byteLen + 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.Bytes = append(x.Bytes[:0], dAtA[iNdEx:postIndex]...) - if x.Bytes == nil { - x.Bytes = []byte{} - } - iNdEx = postIndex - case 10: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field I32", wireType) - } - x.I32 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.I32 |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 5 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field F32", wireType) - } - x.F32 = 0 - if (iNdEx + 4) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.F32 = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - case 12: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field U32", wireType) + if x.Duration == nil { + x.Duration = &durationpb.Duration{} } - x.U32 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.U32 |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Duration); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } - case 13: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Si32", wireType) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) } - var v int32 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2463,102 +3473,28 @@ func (x *fastReflection_ABitOfEverything) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - x.Si32 = v - case 14: - if wireType != 5 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sf32", wireType) - } - x.Sf32 = 0 - if (iNdEx + 4) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Sf32 = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - case 15: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field I64", wireType) - } - x.I64 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.I64 |= int64(b&0x7F) << shift - if b < 0x80 { - break - } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - case 16: - if wireType != 1 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field F64", wireType) + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - x.F64 = 0 - if (iNdEx + 8) > l { + if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.F64 = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 17: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field U64", wireType) - } - x.U64 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.U64 |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 18: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Si64", wireType) - } - var v 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++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - x.Si64 = int64(v) - case 19: - if wireType != 1 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sf64", wireType) + if x.Timestamp == nil { + x.Timestamp = ×tamppb.Timestamp{} } - x.Sf64 = 0 - if (iNdEx + 8) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Timestamp); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } - x.Sf64 = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2616,7 +3552,7 @@ func (x *NestedMessage) ProtoReflect() protoreflect.Message { } func (x *NestedMessage) slowProtoReflect() protoreflect.Message { - mi := &file_testpb_test_proto_msgTypes[3] + mi := &file_testpb_test_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3202,6 +4138,41 @@ func (x *WithAList) GetList() []string { return nil } +type WithAJson struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Field1 []byte `protobuf:"bytes,1,opt,name=field1,proto3" json:"field1,omitempty"` +} + +func (x *WithAJson) Reset() { + *x = WithAJson{} + if protoimpl.UnsafeEnabled { + mi := &file_testpb_test_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WithAJson) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WithAJson) ProtoMessage() {} + +// Deprecated: Use WithAJson.ProtoReflect.Descriptor instead. +func (*WithAJson) Descriptor() ([]byte, []int) { + return file_testpb_test_proto_rawDescGZIP(), []int{2} +} + +func (x *WithAJson) GetField1() []byte { + if x != nil { + return x.Field1 + } + return nil +} + type ABitOfEverything struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3228,7 +4199,7 @@ type ABitOfEverything struct { func (x *ABitOfEverything) Reset() { *x = ABitOfEverything{} if protoimpl.UnsafeEnabled { - mi := &file_testpb_test_proto_msgTypes[2] + mi := &file_testpb_test_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3242,7 +4213,7 @@ func (*ABitOfEverything) ProtoMessage() {} // Deprecated: Use ABitOfEverything.ProtoReflect.Descriptor instead. func (*ABitOfEverything) Descriptor() ([]byte, []int) { - return file_testpb_test_proto_rawDescGZIP(), []int{2} + return file_testpb_test_proto_rawDescGZIP(), []int{3} } func (x *ABitOfEverything) GetMessage() *NestedMessage { @@ -3357,6 +4328,49 @@ func (x *ABitOfEverything) GetSf64() int64 { return 0 } +type Duration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Duration *durationpb.Duration `protobuf:"bytes,1,opt,name=duration,proto3" json:"duration,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *Duration) Reset() { + *x = Duration{} + if protoimpl.UnsafeEnabled { + mi := &file_testpb_test_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Duration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Duration) ProtoMessage() {} + +// Deprecated: Use Duration.ProtoReflect.Descriptor instead. +func (*Duration) Descriptor() ([]byte, []int) { + return file_testpb_test_proto_rawDescGZIP(), []int{4} +} + +func (x *Duration) GetDuration() *durationpb.Duration { + if x != nil { + return x.Duration + } + return nil +} + +func (x *Duration) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + type NestedMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3369,7 +4383,7 @@ type NestedMessage struct { func (x *NestedMessage) Reset() { *x = NestedMessage{} if protoimpl.UnsafeEnabled { - mi := &file_testpb_test_proto_msgTypes[3] + mi := &file_testpb_test_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3383,7 +4397,7 @@ func (*NestedMessage) ProtoMessage() {} // Deprecated: Use NestedMessage.ProtoReflect.Descriptor instead. func (*NestedMessage) Descriptor() ([]byte, []int) { - return file_testpb_test_proto_rawDescGZIP(), []int{3} + return file_testpb_test_proto_rawDescGZIP(), []int{5} } func (x *NestedMessage) GetFoo() string { @@ -3432,49 +4446,60 @@ var file_testpb_test_proto_rawDesc = []byte{ 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x11, 0x64, 0x6f, 0x6e, 0x74, 0x4f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x73, - 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x92, 0x03, - 0x0a, 0x10, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, - 0x6e, 0x67, 0x12, 0x2f, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x4e, 0x65, 0x73, - 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x0e, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x6e, 0x45, 0x6e, 0x75, - 0x6d, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x74, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x73, 0x74, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, - 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, - 0x10, 0x0a, 0x03, 0x69, 0x33, 0x32, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x69, 0x33, - 0x32, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x33, 0x32, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x07, 0x52, 0x03, - 0x66, 0x33, 0x32, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x33, 0x32, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x03, 0x75, 0x33, 0x32, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x33, 0x32, 0x18, 0x0d, 0x20, - 0x01, 0x28, 0x11, 0x52, 0x04, 0x73, 0x69, 0x33, 0x32, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x66, 0x33, - 0x32, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x04, 0x73, 0x66, 0x33, 0x32, 0x12, 0x10, 0x0a, - 0x03, 0x69, 0x36, 0x34, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x69, 0x36, 0x34, 0x12, - 0x10, 0x0a, 0x03, 0x66, 0x36, 0x34, 0x18, 0x10, 0x20, 0x01, 0x28, 0x06, 0x52, 0x03, 0x66, 0x36, - 0x34, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x36, 0x34, 0x18, 0x11, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, - 0x75, 0x36, 0x34, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x36, 0x34, 0x18, 0x12, 0x20, 0x01, 0x28, - 0x12, 0x52, 0x04, 0x73, 0x69, 0x36, 0x34, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x66, 0x36, 0x34, 0x18, - 0x13, 0x20, 0x01, 0x28, 0x10, 0x52, 0x04, 0x73, 0x66, 0x36, 0x34, 0x3a, 0x15, 0x8a, 0xe7, 0xb0, - 0x2a, 0x10, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, - 0x6e, 0x67, 0x22, 0x47, 0x0a, 0x0d, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x03, 0x62, 0x61, 0x72, 0x3a, 0x12, 0x8a, 0xe7, 0xb0, 0x2a, 0x0d, 0x4e, 0x65, - 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2a, 0x29, 0x0a, 0x06, 0x41, - 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x07, 0x0a, - 0x03, 0x54, 0x57, 0x4f, 0x10, 0x02, 0x42, 0x83, 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x74, - 0x65, 0x73, 0x74, 0x70, 0x62, 0x42, 0x09, 0x54, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x32, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, - 0x2f, 0x78, 0x2f, 0x74, 0x78, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x6a, 0x73, 0x6f, 0x6e, 0x2f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2f, - 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x54, - 0x65, 0x73, 0x74, 0x70, 0x62, 0xca, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0xe2, 0x02, - 0x12, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x35, 0x0a, + 0x09, 0x57, 0x69, 0x74, 0x68, 0x41, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x06, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x10, 0x9a, 0xe7, 0xb0, 0x2a, + 0x0b, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x31, 0x22, 0x92, 0x03, 0x0a, 0x10, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, + 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x2f, 0x0a, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x65, 0x73, + 0x74, 0x70, 0x62, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x65, 0x6e, + 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, + 0x62, 0x2e, 0x41, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x1a, + 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x03, 0x28, 0x05, + 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x74, + 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x74, 0x72, 0x12, 0x12, 0x0a, 0x04, + 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, + 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x33, 0x32, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x03, 0x69, 0x33, 0x32, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x33, 0x32, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x07, 0x52, 0x03, 0x66, 0x33, 0x32, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x33, + 0x32, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x75, 0x33, 0x32, 0x12, 0x12, 0x0a, 0x04, + 0x73, 0x69, 0x33, 0x32, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x11, 0x52, 0x04, 0x73, 0x69, 0x33, 0x32, + 0x12, 0x12, 0x0a, 0x04, 0x73, 0x66, 0x33, 0x32, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x04, + 0x73, 0x66, 0x33, 0x32, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x36, 0x34, 0x18, 0x0f, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x03, 0x69, 0x36, 0x34, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x36, 0x34, 0x18, 0x10, 0x20, + 0x01, 0x28, 0x06, 0x52, 0x03, 0x66, 0x36, 0x34, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x36, 0x34, 0x18, + 0x11, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x75, 0x36, 0x34, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, + 0x36, 0x34, 0x18, 0x12, 0x20, 0x01, 0x28, 0x12, 0x52, 0x04, 0x73, 0x69, 0x36, 0x34, 0x12, 0x12, + 0x0a, 0x04, 0x73, 0x66, 0x36, 0x34, 0x18, 0x13, 0x20, 0x01, 0x28, 0x10, 0x52, 0x04, 0x73, 0x66, + 0x36, 0x34, 0x3a, 0x15, 0x8a, 0xe7, 0xb0, 0x2a, 0x10, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, + 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0x7b, 0x0a, 0x08, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 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, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x47, 0x0a, 0x0d, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x61, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x62, 0x61, 0x72, 0x3a, 0x12, 0x8a, 0xe7, 0xb0, + 0x2a, 0x0d, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2a, + 0x29, 0x0a, 0x06, 0x41, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x44, + 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4f, 0x4e, 0x45, 0x10, + 0x01, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x57, 0x4f, 0x10, 0x02, 0x42, 0x83, 0x01, 0x0a, 0x0a, 0x63, + 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x42, 0x09, 0x54, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, + 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x78, 0x2f, 0x74, 0x78, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x6a, + 0x73, 0x6f, 0x6e, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, + 0x74, 0x70, 0x62, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, + 0xaa, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0xca, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, + 0x70, 0x62, 0xe2, 0x02, 0x12, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3490,24 +4515,30 @@ func file_testpb_test_proto_rawDescGZIP() []byte { } var file_testpb_test_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_testpb_test_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_testpb_test_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_testpb_test_proto_goTypes = []interface{}{ - (AnEnum)(0), // 0: testpb.AnEnum - (*WithAMap)(nil), // 1: testpb.WithAMap - (*WithAList)(nil), // 2: testpb.WithAList - (*ABitOfEverything)(nil), // 3: testpb.ABitOfEverything - (*NestedMessage)(nil), // 4: testpb.NestedMessage - nil, // 5: testpb.WithAMap.StrMapEntry + (AnEnum)(0), // 0: testpb.AnEnum + (*WithAMap)(nil), // 1: testpb.WithAMap + (*WithAList)(nil), // 2: testpb.WithAList + (*WithAJson)(nil), // 3: testpb.WithAJson + (*ABitOfEverything)(nil), // 4: testpb.ABitOfEverything + (*Duration)(nil), // 5: testpb.Duration + (*NestedMessage)(nil), // 6: testpb.NestedMessage + nil, // 7: testpb.WithAMap.StrMapEntry + (*durationpb.Duration)(nil), // 8: google.protobuf.Duration + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp } var file_testpb_test_proto_depIdxs = []int32{ - 5, // 0: testpb.WithAMap.str_map:type_name -> testpb.WithAMap.StrMapEntry - 4, // 1: testpb.ABitOfEverything.message:type_name -> testpb.NestedMessage + 7, // 0: testpb.WithAMap.str_map:type_name -> testpb.WithAMap.StrMapEntry + 6, // 1: testpb.ABitOfEverything.message:type_name -> testpb.NestedMessage 0, // 2: testpb.ABitOfEverything.enum:type_name -> testpb.AnEnum - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] 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 + 8, // 3: testpb.Duration.duration:type_name -> google.protobuf.Duration + 9, // 4: testpb.Duration.timestamp:type_name -> google.protobuf.Timestamp + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_testpb_test_proto_init() } @@ -3541,7 +4572,7 @@ func file_testpb_test_proto_init() { } } file_testpb_test_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ABitOfEverything); i { + switch v := v.(*WithAJson); i { case 0: return &v.state case 1: @@ -3553,6 +4584,30 @@ func file_testpb_test_proto_init() { } } file_testpb_test_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ABitOfEverything); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_testpb_test_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Duration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_testpb_test_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NestedMessage); i { case 0: return &v.state @@ -3571,7 +4626,7 @@ func file_testpb_test_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_testpb_test_proto_rawDesc, NumEnums: 1, - NumMessages: 5, + NumMessages: 7, NumExtensions: 0, NumServices: 0, }, diff --git a/x/tx/signing/aminojson/json_marshal.go b/x/tx/signing/aminojson/json_marshal.go index 06d8641c59d4..f53e351b6ea6 100644 --- a/x/tx/signing/aminojson/json_marshal.go +++ b/x/tx/signing/aminojson/json_marshal.go @@ -7,6 +7,7 @@ import ( "io" "sort" + gogoproto "github.com/cosmos/gogoproto/proto" "github.com/pkg/errors" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" @@ -23,10 +24,20 @@ type FieldEncoder func(*Encoder, protoreflect.Value, io.Writer) error // EncoderOptions are options for creating a new Encoder. type EncoderOptions struct { - // DonotSortFields when set turns off sorting of field names. + // Indent can only be composed of space or tab characters. + // It defines the indentation used for each level of indentation. + Indent string + // DoNotSortFields when set turns off sorting of field names. DoNotSortFields bool + // EnumAsString when set will encode enums as strings instead of integers. + // Caution: Enabling this option produce different sign bytes. + EnumAsString bool + // AminoNameAsTypeURL when set will use the amino name as the type URL in the JSON output. + // It is useful when using the Amino JSON encoder for non Amino purposes, + // such as JSON RPC. + AminoNameAsTypeURL bool // TypeResolver is used to resolve protobuf message types by TypeURL when marshaling any packed messages. - TypeResolver protoregistry.MessageTypeResolver + TypeResolver signing.TypeResolver // FileResolver is used to resolve protobuf file descriptors TypeURL when TypeResolver fails. FileResolver signing.ProtoFileResolver } @@ -34,40 +45,52 @@ type EncoderOptions struct { // Encoder is a JSON encoder that uses the Amino JSON encoding rules for protobuf messages. type Encoder struct { // maps cosmos_proto.scalar -> field encoder - scalarEncoders map[string]FieldEncoder - messageEncoders map[string]MessageEncoder - fieldEncoders map[string]FieldEncoder - fileResolver signing.ProtoFileResolver - typeResolver protoregistry.MessageTypeResolver - doNotSortFields bool + cosmosProtoScalarEncoders map[string]FieldEncoder + aminoMessageEncoders map[string]MessageEncoder + aminoFieldEncoders map[string]FieldEncoder + protoTypeEncoders map[string]MessageEncoder + fileResolver signing.ProtoFileResolver + typeResolver protoregistry.MessageTypeResolver + doNotSortFields bool + indent string + enumsAsString bool + aminoNameAsTypeURL bool } // NewEncoder returns a new Encoder capable of serializing protobuf messages to JSON using the Amino JSON encoding // rules. func NewEncoder(options EncoderOptions) Encoder { if options.FileResolver == nil { - options.FileResolver = protoregistry.GlobalFiles + options.FileResolver = gogoproto.HybridResolver } if options.TypeResolver == nil { options.TypeResolver = protoregistry.GlobalTypes } enc := Encoder{ - scalarEncoders: map[string]FieldEncoder{ + cosmosProtoScalarEncoders: map[string]FieldEncoder{ "cosmos.Dec": cosmosDecEncoder, "cosmos.Int": cosmosIntEncoder, }, - messageEncoders: map[string]MessageEncoder{ + aminoMessageEncoders: map[string]MessageEncoder{ "key_field": keyFieldEncoder, "module_account": moduleAccountEncoder, "threshold_string": thresholdStringEncoder, }, - fieldEncoders: map[string]FieldEncoder{ - "legacy_coins": nullSliceAsEmptyEncoder, - "cosmos_dec_bytes": cosmosDecEncoder, + aminoFieldEncoders: map[string]FieldEncoder{ + "legacy_coins": nullSliceAsEmptyEncoder, + "inline_json": cosmosInlineJSON, }, - fileResolver: options.FileResolver, - typeResolver: options.TypeResolver, - doNotSortFields: options.DoNotSortFields, + protoTypeEncoders: map[string]MessageEncoder{ + "google.protobuf.Timestamp": marshalTimestamp, + "google.protobuf.Duration": marshalDuration, + "google.protobuf.Any": marshalAny, + }, + fileResolver: options.FileResolver, + typeResolver: options.TypeResolver, + doNotSortFields: options.DoNotSortFields, + indent: options.Indent, + enumsAsString: options.EnumAsString, + aminoNameAsTypeURL: options.AminoNameAsTypeURL, } return enc } @@ -82,10 +105,10 @@ func NewEncoder(options EncoderOptions) Encoder { // ... // } func (enc Encoder) DefineMessageEncoding(name string, encoder MessageEncoder) Encoder { - if enc.messageEncoders == nil { - enc.messageEncoders = map[string]MessageEncoder{} + if enc.aminoMessageEncoders == nil { + enc.aminoMessageEncoders = map[string]MessageEncoder{} } - enc.messageEncoders[name] = encoder + enc.aminoMessageEncoders[name] = encoder return enc } @@ -103,36 +126,100 @@ func (enc Encoder) DefineMessageEncoding(name string, encoder MessageEncoder) En // ... // } func (enc Encoder) DefineFieldEncoding(name string, encoder FieldEncoder) Encoder { - if enc.fieldEncoders == nil { - enc.fieldEncoders = map[string]FieldEncoder{} + if enc.aminoFieldEncoders == nil { + enc.aminoFieldEncoders = map[string]FieldEncoder{} + } + enc.aminoFieldEncoders[name] = encoder + return enc +} + +// DefineScalarEncoding defines a custom encoding for a protobuf scalar field. The `name` field must match a usage of +// an (cosmos_proto.scalar) option in the protobuf message as in the following example. This encoding will be used +// instead of the default encoding for all usages of the tagged field. +// +// message Balance { +// string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +// ... +// } +func (enc Encoder) DefineScalarEncoding(name string, encoder FieldEncoder) Encoder { + if enc.cosmosProtoScalarEncoders == nil { + enc.cosmosProtoScalarEncoders = map[string]FieldEncoder{} } - enc.fieldEncoders[name] = encoder + enc.cosmosProtoScalarEncoders[name] = encoder + return enc +} + +// DefineTypeEncoding defines a custom encoding for a protobuf message type. The `typeURL` field must match the +// type of the protobuf message as in the following example. This encoding will be used instead of the default +// encoding for all usages of the tagged message. +// +// message Foo { +// google.protobuf.Duration type_url = 1; +// ... +// } + +func (enc Encoder) DefineTypeEncoding(typeURL string, encoder MessageEncoder) Encoder { + if enc.protoTypeEncoders == nil { + enc.protoTypeEncoders = map[string]MessageEncoder{} + } + enc.protoTypeEncoders[typeURL] = encoder return enc } // Marshal serializes a protobuf message to JSON. func (enc Encoder) Marshal(message proto.Message) ([]byte, error) { buf := &bytes.Buffer{} - err := enc.beginMarshal(message.ProtoReflect(), buf) - return buf.Bytes(), err + err := enc.beginMarshal(message.ProtoReflect(), buf, false) + if err != nil { + return nil, err + } + + if enc.indent != "" { + indentBuf := &bytes.Buffer{} + if err := json.Indent(indentBuf, buf.Bytes(), "", enc.indent); err != nil { + return nil, err + } + + return indentBuf.Bytes(), nil + } + + return buf.Bytes(), nil } -func (enc Encoder) beginMarshal(msg protoreflect.Message, writer io.Writer) error { - name, named := getMessageAminoName(msg.Descriptor().Options()) +func (enc Encoder) beginMarshal(msg protoreflect.Message, writer io.Writer, isAny bool) error { + var ( + name string + named bool + ) + + if isAny { + if enc.aminoNameAsTypeURL { + name, named = getMessageTypeURL(msg), true + } else { + name, named = getMessageAminoNameAny(msg), true + } + } else { + name, named = getMessageAminoName(msg) + if enc.aminoNameAsTypeURL { + // do not override named + name = getMessageTypeURL(msg) + } + } + if named { - _, err := writer.Write([]byte(fmt.Sprintf(`{"type":"%s","value":`, name))) + _, err := fmt.Fprintf(writer, `{"type":"%s","value":`, name) if err != nil { return err } } - err := enc.marshal(protoreflect.ValueOfMessage(msg), writer) + err := enc.marshal(protoreflect.ValueOfMessage(msg), nil /* no field descriptor needed here */, writer) if err != nil { return err } if named { - _, err = writer.Write([]byte("}")) + _, err = io.WriteString(writer, "}") if err != nil { return err } @@ -141,7 +228,7 @@ func (enc Encoder) beginMarshal(msg protoreflect.Message, writer io.Writer) erro return nil } -func (enc Encoder) marshal(value protoreflect.Value, writer io.Writer) error { +func (enc Encoder) marshal(value protoreflect.Value, fd protoreflect.FieldDescriptor, writer io.Writer) error { switch val := value.Interface().(type) { case protoreflect.Message: err := enc.marshalMessage(val, writer) @@ -152,12 +239,23 @@ func (enc Encoder) marshal(value protoreflect.Value, writer io.Writer) error { case protoreflect.List: if !val.IsValid() { - _, err := writer.Write([]byte("null")) + _, err := io.WriteString(writer, "null") return err } - return enc.marshalList(val, writer) + return enc.marshalList(val, fd, writer) + + case string, bool, int32, uint32, []byte: + return jsonMarshal(writer, val) + + case protoreflect.EnumNumber: + if enc.enumsAsString && fd != nil { + desc := fd.Enum().Values().ByNumber(val) + if desc != nil { + _, err := io.WriteString(writer, fmt.Sprintf(`"%s"`, desc.Name())) + return err + } + } - case string, bool, int32, uint32, []byte, protoreflect.EnumNumber: return jsonMarshal(writer, val) case uint64, int64: @@ -170,8 +268,11 @@ func (enc Encoder) marshal(value protoreflect.Value, writer io.Writer) error { } type nameAndIndex struct { - i int - name string + i int + name string + oneof protoreflect.OneofDescriptor + oneofFieldName string + oneofTypeName string } func (enc Encoder) marshalMessage(msg protoreflect.Message, writer io.Writer) error { @@ -179,14 +280,9 @@ func (enc Encoder) marshalMessage(msg protoreflect.Message, writer io.Writer) er return errors.New("nil message") } - switch msg.Descriptor().FullName() { - case timestampFullName: - // replicate https://github.com/tendermint/go-amino/blob/8e779b71f40d175cd1302d3cd41a75b005225a7a/json-encode.go#L45-L51 - return marshalTimestamp(msg, writer) - case durationFullName: - return marshalDuration(msg, writer) - case anyFullName: - return enc.marshalAny(msg, writer) + // check if we have a custom type encoder for this type + if typeEnc, ok := enc.protoTypeEncoders[string(msg.Descriptor().FullName())]; ok { + return typeEnc(&enc, msg, writer) } if encoder := enc.getMessageEncoder(msg); encoder != nil { @@ -194,7 +290,7 @@ func (enc Encoder) marshalMessage(msg protoreflect.Message, writer io.Writer) er return err } - _, err := writer.Write([]byte("{")) + _, err := io.WriteString(writer, "{") if err != nil { return err } @@ -207,14 +303,37 @@ func (enc Encoder) marshalMessage(msg protoreflect.Message, writer io.Writer) er indices := make([]*nameAndIndex, 0, fields.Len()) for i := 0; i < fields.Len(); i++ { f := fields.Get(i) - name := getAminoFieldName(f) - indices = append(indices, &nameAndIndex{i: i, name: name}) + entry := &nameAndIndex{ + i: i, + name: getAminoFieldName(f), + oneof: f.ContainingOneof(), + } + + if entry.oneof != nil { + var err error + entry.oneofFieldName, entry.oneofTypeName, err = getOneOfNames(f) + if err != nil { + return err + } + } + + indices = append(indices, entry) } if shouldSortFields := !enc.doNotSortFields; shouldSortFields { sort.Slice(indices, func(i, j int) bool { ni, nj := indices[i], indices[j] - return ni.name < nj.name + niName, njName := ni.name, nj.name + + if indices[i].oneof != nil { + niName = indices[i].oneofFieldName + } + + if indices[j].oneof != nil { + njName = indices[j].oneofFieldName + } + + return niName < njName }) } @@ -223,22 +342,17 @@ func (enc Encoder) marshalMessage(msg protoreflect.Message, writer io.Writer) er name := ni.name f := fields.Get(i) v := msg.Get(f) - oneof := f.ContainingOneof() - isOneOf := oneof != nil - oneofFieldName, oneofTypeName, err := getOneOfNames(f) - if err != nil && isOneOf { - return err - } + isOneOf := ni.oneof != nil writeNil := false if !msg.Has(f) { // msg.WhichOneof(oneof) == nil: no field of the oneof has been set // !emptyOneOfWritten: we haven't written a null for this oneof yet (only write one null per empty oneof) switch { - case isOneOf && msg.WhichOneof(oneof) == nil && !emptyOneOfWritten[oneofFieldName]: - name = oneofFieldName + case isOneOf && msg.WhichOneof(ni.oneof) == nil && !emptyOneOfWritten[ni.oneofFieldName]: + name = ni.oneofFieldName writeNil = true - emptyOneOfWritten[oneofFieldName] = true + emptyOneOfWritten[ni.oneofFieldName] = true case omitEmpty(f): continue case f.Kind() == protoreflect.MessageKind && @@ -249,15 +363,14 @@ func (enc Encoder) marshalMessage(msg protoreflect.Message, writer io.Writer) er } if !first { - _, err = writer.Write([]byte(",")) + _, err = io.WriteString(writer, ",") if err != nil { return err } } if isOneOf && !writeNil { - _, err = writer.Write([]byte(fmt.Sprintf(`"%s":{"type":"%s","value":{`, - oneofFieldName, oneofTypeName))) + _, err = fmt.Fprintf(writer, `"%s":{"type":"%s","value":{`, ni.oneofFieldName, ni.oneofTypeName) if err != nil { return err } @@ -268,7 +381,7 @@ func (enc Encoder) marshalMessage(msg protoreflect.Message, writer io.Writer) er return err } - _, err = writer.Write([]byte(":")) + _, err = io.WriteString(writer, ":") if err != nil { return err } @@ -280,19 +393,19 @@ func (enc Encoder) marshalMessage(msg protoreflect.Message, writer io.Writer) er return err } } else if writeNil { - _, err = writer.Write([]byte("null")) + _, err = io.WriteString(writer, "null") if err != nil { return err } } else { - err = enc.marshal(v, writer) + err = enc.marshal(v, f, writer) if err != nil { return err } } if isOneOf && !writeNil { - _, err = writer.Write([]byte("}}")) + _, err = io.WriteString(writer, "}}") if err != nil { return err } @@ -301,7 +414,7 @@ func (enc Encoder) marshalMessage(msg protoreflect.Message, writer io.Writer) er first = false } - _, err = writer.Write([]byte("}")) + _, err = io.WriteString(writer, "}") return err } @@ -314,10 +427,10 @@ func jsonMarshal(w io.Writer, v interface{}) error { return err } -func (enc Encoder) marshalList(list protoreflect.List, writer io.Writer) error { +func (enc Encoder) marshalList(list protoreflect.List, fd protoreflect.FieldDescriptor, writer io.Writer) error { n := list.Len() - _, err := writer.Write([]byte("[")) + _, err := io.WriteString(writer, "[") if err != nil { return err } @@ -325,25 +438,19 @@ func (enc Encoder) marshalList(list protoreflect.List, writer io.Writer) error { first := true for i := 0; i < n; i++ { if !first { - _, err := writer.Write([]byte(",")) + _, err := io.WriteString(writer, ",") if err != nil { return err } } first = false - err = enc.marshal(list.Get(i), writer) + err = enc.marshal(list.Get(i), fd, writer) if err != nil { return err } } - _, err = writer.Write([]byte("]")) + _, err = io.WriteString(writer, "]") return err } - -const ( - timestampFullName protoreflect.FullName = "google.protobuf.Timestamp" - durationFullName protoreflect.FullName = "google.protobuf.Duration" - anyFullName protoreflect.FullName = "google.protobuf.Any" -) diff --git a/x/tx/signing/aminojson/json_marshal_test.go b/x/tx/signing/aminojson/json_marshal_test.go index 1d8ec8cf6183..29d2f8cf8f59 100644 --- a/x/tx/signing/aminojson/json_marshal_test.go +++ b/x/tx/signing/aminojson/json_marshal_test.go @@ -2,11 +2,13 @@ package aminojson_test import ( "encoding/json" + "errors" "fmt" + "io" "reflect" "testing" + "time" - "cosmossdk.io/x/tx/signing/aminojson/internal/aminojsonpb" "github.com/cosmos/cosmos-proto/rapidproto" "github.com/stretchr/testify/require" "github.com/tendermint/go-amino" @@ -15,12 +17,12 @@ import ( "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" "google.golang.org/protobuf/types/dynamicpb" - "pgregory.net/rapid" - + "google.golang.org/protobuf/types/known/durationpb" "gotest.tools/v3/assert" + "pgregory.net/rapid" "cosmossdk.io/x/tx/signing/aminojson" - + "cosmossdk.io/x/tx/signing/aminojson/internal/aminojsonpb" "cosmossdk.io/x/tx/signing/aminojson/internal/testpb" ) @@ -119,12 +121,13 @@ func TestAminoJSON(t *testing.T) { require.Equal(t, string(sortedBz), string(encodedDefaultBz)) } -func naiveSortedJSON(t testing.TB, jsonToSort []byte) []byte { +func naiveSortedJSON(tb testing.TB, jsonToSort []byte) []byte { + tb.Helper() var c interface{} err := json.Unmarshal(jsonToSort, &c) - assert.NilError(t, err) + assert.NilError(tb, err) sortedBz, err := json.Marshal(c) - assert.NilError(t, err) + assert.NilError(tb, err) return sortedBz } @@ -175,6 +178,239 @@ func TestDynamicPb(t *testing.T) { require.NoError(t, err) dynamicBz, err := encoder.Marshal(dynamicMsg) require.NoError(t, err) - fmt.Printf("dynamicBz: %s\n", string(dynamicBz)) require.Equal(t, string(bz), string(dynamicBz)) } + +func TestMarshalDuration(t *testing.T) { + msg := &testpb.Duration{ + Duration: &durationpb.Duration{Seconds: 1}, + } + encoder := aminojson.NewEncoder(aminojson.EncoderOptions{}) + + bz, err := encoder.Marshal(msg) + require.NoError(t, err) + require.Equal(t, `{"duration":"1000000000"}`, string(bz)) + + // define a custom marshaler for duration + encoder.DefineTypeEncoding("google.protobuf.Duration", func(_ *aminojson.Encoder, msg protoreflect.Message, w io.Writer) error { + var secondsName protoreflect.Name = "seconds" + + fields := msg.Descriptor().Fields() + secondsField := fields.ByName(secondsName) + if secondsField == nil { + return errors.New("expected seconds field") + } + seconds := msg.Get(secondsField).Int() + + _, err = fmt.Fprint(w, "\"", (time.Duration(seconds) * time.Second).String(), "\"") + return err + }) + bz, err = encoder.Marshal(msg) + require.NoError(t, err) + require.Equal(t, `{"duration":"1s"}`, string(bz)) +} + +func TestWithAJson(t *testing.T) { + encoder := aminojson.NewEncoder(aminojson.EncoderOptions{}) + + // list + msg := &testpb.WithAJson{ + Field1: []byte(`[{"name":"child1"}]`), + } + bz, err := encoder.Marshal(msg) + require.NoError(t, err) + require.Equal(t, `{"field1":[{"name":"child1"}]}`, string(bz)) + + // string + msg = &testpb.WithAJson{ + Field1: []byte(`"hello again"`), + } + bz, err = encoder.Marshal(msg) + require.NoError(t, err) + require.Equal(t, `{"field1":"hello again"}`, string(bz)) + + // object + msg = &testpb.WithAJson{ + Field1: []byte(`{"deeper":{"nesting":1}}`), + } + bz, err = encoder.Marshal(msg) + require.NoError(t, err) + require.Equal(t, `{"field1":{"deeper":{"nesting":1}}}`, string(bz)) +} + +func TestIndent(t *testing.T) { + encoder := aminojson.NewEncoder(aminojson.EncoderOptions{Indent: " "}) + + msg := &testpb.ABitOfEverything{ + Message: &testpb.NestedMessage{ + Foo: "test", + Bar: 0, // this is the default value and should be omitted from output + }, + Enum: testpb.AnEnum_ONE, + Repeated: []int32{3, -7, 2, 6, 4}, + Str: `abcxyz"foo"def`, + Bool: true, + Bytes: []byte{0, 1, 2, 3}, + I32: -15, + F32: 1001, + U32: 1200, + Si32: -376, + Sf32: -1000, + I64: 14578294827584932, + F64: 9572348124213523654, + U64: 4759492485, + Si64: -59268425823934, + Sf64: -659101379604211154, + } + + bz, err := encoder.Marshal(msg) + require.NoError(t, err) + fmt.Println(string(bz)) + require.Equal(t, `{ + "type": "ABitOfEverything", + "value": { + "bool": true, + "bytes": "AAECAw==", + "enum": 1, + "f32": 1001, + "f64": "9572348124213523654", + "i32": -15, + "i64": "14578294827584932", + "message": { + "foo": "test" + }, + "repeated": [ + 3, + -7, + 2, + 6, + 4 + ], + "sf32": -1000, + "sf64": "-659101379604211154", + "si32": -376, + "si64": "-59268425823934", + "str": "abcxyz\"foo\"def", + "u32": 1200, + "u64": "4759492485" + } +}`, string(bz)) +} + +func TestEnumAsString(t *testing.T) { + encoder := aminojson.NewEncoder(aminojson.EncoderOptions{Indent: " ", EnumAsString: true}) + + msg := &testpb.ABitOfEverything{ + Message: &testpb.NestedMessage{ + Foo: "test", + Bar: 0, // this is the default value and should be omitted from output + }, + Enum: testpb.AnEnum_ONE, + Repeated: []int32{3, -7, 2, 6, 4}, + Str: `abcxyz"foo"def`, + Bool: true, + Bytes: []byte{0, 1, 2, 3}, + I32: -15, + F32: 1001, + U32: 1200, + Si32: -376, + Sf32: -1000, + I64: 14578294827584932, + F64: 9572348124213523654, + U64: 4759492485, + Si64: -59268425823934, + Sf64: -659101379604211154, + } + + bz, err := encoder.Marshal(msg) + require.NoError(t, err) + fmt.Println(string(bz)) + require.Equal(t, `{ + "type": "ABitOfEverything", + "value": { + "bool": true, + "bytes": "AAECAw==", + "enum": "ONE", + "f32": 1001, + "f64": "9572348124213523654", + "i32": -15, + "i64": "14578294827584932", + "message": { + "foo": "test" + }, + "repeated": [ + 3, + -7, + 2, + 6, + 4 + ], + "sf32": -1000, + "sf64": "-659101379604211154", + "si32": -376, + "si64": "-59268425823934", + "str": "abcxyz\"foo\"def", + "u32": 1200, + "u64": "4759492485" + } +}`, string(bz)) +} + +func TestAminoNameAsTypeURL(t *testing.T) { + encoder := aminojson.NewEncoder(aminojson.EncoderOptions{Indent: " ", AminoNameAsTypeURL: true}) + + msg := &testpb.ABitOfEverything{ + Message: &testpb.NestedMessage{ + Foo: "test", + Bar: 0, // this is the default value and should be omitted from output + }, + Enum: testpb.AnEnum_ONE, + Repeated: []int32{3, -7, 2, 6, 4}, + Str: `abcxyz"foo"def`, + Bool: true, + Bytes: []byte{0, 1, 2, 3}, + I32: -15, + F32: 1001, + U32: 1200, + Si32: -376, + Sf32: -1000, + I64: 14578294827584932, + F64: 9572348124213523654, + U64: 4759492485, + Si64: -59268425823934, + Sf64: -659101379604211154, + } + + bz, err := encoder.Marshal(msg) + require.NoError(t, err) + fmt.Println(string(bz)) + require.Equal(t, `{ + "type": "/testpb.ABitOfEverything", + "value": { + "bool": true, + "bytes": "AAECAw==", + "enum": 1, + "f32": 1001, + "f64": "9572348124213523654", + "i32": -15, + "i64": "14578294827584932", + "message": { + "foo": "test" + }, + "repeated": [ + 3, + -7, + 2, + 6, + 4 + ], + "sf32": -1000, + "sf64": "-659101379604211154", + "si32": -376, + "si64": "-59268425823934", + "str": "abcxyz\"foo\"def", + "u32": 1200, + "u64": "4759492485" + } +}`, string(bz)) +} diff --git a/x/tx/signing/aminojson/options.go b/x/tx/signing/aminojson/options.go index f8b8991d04db..cf9110aef3ae 100644 --- a/x/tx/signing/aminojson/options.go +++ b/x/tx/signing/aminojson/options.go @@ -2,6 +2,7 @@ package aminojson import ( cosmos_proto "github.com/cosmos/cosmos-proto" + gogoproto "github.com/cosmos/gogoproto/proto" "github.com/iancoleman/strcase" "github.com/pkg/errors" "google.golang.org/protobuf/proto" @@ -12,14 +13,42 @@ import ( // getMessageAminoName returns the amino name of a message if it has been set by the `amino.name` option. // If the message does not have an amino name, then the function returns false. -func getMessageAminoName(messageOptions proto.Message) (string, bool) { +func getMessageAminoName(msg protoreflect.Message) (string, bool) { + messageOptions := msg.Descriptor().Options() if proto.HasExtension(messageOptions, amino.E_Name) { name := proto.GetExtension(messageOptions, amino.E_Name) return name.(string), true } + return "", false } +// getMessageAminoName returns the amino name of a message if it has been set by the `amino.name` option. +// If the message does not have an amino name, then it returns the msg url. +func getMessageAminoNameAny(msg protoreflect.Message) string { + messageOptions := msg.Descriptor().Options() + if proto.HasExtension(messageOptions, amino.E_Name) { + name := proto.GetExtension(messageOptions, amino.E_Name) + return name.(string) + } + + return getMessageTypeURL(msg) +} + +// getMessageTypeURL returns the msg url. +func getMessageTypeURL(msg protoreflect.Message) string { + msgURL := "/" + string(msg.Descriptor().FullName()) + if msgURL != "/" { + return msgURL + } + + if m, ok := msg.(gogoproto.Message); ok { + return "/" + gogoproto.MessageName(m) + } + + return "" +} + // omitEmpty returns true if the field should be omitted if empty. Empty field omission is the default behavior. func omitEmpty(field protoreflect.FieldDescriptor) bool { opts := field.Options() @@ -64,7 +93,7 @@ func (enc Encoder) getMessageEncoder(message protoreflect.Message) MessageEncode opts := message.Descriptor().Options() if proto.HasExtension(opts, amino.E_MessageEncoding) { encoding := proto.GetExtension(opts, amino.E_MessageEncoding).(string) - if fn, ok := enc.messageEncoders[encoding]; ok { + if fn, ok := enc.aminoMessageEncoders[encoding]; ok { return fn } } @@ -75,13 +104,13 @@ func (enc Encoder) getFieldEncoding(field protoreflect.FieldDescriptor) FieldEnc opts := field.Options() if proto.HasExtension(opts, amino.E_Encoding) { encoding := proto.GetExtension(opts, amino.E_Encoding).(string) - if fn, ok := enc.fieldEncoders[encoding]; ok { + if fn, ok := enc.aminoFieldEncoders[encoding]; ok { return fn } } if proto.HasExtension(opts, cosmos_proto.E_Scalar) { scalar := proto.GetExtension(opts, cosmos_proto.E_Scalar).(string) - if fn, ok := enc.scalarEncoders[scalar]; ok { + if fn, ok := enc.cosmosProtoScalarEncoders[scalar]; ok { return fn } } diff --git a/x/tx/signing/aminojson/options_test.go b/x/tx/signing/aminojson/options_test.go new file mode 100644 index 000000000000..8038827f0f7f --- /dev/null +++ b/x/tx/signing/aminojson/options_test.go @@ -0,0 +1,30 @@ +package aminojson + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "cosmossdk.io/x/tx/signing/aminojson/internal/testpb" +) + +func Test_getMessageAminoName(t *testing.T) { + msg := &testpb.ABitOfEverything{} + name, ok := getMessageAminoName(msg.ProtoReflect()) + require.True(t, ok) + require.Equal(t, "ABitOfEverything", name) + + secondMsg := &testpb.Duration{} + _, ok = getMessageAminoName(secondMsg.ProtoReflect()) + require.False(t, ok) +} + +func Test_getMessageAminoNameAny(t *testing.T) { + msg := &testpb.ABitOfEverything{} + name := getMessageAminoNameAny(msg.ProtoReflect()) + require.Equal(t, "ABitOfEverything", name) + + secondMsg := &testpb.Duration{} + name = getMessageAminoNameAny(secondMsg.ProtoReflect()) + require.Equal(t, "/testpb.Duration", name) +} diff --git a/x/tx/signing/aminojson/time.go b/x/tx/signing/aminojson/time.go index da02514c0255..9bfa035928e7 100644 --- a/x/tx/signing/aminojson/time.go +++ b/x/tx/signing/aminojson/time.go @@ -1,6 +1,7 @@ package aminojson import ( + "errors" "fmt" "io" "math" @@ -14,16 +15,17 @@ const ( nanosName protoreflect.Name = "nanos" ) -func marshalTimestamp(message protoreflect.Message, writer io.Writer) error { +// marshalTimestamp replicate https://github.com/tendermint/go-amino/blob/8e779b71f40d175cd1302d3cd41a75b005225a7a/json-encode.go#L45-L51 +func marshalTimestamp(_ *Encoder, message protoreflect.Message, writer io.Writer) error { fields := message.Descriptor().Fields() secondsField := fields.ByName(secondsName) if secondsField == nil { - return fmt.Errorf("expected seconds field") + return errors.New("expected seconds field") } nanosField := fields.ByName(nanosName) if nanosField == nil { - return fmt.Errorf("expected nanos field") + return errors.New("expected nanos field") } seconds := message.Get(secondsField).Int() @@ -48,11 +50,11 @@ func marshalTimestamp(message protoreflect.Message, writer io.Writer) error { // gogoproto encodes google.protobuf.Duration as a time.Duration, which is 64-bit signed integer. const MaxDurationSeconds = int64(math.MaxInt64)/1e9 - 1 -func marshalDuration(message protoreflect.Message, writer io.Writer) error { +func marshalDuration(_ *Encoder, message protoreflect.Message, writer io.Writer) error { fields := message.Descriptor().Fields() secondsField := fields.ByName(secondsName) if secondsField == nil { - return fmt.Errorf("expected seconds field") + return errors.New("expected seconds field") } // todo @@ -64,11 +66,11 @@ func marshalDuration(message protoreflect.Message, writer io.Writer) error { nanosField := fields.ByName(nanosName) if nanosField == nil { - return fmt.Errorf("expected nanos field") + return errors.New("expected nanos field") } nanos := message.Get(nanosField).Int() totalNanos := nanos + (seconds * 1e9) - _, err := writer.Write([]byte(fmt.Sprintf(`"%d"`, totalNanos))) + _, err := fmt.Fprintf(writer, `"%d"`, totalNanos) return err } diff --git a/x/tx/signing/context.go b/x/tx/signing/context.go index 9571bea67c07..e3a9855cdd25 100644 --- a/x/tx/signing/context.go +++ b/x/tx/signing/context.go @@ -3,18 +3,24 @@ package signing import ( "errors" "fmt" + "sync" cosmos_proto "github.com/cosmos/cosmos-proto" + gogoproto "github.com/cosmos/gogoproto/proto" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protodesc" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" - "cosmossdk.io/core/address" - msgv1 "cosmossdk.io/api/cosmos/msg/v1" + "cosmossdk.io/core/address" ) +type TypeResolver interface { + protoregistry.MessageTypeResolver + protoregistry.ExtensionTypeResolver +} + // Context is a context for retrieving the list of signers from a // message where signers are specified by the cosmos.msg.v1.signer protobuf // option. It also contains the ProtoFileResolver and address.Codec's used @@ -24,8 +30,9 @@ type Context struct { typeResolver protoregistry.MessageTypeResolver addressCodec address.Codec validatorAddressCodec address.Codec - getSignersFuncs map[protoreflect.FullName]GetSignersFunc + getSignersFuncs sync.Map customGetSignerFuncs map[protoreflect.FullName]GetSignersFunc + maxRecursionDepth int } // Options are options for creating Context which will be used for signing operations. @@ -35,7 +42,7 @@ type Options struct { FileResolver ProtoFileResolver // TypeResolver is the protobuf type resolver to use for resolving message types. - TypeResolver protoregistry.MessageTypeResolver + TypeResolver TypeResolver // AddressCodec is the codec for converting addresses between strings and bytes. AddressCodec address.Codec @@ -43,7 +50,11 @@ type Options struct { // ValidatorAddressCodec is the codec for converting validator addresses between strings and bytes. ValidatorAddressCodec address.Codec + // CustomGetSigners is a map of message types to custom GetSignersFuncs. CustomGetSigners map[protoreflect.FullName]GetSignersFunc + + // MaxRecursionDepth is the maximum depth of nested messages that will be traversed + MaxRecursionDepth int } // DefineCustomGetSigners defines a custom GetSigners function for a given @@ -70,7 +81,7 @@ type ProtoFileResolver interface { func NewContext(options Options) (*Context, error) { protoFiles := options.FileResolver if protoFiles == nil { - protoFiles = protoregistry.GlobalFiles + protoFiles = gogoproto.HybridResolver } protoTypes := options.TypeResolver @@ -86,6 +97,10 @@ func NewContext(options Options) (*Context, error) { return nil, errors.New("validator address codec is required") } + if options.MaxRecursionDepth <= 0 { + options.MaxRecursionDepth = 32 + } + customGetSignerFuncs := map[protoreflect.FullName]GetSignersFunc{} for k := range options.CustomGetSigners { customGetSignerFuncs[k] = options.CustomGetSigners[k] @@ -96,8 +111,9 @@ func NewContext(options Options) (*Context, error) { typeResolver: protoTypes, addressCodec: options.AddressCodec, validatorAddressCodec: options.ValidatorAddressCodec, - getSignersFuncs: map[protoreflect.FullName]GetSignersFunc{}, + getSignersFuncs: sync.Map{}, customGetSignerFuncs: customGetSignerFuncs, + maxRecursionDepth: options.MaxRecursionDepth, } return c, nil @@ -204,92 +220,87 @@ func (c *Context) makeGetSignersFunc(descriptor protoreflect.MessageDescriptor) } } case protoreflect.MessageKind: - isList := field.IsList() - nestedMessage := field.Message() - nestedSignersFields, err := getSignersFieldNames(nestedMessage) - if err != nil { - return nil, err - } - - if len(nestedSignersFields) != 1 { - return nil, fmt.Errorf("nested cosmos.msg.v1.signer option in message %s must contain only one value", nestedMessage.FullName()) - } - - nestedFieldName := nestedSignersFields[0] - nestedField := nestedMessage.Fields().ByName(protoreflect.Name(nestedFieldName)) - nestedIsList := nestedField.IsList() - if nestedField == nil { - return nil, fmt.Errorf("field %s not found in message %s", nestedFieldName, nestedMessage.FullName()) - } - - if nestedField.Kind() != protoreflect.StringKind || nestedField.IsMap() || nestedField.HasOptionalKeyword() { - return nil, fmt.Errorf("nested signer field %s in message %s must be a simple string", nestedFieldName, nestedMessage.FullName()) - } - - addrCdc := c.getAddressCodec(nestedField) - - if isList { - if nestedIsList { - fieldGetters[i] = func(msg proto.Message, arr [][]byte) ([][]byte, error) { - msgs := msg.ProtoReflect().Get(field).List() - m := msgs.Len() - for i := 0; i < m; i++ { - signers := msgs.Get(i).Message().Get(nestedField).List() - n := signers.Len() - for j := 0; j < n; j++ { - addrStr := signers.Get(j).String() - addrBz, err := addrCdc.StringToBytes(addrStr) - if err != nil { - return nil, err - } - arr = append(arr, addrBz) - } - } - return arr, nil - } - } else { - fieldGetters[i] = func(msg proto.Message, arr [][]byte) ([][]byte, error) { - msgs := msg.ProtoReflect().Get(field).List() - m := msgs.Len() - for i := 0; i < m; i++ { - addrStr := msgs.Get(i).Message().Get(nestedField).String() - addrBz, err := addrCdc.StringToBytes(addrStr) + var fieldGetter func(protoreflect.Message, int) ([][]byte, error) + fieldGetter = func(msg protoreflect.Message, depth int) ([][]byte, error) { + if depth > c.maxRecursionDepth { + return nil, errors.New("maximum recursion depth exceeded") + } + desc := msg.Descriptor() + signerFields, err := getSignersFieldNames(desc) + if err != nil { + return nil, err + } + if len(signerFields) != 1 { + return nil, fmt.Errorf("nested cosmos.msg.v1.signer option in message %s must contain only one value", desc.FullName()) + } + signerFieldName := signerFields[0] + childField := desc.Fields().ByName(protoreflect.Name(signerFieldName)) + switch { + case childField.Kind() == protoreflect.MessageKind: + if childField.IsList() { + childMsgs := msg.Get(childField).List() + var arr [][]byte + for i := 0; i < childMsgs.Len(); i++ { + res, err := fieldGetter(childMsgs.Get(i).Message(), depth+1) if err != nil { return nil, err } - arr = append(arr, addrBz) + arr = append(arr, res...) } return arr, nil } - } - } else { - if nestedIsList { - fieldGetters[i] = func(msg proto.Message, arr [][]byte) ([][]byte, error) { - nestedMsg := msg.ProtoReflect().Get(field).Message() - signers := nestedMsg.Get(nestedField).List() - n := signers.Len() - for j := 0; j < n; j++ { - addrStr := signers.Get(j).String() + + return fieldGetter(msg.Get(childField).Message(), depth+1) + case childField.IsMap() || childField.HasOptionalKeyword(): + return nil, fmt.Errorf("cosmos.msg.v1.signer field %s in message %s must not be a map or optional", signerFieldName, desc.FullName()) + case childField.Kind() == protoreflect.StringKind: + addrCdc := c.getAddressCodec(childField) + if childField.IsList() { + childMsgs := msg.Get(childField).List() + n := childMsgs.Len() + var res [][]byte + for i := 0; i < n; i++ { + addrStr := childMsgs.Get(i).String() addrBz, err := addrCdc.StringToBytes(addrStr) if err != nil { return nil, err } - arr = append(arr, addrBz) + res = append(res, addrBz) } - return arr, nil + return res, nil } - } else { - fieldGetters[i] = func(msg proto.Message, arr [][]byte) ([][]byte, error) { - addrStr := msg.ProtoReflect().Get(field).Message().Get(nestedField).String() - addrBz, err := addrCdc.StringToBytes(addrStr) + + addrStr := msg.Get(childField).String() + addrBz, err := addrCdc.StringToBytes(addrStr) + if err != nil { + return nil, err + } + return [][]byte{addrBz}, nil + } + return nil, fmt.Errorf("unexpected field type %s for field %s in message %s, only string and message type are supported", + childField.Kind(), signerFieldName, desc.FullName()) + } + + fieldGetters[i] = func(msg proto.Message, arr [][]byte) ([][]byte, error) { + if field.IsList() { + signers := msg.ProtoReflect().Get(field).List() + n := signers.Len() + for i := 0; i < n; i++ { + res, err := fieldGetter(signers.Get(i).Message(), 0) if err != nil { return nil, err } - return append(arr, addrBz), nil + arr = append(arr, res...) } + } else { + res, err := fieldGetter(msg.ProtoReflect().Get(field).Message(), 0) + if err != nil { + return nil, err + } + arr = append(arr, res...) } + return arr, nil } - default: return nil, fmt.Errorf("unexpected field type %s for field %s in message %s", field.Kind(), fieldName, descriptor.FullName()) } @@ -324,14 +335,17 @@ func (c *Context) getGetSignersFn(messageDescriptor protoreflect.MessageDescript if ok { return f, nil } - f, ok = c.getSignersFuncs[messageDescriptor.FullName()] + + loadedFn, ok := c.getSignersFuncs.Load(messageDescriptor.FullName()) if !ok { var err error f, err = c.makeGetSignersFunc(messageDescriptor) if err != nil { return nil, err } - c.getSignersFuncs[messageDescriptor.FullName()] = f + c.getSignersFuncs.Store(messageDescriptor.FullName(), f) + } else { + f = loadedFn.(GetSignersFunc) } return f, nil diff --git a/x/tx/signing/context_test.go b/x/tx/signing/context_test.go index 34ca2daa6465..88f0bf4aadf9 100644 --- a/x/tx/signing/context_test.go +++ b/x/tx/signing/context_test.go @@ -5,15 +5,67 @@ import ( "strings" "testing" - bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" - groupv1 "cosmossdk.io/api/cosmos/group/v1" - "cosmossdk.io/core/address" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" + bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" + groupv1 "cosmossdk.io/api/cosmos/group/v1" + "cosmossdk.io/core/address" "cosmossdk.io/x/tx/internal/testpb" ) +var deeplyNestedRepeatedSigner = &testpb.DeeplyNestedRepeatedSigner{ + Inner: []*testpb.DeeplyNestedRepeatedSigner_Inner{ + { + Inner: []*testpb.DeeplyNestedRepeatedSigner_Inner_Inner{ + { + Inner: []*testpb.DeeplyNestedRepeatedSigner_Inner_Inner_Bottom{ + { + Signer: []string{hex.EncodeToString([]byte("foo")), hex.EncodeToString([]byte("bar"))}, + }, + }, + }, + }, + }, + { + Inner: []*testpb.DeeplyNestedRepeatedSigner_Inner_Inner{ + { + Inner: []*testpb.DeeplyNestedRepeatedSigner_Inner_Inner_Bottom{ + { + Signer: []string{hex.EncodeToString([]byte("baz"))}, + }, + }, + }, + { + Inner: []*testpb.DeeplyNestedRepeatedSigner_Inner_Inner_Bottom{ + { + Signer: []string{hex.EncodeToString([]byte("qux")), hex.EncodeToString([]byte("fuz"))}, + }, + { + Signer: []string{hex.EncodeToString([]byte("bing")), hex.EncodeToString([]byte("bap"))}, + }, + }, + }, + }, + }, + }, +} + +func TestGetGetSignersFnConcurrent(t *testing.T) { + ctx, err := NewContext(Options{ + AddressCodec: dummyAddressCodec{}, + ValidatorAddressCodec: dummyValidatorAddressCodec{}, + }) + require.NoError(t, err) + + desc := (&testpb.RepeatedSigner{}).ProtoReflect().Descriptor() + for i := 0; i < 50; i++ { + go func() { + _, _ = ctx.getGetSignersFn(desc) + }() + } +} + func TestGetSigners(t *testing.T) { ctx, err := NewContext(Options{ AddressCodec: dummyAddressCodec{}, @@ -88,7 +140,18 @@ func TestGetSigners(t *testing.T) { want: [][]byte{[]byte("foo"), []byte("bar")}, }, { - name: "nested repeated", + name: "deeply nested", + msg: &testpb.DeeplyNestedSigner{ + InnerOne: &testpb.DeeplyNestedSigner_InnerOne{ + InnerTwo: &testpb.DeeplyNestedSigner_InnerOne_InnerTwo{ + Signer: hex.EncodeToString([]byte("foo")), + }, + }, + }, + want: [][]byte{[]byte("foo")}, + }, + { + name: "nested repeated #1", msg: &testpb.NestedRepeatedSigner{Inner: &testpb.NestedRepeatedSigner_Inner{ Signer: []string{ hex.EncodeToString([]byte("foo")), @@ -97,6 +160,11 @@ func TestGetSigners(t *testing.T) { }}, want: [][]byte{[]byte("foo"), []byte("bar")}, }, + { + name: "nested repeated #2", + msg: deeplyNestedRepeatedSigner, + want: [][]byte{[]byte("foo"), []byte("bar"), []byte("baz"), []byte("qux"), []byte("fuz"), []byte("bing"), []byte("bap")}, + }, { name: "repeated nested repeated", msg: &testpb.RepeatedNestedRepeatedSigner{Inner: []*testpb.RepeatedNestedRepeatedSigner_Inner{ @@ -145,6 +213,27 @@ func TestGetSigners(t *testing.T) { } } +func TestMaxRecursionDepth(t *testing.T) { + ctx, err := NewContext(Options{ + AddressCodec: dummyAddressCodec{}, + ValidatorAddressCodec: dummyValidatorAddressCodec{}, + MaxRecursionDepth: 1, + }) + require.NoError(t, err) + + _, err = ctx.GetSigners(deeplyNestedRepeatedSigner) + require.ErrorContains(t, err, "maximum recursion depth exceeded") + + ctx, err = NewContext(Options{ + AddressCodec: dummyAddressCodec{}, + ValidatorAddressCodec: dummyValidatorAddressCodec{}, + MaxRecursionDepth: 5, + }) + require.NoError(t, err) + _, err = ctx.GetSigners(deeplyNestedRepeatedSigner) + require.NoError(t, err) +} + func TestDefineCustomGetSigners(t *testing.T) { customMsg := &testpb.Ballot{} signers := [][]byte{[]byte("foo")} diff --git a/x/tx/signing/direct/direct.go b/x/tx/signing/direct/direct.go index 6cacb63aaf84..57e005981010 100644 --- a/x/tx/signing/direct/direct.go +++ b/x/tx/signing/direct/direct.go @@ -3,13 +3,18 @@ package direct import ( "context" - signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" - txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" "google.golang.org/protobuf/proto" + signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" + txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" "cosmossdk.io/x/tx/signing" ) +var ( + _ signing.SignModeHandler = SignModeHandler{} + protov2MarshalOpts = proto.MarshalOptions{Deterministic: true} +) + // SignModeHandler is the SIGN_MODE_DIRECT implementation of signing.SignModeHandler. type SignModeHandler struct{} @@ -20,12 +25,10 @@ func (h SignModeHandler) Mode() signingv1beta1.SignMode { // GetSignBytes implements signing.SignModeHandler.GetSignBytes. func (SignModeHandler) GetSignBytes(_ context.Context, signerData signing.SignerData, txData signing.TxData) ([]byte, error) { - return proto.Marshal(&txv1beta1.SignDoc{ + return protov2MarshalOpts.Marshal(&txv1beta1.SignDoc{ BodyBytes: txData.BodyBytes, AuthInfoBytes: txData.AuthInfoBytes, ChainId: signerData.ChainID, AccountNumber: signerData.AccountNumber, }) } - -var _ signing.SignModeHandler = SignModeHandler{} diff --git a/x/tx/signing/direct/direct_test.go b/x/tx/signing/direct/direct_test.go index d75c39652786..da5abcc1c122 100644 --- a/x/tx/signing/direct/direct_test.go +++ b/x/tx/signing/direct/direct_test.go @@ -4,16 +4,16 @@ import ( "context" "testing" - bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" - basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" - "cosmossdk.io/api/cosmos/crypto/secp256k1" - signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" - txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" "github.com/cosmos/cosmos-proto/anyutil" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/anypb" + bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" + basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + "cosmossdk.io/api/cosmos/crypto/secp256k1" + signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" + txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" "cosmossdk.io/x/tx/signing" "cosmossdk.io/x/tx/signing/direct" ) diff --git a/x/tx/signing/directaux/direct_aux.go b/x/tx/signing/directaux/direct_aux.go index f20b56f513e0..fbc56b670888 100644 --- a/x/tx/signing/directaux/direct_aux.go +++ b/x/tx/signing/directaux/direct_aux.go @@ -2,6 +2,7 @@ package directaux import ( "context" + "errors" "fmt" "github.com/cosmos/cosmos-proto/anyutil" @@ -10,7 +11,6 @@ import ( signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" - "cosmossdk.io/x/tx/signing" ) @@ -35,7 +35,7 @@ func NewSignModeHandler(options SignModeHandlerOptions) (SignModeHandler, error) h := SignModeHandler{} if options.SignersContext == nil { - return h, fmt.Errorf("signers context is required") + return h, errors.New("signers context is required") } h.signersContext = options.SignersContext @@ -61,7 +61,7 @@ func (h SignModeHandler) Mode() signingv1beta1.SignMode { // https://github.com/cosmos/cosmos-sdk/blob/4a6a1e3cb8de459891cb0495052589673d14ef51/x/auth/tx/builder.go#L142 func (h SignModeHandler) getFirstSigner(txData signing.TxData) ([]byte, error) { if len(txData.Body.Messages) == 0 { - return nil, fmt.Errorf("no signer found") + return nil, errors.New("no signer found") } msg, err := anyutil.Unpack(txData.Body.Messages[0], h.fileResolver, h.typeResolver) @@ -101,7 +101,8 @@ func (h SignModeHandler) GetSignBytes( ChainId: signerData.ChainID, AccountNumber: signerData.AccountNumber, Sequence: signerData.Sequence, - Tip: txData.AuthInfo.Tip, } - return proto.Marshal(signDocDirectAux) + + protov2MarshalOpts := proto.MarshalOptions{Deterministic: true} + return protov2MarshalOpts.Marshal(signDocDirectAux) } diff --git a/x/tx/signing/directaux/direct_aux_test.go b/x/tx/signing/directaux/direct_aux_test.go index 4fba90b7e1aa..00c48222aa89 100644 --- a/x/tx/signing/directaux/direct_aux_test.go +++ b/x/tx/signing/directaux/direct_aux_test.go @@ -6,7 +6,6 @@ import ( "fmt" "testing" - "cosmossdk.io/core/address" "github.com/cosmos/cosmos-proto/anyutil" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" @@ -17,7 +16,7 @@ import ( "cosmossdk.io/api/cosmos/crypto/secp256k1" signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" - + "cosmossdk.io/core/address" "cosmossdk.io/x/tx/signing" "cosmossdk.io/x/tx/signing/directaux" ) @@ -55,7 +54,6 @@ func TestDirectAuxHandler(t *testing.T) { GasLimit: 20000, Payer: feePayerAddr, } - tip := &txv1beta1.Tip{Amount: []*basev1beta1.Coin{{Denom: "tip-token", Amount: "10"}}} txBody := &txv1beta1.TxBody{ Messages: []*anypb.Any{msg}, @@ -64,7 +62,6 @@ func TestDirectAuxHandler(t *testing.T) { authInfo := &txv1beta1.AuthInfo{ Fee: fee, - Tip: tip, SignerInfos: signerInfo, } @@ -114,7 +111,6 @@ func TestDirectAuxHandler(t *testing.T) { } authInfoWithNoFeePayer := &txv1beta1.AuthInfo{ Fee: feeWithNoPayer, - Tip: tip, SignerInfos: signerInfo, } authInfoWithNoFeePayerBz, err := proto.Marshal(authInfoWithNoFeePayer) @@ -140,7 +136,6 @@ func TestDirectAuxHandler(t *testing.T) { ChainId: chainID, AccountNumber: accNum, Sequence: accSeq, - Tip: tip, } expectedSignBytes, err := proto.Marshal(signDocDirectAux) require.NoError(t, err) diff --git a/x/tx/signing/testutil/util.go b/x/tx/signing/testutil/util.go index ef689ec1e747..dfa265992a35 100644 --- a/x/tx/signing/testutil/util.go +++ b/x/tx/signing/testutil/util.go @@ -17,7 +17,6 @@ type HandlerArgumentOptions struct { Msg proto.Message AccNum uint64 AccSeq uint64 - Tip *txv1beta1.Tip Fee *txv1beta1.Fee SignerAddress string } @@ -57,15 +56,16 @@ func MakeHandlerArguments(options HandlerArgumentOptions) (signing.SignerData, s authInfo := &txv1beta1.AuthInfo{ Fee: options.Fee, - Tip: options.Tip, SignerInfos: signerInfo, } - bodyBz, err := proto.Marshal(txBody) + protov2MarshalOpts := proto.MarshalOptions{Deterministic: true} + bodyBz, err := protov2MarshalOpts.Marshal(txBody) if err != nil { return signing.SignerData{}, signing.TxData{}, err } - authInfoBz, err := proto.Marshal(authInfo) + + authInfoBz, err := protov2MarshalOpts.Marshal(authInfo) if err != nil { return signing.SignerData{}, signing.TxData{}, err } diff --git a/x/tx/signing/textual/any.go b/x/tx/signing/textual/any.go index 7818fb27e4d1..3770969dc580 100644 --- a/x/tx/signing/textual/any.go +++ b/x/tx/signing/textual/any.go @@ -2,6 +2,7 @@ package textual import ( "context" + "errors" "fmt" "strings" @@ -74,7 +75,7 @@ func (ar anyValueRenderer) Format(ctx context.Context, v protoreflect.Value) ([] // Parse implements the ValueRenderer interface. func (ar anyValueRenderer) Parse(ctx context.Context, screens []Screen) (protoreflect.Value, error) { if len(screens) == 0 { - return nilValue, fmt.Errorf("expect at least one screen") + return nilValue, errors.New("expect at least one screen") } if screens[0].Indent != 0 { return nilValue, fmt.Errorf("bad indentation: want 0, got %d", screens[0].Indent) @@ -82,7 +83,7 @@ func (ar anyValueRenderer) Parse(ctx context.Context, screens []Screen) (protore typeURL := screens[0].Content msgType, err := ar.tr.typeResolver.FindMessageByURL(typeURL) - if err == protoregistry.NotFound { + if errors.Is(err, protoregistry.NotFound) { // If the proto v2 registry doesn't have this message, then we use // protoFiles (which can e.g. be initialized to gogo's MergedRegistry) // to retrieve the message descriptor, and then use dynamicpb on that diff --git a/x/tx/signing/textual/bool_test.go b/x/tx/signing/textual/bool_test.go index 07722375d6b4..ac1b41909e55 100644 --- a/x/tx/signing/textual/bool_test.go +++ b/x/tx/signing/textual/bool_test.go @@ -4,9 +4,10 @@ import ( "context" "testing" - "cosmossdk.io/x/tx/signing/textual" "github.com/stretchr/testify/require" "google.golang.org/protobuf/reflect/protoreflect" + + "cosmossdk.io/x/tx/signing/textual" ) func TestBool(t *testing.T) { diff --git a/x/tx/signing/textual/coin_test.go b/x/tx/signing/textual/coin_test.go index a9ed0295b459..07af1841f9b4 100644 --- a/x/tx/signing/textual/coin_test.go +++ b/x/tx/signing/textual/coin_test.go @@ -3,6 +3,7 @@ package textual_test import ( "context" "encoding/json" + "errors" "fmt" "os" "testing" @@ -12,7 +13,6 @@ import ( bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" - "cosmossdk.io/x/tx/signing/textual" ) @@ -56,7 +56,7 @@ func TestMetadataQuerier(t *testing.T) { require.Error(t, err) // Errors if metadata querier returns an error - expErr := fmt.Errorf("mock error") + expErr := errors.New("mock error") txt, err := textual.NewSignModeHandler(textual.SignModeOptions{ CoinMetadataQuerier: func(_ context.Context, _ string) (*bankv1beta1.Metadata, error) { return nil, expErr diff --git a/x/tx/signing/textual/coins.go b/x/tx/signing/textual/coins.go index 049b13421429..2bcd8230905d 100644 --- a/x/tx/signing/textual/coins.go +++ b/x/tx/signing/textual/coins.go @@ -2,14 +2,15 @@ package textual import ( "context" + "errors" "fmt" + "sort" "strings" "google.golang.org/protobuf/reflect/protoreflect" bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" - corecoins "cosmossdk.io/core/coins" "cosmossdk.io/math" ) @@ -32,7 +33,7 @@ var _ RepeatedValueRenderer = coinsValueRenderer{} func (vr coinsValueRenderer) Format(ctx context.Context, v protoreflect.Value) ([]Screen, error) { if vr.coinMetadataQuerier == nil { - return nil, fmt.Errorf("expected non-nil coin metadata querier") + return nil, errors.New("expected non-nil coin metadata querier") } // Since this value renderer has a FormatRepeated method, the Format one @@ -48,7 +49,7 @@ func (vr coinsValueRenderer) Format(ctx context.Context, v protoreflect.Value) ( return nil, err } - formatted, err := corecoins.FormatCoins([]*basev1beta1.Coin{coin}, []*bankv1beta1.Metadata{metadata}) + formatted, err := FormatCoins([]*basev1beta1.Coin{coin}, []*bankv1beta1.Metadata{metadata}) if err != nil { return nil, err } @@ -58,7 +59,7 @@ func (vr coinsValueRenderer) Format(ctx context.Context, v protoreflect.Value) ( func (vr coinsValueRenderer) FormatRepeated(ctx context.Context, v protoreflect.Value) ([]Screen, error) { if vr.coinMetadataQuerier == nil { - return nil, fmt.Errorf("expected non-nil coin metadata querier") + return nil, errors.New("expected non-nil coin metadata querier") } protoCoins := v.List() @@ -76,7 +77,7 @@ func (vr coinsValueRenderer) FormatRepeated(ctx context.Context, v protoreflect. } } - formatted, err := corecoins.FormatCoins(coins, metadatas) + formatted, err := FormatCoins(coins, metadatas) if err != nil { return nil, err } @@ -217,3 +218,92 @@ func parseCoin(coinStr string, metadata *bankv1beta1.Metadata) (*basev1beta1.Coi Denom: baseDenom, }, nil } + +// formatCoin formats a sdk.Coin into a value-rendered string, using the +// given metadata about the denom. It returns the formatted coin string, the +// display denom, and an optional error. +func formatCoin(coin *basev1beta1.Coin, metadata *bankv1beta1.Metadata) (string, error) { + coinDenom := coin.Denom + + // Return early if no display denom or display denom is the current coin denom. + if metadata == nil || metadata.Display == "" || coinDenom == metadata.Display { + vr, err := math.FormatDec(coin.Amount) + return vr + " " + coin.Denom, err + } + + dispDenom := metadata.Display + + // Find exponents of both denoms. + var coinExp, dispExp uint32 + foundCoinExp, foundDispExp := false, false + for _, unit := range metadata.DenomUnits { + if coinDenom == unit.Denom { + coinExp = unit.Exponent + foundCoinExp = true + } + if dispDenom == unit.Denom { + dispExp = unit.Exponent + foundDispExp = true + } + } + + // If we didn't find either exponent, then we return early. + if !foundCoinExp || !foundDispExp { + vr, err := math.FormatInt(coin.Amount) + return vr + " " + coin.Denom, err + } + + dispAmount, err := math.LegacyNewDecFromStr(coin.Amount) + if err != nil { + return "", err + } + + if coinExp > dispExp { + dispAmount = dispAmount.Mul(math.LegacyNewDec(10).Power(uint64(coinExp - dispExp))) + } else { + dispAmount = dispAmount.Quo(math.LegacyNewDec(10).Power(uint64(dispExp - coinExp))) + } + + vr, err := math.FormatDec(dispAmount.String()) + return vr + " " + dispDenom, err +} + +// FormatCoins formats Coins into a value-rendered string, which uses +// `formatCoin` separated by ", " (a comma and a space), and sorted +// alphabetically by value-rendered denoms. It expects an array of metadata +// (optionally nil), where each metadata at index `i` MUST match the coin denom +// at the same index. +func FormatCoins(coins []*basev1beta1.Coin, metadata []*bankv1beta1.Metadata) (string, error) { + if len(coins) != len(metadata) { + return "", fmt.Errorf("formatCoins expect one metadata for each coin; expected %d, got %d", len(coins), len(metadata)) + } + + formatted := make([]string, len(coins)) + for i, coin := range coins { + var err error + formatted[i], err = formatCoin(coin, metadata[i]) + if err != nil { + return "", err + } + + // If a coin contains a comma, return an error given that the output + // could be misinterpreted by the user as 2 different coins. + if strings.Contains(formatted[i], ",") { + return "", fmt.Errorf("coin %s contains a comma", formatted[i]) + } + } + + if len(coins) == 0 { + return emptyCoins, nil + } + + // Sort the formatted coins by display denom. + sort.SliceStable(formatted, func(i, j int) bool { + denomI := strings.Split(formatted[i], " ")[1] + denomJ := strings.Split(formatted[j], " ")[1] + + return denomI < denomJ + }) + + return strings.Join(formatted, ", "), nil +} diff --git a/x/tx/signing/textual/coins_test.go b/x/tx/signing/textual/coins_test.go index e7bd921e10da..c9e1bbf6dd7a 100644 --- a/x/tx/signing/textual/coins_test.go +++ b/x/tx/signing/textual/coins_test.go @@ -6,12 +6,12 @@ import ( "os" "testing" - bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" - basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" - "cosmossdk.io/math" "github.com/stretchr/testify/require" "google.golang.org/protobuf/reflect/protoreflect" + bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" + basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + "cosmossdk.io/math" "cosmossdk.io/x/tx/signing/textual" ) @@ -66,12 +66,13 @@ func TestCoinsJSONTestcases(t *testing.T) { // rendering, so we lose initial Coins ordering. Instead, we just check // set equality using a map. func checkCoinsEqual(t *testing.T, l1, l2 protoreflect.List) { + t.Helper() require.Equal(t, l1.Len(), l2.Len()) coinsMap := make(map[string]*basev1beta1.Coin, l1.Len()) for i := 0; i < l1.Len(); i++ { coin, ok := l1.Get(i).Message().Interface().(*basev1beta1.Coin) - require.True(t, ok) + require.True(t, ok, "not a *basev1beta1.Coin: %#v", l1.Get(i).Message().Interface()) coinsMap[coin.Denom] = coin } @@ -85,12 +86,13 @@ func checkCoinsEqual(t *testing.T, l1, l2 protoreflect.List) { } func checkCoinEqual(t *testing.T, coin, coin1 *basev1beta1.Coin) { + t.Helper() require.Equal(t, coin1.Denom, coin.Denom) v, ok := math.NewIntFromString(coin.Amount) require.True(t, ok) v1, ok := math.NewIntFromString(coin1.Amount) require.True(t, ok) - require.True(t, v.Equal(v1)) + require.True(t, v.Equal(v1), "Mismatch\n\tv: %+v\n\tv1: %+v", v, v1) } // coinsJSONTest is the type of test cases in the testdata file. @@ -104,3 +106,64 @@ type coinsJSONTest struct { Text string Error bool } + +// formatCoinJSONTest is the type of test cases in the coin.json file. +type formatCoinJSONTest struct { + Proto *basev1beta1.Coin + Metadata *bankv1beta1.Metadata + Text string + Error bool +} + +func TestFormatCoin(t *testing.T) { + var testcases []formatCoinJSONTest + raw, err := os.ReadFile("./internal/testdata/coin.json") + require.NoError(t, err) + err = json.Unmarshal(raw, &testcases) + require.NoError(t, err) + + for _, tc := range testcases { + t.Run(tc.Text, func(t *testing.T) { + if tc.Proto != nil { + out, err := textual.FormatCoins([]*basev1beta1.Coin{tc.Proto}, []*bankv1beta1.Metadata{tc.Metadata}) + + if tc.Error { + require.Error(t, err) + return + } + + require.NoError(t, err) + require.Equal(t, tc.Text, out) + } + }) + } +} + +func TestFormatCoins(t *testing.T) { + var testcases []coinsJSONTest + raw, err := os.ReadFile("./internal/testdata/coins.json") + require.NoError(t, err) + err = json.Unmarshal(raw, &testcases) + require.NoError(t, err) + + for _, tc := range testcases { + t.Run(tc.Text, func(t *testing.T) { + if tc.Proto != nil { + metadata := make([]*bankv1beta1.Metadata, len(tc.Proto)) + for i, coin := range tc.Proto { + metadata[i] = tc.Metadata[coin.Denom] + } + + out, err := textual.FormatCoins(tc.Proto, metadata) + + if tc.Error { + require.Error(t, err) + return + } + + require.NoError(t, err) + require.Equal(t, tc.Text, out) + } + }) + } +} diff --git a/x/tx/signing/textual/dec_test.go b/x/tx/signing/textual/dec_test.go index defb6d9cc509..f8c7b3ebe2f4 100644 --- a/x/tx/signing/textual/dec_test.go +++ b/x/tx/signing/textual/dec_test.go @@ -38,6 +38,7 @@ func TestDecJSONTestcases(t *testing.T) { } func checkDecTest(t *testing.T, r textual.ValueRenderer, pv protoreflect.Value, expected string) { + t.Helper() screens, err := r.Format(context.Background(), pv) require.NoError(t, err) require.Len(t, screens, 1) diff --git a/x/tx/signing/textual/duration_test.go b/x/tx/signing/textual/duration_test.go index baf015e5e300..da222bb1d42b 100644 --- a/x/tx/signing/textual/duration_test.go +++ b/x/tx/signing/textual/duration_test.go @@ -7,11 +7,11 @@ import ( "os" "testing" - "cosmossdk.io/x/tx/signing/textual" "github.com/stretchr/testify/require" - "google.golang.org/protobuf/reflect/protoreflect" dpb "google.golang.org/protobuf/types/known/durationpb" + + "cosmossdk.io/x/tx/signing/textual" ) type durationTest struct { diff --git a/x/tx/signing/textual/e2e_test.go b/x/tx/signing/textual/e2e_test.go index d6e8e26b4d24..e759d403f446 100644 --- a/x/tx/signing/textual/e2e_test.go +++ b/x/tx/signing/textual/e2e_test.go @@ -16,7 +16,6 @@ import ( _ "cosmossdk.io/api/cosmos/crypto/multisig" _ "cosmossdk.io/api/cosmos/crypto/secp256k1" _ "cosmossdk.io/api/cosmos/gov/v1" - "cosmossdk.io/x/tx/signing" "cosmossdk.io/x/tx/signing/textual" "cosmossdk.io/x/tx/signing/textual/internal/textualpb" @@ -72,6 +71,10 @@ func TestE2EJSONTestcases(t *testing.T) { AuthInfoBytes: authInfoBz, }) require.NoError(t, err) + decodeWant, err := hex.DecodeString(tc.Cbor) + require.NoError(t, err) + t.Log("got: " + string(signDoc)) + t.Log("want " + string(decodeWant)) require.Equal(t, tc.Cbor, hex.EncodeToString(signDoc)) }) } diff --git a/x/tx/signing/textual/fuzz_test.go b/x/tx/signing/textual/fuzz_test.go index 81e2fbb867b4..bdbf1be24397 100644 --- a/x/tx/signing/textual/fuzz_test.go +++ b/x/tx/signing/textual/fuzz_test.go @@ -1,14 +1,20 @@ package textual_test import ( + "bytes" "context" "encoding/json" "os" + "regexp" "testing" + "github.com/google/go-cmp/cmp" "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/testing/protocmp" tspb "google.golang.org/protobuf/types/known/timestamppb" + basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + "cosmossdk.io/x/tx/internal/testpb" "cosmossdk.io/x/tx/signing/textual" ) @@ -101,3 +107,195 @@ func FuzzTimestampJSONParseToParseRoundTrip(f *testing.F) { } }) } + +func FuzzBytesValueRendererParse(f *testing.F) { + // 1. Generate some seeds from testdata. + seed, err := os.ReadFile("./internal/testdata/bytes.json") + if err != nil { + f.Fatal(err) + } + f.Add(seed) + + tr, err := textual.NewSignModeHandler(textual.SignModeOptions{CoinMetadataQuerier: EmptyCoinMetadataQuerier}) + if err != nil { + f.Fatal(err) + } + + ctx := context.Background() + + f.Fuzz(func(t *testing.T, input []byte) { + var testCases []bytesTest + if err := json.Unmarshal(input, &testCases); err != nil { + return + } + + for _, tc := range testCases { + rend, err := tr.GetFieldValueRenderer(fieldDescriptorFromName("BYTES")) + if err != nil { + t.Fatal(err) + } + + screens, err := rend.Format(ctx, protoreflect.ValueOfBytes(tc.base64)) + if err != nil { + t.Fatal(err) + } + if g, w := len(screens), 1; g != w { + t.Fatalf("Mismatch screen count: got=%d, want=%d", g, w) + } + + // Round trip and test. + val, err := rend.Parse(ctx, screens) + if err != nil { + t.Fatal(err) + } + if g, w := len(tc.base64), 35; g > w { + if len(val.Bytes()) != 0 { + t.Fatalf("val.Bytes() != 0:\n\tGot: % x", val.Bytes()) + } + } else if !bytes.Equal(tc.base64, val.Bytes()) { + t.Fatalf("val.Bytes() mismatch:\n\tGot: % x\n\tWant: % x", val.Bytes(), tc.base64) + } + } + }) +} + +func FuzzMessageValueRendererParse(f *testing.F) { + if testing.Short() { + f.Skip() + } + + // 1. Use the seeds from testdata and mutate them. + seed, err := os.ReadFile("./internal/testdata/message.json") + if err != nil { + f.Fatal(err) + } + f.Add(seed) + + ctx := context.Background() + tr, err := textual.NewSignModeHandler(textual.SignModeOptions{CoinMetadataQuerier: EmptyCoinMetadataQuerier}) + if err != nil { + f.Fatalf("Failed to create SignModeHandler: %v", err) + } + + f.Fuzz(func(t *testing.T, input []byte) { + var testCases []messageJSONTest + if err := json.Unmarshal(input, &testCases); err != nil { + return + } + + for _, tc := range testCases { + rend := textual.NewMessageValueRenderer(tr, (&testpb.Foo{}).ProtoReflect().Descriptor()) + + var screens []textual.Screen + var err error + + if tc.Proto != nil { + screens, err = rend.Format(ctx, protoreflect.ValueOf(tc.Proto.ProtoReflect())) + if err != nil { + continue + } + } + + val, err := rend.Parse(ctx, screens) + if err != nil { + continue + } + + msg := val.Message().Interface() + gotMsg, ok := msg.(*testpb.Foo) + if !ok { + t.Fatalf("Wrong type for Foo: %T", msg) + } + diff := cmp.Diff(gotMsg, tc.Proto, protocmp.Transform()) + if diff != "" { + t.Fatalf("Roundtrip mismatch\n\tGot: %#v\n\tWant: %#v", gotMsg, tc.Proto) + } + } + }) +} + +// Copied from types/coin.go but pasted in here so as to avoid any imports +// of that package as has been mandated by team decisions. +var ( + reCoinDenom = regexp.MustCompile(`[a-zA-Z][a-zA-Z0-9/:._-]{2,127}`) + reCoinAmount = regexp.MustCompile(`[[:digit:]]+(?:\.[[:digit:]]+)?|\.[[:digit:]]+`) +) + +func FuzzCoinsJSONTestcases(f *testing.F) { + f.Skip() // https://github.com/cosmos/cosmos-sdk/pull/16521#issuecomment-1614507574 + + // Generate some seeds. + seed, err := os.ReadFile("./internal/testdata/coins.json") + if err != nil { + f.Fatal(err) + } + f.Add(seed) + + txt, err := textual.NewSignModeHandler(textual.SignModeOptions{CoinMetadataQuerier: mockCoinMetadataQuerier}) + if err != nil { + f.Fatal(err) + } + rend, err := txt.GetFieldValueRenderer(fieldDescriptorFromName("COINS")) + if err != nil { + f.Fatal(err) + } + vrr := rend.(textual.RepeatedValueRenderer) + + f.Fuzz(func(t *testing.T, input []byte) { + var testCases []coinsJSONTest + if err := json.Unmarshal(input, &testCases); err != nil { + return + } + + for _, tc := range testCases { + if tc.Proto == nil { + continue + } + + // Create a context.Context containing all coins metadata, to simulate + // that they are in state. + ctx := context.Background() + for _, v := range tc.Metadata { + ctx = addMetadataToContext(ctx, v) + } + + listValue := NewGenericList(tc.Proto) + screens, err := vrr.FormatRepeated(ctx, protoreflect.ValueOf(listValue)) + if err != nil { + cpt := tc.Proto[0] + likeEmpty := err.Error() == "cannot format empty string" || err.Error() == "decimal string cannot be empty" + if likeEmpty && (!reCoinDenom.MatchString(cpt.Denom) || cpt.Amount == "") { + return + } + if !reCoinDenom.MatchString(cpt.Denom) { + return + } + if !reCoinAmount.MatchString(cpt.Amount) { + return + } + t.Fatalf("%v\n%q\n%#v => %t", err, tc.Text, cpt, cpt.Amount == "") + } + + if g, w := len(screens), 1; g != w { + t.Fatalf("Screens mismatch: got=%d want=%d", g, w) + } + + wantContent := tc.Text + if wantContent == "" { + wantContent = "zero" + } + if false { + if g, w := screens[0].Content, wantContent; g != w { + t.Fatalf("Content mismatch:\n\tGot: %s\n\tWant: %s", g, w) + } + } + + // Round trip. + parsedValue := NewGenericList([]*basev1beta1.Coin{}) + if err := vrr.ParseRepeated(ctx, screens, parsedValue); err != nil { + return + } + checkCoinsEqual(t, listValue, parsedValue) + } + }) +} diff --git a/x/tx/signing/textual/handler.go b/x/tx/signing/textual/handler.go index 97b6e3a752df..e31981b9286e 100644 --- a/x/tx/signing/textual/handler.go +++ b/x/tx/signing/textual/handler.go @@ -3,9 +3,12 @@ package textual import ( "bytes" "context" + "errors" "fmt" "reflect" + cosmos_proto "github.com/cosmos/cosmos-proto" + gogoproto "github.com/cosmos/gogoproto/proto" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" @@ -13,13 +16,9 @@ import ( "google.golang.org/protobuf/types/known/durationpb" "google.golang.org/protobuf/types/known/timestamppb" - signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" - - cosmos_proto "github.com/cosmos/cosmos-proto" - bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" - + signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" "cosmossdk.io/x/tx/signing" "cosmossdk.io/x/tx/signing/textual/internal/textualpb" ) @@ -70,10 +69,10 @@ type SignModeHandler struct { // NewSignModeHandler returns a new SignModeHandler which generates sign bytes and provides value renderers. func NewSignModeHandler(o SignModeOptions) (*SignModeHandler, error) { if o.CoinMetadataQuerier == nil { - return nil, fmt.Errorf("coinMetadataQuerier must be non-empty") + return nil, errors.New("coinMetadataQuerier must be non-empty") } if o.FileResolver == nil { - o.FileResolver = protoregistry.GlobalFiles + o.FileResolver = gogoproto.HybridResolver } if o.TypeResolver == nil { o.TypeResolver = protoregistry.GlobalTypes @@ -98,7 +97,7 @@ func (r *SignModeHandler) SpecVersion() uint64 { // GetFieldValueRenderer returns the value renderer for the given FieldDescriptor. func (r *SignModeHandler) GetFieldValueRenderer(fd protoreflect.FieldDescriptor) (ValueRenderer, error) { switch { - // Scalars, such as sdk.Int and sdk.Dec encoded as strings. + // Scalars, such as math.Int and math.Dec encoded as strings. case fd.Kind() == protoreflect.StringKind: if proto.GetExtension(fd.Options(), cosmos_proto.E_Scalar) != "" { scalar, ok := proto.GetExtension(fd.Options(), cosmos_proto.E_Scalar).(string) @@ -137,7 +136,7 @@ func (r *SignModeHandler) GetFieldValueRenderer(fd protoreflect.FieldDescriptor) } if fd.IsMap() { - return nil, fmt.Errorf("value renderers cannot format value of type map") + return nil, errors.New("value renderers cannot format value of type map") } return NewMessageValueRenderer(r, md), nil case fd.Kind() == protoreflect.BoolKind: diff --git a/x/tx/signing/textual/int.go b/x/tx/signing/textual/int.go index 2433ace07222..4dbe8bb8ddc3 100644 --- a/x/tx/signing/textual/int.go +++ b/x/tx/signing/textual/int.go @@ -7,12 +7,13 @@ import ( "strconv" "strings" - "cosmossdk.io/math" "google.golang.org/protobuf/reflect/protoreflect" + + "cosmossdk.io/math" ) // NewIntValueRenderer returns a ValueRenderer for uint32, uint64, int32 and -// int64, and sdk.Int scalars. +// int64, and math.Int scalars. func NewIntValueRenderer(fd protoreflect.FieldDescriptor) ValueRenderer { return intValueRenderer{fd} } diff --git a/x/tx/signing/textual/int_test.go b/x/tx/signing/textual/int_test.go index efab44f686d9..100ec3097157 100644 --- a/x/tx/signing/textual/int_test.go +++ b/x/tx/signing/textual/int_test.go @@ -11,7 +11,6 @@ import ( "google.golang.org/protobuf/reflect/protoreflect" "cosmossdk.io/math" - "cosmossdk.io/x/tx/signing/textual" ) @@ -64,7 +63,7 @@ func TestIntJSONTestcases(t *testing.T) { checkNumberTest(t, r, protoreflect.ValueOf(ii), tc[1]) } - // Parse test case strings as sdk.Ints + // Parse test case strings as math.Ints _, ok := math.NewIntFromString(tc[0]) if ok { r, err := textual.GetFieldValueRenderer(fieldDescriptorFromName("SDKINT")) @@ -79,6 +78,7 @@ func TestIntJSONTestcases(t *testing.T) { // checkNumberTest checks that the output of a number value renderer // matches the expected string. Only use it to test numbers. func checkNumberTest(t *testing.T, r textual.ValueRenderer, pv protoreflect.Value, expected string) { + t.Helper() screens, err := r.Format(context.Background(), pv) require.NoError(t, err) require.Len(t, screens, 1) diff --git a/x/tx/signing/textual/internal/cbor/cbor_test.go b/x/tx/signing/textual/internal/cbor/cbor_test.go index 32dae488130c..e94ae8f704e4 100644 --- a/x/tx/signing/textual/internal/cbor/cbor_test.go +++ b/x/tx/signing/textual/internal/cbor/cbor_test.go @@ -6,8 +6,9 @@ import ( "fmt" "testing" - "cosmossdk.io/x/tx/signing/textual/internal/cbor" "github.com/stretchr/testify/require" + + "cosmossdk.io/x/tx/signing/textual/internal/cbor" ) var ( diff --git a/x/tx/signing/textual/internal/testdata/coin.json b/x/tx/signing/textual/internal/testdata/coin.json index 1a1ac79b9306..02231d2d712e 100644 --- a/x/tx/signing/textual/internal/testdata/coin.json +++ b/x/tx/signing/textual/internal/testdata/coin.json @@ -327,5 +327,10 @@ {"text":"", "error": true}, {"text":"1COSM", "error": true}, {"text":"1 COSM", "error": true}, - {"text":" 1 COSM", "error": true} + {"text":" 1 COSM", "error": true}, + { + "proto": {"amount": "10000000", "denom": "point, 222222 point"}, + "metadata": {"display": "POINT", "base": "point", "denom_units": [{"denom": "point", "exponent": 0}, {"denom": "POINT", "exponent": 0}]}, + "error": true + } ] diff --git a/x/tx/signing/textual/internal/testdata/e2e.json b/x/tx/signing/textual/internal/testdata/e2e.json index 49f5c6effdb3..2ab0e30f5b96 100644 --- a/x/tx/signing/textual/internal/testdata/e2e.json +++ b/x/tx/signing/textual/internal/testdata/e2e.json @@ -286,13 +286,6 @@ "gas_limit": 100000, "payer": "cosmos1ejrf4cur2wy6kfurg9f2jppp2h3afe5h6pkh5t", "granter": "cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvqa8eyhs" - }, - "tip": { - "amount": [ - { "amount": "20000", "denom": "uatom" }, - { "amount": "30000", "denom": "uosmo" } - ], - "tipper": "cosmos1ejrf4cur2wy6kfurg9f2jppp2h3afe5h6pkh5t" } } }, @@ -344,8 +337,6 @@ { "title": "Fees", "content": "0.002 ATOM" }, { "title": "Fee payer", "content": "cosmos1ejrf4cur2wy6kfurg9f2jppp2h3afe5h6pkh5t", "expert": true }, { "title": "Fee granter", "content": "cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvqa8eyhs", "expert": true }, - { "title": "Tip", "content": "0.02 ATOM, 30'000 uosmo" }, - { "title": "Tipper", "content": "cosmos1ejrf4cur2wy6kfurg9f2jppp2h3afe5h6pkh5t" }, { "title": "Gas limit", "content": "100'000", "expert": true }, { "title": "Timeout height", "content": "20", "expert": true }, { "title": "Other signer", "content": "1 SignerInfo", "expert": true }, @@ -381,8 +372,8 @@ { "title": "Non critical extension options (1/1)", "content": "/cosmos.auth.v1beta1.Params", "indent": 1, "expert": true }, { "title": "Max memo characters", "content": "10", "indent": 2, "expert": true }, { "content": "End of Non critical extension options", "expert": true }, - { "title": "Hash of raw bytes", "content": "7ea02e8f0baed2db969e2d9ae4dc51fa31116259bd42897588072faf0ebb4d2e", "expert": true } + { "title": "Hash of raw bytes", "content": "e7be7808de4985bd609811d2a32805cb233c168c7d247d61d37f4a6dd4cf3a2a", "expert": true } ], - "cbor": "a101983fa20168436861696e20696402686d792d636861696ea2016e4163636f756e74206e756d626572026131a2016853657175656e6365026132a301674164647265737302782d636f736d6f7331756c6176336873656e7570737771666b77327933737570356b677471776e767161386579687304f5a3016a5075626c6963206b657902781f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657904f5a401634b657902785230324542204444374620453446442045423736204443384120323035452046363544203739304320443330452038413337203541354320323532382045423341203932334120463146422034443739203444030104f5a102781f54686973207472616e73616374696f6e206861732032204d65737361676573a3016d4d6573736167652028312f322902781d2f636f736d6f732e617574687a2e763162657461312e4d7367457865630301a301674772616e74656502782d636f736d6f7331756c6176336873656e7570737771666b77327933737570356b677471776e76716138657968730302a301644d73677302653120416e790302a3016a4d7367732028312f312902781c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e640303a3016c46726f6d206164647265737302782d636f736d6f7331756c6176336873656e7570737771666b77327933737570356b677471776e76716138657968730304a3016a546f206164647265737302782d636f736d6f7331656a726634637572327779366b667572673966326a707070326833616665356836706b6835740304a30166416d6f756e74026731302041544f4d0304a2026b456e64206f66204d7367730302a3016d4d6573736167652028322f322902762f636f736d6f732e676f762e76312e4d7367566f74650301a3016b50726f706f73616c2069640261310302a30165566f74657202782d636f736d6f7331756c6176336873656e7570737771666b77327933737570356b677471776e76716138657968730302a301664f7074696f6e026f564f54455f4f5054494f4e5f5945530302a301684d65746164617461027901e34c6f72656d20697073756d20646f6c6f722073697420616d65742c20636f6e73656374657475722061646970697363696e6720656c69742c2073656420646f20656975736d6f642074656d706f7220696e6369646964756e74207574206c61626f726520657420646f6c6f7265206d61676e6120616c697175612e20557420656e696d206164206d696e696d2076656e69616d2c2071756973206e6f737472756420657865726369746174696f6e20756c6c616d636f206c61626f726973206e69736920757420616c697175697020657820656120636f6d6d6f646f20636f6e7365717561742e2044756973206175746520697275726520646f6c6f7220696e20726570726568656e646572697420696e20766f6c7570746174652076656c697420657373652063696c6c756d20646f6c6f726520657520667567696174206e756c6c612070617269617475722e204578636570746575722073696e74206f6363616563617420637570696461746174206e6f6e2070726f6964656e742c2073756e7420696e2063756c706120717569206f666669636961206465736572756e74206d6f6c6c697420616e696d20696420657374206c61626f72756d2e20416c736f20697420656e647320696e2020612073696e676c6520616d70657273616e6420400302a1026e456e64206f66204d657373616765a201644d656d6f0278193e20e29a9befb88f5c7532363942e29a9befb88f2020202020a2016446656573026a302e3030322041544f4da3016946656520706179657202782d636f736d6f7331656a726634637572327779366b667572673966326a707070326833616665356836706b68357404f5a3016b466565206772616e74657202782d636f736d6f7331756c6176336873656e7570737771666b77327933737570356b677471776e767161386579687304f5a201635469700277302e30322041544f4d2c2033302730303020756f736d6fa2016654697070657202782d636f736d6f7331656a726634637572327779366b667572673966326a707070326833616665356836706b683574a30169476173206c696d697402673130302730303004f5a3016e54696d656f7574206865696768740262323004f5a3016c4f74686572207369676e6572026c31205369676e6572496e666f04f5a401724f74686572207369676e65722028312f312902715369676e6572496e666f206f626a656374030104f5a4016a5075626c6963206b65790278292f636f736d6f732e63727970746f2e6d756c74697369672e4c6567616379416d696e6f5075624b6579030204f5a401695468726573686f6c64026132030304f5a4016b5075626c6963206b65797302653220416e79030304f5a401715075626c6963206b6579732028312f322902781f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b6579030404f5a401634b657902785230323537203445424520304246432037353446203539363720334241312031423237203530304620393135382041444532204531374520314130312038324230204341384220433635322034444230203933030504f5a401715075626c6963206b6579732028322f322902781d2f636f736d6f732e63727970746f2e656432353531392e5075624b6579030404f5a401634b657902785230333135203043343720463138412041333237203136413620353437452044413842203733363920303637442043453131204431343120363234352042373738203735364320463833352039363738203737030504f5a30272456e64206f66205075626c6963206b657973030304f5a401694d6f646520696e666f026f4d6f6465496e666f206f626a656374030204f5a401654d756c7469026c4d756c7469206f626a656374030304f5a4016842697461727261790276436f6d706163744269744172726179206f626a656374030404f5a40171457874726120626974732073746f726564026135030504f5a40165456c656d7302623438030504f5a4016a4d6f646520696e666f73026a32204d6f6465496e666f030404f5a401704d6f646520696e666f732028312f3229026f4d6f6465496e666f206f626a656374030504f5a4016653696e676c65026d53696e676c65206f626a656374030604f5a401644d6f646502781b5349474e5f4d4f44455f4c45474143595f414d494e4f5f4a534f4e030704f5a401704d6f646520696e666f732028322f3229026f4d6f6465496e666f206f626a656374030504f5a4016653696e676c65026d53696e676c65206f626a656374030604f5a401644d6f646502781b5349474e5f4d4f44455f4c45474143595f414d494e4f5f4a534f4e030704f5a30271456e64206f66204d6f646520696e666f73030404f5a4016853657175656e6365026135030204f5a20273456e64206f66204f74686572207369676e657204f5a30171457874656e73696f6e206f7074696f6e7302653120416e7904f5a40177457874656e73696f6e206f7074696f6e732028312f31290278192f636f736d6f732e626173652e763162657461312e436f696e030104f5a30266352041544f4d030204f5a2027818456e64206f6620457874656e73696f6e206f7074696f6e7304f5a301781e4e6f6e20637269746963616c20657874656e73696f6e206f7074696f6e7302653120416e7904f5a40178244e6f6e20637269746963616c20657874656e73696f6e206f7074696f6e732028312f312902781b2f636f736d6f732e617574682e763162657461312e506172616d73030104f5a401734d6178206d656d6f206368617261637465727302623130030204f5a2027825456e64206f66204e6f6e20637269746963616c20657874656e73696f6e206f7074696f6e7304f5a3017148617368206f66207261772062797465730278403765613032653866306261656432646239363965326439616534646335316661333131313632353962643432383937353838303732666166306562623464326504f5" + "cbor": "a101983da20168436861696e20696402686d792d636861696ea2016e4163636f756e74206e756d626572026131a2016853657175656e6365026132a301674164647265737302782d636f736d6f7331756c6176336873656e7570737771666b77327933737570356b677471776e767161386579687304f5a3016a5075626c6963206b657902781f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657904f5a401634b657902785230324542204444374620453446442045423736204443384120323035452046363544203739304320443330452038413337203541354320323532382045423341203932334120463146422034443739203444030104f5a102781f54686973207472616e73616374696f6e206861732032204d65737361676573a3016d4d6573736167652028312f322902781d2f636f736d6f732e617574687a2e763162657461312e4d7367457865630301a301674772616e74656502782d636f736d6f7331756c6176336873656e7570737771666b77327933737570356b677471776e76716138657968730302a301644d73677302653120416e790302a3016a4d7367732028312f312902781c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e640303a3016c46726f6d206164647265737302782d636f736d6f7331756c6176336873656e7570737771666b77327933737570356b677471776e76716138657968730304a3016a546f206164647265737302782d636f736d6f7331656a726634637572327779366b667572673966326a707070326833616665356836706b6835740304a30166416d6f756e74026731302041544f4d0304a2026b456e64206f66204d7367730302a3016d4d6573736167652028322f322902762f636f736d6f732e676f762e76312e4d7367566f74650301a3016b50726f706f73616c2069640261310302a30165566f74657202782d636f736d6f7331756c6176336873656e7570737771666b77327933737570356b677471776e76716138657968730302a301664f7074696f6e026f564f54455f4f5054494f4e5f5945530302a301684d65746164617461027901e34c6f72656d20697073756d20646f6c6f722073697420616d65742c20636f6e73656374657475722061646970697363696e6720656c69742c2073656420646f20656975736d6f642074656d706f7220696e6369646964756e74207574206c61626f726520657420646f6c6f7265206d61676e6120616c697175612e20557420656e696d206164206d696e696d2076656e69616d2c2071756973206e6f737472756420657865726369746174696f6e20756c6c616d636f206c61626f726973206e69736920757420616c697175697020657820656120636f6d6d6f646f20636f6e7365717561742e2044756973206175746520697275726520646f6c6f7220696e20726570726568656e646572697420696e20766f6c7570746174652076656c697420657373652063696c6c756d20646f6c6f726520657520667567696174206e756c6c612070617269617475722e204578636570746575722073696e74206f6363616563617420637570696461746174206e6f6e2070726f6964656e742c2073756e7420696e2063756c706120717569206f666669636961206465736572756e74206d6f6c6c697420616e696d20696420657374206c61626f72756d2e20416c736f20697420656e647320696e2020612073696e676c6520616d70657273616e6420400302a1026e456e64206f66204d657373616765a201644d656d6f0278193e20e29a9befb88f5c7532363942e29a9befb88f2020202020a2016446656573026a302e3030322041544f4da3016946656520706179657202782d636f736d6f7331656a726634637572327779366b667572673966326a707070326833616665356836706b68357404f5a3016b466565206772616e74657202782d636f736d6f7331756c6176336873656e7570737771666b77327933737570356b677471776e767161386579687304f5a30169476173206c696d697402673130302730303004f5a3016e54696d656f7574206865696768740262323004f5a3016c4f74686572207369676e6572026c31205369676e6572496e666f04f5a401724f74686572207369676e65722028312f312902715369676e6572496e666f206f626a656374030104f5a4016a5075626c6963206b65790278292f636f736d6f732e63727970746f2e6d756c74697369672e4c6567616379416d696e6f5075624b6579030204f5a401695468726573686f6c64026132030304f5a4016b5075626c6963206b65797302653220416e79030304f5a401715075626c6963206b6579732028312f322902781f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b6579030404f5a401634b657902785230323537203445424520304246432037353446203539363720334241312031423237203530304620393135382041444532204531374520314130312038324230204341384220433635322034444230203933030504f5a401715075626c6963206b6579732028322f322902781d2f636f736d6f732e63727970746f2e656432353531392e5075624b6579030404f5a401634b657902785230333135203043343720463138412041333237203136413620353437452044413842203733363920303637442043453131204431343120363234352042373738203735364320463833352039363738203737030504f5a30272456e64206f66205075626c6963206b657973030304f5a401694d6f646520696e666f026f4d6f6465496e666f206f626a656374030204f5a401654d756c7469026c4d756c7469206f626a656374030304f5a4016842697461727261790276436f6d706163744269744172726179206f626a656374030404f5a40171457874726120626974732073746f726564026135030504f5a40165456c656d7302623438030504f5a4016a4d6f646520696e666f73026a32204d6f6465496e666f030404f5a401704d6f646520696e666f732028312f3229026f4d6f6465496e666f206f626a656374030504f5a4016653696e676c65026d53696e676c65206f626a656374030604f5a401644d6f646502781b5349474e5f4d4f44455f4c45474143595f414d494e4f5f4a534f4e030704f5a401704d6f646520696e666f732028322f3229026f4d6f6465496e666f206f626a656374030504f5a4016653696e676c65026d53696e676c65206f626a656374030604f5a401644d6f646502781b5349474e5f4d4f44455f4c45474143595f414d494e4f5f4a534f4e030704f5a30271456e64206f66204d6f646520696e666f73030404f5a4016853657175656e6365026135030204f5a20273456e64206f66204f74686572207369676e657204f5a30171457874656e73696f6e206f7074696f6e7302653120416e7904f5a40177457874656e73696f6e206f7074696f6e732028312f31290278192f636f736d6f732e626173652e763162657461312e436f696e030104f5a30266352041544f4d030204f5a2027818456e64206f6620457874656e73696f6e206f7074696f6e7304f5a301781e4e6f6e20637269746963616c20657874656e73696f6e206f7074696f6e7302653120416e7904f5a40178244e6f6e20637269746963616c20657874656e73696f6e206f7074696f6e732028312f312902781b2f636f736d6f732e617574682e763162657461312e506172616d73030104f5a401734d6178206d656d6f206368617261637465727302623130030204f5a2027825456e64206f66204e6f6e20637269746963616c20657874656e73696f6e206f7074696f6e7304f5a3017148617368206f66207261772062797465730278406537626537383038646534393835626436303938313164326133323830356362323333633136386337643234376436316433376634613664643463663361326104f5" } ] diff --git a/x/tx/signing/textual/internal/testdata/tx.json b/x/tx/signing/textual/internal/testdata/tx.json index c071d08eec28..bbafe3b14120 100644 --- a/x/tx/signing/textual/internal/testdata/tx.json +++ b/x/tx/signing/textual/internal/testdata/tx.json @@ -299,13 +299,6 @@ "gas_limit": 100000, "payer": "cosmos1ejrf4cur2wy6kfurg9f2jppp2h3afe5h6pkh5t", "granter": "cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvqa8eyhs" - }, - "tip": { - "amount": [ - { "amount": "20000", "denom": "uatom" }, - { "amount": "30000", "denom": "uosmo" } - ], - "tipper": "cosmos1ejrf4cur2wy6kfurg9f2jppp2h3afe5h6pkh5t" } } }, @@ -357,8 +350,6 @@ { "title": "Fees", "content": "0.002 ATOM" }, { "title": "Fee payer", "content": "cosmos1ejrf4cur2wy6kfurg9f2jppp2h3afe5h6pkh5t", "expert": true }, { "title": "Fee granter", "content": "cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvqa8eyhs", "expert": true }, - { "title": "Tip", "content": "0.02 ATOM, 30'000 uosmo" }, - { "title": "Tipper", "content": "cosmos1ejrf4cur2wy6kfurg9f2jppp2h3afe5h6pkh5t" }, { "title": "Gas limit", "content": "100'000", "expert": true }, { "title": "Timeout height", "content": "20", "expert": true }, { "title": "Other signer", "content": "1 SignerInfo", "expert": true }, @@ -394,7 +385,7 @@ { "title": "Non critical extension options (1/1)", "content": "/cosmos.auth.v1beta1.Params", "indent": 1, "expert": true }, { "title": "Max memo characters", "content": "10", "indent": 2, "expert": true }, { "content": "End of Non critical extension options", "expert": true }, - { "title": "Hash of raw bytes", "content": "7ea02e8f0baed2db969e2d9ae4dc51fa31116259bd42897588072faf0ebb4d2e", "expert": true } + { "title": "Hash of raw bytes", "content": "e7be7808de4985bd609811d2a32805cb233c168c7d247d61d37f4a6dd4cf3a2a", "expert": true } ] } ] diff --git a/x/tx/signing/textual/internal/textualpb/textual.proto b/x/tx/signing/textual/internal/textualpb/textual.proto index efd8d35275bd..cddfc99d6e6b 100644 --- a/x/tx/signing/textual/internal/textualpb/textual.proto +++ b/x/tx/signing/textual/internal/textualpb/textual.proto @@ -77,8 +77,6 @@ message Envelope { repeated cosmos.base.v1beta1.Coin fees = 8; string fee_payer = 9; string fee_granter = 10; - repeated cosmos.base.v1beta1.Coin tip = 11; - string tipper = 12; uint64 gas_limit = 13; uint64 timeout_height = 14; repeated cosmos.tx.v1beta1.SignerInfo other_signer = 15; diff --git a/x/tx/signing/textual/message_test.go b/x/tx/signing/textual/message_test.go index da6f4f99a190..a0d870751410 100644 --- a/x/tx/signing/textual/message_test.go +++ b/x/tx/signing/textual/message_test.go @@ -9,12 +9,10 @@ import ( "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/require" - - bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/testing/protocmp" + bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" "cosmossdk.io/x/tx/internal/testpb" "cosmossdk.io/x/tx/signing/textual" ) diff --git a/x/tx/signing/textual/repeated_test.go b/x/tx/signing/textual/repeated_test.go index 3eece902e465..3c20aae365dc 100644 --- a/x/tx/signing/textual/repeated_test.go +++ b/x/tx/signing/textual/repeated_test.go @@ -8,7 +8,6 @@ import ( "testing" "github.com/stretchr/testify/require" - "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" diff --git a/x/tx/signing/textual/string_test.go b/x/tx/signing/textual/string_test.go index 4f215b8d6d11..5000c90cd010 100644 --- a/x/tx/signing/textual/string_test.go +++ b/x/tx/signing/textual/string_test.go @@ -7,9 +7,10 @@ import ( "os" "testing" - "cosmossdk.io/x/tx/signing/textual" "github.com/stretchr/testify/require" "google.golang.org/protobuf/reflect/protoreflect" + + "cosmossdk.io/x/tx/signing/textual" ) type stringJSONTest struct { diff --git a/x/tx/signing/textual/testdata/fuzz/FuzzCoinsJSONTestcases/4d81af7cc74558bf b/x/tx/signing/textual/testdata/fuzz/FuzzCoinsJSONTestcases/4d81af7cc74558bf new file mode 100644 index 000000000000..f16030abe365 --- /dev/null +++ b/x/tx/signing/textual/testdata/fuzz/FuzzCoinsJSONTestcases/4d81af7cc74558bf @@ -0,0 +1,2 @@ +go test fuzz v1 +[]byte("[{\"proto\":[{\"Amount\":\"0\"},{\"Amount\":\"1\"}]}]") diff --git a/x/tx/signing/textual/timestamp_test.go b/x/tx/signing/textual/timestamp_test.go index d9ca6bbc0862..65d2a99a9323 100644 --- a/x/tx/signing/textual/timestamp_test.go +++ b/x/tx/signing/textual/timestamp_test.go @@ -8,12 +8,12 @@ import ( "testing" "time" - "cosmossdk.io/x/tx/signing/textual" "github.com/stretchr/testify/require" - "google.golang.org/protobuf/reflect/protoreflect" dur "google.golang.org/protobuf/types/known/durationpb" tspb "google.golang.org/protobuf/types/known/timestamppb" + + "cosmossdk.io/x/tx/signing/textual" ) // timestampJSONTest is the type of test cases in the testdata file. @@ -43,6 +43,7 @@ func TestTimestampJsonTestcasesExtraneousNanos(t *testing.T) { } func testTimestampJSONTestcases(t *testing.T, raw []byte) { + t.Helper() var testcases []timestampJSONTest err := json.Unmarshal(raw, &testcases) require.NoError(t, err) diff --git a/x/tx/signing/textual/tx.go b/x/tx/signing/textual/tx.go index 2d1fa6250b99..501189e3e5d6 100644 --- a/x/tx/signing/textual/tx.go +++ b/x/tx/signing/textual/tx.go @@ -16,7 +16,6 @@ import ( msg "cosmossdk.io/api/cosmos/msg/v1" signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" - "cosmossdk.io/x/tx/signing/textual/internal/textualpb" ) @@ -84,10 +83,7 @@ func (vr txValueRenderer) Format(ctx context.Context, v protoreflect.Value) ([]S NonCriticalExtensionOptions: txBody.NonCriticalExtensionOptions, HashOfRawBytes: getHash(textualData.BodyBytes, textualData.AuthInfoBytes), } - if txAuthInfo.Tip != nil { - envelope.Tip = txAuthInfo.Tip.Amount - envelope.Tipper = txAuthInfo.Tip.Tipper - } + // Find all other tx signers than the current signer. In the case where our // Textual signer is one key of a multisig, then otherSigners will include // the multisig pubkey. @@ -244,12 +240,6 @@ func (vr txValueRenderer) Parse(ctx context.Context, screens []Screen) (protoref Granter: envelope.FeeGranter, }, } - if envelope.Tip != nil { - authInfo.Tip = &txv1beta1.Tip{ - Amount: envelope.Tip, - Tipper: envelope.Tipper, - } - } // Figure out the signers in the correct order. signers, err := getSigners(txBody, authInfo) @@ -282,11 +272,12 @@ func (vr txValueRenderer) Parse(ctx context.Context, screens []Screen) (protoref // Note that we might not always get back the exact bodyBz and authInfoBz // that was passed into, because protobuf is not deterministic. // In tests, we don't check bytes equality, but protobuf object equality. - bodyBz, err := proto.Marshal(txBody) + protov2MarshalOpts := proto.MarshalOptions{Deterministic: true} + bodyBz, err := protov2MarshalOpts.Marshal(txBody) if err != nil { return nilValue, err } - authInfoBz, err := proto.Marshal(authInfo) + authInfoBz, err := protov2MarshalOpts.Marshal(authInfo) if err != nil { return nilValue, err } diff --git a/x/tx/signing/textual/tx_test.go b/x/tx/signing/textual/tx_test.go index 1b63b8c8c907..47acb0a8bec8 100644 --- a/x/tx/signing/textual/tx_test.go +++ b/x/tx/signing/textual/tx_test.go @@ -20,7 +20,6 @@ import ( _ "cosmossdk.io/api/cosmos/crypto/secp256k1" _ "cosmossdk.io/api/cosmos/gov/v1" txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" - "cosmossdk.io/x/tx/signing" "cosmossdk.io/x/tx/signing/textual" "cosmossdk.io/x/tx/signing/textual/internal/textualpb" @@ -118,6 +117,7 @@ func TestTxJSONTestcases(t *testing.T) { // createTextualData creates a Textual data give then JSON // test case. func createTextualData(t *testing.T, jsonTx txJSONTestTx, jsonSignerData json.RawMessage) (*txv1beta1.TxBody, []byte, *txv1beta1.AuthInfo, []byte, signing.SignerData) { + t.Helper() body := &txv1beta1.TxBody{} authInfo := &txv1beta1.AuthInfo{} protoSignerData := &textualpb.SignerData{} diff --git a/x/upgrade/CHANGELOG.md b/x/upgrade/CHANGELOG.md index 78c064a6f508..debcf3528da5 100644 --- a/x/upgrade/CHANGELOG.md +++ b/x/upgrade/CHANGELOG.md @@ -25,11 +25,53 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +## [v0.1.4](https://github.com/cosmos/cosmos-sdk/releases/tag/x/upgrade/v0.1.4) - 2024-07-15 + +### Improvements + +* [#20771](https://github.com/cosmos/cosmos-sdk/pull/20771) Create upgrade directory only when necessary (upgrade flow and not init flow). + +## [v0.1.3](https://github.com/cosmos/cosmos-sdk/releases/tag/x/upgrade/v0.1.3) - 2024-06-04 + +* (deps) [#20530](https://github.com/cosmos/cosmos-sdk/pull/20530) Bump vulnerable `github.com/hashicorp/go-getter` to v1.7.4. + * In theory, we do not need a new release for this, but we are doing it as `x/upgrade` is used in Cosmovisor. + +## [v0.1.2](https://github.com/cosmos/cosmos-sdk/releases/tag/x/upgrade/v0.1.2) - 2024-04-22 + +### Improvements + +* (deps) [#19810](https://github.com/cosmos/cosmos-sdk/pull/19810) Upgrade SDK version due to prometheus breaking change. +* (deps) [#19810](https://github.com/cosmos/cosmos-sdk/pull/19810) Bump `cosmossdk.io/store` to v1.1.0. + +### Bug Fixes + +* [#19706](https://github.com/cosmos/cosmos-sdk/pull/19706) Stop treating inline JSON as a URL. + +## [v0.1.1](https://github.com/cosmos/cosmos-sdk/releases/tag/x/upgrade/v0.1.1) - 2023-12-11 + +### Improvements + +* [#18470](https://github.com/cosmos/cosmos-sdk/pull/18470) Improve go-getter settings. + +## [v0.1.0](https://github.com/cosmos/cosmos-sdk/releases/tag/x/upgrade/v0.1.0) - 2023-11-07 + ### Features * [#14880](https://github.com/cosmos/cosmos-sdk/pull/14880) Switch from using gov v1beta1 to gov v1 in upgrade CLIs. * [#14764](https://github.com/cosmos/cosmos-sdk/pull/14764) The `x/upgrade` module is extracted to have a separate go.mod file which allows it be a standalone module. -### API Breaking +### Improvements + +* [#16903](https://github.com/cosmos/cosmos-sdk/pull/16903) Use AutoCLI for upgrade querying commands. + +### API Breaking Changes + +* [#16845](https://github.com/cosmos/cosmos-sdk/pull/16845) Remove gov v1beta1 handler. Use gov v1 proposals directly, or replicate the handler in your app. +* [#16511](https://github.com/cosmos/cosmos-sdk/pull/16511) `BinaryDownloadURLMap.ValidateBasic()` and `BinaryDownloadURLMap.CheckURLs` now both take a checksum parameter when willing to ensure a checksum is provided for each URL. +* [#16511](https://github.com/cosmos/cosmos-sdk/pull/16511) `plan.DownloadURLWithChecksum` has been renamed to `plan.DownloadURL` and does not validate the URL anymore. Call `plan.ValidateURL` before calling `plan.DownloadURL` to validate the URL. +* [#16511](https://github.com/cosmos/cosmos-sdk/pull/16511) `plan.DownloadUpgrade` does not validate URL anymore. Call `plan.ValidateURL` before calling `plan.DownloadUpgrade` to validate the URL. +* [#16227](https://github.com/cosmos/cosmos-sdk/issues/16227) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey`, methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context` and return an `error`. `UpgradeHandler` now receives a `context.Context`. `GetUpgradedClient`, `GetUpgradedConsensusState`, `GetUpgradePlan` now return a specific error for "not found". + +### Bug Fixes -* (x/upgrade) [#16227](https://github.com/cosmos/cosmos-sdk/issues/16227) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey`, methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context` and return an `error`. `UpgradeHandler` now receives a `context.Context`. `GetUpgradedClient`, `GetUpgradedConsensusState`, `GetUpgradePlan` now return a specific error for "not found". +* [#17421](https://github.com/cosmos/cosmos-sdk/pull/17421) Replace `BeginBlock` by `PreBlock`. Read [ADR-68](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-068-preblock.md) for more information. diff --git a/x/upgrade/README.md b/x/upgrade/README.md index 698e822ba866..0d98c1601e50 100644 --- a/x/upgrade/README.md +++ b/x/upgrade/README.md @@ -8,7 +8,7 @@ sidebar_position: 1 `x/upgrade` is an implementation of a Cosmos SDK module that facilitates smoothly upgrading a live Cosmos chain to a new (breaking) software version. It accomplishes this by -providing a `BeginBlocker` hook that prevents the blockchain state machine from +providing a `PreBlocker` hook that prevents the blockchain state machine from proceeding once a pre-defined upgrade block height has been reached. The module does not prescribe anything regarding how governance decides to do an diff --git a/x/upgrade/abci.go b/x/upgrade/abci.go index dafa09720800..3018fa16ef3d 100644 --- a/x/upgrade/abci.go +++ b/x/upgrade/abci.go @@ -4,8 +4,8 @@ import ( "context" "errors" "fmt" - "time" + "cosmossdk.io/core/appmodule" storetypes "cosmossdk.io/store/types" "cosmossdk.io/x/upgrade/keeper" "cosmossdk.io/x/upgrade/types" @@ -14,7 +14,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) -// BeginBlock will check if there is a scheduled plan and if it is ready to be executed. +// PreBlocker will check if there is a scheduled plan and if it is ready to be executed. // If the current height is in the provided set of heights to skip, it will skip and clear the upgrade plan. // If it is ready, it will execute it if the handler is installed, and panic/abort otherwise. // If the plan is not ready, it will ensure the handler is not registered too early (and abort otherwise). @@ -22,14 +22,14 @@ import ( // The purpose is to ensure the binary is switched EXACTLY at the desired block, and to allow // a migration to be executed if needed upon this switch (migration defined in the new binary) // skipUpgradeHeightArray is a set of block heights for which the upgrade must be skipped -func BeginBlocker(ctx context.Context, k *keeper.Keeper) error { - defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) +func PreBlocker(ctx context.Context, k *keeper.Keeper) (appmodule.ResponsePreBlock, error) { + defer telemetry.ModuleMeasureSince(types.ModuleName, telemetry.Now(), telemetry.MetricKeyBeginBlocker) sdkCtx := sdk.UnwrapSDKContext(ctx) blockHeight := sdkCtx.HeaderInfo().Height plan, err := k.GetUpgradePlan(ctx) if err != nil && !errors.Is(err, types.ErrNoUpgradePlanFound) { - return err + return nil, err } found := err == nil @@ -43,7 +43,7 @@ func BeginBlocker(ctx context.Context, k *keeper.Keeper) error { if !found || !plan.ShouldExecute(blockHeight) || (plan.ShouldExecute(blockHeight) && k.IsSkipHeight(blockHeight)) { lastAppliedPlan, _, err := k.GetLastCompletedUpgrade(ctx) if err != nil { - return err + return nil, err } if lastAppliedPlan != "" && !k.HasHandler(lastAppliedPlan) { @@ -54,13 +54,15 @@ func BeginBlocker(ctx context.Context, k *keeper.Keeper) error { appVersion = cp.Version.App } - return fmt.Errorf("wrong app version %d, upgrade handler is missing for %s upgrade plan", appVersion, lastAppliedPlan) + return nil, fmt.Errorf("wrong app version %d, upgrade handler is missing for %s upgrade plan", appVersion, lastAppliedPlan) } } } if !found { - return nil + return &sdk.ResponsePreBlock{ + ConsensusParamsChanged: false, + }, nil } logger := k.Logger(ctx) @@ -73,7 +75,12 @@ func BeginBlocker(ctx context.Context, k *keeper.Keeper) error { logger.Info(skipUpgradeMsg) // Clear the upgrade plan at current height - return k.ClearUpgradePlan(ctx) + if err := k.ClearUpgradePlan(ctx); err != nil { + return nil, err + } + return &sdk.ResponsePreBlock{ + ConsensusParamsChanged: false, + }, nil } // Prepare shutdown if we don't have an upgrade handler for this upgrade name (meaning this software is out of date) @@ -82,20 +89,27 @@ func BeginBlocker(ctx context.Context, k *keeper.Keeper) error { // store migrations. err := k.DumpUpgradeInfoToDisk(blockHeight, plan) if err != nil { - return fmt.Errorf("unable to write upgrade info to filesystem: %s", err.Error()) + return nil, fmt.Errorf("unable to write upgrade info to filesystem: %w", err) } upgradeMsg := BuildUpgradeNeededMsg(plan) logger.Error(upgradeMsg) // Returning an error will end up in a panic - return fmt.Errorf(upgradeMsg) + return nil, errors.New(upgradeMsg) } // We have an upgrade handler for this upgrade name, so apply the upgrade logger.Info(fmt.Sprintf("applying upgrade \"%s\" at %s", plan.Name, plan.DueAt())) sdkCtx = sdkCtx.WithBlockGasMeter(storetypes.NewInfiniteGasMeter()) - return k.ApplyUpgrade(sdkCtx, plan) + if err := k.ApplyUpgrade(sdkCtx, plan); err != nil { + return nil, err + } + return &sdk.ResponsePreBlock{ + // the consensus parameters might be modified in the migration, + // refresh the consensus parameters in context. + ConsensusParamsChanged: true, + }, nil } // if we have a pending upgrade, but it is not yet time, make sure we did not @@ -105,10 +119,11 @@ func BeginBlocker(ctx context.Context, k *keeper.Keeper) error { logger.Error(downgradeMsg) // Returning an error will end up in a panic - return fmt.Errorf(downgradeMsg) + return nil, errors.New(downgradeMsg) } - - return nil + return &sdk.ResponsePreBlock{ + ConsensusParamsChanged: false, + }, nil } // BuildUpgradeNeededMsg prints the message that notifies that an upgrade is needed. diff --git a/x/upgrade/abci_test.go b/x/upgrade/abci_test.go index 0a9f31761705..fa86829005cb 100644 --- a/x/upgrade/abci_test.go +++ b/x/upgrade/abci_test.go @@ -7,12 +7,15 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "cosmossdk.io/core/appmodule" "cosmossdk.io/core/header" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" - "github.com/stretchr/testify/require" - "github.com/stretchr/testify/suite" + "cosmossdk.io/x/upgrade" + "cosmossdk.io/x/upgrade/keeper" + "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/baseapp" addresscodec "github.com/cosmos/cosmos-sdk/codec/address" @@ -24,31 +27,92 @@ import ( moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - - "cosmossdk.io/x/upgrade" - "cosmossdk.io/x/upgrade/keeper" - "cosmossdk.io/x/upgrade/types" ) type TestSuite struct { - suite.Suite - - module appmodule.HasBeginBlocker - keeper *keeper.Keeper - handler govtypesv1beta1.Handler - ctx sdk.Context - baseApp *baseapp.BaseApp - encCfg moduletestutil.TestEncodingConfig + preModule appmodule.HasPreBlocker + keeper *keeper.Keeper + ctx sdk.Context + baseApp *baseapp.BaseApp + encCfg moduletestutil.TestEncodingConfig } -var s TestSuite +func (s *TestSuite) VerifyDoUpgrade(t *testing.T) { + t.Helper() + t.Log("Verify that a panic happens at the upgrade height") + newCtx := s.ctx.WithHeaderInfo(header.Info{Height: s.ctx.HeaderInfo().Height + 1, Time: time.Now()}) + + _, err := s.preModule.PreBlock(newCtx) + require.ErrorContains(t, err, "UPGRADE \"test\" NEEDED at height: 11: ") + + t.Log("Verify that the upgrade can be successfully applied with a handler") + s.keeper.SetUpgradeHandler("test", func(ctx context.Context, plan types.Plan, vm module.VersionMap) (module.VersionMap, error) { + return vm, nil + }) + + _, err = s.preModule.PreBlock(newCtx) + require.NoError(t, err) + + s.VerifyCleared(t, newCtx) +} + +func (s *TestSuite) VerifyDoUpgradeWithCtx(t *testing.T, newCtx sdk.Context, proposalName string) { + t.Helper() + t.Log("Verify that a panic happens at the upgrade height") + + _, err := s.preModule.PreBlock(newCtx) + require.ErrorContains(t, err, "UPGRADE \""+proposalName+"\" NEEDED at height: ") + + t.Log("Verify that the upgrade can be successfully applied with a handler") + s.keeper.SetUpgradeHandler(proposalName, func(ctx context.Context, plan types.Plan, vm module.VersionMap) (module.VersionMap, error) { + return vm, nil + }) + + _, err = s.preModule.PreBlock(newCtx) + require.NoError(t, err) + + s.VerifyCleared(t, newCtx) +} + +func (s *TestSuite) VerifyCleared(t *testing.T, newCtx sdk.Context) { + t.Helper() + t.Log("Verify that the upgrade plan has been cleared") + _, err := s.keeper.GetUpgradePlan(newCtx) + require.ErrorIs(t, err, types.ErrNoUpgradePlanFound) +} + +func (s *TestSuite) VerifyNotDone(t *testing.T, newCtx sdk.Context, name string) { + t.Helper() + t.Log("Verify that upgrade was not done") + height, err := s.keeper.GetDoneHeight(newCtx, name) + require.Zero(t, height) + require.NoError(t, err) +} + +func (s *TestSuite) VerifyDone(t *testing.T, newCtx sdk.Context, name string) { + t.Helper() + t.Log("Verify that the upgrade plan has been executed") + height, err := s.keeper.GetDoneHeight(newCtx, name) + require.NotZero(t, height) + require.NoError(t, err) +} + +func (s *TestSuite) VerifySet(t *testing.T, skipUpgradeHeights map[int64]bool) { + t.Helper() + t.Log("Verify if the skip upgrade has been set") + + for k := range skipUpgradeHeights { + require.True(t, s.keeper.IsSkipHeight(k)) + } +} func setupTest(t *testing.T, height int64, skip map[int64]bool) *TestSuite { + t.Helper() + s := TestSuite{} s.encCfg = moduletestutil.MakeTestEncodingConfig(upgrade.AppModuleBasic{}) key := storetypes.NewKVStoreKey(types.StoreKey) storeService := runtime.NewKVStoreService(key) - testCtx := testutil.DefaultContextWithDB(s.T(), key, storetypes.NewTransientStoreKey("transient_test")) + testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) s.baseApp = baseapp.NewBaseApp( "upgrade", @@ -62,22 +126,13 @@ func setupTest(t *testing.T, height int64, skip map[int64]bool) *TestSuite { s.ctx = testCtx.Ctx.WithHeaderInfo(header.Info{Time: time.Now(), Height: height}) - s.module = upgrade.NewAppModule(s.keeper, addresscodec.NewBech32Codec("cosmos")) - s.handler = upgrade.NewSoftwareUpgradeProposalHandler(s.keeper) + s.preModule = upgrade.NewAppModule(s.keeper, addresscodec.NewBech32Codec("cosmos")) return &s } -func TestRequireName(t *testing.T) { - s := setupTest(t, 10, map[int64]bool{}) - - err := s.handler(s.ctx, &types.SoftwareUpgradeProposal{Title: "prop", Plan: types.Plan{}}) //nolint:staticcheck // we're testing deprecated code - require.Error(t, err) - require.True(t, errors.Is(sdkerrors.ErrInvalidRequest, err), err) -} - func TestRequireFutureBlock(t *testing.T) { s := setupTest(t, 10, map[int64]bool{}) - err := s.handler(s.ctx, &types.SoftwareUpgradeProposal{Title: "prop", Plan: types.Plan{Name: "test", Height: s.ctx.HeaderInfo().Height - 1}}) //nolint:staticcheck // we're testing deprecated code + err := s.keeper.ScheduleUpgrade(s.ctx, types.Plan{Name: "test", Height: s.ctx.HeaderInfo().Height - 1}) require.Error(t, err) require.True(t, errors.Is(sdkerrors.ErrInvalidRequest, err), err) } @@ -85,56 +140,21 @@ func TestRequireFutureBlock(t *testing.T) { func TestDoHeightUpgrade(t *testing.T) { s := setupTest(t, 10, map[int64]bool{}) t.Log("Verify can schedule an upgrade") - err := s.handler(s.ctx, &types.SoftwareUpgradeProposal{Title: "prop", Plan: types.Plan{Name: "test", Height: s.ctx.HeaderInfo().Height + 1}}) //nolint:staticcheck // we're testing deprecated code + err := s.keeper.ScheduleUpgrade(s.ctx, types.Plan{Name: "test", Height: s.ctx.HeaderInfo().Height + 1}) require.NoError(t, err) - VerifyDoUpgrade(t) + s.VerifyDoUpgrade(t) } func TestCanOverwriteScheduleUpgrade(t *testing.T) { s := setupTest(t, 10, map[int64]bool{}) t.Log("Can overwrite plan") - err := s.handler(s.ctx, &types.SoftwareUpgradeProposal{Title: "prop", Plan: types.Plan{Name: "bad_test", Height: s.ctx.HeaderInfo().Height + 10}}) //nolint:staticcheck // we're testing deprecated code - require.NoError(t, err) - err = s.handler(s.ctx, &types.SoftwareUpgradeProposal{Title: "prop", Plan: types.Plan{Name: "test", Height: s.ctx.HeaderInfo().Height + 1}}) //nolint:staticcheck // we're testing deprecated code - require.NoError(t, err) - - VerifyDoUpgrade(t) -} - -func VerifyDoUpgrade(t *testing.T) { - t.Log("Verify that a panic happens at the upgrade height") - newCtx := s.ctx.WithHeaderInfo(header.Info{Height: s.ctx.HeaderInfo().Height + 1, Time: time.Now()}) - - err := s.module.BeginBlock(newCtx) - require.ErrorContains(t, err, "UPGRADE \"test\" NEEDED at height: 11: ") - - t.Log("Verify that the upgrade can be successfully applied with a handler") - s.keeper.SetUpgradeHandler("test", func(ctx context.Context, plan types.Plan, vm module.VersionMap) (module.VersionMap, error) { - return vm, nil - }) - - err = s.module.BeginBlock(newCtx) + err := s.keeper.ScheduleUpgrade(s.ctx, types.Plan{Name: "bad_test", Height: s.ctx.HeaderInfo().Height + 10}) require.NoError(t, err) - - VerifyCleared(t, newCtx) -} - -func VerifyDoUpgradeWithCtx(t *testing.T, newCtx sdk.Context, proposalName string) { - t.Log("Verify that a panic happens at the upgrade height") - - err := s.module.BeginBlock(newCtx) - require.ErrorContains(t, err, "UPGRADE \""+proposalName+"\" NEEDED at height: ") - - t.Log("Verify that the upgrade can be successfully applied with a handler") - s.keeper.SetUpgradeHandler(proposalName, func(ctx context.Context, plan types.Plan, vm module.VersionMap) (module.VersionMap, error) { - return vm, nil - }) - - err = s.module.BeginBlock(newCtx) + err = s.keeper.ScheduleUpgrade(s.ctx, types.Plan{Name: "test", Height: s.ctx.HeaderInfo().Height + 1}) require.NoError(t, err) - VerifyCleared(t, newCtx) + s.VerifyDoUpgrade(t) } func TestHaltIfTooNew(t *testing.T) { @@ -147,55 +167,47 @@ func TestHaltIfTooNew(t *testing.T) { }) newCtx := s.ctx.WithHeaderInfo(header.Info{Height: s.ctx.HeaderInfo().Height + 1, Time: time.Now()}) - - err := s.module.BeginBlock(newCtx) + _, err := s.preModule.PreBlock(newCtx) require.NoError(t, err) require.Equal(t, 0, called) t.Log("Verify we error if we have a registered handler ahead of time") - err = s.handler(s.ctx, &types.SoftwareUpgradeProposal{Title: "prop", Plan: types.Plan{Name: "future", Height: s.ctx.HeaderInfo().Height + 3}}) //nolint:staticcheck // we're testing deprecated code + err = s.keeper.ScheduleUpgrade(s.ctx, types.Plan{Name: "future", Height: s.ctx.HeaderInfo().Height + 3}) require.NoError(t, err) - - err = s.module.BeginBlock(newCtx) + _, err = s.preModule.PreBlock(newCtx) require.EqualError(t, err, "BINARY UPDATED BEFORE TRIGGER! UPGRADE \"future\" - in binary but not executed on chain. Downgrade your binary") require.Equal(t, 0, called) t.Log("Verify we no longer panic if the plan is on time") futCtx := s.ctx.WithHeaderInfo(header.Info{Height: s.ctx.HeaderInfo().Height + 3, Time: time.Now()}) - err = s.module.BeginBlock(futCtx) + _, err = s.preModule.PreBlock(futCtx) require.NoError(t, err) require.Equal(t, 1, called) - VerifyCleared(t, futCtx) -} - -func VerifyCleared(t *testing.T, newCtx sdk.Context) { - t.Log("Verify that the upgrade plan has been cleared") - _, err := s.keeper.GetUpgradePlan(newCtx) - require.ErrorIs(t, err, types.ErrNoUpgradePlanFound) + s.VerifyCleared(t, futCtx) } func TestCanClear(t *testing.T) { s := setupTest(t, 10, map[int64]bool{}) t.Log("Verify upgrade is scheduled") - err := s.handler(s.ctx, &types.SoftwareUpgradeProposal{Title: "prop", Plan: types.Plan{Name: "test", Height: s.ctx.HeaderInfo().Height + 100}}) //nolint:staticcheck // we're testing deprecated code + err := s.keeper.ScheduleUpgrade(s.ctx, types.Plan{Name: "test", Height: s.ctx.HeaderInfo().Height + 100}) require.NoError(t, err) - err = s.handler(s.ctx, &types.CancelSoftwareUpgradeProposal{Title: "cancel"}) //nolint:staticcheck // we're testing deprecated code + err = s.keeper.ClearUpgradePlan(s.ctx) require.NoError(t, err) - VerifyCleared(t, s.ctx) + s.VerifyCleared(t, s.ctx) } func TestCantApplySameUpgradeTwice(t *testing.T) { s := setupTest(t, 10, map[int64]bool{}) height := s.ctx.HeaderInfo().Height + 1 - err := s.handler(s.ctx, &types.SoftwareUpgradeProposal{Title: "prop", Plan: types.Plan{Name: "test", Height: height}}) //nolint:staticcheck // we're testing deprecated code + err := s.keeper.ScheduleUpgrade(s.ctx, types.Plan{Name: "test", Height: height}) require.NoError(t, err) - VerifyDoUpgrade(t) + s.VerifyDoUpgrade(t) t.Log("Verify an executed upgrade \"test\" can't be rescheduled") - err = s.handler(s.ctx, &types.SoftwareUpgradeProposal{Title: "prop", Plan: types.Plan{Name: "test", Height: height}}) //nolint:staticcheck // we're testing deprecated code + err = s.keeper.ScheduleUpgrade(s.ctx, types.Plan{Name: "test", Height: height}) require.Error(t, err) require.True(t, errors.Is(sdkerrors.ErrInvalidRequest, err), err) } @@ -203,7 +215,7 @@ func TestCantApplySameUpgradeTwice(t *testing.T) { func TestNoSpuriousUpgrades(t *testing.T) { s := setupTest(t, 10, map[int64]bool{}) t.Log("Verify that no upgrade panic is triggered in the BeginBlocker when we haven't scheduled an upgrade") - err := s.module.BeginBlock(s.ctx) + _, err := s.preModule.PreBlock(s.ctx) require.NoError(t, err) } @@ -212,33 +224,11 @@ func TestPlanStringer(t *testing.T) { require.Equal(t, `name:"test" time: height:100 `, (&types.Plan{Name: "test", Height: 100, Info: ""}).String()) } -func VerifyNotDone(t *testing.T, newCtx sdk.Context, name string) { - t.Log("Verify that upgrade was not done") - height, err := s.keeper.GetDoneHeight(newCtx, name) - require.Zero(t, height) - require.NoError(t, err) -} - -func VerifyDone(t *testing.T, newCtx sdk.Context, name string) { - t.Log("Verify that the upgrade plan has been executed") - height, err := s.keeper.GetDoneHeight(newCtx, name) - require.NotZero(t, height) - require.NoError(t, err) -} - -func VerifySet(t *testing.T, skipUpgradeHeights map[int64]bool) { - t.Log("Verify if the skip upgrade has been set") - - for k := range skipUpgradeHeights { - require.True(t, s.keeper.IsSkipHeight(k)) - } -} - func TestContains(t *testing.T) { var skipOne int64 = 11 s := setupTest(t, 10, map[int64]bool{skipOne: true}) - VerifySet(t, map[int64]bool{skipOne: true}) + s.VerifySet(t, map[int64]bool{skipOne: true}) t.Log("case where array contains the element") require.True(t, s.keeper.IsSkipHeight(11)) @@ -255,29 +245,29 @@ func TestSkipUpgradeSkippingAll(t *testing.T) { newCtx := s.ctx - err := s.handler(s.ctx, &types.SoftwareUpgradeProposal{Title: "prop", Plan: types.Plan{Name: "test", Height: skipOne}}) //nolint:staticcheck // we're testing deprecated code + err := s.keeper.ScheduleUpgrade(s.ctx, types.Plan{Name: "test", Height: skipOne}) require.NoError(t, err) t.Log("Verify if skip upgrade flag clears upgrade plan in both cases") - VerifySet(t, map[int64]bool{skipOne: true, skipTwo: true}) + s.VerifySet(t, map[int64]bool{skipOne: true, skipTwo: true}) newCtx = newCtx.WithHeaderInfo(header.Info{Height: skipOne}) - err = s.module.BeginBlock(newCtx) + _, err = s.preModule.PreBlock(newCtx) require.NoError(t, err) t.Log("Verify a second proposal also is being cleared") - err = s.handler(s.ctx, &types.SoftwareUpgradeProposal{Title: "prop2", Plan: types.Plan{Name: "test2", Height: skipTwo}}) //nolint:staticcheck // we're testing deprecated code + err = s.keeper.ScheduleUpgrade(s.ctx, types.Plan{Name: "test2", Height: skipTwo}) require.NoError(t, err) newCtx = newCtx.WithHeaderInfo(header.Info{Height: skipTwo}) - err = s.module.BeginBlock(newCtx) + _, err = s.preModule.PreBlock(newCtx) require.NoError(t, err) // To ensure verification is being done only after both upgrades are cleared t.Log("Verify if both proposals are cleared") - VerifyCleared(t, s.ctx) - VerifyNotDone(t, s.ctx, "test") - VerifyNotDone(t, s.ctx, "test2") + s.VerifyCleared(t, s.ctx) + s.VerifyNotDone(t, s.ctx, "test") + s.VerifyNotDone(t, s.ctx, "test2") } func TestUpgradeSkippingOne(t *testing.T) { @@ -289,27 +279,27 @@ func TestUpgradeSkippingOne(t *testing.T) { newCtx := s.ctx - err := s.handler(s.ctx, &types.SoftwareUpgradeProposal{Title: "prop", Plan: types.Plan{Name: "test", Height: skipOne}}) //nolint:staticcheck // we're testing deprecated code + err := s.keeper.ScheduleUpgrade(s.ctx, types.Plan{Name: "test", Height: skipOne}) require.NoError(t, err) t.Log("Verify if skip upgrade flag clears upgrade plan in one case and does upgrade on another") - VerifySet(t, map[int64]bool{skipOne: true}) + s.VerifySet(t, map[int64]bool{skipOne: true}) // Setting block height of proposal test newCtx = newCtx.WithHeaderInfo(header.Info{Height: skipOne}) - err = s.module.BeginBlock(newCtx) + _, err = s.preModule.PreBlock(newCtx) require.NoError(t, err) t.Log("Verify the second proposal is not skipped") - err = s.handler(s.ctx, &types.SoftwareUpgradeProposal{Title: "prop2", Plan: types.Plan{Name: "test2", Height: skipTwo}}) //nolint:staticcheck // we're testing deprecated code + err = s.keeper.ScheduleUpgrade(s.ctx, types.Plan{Name: "test2", Height: skipTwo}) require.NoError(t, err) // Setting block height of proposal test2 newCtx = newCtx.WithHeaderInfo(header.Info{Height: skipTwo}) - VerifyDoUpgradeWithCtx(t, newCtx, "test2") + s.VerifyDoUpgradeWithCtx(t, newCtx, "test2") t.Log("Verify first proposal is cleared and second is done") - VerifyNotDone(t, s.ctx, "test") - VerifyDone(t, s.ctx, "test2") + s.VerifyNotDone(t, s.ctx, "test") + s.VerifyDone(t, s.ctx, "test2") } func TestUpgradeSkippingOnlyTwo(t *testing.T) { @@ -322,49 +312,48 @@ func TestUpgradeSkippingOnlyTwo(t *testing.T) { newCtx := s.ctx - err := s.handler(s.ctx, &types.SoftwareUpgradeProposal{Title: "prop", Plan: types.Plan{Name: "test", Height: skipOne}}) //nolint:staticcheck // we're testing deprecated code + err := s.keeper.ScheduleUpgrade(s.ctx, types.Plan{Name: "test", Height: skipOne}) require.NoError(t, err) t.Log("Verify if skip upgrade flag clears upgrade plan in both cases and does third upgrade") - VerifySet(t, map[int64]bool{skipOne: true, skipTwo: true}) + s.VerifySet(t, map[int64]bool{skipOne: true, skipTwo: true}) // Setting block height of proposal test newCtx = newCtx.WithHeaderInfo(header.Info{Height: skipOne}) - err = s.module.BeginBlock(newCtx) + _, err = s.preModule.PreBlock(newCtx) require.NoError(t, err) // A new proposal with height in skipUpgradeHeights - err = s.handler(s.ctx, &types.SoftwareUpgradeProposal{Title: "prop2", Plan: types.Plan{Name: "test2", Height: skipTwo}}) //nolint:staticcheck // we're testing deprecated code + err = s.keeper.ScheduleUpgrade(s.ctx, types.Plan{Name: "test2", Height: skipTwo}) require.NoError(t, err) // Setting block height of proposal test2 newCtx = newCtx.WithHeaderInfo(header.Info{Height: skipTwo}) - err = s.module.BeginBlock(newCtx) + _, err = s.preModule.PreBlock(newCtx) require.NoError(t, err) t.Log("Verify a new proposal is not skipped") - err = s.handler(s.ctx, &types.SoftwareUpgradeProposal{Title: "prop3", Plan: types.Plan{Name: "test3", Height: skipThree}}) //nolint:staticcheck // we're testing deprecated code + err = s.keeper.ScheduleUpgrade(s.ctx, types.Plan{Name: "test3", Height: skipThree}) require.NoError(t, err) newCtx = newCtx.WithHeaderInfo(header.Info{Height: skipThree}) - VerifyDoUpgradeWithCtx(t, newCtx, "test3") + s.VerifyDoUpgradeWithCtx(t, newCtx, "test3") t.Log("Verify two proposals are cleared and third is done") - VerifyNotDone(t, s.ctx, "test") - VerifyNotDone(t, s.ctx, "test2") - VerifyDone(t, s.ctx, "test3") + s.VerifyNotDone(t, s.ctx, "test") + s.VerifyNotDone(t, s.ctx, "test2") + s.VerifyDone(t, s.ctx, "test3") } func TestUpgradeWithoutSkip(t *testing.T) { s := setupTest(t, 10, map[int64]bool{}) newCtx := s.ctx.WithHeaderInfo(header.Info{Height: s.ctx.HeaderInfo().Height + 1, Time: time.Now()}) - err := s.handler(s.ctx, &types.SoftwareUpgradeProposal{Title: "prop", Plan: types.Plan{Name: "test", Height: s.ctx.HeaderInfo().Height + 1}}) //nolint:staticcheck // we're testing deprecated code + err := s.keeper.ScheduleUpgrade(s.ctx, types.Plan{Name: "test", Height: s.ctx.HeaderInfo().Height + 1}) require.NoError(t, err) t.Log("Verify if upgrade happens without skip upgrade") - - err = s.module.BeginBlock(newCtx) + _, err = s.preModule.PreBlock(newCtx) require.ErrorContains(t, err, "UPGRADE \"test\" NEEDED at height:") - VerifyDoUpgrade(t) - VerifyDone(t, s.ctx, "test") + s.VerifyDoUpgrade(t) + s.VerifyDone(t, s.ctx, "test") } func TestDumpUpgradeInfoToFile(t *testing.T) { @@ -422,7 +411,7 @@ func TestBinaryVersion(t *testing.T) { return vm, nil }) - err := s.handler(s.ctx, &types.SoftwareUpgradeProposal{Title: "Upgrade test", Plan: types.Plan{Name: "test0", Height: s.ctx.HeaderInfo().Height + 2}}) //nolint:staticcheck // we're testing deprecated code + err := s.keeper.ScheduleUpgrade(s.ctx, types.Plan{Name: "test0", Height: s.ctx.HeaderInfo().Height + 2}) require.NoError(t, err) newCtx := s.ctx.WithHeaderInfo(header.Info{Height: 12}) @@ -438,7 +427,7 @@ func TestBinaryVersion(t *testing.T) { { "test panic: upgrade needed", func() sdk.Context { - err := s.handler(s.ctx, &types.SoftwareUpgradeProposal{Title: "Upgrade test", Plan: types.Plan{Name: "test2", Height: 13}}) //nolint:staticcheck // we're testing deprecated code + err := s.keeper.ScheduleUpgrade(s.ctx, types.Plan{Name: "test2", Height: 13}) require.NoError(t, err) newCtx := s.ctx.WithHeaderInfo(header.Info{Height: 13}) @@ -450,7 +439,7 @@ func TestBinaryVersion(t *testing.T) { for _, tc := range testCases { ctx := tc.preRun() - err := s.module.BeginBlock(ctx) + _, err := s.preModule.PreBlock(ctx) if tc.expectError { require.Error(t, err) } else { @@ -465,18 +454,16 @@ func TestDowngradeVerification(t *testing.T) { encCfg := moduletestutil.MakeTestEncodingConfig(upgrade.AppModuleBasic{}) key := storetypes.NewKVStoreKey(types.StoreKey) storeService := runtime.NewKVStoreService(key) - testCtx := testutil.DefaultContextWithDB(s.T(), key, storetypes.NewTransientStoreKey("transient_test")) + testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) ctx := testCtx.Ctx.WithHeaderInfo(header.Info{Time: time.Now(), Height: 10}) skip := map[int64]bool{} - tempDir := t.TempDir() - k := keeper.NewKeeper(skip, storeService, encCfg.Codec, tempDir, nil, authtypes.NewModuleAddress(govtypes.ModuleName).String()) + k := keeper.NewKeeper(skip, storeService, encCfg.Codec, t.TempDir(), nil, authtypes.NewModuleAddress(govtypes.ModuleName).String()) m := upgrade.NewAppModule(k, addresscodec.NewBech32Codec("cosmos")) - handler := upgrade.NewSoftwareUpgradeProposalHandler(k) // submit a plan. planName := "downgrade" - err := handler(ctx, &types.SoftwareUpgradeProposal{Title: "test", Plan: types.Plan{Name: planName, Height: ctx.HeaderInfo().Height + 1}}) //nolint:staticcheck // we're testing deprecated code + err := k.ScheduleUpgrade(ctx, types.Plan{Name: planName, Height: ctx.HeaderInfo().Height + 1}) require.NoError(t, err) ctx = ctx.WithHeaderInfo(header.Info{Height: ctx.HeaderInfo().Height + 1}) @@ -486,7 +473,8 @@ func TestDowngradeVerification(t *testing.T) { }) // successful upgrade. - require.NoError(t, m.BeginBlock(ctx)) + _, err = m.PreBlock(ctx) + require.NoError(t, err) ctx = ctx.WithHeaderInfo(header.Info{Height: ctx.HeaderInfo().Height + 1}) testCases := map[string]struct { @@ -502,8 +490,7 @@ func TestDowngradeVerification(t *testing.T) { }, "downgrade with an active plan": { preRun: func(k *keeper.Keeper, ctx sdk.Context, name string) { - handler := upgrade.NewSoftwareUpgradeProposalHandler(k) - err := handler(ctx, &types.SoftwareUpgradeProposal{Title: "test", Plan: types.Plan{Name: "another" + planName, Height: ctx.HeaderInfo().Height + 1}}) //nolint:staticcheck // we're testing deprecated code + err := k.ScheduleUpgrade(ctx, types.Plan{Name: "another" + planName, Height: ctx.HeaderInfo().Height + 1}) require.NoError(t, err, name) }, expectError: true, @@ -517,7 +504,7 @@ func TestDowngradeVerification(t *testing.T) { ctx, _ := ctx.CacheContext() // downgrade. now keeper does not have the handler. - k := keeper.NewKeeper(skip, storeService, encCfg.Codec, tempDir, nil, authtypes.NewModuleAddress(govtypes.ModuleName).String()) + k := keeper.NewKeeper(skip, storeService, encCfg.Codec, t.TempDir(), nil, authtypes.NewModuleAddress(govtypes.ModuleName).String()) m := upgrade.NewAppModule(k, addresscodec.NewBech32Codec("cosmos")) // assertions @@ -533,7 +520,7 @@ func TestDowngradeVerification(t *testing.T) { tc.preRun(k, ctx, name) } - err = m.BeginBlock(ctx) + _, err = m.PreBlock(ctx) if tc.expectError { require.Error(t, err, name) } else { diff --git a/x/upgrade/autocli.go b/x/upgrade/autocli.go new file mode 100644 index 000000000000..45d076c75eda --- /dev/null +++ b/x/upgrade/autocli.go @@ -0,0 +1,63 @@ +package upgrade + +import ( + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + upgradev1beta1 "cosmossdk.io/api/cosmos/upgrade/v1beta1" +) + +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: upgradev1beta1.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "CurrentPlan", + Use: "plan", + Short: "Query the upgrade plan (if one exists)", + Long: "Gets the currently scheduled upgrade plan, if one exists", + }, + { + RpcMethod: "AppliedPlan", + Use: "applied [upgrade-name]", + Short: "Query the block header for height at which a completed upgrade was applied", + Long: "If upgrade-name was previously executed on the chain, this returns the header for the block at which it was applied. This helps a client determine which binary was valid over a given range of blocks, as well as more context to understand past migrations.", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "name"}, + }, + }, + { + RpcMethod: "ModuleVersions", + Use: "module-versions [optional module_name]", + Alias: []string{"module_versions"}, + Short: "Query the list of module versions", + Long: "Gets a list of module names and their respective consensus versions. Following the command with a specific module name will return only that module's information.", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "module_name", Optional: true}, + }, + }, + { + RpcMethod: "Authority", + Use: "authority", + Short: "Get the upgrade authority address", + }, + { + RpcMethod: "UpgradedConsensusState", + Skip: true, // Skipping this command as the query is deprecated. + }, + }, + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: upgradev1beta1.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "SoftwareUpgrade", + Skip: true, // skipped because authority gated + }, + { + RpcMethod: "CancelUpgrade", + Skip: true, // skipped because authority gated + }, + }, + }, + } +} diff --git a/x/upgrade/client/cli/parse.go b/x/upgrade/client/cli/parse.go index 9cb0f3eccde1..8171ba2f4ef7 100644 --- a/x/upgrade/client/cli/parse.go +++ b/x/upgrade/client/cli/parse.go @@ -1,8 +1,9 @@ package cli import ( - "cosmossdk.io/x/upgrade/types" "github.com/spf13/pflag" + + "cosmossdk.io/x/upgrade/types" ) func parsePlan(fs *pflag.FlagSet, name string) (types.Plan, error) { diff --git a/x/upgrade/client/cli/parse_test.go b/x/upgrade/client/cli/parse_test.go index 3a3b38eb4105..d1869f24c2d8 100644 --- a/x/upgrade/client/cli/parse_test.go +++ b/x/upgrade/client/cli/parse_test.go @@ -4,10 +4,11 @@ import ( "strconv" "testing" - addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/stretchr/testify/require" "cosmossdk.io/x/upgrade/types" + + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" ) func TestParsePlan(t *testing.T) { diff --git a/x/upgrade/client/cli/query.go b/x/upgrade/client/cli/query.go deleted file mode 100644 index a8ff931ad2ac..000000000000 --- a/x/upgrade/client/cli/query.go +++ /dev/null @@ -1,157 +0,0 @@ -package cli - -import ( - "fmt" - - "github.com/spf13/cobra" - - "cosmossdk.io/x/upgrade/types" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/types/errors" -) - -// GetQueryCmd returns the parent command for all x/upgrade CLI query commands. -func GetQueryCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: types.ModuleName, - Short: "Querying commands for the upgrade module", - } - - cmd.AddCommand( - GetCurrentPlanCmd(), - GetAppliedPlanCmd(), - GetModuleVersionsCmd(), - ) - - return cmd -} - -// GetCurrentPlanCmd returns the query upgrade plan command. -func GetCurrentPlanCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "plan", - Short: "get upgrade plan (if one exists)", - Long: "Gets the currently scheduled upgrade plan, if one exists", - Args: cobra.ExactArgs(0), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - params := types.QueryCurrentPlanRequest{} - res, err := queryClient.CurrentPlan(cmd.Context(), ¶ms) - if err != nil { - return err - } - - if res.Plan == nil { - return fmt.Errorf("no upgrade scheduled") - } - - return clientCtx.PrintProto(res.GetPlan()) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetAppliedPlanCmd returns information about the block at which a completed -// upgrade was applied. -func GetAppliedPlanCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "applied [upgrade-name]", - Short: "block header for height at which a completed upgrade was applied", - Long: "If upgrade-name was previously executed on the chain, this returns the header for the block at which it was applied.\n" + - "This helps a client determine which binary was valid over a given range of blocks, as well as more context to understand past migrations.", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - ctx := cmd.Context() - params := types.QueryAppliedPlanRequest{Name: args[0]} - res, err := queryClient.AppliedPlan(ctx, ¶ms) - if err != nil { - return err - } - - if res.Height == 0 { - return fmt.Errorf("no upgrade found") - } - - // we got the height, now let's return the headers - node, err := clientCtx.GetNode() - if err != nil { - return err - } - headers, err := node.BlockchainInfo(ctx, res.Height, res.Height) - if err != nil { - return err - } - if len(headers.BlockMetas) == 0 { - return fmt.Errorf("no headers returned for height %d", res.Height) - } - - // always output json as Header is unreable in toml ([]byte is a long list of numbers) - bz, err := clientCtx.LegacyAmino.MarshalJSONIndent(headers.BlockMetas[0], "", " ") - if err != nil { - return err - } - return clientCtx.PrintString(fmt.Sprintf("%s\n", bz)) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetModuleVersionsCmd returns the module version list from state -func GetModuleVersionsCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "module_versions [optional module_name]", - Short: "get the list of module versions", - Long: "Gets a list of module names and their respective consensus versions.\n" + - "Following the command with a specific module name will return only\n" + - "that module's information.", - Args: cobra.MaximumNArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - var params types.QueryModuleVersionsRequest - - if len(args) == 1 { - params = types.QueryModuleVersionsRequest{ModuleName: args[0]} - } else { - params = types.QueryModuleVersionsRequest{} - } - - res, err := queryClient.ModuleVersions(cmd.Context(), ¶ms) - if err != nil { - return err - } - - if res.ModuleVersions == nil { - return errors.ErrNotFound - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/upgrade/client/cli/query_test.go b/x/upgrade/client/cli/query_test.go deleted file mode 100644 index da890878b5be..000000000000 --- a/x/upgrade/client/cli/query_test.go +++ /dev/null @@ -1,177 +0,0 @@ -package cli_test - -import ( - "context" - "fmt" - "io" - "testing" - - rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" - "github.com/stretchr/testify/require" - - "cosmossdk.io/x/upgrade" - upgradecli "cosmossdk.io/x/upgrade/client/cli" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - testutilmod "github.com/cosmos/cosmos-sdk/types/module/testutil" -) - -func TestGetCurrentPlanCmd(t *testing.T) { - encCfg := testutilmod.MakeTestEncodingConfig(upgrade.AppModuleBasic{}) - kr := keyring.NewInMemory(encCfg.Codec) - baseCtx := client.Context{}. - WithKeyring(kr). - WithTxConfig(encCfg.TxConfig). - WithCodec(encCfg.Codec). - WithClient(clitestutil.MockCometRPC{Client: rpcclientmock.Client{}}). - WithAccountRetriever(client.MockAccountRetriever{}). - WithOutput(io.Discard). - WithChainID("test-chain") - - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - name: "json output", - args: []string{fmt.Sprintf("--%s=json", flags.FlagOutput)}, - expCmdOutput: `[--output=json]`, - }, - { - name: "text output", - args: []string{fmt.Sprintf("--%s=text", flags.FlagOutput)}, - expCmdOutput: `[--output=text]`, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - ctx := svrcmd.CreateExecuteContext(context.Background()) - - cmd := upgradecli.GetCurrentPlanCmd() - cmd.SetOut(io.Discard) - require.NotNil(t, cmd) - - cmd.SetContext(ctx) - cmd.SetArgs(tc.args) - - require.NoError(t, client.SetCmdClientContextHandler(baseCtx, cmd)) - - require.Contains(t, fmt.Sprint(cmd), "plan [] [] get upgrade plan (if one exists)") - require.Contains(t, fmt.Sprint(cmd), tc.expCmdOutput) - }) - } -} - -func TestGetAppliedPlanCmd(t *testing.T) { - encCfg := testutilmod.MakeTestEncodingConfig(upgrade.AppModuleBasic{}) - kr := keyring.NewInMemory(encCfg.Codec) - baseCtx := client.Context{}. - WithKeyring(kr). - WithTxConfig(encCfg.TxConfig). - WithCodec(encCfg.Codec). - WithClient(clitestutil.MockCometRPC{Client: rpcclientmock.Client{}}). - WithAccountRetriever(client.MockAccountRetriever{}). - WithOutput(io.Discard). - WithChainID("test-chain") - - testCases := []struct { - name string - args []string - expCmdOutput string - }{ - { - name: "json output", - args: []string{"test-upgrade", fmt.Sprintf("--%s=json", flags.FlagOutput)}, - expCmdOutput: `[test-upgrade --output=json]`, - }, - { - name: "text output", - args: []string{"test-upgrade", fmt.Sprintf("--%s=text", flags.FlagOutput)}, - expCmdOutput: `[test-upgrade --output=text]`, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - ctx := svrcmd.CreateExecuteContext(context.Background()) - - cmd := upgradecli.GetAppliedPlanCmd() - cmd.SetOut(io.Discard) - require.NotNil(t, cmd) - - cmd.SetContext(ctx) - cmd.SetArgs(tc.args) - - require.NoError(t, client.SetCmdClientContextHandler(baseCtx, cmd)) - - require.Contains(t, fmt.Sprint(cmd), "applied [upgrade-name] [] [] block header for height at which a completed upgrade was applied") - require.Contains(t, fmt.Sprint(cmd), tc.expCmdOutput) - }) - } -} - -func TestGetModuleVersionsCmd(t *testing.T) { - encCfg := testutilmod.MakeTestEncodingConfig(upgrade.AppModuleBasic{}) - kr := keyring.NewInMemory(encCfg.Codec) - baseCtx := client.Context{}. - WithKeyring(kr). - WithTxConfig(encCfg.TxConfig). - WithCodec(encCfg.Codec). - WithClient(clitestutil.MockCometRPC{Client: rpcclientmock.Client{}}). - WithAccountRetriever(client.MockAccountRetriever{}). - WithOutput(io.Discard). - WithChainID("test-chain") - - testCases := []struct { - msg string - args []string - expCmdOutput string - }{ - { - msg: "test full query with json output", - args: []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=json", flags.FlagOutput)}, - expCmdOutput: `--height=1 --output=json`, - }, - { - msg: "test full query with text output", - args: []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=text", flags.FlagOutput)}, - expCmdOutput: `--height=1 --output=text`, - }, - { - msg: "test single module", - args: []string{"bank", fmt.Sprintf("--%s=1", flags.FlagHeight)}, - expCmdOutput: `bank --height=1`, - }, - { - msg: "test non-existent module", - args: []string{"abcdefg", fmt.Sprintf("--%s=1", flags.FlagHeight)}, - expCmdOutput: `abcdefg --height=1`, - }, - } - - for _, tc := range testCases { - tc := tc - - t.Run(tc.msg, func(t *testing.T) { - ctx := svrcmd.CreateExecuteContext(context.Background()) - - cmd := upgradecli.GetModuleVersionsCmd() - cmd.SetOut(io.Discard) - require.NotNil(t, cmd) - - cmd.SetContext(ctx) - cmd.SetArgs(tc.args) - - require.NoError(t, client.SetCmdClientContextHandler(baseCtx, cmd)) - - require.Contains(t, fmt.Sprint(cmd), "module_versions [optional module_name] [] [] get the list of module versions") - require.Contains(t, fmt.Sprint(cmd), tc.expCmdOutput) - }) - } -} diff --git a/x/upgrade/client/cli/tx.go b/x/upgrade/client/cli/tx.go index 893b74680e1f..294538fdc6d4 100644 --- a/x/upgrade/client/cli/tx.go +++ b/x/upgrade/client/cli/tx.go @@ -5,25 +5,27 @@ import ( "os" "path/filepath" + "github.com/spf13/cobra" + addresscodec "cosmossdk.io/core/address" + "cosmossdk.io/x/upgrade/plan" + "cosmossdk.io/x/upgrade/types" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" "github.com/cosmos/cosmos-sdk/x/gov/client/cli" - "github.com/spf13/cobra" - - "cosmossdk.io/x/upgrade/plan" - "cosmossdk.io/x/upgrade/types" ) const ( - FlagUpgradeHeight = "upgrade-height" - FlagUpgradeInfo = "upgrade-info" - FlagNoValidate = "no-validate" - FlagDaemonName = "daemon-name" - FlagAuthority = "authority" + FlagUpgradeHeight = "upgrade-height" + FlagUpgradeInfo = "upgrade-info" + FlagNoValidate = "no-validate" + FlagNoChecksumRequired = "no-checksum-required" + FlagDaemonName = "daemon-name" + FlagAuthority = "authority" ) // GetTxCmd returns the transaction commands for this module @@ -73,15 +75,21 @@ func NewCmdSubmitUpgradeProposal(ac addresscodec.Codec) *cobra.Command { } if !noValidate { - var daemonName string - if daemonName, err = cmd.Flags().GetString(FlagDaemonName); err != nil { + daemonName, err := cmd.Flags().GetString(FlagDaemonName) + if err != nil { + return err + } + + noChecksum, err := cmd.Flags().GetBool(FlagNoChecksumRequired) + if err != nil { return err } var planInfo *plan.Info - if planInfo, err = plan.ParseInfo(p.Info); err != nil { + if planInfo, err = plan.ParseInfo(p.Info, plan.ParseOptionEnforceChecksum(!noChecksum)); err != nil { return err } + if err = planInfo.ValidateFull(daemonName); err != nil { return err } @@ -102,7 +110,7 @@ func NewCmdSubmitUpgradeProposal(ac addresscodec.Codec) *cobra.Command { Plan: p, }, }); err != nil { - return fmt.Errorf("failed to create cancel upgrade message: %w", err) + return fmt.Errorf("failed to create submit upgrade proposal message: %w", err) } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), proposal) @@ -112,6 +120,7 @@ func NewCmdSubmitUpgradeProposal(ac addresscodec.Codec) *cobra.Command { cmd.Flags().Int64(FlagUpgradeHeight, 0, "The height at which the upgrade must happen") cmd.Flags().String(FlagUpgradeInfo, "", "Info for the upgrade plan such as new version download urls, etc.") cmd.Flags().Bool(FlagNoValidate, false, "Skip validation of the upgrade info (dangerous!)") + cmd.Flags().Bool(FlagNoChecksumRequired, false, "Skip requirement of checksums for binaries in the upgrade info") cmd.Flags().String(FlagDaemonName, getDefaultDaemonName(), "The name of the executable being upgraded (for upgrade-info validation). Default is the DAEMON_NAME env var if set, or else this executable") cmd.Flags().String(FlagAuthority, "", "The address of the upgrade module authority (defaults to gov)") @@ -155,7 +164,7 @@ func NewCmdSubmitCancelUpgradeProposal(ac addresscodec.Codec) *cobra.Command { Authority: authority, }, }); err != nil { - return fmt.Errorf("failed to create cancel upgrade message: %w", err) + return fmt.Errorf("failed to create cancel upgrade proposal message: %w", err) } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), proposal) diff --git a/x/upgrade/go.mod b/x/upgrade/go.mod index b155612820d8..b411aa230d3e 100644 --- a/x/upgrade/go.mod +++ b/x/upgrade/go.mod @@ -1,185 +1,192 @@ module cosmossdk.io/x/upgrade -go 1.20 +go 1.21 require ( - cosmossdk.io/api v0.4.2 - cosmossdk.io/core v0.8.0 - cosmossdk.io/depinject v1.0.0-alpha.3 - cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741 - cosmossdk.io/log v1.1.0 - cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c - github.com/armon/go-metrics v0.4.1 - github.com/cometbft/cometbft v0.38.0-rc1 - github.com/cosmos/cosmos-db v1.0.0 - github.com/cosmos/cosmos-proto v1.0.0-beta.3 - github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20230607182757-cfeb10287d61 - github.com/cosmos/gogoproto v1.4.10 - github.com/golang/protobuf v1.5.3 + cosmossdk.io/api v0.7.5 + cosmossdk.io/core v0.11.0 + cosmossdk.io/depinject v1.0.0-alpha.4 + cosmossdk.io/errors v1.0.1 + cosmossdk.io/log v1.4.1 + cosmossdk.io/store v1.1.0 + github.com/cometbft/cometbft v0.38.12 + github.com/cosmos/cosmos-db v1.0.2 + github.com/cosmos/cosmos-proto v1.0.0-beta.5 + github.com/cosmos/cosmos-sdk v0.50.6 + github.com/cosmos/gogoproto v1.7.0 + github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/hashicorp/go-getter v1.7.1 - github.com/spf13/cast v1.5.1 - github.com/spf13/cobra v1.7.0 + github.com/hashicorp/go-cleanhttp v0.5.2 + github.com/hashicorp/go-getter v1.7.4 + github.com/hashicorp/go-metrics v0.5.3 + github.com/spf13/cast v1.6.0 + github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.4 - google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a - google.golang.org/grpc v1.55.0 - google.golang.org/protobuf v1.30.0 + github.com/spf13/viper v1.19.0 + github.com/stretchr/testify v1.9.0 + google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 + google.golang.org/grpc v1.63.2 + google.golang.org/protobuf v1.34.2 ) require ( - cloud.google.com/go v0.110.0 // indirect - cloud.google.com/go/compute v1.19.0 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v0.13.0 // indirect - cloud.google.com/go/storage v1.30.0 // indirect - cosmossdk.io/collections v0.2.0 // indirect - cosmossdk.io/math v1.0.1 // indirect - cosmossdk.io/x/tx v0.8.0 // indirect + cloud.google.com/go v0.112.1 // indirect + cloud.google.com/go/compute/metadata v0.3.0 // indirect + cloud.google.com/go/iam v1.1.6 // indirect + cloud.google.com/go/storage v1.38.0 // indirect + cosmossdk.io/collections v0.4.0 // indirect + cosmossdk.io/math v1.3.0 // indirect + cosmossdk.io/x/tx v0.13.4 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect + github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect github.com/aws/aws-sdk-go v1.44.224 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect - github.com/cockroachdb/errors v1.9.1 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect + github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f // indirect - github.com/cockroachdb/redact v1.1.4 // indirect - github.com/cometbft/cometbft-db v0.7.0 // indirect + github.com/cockroachdb/pebble v1.1.1 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/cometbft/cometbft-db v0.11.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v1.0.0-beta.2 // indirect - github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.13.0 // indirect + github.com/cosmos/iavl v1.1.2 // indirect + github.com/cosmos/ics23/go v0.11.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/danieljoos/wincred v1.1.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect - github.com/emicklei/dot v1.4.2 // indirect + github.com/dvsekhvalnov/jose2go v1.6.0 // indirect + github.com/emicklei/dot v1.6.1 // indirect github.com/fatih/color v1.15.0 // indirect - github.com/felixge/httpsnoop v1.0.2 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/getsentry/sentry-go v0.21.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.1.0 // indirect + github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect - github.com/google/s2a-go v0.1.3 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect - github.com/googleapis/gax-go/v2 v2.8.0 // indirect + github.com/google/s2a-go v0.1.7 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect + github.com/googleapis/gax-go/v2 v2.12.3 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/mux v1.8.0 // indirect - github.com/gorilla/websocket v1.5.0 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect - github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-plugin v1.4.10 // indirect + github.com/hashicorp/go-plugin v1.5.2 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/huandu/skiplist v1.2.0 // indirect - github.com/iancoleman/strcase v0.2.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.16.5 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect - github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.0 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect - github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 // indirect + github.com/pelletier/go-toml/v2 v2.2.2 // indirect + github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.15.1 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.20.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect - github.com/rs/cors v1.8.3 // indirect - github.com/rs/zerolog v1.29.1 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rs/cors v1.11.1 // indirect + github.com/rs/zerolog v1.33.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/spf13/viper v1.16.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tidwall/btree v1.6.0 // indirect + github.com/tidwall/btree v1.7.0 // indirect github.com/ulikunitz/xz v0.5.11 // indirect - github.com/zondax/hid v0.9.1 // indirect - github.com/zondax/ledger-go v0.14.1 // indirect - go.etcd.io/bbolt v1.3.6 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect + go.etcd.io/bbolt v1.3.10 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/crypto v0.9.0 // indirect - golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/oauth2 v0.8.0 // indirect - golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect - golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/api v0.122.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect + go.uber.org/multierr v1.10.0 // indirect + golang.org/x/crypto v0.26.0 // indirect + golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/oauth2 v0.21.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect + golang.org/x/time v0.5.0 // indirect + google.golang.org/api v0.171.0 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - gotest.tools/v3 v3.4.0 // indirect + gotest.tools/v3 v3.5.1 // indirect nhooyr.io/websocket v1.8.6 // indirect - pgregory.net/rapid v0.6.2 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + pgregory.net/rapid v1.1.0 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) // Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities. // TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 -replace github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.0 - -replace github.com/cosmos/cosmos-sdk => ../../ +replace github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.1 diff --git a/x/upgrade/go.sum b/x/upgrade/go.sum index 770aafce3bbe..04a8fe7fced7 100644 --- a/x/upgrade/go.sum +++ b/x/upgrade/go.sum @@ -3,7 +3,6 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -16,7 +15,6 @@ cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOY cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= @@ -32,8 +30,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= -cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= +cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= +cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -70,10 +68,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.19.0 h1:+9zda3WGgW1ZSTlVppLCYFIr48Pa35q1uG2N1itbCEQ= -cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= +cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= @@ -111,13 +107,12 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v0.13.0 h1:+CmB+K0J/33d0zSQ9SlFWUeCCEn5XJA0ZMZ3pHE9u8k= -cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= +cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= +cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= -cloud.google.com/go/longrunning v0.4.1 h1:v+yFJOfKC3yZdY6ZUI933pIYdhyhV8S3NpWrXWmg7jM= cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= @@ -171,12 +166,11 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.30.0 h1:g1yrbxAWOrvg/594228pETWkOi00MLTrOWfh56veU5o= -cloud.google.com/go/storage v1.30.0/go.mod h1:xAVretHSROm1BQX4IIsoVgJqw0LqOyX+I/O2GzRAzdE= +cloud.google.com/go/storage v1.38.0 h1:Az68ZRGlnNTpIBbLjSMIV2BDcwwXYlRlQzis0llkpJg= +cloud.google.com/go/storage v1.38.0/go.mod h1:tlUADB0mAb9BgYls9lq+8MGkfzOXuLrnHXlpHmvFJoY= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= @@ -188,24 +182,24 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.4.2 h1:lQBMl4xINnMnBOR/tQLtjlDnR4exr4e6/SfHR8PILE0= -cosmossdk.io/api v0.4.2/go.mod h1:qrVgOp7DIeAXa+Tt5dDjOC47bZCDrwx8ZHxrmy7STNE= -cosmossdk.io/collections v0.2.0 h1:CgMfLtE16+qox3zBYrGh60i4yKV8SeExLnIdOS2sbQs= -cosmossdk.io/collections v0.2.0/go.mod h1:Oc1FK0vlmxJZsgUn9/o3ldE6zNyWKvobVzaLhWknZJE= -cosmossdk.io/core v0.8.0 h1:LcJnu52E1a8f8E317VfQ1xK/RZe+IuhMNQAjnDLh25M= -cosmossdk.io/core v0.8.0/go.mod h1:LF6VLOv2DdCiaHxYVmr0MZcZpaSM9ZgvyrQSYTeg6D0= -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.0.20230524212735-6cabb6aa5741 h1:BCRz06fvddw7cKGiEGDiSox3qMsjQ97f92K+PDZDHdc= -cosmossdk.io/errors v1.0.0-beta.7.0.20230524212735-6cabb6aa5741/go.mod h1:TB05o6YXkZkzsc+6bZFAV5kZRBtoCU9tUkbeMIqEg0w= -cosmossdk.io/log v1.1.0 h1:v0ogPHYeTzPcBTcPR1A3j1hkei4pZama8kz8LKlCMv0= -cosmossdk.io/log v1.1.0/go.mod h1:6zjroETlcDs+mm62gd8Ig7mZ+N+fVOZS91V17H+M4N4= -cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c h1:A+FMPW9GtfcPBDQNtFeDFN27h1SAP6OVjnGgPLlYXmI= -cosmossdk.io/store v0.1.0-alpha.1.0.20230606190835-3e18f4088b2c/go.mod h1:RbYGvXCbz8uNBCXrwS9Z8SyydeWi+W5x5MZ33muyzMw= -cosmossdk.io/x/tx v0.8.0 h1:gLiGRL/Fy7fs6dd0IX8jOf0PrVr56/SG6XVMGQjyvJU= -cosmossdk.io/x/tx v0.8.0/go.mod h1:T9uEumGNgKU61gJYRv1t3uzQwLnASpJGmSE229HM3xA= +cosmossdk.io/api v0.7.5 h1:eMPTReoNmGUm8DeiQL9DyM8sYDjEhWzL1+nLbI9DqtQ= +cosmossdk.io/api v0.7.5/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= +cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= +cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= +cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= +cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= +cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= +cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= +cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= +cosmossdk.io/store v1.1.0 h1:LnKwgYMc9BInn9PhpTFEQVbL9UK475G2H911CGGnWHk= +cosmossdk.io/store v1.1.0/go.mod h1:oZfW/4Fc/zYqu3JmQcQdUJ3fqu5vnYTn3LZFFy8P8ng= +cosmossdk.io/x/tx v0.13.4 h1:Eg0PbJgeO0gM8p5wx6xa0fKR7hIV6+8lC56UrsvSo0Y= +cosmossdk.io/x/tx v0.13.4/go.mod h1:BkFqrnGGgW50Y6cwTy+JvgAhiffbGEKW6KF9ufcDpvk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= @@ -213,30 +207,28 @@ github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMb github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= +github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -248,8 +240,6 @@ github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= @@ -258,7 +248,6 @@ github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX github.com/aws/aws-sdk-go v1.44.224 h1:09CiaaF35nRmxrzWZ2uRq5v6Ghg/d2RiPjZnSgtt+RQ= github.com/aws/aws-sdk-go v1.44.224/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -269,15 +258,19 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.7.0 h1:YjAGVd3XmtK9ktAbX8Zg2g2PwLIMjGREZJHlV4j7NEo= -github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= -github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= -github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= +github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= +github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ= +github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c= +github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= -github.com/bufbuild/protocompile v0.5.1 h1:mixz5lJX4Hiz4FpqFREJHIXLfaLBntfaJv1h+/jS+Qg= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= +github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= -github.com/bytedance/sonic v1.8.0 h1:ea0Xadu+sHlu7x5O3gKhRpQ1IKiMrSiHttPF0ybECuA= -github.com/bytedance/sonic v1.8.0/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= +github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= +github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -288,8 +281,8 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA 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.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= @@ -317,27 +310,29 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= +github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f h1:qQW3qCVRpjYsV4YNaUOjm6YLeliAD2jpgex9+D9tqU4= -github.com/cockroachdb/pebble v0.0.0-20230606152911-c4be581b807f/go.mod h1:TkdVsGYRqtULUppt2RbC+YaKtTHnHoWa2apfFrSKABw= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/redact v1.1.4 h1:Y0XrVI2FAyofNyGveodTN//qdpPtFKcKTeCBsK3AHAQ= -github.com/cockroachdb/redact v1.1.4/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= +github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/cometbft/cometbft v0.38.0-rc1 h1:ph6smlqX82aH+d72KuxDHqu29M7LyusSp/obfGsGX/w= -github.com/cometbft/cometbft v0.38.0-rc1/go.mod h1:5Jz0Z8YsHSf0ZaAqGvi/ifioSdVFPtEGrm8Y9T/993k= -github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= -github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= +github.com/cometbft/cometbft v0.38.12 h1:OWsLZN2KcSSFe8bet9xCn07VwhBnavPea3VyPnNq1bg= +github.com/cometbft/cometbft v0.38.12/go.mod h1:GPHp3/pehPqgX1930HmK1BpBLZPxB75v/dZg8Viwy+o= +github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= +github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/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= @@ -346,41 +341,42 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= -github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= -github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= -github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= +github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= +github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/cosmos-sdk v0.50.6 h1:efR3MsvMHX5sxS3be+hOobGk87IzlZbSpsI2x/Vw3hk= +github.com/cosmos/cosmos-sdk v0.50.6/go.mod h1:lVkRY6cdMJ0fG3gp8y4hFrsKZqF4z7y0M2UXFb9Yt40= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cosmos/iavl v1.0.0-beta.2 h1:XOsIM80Yyml/KifCXEYOy9tWCXwMAbLa91n6pReW07Y= -github.com/cosmos/iavl v1.0.0-beta.2/go.mod h1:EA97dJ07TBktRlG/iGzK6g1eCXNj1q3MGoFYkVzrwHE= -github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= -github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= -github.com/cosmos/ledger-cosmos-go v0.13.0 h1:ex0CvCxToSR7j5WjrghPu2Bu9sSXKikjnVvUryNnx4s= -github.com/cosmos/ledger-cosmos-go v0.13.0/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= +github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= +github.com/cosmos/iavl v1.1.2 h1:zL9FK7C4L/P4IF1Dm5fIwz0WXCnn7Bp1M2FxH0ayM7Y= +github.com/cosmos/iavl v1.1.2/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= +github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= +github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew 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/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= 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= @@ -391,20 +387,21 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUn 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/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= -github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= +github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/emicklei/dot v1.4.2 h1:UbK6gX4yvrpHKlxuUQicwoAis4zl8Dzwit9SnbBAXWw= -github.com/emicklei/dot v1.4.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= +github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -416,40 +413,35 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -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/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= -github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= 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/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.21.0 h1:c9l5F1nPF30JIppulk4veau90PK6Smu3abgVtVQWon4= -github.com/getsentry/sentry-go v0.21.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= +github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.9.0 h1:OjyFBKICoexlu99ctXNR2gg+c5pKrKMuyjgARg9qeY8= -github.com/gin-gonic/gin v1.9.0/go.mod h1:W1Me9+hsUSyj3CePGrd1/QrKJMSJ1Tu/0hFEH89961k= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= +github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -466,14 +458,18 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU= -github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s= +github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= +github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= 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= @@ -483,13 +479,11 @@ github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/goccy/go-json v0.10.0 h1:mXKd9Qw4NuzShiRlOXKews24ufknHO7gx30lsDyokKA= -github.com/goccy/go-json v0.10.0/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -500,11 +494,9 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV 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/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -539,13 +531,12 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 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/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -564,18 +555,20 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -587,7 +580,6 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -595,17 +587,18 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.3 h1:FAgZmpLl/SXurPEZyCMPBIiiYeTbqfjlbdnCNTAkbGE= -github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= -github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -615,10 +608,9 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.8.0 h1:UBtEZqx1bjXtOQ5BVTkuYghXrr3N4V123VKJK67vJZc= -github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= +github.com/googleapis/gax-go/v2 v2.12.3 h1:5/zPPDvw8Q1SuXjrqrZslrqT7dL/uJT2CQii/cLCKqA= +github.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBHwWRvkNFJUQcS4= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= @@ -629,8 +621,8 @@ github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= @@ -648,17 +640,19 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= -github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-getter v1.7.4 h1:3yQjWuxICvSpYwqSayAdKRFcvBl1y/vogCxczWSmix0= +github.com/hashicorp/go-getter v1.7.4/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= +github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v1.4.10 h1:xUbmA4jC6Dq163/fWcp8P3JuHilrHHMLNRxzGQJ9hNk= -github.com/hashicorp/go-plugin v1.4.10/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= @@ -674,8 +668,10 @@ github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -692,24 +688,18 @@ github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0Jr github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= -github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -731,53 +721,39 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= 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.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= -github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid v1.2.1 h1:vJi+O/nMdFt0vqm8NZBI6wzALWdA2X+egi0ogNyrC/w= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= +github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= -github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= -github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= +github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= -github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.0 h1:H4L/LhP7GOMf1j17oQAElHgVlbEje2h14A8Tz9cM2BE= -github.com/linxGnu/grocksdb v1.8.0/go.mod h1:09CeBborffXhXdNpEcOeZrLKEnRtrZFEpFdPNI9Zjjg= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= @@ -785,31 +761,21 @@ github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3v github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= @@ -833,9 +799,10 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -851,8 +818,8 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA 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/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce h1:/pEpMk55wH0X+E5zedGEMOdLuWmV8P4+4W3+LZaM6kg= -github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= @@ -860,7 +827,6 @@ github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DV 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.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= @@ -872,10 +838,14 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -885,19 +855,20 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 h1:W04oB3d0J01W5jgYRGKsV8LCM6g9EkCvPkZcmFuy0OE= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= @@ -908,9 +879,9 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -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/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -918,103 +889,102 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/prometheus/client_golang v1.20.1 h1:IMJXHOD6eARkQpxo8KkhgEVFlBNm+nkrFUyGlIu7Na8= +github.com/prometheus/client_golang v1.20.1/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= -github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= 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/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= 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.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= 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= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= +github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/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/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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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= @@ -1025,62 +995,46 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= -github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.9 h1:rmenucSohSTiyL09Y+l2OCk+FrMxGMzho2+tjr5ticU= -github.com/ugorji/go/codec v1.2.9/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= +github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= -github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= -github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/bbolt v1.3.10 h1:+BqfJTcCzTItrop8mq/lbzL8wSGtj94UO/3U31shqG0= +go.etcd.io/bbolt v1.3.10/go.mod h1:bK3UQLPJZly7IlNmV7uVHJDxfe5aK9Ll93e/74Y9oEQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1093,6 +1047,18 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw= +go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1102,12 +1068,15 @@ go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -golang.org/x/arch v0.0.0-20210923205945-b76863e36670 h1:18EFjUmQOcUvxNYSkA6jO9VAiXCnxFY6NyDX0bHDmkU= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= +golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1116,17 +1085,13 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1138,8 +1103,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-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= 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= @@ -1166,7 +1131,9 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1178,7 +1145,6 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -1188,7 +1154,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1209,7 +1174,6 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= @@ -1217,8 +1181,6 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -1231,10 +1193,11 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1260,8 +1223,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= -golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1276,8 +1239,9 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1289,7 +1253,6 @@ golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1299,7 +1262,6 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1328,7 +1290,6 @@ golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/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-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1336,14 +1297,11 @@ golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7w 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-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1356,7 +1314,6 @@ golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1374,24 +1331,26 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1403,26 +1362,26 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -1470,7 +1429,6 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f 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= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= @@ -1478,7 +1436,9 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= 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= @@ -1486,8 +1446,9 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -1537,8 +1498,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.122.0 h1:zDobeejm3E7pEG1mNHvdxvjs5XJoCMzyNH+CmwL94Es= -google.golang.org/api v0.122.0/go.mod h1:gcitW0lvnyWjSp9nKxAbdHKIZ6vF4aajGueeslZOyms= +google.golang.org/api v0.171.0 h1:w174hnBPqut76FzW5Qaupt7zY8Kql6fiVjgys4f58sU= +google.golang.org/api v0.171.0/go.mod h1:Hnq5AHm4OTMt2BUVjael2CWZFD6vksJdWCWiUAmjC9o= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1546,9 +1507,7 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1587,10 +1546,8 @@ google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1657,13 +1614,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 h1:x1vNwUhVOcsYoKyEGCZBH694SBmmBjA2EfauFVEI2+M= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a h1:HiYVD+FGJkTo+9zj1gqz0anapsa1JxjiSrN+BJKyUmE= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 h1:rIo7ocm2roD9DcFIX67Ym8icoGCKSARAiPljFhh5suQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2/go.mod h1:O1cOfN1Cy6QEYr7VxtjOyP5AdAuR0aJ/MYZaaof623Y= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1705,8 +1661,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1723,8 +1679,9 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1737,10 +1694,8 @@ gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= @@ -1755,13 +1710,12 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1772,13 +1726,13 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -pgregory.net/rapid v0.6.2 h1:ErW5sL+UKtfBfUTsWHDCoeB+eZKLKMxrSd1VJY6W4bw= -pgregory.net/rapid v0.6.2/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/x/upgrade/handler.go b/x/upgrade/handler.go deleted file mode 100644 index 6e09c39a6bc7..000000000000 --- a/x/upgrade/handler.go +++ /dev/null @@ -1,42 +0,0 @@ -package upgrade - -import ( - "cosmossdk.io/x/upgrade/keeper" - "cosmossdk.io/x/upgrade/types" - - errorsmod "cosmossdk.io/errors" - - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" -) - -// NewSoftwareUpgradeProposalHandler creates a governance handler to manage new proposal types. -// It enables SoftwareUpgradeProposal to propose an Upgrade, and CancelSoftwareUpgradeProposal -// to abort a previously voted upgrade. -// -//nolint:staticcheck // we are intentionally using a deprecated proposal here. -func NewSoftwareUpgradeProposalHandler(k *keeper.Keeper) govtypes.Handler { - return func(ctx sdk.Context, content govtypes.Content) error { - switch c := content.(type) { - case *types.SoftwareUpgradeProposal: - return handleSoftwareUpgradeProposal(ctx, k, c) - - case *types.CancelSoftwareUpgradeProposal: - return handleCancelSoftwareUpgradeProposal(ctx, k, c) - - default: - return errorsmod.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized software upgrade proposal content type: %T", c) - } - } -} - -//nolint:staticcheck // we are intentionally using a deprecated proposal here. -func handleSoftwareUpgradeProposal(ctx sdk.Context, k *keeper.Keeper, p *types.SoftwareUpgradeProposal) error { - return k.ScheduleUpgrade(ctx, p.Plan) -} - -//nolint:staticcheck // we are intentionally using a deprecated proposal here. -func handleCancelSoftwareUpgradeProposal(ctx sdk.Context, k *keeper.Keeper, _ *types.CancelSoftwareUpgradeProposal) error { - return k.ClearUpgradePlan(ctx) -} diff --git a/x/upgrade/keeper/grpc_query_test.go b/x/upgrade/keeper/grpc_query_test.go index b97e5a322161..3217cce11175 100644 --- a/x/upgrade/keeper/grpc_query_test.go +++ b/x/upgrade/keeper/grpc_query_test.go @@ -41,7 +41,7 @@ func (suite *UpgradeTestSuite) SetupTest() { skipUpgradeHeights := make(map[int64]bool) - suite.upgradeKeeper = keeper.NewKeeper(skipUpgradeHeights, storeService, suite.encCfg.Codec, "", nil, authtypes.NewModuleAddress(govtypes.ModuleName).String()) + suite.upgradeKeeper = keeper.NewKeeper(skipUpgradeHeights, storeService, suite.encCfg.Codec, suite.T().TempDir(), nil, authtypes.NewModuleAddress(govtypes.ModuleName).String()) suite.upgradeKeeper.SetModuleVersionMap(suite.ctx, module.VersionMap{ "bank": 0, }) diff --git a/x/upgrade/keeper/keeper.go b/x/upgrade/keeper/keeper.go index 0e065481876a..b06aba7dd11a 100644 --- a/x/upgrade/keeper/keeper.go +++ b/x/upgrade/keeper/keeper.go @@ -7,11 +7,12 @@ import ( "errors" "fmt" "os" - "path" "path/filepath" "sort" "strconv" + "github.com/hashicorp/go-metrics" + corestore "cosmossdk.io/core/store" errorsmod "cosmossdk.io/errors" "cosmossdk.io/log" @@ -20,8 +21,6 @@ import ( xp "cosmossdk.io/x/upgrade/exported" "cosmossdk.io/x/upgrade/types" - "github.com/armon/go-metrics" - "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/telemetry" @@ -64,10 +63,6 @@ func NewKeeper(skipUpgradeHeights map[int64]bool, storeService corestore.KVStore authority: authority, } - if upgradePlan, err := k.ReadUpgradeInfoFromDisk(); err == nil && upgradePlan.Height > 0 { - telemetry.SetGaugeWithLabels([]string{"server", "info"}, 1, []metrics.Label{telemetry.NewLabel("upgrade_height", strconv.FormatInt(upgradePlan.Height, 10))}) - } - return k } @@ -534,7 +529,7 @@ func (k Keeper) DumpUpgradeInfoToDisk(height int64, p types.Plan) error { // GetUpgradeInfoPath returns the upgrade info file path func (k Keeper) GetUpgradeInfoPath() (string, error) { - upgradeInfoFileDir := path.Join(k.getHomeDir(), "data") + upgradeInfoFileDir := filepath.Join(k.homePath, "data") if err := os.MkdirAll(upgradeInfoFileDir, os.ModePerm); err != nil { return "", fmt.Errorf("could not create directory %q: %w", upgradeInfoFileDir, err) } @@ -542,11 +537,6 @@ func (k Keeper) GetUpgradeInfoPath() (string, error) { return filepath.Join(upgradeInfoFileDir, types.UpgradeInfoFilename), nil } -// getHomeDir returns the height at which the given upgrade was executed -func (k Keeper) getHomeDir() string { - return k.homePath -} - // ReadUpgradeInfoFromDisk returns the name and height of the upgrade which is // written to disk by the old binary when panicking. An error is returned if // the upgrade path directory cannot be created or if the file exists and @@ -573,6 +563,14 @@ func (k Keeper) ReadUpgradeInfoFromDisk() (types.Plan, error) { return upgradeInfo, err } + if err := upgradeInfo.ValidateBasic(); err != nil { + return upgradeInfo, err + } + + if upgradeInfo.Height > 0 { + telemetry.SetGaugeWithLabels([]string{"server", "info"}, 1, []metrics.Label{telemetry.NewLabel("upgrade_height", strconv.FormatInt(upgradeInfo.Height, 10))}) + } + return upgradeInfo, nil } diff --git a/x/upgrade/keeper/keeper_test.go b/x/upgrade/keeper/keeper_test.go index 2f08536ec503..23928abd0cd3 100644 --- a/x/upgrade/keeper/keeper_test.go +++ b/x/upgrade/keeper/keeper_test.go @@ -88,6 +88,12 @@ func (s *KeeperTestSuite) TestReadUpgradeInfoFromDisk() { s.Require().NoError(err) expected.Height = 101 s.Require().Equal(expected, ui) + + // create invalid upgrade plan (with empty name) + expected.Name = "" + s.Require().NoError(s.upgradeKeeper.DumpUpgradeInfoToDisk(101, expected)) + _, err = s.upgradeKeeper.ReadUpgradeInfoFromDisk() + s.Require().ErrorContains(err, "name cannot be empty: invalid request") } func (s *KeeperTestSuite) TestScheduleUpgrade() { diff --git a/x/upgrade/keeper/migrations_test.go b/x/upgrade/keeper/migrations_test.go index 47225bcef911..3f220ab8f1a0 100644 --- a/x/upgrade/keeper/migrations_test.go +++ b/x/upgrade/keeper/migrations_test.go @@ -4,9 +4,10 @@ import ( "encoding/binary" "testing" + "github.com/stretchr/testify/require" + storetypes "cosmossdk.io/store/types" "cosmossdk.io/x/upgrade/types" - "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" diff --git a/x/upgrade/keeper/msg_server.go b/x/upgrade/keeper/msg_server.go index 7c8cc8a48c35..b084011bfdc9 100644 --- a/x/upgrade/keeper/msg_server.go +++ b/x/upgrade/keeper/msg_server.go @@ -7,7 +7,6 @@ import ( "cosmossdk.io/x/upgrade/types" sdk "github.com/cosmos/cosmos-sdk/types" - gov "github.com/cosmos/cosmos-sdk/x/gov/types" ) type msgServer struct { @@ -22,16 +21,15 @@ func NewMsgServerImpl(k *Keeper) types.MsgServer { } } -var _ types.MsgServer = msgServer{} +var ( + _ types.MsgServer = msgServer{} + _, _ sdk.Msg = &types.MsgSoftwareUpgrade{}, &types.MsgCancelUpgrade{} +) // SoftwareUpgrade implements the Msg/SoftwareUpgrade Msg service. func (k msgServer) SoftwareUpgrade(goCtx context.Context, msg *types.MsgSoftwareUpgrade) (*types.MsgSoftwareUpgradeResponse, error) { if k.authority != msg.Authority { - return nil, errors.Wrapf(gov.ErrInvalidSigner, "expected %s got %s", k.authority, msg.Authority) - } - - if err := msg.Plan.ValidateBasic(); err != nil { - return nil, errors.Wrap(err, "plan") + return nil, errors.Wrapf(types.ErrInvalidSigner, "expected %s got %s", k.authority, msg.Authority) } ctx := sdk.UnwrapSDKContext(goCtx) @@ -46,11 +44,10 @@ func (k msgServer) SoftwareUpgrade(goCtx context.Context, msg *types.MsgSoftware // CancelUpgrade implements the Msg/CancelUpgrade Msg service. func (k msgServer) CancelUpgrade(ctx context.Context, msg *types.MsgCancelUpgrade) (*types.MsgCancelUpgradeResponse, error) { if k.authority != msg.Authority { - return nil, errors.Wrapf(gov.ErrInvalidSigner, "expected %s got %s", k.authority, msg.Authority) + return nil, errors.Wrapf(types.ErrInvalidSigner, "expected %s got %s", k.authority, msg.Authority) } - sdkCtx := sdk.UnwrapSDKContext(ctx) - err := k.ClearUpgradePlan(sdkCtx) + err := k.ClearUpgradePlan(ctx) if err != nil { return nil, err } diff --git a/x/upgrade/keeper/msg_server_test.go b/x/upgrade/keeper/msg_server_test.go index 8c04b328fa33..f3197be3c0d9 100644 --- a/x/upgrade/keeper/msg_server_test.go +++ b/x/upgrade/keeper/msg_server_test.go @@ -26,7 +26,7 @@ func (s *KeeperTestSuite) TestSoftwareUpgrade() { }, }, true, - "expected gov account as only signer for proposal message", + "expected authority account as only signer for proposal message", }, { "unauthorized authority address", @@ -39,7 +39,7 @@ func (s *KeeperTestSuite) TestSoftwareUpgrade() { }, }, true, - "expected gov account as only signer for proposal message", + "expected authority account as only signer for proposal message", }, { "invalid plan", @@ -104,7 +104,7 @@ func (s *KeeperTestSuite) TestCancelUpgrade() { Authority: "authority", }, true, - "expected gov account as only signer for proposal message", + "expected authority account as only signer for proposal message", }, { "unauthorized authority address", @@ -112,7 +112,7 @@ func (s *KeeperTestSuite) TestCancelUpgrade() { Authority: s.addrs[0].String(), }, true, - "expected gov account as only signer for proposal message", + "expected authority account as only signer for proposal message", }, { "upgrade canceled successfully", diff --git a/x/upgrade/module.go b/x/upgrade/module.go index fa9c51aa291e..13bffd193933 100644 --- a/x/upgrade/module.go +++ b/x/upgrade/module.go @@ -5,17 +5,16 @@ import ( "encoding/json" "fmt" - abci "github.com/cometbft/cometbft/abci/types" gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cast" "github.com/spf13/cobra" + "github.com/spf13/viper" modulev1 "cosmossdk.io/api/cosmos/upgrade/module/v1" "cosmossdk.io/core/address" "cosmossdk.io/core/appmodule" - "cosmossdk.io/depinject" - "cosmossdk.io/core/store" + "cosmossdk.io/depinject" "cosmossdk.io/x/upgrade/client/cli" "cosmossdk.io/x/upgrade/keeper" "cosmossdk.io/x/upgrade/types" @@ -32,7 +31,6 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) func init() { @@ -42,7 +40,14 @@ func init() { // ConsensusVersion defines the current x/upgrade module consensus version. const ConsensusVersion uint64 = 2 -var _ module.AppModuleBasic = AppModuleBasic{} +var ( + _ module.AppModuleBasic = AppModule{} + _ module.HasGenesis = AppModule{} + _ module.HasServices = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasPreBlocker = AppModule{} +) // AppModuleBasic implements the sdk.AppModuleBasic interface type AppModuleBasic struct { @@ -66,11 +71,6 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *g } } -// GetQueryCmd returns the CLI query commands for this module -func (AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.GetQueryCmd() -} - // GetTxCmd returns the CLI transaction commands for this module func (ab AppModuleBasic) GetTxCmd() *cobra.Command { return cli.GetTxCmd(ab.ac) @@ -81,6 +81,16 @@ func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) types.RegisterInterfaces(registry) } +// DefaultGenesis is an empty object +func (AppModuleBasic) DefaultGenesis(_ codec.JSONCodec) json.RawMessage { + return []byte("{}") +} + +// ValidateGenesis is always successful, as we ignore the value +func (AppModuleBasic) ValidateGenesis(_ codec.JSONCodec, config client.TxEncodingConfig, _ json.RawMessage) error { + return nil +} + // AppModule implements the sdk.AppModule interface type AppModule struct { AppModuleBasic @@ -95,11 +105,6 @@ func NewAppModule(keeper *keeper.Keeper, ac address.Codec) AppModule { } } -var ( - _ appmodule.AppModule = AppModule{} - _ appmodule.HasBeginBlocker = AppModule{} -) - // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} @@ -119,7 +124,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { } // InitGenesis is ignored, no sense in serializing future upgrades -func (am AppModule) InitGenesis(ctx sdk.Context, _ codec.JSONCodec, _ json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis(ctx sdk.Context, _ codec.JSONCodec, _ json.RawMessage) { // set version map automatically if available if versionMap := am.keeper.GetInitVersionMap(); versionMap != nil { // chains can still use a custom init chainer for setting the version map @@ -140,18 +145,6 @@ func (am AppModule) InitGenesis(ctx sdk.Context, _ codec.JSONCodec, _ json.RawMe panic(err) } } - - return []abci.ValidatorUpdate{} -} - -// DefaultGenesis is an empty object -func (AppModuleBasic) DefaultGenesis(_ codec.JSONCodec) json.RawMessage { - return []byte("{}") -} - -// ValidateGenesis is always successful, as we ignore the value -func (AppModuleBasic) ValidateGenesis(_ codec.JSONCodec, config client.TxEncodingConfig, _ json.RawMessage) error { - return nil } // ExportGenesis is always empty, as InitGenesis does nothing either @@ -162,11 +155,11 @@ func (am AppModule) ExportGenesis(_ sdk.Context, cdc codec.JSONCodec) json.RawMe // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return ConsensusVersion } -// BeginBlock calls the upgrade module hooks +// PreBlock calls the upgrade module hooks // -// CONTRACT: this is registered in BeginBlocker *before* all other modules' BeginBlock functions -func (am AppModule) BeginBlock(ctx context.Context) error { - return BeginBlocker(ctx, am.keeper) +// CONTRACT: this is called *before* all other modules' BeginBlock functions +func (am AppModule) PreBlock(ctx context.Context) (appmodule.ResponsePreBlock, error) { + return PreBlocker(ctx, am.keeper) } // @@ -189,6 +182,7 @@ type ModuleInputs struct { AddressCodec address.Codec AppOpts servertypes.AppOptions `optional:"true"` + Viper *viper.Viper `optional:"true"` } type ModuleOutputs struct { @@ -196,7 +190,6 @@ type ModuleOutputs struct { UpgradeKeeper *keeper.Keeper Module appmodule.AppModule - GovHandler govv1beta1.HandlerRoute BaseAppOption runtime.BaseAppOption } @@ -206,7 +199,13 @@ func ProvideModule(in ModuleInputs) ModuleOutputs { skipUpgradeHeights = make(map[int64]bool) ) - if in.AppOpts != nil { + if in.Viper != nil { // viper takes precedence over app options + for _, h := range in.Viper.GetIntSlice(server.FlagUnsafeSkipUpgrades) { + skipUpgradeHeights[int64(h)] = true + } + + homePath = in.Viper.GetString(flags.FlagHome) + } else if in.AppOpts != nil { for _, h := range cast.ToIntSlice(in.AppOpts.Get(server.FlagUnsafeSkipUpgrades)) { skipUpgradeHeights[int64(h)] = true } @@ -226,9 +225,8 @@ func ProvideModule(in ModuleInputs) ModuleOutputs { k.SetVersionSetter(app) } m := NewAppModule(k, in.AddressCodec) - gh := govv1beta1.HandlerRoute{RouteKey: types.RouterKey, Handler: NewSoftwareUpgradeProposalHandler(k)} - return ModuleOutputs{UpgradeKeeper: k, Module: m, GovHandler: gh, BaseAppOption: baseappOpt} + return ModuleOutputs{UpgradeKeeper: k, Module: m, BaseAppOption: baseappOpt} } func PopulateVersionMap(upgradeKeeper *keeper.Keeper, modules map[string]appmodule.AppModule) { diff --git a/x/upgrade/plan/downloader.go b/x/upgrade/plan/downloader.go index d09d4725b8ea..7bcb153bd56e 100644 --- a/x/upgrade/plan/downloader.go +++ b/x/upgrade/plan/downloader.go @@ -1,6 +1,7 @@ package plan import ( + "context" "errors" "fmt" neturl "net/url" @@ -8,11 +9,11 @@ import ( "path/filepath" "strings" + "github.com/hashicorp/go-cleanhttp" "github.com/hashicorp/go-getter" ) -// DownloadUpgrade downloads the given url into the provided directory and ensures it's valid. -// The provided url must contain a checksum parameter that matches the file being downloaded. +// DownloadUpgrade downloads the given url into the provided directory. // If this returns nil, the download was successful, and {dstRoot}/bin/{daemonName} is a regular executable file. // This is an opinionated directory structure that corresponds with Cosmovisor requirements. // If the url is not an archive, it is downloaded and saved to {dstRoot}/bin/{daemonName}. @@ -21,15 +22,13 @@ import ( // If the archive does not contain a /bin/{daemonName} file, then this will attempt to move /{daemonName} to /bin/{daemonName}. // If the archive does not contain either /bin/{daemonName} or /{daemonName}, an error is returned. // -// Note: Because a checksum is required, this function cannot be used to download non-archive directories. // If dstRoot already exists, some or all of its contents might be updated. +// NOTE: This functions does not check the provided url for validity. func DownloadUpgrade(dstRoot, url, daemonName string) error { - if err := ValidateIsURLWithChecksum(url); err != nil { - return err - } target := filepath.Join(dstRoot, "bin", daemonName) + // First try to download it as a single file. If there's no error, it's okay and we're done. - if err := getter.GetFile(target, url); err != nil { + if err := getFile(url, target); err != nil { // If it was a checksum error, no need to try as directory. if _, ok := err.(*getter.ChecksumError); ok { return err @@ -97,26 +96,24 @@ func EnsureBinary(path string) error { return nil } -// DownloadURLWithChecksum gets the contents of the given url, ensuring the checksum is correct. -// The provided url must contain a checksum parameter that matches the file being downloaded. +// DownloadURL gets the contents of the given url. +// The provided url can contain a checksum parameter that matches the file being downloaded. // If there isn't an error, the content returned by the url will be returned as a string. // Returns an error if: -// - The url is not a URL or does not contain a checksum parameter. +// - The url is not a URL or does not contain a checksum parameter (when required). // - Downloading the URL fails. // - The checksum does not match what is returned by the URL. // - The URL does not return a regular file. // - The downloaded file is empty or only whitespace. -func DownloadURLWithChecksum(url string) (string, error) { - if err := ValidateIsURLWithChecksum(url); err != nil { - return "", err - } +func DownloadURL(url string) (string, error) { tempDir, err := os.MkdirTemp("", "reference") if err != nil { return "", fmt.Errorf("could not create temp directory: %w", err) } defer os.RemoveAll(tempDir) tempFile := filepath.Join(tempDir, "content") - if err = getter.GetFile(tempFile, url); err != nil { + + if err := getFile(url, tempFile); err != nil { return "", fmt.Errorf("could not download url \"%s\": %w", url, err) } tempFileBz, rerr := os.ReadFile(tempFile) @@ -130,14 +127,40 @@ func DownloadURLWithChecksum(url string) (string, error) { return tempFileStr, nil } -// ValidateIsURLWithChecksum checks that the given string is a url and contains a checksum query parameter. -func ValidateIsURLWithChecksum(urlStr string) error { +// ValidateURL checks that the given string is a valid url and optionally contains a checksum query parameter. +func ValidateURL(urlStr string, mustChecksum bool) error { url, err := neturl.Parse(urlStr) if err != nil { return err } - if len(url.Query().Get("checksum")) == 0 { + + if mustChecksum && len(url.Query().Get("checksum")) == 0 { return errors.New("missing checksum query parameter") } + return nil } + +// getFile downloads the given url into the provided directory. +func getFile(url, dst string) error { + httpGetter := &getter.HttpGetter{ + Client: cleanhttp.DefaultClient(), + XTerraformGetDisabled: true, + } + + goGetterGetters := getter.Getters + goGetterGetters["http"] = httpGetter + goGetterGetters["https"] = httpGetter + + // https://github.com/hashicorp/go-getter#security-options + getterClient := &getter.Client{ + Ctx: context.Background(), + DisableSymlinks: true, + Src: url, + Dst: dst, + Pwd: dst, + Getters: goGetterGetters, + } + + return getterClient.Get() +} diff --git a/x/upgrade/plan/downloader_test.go b/x/upgrade/plan/downloader_test.go index ef0f727550ab..7768b30c1663 100644 --- a/x/upgrade/plan/downloader_test.go +++ b/x/upgrade/plan/downloader_test.go @@ -158,14 +158,6 @@ func (s *DownloaderTestSuite) TestDownloadUpgrade() { assert.Contains(t, err.Error(), "no such file or directory") }) - s.T().Run("url does not have checksum", func(t *testing.T) { - dstRoot := getDstDir(t.Name()) - url := "file://" + justAFilePath - err := DownloadUpgrade(dstRoot, url, justAFile.Name) - require.Error(t, err) - require.Contains(t, err.Error(), "missing checksum query parameter") - }) - s.T().Run("url has incorrect checksum", func(t *testing.T) { dstRoot := getDstDir(t.Name()) badChecksum := "2c22e34510bd1d4ad2343cdc54f7165bccf30caef73f39af7dd1db2795a3da48" @@ -248,7 +240,7 @@ func (s *DownloaderTestSuite) TestEnsureBinary() { }) } -func (s *DownloaderTestSuite) TestDownloadURLWithChecksum() { +func (s *DownloaderTestSuite) TestDownloadURL() { planContents := `{"binaries":{"xxx/yyy":"url"}}` planFile := NewTestFile("plan-info.json", planContents) planPath := s.saveSrcTestFile(planFile) @@ -259,21 +251,21 @@ func (s *DownloaderTestSuite) TestDownloadURLWithChecksum() { s.T().Run("url does not exist", func(t *testing.T) { url := "file:///never-gonna-be-a-thing?checksum=sha256:2c22e34510bd1d4ad2343cdc54f7165bccf30caef73f39af7dd1db2795a3da48" - _, err := DownloadURLWithChecksum(url) + _, err := DownloadURL(url) require.Error(t, err) assert.Contains(t, err.Error(), "could not download url") }) s.T().Run("without checksum", func(t *testing.T) { url := "file://" + planPath - _, err := DownloadURLWithChecksum(url) - require.Error(t, err) - assert.Contains(t, err.Error(), "missing checksum query parameter") + actual, err := DownloadURL(url) + require.NoError(t, err) + require.Equal(t, planContents, actual) }) s.T().Run("with correct checksum", func(t *testing.T) { url := "file://" + planPath + "?checksum=sha256:" + planChecksum - actual, err := DownloadURLWithChecksum(url) + actual, err := DownloadURL(url) require.NoError(t, err) require.Equal(t, planContents, actual) }) @@ -281,7 +273,7 @@ func (s *DownloaderTestSuite) TestDownloadURLWithChecksum() { s.T().Run("with incorrect checksum", func(t *testing.T) { badChecksum := "2c22e34510bd1d4ad2343cdc54f7165bccf30caef73f39af7dd1db2795a3da48" url := "file://" + planPath + "?checksum=sha256:" + badChecksum - _, err := DownloadURLWithChecksum(url) + _, err := DownloadURL(url) require.Error(t, err) assert.Contains(t, err.Error(), "Checksums did not match") assert.Contains(t, err.Error(), "Expected: "+badChecksum) @@ -290,7 +282,7 @@ func (s *DownloaderTestSuite) TestDownloadURLWithChecksum() { s.T().Run("plan is empty", func(t *testing.T) { url := "file://" + emptyPlanPath + "?checksum=sha256:" + emptyChecksum - _, err := DownloadURLWithChecksum(url) + _, err := DownloadURL(url) require.Error(t, err) assert.Contains(t, err.Error(), "no content returned") }) diff --git a/x/upgrade/plan/info.go b/x/upgrade/plan/info.go index ac636412cf68..5ad692d3b18e 100644 --- a/x/upgrade/plan/info.go +++ b/x/upgrade/plan/info.go @@ -15,24 +15,51 @@ import ( // Info is the special structure that the Plan.Info string can be (as json). type Info struct { + parseConfig ParseConfig `json:"-"` + Binaries BinaryDownloadURLMap `json:"binaries"` } // BinaryDownloadURLMap is a map of os/architecture stings to a URL where the binary can be downloaded. type BinaryDownloadURLMap map[string]string +// ParseConfig is used to configure the parsing of a Plan.Info string. +type ParseConfig struct { + // EnforceChecksum, if true, will cause all downloaded files to be checked against their checksums. + // When false, checksums are not enforced to be present in the url. + EnforceChecksum bool +} + +// ParseOption is used to configure the parsing of a Plan.Info string. +type ParseOption func(*ParseConfig) + +// ParseOptionEnforceChecksum returns a ParseOption that sets the EnforceChecksum field of the ParseConfig. +func ParseOptionEnforceChecksum(enforce bool) ParseOption { + return func(c *ParseConfig) { + c.EnforceChecksum = enforce + } +} + // ParseInfo parses an info string into a map of os/arch strings to URL string. // If the infoStr is a url, an GET request will be made to it, and its response will be parsed instead. -func ParseInfo(infoStr string) (*Info, error) { - infoStr = strings.TrimSpace(infoStr) +func ParseInfo(infoStr string, opts ...ParseOption) (*Info, error) { + parseConfig := &ParseConfig{} + for _, opt := range opts { + opt(parseConfig) + } + infoStr = strings.TrimSpace(infoStr) if len(infoStr) == 0 { return nil, errors.New("plan info must not be blank") } // If it's a url, download it and treat the result as the real info. - if _, err := neturl.Parse(infoStr); err == nil { - infoStr, err = DownloadURLWithChecksum(infoStr) + if _, err := neturl.ParseRequestURI(infoStr); err == nil { + if err := ValidateURL(infoStr, parseConfig.EnforceChecksum); err != nil { + return nil, err + } + + infoStr, err = DownloadURL(infoStr) if err != nil { return nil, err } @@ -44,6 +71,8 @@ func ParseInfo(infoStr string) (*Info, error) { return nil, fmt.Errorf("could not parse plan info: %v", err) } + planInfo.parseConfig = *parseConfig + return &planInfo, nil } @@ -55,10 +84,10 @@ func ParseInfo(infoStr string) (*Info, error) { // // Warning: This is an expensive process. See BinaryDownloadURLMap.CheckURLs for more info. func (m Info) ValidateFull(daemonName string) error { - if err := m.Binaries.ValidateBasic(); err != nil { + if err := m.Binaries.ValidateBasic(m.parseConfig.EnforceChecksum); err != nil { return err } - if err := m.Binaries.CheckURLs(daemonName); err != nil { + if err := m.Binaries.CheckURLs(daemonName, m.parseConfig.EnforceChecksum); err != nil { return err } return nil @@ -69,8 +98,8 @@ func (m Info) ValidateFull(daemonName string) error { // - This has at least one entry. // - All entry keys have the format "os/arch" or are "any". // - All entry values are valid URLs. -// - All URLs contain a checksum query parameter. -func (m BinaryDownloadURLMap) ValidateBasic() error { +// - When `enforceChecksum` is true all URLs must contain a checksum query parameter. +func (m BinaryDownloadURLMap) ValidateBasic(enforceChecksum bool) error { // Make sure there's at least one. if len(m) == 0 { return errors.New("no \"binaries\" entries found") @@ -81,8 +110,9 @@ func (m BinaryDownloadURLMap) ValidateBasic() error { if key != "any" && !osArchRx.MatchString(key) { return fmt.Errorf("invalid os/arch format in key \"%s\"", key) } - if err := ValidateIsURLWithChecksum(val); err != nil { - return fmt.Errorf("invalid url \"%s\" in binaries[%s]: %v", val, key, err) + + if err := ValidateURL(val, enforceChecksum); err != nil { + return fmt.Errorf("invalid url \"%s\" in binaries[%s]: %w", val, key, err) } } @@ -93,7 +123,7 @@ func (m BinaryDownloadURLMap) ValidateBasic() error { // The provided daemonName is the name of the executable file expected in all downloaded directories. // Warning: This is an expensive process. // It will make an HTTP GET request to each URL and download the response. -func (m BinaryDownloadURLMap) CheckURLs(daemonName string) error { +func (m BinaryDownloadURLMap) CheckURLs(daemonName string, enforceChecksum bool) error { tempDir, err := os.MkdirTemp("", "os-arch-downloads") if err != nil { return fmt.Errorf("could not create temp directory: %w", err) @@ -101,8 +131,12 @@ func (m BinaryDownloadURLMap) CheckURLs(daemonName string) error { defer os.RemoveAll(tempDir) for osArch, url := range m { dstRoot := filepath.Join(tempDir, strings.ReplaceAll(osArch, "/", "-")) + if err := ValidateURL(url, enforceChecksum); err != nil { + return fmt.Errorf("error validating url for os/arch %s: %w", osArch, err) + } + if err = DownloadUpgrade(dstRoot, url, daemonName); err != nil { - return fmt.Errorf("error downloading binary for os/arch %s: %v", osArch, err) + return fmt.Errorf("error downloading binary for os/arch %s: %w", osArch, err) } } return nil diff --git a/x/upgrade/plan/info_test.go b/x/upgrade/plan/info_test.go index ed5a206762d7..48432935dbe2 100644 --- a/x/upgrade/plan/info_test.go +++ b/x/upgrade/plan/info_test.go @@ -74,6 +74,12 @@ func (s *InfoTestSuite) TestParseInfo() { expectedInfo: nil, expectedInError: []string{"plan info must not be blank"}, }, + { + name: "empty JSON", + infoStrMaker: makeInfoStrFuncString("{}"), + expectedInfo: &Info{}, + expectedInError: nil, + }, { name: "json binaries is wrong data type", infoStrMaker: makeInfoStrFuncString(binariesWrongJSON), @@ -191,9 +197,10 @@ func (s *InfoTestSuite) TestBinaryDownloadURLMapValidateBasic() { return url + "?checksum=sha256:b5a2c96250612366ea272ffac6d9744aaf4b45aacd96aa7cfcb931ee3b558259" } tests := []struct { - name string - urlMap BinaryDownloadURLMap - errs []string + name string + urlMap BinaryDownloadURLMap + parseConfig ParseConfig + errs []string }{ { name: "empty map", @@ -241,7 +248,8 @@ func (s *InfoTestSuite) TestBinaryDownloadURLMapValidateBasic() { urlMap: BinaryDownloadURLMap{ "darwin/amd64": "https://v1.cosmos.network/sdk", }, - errs: []string{"invalid url", "darwin/amd64", "missing checksum query parameter"}, + parseConfig: ParseConfig{EnforceChecksum: false}, + errs: nil, }, { name: "multiple valid entries but one bad url", @@ -269,7 +277,7 @@ func (s *InfoTestSuite) TestBinaryDownloadURLMapValidateBasic() { for _, tc := range tests { s.T().Run(tc.name, func(t *testing.T) { - actualErr := tc.urlMap.ValidateBasic() + actualErr := tc.urlMap.ValidateBasic(tc.parseConfig.EnforceChecksum) if len(tc.errs) > 0 { require.Error(t, actualErr) for _, expectedErr := range tc.errs { @@ -291,9 +299,10 @@ func (s *InfoTestSuite) TestBinaryDownloadURLMapCheckURLs() { linux386URL := makeFileURL(s.T(), linux386Path) tests := []struct { - name string - urlMap BinaryDownloadURLMap - errs []string + name string + urlMap BinaryDownloadURLMap + parseConfig ParseConfig + errs []string }{ { name: "two good entries", @@ -321,7 +330,7 @@ func (s *InfoTestSuite) TestBinaryDownloadURLMapCheckURLs() { for _, tc := range tests { s.T().Run(tc.name, func(t *testing.T) { - actualErr := tc.urlMap.CheckURLs("daemon") + actualErr := tc.urlMap.CheckURLs("daemon", tc.parseConfig.EnforceChecksum) if len(tc.errs) > 0 { require.Error(t, actualErr) for _, expectedErr := range tc.errs { diff --git a/x/upgrade/types/errors.go b/x/upgrade/types/errors.go index e1877a1acf20..5b80e2fa378f 100644 --- a/x/upgrade/types/errors.go +++ b/x/upgrade/types/errors.go @@ -14,4 +14,6 @@ var ( ErrNoUpgradedClientFound = errors.Register(ModuleName, 4, "upgraded client not found") // ErrNoUpgradedConsensusStateFound error if there is no upgraded consensus state for the next version ErrNoUpgradedConsensusStateFound = errors.Register(ModuleName, 5, "upgraded consensus state not found") + // ErrInvalidSigner error if the authority is not the signer for a proposal message + ErrInvalidSigner = errors.Register(ModuleName, 6, "expected authority account as only signer for proposal message") ) diff --git a/x/upgrade/types/msgs.go b/x/upgrade/types/msgs.go deleted file mode 100644 index 84ff4f6c926b..000000000000 --- a/x/upgrade/types/msgs.go +++ /dev/null @@ -1,19 +0,0 @@ -package types - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -var _, _ sdk.Msg = &MsgSoftwareUpgrade{}, &MsgCancelUpgrade{} - -// GetSigners returns the expected signers for MsgSoftwareUpgrade. -func (m *MsgSoftwareUpgrade) GetSigners() []sdk.AccAddress { - addr, _ := sdk.AccAddressFromBech32(m.Authority) - return []sdk.AccAddress{addr} -} - -// GetSigners returns the expected signers for MsgCancelUpgrade. -func (m *MsgCancelUpgrade) GetSigners() []sdk.AccAddress { - addr, _ := sdk.AccAddressFromBech32(m.Authority) - return []sdk.AccAddress{addr} -} diff --git a/x/upgrade/types/proposal.go b/x/upgrade/types/proposal.go index 91d40e4962b7..ebac9a18eb29 100644 --- a/x/upgrade/types/proposal.go +++ b/x/upgrade/types/proposal.go @@ -9,7 +9,9 @@ const ( ProposalTypeCancelSoftwareUpgrade string = "CancelSoftwareUpgrade" ) -// NewSoftwareUpgradeProposal creates a new SoftwareUpgradeProposal instance +// NewSoftwareUpgradeProposal creates a new SoftwareUpgradeProposal instance. +// Deprecated: this proposal is considered legacy and is deprecated in favor of +// Msg-based gov proposals. See MsgSoftwareUpgrade. func NewSoftwareUpgradeProposal(title, description string, plan Plan) gov.Content { return &SoftwareUpgradeProposal{title, description, plan} } @@ -42,7 +44,9 @@ func (sup *SoftwareUpgradeProposal) ValidateBasic() error { return gov.ValidateAbstract(sup) } -// NewCancelSoftwareUpgradeProposal creates a new CancelSoftwareUpgradeProposal instance +// NewCancelSoftwareUpgradeProposal creates a new CancelSoftwareUpgradeProposal +// instance. Deprecated: this proposal is considered legacy and is deprecated in +// favor of Msg-based gov proposals. See MsgCancelUpgrade. func NewCancelSoftwareUpgradeProposal(title, description string) gov.Content { return &CancelSoftwareUpgradeProposal{title, description} }